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,EAAOiM,OAAO,IAAIpuB,OAAOoH,OAAOC,KAAK4Y,OAAO8hB,EAAE7hB,IAAK6hB,EAAE5hB,QAElDgC,GAWU6f,CAAaH,GAC5B,GAAyB,IAArBA,EAAU7mC,OAGZ,OAFAuF,EAAIovB,UAAUxN,EAAQ2f,QACtBvhC,EAAIkK,QAAQ,IAGdlK,EAAIovB,UAAUxN,EAAQ2f,KAabG,EACXh3B,IACqB,CACrBlP,GAAI,uBACJkP,EACAhO,KAAM,wBACNH,KAAM,gKClDR,IAAAR,EAAAb,EAAA,SAGA,MAAMymC,GAAgB,EAAA5lC,EAAAgK,eAA+B,CACnD67B,eAAgB,GAChBrD,WAAY,GACZsD,oBAAqB,GACrBvsB,iBAAkB,GAClBwsB,UAAW,GACX/E,kBAAmB,GACnBgF,wBAAyB,GACzBC,OAAQ,GACRC,oBAAqB,GACrBC,sBAAuB,GACvBC,oBAAqB,GACrB1F,OAAQ,GACR2F,kBAAmB,GACnBC,eAAgB,CAAEC,GAAI,CAAE3iB,IAAK,EAAGC,IAAK,MAGjC2iB,GAAe,EAAAxmC,EAAAgK,eAAc","sources":["node_modules/@babel/runtime/helpers/esm/extends.js","scripts/src/react/components/Form/Switch/index.tsx","node_modules/react-media/esm/react-media.js","node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","node_modules/@babel/runtime/helpers/esm/defineProperty.js","node_modules/prop-types/index.js","node_modules/prop-types/factoryWithThrowingShims.js","node_modules/prop-types/lib/ReactPropTypesSecret.js","node_modules/invariant/browser.js","node_modules/json2mq/index.js","node_modules/string-convert/camel2hyphen.js","scripts/src/react/utils/media.ts","node_modules/@react-google-maps/api/src/map-context.ts","node_modules/@react-google-maps/api/src/utils/helper.ts","node_modules/@react-google-maps/api/src/utils/foreach.ts","node_modules/@react-google-maps/api/src/utils/reduce.ts","node_modules/@react-google-maps/api/src/GoogleMap.tsx","node_modules/@react-google-maps/api/node_modules/regenerator-runtime/runtime.js","node_modules/@react-google-maps/api/src/utils/isbrowser.ts","node_modules/@react-google-maps/api/src/utils/injectscript.ts","node_modules/@react-google-maps/api/src/utils/prevent-google-fonts.ts","node_modules/@react-google-maps/api/src/utils/make-load-script-url.ts","node_modules/@react-google-maps/api/src/LoadScript.tsx","node_modules/@react-google-maps/api/src/useLoadScript.tsx","node_modules/@react-google-maps/api/src/components/maps/TrafficLayer.tsx","node_modules/@react-google-maps/api/src/components/maps/BicyclingLayer.tsx","node_modules/@react-google-maps/api/src/components/maps/TransitLayer.tsx","node_modules/@react-google-maps/api/src/components/drawing/DrawingManager.tsx","node_modules/@react-google-maps/api/src/components/drawing/Marker.tsx","node_modules/@react-google-maps/api/src/components/addons/MarkerClusterer.tsx","node_modules/@react-google-maps/api/src/components/addons/InfoBox.tsx","node_modules/@react-google-maps/api/src/components/drawing/InfoWindow.tsx","node_modules/@react-google-maps/api/src/components/drawing/Polyline.tsx","node_modules/@react-google-maps/api/src/components/drawing/Polygon.tsx","node_modules/@react-google-maps/api/src/components/drawing/Rectangle.tsx","node_modules/@react-google-maps/api/src/components/drawing/Circle.tsx","node_modules/@react-google-maps/api/src/components/drawing/Data.tsx","node_modules/@react-google-maps/api/src/components/kml/KmlLayer.tsx","node_modules/@react-google-maps/api/src/components/dom/dom-helper.ts","node_modules/@react-google-maps/api/src/components/dom/OverlayView.tsx","node_modules/@react-google-maps/api/src/components/overlays/GroundOverlay.tsx","node_modules/@react-google-maps/api/src/utils/noop.ts","node_modules/@react-google-maps/api/src/components/heatmap/HeatmapLayer.tsx","node_modules/@react-google-maps/api/src/components/streetview/StreetViewPanorama.tsx","node_modules/@react-google-maps/api/src/components/streetview/StreetViewService.tsx","node_modules/@react-google-maps/api/src/components/directions/DirectionsService.tsx","node_modules/@react-google-maps/api/src/components/directions/DirectionsRenderer.tsx","node_modules/@react-google-maps/api/src/components/distance-matrix/DistanceMatrixService.tsx","node_modules/@react-google-maps/api/src/components/places/StandaloneSearchBox.tsx","node_modules/@react-google-maps/api/src/components/places/Autocomplete.tsx","node_modules/@googlemaps/js-api-loader/src/index.ts","node_modules/@react-google-maps/marker-clusterer/src/ClusterIcon.tsx","node_modules/@react-google-maps/marker-clusterer/src/Cluster.tsx","node_modules/@react-google-maps/marker-clusterer/src/Clusterer.tsx","node_modules/@react-google-maps/infobox/src/InfoBox.tsx","scripts/src/react/store-search/components/LocationSearch/index.tsx","node_modules/@swc/helpers/lib/_object_spread.js","node_modules/@swc/helpers/lib/_define_property.js","scripts/src/react/services/maps/autocomplete.ts","scripts/src/react/utils/maps.ts","scripts/src/react/store-search/utils/context.ts"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : 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 return _extends.apply(this, arguments);\n}","import React, { ChangeEvent, useEffect, useState } from \"react\";\r\n\r\nimport cx from \"classnames\";\r\n\r\ninterface ISwitchProps {\r\n text: string;\r\n value: boolean;\r\n seasonalTextColor?: string;\r\n id: string;\r\n onToggle: (e: ChangeEvent) => void;\r\n className?: string;\r\n theme?: string;\r\n alignRight?: boolean;\r\n defaultFilter?: boolean;\r\n}\r\n\r\nconst Switch = ({\r\n text,\r\n onToggle,\r\n value,\r\n seasonalTextColor,\r\n id,\r\n className,\r\n alignRight,\r\n defaultFilter = false,\r\n theme = \"light\"\r\n}: React.PropsWithChildren) => {\r\n const [checked, setChecked] = useState(value);\r\n const handleChange = (e: ChangeEvent) => {\r\n // sets all values to true or false but leaves store filters as on and off.\r\n setChecked(!checked);\r\n onToggle(e);\r\n\r\n };\r\n if (!defaultFilter) {\r\n useEffect(() => setChecked(value), [value]); // when value changes externally, this gets updated (i.e. we just received config from the API)\r\n }\r\n return (\r\n
\r\n
\r\n
\r\n \r\n \r\n {text}\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default Switch;\r\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _defineProperty from '@babel/runtime/helpers/esm/defineProperty';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport invariant from 'invariant';\nimport json2mq from 'json2mq';\n\nvar MediaQueryListener =\n/*#__PURE__*/\nfunction () {\n function MediaQueryListener(targetWindow, query, listener) {\n var _this = this;\n\n this.nativeMediaQueryList = targetWindow.matchMedia(query);\n this.active = true; // Safari doesn't clear up listener with removeListener\n // when the listener is already waiting in the event queue.\n // Having an active flag to make sure the listener is not called\n // after we removeListener.\n\n this.cancellableListener = function () {\n _this.matches = _this.nativeMediaQueryList.matches;\n\n if (_this.active) {\n listener.apply(void 0, arguments);\n }\n };\n\n this.nativeMediaQueryList.addListener(this.cancellableListener);\n this.matches = this.nativeMediaQueryList.matches;\n }\n\n var _proto = MediaQueryListener.prototype;\n\n _proto.cancel = function cancel() {\n this.active = false;\n this.nativeMediaQueryList.removeListener(this.cancellableListener);\n };\n\n return MediaQueryListener;\n}();\n\nvar queryType = PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.arrayOf(PropTypes.object.isRequired)]);\n/**\n * Conditionally renders based on whether or not a media query matches.\n */\n\nvar Media =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Media, _React$Component);\n\n function Media(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"queries\", []);\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getMatches\", function () {\n var result = _this.queries.reduce(function (acc, _ref) {\n var _extends2;\n\n var name = _ref.name,\n mqListener = _ref.mqListener;\n return _extends({}, acc, (_extends2 = {}, _extends2[name] = mqListener.matches, _extends2));\n }, {}); // return result;\n\n\n return unwrapSingleQuery(result);\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"updateMatches\", function () {\n var newMatches = _this.getMatches();\n\n _this.setState(function () {\n return {\n matches: newMatches\n };\n }, _this.onChange);\n });\n\n !(!(!props.query && !props.queries) || props.query && props.queries) ? process.env.NODE_ENV !== \"production\" ? invariant(false, ' must be supplied with either \"query\" or \"queries\"') : invariant(false) : void 0;\n !(props.defaultMatches === undefined || !props.query || typeof props.defaultMatches === \"boolean\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" when query is set, defaultMatches must be a boolean, received \" + typeof props.defaultMatches) : invariant(false) : void 0;\n !(props.defaultMatches === undefined || !props.queries || typeof props.defaultMatches === \"object\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" when queries is set, defaultMatches must be a object of booleans, received \" + typeof props.defaultMatches) : invariant(false) : void 0;\n\n if (typeof window !== \"object\") {\n // In case we're rendering on the server, apply the default matches\n var matches;\n\n if (props.defaultMatches !== undefined) {\n matches = props.defaultMatches;\n } else if (props.query) {\n matches = true;\n }\n /* if (props.queries) */\n else {\n matches = Object.keys(_this.props.queries).reduce(function (acc, key) {\n var _extends3;\n\n return _extends({}, acc, (_extends3 = {}, _extends3[key] = true, _extends3));\n }, {});\n }\n\n _this.state = {\n matches: matches\n };\n return _assertThisInitialized(_this);\n }\n\n _this.initialize(); // Instead of calling this.updateMatches, we manually set the initial state to prevent\n // calling setState, which could trigger an unnecessary second render\n\n\n _this.state = {\n matches: _this.props.defaultMatches !== undefined ? _this.props.defaultMatches : _this.getMatches()\n };\n\n _this.onChange();\n\n return _this;\n }\n\n var _proto = Media.prototype;\n\n _proto.initialize = function initialize() {\n var _this2 = this;\n\n var targetWindow = this.props.targetWindow || window;\n !(typeof targetWindow.matchMedia === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" does not support `matchMedia`.\") : invariant(false) : void 0;\n var queries = this.props.queries || wrapInQueryObject(this.props.query);\n this.queries = Object.keys(queries).map(function (name) {\n var query = queries[name];\n var qs = typeof query !== \"string\" ? json2mq(query) : query;\n var mqListener = new MediaQueryListener(targetWindow, qs, _this2.updateMatches);\n return {\n name: name,\n mqListener: mqListener\n };\n });\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this.initialize(); // If props.defaultMatches has been set, ensure we trigger a two-pass render.\n // This is useful for SSR with mismatching defaultMatches vs actual matches from window.matchMedia\n // Details: https://github.com/ReactTraining/react-media/issues/81\n\n if (this.props.defaultMatches !== undefined) {\n this.updateMatches();\n }\n };\n\n _proto.onChange = function onChange() {\n var onChange = this.props.onChange;\n\n if (onChange) {\n onChange(this.state.matches);\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.queries.forEach(function (_ref2) {\n var mqListener = _ref2.mqListener;\n return mqListener.cancel();\n });\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n children = _this$props.children,\n render = _this$props.render;\n var matches = this.state.matches;\n var isAnyMatches = typeof matches === \"object\" ? Object.keys(matches).some(function (key) {\n return matches[key];\n }) : matches;\n return render ? isAnyMatches ? render(matches) : null : children ? typeof children === \"function\" ? children(matches) : !Array.isArray(children) || children.length // Preact defaults to empty children array\n ? isAnyMatches ? // We have to check whether child is a composite component or not to decide should we\n // provide `matches` as a prop or not\n React.Children.only(children) && typeof React.Children.only(children).type === \"string\" ? React.Children.only(children) : React.cloneElement(React.Children.only(children), {\n matches: matches\n }) : null : null : null;\n };\n\n return Media;\n}(React.Component);\n/**\n * Wraps a single query in an object. This is used to provide backward compatibility with\n * the old `query` prop (as opposed to `queries`). If only a single query is passed, the object\n * will be unpacked down the line, but this allows our internals to assume an object of queries\n * at all times.\n */\n\n\n_defineProperty(Media, \"propTypes\", {\n defaultMatches: PropTypes.oneOfType([PropTypes.bool, PropTypes.objectOf(PropTypes.bool)]),\n query: queryType,\n queries: PropTypes.objectOf(queryType),\n render: PropTypes.func,\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n targetWindow: PropTypes.object,\n onChange: PropTypes.func\n});\n\nfunction wrapInQueryObject(query) {\n return {\n __DEFAULT__: query\n };\n}\n/**\n * Unwraps an object of queries, if it was originally passed as a single query.\n */\n\n\nfunction unwrapSingleQuery(queryObject) {\n var queryNames = Object.keys(queryObject);\n\n if (queryNames.length === 1 && queryNames[0] === \"__DEFAULT__\") {\n return queryObject.__DEFAULT__;\n }\n\n return queryObject;\n}\n\nexport default Media;\n","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\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;","var camel2hyphen = function (str) {\n return str\n .replace(/[A-Z]/g, function (match) {\n return '-' + match.toLowerCase();\n })\n .toLowerCase();\n};\n\nmodule.exports = camel2hyphen;","export default {\r\n min: {\r\n S: \"(min-width: 400px)\",\r\n M: \"(min-width: 600px)\",\r\n L: \"(min-width: 1024px)\",\r\n XL: \"(min-width: 1200px)\"\r\n },\r\n max: {\r\n XS: \"(max-width: 399px)\",\r\n S: \"(max-width: 599px)\",\r\n M: \"(max-width: 1023px)\",\r\n L: \"(max-width: 1199px)\"\r\n }\r\n};\r\n","import { useContext, createContext } from 'react'\nimport invariant from 'invariant'\n\nconst MapContext = createContext(null)\n\nexport function useGoogleMap(): google.maps.Map | null {\n invariant(!!useContext, 'useGoogleMap is React hook and requires React version 16.8+')\n\n const map = useContext(MapContext)\n\n invariant(!!map, 'useGoogleMap needs a GoogleMap available up in the tree')\n\n return map\n}\n\nexport default MapContext\n","/* global google */\n/* eslint-disable filenames/match-regex */\nimport { reduce } from './reduce'\nimport { forEach } from './foreach'\n\nexport const applyUpdaterToNextProps = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n updaterMap: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n prevProps: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n nextProps: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n instance: any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const map: any = {}\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const iter = (fn: any, key: string): void => {\n const nextValue = nextProps[key]\n\n if (nextValue !== prevProps[key]) {\n map[key] = nextValue\n fn(instance, nextValue)\n }\n }\n\n forEach(updaterMap, iter)\n\n return map\n}\n\nexport function registerEvents(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n instance: any,\n eventMap: Record\n): google.maps.MapsEventListener[] {\n const registeredList = reduce(\n eventMap,\n function reducer(\n acc: google.maps.MapsEventListener[],\n googleEventName: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onEventName: any\n ): google.maps.MapsEventListener[] {\n if (typeof props[onEventName] === 'function') {\n acc.push(google.maps.event.addListener(instance, googleEventName, props[onEventName]))\n }\n\n return acc\n },\n []\n )\n\n return registeredList\n}\nfunction unregisterEvent(registered: google.maps.MapsEventListener): void {\n google.maps.event.removeListener(registered)\n}\n\nexport function unregisterEvents(events: google.maps.MapsEventListener[] = []): void {\n events.forEach(unregisterEvent)\n}\n\nexport function applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps,\n instance,\n}: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n updaterMap: any\n eventMap: Record\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n prevProps: any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n nextProps: any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n instance: any\n}): google.maps.MapsEventListener[] {\n const registeredEvents = registerEvents(nextProps, instance, eventMap)\n applyUpdaterToNextProps(updaterMap, prevProps, nextProps, instance)\n return registeredEvents\n}\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function forEach(obj: any, fn: any): any {\n Object.keys(obj).forEach(function iterator(key) {\n return fn(obj[key], key)\n })\n}\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const reduce = (obj: any, fn: any, acc: any): any => {\n return Object.keys(obj).reduce(function reducer(newAcc, key) {\n return fn(newAcc, obj[key], key)\n }, acc)\n}\n","import * as React from 'react'\n\nimport MapContext from './map-context'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from './utils/helper'\n\nconst eventMap = {\n onDblClick: 'dblclick',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMapTypeIdChanged: 'maptypeid_changed',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n onTilesLoaded: 'tilesloaded',\n onBoundsChanged: 'bounds_changed',\n onCenterChanged: 'center_changed',\n onClick: 'click',\n onDrag: 'drag',\n onHeadingChanged: 'heading_changed',\n onIdle: 'idle',\n onProjectionChanged: 'projection_changed',\n onResize: 'resize',\n onTiltChanged: 'tilt_changed',\n onZoomChanged: 'zoom_changed',\n}\n\nconst updaterMap = {\n extraMapTypes(map: google.maps.Map, extra: google.maps.MapType[]): void {\n extra.forEach(function forEachExtra(it, i) {\n map.mapTypes.set(String(i), it)\n })\n },\n center(map: google.maps.Map, center: google.maps.LatLng | google.maps.LatLngLiteral): void {\n map.setCenter(center)\n },\n clickableIcons(map: google.maps.Map, clickable: boolean): void {\n map.setClickableIcons(clickable)\n },\n heading(map: google.maps.Map, heading: number): void {\n map.setHeading(heading)\n },\n mapTypeId(map: google.maps.Map, mapTypeId: string): void {\n map.setMapTypeId(mapTypeId)\n },\n options(map: google.maps.Map, options: google.maps.MapOptions): void {\n map.setOptions(options)\n },\n streetView(map: google.maps.Map, streetView: google.maps.StreetViewPanorama): void {\n map.setStreetView(streetView)\n },\n tilt(map: google.maps.Map, tilt: number): void {\n map.setTilt(tilt)\n },\n zoom(map: google.maps.Map, zoom: number): void {\n map.setZoom(zoom)\n },\n}\n\ninterface GoogleMapState {\n map: google.maps.Map | null\n}\n\nexport interface GoogleMapProps {\n id?: string\n mapContainerStyle?: React.CSSProperties\n mapContainerClassName?: string\n options?: google.maps.MapOptions\n /** Additional map types to overlay. Overlay map types will display on top of the base map they are attached to, in the order in which they appear in the overlayMapTypes array (overlays with higher index values are displayed in front of overlays with lower index values). */\n extraMapTypes?: google.maps.MapType[]\n /** The initial Map center. */\n center?: google.maps.LatLng | google.maps.LatLngLiteral\n /** When false, map icons are not clickable. A map icon represents a point of interest, also known as a POI. By default map icons are clickable. */\n clickableIcons?: boolean\n /** The heading for aerial imagery in degrees measured clockwise from cardinal direction North. Headings are snapped to the nearest available angle for which imagery is available. */\n heading?: number\n /** The initial Map mapTypeId. Defaults to ROADMAP. */\n mapTypeId?: string\n /** A StreetViewPanorama to display when the Street View pegman is dropped on the map. If no panorama is specified, a default StreetViewPanorama will be displayed in the map's div when the pegman is dropped. */\n streetView?: google.maps.StreetViewPanorama\n /** Controls the automatic switching behavior for the angle of incidence of the map. The only allowed values are 0 and 45. The value 0 causes the map to always use a 0° overhead view regardless of the zoom level and viewport. The value 45 causes the tilt angle to automatically switch to 45 whenever 45° imagery is available for the current zoom level and viewport, and switch back to 0 whenever 45° imagery is not available (this is the default behavior). 45° imagery is only available for satellite and hybrid map types, within some locations, and at some zoom levels. Note: getTilt returns the current tilt angle, not the value specified by this option. Because getTilt and this option refer to different things, do not bind() the tilt property; doing so may yield unpredictable effects. */\n tilt?: number\n /** The initial Map zoom level. Required. Valid values: Integers between zero, and up to the supported maximum zoom level. */\n zoom?: number\n /** This event is fired when the user clicks on the map. An ApiMouseEvent with properties for the clicked location is returned unless a place icon was clicked, in which case an IconMouseEvent with a placeId is returned. IconMouseEvent and ApiMouseEvent are identical, except that IconMouseEvent has the placeId field. The event can always be treated as an ApiMouseEvent when the placeId is not important. The click event is not fired if a Marker or InfoWindow was clicked. */\n onClick?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the user double-clicks on the map. Note that the click event will also fire, right before this one. */\n onDblClick?: (e: google.maps.MouseEvent) => void\n /** This event is repeatedly fired while the user drags the map. */\n onDrag?: () => void\n /** This event is fired when the user stops dragging the map. */\n onDragEnd?: () => void\n /** This event is fired when the user starts dragging the map. */\n onDragStart?: () => void\n /** This event is fired when the mapTypeId property changes. */\n onMapTypeIdChanged?: () => void\n /** This event is fired whenever the user's mouse moves over the map container. */\n onMouseMove?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the user's mouse exits the map container. */\n onMouseOut?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the user's mouse enters the map container. */\n onMouseOver?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM contextmenu event is fired on the map container. */\n onRightClick?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the visible tiles have finished loading. */\n onTilesLoaded?: () => void\n /** This event is fired when the viewport bounds have changed. */\n onBoundsChanged?: () => void\n /** This event is fired when the map center property changes. */\n onCenterChanged?: () => void\n /** This event is fired when the map heading property changes. */\n onHeadingChanged?: () => void\n /** This event is fired when the map becomes idle after panning or zooming. */\n onIdle?: () => void\n /** This event is fired when the projection has changed. */\n onProjectionChanged?: () => void\n /** This event is fired when the map size has changed. */\n onResize?: () => void\n /** This event is fired when the map tilt property changes. */\n onTiltChanged?: () => void\n /** This event is fired when the map zoom property changes. */\n onZoomChanged?: () => void\n /** This callback is called when the map instance has loaded. It is called with the map instance. */\n onLoad?: (map: google.maps.Map) => void | Promise\n /** This callback is called when the component unmounts. It is called with the map instance. */\n onUnmount?: (map: google.maps.Map) => void | Promise\n}\n\nexport class GoogleMap extends React.PureComponent {\n state: GoogleMapState = {\n map: null,\n }\n\n registeredEvents: google.maps.MapsEventListener[] = []\n\n mapRef: Element | null = null\n\n getInstance = (): google.maps.Map | null => {\n if (this.mapRef === null) {\n return null\n }\n\n return new google.maps.Map(this.mapRef, this.props.options)\n }\n\n panTo = (latLng: google.maps.LatLng | google.maps.LatLngLiteral): void => {\n const map = this.getInstance()\n if (map) {\n map.panTo(latLng)\n }\n }\n\n setMapCallback = (): void => {\n if (this.state.map !== null) {\n if (this.props.onLoad) {\n this.props.onLoad(this.state.map)\n }\n }\n }\n\n componentDidMount(): void {\n const map = this.getInstance()\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: map,\n })\n\n this.setState(function setMap() {\n return {\n map,\n }\n }, this.setMapCallback)\n }\n\n componentDidUpdate(prevProps: GoogleMapProps): void {\n if (this.state.map !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.map,\n })\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.map !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.map)\n }\n\n unregisterEvents(this.registeredEvents)\n }\n }\n\n getRef = (ref: HTMLDivElement | null): void => {\n this.mapRef = ref\n }\n\n render(): React.ReactNode {\n return (\n \n \n {this.state.map !== null ? this.props.children : <>}\n \n \n )\n }\n}\n\nexport default GoogleMap\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","export const isBrowser: boolean = typeof document !== 'undefined'\n","import { isBrowser } from './isbrowser'\n\ninterface WindowWithGoogleMap extends Window {\n initMap?: () => void\n}\n\ninterface InjectScriptArg {\n url: string\n id: string\n nonce?: string\n}\n\nexport const injectScript = ({ url, id, nonce }: InjectScriptArg): Promise => {\n if (!isBrowser) {\n return Promise.reject(new Error('document is undefined'))\n }\n\n return new Promise(function injectScriptCallback(resolve, reject) {\n const existingScript = document.getElementById(id) as HTMLScriptElement | undefined\n const windowWithGoogleMap: WindowWithGoogleMap = window\n if (existingScript) {\n // Same script id/url: keep same script\n const dataStateAttribute = existingScript.getAttribute('data-state')\n if (existingScript.src === url && dataStateAttribute !== 'error') {\n if (dataStateAttribute === 'ready') {\n return resolve(id)\n } else {\n const originalInitMap = windowWithGoogleMap.initMap\n const originalErrorCallback = existingScript.onerror\n\n windowWithGoogleMap.initMap = function initMap(): void {\n if (originalInitMap) {\n originalInitMap()\n }\n resolve(id)\n }\n\n existingScript.onerror = function(err): void {\n if (originalErrorCallback) {\n originalErrorCallback(err)\n }\n reject(err)\n }\n\n return\n }\n }\n // Same script id, but either\n // 1. requested URL is different\n // 2. script failed to load\n else {\n existingScript.remove()\n }\n }\n\n const script = document.createElement('script')\n\n script.type = 'text/javascript'\n script.src = url\n script.id = id\n script.async = true\n script.nonce = nonce\n script.onerror = function onerror(err): void {\n script.setAttribute('data-state', 'error')\n reject(err)\n }\n\n windowWithGoogleMap.initMap = function onload(): void {\n script.setAttribute('data-state', 'ready')\n resolve(id)\n }\n\n document.head.appendChild(script)\n }).catch(err => {\n console.error('injectScript error: ', err)\n throw err\n })\n}\n","const isRobotoStyle = (element: HTMLElement): boolean => {\n // roboto font download\n if (\n (element as HTMLLinkElement).href &&\n (element as HTMLLinkElement).href.indexOf('https://fonts.googleapis.com/css?family=Roboto') ===\n 0\n ) {\n return true\n }\n // roboto style elements\n if (\n element.tagName.toLowerCase() === 'style' &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n element.styleSheet &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n element.styleSheet.cssText &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n element.styleSheet.cssText.replace('\\r\\n', '').indexOf('.gm-style') === 0\n ) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n element.styleSheet.cssText = ''\n return true\n }\n // roboto style elements for other browsers\n if (\n element.tagName.toLowerCase() === 'style' &&\n element.innerHTML &&\n element.innerHTML.replace('\\r\\n', '').indexOf('.gm-style') === 0\n ) {\n element.innerHTML = ''\n return true\n }\n // when google tries to add empty style\n if (\n element.tagName.toLowerCase() === 'style' &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n !element.styleSheet &&\n !element.innerHTML\n ) {\n return true\n }\n\n return false\n}\n\n// Preventing the Google Maps library from downloading an extra font\nexport const preventGoogleFonts = (): void => {\n // we override these methods only for one particular head element\n // default methods for other elements are not affected\n const head = document.getElementsByTagName('head')[0]\n\n const trueInsertBefore = head.insertBefore.bind(head)\n\n // TODO: adding return before reflect solves the TS issue\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n head.insertBefore = function insertBefore(\n newElement: HTMLElement,\n referenceElement: HTMLElement\n ): void {\n if (!isRobotoStyle(newElement)) {\n Reflect.apply(trueInsertBefore, head, [newElement, referenceElement])\n }\n }\n\n const trueAppend = head.appendChild.bind(head)\n\n // TODO: adding return before reflect solves the TS issue\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n head.appendChild = function appendChild(textNode: HTMLElement): void {\n if (!isRobotoStyle(textNode)) {\n Reflect.apply(trueAppend, head, [textNode])\n }\n }\n}\n","import invariant from 'invariant'\n\nexport type Libraries = (\"drawing\" | \"geometry\" | \"localContext\" | \"places\" | \"visualization\")[]\n\nexport interface LoadScriptUrlOptions {\n googleMapsApiKey: string | \"\"\n googleMapsClientId?: string\n version?: string\n language?: string\n region?: string\n libraries?: Libraries\n channel?: string\n mapIds?: string[]\n}\n\nexport function makeLoadScriptUrl({\n googleMapsApiKey,\n googleMapsClientId,\n version = 'weekly',\n language,\n region,\n libraries,\n channel,\n mapIds\n}: LoadScriptUrlOptions): string {\n const params = []\n\n invariant(\n (googleMapsApiKey && googleMapsClientId) || !(googleMapsApiKey && googleMapsClientId),\n 'You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time.'\n )\n\n if (googleMapsApiKey) {\n params.push(`key=${googleMapsApiKey}`)\n } else if (googleMapsClientId) {\n params.push(`client=${googleMapsClientId}`)\n }\n\n if (version) {\n params.push(`v=${version}`)\n }\n\n if (language) {\n params.push(`language=${language}`)\n }\n\n if (region) {\n params.push(`region=${region}`)\n }\n\n if (libraries && libraries.length) {\n params.push(`libraries=${libraries.sort().join(',')}`)\n }\n\n if (channel) {\n params.push(`channel=${channel}`)\n }\n\n if (mapIds && mapIds.length) {\n params.push(`map_ids=${mapIds.join(',')}`)\n }\n\n params.push('callback=initMap')\n\n return `https://maps.googleapis.com/maps/api/js?${params.join('&')}`\n}\n","import * as React from 'react'\nimport invariant from 'invariant'\n\nimport { injectScript } from './utils/injectscript'\nimport { preventGoogleFonts } from './utils/prevent-google-fonts'\n\nimport { isBrowser } from './utils/isbrowser'\nimport { LoadScriptUrlOptions, makeLoadScriptUrl } from './utils/make-load-script-url'\n\nlet cleaningUp = false\n\ninterface LoadScriptState {\n loaded: boolean\n}\n\nexport interface LoadScriptProps extends LoadScriptUrlOptions {\n id: string\n nonce?: string\n loadingElement?: React.ReactNode\n onLoad?: () => void\n onError?: (error: Error) => void\n onUnmount?: () => void\n preventGoogleFontsLoading?: boolean\n}\n\nexport function DefaultLoadingElement(): JSX.Element {\n return
{`Loading...`}
\n}\n\nexport const defaultLoadScriptProps = {\n id: 'script-loader',\n version: 'weekly',\n}\n\nclass LoadScript extends React.PureComponent {\n public static defaultProps = defaultLoadScriptProps\n\n check: React.RefObject = React.createRef()\n\n state = {\n loaded: false,\n }\n\n cleanupCallback = (): void => {\n // @ts-ignore\n delete window.google.maps\n\n this.injectScript()\n }\n\n componentDidMount(): void {\n if (isBrowser) {\n if (window.google && window.google.maps && !cleaningUp) {\n console.error('google api is already presented')\n\n return\n }\n\n this.isCleaningUp()\n .then(this.injectScript)\n .catch(function error(err) {\n console.error('Error at injecting script after cleaning up: ', err)\n })\n }\n }\n\n componentDidUpdate(prevProps: LoadScriptProps): void {\n if (this.props.libraries !== prevProps.libraries) {\n console.warn(\n 'Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables'\n )\n }\n\n if (isBrowser && prevProps.language !== this.props.language) {\n this.cleanup()\n // TODO: refactor to use gDSFP maybe... wait for hooks refactoring.\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState(function setLoaded() {\n return {\n loaded: false,\n }\n }, this.cleanupCallback)\n }\n }\n\n componentWillUnmount(): void {\n if (isBrowser) {\n this.cleanup()\n\n const timeoutCallback = (): void => {\n if (!this.check.current) {\n // @ts-ignore\n delete window.google\n cleaningUp = false\n }\n }\n\n window.setTimeout(timeoutCallback, 1)\n\n if (this.props.onUnmount) {\n this.props.onUnmount()\n }\n }\n }\n\n isCleaningUp = async (): Promise => {\n function promiseCallback(resolve: () => void): void {\n if (!cleaningUp) {\n resolve()\n } else {\n if (isBrowser) {\n const timer = window.setInterval(function interval() {\n if (!cleaningUp) {\n window.clearInterval(timer)\n\n resolve()\n }\n }, 1)\n }\n }\n\n return\n }\n\n return new Promise(promiseCallback)\n }\n\n cleanup = (): void => {\n cleaningUp = true\n const script = document.getElementById(this.props.id)\n\n if (script && script.parentNode) {\n script.parentNode.removeChild(script)\n }\n\n Array.prototype.slice\n .call(document.getElementsByTagName('script'))\n .filter(function filter(script: HTMLScriptElement): boolean {\n return typeof script.src === 'string' && script.src.includes('maps.googleapis')\n })\n .forEach(function forEach(script: HTMLScriptElement): void {\n if (script.parentNode) {\n script.parentNode.removeChild(script)\n }\n })\n\n Array.prototype.slice\n .call(document.getElementsByTagName('link'))\n .filter(function filter(link: HTMLLinkElement): boolean {\n return (\n link.href === 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans'\n )\n })\n .forEach(function forEach(link: HTMLLinkElement) {\n if (link.parentNode) {\n link.parentNode.removeChild(link)\n }\n })\n\n Array.prototype.slice\n .call(document.getElementsByTagName('style'))\n .filter(function filter(style: HTMLStyleElement): boolean {\n return (\n style.innerText !== undefined &&\n style.innerText.length > 0 &&\n style.innerText.includes('.gm-')\n )\n })\n .forEach(function forEach(style: HTMLStyleElement) {\n if (style.parentNode) {\n style.parentNode.removeChild(style)\n }\n })\n }\n\n injectScript = (): void => {\n if (this.props.preventGoogleFontsLoading) {\n preventGoogleFonts()\n }\n\n invariant(!!this.props.id, 'LoadScript requires \"id\" prop to be a string: %s', this.props.id)\n\n const injectScriptOptions = {\n id: this.props.id,\n nonce: this.props.nonce,\n url: makeLoadScriptUrl(this.props),\n }\n\n injectScript(injectScriptOptions)\n .then(() => {\n if (this.props.onLoad) {\n this.props.onLoad()\n }\n\n this.setState(function setLoaded() {\n return {\n loaded: true,\n }\n })\n\n return\n })\n .catch(err => {\n if (this.props.onError) {\n this.props.onError(err)\n }\n\n console.error(`\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (${this\n .props.googleMapsApiKey || '-'}) or Client ID (${this.props.googleMapsClientId ||\n '-'}) to \n Otherwise it is a Network issue.\n `)\n })\n }\n\n render(): React.ReactNode {\n return (\n <>\n
\n\n {this.state.loaded\n ? this.props.children\n : this.props.loadingElement || }\n \n )\n }\n}\n\nexport default LoadScript\n","/* eslint-disable filenames/match-regex */\nimport * as React from 'react'\nimport invariant from 'invariant'\n\nimport { isBrowser } from './utils/isbrowser'\nimport { injectScript } from './utils/injectscript'\nimport { preventGoogleFonts } from './utils/prevent-google-fonts'\nimport { makeLoadScriptUrl, LoadScriptUrlOptions } from './utils/make-load-script-url'\n\nimport { defaultLoadScriptProps } from './LoadScript'\n\nexport interface UseLoadScriptOptions extends LoadScriptUrlOptions {\n id?: string\n nonce?: string\n preventGoogleFontsLoading?: boolean\n}\n\nlet previouslyLoadedUrl: string\n\nexport function useLoadScript({\n id = defaultLoadScriptProps.id,\n version = defaultLoadScriptProps.version,\n nonce,\n googleMapsApiKey,\n googleMapsClientId,\n language,\n region,\n libraries,\n preventGoogleFontsLoading,\n channel,\n mapIds,\n}: UseLoadScriptOptions): {\n isLoaded: boolean\n loadError: Error | undefined\n url: string\n} {\n const isMounted = React.useRef(false)\n const [isLoaded, setLoaded] = React.useState(false)\n const [loadError, setLoadError] = React.useState(undefined)\n\n React.useEffect(function trackMountedState() {\n isMounted.current = true\n return (): void => {\n isMounted.current = false\n }\n }, [])\n\n React.useEffect(\n function applyPreventGoogleFonts() {\n if (isBrowser && preventGoogleFontsLoading) {\n preventGoogleFonts()\n }\n },\n [preventGoogleFontsLoading]\n )\n\n React.useEffect(\n function validateLoadedState() {\n if (isLoaded) {\n invariant(\n !!window.google,\n 'useLoadScript was marked as loaded, but window.google is not present. Something went wrong.'\n )\n }\n },\n [isLoaded]\n )\n\n const url = makeLoadScriptUrl({\n version,\n googleMapsApiKey,\n googleMapsClientId,\n language,\n region,\n libraries,\n channel,\n mapIds\n })\n\n React.useEffect(\n function loadScriptAndModifyLoadedState() {\n if (!isBrowser) {\n return\n }\n\n function setLoadedIfMounted(): void {\n if (isMounted.current) {\n setLoaded(true)\n previouslyLoadedUrl = url\n }\n }\n\n if (window.google && window.google.maps && previouslyLoadedUrl === url) {\n setLoadedIfMounted()\n return\n }\n\n injectScript({ id, url, nonce })\n .then(setLoadedIfMounted)\n .catch(function handleInjectError(err) {\n if (isMounted.current) {\n setLoadError(err)\n }\n console.warn(`\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (${googleMapsApiKey ||\n '-'}) or Client ID (${googleMapsClientId || '-'})\n Otherwise it is a Network issue.\n `)\n console.error(err)\n })\n },\n [id, url, nonce]\n )\n\n const prevLibraries = React.useRef()\n\n React.useEffect(\n function checkPerformance() {\n if (prevLibraries.current && libraries !== prevLibraries.current) {\n console.warn(\n 'Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables'\n )\n }\n prevLibraries.current = libraries\n },\n [libraries]\n )\n\n return { isLoaded, loadError, url }\n}\n","import { PureComponent } from 'react'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\nimport MapContext from '../../map-context'\n\nconst eventMap = {}\n\nconst updaterMap = {\n options(instance: google.maps.TrafficLayer, options: google.maps.TrafficLayerOptions): void {\n instance.setOptions(options)\n },\n}\n\ninterface TrafficLayerState {\n trafficLayer: google.maps.TrafficLayer | null\n}\n\nexport interface TrafficLayerProps {\n options?: google.maps.TrafficLayerOptions\n /** This callback is called when the trafficLayer instance has loaded. It is called with the trafficLayer instance. */\n onLoad?: (trafficLayer: google.maps.TrafficLayer) => void\n /** This callback is called when the component unmounts. It is called with the trafficLayer instance. */\n onUnmount?: (trafficLayer: google.maps.TrafficLayer) => void\n}\n\nexport class TrafficLayer extends PureComponent {\n static contextType = MapContext\n\n state = {\n trafficLayer: null,\n }\n\n setTrafficLayerCallback = () => {\n if (this.state.trafficLayer !== null) {\n if (this.props.onLoad) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.props.onLoad(this.state.trafficLayer)\n }\n }\n }\n\n registeredEvents: google.maps.MapsEventListener[] = []\n\n componentDidMount(): void {\n const trafficLayer = new google.maps.TrafficLayer({\n ...(this.props.options || {}),\n map: this.context,\n })\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: trafficLayer,\n })\n\n this.setState(function setTrafficLayer() {\n return {\n trafficLayer,\n }\n }, this.setTrafficLayerCallback)\n }\n\n componentDidUpdate(prevProps: TrafficLayerProps): void {\n if (this.state.trafficLayer !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.trafficLayer,\n })\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.trafficLayer !== null) {\n if (this.props.onUnmount) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.props.onUnmount(this.state.trafficLayer)\n }\n\n unregisterEvents(this.registeredEvents)\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.state.trafficLayer.setMap(null)\n }\n }\n\n render() {\n return null\n }\n}\n\nexport default TrafficLayer\n","import * as React from 'react'\n\nimport MapContext from '../../map-context'\n\ninterface BicyclingLayerState {\n bicyclingLayer: google.maps.BicyclingLayer | null\n}\n\nexport interface BicyclingLayerProps {\n /** This callback is called when the bicyclingLayer instance has loaded. It is called with the bicyclingLayer instance. */\n onLoad?: (bicyclingLayer: google.maps.BicyclingLayer) => void\n /** This callback is called when the component unmounts. It is called with the bicyclingLayer instance. */\n onUnmount?: (bicyclingLayer: google.maps.BicyclingLayer) => void\n}\n\nexport class BicyclingLayer extends React.PureComponent {\n static contextType = MapContext\n\n state = {\n bicyclingLayer: null,\n }\n\n setBicyclingLayerCallback = (): void => {\n if (this.state.bicyclingLayer !== null) {\n // TODO: how is this possibly null if we're doing a null check\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.state.bicyclingLayer.setMap(this.context)\n\n if (this.props.onLoad) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.props.onLoad(this.state.bicyclingLayer)\n }\n }\n }\n\n componentDidMount(): void {\n const bicyclingLayer = new google.maps.BicyclingLayer()\n\n this.setState(function setBicyclingLayer() {\n return {\n bicyclingLayer,\n }\n }, this.setBicyclingLayerCallback)\n }\n\n componentWillUnmount(): void {\n if (this.state.bicyclingLayer !== null) {\n if (this.props.onUnmount) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.props.onUnmount(this.state.bicyclingLayer)\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.state.bicyclingLayer.setMap(null)\n }\n }\n\n render(): React.ReactNode {\n return null\n }\n}\n\nexport default BicyclingLayer\n","import * as React from 'react'\n\nimport MapContext from '../../map-context'\n\ninterface TransitLayerState {\n transitLayer: google.maps.TransitLayer | null\n}\n\nexport interface TransitLayerProps {\n /** This callback is called when the transitLayer instance has loaded. It is called with the transitLayer instance. */\n onLoad?: (transitLayer: google.maps.TransitLayer) => void\n /** This callback is called when the component unmounts. It is called with the transitLayer instance. */\n onUnmount?: (transitLayer: google.maps.TransitLayer) => void\n}\n\nexport class TransitLayer extends React.PureComponent {\n static contextType = MapContext\n\n state = {\n transitLayer: null,\n }\n\n setTransitLayerCallback = (): void => {\n if (this.state.transitLayer !== null) {\n // TODO: how is this possibly null if we're doing a null check\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.state.transitLayer.setMap(this.context)\n\n if (this.props.onLoad) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.props.onLoad(this.state.transitLayer)\n }\n }\n }\n\n componentDidMount(): void {\n const transitLayer = new google.maps.TransitLayer()\n\n this.setState(function setTransitLayer() {\n return {\n transitLayer,\n }\n }, this.setTransitLayerCallback)\n }\n\n componentWillUnmount(): void {\n if (this.state.transitLayer !== null) {\n if (this.props.onUnmount) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.props.onUnmount(this.state.transitLayer)\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.state.transitLayer.setMap(null)\n }\n }\n\n render(): React.ReactNode {\n return null\n }\n}\n\nexport default TransitLayer\n","/* globals google */\nimport * as React from 'react'\n\nimport invariant from 'invariant'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\n\nimport MapContext from '../../map-context'\n\nconst eventMap = {\n onCircleComplete: 'circlecomplete',\n onMarkerComplete: 'markercomplete',\n onOverlayComplete: 'overlaycomplete',\n onPolygonComplete: 'polygoncomplete',\n onPolylineComplete: 'polylinecomplete',\n onRectangleComplete: 'rectanglecomplete',\n}\n\nconst updaterMap = {\n drawingMode(\n instance: google.maps.drawing.DrawingManager,\n drawingMode: google.maps.drawing.OverlayType | null\n ): void {\n instance.setDrawingMode(drawingMode)\n },\n options(\n instance: google.maps.drawing.DrawingManager,\n options: google.maps.drawing.DrawingManagerOptions\n ): void {\n instance.setOptions(options)\n },\n}\n\ninterface DrawingManagerState {\n drawingManager: google.maps.drawing.DrawingManager | null\n}\n\nexport interface DrawingManagerProps {\n options?: google.maps.drawing.DrawingManagerOptions\n /** Changes the DrawingManager's drawing mode, which defines the type of overlay to be added on the map. Accepted values are 'marker', 'polygon', 'polyline', 'rectangle', 'circle', or null. A drawing mode of null means that the user can interact with the map as normal, and clicks do not draw anything. */\n drawingMode?: google.maps.drawing.OverlayType | null\n /** This event is fired when the user has finished drawing a circle. */\n onCircleComplete?: (circle: google.maps.Circle) => void\n /** This event is fired when the user has finished drawing a marker. */\n onMarkerComplete?: (marker: google.maps.Marker) => void\n /** This event is fired when the user has finished drawing an overlay of any type. */\n onOverlayComplete?: (e: google.maps.drawing.OverlayCompleteEvent) => void\n /** This event is fired when the user has finished drawing a polygon. */\n onPolygonComplete?: (polygon: google.maps.Polygon) => void\n /** This event is fired when the user has finished drawing a polyline. */\n onPolylineComplete?: (polyline: google.maps.Polyline) => void\n /** This event is fired when the user has finished drawing a rectangle. */\n onRectangleComplete?: (rectangle: google.maps.Rectangle) => void\n /** This callback is called when the drawingManager instance has loaded. It is called with the drawingManager instance. */\n onLoad?: (drawingManager: google.maps.drawing.DrawingManager) => void\n /** This callback is called when the component unmounts. It is called with the drawingManager instance. */\n onUnmount?: (drawingManager: google.maps.drawing.DrawingManager) => void\n}\n\nexport class DrawingManager extends React.PureComponent {\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n\n state: DrawingManagerState = {\n drawingManager: null,\n }\n\n constructor(props: DrawingManagerProps) {\n super(props)\n\n invariant(\n !!google.maps.drawing,\n `Did you include prop libraries={['drawing']} in the URL? %s`,\n google.maps.drawing\n )\n }\n\n setDrawingManagerCallback = (): void => {\n if (this.state.drawingManager !== null && this.props.onLoad) {\n this.props.onLoad(this.state.drawingManager)\n }\n }\n\n componentDidMount(): void {\n const drawingManager = new google.maps.drawing.DrawingManager({\n ...(this.props.options || {}),\n map: this.context,\n })\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: drawingManager,\n })\n\n this.setState(function setDrawingManager() {\n return {\n drawingManager,\n }\n }, this.setDrawingManagerCallback)\n }\n\n componentDidUpdate(prevProps: DrawingManagerProps): void {\n if (this.state.drawingManager !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.drawingManager,\n })\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.drawingManager !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.drawingManager)\n }\n\n unregisterEvents(this.registeredEvents)\n\n this.state.drawingManager.setMap(null)\n }\n }\n\n render(): JSX.Element {\n return <>\n }\n}\n\nexport default DrawingManager\n","import * as React from 'react'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\n\nimport MapContext from '../../map-context'\nimport { HasMarkerAnchor } from '../../types'\n\nimport { Clusterer } from '@react-google-maps/marker-clusterer'\nimport { ReactNode } from 'react'\n\nconst eventMap = {\n onAnimationChanged: 'animation_changed',\n onClick: 'click',\n onClickableChanged: 'clickable_changed',\n onCursorChanged: 'cursor_changed',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDraggableChanged: 'draggable_changed',\n onDragStart: 'dragstart',\n onFlatChanged: 'flat_changed',\n onIconChanged: 'icon_changed',\n onMouseDown: 'mousedown',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onPositionChanged: 'position_changed',\n onRightClick: 'rightclick',\n onShapeChanged: 'shape_changed',\n onTitleChanged: 'title_changed',\n onVisibleChanged: 'visible_changed',\n onZindexChanged: 'zindex_changed',\n}\n\nconst updaterMap = {\n animation(instance: google.maps.Marker, animation: google.maps.Animation): void {\n instance.setAnimation(animation)\n },\n clickable(instance: google.maps.Marker, clickable: boolean): void {\n instance.setClickable(clickable)\n },\n cursor(instance: google.maps.Marker, cursor: string): void {\n instance.setCursor(cursor)\n },\n draggable(instance: google.maps.Marker, draggable: boolean): void {\n instance.setDraggable(draggable)\n },\n icon(instance: google.maps.Marker, icon: string | google.maps.Icon | google.maps.Symbol): void {\n instance.setIcon(icon)\n },\n label(instance: google.maps.Marker, label: string | google.maps.MarkerLabel): void {\n instance.setLabel(label)\n },\n map(instance: google.maps.Marker, map: google.maps.Map): void {\n instance.setMap(map)\n },\n opacity(instance: google.maps.Marker, opacity: number): void {\n instance.setOpacity(opacity)\n },\n options(instance: google.maps.Marker, options: google.maps.MarkerOptions): void {\n instance.setOptions(options)\n },\n position(\n instance: google.maps.Marker,\n position: google.maps.LatLng | google.maps.LatLngLiteral\n ): void {\n instance.setPosition(position)\n },\n shape(instance: google.maps.Marker, shape: google.maps.MarkerShape): void {\n instance.setShape(shape)\n },\n title(instance: google.maps.Marker, title: string): void {\n instance.setTitle(title)\n },\n visible(instance: google.maps.Marker, visible: boolean): void {\n instance.setVisible(visible)\n },\n zIndex(instance: google.maps.Marker, zIndex: number): void {\n instance.setZIndex(zIndex)\n },\n}\n\ninterface MarkerState {\n marker: google.maps.Marker | null\n}\n\nexport interface MarkerProps {\n options?: google.maps.MarkerOptions\n /** Start an animation. Any ongoing animation will be cancelled. Currently supported animations are: BOUNCE, DROP. Passing in null will cause any animation to stop. */\n animation?: google.maps.Animation\n /** If true, the marker receives mouse and touch events. Default value is true. */\n clickable?: boolean\n /** Mouse cursor to show on hover */\n cursor?: string\n /** If true, the marker can be dragged. Default value is false. */\n draggable?: boolean\n /** Icon for the foreground. If a string is provided, it is treated as though it were an Icon with the string as url. */\n icon?: string | google.maps.Icon | google.maps.Symbol\n /** Adds a label to the marker. The label can either be a string, or a MarkerLabel object. */\n label?: string | google.maps.MarkerLabel\n /** The marker's opacity between 0.0 and 1.0. */\n opacity?: number\n\n // required\n /** Marker position. */\n position: google.maps.LatLng | google.maps.LatLngLiteral\n /** Image map region definition used for drag/click. */\n shape?: google.maps.MarkerShape\n /** Rollover text */\n title?: string\n /** If true, the marker is visible */\n visible?: boolean\n /** All markers are displayed on the map in order of their zIndex, with higher values displaying in front of markers with lower values. By default, markers are displayed according to their vertical position on screen, with lower markers appearing in front of markers further up the screen. */\n zIndex?: number\n /** Render prop that handles clustering markers */\n clusterer?: Clusterer\n /** Clusters are redrawn when a Marker is added unless noClustererRedraw? is set to true. */\n noClustererRedraw?: boolean\n /** This event is fired when the marker icon was clicked. */\n onClick?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the marker's clickable property changes. */\n onClickableChanged?: () => void\n /** This event is fired when the marker's cursor property changes. */\n onCursorChanged?: () => void\n /** This event is fired when the marker's animation property changes. */\n onAnimationChanged?: () => void\n /** This event is fired when the marker icon was double clicked. */\n onDblClick?: (e: google.maps.MouseEvent) => void\n /** This event is repeatedly fired while the user drags the marker. */\n onDrag?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the user stops dragging the marker. */\n onDragEnd?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the marker's draggable property changes. */\n onDraggableChanged?: () => void\n /** This event is fired when the user starts dragging the marker. */\n onDragStart?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the marker's flat property changes. */\n onFlatChanged?: () => void\n /** This event is fired when the marker icon property changes. */\n onIconChanged?: () => void\n /** This event is fired for a mousedown on the marker. */\n onMouseDown?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the mouse leaves the area of the marker icon. */\n onMouseOut?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the mouse enters the area of the marker icon. */\n onMouseOver?: (e: google.maps.MouseEvent) => void\n /** This event is fired for a mouseup on the marker. */\n onMouseUp?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the marker position property changes. */\n onPositionChanged?: () => void\n /** This event is fired for a rightclick on the marker. */\n onRightClick?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the marker's shape property changes. */\n onShapeChanged?: () => void\n /** This event is fired when the marker title property changes. */\n onTitleChanged?: () => void\n /** This event is fired when the marker's visible property changes. */\n onVisibleChanged?: () => void\n /** This event is fired when the marker's zIndex property changes. */\n onZindexChanged?: () => void\n /** This callback is called when the marker instance has loaded. It is called with the marker instance. */\n onLoad?: (marker: google.maps.Marker) => void\n /** This callback is called when the component unmounts. It is called with the marker instance. */\n onUnmount?: (marker: google.maps.Marker) => void\n}\n\nexport class Marker extends React.PureComponent {\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n\n state: MarkerState = {\n marker: null,\n }\n\n setMarkerCallback = (): void => {\n if (this.state.marker !== null && this.props.onLoad) {\n this.props.onLoad(this.state.marker)\n }\n }\n\n componentDidMount(): void {\n const markerOptions = {\n ...(this.props.options || {}),\n ...(this.props.clusterer ? {} : { map: this.context }),\n position: this.props.position,\n }\n\n const marker = new google.maps.Marker(markerOptions)\n\n if (this.props.clusterer) {\n this.props.clusterer.addMarker(\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n marker,\n !!this.props.noClustererRedraw\n )\n } else {\n marker.setMap(this.context)\n }\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: marker,\n })\n\n this.setState(function setMarker() {\n return {\n marker,\n }\n }, this.setMarkerCallback)\n }\n\n componentDidUpdate(prevProps: MarkerProps): void {\n if (this.state.marker !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.marker,\n })\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.marker !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.marker)\n }\n\n unregisterEvents(this.registeredEvents)\n\n if (this.props.clusterer) {\n this.props.clusterer.removeMarker(\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.state.marker,\n !!this.props.noClustererRedraw\n )\n } else {\n this.state.marker && this.state.marker.setMap(null)\n }\n }\n }\n\n render(): React.ReactNode {\n let children: ReactNode | null = null\n if(this.props.children) {\n children = React.Children.map(this.props.children, child => {\n if(!React.isValidElement(child)) {\n return child;\n }\n\n let elementChild: React.ReactElement = child;\n return React.cloneElement(elementChild, {anchor: this.state.marker});\n })\n }\n return children || null\n }\n}\n\nexport default Marker\n","/* eslint-disable filenames/match-exported */\nimport * as React from 'react'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\n\nimport MapContext from '../../map-context'\n\nimport {\n Clusterer,\n ClusterIconStyle,\n Cluster,\n ClustererOptions,\n TCalculator,\n} from '@react-google-maps/marker-clusterer'\n\nconst eventMap = {\n onClick: 'click',\n onClusteringBegin: 'clusteringbegin',\n onClusteringEnd: 'clusteringend',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n}\n\nconst updaterMap = {\n averageCenter(instance: Clusterer, averageCenter: boolean): void {\n instance.setAverageCenter(averageCenter)\n },\n\n batchSizeIE(instance: Clusterer, batchSizeIE: number): void {\n instance.setBatchSizeIE(batchSizeIE)\n },\n\n calculator(instance: Clusterer, calculator: any): void {\n instance.setCalculator(calculator)\n },\n\n clusterClass(instance: Clusterer, clusterClass: string): void {\n instance.setClusterClass(clusterClass)\n },\n\n enableRetinaIcons(instance: Clusterer, enableRetinaIcons: boolean): void {\n instance.setEnableRetinaIcons(enableRetinaIcons)\n },\n\n gridSize(instance: Clusterer, gridSize: number): void {\n instance.setGridSize(gridSize)\n },\n\n ignoreHidden(instance: Clusterer, ignoreHidden: boolean): void {\n instance.setIgnoreHidden(ignoreHidden)\n },\n\n imageExtension(instance: Clusterer, imageExtension: string): void {\n instance.setImageExtension(imageExtension)\n },\n\n imagePath(instance: Clusterer, imagePath: string): void {\n instance.setImagePath(imagePath)\n },\n\n imageSizes(instance: Clusterer, imageSizes: number[]): void {\n instance.setImageSizes(imageSizes)\n },\n\n maxZoom(instance: Clusterer, maxZoom: number): void {\n instance.setMaxZoom(maxZoom)\n },\n\n minimumClusterSize(instance: Clusterer, minimumClusterSize: number): void {\n instance.setMinimumClusterSize(minimumClusterSize)\n },\n\n styles(instance: Clusterer, styles: ClusterIconStyle[]): void {\n instance.setStyles(styles)\n },\n\n title(instance: Clusterer, title: string): void {\n instance.setTitle(title)\n },\n\n zoomOnClick(instance: Clusterer, zoomOnClick: boolean): void {\n instance.setZoomOnClick(zoomOnClick)\n },\n}\n\ninterface ClustererState {\n markerClusterer: Clusterer | null\n}\n\nexport interface ClustererProps {\n // required\n children: (markerClusterer: Clusterer) => React.ReactNode\n\n options?: ClustererOptions // TODO: it could be undefined\n /** Whether the position of a cluster marker should be the average position of all markers in the cluster. If set to false, the cluster marker is positioned at the location of the first marker added to the cluster. The default value is false. */\n averageCenter?: boolean\n /** When Internet Explorer is being used, markers are processed in several batches with a small delay inserted between each batch in an attempt to avoid Javascript timeout errors. Set this property to the number of markers to be processed in a single batch; select as high a number as you can without causing a timeout error in the browser. This number might need to be as low as 100 if 15,000 markers are being managed, for example. The default value is MarkerClusterer.BATCH_SIZE_IE. */\n batchSizeIE?: number\n /** The function used to determine the text to be displayed on a cluster marker and the index indicating which style to use for the cluster marker. The input parameters for the function are (1) the array of markers represented by a cluster marker and (2) the number of cluster icon styles. It returns a ClusterIconInfo object. The default calculator returns a text property which is the number of markers in the cluster and an index property which is one higher than the lowest integer such that 10^i exceeds the number of markers in the cluster, or the size of the styles array, whichever is less. The styles array element used has an index of index minus 1. For example, the default calculator returns a text value of \"125\" and an index of 3 for a cluster icon representing 125 markers so the element used in the styles array is 2. A calculator may also return a title property that contains the text of the tooltip to be used for the cluster marker. If title is not defined, the tooltip is set to the value of the title property for the MarkerClusterer. The default value is MarkerClusterer.CALCULATOR. */\n calculator?: TCalculator\n /** The name of the CSS class defining general styles for the cluster markers. Use this class to define CSS styles that are not set up by the code that processes the styles array. The default value is \"cluster\". */\n clusterClass?: string\n /** Whether to allow the use of cluster icons that have sizes that are some multiple (typically double) of their actual display size. Icons such as these look better when viewed on high-resolution monitors such as Apple's Retina displays. Note: if this property is true, sprites cannot be used as cluster icons. The default value is false. */\n enableRetinaIcons?: boolean\n /** The grid size of a cluster in pixels. The grid is a square. The default value is 60. */\n gridSize?: number\n /** Whether to ignore hidden markers in clusters. You may want to set this to true to ensure that hidden markers are not included in the marker count that appears on a cluster marker (this count is the value of the text property of the result returned by the default calculator). If set to true and you change the visibility of a marker being clustered, be sure to also call MarkerClusterer.repaint(). The default value is false. */\n ignoreHidden?: boolean\n /** The extension name for the cluster icon image files (e.g., \"png\" or \"jpg\"). The default value is MarkerClusterer.IMAGE_EXTENSION. */\n imageExtension?: string\n /** The full URL of the root name of the group of image files to use for cluster icons. The complete file name is of the form imagePath.imageExtension where n is the image file number (1, 2, etc.). The default value is MarkerClusterer.IMAGE_PATH. */\n imagePath?: string\n /** An array of numbers containing the widths of the group of imagePath.imageExtension image files. (The images are assumed to be square.) The default value is MarkerClusterer.IMAGE_SIZES. */\n imageSizes?: number[]\n /** The maximum zoom level at which clustering is enabled or null if clustering is to be enabled at all zoom levels. The default value is null. */\n maxZoom?: number\n /** The minimum number of markers needed in a cluster before the markers are hidden and a cluster marker appears. The default value is 2. */\n minimumClusterSize?: number\n /** An array of ClusterIconStyle elements defining the styles of the cluster markers to be used. The element to be used to style a given cluster marker is determined by the function defined by the calculator property. The default is an array of ClusterIconStyle elements whose properties are derived from the values for imagePath, imageExtension, and imageSizes. */\n styles?: ClusterIconStyle[]\n /** The tooltip to display when the mouse moves over a cluster marker. (Alternatively, you can use a custom calculator function to specify a different tooltip for each cluster marker.) The default value is \"\". */\n title?: string\n /** Whether to zoom the map when a cluster marker is clicked. You may want to set this to false if you have installed a handler for the click event and it deals with zooming on its own. The default value is true. */\n zoomOnClick?: boolean\n /** This event is fired when a cluster marker is clicked. */\n onClick?: (cluster: Cluster) => void\n /** This event is fired when the MarkerClusterer begins clustering markers. */\n onClusteringBegin?: (markerClusterer: Clusterer) => void\n /** This event is fired when the MarkerClusterer stops clustering markers. */\n onClusteringEnd?: (markerClusterer: Clusterer) => void\n /** \tThis event is fired when the mouse moves over a cluster marker. */\n onMouseOver?: (cluster: Cluster) => void\n /** This event is fired when the mouse moves out of a cluster marker. */\n onMouseOut?: (cluster: Cluster) => void\n /** This callback is called when the markerClusterer instance has loaded. It is called with the markerClusterer instance. */\n onLoad?: (markerClusterer: Clusterer) => void\n /** This callback is called when the component unmounts. It is called with the markerClusterer instance. */\n onUnmount?: (markerClusterer: Clusterer) => void\n}\n\nexport class ClustererComponent extends React.PureComponent {\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n\n state: ClustererState = {\n markerClusterer: null,\n }\n\n setClustererCallback = (): void => {\n if (this.state.markerClusterer !== null && this.props.onLoad) {\n this.props.onLoad(this.state.markerClusterer)\n }\n }\n\n componentDidMount(): void {\n if (this.context) {\n const markerClusterer = new Clusterer(this.context, [], this.props.options)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: markerClusterer,\n })\n\n this.setState(function setClusterer(): ClustererState {\n return {\n markerClusterer,\n }\n }, this.setClustererCallback)\n }\n }\n\n componentDidUpdate(prevProps: ClustererProps): void {\n if (this.state.markerClusterer) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.markerClusterer,\n })\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.markerClusterer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.markerClusterer)\n }\n\n unregisterEvents(this.registeredEvents)\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.state.markerClusterer.setMap(null)\n }\n }\n\n render(): React.ReactNode {\n return this.state.markerClusterer !== null\n ? this.props.children(this.state.markerClusterer)\n : null\n }\n}\n\nexport default ClustererComponent\n","/* global google */\n/* eslint-disable filenames/match-exported */\nimport * as React from 'react'\nimport * as ReactDOM from 'react-dom'\nimport invariant from 'invariant'\nimport {\n InfoBox as GoogleMapsInfoBox,\n InfoBoxOptions as GoogleMapsInfoBoxOptions,\n} from '@react-google-maps/infobox'\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\nimport MapContext from '../../map-context'\n\nconst eventMap = {\n onCloseClick: 'closeclick',\n onContentChanged: 'content_changed',\n onDomReady: 'domready',\n onPositionChanged: 'position_changed',\n onZindexChanged: 'zindex_changed',\n}\n\nconst updaterMap = {\n options(instance: GoogleMapsInfoBox, options: GoogleMapsInfoBoxOptions): void {\n instance.setOptions(options)\n },\n position(\n instance: GoogleMapsInfoBox,\n position: google.maps.LatLng | google.maps.LatLngLiteral\n ): void {\n if (position instanceof google.maps.LatLng) {\n instance.setPosition(position)\n } else {\n instance.setPosition(new google.maps.LatLng(position.lat, position.lng))\n }\n },\n visible(instance: GoogleMapsInfoBox, visible: boolean): void {\n instance.setVisible(visible)\n },\n zIndex(instance: GoogleMapsInfoBox, zIndex: number): void {\n instance.setZIndex(zIndex)\n },\n}\n\ntype InfoBoxOptions = Omit & {\n position?: google.maps.LatLng | google.maps.LatLngLiteral\n}\n\ninterface InfoBoxState {\n infoBox: GoogleMapsInfoBox | null\n}\n\nexport interface InfoBoxProps {\n /** Can be any MVCObject that exposes a LatLng position property and optionally a Point anchorPoint property for calculating the pixelOffset. The anchorPoint is the offset from the anchor's position to the tip of the InfoBox. */\n anchor?: google.maps.MVCObject\n options?: InfoBoxOptions\n /** The LatLng at which to display this InfoBox. If the InfoBox is opened with an anchor, the anchor's position will be used instead. */\n position?: google.maps.LatLng | google.maps.LatLngLiteral\n /** All InfoBoxes are displayed on the map in order of their zIndex, with higher values displaying in front of InfoBoxes with lower values. By default, InfoBoxes are displayed according to their latitude, with InfoBoxes of lower latitudes appearing in front of InfoBoxes at higher latitudes. InfoBoxes are always displayed in front of markers. */\n zIndex?: number\n /** This event is fired when the close button was clicked. */\n onCloseClick?: () => void\n /** This event is fired when the
containing the InfoBox's content is attached to the DOM. You may wish to monitor this event if you are building out your info window content dynamically. */\n onDomReady?: () => void\n /** This event is fired when the content property changes. */\n onContentChanged?: () => void\n /** This event is fired when the position property changes. */\n onPositionChanged?: () => void\n /** This event is fired when the InfoBox's zIndex changes. */\n onZindexChanged?: () => void\n /** This callback is called when the infoBox instance has loaded. It is called with the infoBox instance. */\n onLoad?: (infoBox: GoogleMapsInfoBox) => void\n /** This callback is called when the component unmounts. It is called with the infoBox instance. */\n onUnmount?: (infoBox: GoogleMapsInfoBox) => void\n}\n\nexport class InfoBoxComponent extends React.PureComponent {\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n containerElement: HTMLElement | null = null\n\n state: InfoBoxState = {\n infoBox: null,\n }\n\n open = (infoBox: GoogleMapsInfoBox, anchor?: google.maps.MVCObject): void => {\n if (anchor) {\n infoBox.open(this.context, anchor)\n } else if (infoBox.getPosition()) {\n infoBox.open(this.context)\n } else {\n invariant(false, 'You must provide either an anchor or a position prop for .')\n }\n }\n\n setInfoBoxCallback = (): void => {\n const { anchor, onLoad } = this.props\n const { infoBox } = this.state\n\n if (infoBox !== null && this.containerElement !== null) {\n infoBox.setContent(this.containerElement)\n this.open(infoBox, anchor)\n\n if (onLoad) {\n onLoad(infoBox)\n }\n }\n }\n\n componentDidMount(): void {\n const { options } = this.props\n const { position, ...infoBoxOptions }: InfoBoxOptions = options || {}\n\n let positionLatLng: google.maps.LatLng | undefined\n if (position && !(position instanceof google.maps.LatLng)) {\n positionLatLng = new google.maps.LatLng(position.lat, position.lng)\n }\n\n const infoBox = new GoogleMapsInfoBox({\n ...infoBoxOptions,\n ...(positionLatLng ? { position: positionLatLng } : {}),\n })\n\n this.containerElement = document.createElement('div')\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: infoBox,\n })\n\n this.setState({ infoBox }, this.setInfoBoxCallback)\n }\n\n componentDidUpdate(prevProps: InfoBoxProps): void {\n const { infoBox } = this.state\n\n if (infoBox !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: infoBox,\n })\n }\n }\n\n componentWillUnmount(): void {\n const { onUnmount } = this.props\n const { infoBox } = this.state\n\n if (infoBox !== null) {\n if (onUnmount) {\n onUnmount(infoBox)\n }\n\n unregisterEvents(this.registeredEvents)\n infoBox.close()\n }\n }\n\n render(): React.ReactPortal | null {\n if (!this.containerElement) {\n return null\n }\n\n return ReactDOM.createPortal(React.Children.only(this.props.children), this.containerElement)\n }\n}\n\nexport default InfoBoxComponent\n","/* global google */\nimport * as React from 'react'\nimport * as ReactDOM from 'react-dom'\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\n\nimport MapContext from '../../map-context'\nimport invariant from 'invariant'\n\nconst eventMap = {\n onCloseClick: 'closeclick',\n onContentChanged: 'content_changed',\n onDomReady: 'domready',\n onPositionChanged: 'position_changed',\n onZindexChanged: 'zindex_changed',\n}\n\nconst updaterMap = {\n options(instance: google.maps.InfoWindow, options: google.maps.InfoWindowOptions): void {\n instance.setOptions(options)\n },\n position(\n instance: google.maps.InfoWindow,\n position: google.maps.LatLng | google.maps.LatLngLiteral\n ): void {\n instance.setPosition(position)\n },\n zIndex(instance: google.maps.InfoWindow, zIndex: number): void {\n instance.setZIndex(zIndex)\n },\n}\n\ninterface InfoWindowState {\n infoWindow: google.maps.InfoWindow | null\n}\n\nexport interface InfoWindowProps {\n /** Can be any MVCObject that exposes a LatLng position property and optionally a Point anchorPoint property for calculating the pixelOffset. The anchorPoint is the offset from the anchor's position to the tip of the InfoWindow. */\n anchor?: google.maps.MVCObject\n options?: google.maps.InfoWindowOptions\n /** The LatLng at which to display this InfoWindow. If the InfoWindow is opened with an anchor, the anchor's position will be used instead. */\n position?: google.maps.LatLng | google.maps.LatLngLiteral\n /** All InfoWindows are displayed on the map in order of their zIndex, with higher values displaying in front of InfoWindows with lower values. By default, InfoWindows are displayed according to their latitude, with InfoWindows of lower latitudes appearing in front of InfoWindows at higher latitudes. InfoWindows are always displayed in front of markers. */\n zIndex?: number\n /** This event is fired when the close button was clicked. */\n onCloseClick?: () => void\n /** This event is fired when the
containing the InfoWindow's content is attached to the DOM. You may wish to monitor this event if you are building out your info window content dynamically. */\n onDomReady?: () => void\n /** This event is fired when the content property changes. */\n onContentChanged?: () => void\n /** This event is fired when the position property changes. */\n onPositionChanged?: () => void\n /** This event is fired when the InfoWindow's zIndex changes. */\n onZindexChanged?: () => void\n /** This callback is called when the infoWindow instance has loaded. It is called with the infoWindow instance. */\n onLoad?: (infoWindow: google.maps.InfoWindow) => void\n /** This callback is called when the component unmounts. It is called with the infoWindow instance. */\n onUnmount?: (infoWindow: google.maps.InfoWindow) => void\n}\n\nexport class InfoWindow extends React.PureComponent {\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n containerElement: HTMLElement | null = null\n\n state: InfoWindowState = {\n infoWindow: null,\n }\n\n open = (infoWindow: google.maps.InfoWindow, anchor?: google.maps.MVCObject): void => {\n if (anchor) {\n infoWindow.open(this.context, anchor)\n } else if (infoWindow.getPosition()) {\n infoWindow.open(this.context)\n } else {\n invariant(\n false,\n `You must provide either an anchor (typically render it inside a ) or a position props for .`\n )\n }\n }\n\n setInfoWindowCallback = (): void => {\n if (this.state.infoWindow !== null && this.containerElement !== null) {\n this.state.infoWindow.setContent(this.containerElement)\n\n this.open(this.state.infoWindow, this.props.anchor)\n\n if (this.props.onLoad) {\n this.props.onLoad(this.state.infoWindow)\n }\n }\n }\n\n componentDidMount(): void {\n const infoWindow = new google.maps.InfoWindow({\n ...(this.props.options || {}),\n })\n\n this.containerElement = document.createElement('div')\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: infoWindow,\n })\n\n this.setState(function setInfoWindow() {\n return {\n infoWindow,\n }\n }, this.setInfoWindowCallback)\n }\n\n componentDidUpdate(prevProps: InfoWindowProps): void {\n if (this.state.infoWindow !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.infoWindow,\n })\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.infoWindow !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.state.infoWindow.close()\n }\n }\n\n render(): React.ReactPortal | React.ReactNode {\n return this.containerElement ? (\n ReactDOM.createPortal(React.Children.only(this.props.children), this.containerElement)\n ) : (\n <>\n )\n }\n}\n\nexport default InfoWindow\n","import * as React from 'react'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\n\nimport MapContext from '../../map-context'\n\nconst eventMap = {\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n}\n\nconst updaterMap = {\n draggable(instance: google.maps.Polyline, draggable: boolean): void {\n instance.setDraggable(draggable)\n },\n editable(instance: google.maps.Polyline, editable: boolean): void {\n instance.setEditable(editable)\n },\n map(instance: google.maps.Polyline, map: google.maps.Map): void {\n instance.setMap(map)\n },\n options(instance: google.maps.Polyline, options: google.maps.PolylineOptions): void {\n instance.setOptions(options)\n },\n path(\n instance: google.maps.Polyline,\n path:\n | google.maps.MVCArray\n | google.maps.LatLng[]\n | google.maps.LatLngLiteral[]\n ): void {\n instance.setPath(path)\n },\n visible(instance: google.maps.Polyline, visible: boolean): void {\n instance.setVisible(visible)\n },\n}\n\ninterface PolylineState {\n polyline: google.maps.Polyline | null\n}\n\nexport interface PolylineProps {\n options?: google.maps.PolylineOptions\n /** If set to true, the user can drag this shape over the map. The geodesic property defines the mode of dragging. */\n draggable?: boolean\n /** If set to true, the user can edit this shape by dragging the control points shown at the vertices and on each segment. */\n editable?: boolean\n /** Hides this poly if set to false. */\n visible?: boolean\n /** Sets the path. The ordered sequence of coordinates of the Polyline. This path may be specified using either a simple array of LatLngs, or an MVCArray of LatLngs. Note that if you pass a simple array, it will be converted to an MVCArray Inserting or removing LatLngs in the MVCArray will automatically update the polyline on the map. */\n path?:\n | google.maps.MVCArray\n | google.maps.LatLng[]\n | google.maps.LatLngLiteral[]\n /** This event is fired when the DOM dblclick event is fired on the Polyline. */\n onDblClick?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the user stops dragging the polyline. */\n onDragEnd?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the user starts dragging the polyline. */\n onDragStart?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM mousedown event is fired on the Polyline. */\n onMouseDown?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM mousemove event is fired on the Polyline. */\n onMouseMove?: (e: google.maps.MouseEvent) => void\n /** This event is fired on Polyline mouseout. */\n onMouseOut?: (e: google.maps.MouseEvent) => void\n /** This event is fired on Polyline mouseover. */\n onMouseOver?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM mouseup event is fired on the Polyline. */\n onMouseUp?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the Polyline is right-clicked on. */\n onRightClick?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM click event is fired on the Polyline. */\n onClick?: (e: google.maps.MouseEvent) => void\n /** This event is repeatedly fired while the user drags the polyline. */\n onDrag?: (e: google.maps.MouseEvent) => void\n /** This callback is called when the polyline instance has loaded. It is called with the polyline instance. */\n onLoad?: (polyline: google.maps.Polyline) => void\n /** This callback is called when the component unmounts. It is called with the polyline instance. */\n onUnmount?: (polyline: google.maps.Polyline) => void\n}\n\nexport class Polyline extends React.PureComponent {\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n\n state: PolylineState = {\n polyline: null,\n }\n\n setPolylineCallback = (): void => {\n if (this.state.polyline !== null && this.props.onLoad) {\n this.props.onLoad(this.state.polyline)\n }\n }\n\n componentDidMount(): void {\n const polyline = new google.maps.Polyline({\n ...(this.props.options || {}),\n map: this.context,\n })\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: polyline,\n })\n\n this.setState(function setPolyline() {\n return {\n polyline,\n }\n }, this.setPolylineCallback)\n }\n\n componentDidUpdate(prevProps: PolylineProps): void {\n if (this.state.polyline !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.polyline,\n })\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.polyline !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.polyline)\n }\n\n unregisterEvents(this.registeredEvents)\n\n this.state.polyline.setMap(null)\n }\n }\n\n render(): React.ReactNode {\n return <>\n }\n}\n\nexport default Polyline\n","/* global google */\nimport * as React from 'react'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\n\nimport MapContext from '../../map-context'\n\nconst eventMap = {\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n}\n\nconst updaterMap = {\n draggable(instance: google.maps.Polygon, draggable: boolean): void {\n instance.setDraggable(draggable)\n },\n editable(instance: google.maps.Polygon, editable: boolean): void {\n instance.setEditable(editable)\n },\n map(instance: google.maps.Polygon, map: google.maps.Map): void {\n instance.setMap(map)\n },\n options(instance: google.maps.Polygon, options: google.maps.PolygonOptions): void {\n instance.setOptions(options)\n },\n path(\n instance: google.maps.Polygon,\n path:\n | google.maps.MVCArray\n | google.maps.LatLng[]\n | google.maps.LatLngLiteral[]\n ): void {\n instance.setPath(path)\n },\n\n paths(\n instance: google.maps.Polygon,\n paths:\n | google.maps.MVCArray\n | google.maps.MVCArray>\n | google.maps.LatLng[]\n | google.maps.LatLng[][]\n | google.maps.LatLngLiteral[]\n | google.maps.LatLngLiteral[][]\n ): void {\n instance.setPaths(paths)\n },\n\n visible(instance: google.maps.Polygon, visible: boolean): void {\n instance.setVisible(visible)\n },\n}\n\ninterface PolygonState {\n polygon: google.maps.Polygon | null\n}\n\nexport interface PolygonProps {\n options?: google.maps.PolygonOptions\n /** If set to true, the user can drag this shape over the map. The geodesic property defines the mode of dragging. */\n draggable?: boolean\n /** If set to true, the user can edit this shape by dragging the control points shown at the vertices and on each segment. */\n editable?: boolean\n /** Hides this poly if set to false. */\n visible?: boolean\n /** Sets the first path. See Paths for more details. */\n path?:\n | google.maps.MVCArray\n | google.maps.LatLng[]\n | google.maps.LatLngLiteral[]\n /** Sets the path for this polygon. The ordered sequence of coordinates that designates a closed loop. Unlike polylines, a polygon may consist of one or more paths. As a result, the paths property may specify one or more arrays of LatLng coordinates. Paths are closed automatically; do not repeat the first vertex of the path as the last vertex. Simple polygons may be defined using a single array of LatLngs. More complex polygons may specify an array of arrays. Any simple arrays are converted into MVCArrays. Inserting or removing LatLngs from the MVCArray will automatically update the polygon on the map. */\n paths?:\n | google.maps.MVCArray\n | google.maps.MVCArray>\n | google.maps.LatLng[]\n | google.maps.LatLng[][]\n | google.maps.LatLngLiteral[]\n | google.maps.LatLngLiteral[][]\n /** This event is fired when the DOM dblclick event is fired on the Polygon. */\n onDblClick?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the user stops dragging the polygon. */\n onDragEnd?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the user starts dragging the polygon. */\n onDragStart?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM mousedown event is fired on the Polygon. */\n onMouseDown?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM mousemove event is fired on the Polygon. */\n onMouseMove?: (e: google.maps.MouseEvent) => void\n /** This event is fired on Polygon mouseout. */\n onMouseOut?: (e: google.maps.MouseEvent) => void\n /** This event is fired on Polygon mouseover. */\n onMouseOver?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM mouseup event is fired on the Polygon. */\n onMouseUp?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the Polygon is right-clicked on. */\n onRightClick?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM click event is fired on the Polygon. */\n onClick?: (e: google.maps.MouseEvent) => void\n /** This event is repeatedly fired while the user drags the polygon. */\n onDrag?: (e: google.maps.MouseEvent) => void\n /** This callback is called when the polygon instance has loaded. It is called with the polygon instance. */\n onLoad?: (polygon: google.maps.Polygon) => void\n /** This callback is called when the component unmounts. It is called with the polygon instance. */\n onUnmount?: (polygon: google.maps.Polygon) => void\n}\n\nexport class Polygon extends React.PureComponent {\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n\n state: PolygonState = {\n polygon: null,\n }\n\n setPolygonCallback = (): void => {\n if (this.state.polygon !== null && this.props.onLoad) {\n this.props.onLoad(this.state.polygon)\n }\n }\n\n componentDidMount(): void {\n const polygon = new google.maps.Polygon({\n ...(this.props.options || {}),\n map: this.context,\n })\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: polygon,\n })\n\n this.setState(function setPolygon() {\n return {\n polygon,\n }\n }, this.setPolygonCallback)\n }\n\n componentDidUpdate(prevProps: PolygonProps): void {\n if (this.state.polygon !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.polygon,\n })\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.polygon !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.polygon)\n }\n\n unregisterEvents(this.registeredEvents)\n\n this.state.polygon && this.state.polygon.setMap(null)\n }\n }\n\n render(): React.ReactNode {\n return null\n }\n}\n\nexport default Polygon\n","import * as React from 'react'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\nimport MapContext from '../../map-context'\n\nconst eventMap = {\n onBoundsChanged: 'bounds_changed',\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n}\n\nconst updaterMap = {\n bounds(\n instance: google.maps.Rectangle,\n bounds: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral\n ): void {\n instance.setBounds(bounds)\n },\n draggable(instance: google.maps.Rectangle, draggable: boolean): void {\n instance.setDraggable(draggable)\n },\n editable(instance: google.maps.Rectangle, editable: boolean): void {\n instance.setEditable(editable)\n },\n map(instance: google.maps.Rectangle, map: google.maps.Map): void {\n instance.setMap(map)\n },\n options(instance: google.maps.Rectangle, options: google.maps.RectangleOptions): void {\n instance.setOptions(options)\n },\n visible(instance: google.maps.Rectangle, visible: boolean): void {\n instance.setVisible(visible)\n },\n}\n\ninterface RectangleState {\n rectangle: google.maps.Rectangle | null\n}\n\nexport interface RectangleProps {\n options?: google.maps.RectangleOptions\n /** Sets the bounds of this rectangle. */\n bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral\n /** If set to true, the user can drag this rectangle over the map. */\n draggable?: boolean\n /** If set to true, the user can edit this rectangle by dragging the control points shown at the corners and on each edge. */\n editable?: boolean\n /** Hides this rectangle if set to false. */\n visible?: boolean\n /** Indicates whether this Rectangle handles mouse events. Defaults to true. */\n clickable?: boolean\n /** This event is fired when the DOM dblclick event is fired on the rectangle. */\n onDblClick?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the user stops dragging the rectangle. */\n onDragEnd?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the user starts dragging the rectangle. */\n onDragStart?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM mousedown event is fired on the rectangle. */\n onMouseDown?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM mousemove event is fired on the rectangle. */\n onMouseMove?: (e: google.maps.MouseEvent) => void\n /** This event is fired on rectangle mouseout. */\n onMouseOut?: (e: google.maps.MouseEvent) => void\n /** This event is fired on rectangle mouseover. */\n onMouseOver?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM mouseup event is fired on the rectangle. */\n onMouseUp?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the rectangle is right-clicked on. */\n onRightClick?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM click event is fired on the rectangle. */\n onClick?: (e: google.maps.MouseEvent) => void\n /** This event is repeatedly fired while the user drags the rectangle. */\n onDrag?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the rectangle's bounds are changed. */\n onBoundsChanged?: () => void\n /** This callback is called when the rectangle instance has loaded. It is called with the rectangle instance. */\n onLoad?: (rectangle: google.maps.Rectangle) => void\n /** This callback is called when the component unmounts. It is called with the rectangle instance. */\n onUnmount?: (rectangle: google.maps.Rectangle) => void\n}\n\nexport class Rectangle extends React.PureComponent {\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n\n state: RectangleState = {\n rectangle: null,\n }\n\n setRectangleCallback = (): void => {\n if (this.state.rectangle !== null && this.props.onLoad) {\n this.props.onLoad(this.state.rectangle)\n }\n }\n\n componentDidMount(): void {\n const rectangle = new google.maps.Rectangle({\n ...(this.props.options || {}),\n map: this.context,\n })\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: rectangle,\n })\n\n this.setState(function setRectangle() {\n return {\n rectangle,\n }\n }, this.setRectangleCallback)\n }\n\n componentDidUpdate(prevProps: RectangleProps): void {\n if (this.state.rectangle !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.rectangle,\n })\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.rectangle !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.rectangle)\n }\n\n unregisterEvents(this.registeredEvents)\n\n this.state.rectangle.setMap(null)\n }\n }\n\n render(): React.ReactNode {\n return <>\n }\n}\n\nexport default Rectangle\n","import * as React from 'react'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\n\nimport MapContext from '../../map-context'\n\nconst eventMap = {\n onCenterChanged: 'center_changed',\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRadiusChanged: 'radius_changed',\n onRightClick: 'rightclick',\n}\n\nconst updaterMap = {\n center(instance: google.maps.Circle, center: google.maps.LatLng): void {\n instance.setCenter(center)\n },\n draggable(instance: google.maps.Circle, draggable: boolean): void {\n instance.setDraggable(draggable)\n },\n editable(instance: google.maps.Circle, editable: boolean): void {\n instance.setEditable(editable)\n },\n map(instance: google.maps.Circle, map: google.maps.Map): void {\n instance.setMap(map)\n },\n options(instance: google.maps.Circle, options: google.maps.CircleOptions): void {\n instance.setOptions(options)\n },\n radius(instance: google.maps.Circle, radius: number): void {\n instance.setRadius(radius)\n },\n visible(instance: google.maps.Circle, visible: boolean): void {\n instance.setVisible(visible)\n },\n}\n\ninterface CircleState {\n circle: google.maps.Circle | null\n}\n\nexport interface CircleProps {\n options?: google.maps.CircleOptions\n\n // required\n /** sets the center of the circle */\n center: google.maps.LatLng | google.maps.LatLngLiteral\n\n // required\n /** Sets the radius of this circle (in meters) */\n radius: number\n /** If set to true, the user can drag this circle over the map */\n draggable?: boolean\n /** If set to true, the user can edit this circle by dragging the control points shown at the center and around the circumference of the circle. */\n editable?: boolean\n /** Hides this circle if set to false. */\n visible?: boolean\n /** This event is fired when the DOM dblclick event is fired on the circle. */\n onDblClick?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the user stops dragging the circle. */\n onDragEnd?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the user starts dragging the circle. */\n onDragStart?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM mousedown event is fired on the circle. */\n onMouseDown?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM mousemove event is fired on the circle. */\n onMouseMove?: (e: google.maps.MouseEvent) => void\n /** This event is fired on circle mouseout. */\n onMouseOut?: (e: google.maps.MouseEvent) => void\n /** This event is fired on circle mouseover. */\n onMouseOver?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM mouseup event is fired on the circle. */\n onMouseUp?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the circle is right-clicked on. */\n onRightClick?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the circle's center is changed. */\n onCenterChanged?: () => void\n /** This event is fired when the DOM click event is fired on the circle. */\n onClick?: (e: google.maps.MouseEvent) => void\n /** This event is repeatedly fired while the user drags the circle. */\n onDrag?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the circle's radius is changed. */\n onRadiusChanged?: () => void\n /** This callback is called when the circle instance has loaded. It is called with the circle instance. */\n onLoad?: (circle: google.maps.Circle) => void\n /** This callback is called when the component unmounts. It is called with the circle instance. */\n onUnmount?: (circle: google.maps.Circle) => void\n}\n\nexport class Circle extends React.PureComponent {\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n\n state: CircleState = {\n circle: null,\n }\n\n setCircleCallback = (): void => {\n if (this.state.circle !== null && this.props.onLoad) {\n this.props.onLoad(this.state.circle)\n }\n }\n\n componentDidMount(): void {\n const circle = new google.maps.Circle({\n ...(this.props.options || {}),\n map: this.context,\n })\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: circle,\n })\n\n this.setState(function setCircle() {\n return {\n circle,\n }\n }, this.setCircleCallback)\n }\n\n componentDidUpdate(prevProps: CircleProps): void {\n if (this.state.circle !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.circle,\n })\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.circle !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.circle)\n }\n\n unregisterEvents(this.registeredEvents)\n\n this.state.circle && this.state.circle.setMap(null)\n }\n }\n\n render(): JSX.Element {\n return <>\n }\n}\n\nexport default Circle\n","import * as React from 'react'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\n\nimport MapContext from '../../map-context'\n\nconst eventMap = {\n onAddFeature: 'addfeature',\n onClick: 'click',\n onDblClick: 'dblclick',\n onMouseDown: 'mousedown',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRemoveFeature: 'removefeature',\n onRemoveProperty: 'removeproperty',\n onRightClick: 'rightclick',\n onSetGeometry: 'setgeometry',\n onSetProperty: 'setproperty',\n}\n\nconst updaterMap = {\n add(\n instance: google.maps.Data,\n features: google.maps.Data.Feature | google.maps.Data.FeatureOptions\n ): void {\n instance.add(features)\n },\n addgeojson(\n instance: google.maps.Data,\n geojson: object,\n options?: google.maps.Data.GeoJsonOptions\n ): void {\n instance.addGeoJson(geojson, options)\n },\n contains(instance: google.maps.Data, feature: google.maps.Data.Feature): void {\n instance.contains(feature)\n },\n foreach(instance: google.maps.Data, callback: (feature: google.maps.Data.Feature) => void): void {\n instance.forEach(callback)\n },\n loadgeojson(\n instance: google.maps.Data,\n url: string,\n options: google.maps.Data.GeoJsonOptions,\n callback: (features: google.maps.Data.Feature[]) => void\n ): void {\n instance.loadGeoJson(url, options, callback)\n },\n overridestyle(\n instance: google.maps.Data,\n feature: google.maps.Data.Feature,\n style: google.maps.Data.StyleOptions\n ): void {\n instance.overrideStyle(feature, style)\n },\n remove(instance: google.maps.Data, feature: google.maps.Data.Feature): void {\n instance.remove(feature)\n },\n revertstyle(instance: google.maps.Data, feature: google.maps.Data.Feature): void {\n instance.revertStyle(feature)\n },\n controlposition(instance: google.maps.Data, controlPosition: google.maps.ControlPosition): void {\n instance.setControlPosition(controlPosition)\n },\n controls(instance: google.maps.Data, controls: google.maps.DrawingMode[] | null): void {\n instance.setControls(controls)\n },\n drawingmode(instance: google.maps.Data, mode: google.maps.DrawingMode): void {\n instance.setDrawingMode(mode)\n },\n map(instance: google.maps.Data, map: google.maps.Map): void {\n instance.setMap(map)\n },\n style(\n instance: google.maps.Data,\n style: google.maps.Data.StylingFunction | google.maps.Data.StyleOptions\n ): void {\n instance.setStyle(style)\n },\n togeojson(instance: google.maps.Data, callback: (feature: object) => void): void {\n instance.toGeoJson(callback)\n },\n}\n\ninterface DataState {\n data: google.maps.Data | null\n}\nexport interface DataProps {\n options?: google.maps.Data.DataOptions\n /** This event is fired when a feature is added to the collection. */\n onAddFeature?: (e: google.maps.Data.AddFeatureEvent) => void\n /** This event is fired for a click on the geometry. */\n onClick?: (e: google.maps.Data.MouseEvent) => void\n /** This event is fired for a double click on the geometry. */\n onDblClick?: (e: google.maps.Data.MouseEvent) => void\n /** This event is fired for a mousedown on the geometry. */\n onMouseDown?: (e: google.maps.Data.MouseEvent) => void\n /** This event is fired when the mouse leaves the area of the geometry. */\n onMouseOut?: (e: google.maps.Data.MouseEvent) => void\n /** This event is fired when the mouse enters the area of the geometry. */\n onMouseOver?: (e: google.maps.Data.MouseEvent) => void\n /** This event is fired for a mouseup on the geometry. */\n onMouseUp?: (e: google.maps.Data.MouseEvent) => void\n /** This event is fired when a feature is removed from the collection. */\n onRemoveFeature?: (e: google.maps.Data.RemoveFeatureEvent) => void\n /** This event is fired when a feature's property is removed. */\n onRemoveProperty?: (e: google.maps.Data.RemovePropertyEvent) => void\n /** This event is fired for a rightclick on the geometry. */\n onRightClick?: (e: google.maps.Data.MouseEvent) => void\n /** This event is fired when a feature's geometry is set. */\n onSetGeometry?: (e: google.maps.Data.SetGeometryEvent) => void\n /** This event is fired when a feature's property is set. */\n onSetProperty?: (e: google.maps.Data.SetPropertyEvent) => void\n /** This callback is called when the data instance has loaded. It is called with the data instance. */\n onLoad?: (data: google.maps.Data) => void\n /** This callback is called when the component unmounts. It is called with the data instance. */\n onUnmount?: (data: google.maps.Data) => void\n}\n\nexport class Data extends React.PureComponent {\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n\n state: DataState = {\n data: null,\n }\n\n setDataCallback = (): void => {\n if (this.state.data !== null && this.props.onLoad) {\n this.props.onLoad(this.state.data)\n }\n }\n\n componentDidMount(): void {\n const data = new google.maps.Data({\n ...(this.props.options || {}),\n map: this.context,\n })\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: data,\n })\n\n this.setState(function setData() {\n return {\n data,\n }\n }, this.setDataCallback)\n }\n\n componentDidUpdate(prevProps: DataProps): void {\n if (this.state.data !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.data,\n })\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.data !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.data)\n }\n\n unregisterEvents(this.registeredEvents)\n\n if (this.state.data) {\n this.state.data.setMap(null)\n }\n }\n }\n\n render(): null {\n return null\n }\n}\n\nexport default Data\n","import { PureComponent } from 'react'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\nimport MapContext from '../../map-context'\n\nconst eventMap = {\n onClick: 'click',\n onDefaultViewportChanged: 'defaultviewport_changed',\n onStatusChanged: 'status_changed',\n}\n\nconst updaterMap = {\n options(instance: google.maps.KmlLayer, options: google.maps.KmlLayerOptions): void {\n instance.setOptions(options)\n },\n url(instance: google.maps.KmlLayer, url: string): void {\n instance.setUrl(url)\n },\n zIndex(instance: google.maps.KmlLayer, zIndex: number): void {\n instance.setZIndex(zIndex)\n },\n}\n\ninterface KmlLayerState {\n kmlLayer: google.maps.KmlLayer | null\n}\n\nexport interface KmlLayerProps {\n options?: google.maps.KmlLayerOptions\n /** The URL of the KML document to display. */\n url?: string\n /** The z-index of the layer. */\n zIndex?: number\n /** This event is fired when a feature in the layer is clicked. */\n onClick?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the KML layers default viewport has changed. */\n onDefaultViewportChanged?: () => void\n /** This event is fired when the KML layer has finished loading. At this point it is safe to read the status property to determine if the layer loaded successfully. */\n onStatusChanged?: () => void\n /** This callback is called when the kmlLayer instance has loaded. It is called with the kmlLayer instance. */\n onLoad: (kmlLayer: google.maps.KmlLayer) => void\n /** This callback is called when the component unmounts. It is called with the kmlLayer instance. */\n onUnmount: (kmlLayer: google.maps.KmlLayer) => void\n}\n\nexport class KmlLayer extends PureComponent {\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n\n state: KmlLayerState = {\n kmlLayer: null,\n }\n\n setKmlLayerCallback = (): void => {\n if (this.state.kmlLayer !== null && this.props.onLoad) {\n this.props.onLoad(this.state.kmlLayer)\n }\n }\n\n componentDidMount(): void {\n const kmlLayer = new google.maps.KmlLayer({\n ...this.props.options,\n map: this.context,\n })\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: kmlLayer,\n })\n\n this.setState(function setLmlLayer() {\n return {\n kmlLayer,\n }\n }, this.setKmlLayerCallback)\n }\n\n componentDidUpdate(prevProps: KmlLayerProps): void {\n if (this.state.kmlLayer !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.kmlLayer,\n })\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.kmlLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.kmlLayer)\n }\n\n unregisterEvents(this.registeredEvents)\n\n this.state.kmlLayer.setMap(null)\n }\n }\n\n render(): React.ReactNode {\n return null\n }\n}\n\nexport default KmlLayer\n","import { PositionDrawProps } from \"../../types\"\n\n/* eslint-disable filenames/match-regex */\nexport function getOffsetOverride(\n containerElement: HTMLElement,\n getPixelPositionOffset?: (offsetWidth: number, offsetHeight: number) => { x: number; y: number }\n): { x: number; y: number } | {} {\n return typeof getPixelPositionOffset === 'function'\n ? getPixelPositionOffset(containerElement.offsetWidth, containerElement.offsetHeight)\n : {}\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst createLatLng = (inst: any, Type: any): any => new Type(inst.lat, inst.lng)\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst createLatLngBounds = (inst: any, Type: any): any =>\n new Type(\n new google.maps.LatLng(inst.ne.lat, inst.ne.lng),\n new google.maps.LatLng(inst.sw.lat, inst.sw.lng)\n )\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst ensureOfType = (inst: any, type: any, factory: any): any => {\n return inst instanceof type ? inst : factory(inst, type)\n}\n\nconst getLayoutStylesByBounds = (\n mapCanvasProjection: google.maps.MapCanvasProjection,\n offset: { x: number; y: number },\n bounds: google.maps.LatLngBounds\n): { left: string; top: string; width?: string; height?: string } => {\n const ne = mapCanvasProjection && mapCanvasProjection.fromLatLngToDivPixel(bounds.getNorthEast())\n\n const sw = mapCanvasProjection && mapCanvasProjection.fromLatLngToDivPixel(bounds.getSouthWest())\n\n if (ne && sw) {\n return {\n left: `${sw.x + offset.x}px`,\n top: `${ne.y + offset.y}px`,\n width: `${ne.x - sw.x - offset.x}px`,\n height: `${sw.y - ne.y - offset.y}px`,\n }\n }\n\n return {\n left: '-9999px',\n top: '-9999px',\n }\n}\n\nconst getLayoutStylesByPosition = (\n mapCanvasProjection: google.maps.MapCanvasProjection,\n offset: { x: number; y: number },\n position: google.maps.LatLng\n): { left: string; top: string } => {\n const point = mapCanvasProjection && mapCanvasProjection.fromLatLngToDivPixel(position)\n\n if (point) {\n const { x, y } = point\n\n return {\n left: `${x + offset.x}px`,\n top: `${y + offset.y}px`,\n }\n }\n\n return {\n left: '-9999px',\n top: '-9999px',\n }\n}\n\nexport const getLayoutStyles = (\n mapCanvasProjection: google.maps.MapCanvasProjection,\n offset: { x: number; y: number },\n bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral,\n position?: google.maps.LatLng | google.maps.LatLngLiteral\n): PositionDrawProps => {\n return bounds !== undefined\n ? getLayoutStylesByBounds(\n mapCanvasProjection,\n offset,\n ensureOfType(bounds, google.maps.LatLngBounds, createLatLngBounds)\n )\n : getLayoutStylesByPosition(\n mapCanvasProjection,\n offset,\n ensureOfType(position, google.maps.LatLng, createLatLng)\n )\n}\n\nexport const arePositionsEqual = (\n currentPosition: PositionDrawProps,\n previousPosition: PositionDrawProps\n): boolean => {\n return currentPosition.left === previousPosition.left\n && currentPosition.top === previousPosition.top\n && currentPosition.width === previousPosition.height\n && currentPosition.height === previousPosition.height;\n}","import * as React from 'react'\nimport * as ReactDOM from 'react-dom'\n\nimport invariant from 'invariant'\n\nimport MapContext from '../../map-context'\n\nimport { getOffsetOverride, getLayoutStyles, arePositionsEqual } from './dom-helper'\n\ninterface OverlayViewState {\n paneEl: Element | null\n containerStyle: React.CSSProperties\n}\n\nfunction convertToLatLngString(latLngLike?: google.maps.LatLng | google.maps.LatLngLiteral | null) {\n if (!latLngLike) {\n return ''\n }\n\n const latLng = latLngLike instanceof google.maps.LatLng\n ? latLngLike\n : new google.maps.LatLng(latLngLike.lat, latLngLike.lng)\n\n return latLng + ''\n}\n\nfunction convertToLatLngBoundsString(latLngBoundsLike?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | null) {\n if (!latLngBoundsLike) {\n return ''\n }\n\n const latLngBounds = latLngBoundsLike instanceof google.maps.LatLngBounds\n ? latLngBoundsLike\n : new google.maps.LatLngBounds(\n new google.maps.LatLng(latLngBoundsLike.south, latLngBoundsLike.east),\n new google.maps.LatLng(latLngBoundsLike.north, latLngBoundsLike.west)\n )\n\n return latLngBounds + ''\n}\n\nexport type PaneNames = keyof google.maps.MapPanes\nexport interface OverlayViewProps {\n // required\n mapPaneName: PaneNames\n getPixelPositionOffset?: (offsetWidth: number, offsetHeight: number) => { x: number; y: number }\n bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral\n position?: google.maps.LatLng | google.maps.LatLngLiteral\n onLoad?: (overlayView: google.maps.OverlayView) => void\n onUnmount?: (overlayView: google.maps.OverlayView) => void\n}\n\nexport class OverlayView extends React.PureComponent {\n static FLOAT_PANE: PaneNames = `floatPane`\n static MAP_PANE: PaneNames = `mapPane`\n static MARKER_LAYER: PaneNames = `markerLayer`\n static OVERLAY_LAYER: PaneNames = `overlayLayer`\n static OVERLAY_MOUSE_TARGET: PaneNames = `overlayMouseTarget`\n\n static contextType = MapContext\n\n state: OverlayViewState = {\n paneEl: null,\n containerStyle: {\n // set initial position\n position: 'absolute'\n },\n }\n\n overlayView: google.maps.OverlayView\n containerRef: React.RefObject\n\n updatePane = (): void => {\n const mapPaneName = this.props.mapPaneName\n\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#MapPanes\n const mapPanes = this.overlayView.getPanes()\n invariant(\n !!mapPaneName,\n `OverlayView requires props.mapPaneName but got %s`,\n mapPaneName\n )\n\n if (mapPanes) {\n this.setState({\n paneEl: mapPanes[mapPaneName]\n })\n } else {\n this.setState({\n paneEl: null\n })\n }\n }\n onAdd = (): void => {\n this.updatePane()\n this.props.onLoad?.(this.overlayView)\n }\n\n onPositionElement = (): void => {\n const mapCanvasProjection = this.overlayView.getProjection()\n\n const offset = {\n x: 0,\n y: 0,\n ...(this.containerRef.current\n ? getOffsetOverride(this.containerRef.current, this.props.getPixelPositionOffset)\n : {}),\n }\n\n const layoutStyles = getLayoutStyles(\n mapCanvasProjection,\n offset,\n this.props.bounds,\n this.props.position\n )\n\n const { left, top, width, height } = this.state.containerStyle;\n if(!arePositionsEqual(layoutStyles, { left, top, width, height })) {\n this.setState({\n containerStyle: {\n ...layoutStyles,\n position: 'absolute'\n },\n })\n }\n }\n\n draw = (): void => {\n this.onPositionElement()\n }\n\n onRemove = (): void => {\n this.setState(() => ({\n paneEl: null\n }))\n // this.mapPaneEl = null\n this.props.onUnmount?.(this.overlayView)\n }\n\n constructor(props: OverlayViewProps) {\n super(props)\n\n this.containerRef = React.createRef()\n // You must implement three methods: onAdd(), draw(), and onRemove().\n const overlayView = new google.maps.OverlayView()\n overlayView.onAdd = this.onAdd\n overlayView.draw = this.draw\n overlayView.onRemove = this.onRemove\n this.overlayView = overlayView\n }\n\n componentDidMount(): void {\n // You must call setMap() with a valid Map object to trigger the call to\n // the onAdd() method and setMap(null) in order to trigger the onRemove() method.\n this.overlayView.setMap(this.context)\n }\n\n componentDidUpdate(prevProps: OverlayViewProps): void {\n const prevPositionString = convertToLatLngString(prevProps.position)\n const positionString = convertToLatLngString(this.props.position)\n const prevBoundsString = convertToLatLngBoundsString(prevProps.bounds)\n const boundsString = convertToLatLngBoundsString(this.props.bounds)\n\n if (prevPositionString !== positionString || prevBoundsString !== boundsString) {\n this.overlayView.draw()\n }\n if (prevProps.mapPaneName !== this.props.mapPaneName) {\n this.updatePane()\n }\n }\n\n componentWillUnmount(): void {\n this.overlayView.setMap(null)\n }\n\n render(): React.ReactPortal | React.ReactNode {\n const paneEl = this.state.paneEl\n if (paneEl) {\n return ReactDOM.createPortal(\n \n {React.Children.only(this.props.children)}\n
,\n paneEl\n )\n } else {\n return null\n }\n }\n}\n\nexport default OverlayView\n","import * as React from 'react'\n\nimport invariant from 'invariant'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\n\nimport MapContext from '../../map-context'\nimport { noop } from '../../utils/noop'\n\nconst eventMap = {\n onDblClick: 'dblclick',\n onClick: 'click',\n}\n\nconst updaterMap = {\n opacity(instance: google.maps.GroundOverlay, opacity: number): void {\n instance.setOpacity(opacity)\n },\n}\n\ninterface GroundOverlayState {\n groundOverlay: google.maps.GroundOverlay | null\n}\n\nexport interface GroundOverlayProps {\n options?: google.maps.GroundOverlayOptions\n /** The opacity of the overlay, expressed as a number between 0 and 1. Optional. Defaults to 1. */\n opacity?: number\n /** This event is fired when the DOM dblclick event is fired on the GroundOverlay. */\n onDblClick?: (e: google.maps.MouseEvent) => void\n /** This event is fired when the DOM click event is fired on the GroundOverlay. */\n onClick?: (e: google.maps.MouseEvent) => void\n /** The url of the projected image */\n url: string\n /** The bounds that the image will be scaled to fit */\n bounds: google.maps.LatLngBounds\n /** This callback is called when the groundOverlay instance has loaded. It is called with the groundOverlay instance. */\n onLoad?: (groundOverlay: google.maps.GroundOverlay) => void\n /** This callback is called when the component unmounts. It is called with the groundOverlay instance. */\n onUnmount?: (groundOverlay: google.maps.GroundOverlay) => void\n}\n\nexport class GroundOverlay extends React.PureComponent {\n public static defaultProps = {\n onLoad: noop,\n }\n\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n\n state: GroundOverlayState = {\n groundOverlay: null,\n }\n\n setGroundOverlayCallback = (): void => {\n if (this.state.groundOverlay !== null && this.props.onLoad) {\n this.props.onLoad(this.state.groundOverlay)\n }\n }\n\n componentDidMount(): void {\n invariant(\n !!this.props.url || !!this.props.bounds,\n `For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by \\`react-google-maps-api\\`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just \\`key={url}\\` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655`\n )\n\n const groundOverlay = new google.maps.GroundOverlay(this.props.url, this.props.bounds, {\n ...this.props.options,\n map: this.context,\n })\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: groundOverlay,\n })\n\n this.setState(function setGroundOverlay() {\n return {\n groundOverlay,\n }\n }, this.setGroundOverlayCallback)\n }\n\n componentDidUpdate(prevProps: GroundOverlayProps): void {\n if (this.state.groundOverlay !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.groundOverlay,\n })\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.groundOverlay) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.groundOverlay)\n }\n\n this.state.groundOverlay.setMap(null)\n }\n }\n\n render(): React.ReactNode {\n return null\n }\n}\n\nexport default GroundOverlay\n","export function noop(): void {}\n","import * as React from 'react'\nimport invariant from 'invariant'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\n\nimport MapContext from '../../map-context'\n\nconst eventMap = {}\n\nconst updaterMap = {\n data(\n instance: google.maps.visualization.HeatmapLayer,\n data:\n | google.maps.MVCArray\n | google.maps.LatLng[]\n | google.maps.visualization.WeightedLocation[]\n ): void {\n instance.setData(data)\n },\n map(instance: google.maps.visualization.HeatmapLayer, map: google.maps.Map): void {\n instance.setMap(map)\n },\n options(\n instance: google.maps.visualization.HeatmapLayer,\n options: google.maps.visualization.HeatmapLayerOptions\n ): void {\n instance.setOptions(options)\n },\n}\n\ninterface HeatmapLayerState {\n heatmapLayer: google.maps.visualization.HeatmapLayer | null\n}\n\nexport interface HeatmapLayerProps {\n // required\n /** The data points to display. Required. */\n data:\n | google.maps.MVCArray\n | google.maps.LatLng[]\n | google.maps.visualization.WeightedLocation[]\n options?: google.maps.visualization.HeatmapLayerOptions\n /** This callback is called when the heatmapLayer instance has loaded. It is called with the heatmapLayer instance. */\n onLoad?: (heatmapLayer: google.maps.visualization.HeatmapLayer) => void\n /** This callback is called when the component unmounts. It is called with the heatmapLayer instance. */\n onUnmount?: (heatmapLayer: google.maps.visualization.HeatmapLayer) => void\n}\n\nexport class HeatmapLayer extends React.PureComponent {\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n\n state: HeatmapLayerState = {\n heatmapLayer: null,\n }\n\n setHeatmapLayerCallback = (): void => {\n if (this.state.heatmapLayer !== null && this.props.onLoad) {\n this.props.onLoad(this.state.heatmapLayer)\n }\n }\n\n componentDidMount(): void {\n invariant(\n !!google.maps.visualization,\n 'Did you include prop libraries={[\"visualization\"]} to ? %s',\n google.maps.visualization\n )\n\n invariant(!!this.props.data, 'data property is required in HeatmapLayer %s', this.props.data)\n\n const heatmapLayer = new google.maps.visualization.HeatmapLayer({\n ...(this.props.options || {}),\n data: this.props.data,\n map: this.context,\n })\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: heatmapLayer,\n })\n\n this.setState(function setHeatmapLayer() {\n return {\n heatmapLayer,\n }\n }, this.setHeatmapLayerCallback)\n }\n\n componentDidUpdate(prevProps: HeatmapLayerProps): void {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.heatmapLayer,\n })\n }\n\n componentWillUnmount(): void {\n if (this.state.heatmapLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.heatmapLayer)\n }\n\n unregisterEvents(this.registeredEvents)\n\n this.state.heatmapLayer.setMap(null)\n }\n }\n\n render(): React.ReactNode {\n return null\n }\n}\n\nexport default HeatmapLayer\n","import * as React from 'react'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\n\nimport MapContext from '../../map-context'\n\nconst eventMap = {\n onCloseClick: 'closeclick',\n onPanoChanged: 'pano_changed',\n onPositionChanged: 'position_changed',\n onPovChanged: 'pov_changed',\n onResize: 'resize',\n onStatusChanged: 'status_changed',\n onVisibleChanged: 'visible_changed',\n onZoomChanged: 'zoom_changed',\n}\n\nconst updaterMap = {\n register(\n instance: google.maps.StreetViewPanorama,\n provider: (input: string) => google.maps.StreetViewPanoramaData,\n options: google.maps.PanoProviderOptions\n ): void {\n instance.registerPanoProvider(provider, options)\n },\n links(instance: google.maps.StreetViewPanorama, links: google.maps.StreetViewLink[]): void {\n instance.setLinks(links)\n },\n motionTracking(instance: google.maps.StreetViewPanorama, motionTracking: boolean): void {\n instance.setMotionTracking(motionTracking)\n },\n options(\n instance: google.maps.StreetViewPanorama,\n options: google.maps.StreetViewPanoramaOptions\n ): void {\n instance.setOptions(options)\n },\n pano(instance: google.maps.StreetViewPanorama, pano: string): void {\n instance.setPano(pano)\n },\n position(\n instance: google.maps.StreetViewPanorama,\n position: google.maps.LatLng | google.maps.LatLngLiteral\n ): void {\n instance.setPosition(position)\n },\n pov(instance: google.maps.StreetViewPanorama, pov: google.maps.StreetViewPov): void {\n instance.setPov(pov)\n },\n visible(instance: google.maps.StreetViewPanorama, visible: boolean): void {\n instance.setVisible(visible)\n },\n zoom(instance: google.maps.StreetViewPanorama, zoom: number): void {\n instance.setZoom(zoom)\n },\n}\n\ninterface StreetViewPanoramaState {\n streetViewPanorama: google.maps.StreetViewPanorama | null\n}\n\nexport interface StreetViewPanoramaProps {\n options?: google.maps.StreetViewPanoramaOptions\n /** This event is fired when the close button is clicked. */\n onCloseclick?: (event: google.maps.MouseEvent) => void\n /** This event is fired when the panorama's pano id changes. The pano may change as the user navigates through the panorama or the position is manually set. Note that not all position changes trigger a pano_changed. */\n onPanoChanged?: () => void\n /** This event is fired when the panorama's position changes. The position changes as the user navigates through the panorama or the position is set manually. */\n onPositionChanged?: () => void\n /** This event is fired when the panorama's point-of-view changes. The point of view changes as the pitch, zoom, or heading changes. */\n onPovChanged?: () => void\n /** Developers should trigger this event on the panorama when its div changes size: google.maps.event.trigger(panorama, 'resize'). */\n onResize?: () => void\n /** This event is fired after every panorama lookup by id or location, via setPosition() or setPano(). */\n onStatusChanged?: () => void\n /** This event is fired when the panorama's visibility changes. The visibility is changed when the Pegman is dragged onto the map, the close button is clicked, or setVisible() is called. */\n onVisibleChanged?: () => void\n /** This event is fired when the panorama's zoom level changes. */\n onZoomChange?: () => void\n /** This callback is called when the streetViewPanorama instance has loaded. It is called with the streetViewPanorama instance. */\n onLoad?: (streetViewPanorama: google.maps.StreetViewPanorama) => void\n /** This callback is called when the component unmounts. It is called with the streetViewPanorama instance. */\n onUnmount?: (streetViewPanorama: google.maps.StreetViewPanorama) => void\n}\n\nexport class StreetViewPanorama extends React.PureComponent<\n StreetViewPanoramaProps,\n StreetViewPanoramaState\n> {\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n\n state: StreetViewPanoramaState = {\n streetViewPanorama: null,\n }\n\n setStreetViewPanoramaCallback = (): void => {\n if (this.state.streetViewPanorama !== null && this.props.onLoad) {\n this.props.onLoad(this.state.streetViewPanorama)\n }\n }\n\n componentDidMount(): void {\n const streetViewPanorama = this.context.getStreetView()\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: streetViewPanorama,\n })\n\n this.setState(function setStreetViewPanorama() {\n return {\n streetViewPanorama,\n }\n }, this.setStreetViewPanoramaCallback)\n }\n\n componentDidUpdate(prevProps: StreetViewPanoramaProps): void {\n if (this.state.streetViewPanorama !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.streetViewPanorama,\n })\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.streetViewPanorama !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.streetViewPanorama)\n }\n\n unregisterEvents(this.registeredEvents)\n\n this.state.streetViewPanorama.setVisible(false)\n }\n }\n\n render(): React.ReactNode {\n return null\n }\n}\n\nexport default StreetViewPanorama\n","import * as React from 'react'\n\nimport MapContext from '../../map-context'\n\nexport interface StreetViewServiceProps {\n /** This callback is called when the streetViewService instance has loaded. It is called with the streetViewService instance. */\n onLoad?: (streetViewService: google.maps.StreetViewService | null) => void\n /** This callback is called when the component unmounts. It is called with the streetViewService instance. */\n onUnmount?: (streetViewService: google.maps.StreetViewService | null) => void\n}\n\ninterface StreetViewServiceState {\n streetViewService: google.maps.StreetViewService | null\n}\n\nexport class StreetViewService extends React.PureComponent<\n StreetViewServiceProps,\n StreetViewServiceState\n> {\n static contextType = MapContext\n\n state = {\n streetViewService: null,\n }\n\n setStreetViewServiceCallback = (): void => {\n if (this.state.streetViewService !== null && this.props.onLoad) {\n this.props.onLoad(this.state.streetViewService)\n }\n }\n\n componentDidMount(): void {\n const streetViewService = new google.maps.StreetViewService()\n\n this.setState(function setStreetViewService() {\n return {\n streetViewService,\n }\n }, this.setStreetViewServiceCallback)\n }\n\n componentWillUnmount(): void {\n if (this.state.streetViewService !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.streetViewService)\n }\n }\n }\n\n render(): React.ReactNode {\n return null\n }\n}\n\nexport default StreetViewService\n","import * as React from 'react'\nimport invariant from 'invariant'\n\ninterface DirectionsServiceState {\n directionsService: google.maps.DirectionsService | null\n}\n\nexport interface DirectionsServiceProps {\n // required for default functionality\n options: google.maps.DirectionsRequest\n\n // required for default functionality\n callback: (\n // required\n /** The directions response retrieved from the directions server. You can render these using a DirectionsRenderer or parse this object and render it yourself. You must display the warnings and copyrights as noted in the Google Maps Platform Terms of Service. Note that though this result is \"JSON-like,\" it is not strictly JSON, as it indirectly includes LatLng objects */\n result: google.maps.DirectionsResult,\n // required\n /** The status returned by the DirectionsService on the completion of a call to route(). Specify these by value, or by using the constant's name. For example, 'OK' or google.maps.DirectionsStatus.OK */\n status: google.maps.DirectionsStatus\n ) => void\n /** This callback is called when the directionsService instance has loaded. It is called with the directionsService instance. */\n onLoad?: (directionsService: google.maps.DirectionsService) => void\n /** This callback is called when the component unmounts. It is called with the directionsService instance. */\n onUnmount?: (directionsService: google.maps.DirectionsService) => void\n}\n\nexport class DirectionsService extends React.PureComponent<\n DirectionsServiceProps,\n DirectionsServiceState\n> {\n state: DirectionsServiceState = {\n directionsService: null,\n }\n\n setDirectionsServiceCallback = (): void => {\n if (this.state.directionsService !== null && this.props.onLoad) {\n this.props.onLoad(this.state.directionsService)\n }\n }\n\n componentDidMount(): void {\n invariant(\n !!this.props.options,\n 'DirectionsService expected options object as parameter, but got %s',\n this.props.options\n )\n\n const directionsService = new google.maps.DirectionsService()\n\n this.setState(function setDirectionsService() {\n return {\n directionsService,\n }\n }, this.setDirectionsServiceCallback)\n }\n\n componentDidUpdate(): void {\n if (this.state.directionsService !== null) {\n this.state.directionsService.route(this.props.options, this.props.callback)\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.directionsService !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.directionsService)\n }\n }\n }\n\n render(): JSX.Element {\n return <>\n }\n}\n\nexport default DirectionsService\n","import * as React from 'react'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\n\nimport MapContext from '../../map-context'\n\nconst eventMap = {\n onDirectionsChanged: 'directions_changed',\n}\n\nconst updaterMap = {\n directions(\n instance: google.maps.DirectionsRenderer,\n directions: google.maps.DirectionsResult\n ): void {\n instance.setDirections(directions)\n },\n map(instance: google.maps.DirectionsRenderer, map: google.maps.Map): void {\n instance.setMap(map)\n },\n options(\n instance: google.maps.DirectionsRenderer,\n options: google.maps.DirectionsRendererOptions\n ): void {\n instance.setOptions(options)\n },\n panel(instance: google.maps.DirectionsRenderer, panel: Element): void {\n instance.setPanel(panel)\n },\n routeIndex(instance: google.maps.DirectionsRenderer, routeIndex: number): void {\n instance.setRouteIndex(routeIndex)\n },\n}\n\ninterface DirectionsRendererState {\n directionsRenderer: google.maps.DirectionsRenderer | null\n}\n\nexport interface DirectionsRendererProps {\n options?: google.maps.DirectionsRendererOptions\n /** The directions to display on the map and/or in a
panel, retrieved as a DirectionsResult object from DirectionsService. */\n directions?: google.maps.DirectionsResult\n /** The
in which to display the directions steps. */\n panel?: Element\n /** The index of the route within the DirectionsResult object. The default value is 0. */\n routeIndex?: number\n /** This event is fired when the rendered directions change, either when a new DirectionsResult is set or when the user finishes dragging a change to the directions path. */\n onDirectionsChanged?: () => void\n /** This callback is called when the directionsRenderer instance has loaded. It is called with the directionsRenderer instance. */\n onLoad?: (directionsRenderer: google.maps.DirectionsRenderer) => void\n /** This callback is called when the component unmounts. It is called with the directionsRenderer instance. */\n onUnmount?: (directionsRenderer: google.maps.DirectionsRenderer) => void\n}\n\nexport class DirectionsRenderer extends React.PureComponent<\n DirectionsRendererProps,\n DirectionsRendererState\n> {\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n\n state: DirectionsRendererState = {\n directionsRenderer: null,\n }\n\n setDirectionsRendererCallback = (): void => {\n if (this.state.directionsRenderer !== null) {\n this.state.directionsRenderer.setMap(this.context)\n\n if (this.props.onLoad) {\n this.props.onLoad(this.state.directionsRenderer)\n }\n }\n }\n\n componentDidMount(): void {\n const directionsRenderer = new google.maps.DirectionsRenderer(this.props.options)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: directionsRenderer,\n })\n\n this.setState(function setDirectionsRenderer() {\n return {\n directionsRenderer,\n }\n }, this.setDirectionsRendererCallback)\n }\n\n componentDidUpdate(prevProps: DirectionsRendererProps): void {\n if (this.state.directionsRenderer !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.directionsRenderer,\n })\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.directionsRenderer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.directionsRenderer)\n }\n\n unregisterEvents(this.registeredEvents)\n\n if (this.state.directionsRenderer) {\n this.state.directionsRenderer.setMap(null)\n }\n }\n }\n\n render(): JSX.Element {\n return <>\n }\n}\n\nexport default DirectionsRenderer\n","import * as React from 'react'\n\nimport invariant from 'invariant'\n\ninterface DistanceMatrixServiceState {\n distanceMatrixService: google.maps.DistanceMatrixService | null\n}\n\nexport interface DistanceMatrixServiceProps {\n // required for default functionality\n options: google.maps.DistanceMatrixRequest\n\n // required for default functionality\n callback: (\n // required\n /** The response to a DistanceMatrixService request, consisting of the formatted origin and destination addresses, and a sequence of DistanceMatrixResponseRows, one for each corresponding origin address. */\n response: google.maps.DistanceMatrixResponse,\n // required\n /** The top-level status about the request in general returned by the DistanceMatrixService upon completion of a distance matrix request. Specify these by value, or by using the constant's name. For example, 'OK' or google.maps.DistanceMatrixStatus.OK. */\n status: google.maps.DistanceMatrixStatus\n ) => void\n /** This callback is called when the distanceMatrixService instance has loaded. It is called with the distanceMatrixService instance. */\n onLoad?: (distanceMatrixService: google.maps.DistanceMatrixService) => void\n /** This callback is called when the component unmounts. It is called with the distanceMatrixService instance. */\n onUnmount?: (distanceMatrixService: google.maps.DistanceMatrixService) => void\n}\n\nexport class DistanceMatrixService extends React.PureComponent<\n DistanceMatrixServiceProps,\n DistanceMatrixServiceState\n> {\n state: DistanceMatrixServiceState = {\n distanceMatrixService: null,\n }\n\n setDistanceMatrixServiceCallback = (): void => {\n if (this.state.distanceMatrixService !== null && this.props.onLoad) {\n this.props.onLoad(this.state.distanceMatrixService)\n }\n }\n\n componentDidMount(): void {\n invariant(\n !!this.props.options,\n 'DistanceMatrixService expected options object as parameter, but go %s',\n this.props.options\n )\n\n const distanceMatrixService = new google.maps.DistanceMatrixService()\n\n this.setState(function setDistanceMatrixService() {\n return {\n distanceMatrixService,\n }\n }, this.setDistanceMatrixServiceCallback)\n }\n\n componentDidUpdate(): void {\n if (this.state.distanceMatrixService !== null) {\n this.state.distanceMatrixService.getDistanceMatrix(this.props.options, this.props.callback)\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.distanceMatrixService !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.distanceMatrixService)\n }\n }\n }\n\n render(): JSX.Element {\n return <>\n }\n}\n\nexport default DistanceMatrixService\n","import * as React from 'react'\n\nimport invariant from 'invariant'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\n\nimport MapContext from '../../map-context'\n\nconst eventMap = {\n onPlacesChanged: 'places_changed',\n}\n\nconst updaterMap = {\n bounds(\n instance: google.maps.places.SearchBox,\n bounds: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral\n ): void {\n instance.setBounds(bounds)\n },\n}\n\ninterface StandaloneSearchBoxState {\n searchBox: google.maps.places.SearchBox | null\n}\n\nexport interface StandaloneSearchBoxProps {\n /** The area towards which to bias query predictions. Predictions are biased towards, but not restricted to, queries targeting these bounds. */\n bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral\n options?: google.maps.places.SearchBoxOptions\n /** This event is fired when the user selects a query, getPlaces should be used to get new places. */\n onPlacesChanged?: () => void\n /** This callback is called when the searchBox instance has loaded. It is called with the searchBox instance. */\n onLoad?: (searchBox: google.maps.places.SearchBox) => void\n /** This callback is called when the component unmounts. It is called with the searchBox instance. */\n onUnmount?: (searchBox: google.maps.places.SearchBox) => void\n}\n\nclass StandaloneSearchBox extends React.PureComponent<\n StandaloneSearchBoxProps,\n StandaloneSearchBoxState\n> {\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n\n containerElement: React.RefObject = React.createRef()\n\n state: StandaloneSearchBoxState = {\n searchBox: null,\n }\n\n setSearchBoxCallback = (): void => {\n if (this.state.searchBox !== null && this.props.onLoad) {\n this.props.onLoad(this.state.searchBox)\n }\n }\n\n componentDidMount(): void {\n invariant(\n !!google.maps.places,\n 'You need to provide libraries={[\"places\"]} prop to component %s',\n google.maps.places\n )\n\n if (this.containerElement !== null && this.containerElement.current !== null) {\n const input = this.containerElement.current.querySelector('input')\n\n if (input !== null) {\n const searchBox = new google.maps.places.SearchBox(input, this.props.options)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: searchBox,\n })\n\n this.setState(function setSearchBox() {\n return {\n searchBox,\n }\n }, this.setSearchBoxCallback)\n }\n }\n }\n\n componentDidUpdate(prevProps: StandaloneSearchBoxProps): void {\n if (this.state.searchBox !== null) {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.searchBox,\n })\n }\n }\n\n componentWillUnmount(): void {\n if (this.state.searchBox !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.searchBox)\n }\n\n unregisterEvents(this.registeredEvents)\n }\n }\n\n render(): React.ReactNode {\n return
{React.Children.only(this.props.children)}
\n }\n}\n\nexport default StandaloneSearchBox\n","import * as React from 'react'\n\nimport { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper'\n\nimport MapContext from '../../map-context'\n\nimport invariant from 'invariant'\n\nconst eventMap = {\n onPlaceChanged: 'place_changed',\n}\n\nconst updaterMap = {\n bounds(\n instance: google.maps.places.Autocomplete,\n bounds: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral\n ): void {\n instance.setBounds(bounds)\n },\n restrictions(\n instance: google.maps.places.Autocomplete,\n restrictions: google.maps.places.ComponentRestrictions\n ): void {\n instance.setComponentRestrictions(restrictions)\n },\n fields(instance: google.maps.places.Autocomplete, fields: string[]): void {\n instance.setFields(fields)\n },\n options(\n instance: google.maps.places.Autocomplete,\n options: google.maps.places.AutocompleteOptions\n ): void {\n instance.setOptions(options)\n },\n types(instance: google.maps.places.Autocomplete, types: string[]): void {\n instance.setTypes(types)\n },\n}\n\ninterface AutocompleteState {\n autocomplete: google.maps.places.Autocomplete | null\n}\n\nexport interface AutocompleteProps {\n // required\n children: React.ReactChild\n /** The area in which to search for places. */\n bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral\n /** The component restrictions. Component restrictions are used to restrict predictions to only those within the parent component. For example, the country. */\n restrictions?: google.maps.places.ComponentRestrictions\n /** Fields to be included for the Place in the details response when the details are successfully retrieved. For a list of fields see PlaceResult. Nested fields can be specified with dot-paths (for example, \"geometry.location\"). */\n fields?: string[]\n options?: google.maps.places.AutocompleteOptions\n /** The types of predictions to be returned. For a list of supported types, see the developer's guide. If nothing is specified, all types are returned. In general only a single type is allowed. The exception is that you can safely mix the 'geocode' and 'establishment' types, but note that this will have the same effect as specifying no types. */\n types?: string[]\n /** This event is fired when a PlaceResult is made available for a Place the user has selected. If the user enters the name of a Place that was not suggested by the control and presses the Enter key, or if a Place Details request fails, the PlaceResult contains the user input in the name property, with no other properties defined. */\n onPlaceChanged?: () => void\n /** This callback is called when the autocomplete instance has loaded. It is called with the autocomplete instance. */\n onLoad?: (autocomplete: google.maps.places.Autocomplete) => void\n /** This callback is called when the component unmounts. It is called with the autocomplete instance. */\n onUnmount?: (autocomplete: google.maps.places.Autocomplete) => void\n className?: string\n}\n\nexport class Autocomplete extends React.PureComponent {\n static contextType = MapContext\n\n registeredEvents: google.maps.MapsEventListener[] = []\n containerElement: React.RefObject = React.createRef()\n\n state: AutocompleteState = {\n autocomplete: null,\n }\n\n setAutocompleteCallback = (): void => {\n if (this.state.autocomplete !== null && this.props.onLoad) {\n this.props.onLoad(this.state.autocomplete)\n }\n }\n\n componentDidMount(): void {\n invariant(\n !!google.maps.places,\n 'You need to provide libraries={[\"places\"]} prop to component %s',\n google.maps.places\n )\n\n // TODO: why current could be equal null?\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n const input = this.containerElement.current.querySelector('input')\n\n if (input) {\n const autocomplete = new google.maps.places.Autocomplete(input, this.props.options)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: autocomplete,\n })\n\n this.setState(function setAutocomplete() {\n return {\n autocomplete,\n }\n }, this.setAutocompleteCallback)\n }\n }\n\n componentDidUpdate(prevProps: AutocompleteProps): void {\n unregisterEvents(this.registeredEvents)\n\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.autocomplete,\n })\n }\n\n componentWillUnmount(): void {\n if (this.state.autocomplete !== null) {\n unregisterEvents(this.registeredEvents)\n }\n }\n\n render(): React.ReactNode {\n return
{React.Children.only(this.props.children)}
\n }\n}\n\nexport default Autocomplete\n","/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at.\n *\n * Http://www.apache.org/licenses/LICENSE-2.0.\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @ignore\n */\ndeclare global {\n interface Window {\n __googleMapsCallback: (e: Event) => void;\n }\n}\n\ntype Libraries = (\n | \"drawing\"\n | \"geometry\"\n | \"localContext\"\n | \"places\"\n | \"visualization\"\n)[];\n\n/**\n * The Google Maps JavaScript API\n * [documentation](https://developers.google.com/maps/documentation/javascript/tutorial)\n * is the authoritative source for [[LoaderOptions]].\n */\nexport interface LoaderOptions {\n /**\n * See https://developers.google.com/maps/documentation/javascript/get-api-key.\n */\n apiKey: string;\n /**\n * To track usage across different applications using the same client ID,\n * you may provide an optional channel parameter with your requests. By\n * specifying different channel values for different aspects of your\n * application, you can determine precisely how your application is used.\n *\n * For example, your externally-facing website may access the API using a\n * channel set to customer while your internal marketing department may use\n * a channel set to mkting. Your reports will break down usage by those\n * channel values.\n *\n * Channel reporting is available for applications using the Maps JavaScript\n * API, the image APIs or any of the Google Maps Platform web services.\n *\n * The channel parameter must use the following format:\n *\n * - Must be an ASCII alphanumeric string.\n * - Period (.), underscore (_) and hyphen (-) characters are allowed.\n * - The channel parameter is case-insensitive; upper-case, mixed-case, and\n * lower-cased channel parameters will be merged into their lower-case\n * equivalent. For example, usage on the `CUSTOMER` channel will be combined\n * with the usage on the `customer` channel.\n * - The channel value must be a static value assigned per application\n * instance, and must not be generated dynamically. You may not use\n * channel values to track individual users, for example.\n */\n channel?: string;\n /**\n * In your application you can specify release channels or version numbers:\n *\n * The weekly version is specified with `version=weekly`. This version is\n * updated once per week, and is the most current.\n *\n * ```\n * const loader = Loader({apiKey, version: 'weekly'});\n * ```\n *\n * The quarterly version is specified with `version=quarterly`. This version\n * is updated once per quarter, and is the most predictable.\n *\n * ```\n * const loader = Loader({apiKey, version: 'quarterly'});\n * ```\n *\n * The version number is specified with `version=n.nn`. You can choose\n * `version=3.40`, `version=3.39`, or `version=3.38`. Version numbers are\n * updated once per quarter.\n *\n * ```\n * const loader = Loader({apiKey, version: '3.40'});\n * ```\n *\n * If you do not explicitly specify a version, you will receive the\n * weekly version by default.\n */\n version?: string;\n /**\n * The id of the script tag. Before adding a new script, the Loader will check for an existing one.\n */\n id?: string;\n /**\n * When loading the Maps JavaScript API via the URL you may optionally load\n * additional libraries through use of the libraries URL parameter. Libraries\n * are modules of code that provide additional functionality to the main Maps\n * JavaScript API but are not loaded unless you specifically request them.\n *\n * ```\n * const loader = Loader({\n * apiKey,\n * libraries: ['drawing', 'geometry', 'places', 'visualization'],\n * });\n * ```\n *\n * Set the [list of libraries](https://developers.google.com/maps/documentation/javascript/libraries) for more options.\n */\n libraries?: Libraries;\n /**\n * By default, the Maps JavaScript API uses the user's preferred language\n * setting as specified in the browser, when displaying textual information\n * such as the names for controls, copyright notices, driving directions and\n * labels on maps. In most cases, it's preferable to respect the browser\n * setting. However, if you want the Maps JavaScript API to ignore the\n * browser's language setting, you can force it to display information in a\n * particular language when loading the Maps JavaScript API code.\n *\n * For example, the following example localizes the language to the United\n * Kingdom:\n *\n * ```\n * const loader = Loader({apiKey, language: 'ja', region: 'JP'});\n * ```\n *\n * See the [list of supported\n * languages](https://developers.google.com/maps/faq#languagesupport). Note\n * that new languages are added often, so this list may not be exhaustive.\n *\n */\n language?: string;\n /**\n * When you load the Maps JavaScript API from maps.googleapis.com it applies a\n * default bias for application behavior towards the United States. If you\n * want to alter your application to serve different map tiles or bias the\n * application (such as biasing geocoding results towards the region), you can\n * override this default behavior by adding a region parameter when loading\n * the Maps JavaScript API code.\n *\n * The region parameter accepts Unicode region subtag identifiers which\n * (generally) have a one-to-one mapping to country code Top-Level Domains\n * (ccTLDs). Most Unicode region identifiers are identical to ISO 3166-1\n * codes, with some notable exceptions. For example, Great Britain's ccTLD is\n * \"uk\" (corresponding to the domain .co.uk) while its region identifier is\n * \"GB.\"\n *\n * For example, the following example localizes the map to the United Kingdom:\n *\n * ```\n * const loader = Loader({apiKey, region: 'GB'});\n * ```\n */\n region?: string;\n /**\n * (Beta) You can add multiple Map IDs to your map using the map_ids paramenter in\n * your bootstrap request.\n */\n mapIds?: string[];\n /**\n * Use a custom url and path to load the Google Maps API script.\n */\n url?: string;\n /**\n * Use a cryptographic nonce attribute.\n */\n nonce?: string;\n}\n\n/**\n * [[Loader]] makes it easier to add Google Maps JavaScript API to your application\n * dynamically using\n * [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n * It works by dynamically creating and appending a script node to the the\n * document head and wrapping the callback function so as to return a promise.\n *\n * ```\n * const loader = new Loader({\n * apiKey: \"\",\n * version: \"weekly\",\n * libraries: [\"places\"]\n * });\n *\n * loader.load().then(() => {\n * const map = new google.maps.Map(...)\n * })\n * ```\n */\nexport class Loader {\n /**\n * See [[LoaderOptions.version]]\n */\n version: string;\n /**\n * See [[LoaderOptions.apiKey]]\n */\n apiKey: string;\n /**\n * See [[LoaderOptions.id]]\n */\n channel: string;\n /**\n * See [[LoaderOptions.channel]]\n */\n id: string;\n /**\n * See [[LoaderOptions.libraries]]\n */\n libraries: Libraries;\n /**\n * See [[LoaderOptions.language]]\n */\n language: string;\n\n /**\n * See [[LoaderOptions.region]]\n */\n region: string;\n\n /**\n * See [[LoaderOptions.mapIds]]\n */\n mapIds: string[];\n\n /**\n * See [[LoaderOptions.nonce]]\n */\n nonce: string | null;\n\n /**\n * See [[LoaderOptions.url]]\n */\n url: string;\n\n private CALLBACK = \"__googleMapsCallback\";\n private callbacks: ((e: Event) => void)[] = [];\n private done = false;\n private loading = false;\n private onerrorEvent: Event;\n\n /**\n * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set\n * using this library, instead the defaults are set by the Google Maps\n * JavaScript API server.\n *\n * ```\n * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});\n * ```\n */\n constructor({\n apiKey,\n channel,\n id = \"__googleMapsScriptId\",\n libraries = [],\n language,\n region,\n version,\n mapIds,\n nonce,\n url = \"https://maps.googleapis.com/maps/api/js\",\n }: LoaderOptions) {\n this.version = version;\n this.apiKey = apiKey;\n this.channel = channel;\n this.id = id;\n this.libraries = libraries;\n this.language = language;\n this.region = region;\n this.mapIds = mapIds;\n this.nonce = nonce;\n this.url = url;\n }\n /**\n * CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]].\n *\n * @ignore\n */\n createUrl(): string {\n let url = this.url;\n\n url += `?callback=${this.CALLBACK}`;\n\n if (this.apiKey) {\n url += `&key=${this.apiKey}`;\n }\n\n if (this.channel) {\n url += `&channel=${this.channel}`;\n }\n\n if (this.libraries.length > 0) {\n url += `&libraries=${this.libraries.join(\",\")}`;\n }\n\n if (this.language) {\n url += `&language=${this.language}`;\n }\n\n if (this.region) {\n url += `®ion=${this.region}`;\n }\n\n if (this.version) {\n url += `&v=${this.version}`;\n }\n\n if (this.mapIds) {\n url += `&map_ids=${this.mapIds.join(\",\")}`;\n }\n\n return url;\n }\n\n /**\n * Load the Google Maps JavaScript API script and return a Promise.\n */\n load(): Promise {\n return this.loadPromise();\n }\n\n /**\n * Load the Google Maps JavaScript API script and return a Promise.\n *\n * @ignore\n */\n loadPromise(): Promise {\n return new Promise((resolve, reject) => {\n this.loadCallback((err: Event) => {\n if (!err) {\n resolve();\n } else {\n reject(err);\n }\n });\n });\n }\n\n /**\n * Load the Google Maps JavaScript API script with a callback.\n */\n loadCallback(fn: (e: Event) => void): void {\n this.callbacks.push(fn);\n this.execute();\n }\n\n /**\n * Set the script on document.\n */\n private setScript(): void {\n if (this.id && document.getElementById(this.id)) {\n this.callback();\n return;\n }\n\n const url = this.createUrl();\n const script = document.createElement(\"script\");\n script.id = this.id;\n script.type = \"text/javascript\";\n script.src = url;\n script.onerror = this.loadErrorCallback.bind(this);\n script.defer = true;\n script.async = true;\n\n if (this.nonce) {\n script.nonce = this.nonce;\n }\n\n document.head.appendChild(script);\n }\n\n private loadErrorCallback(e: Event): void {\n this.onerrorEvent = e;\n this.callback();\n }\n\n private setCallback(): void {\n window.__googleMapsCallback = this.callback.bind(this);\n }\n\n private callback(): void {\n this.done = true;\n this.loading = false;\n\n this.callbacks.forEach((cb) => {\n cb(this.onerrorEvent);\n });\n\n this.callbacks = [];\n }\n\n private execute(): void {\n if (this.done) {\n this.callback();\n } else {\n if (this.loading) {\n // do nothing but wait\n } else {\n this.loading = true;\n this.setCallback();\n this.setScript();\n }\n }\n }\n}\n","/* global google */\n/* eslint-disable filenames/match-regex */\nimport { Cluster } from './Cluster'\n\nimport { ClusterIconStyle, ClusterIconInfo } from './types'\n\nexport class ClusterIcon {\n cluster: Cluster\n className: string\n styles: ClusterIconStyle[]\n center: google.maps.LatLng | undefined\n div: HTMLDivElement | null\n sums: ClusterIconInfo | null\n visible: boolean\n url: string\n height: number\n width: number\n anchorText: number[]\n anchorIcon: number[]\n textColor: string\n textSize: number\n textDecoration: string\n fontWeight: string\n fontStyle: string\n fontFamily: string\n backgroundPosition: string\n\n boundsChangedListener: google.maps.MapsEventListener | null\n\n constructor(cluster: Cluster, styles: ClusterIconStyle[]) {\n cluster.getClusterer().extend(ClusterIcon, google.maps.OverlayView)\n this.cluster = cluster\n this.className = this.cluster.getClusterer().getClusterClass()\n this.styles = styles\n this.center = undefined\n this.div = null\n this.sums = null\n this.visible = false\n this.boundsChangedListener = null\n this.url = ''\n this.height = 0\n this.width = 0\n this.anchorText = [0, 0]\n this.anchorIcon = [0, 0]\n this.textColor = 'black'\n this.textSize = 11\n this.textDecoration = 'none'\n this.fontWeight = 'bold'\n this.fontStyle = 'normal'\n this.fontFamily = 'Arial,sans-serif'\n this.backgroundPosition = '0 0'\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.setMap(cluster.getMap()) // Note: this causes onAdd to be called\n }\n\n onAdd() {\n let cMouseDownInCluster: boolean\n let cDraggingMapByCluster: boolean\n\n this.div = document.createElement('div')\n this.div.className = this.className\n if (this.visible) {\n this.show()\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getPanes().overlayMouseTarget.appendChild(this.div)\n\n // Fix for Issue 157\n this.boundsChangedListener = google.maps.event.addListener(\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap(),\n 'boundschanged',\n function boundsChanged() {\n cDraggingMapByCluster = cMouseDownInCluster\n }\n )\n\n google.maps.event.addDomListener(this.div, 'mousedown', function onMouseDown() {\n cMouseDownInCluster = true\n cDraggingMapByCluster = false\n })\n\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n google.maps.event.addDomListener(\n this.div,\n 'click',\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n (event: Event) => {\n cMouseDownInCluster = false\n\n if (!cDraggingMapByCluster) {\n const markerClusterer = this.cluster.getClusterer()\n\n /**\n * This event is fired when a cluster marker is clicked.\n * @name MarkerClusterer#click\n * @param {Cluster} c The cluster that was clicked.\n * @event\n */\n google.maps.event.trigger(markerClusterer, 'click', this.cluster)\n google.maps.event.trigger(markerClusterer, 'clusterclick', this.cluster) // deprecated name\n\n // The default click handler follows. Disable it by setting\n // the zoomOnClick property to false.\n if (markerClusterer.getZoomOnClick()) {\n // Zoom into the cluster.\n const maxZoom = markerClusterer.getMaxZoom()\n\n const bounds = this.cluster.getBounds()\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n markerClusterer.getMap().fitBounds(bounds)\n\n // There is a fix for Issue 170 here:\n setTimeout(function timeout() {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n markerClusterer.getMap().fitBounds(bounds)\n\n // Don't zoom beyond the max zoom level\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n if (maxZoom !== null && markerClusterer.getMap().getZoom() > maxZoom) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n markerClusterer.getMap().setZoom(maxZoom + 1)\n }\n }, 100)\n }\n\n // Prevent event propagation to the map:\n event.cancelBubble = true\n\n if (event.stopPropagation) {\n event.stopPropagation()\n }\n }\n }\n )\n\n google.maps.event.addDomListener(\n this.div,\n 'mouseover',\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n () => {\n /**\n * This event is fired when the mouse moves over a cluster marker.\n * @name MarkerClusterer#mouseover\n * @param {Cluster} c The cluster that the mouse moved over.\n * @event\n */\n google.maps.event.trigger(this.cluster.getClusterer(), 'mouseover', this.cluster)\n }\n )\n\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n google.maps.event.addDomListener(\n this.div,\n 'mouseout',\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n () => {\n /**\n * This event is fired when the mouse moves out of a cluster marker.\n * @name MarkerClusterer#mouseout\n * @param {Cluster} c The cluster that the mouse moved out of.\n * @event\n */\n google.maps.event.trigger(this.cluster.getClusterer(), 'mouseout', this.cluster)\n }\n )\n }\n\n onRemove() {\n if (this.div && this.div.parentNode) {\n this.hide()\n\n if (this.boundsChangedListener !== null) {\n google.maps.event.removeListener(this.boundsChangedListener)\n }\n\n google.maps.event.clearInstanceListeners(this.div)\n\n this.div.parentNode.removeChild(this.div)\n\n this.div = null\n }\n }\n\n draw() {\n if (this.visible && this.div !== null && this.center) {\n const { x, y } = this.getPosFromLatLng(this.center)\n\n this.div.style.top = y + 'px'\n this.div.style.left = x + 'px'\n }\n }\n\n hide() {\n if (this.div) {\n this.div.style.display = 'none'\n }\n\n this.visible = false\n }\n\n show() {\n if (this.div && this.center) {\n let img = '',\n divTitle = ''\n\n // NOTE: values must be specified in px units\n const bp = this.backgroundPosition.split(' ')\n\n const spriteH = parseInt(bp[0].replace(/^\\s+|\\s+$/g, ''), 10)\n\n const spriteV = parseInt(bp[1].replace(/^\\s+|\\s+$/g, ''), 10)\n\n const pos = this.getPosFromLatLng(this.center)\n\n if (this.sums === null || typeof this.sums.title === 'undefined' || this.sums.title === '') {\n divTitle = this.cluster.getClusterer().getTitle()\n } else {\n divTitle = this.sums.title\n }\n\n this.div.style.cssText = this.createCss(pos)\n\n img =\n \"\" +\n        divTitle +\n        \"\"\n\n this.div.innerHTML =\n img +\n \"
\" +\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.sums.text +\n '
'\n\n this.div.title = divTitle\n\n this.div.style.display = ''\n }\n\n this.visible = true\n }\n\n useStyle(sums: ClusterIconInfo) {\n this.sums = sums\n\n const style = this.styles[Math.min(this.styles.length - 1, Math.max(0, sums.index - 1))]\n\n this.url = style.url\n this.height = style.height\n this.width = style.width\n this.anchorText = style.anchorText || [0, 0]\n this.anchorIcon = style.anchorIcon || [this.height / 2, this.width / 2]\n\n this.textColor = style.textColor || 'black'\n\n this.textSize = style.textSize || 11\n\n this.textDecoration = style.textDecoration || 'none'\n\n this.fontWeight = style.fontWeight || 'bold'\n\n this.fontStyle = style.fontStyle || 'normal'\n\n this.fontFamily = style.fontFamily || 'Arial,sans-serif'\n\n this.backgroundPosition = style.backgroundPosition || '0 0'\n }\n\n setCenter(center: google.maps.LatLng) {\n this.center = center\n }\n\n createCss(pos: google.maps.Point): string {\n const style = []\n\n style.push('cursor: pointer;')\n\n style.push('position: absolute; top: ' + pos.y + 'px; left: ' + pos.x + 'px;')\n\n style.push('width: ' + this.width + 'px; height: ' + this.height + 'px;')\n\n return style.join('')\n }\n\n getPosFromLatLng(latlng: google.maps.LatLng): google.maps.Point {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n const pos = this.getProjection().fromLatLngToDivPixel(latlng)\n\n pos.x -= this.anchorIcon[1]\n\n pos.y -= this.anchorIcon[0]\n\n // pos.x = pos.x\n\n // pos.y = pos.y\n\n return pos\n }\n}\n","/* global google */\n/* eslint-disable filenames/match-regex */\nimport { Clusterer } from './Clusterer'\n\nimport { ClusterIcon } from './ClusterIcon'\n\nimport { MarkerExtended } from './types'\n\nexport class Cluster {\n markerClusterer: Clusterer\n map: google.maps.Map | google.maps.StreetViewPanorama\n gridSize: number\n minClusterSize: number\n averageCenter: boolean\n markers: MarkerExtended[]\n center: google.maps.LatLng | undefined\n bounds: google.maps.LatLngBounds | null\n clusterIcon: ClusterIcon\n\n constructor(markerClusterer: Clusterer) {\n this.markerClusterer = markerClusterer\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.map = this.markerClusterer.getMap()\n\n this.gridSize = this.markerClusterer.getGridSize()\n\n this.minClusterSize = this.markerClusterer.getMinimumClusterSize()\n\n this.averageCenter = this.markerClusterer.getAverageCenter()\n\n this.markers = []\n\n this.center = undefined\n\n this.bounds = null\n\n this.clusterIcon = new ClusterIcon(this, this.markerClusterer.getStyles())\n }\n\n getSize(): number {\n return this.markers.length\n }\n\n getMarkers(): MarkerExtended[] {\n return this.markers\n }\n\n getCenter(): google.maps.LatLng | undefined {\n return this.center\n }\n\n getMap(): google.maps.Map | google.maps.StreetViewPanorama {\n return this.map\n }\n\n getClusterer(): Clusterer {\n return this.markerClusterer\n }\n\n getBounds(): google.maps.LatLngBounds {\n const bounds = new google.maps.LatLngBounds(this.center, this.center)\n\n const markers = this.getMarkers()\n\n for (let i = 0; i < markers.length; i++) {\n const position = markers[i].getPosition()\n\n if (position) {\n bounds.extend(position)\n }\n }\n\n return bounds\n }\n\n remove() {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.clusterIcon.setMap(null)\n\n this.markers = []\n\n delete this.markers\n }\n\n addMarker(marker: MarkerExtended): boolean {\n if (this.isMarkerAlreadyAdded(marker)) {\n return false\n }\n\n if (!this.center) {\n const position = marker.getPosition()\n\n if (position) {\n this.center = position\n\n this.calculateBounds()\n }\n } else {\n if (this.averageCenter) {\n const position = marker.getPosition()\n\n if (position) {\n const length = this.markers.length + 1\n\n this.center = new google.maps.LatLng(\n (this.center.lat() * (length - 1) + position.lat()) / length,\n (this.center.lng() * (length - 1) + position.lng()) / length\n )\n\n this.calculateBounds()\n }\n }\n }\n\n marker.isAdded = true\n\n this.markers.push(marker)\n\n const mCount = this.markers.length\n\n const maxZoom = this.markerClusterer.getMaxZoom()\n\n if (maxZoom !== null && this.map.getZoom() > maxZoom) {\n // Zoomed in past max zoom, so show the marker.\n if (marker.getMap() !== this.map) {\n marker.setMap(this.map)\n }\n } else if (mCount < this.minClusterSize) {\n // Min cluster size not reached so show the marker.\n if (marker.getMap() !== this.map) {\n marker.setMap(this.map)\n }\n } else if (mCount === this.minClusterSize) {\n // Hide the markers that were showing.\n for (let i = 0; i < mCount; i++) {\n this.markers[i].setMap(null)\n }\n } else {\n marker.setMap(null)\n }\n\n return true\n }\n\n isMarkerInClusterBounds(marker: MarkerExtended): boolean {\n if (this.bounds !== null) {\n const position = marker.getPosition()\n\n if (position) {\n return this.bounds.contains(position)\n }\n }\n\n return false\n }\n\n calculateBounds() {\n this.bounds = this.markerClusterer.getExtendedBounds(\n new google.maps.LatLngBounds(this.center, this.center)\n )\n }\n\n updateIcon() {\n const mCount = this.markers.length\n\n const maxZoom = this.markerClusterer.getMaxZoom()\n\n if (maxZoom !== null && this.map.getZoom() > maxZoom) {\n this.clusterIcon.hide()\n\n return\n }\n\n if (mCount < this.minClusterSize) {\n // Min cluster size not yet reached.\n this.clusterIcon.hide()\n\n return\n }\n\n if (this.center) {\n this.clusterIcon.setCenter(this.center)\n }\n\n this.clusterIcon.useStyle(\n this.markerClusterer.getCalculator()(this.markers, this.markerClusterer.getStyles().length)\n )\n\n this.clusterIcon.show()\n }\n\n isMarkerAlreadyAdded(marker: MarkerExtended): boolean {\n if (this.markers.includes) {\n return this.markers.includes(marker)\n } else {\n for (let i = 0; i < this.markers.length; i++) {\n if (marker === this.markers[i]) {\n return true\n }\n }\n }\n\n return false\n }\n}\n","/* global google */\n/* eslint-disable filenames/match-regex */\nimport { Cluster } from './Cluster'\n\nimport {\n MarkerExtended,\n ClustererOptions,\n ClusterIconStyle,\n TCalculator,\n ClusterIconInfo,\n} from './types'\n\nconst CALCULATOR = function CALCULATOR(\n markers: MarkerExtended[],\n numStyles: number\n): ClusterIconInfo {\n let index = 0\n\n const title = ''\n\n const count = markers.length.toString()\n\n let dv: string | number = count\n\n while (dv !== 0) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n dv = parseInt(dv, 10) / 10\n\n index++\n }\n\n index = Math.min(index, numStyles)\n\n return {\n text: count,\n index: index,\n title: title,\n }\n}\n\nconst BATCH_SIZE = 2000\n\nconst BATCH_SIZE_IE = 500\n\nconst IMAGE_PATH =\n 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'\n\nconst IMAGE_EXTENSION = 'png'\n\nconst IMAGE_SIZES = [53, 56, 66, 78, 90]\n\nconst CLUSTERER_CLASS = 'cluster'\n\nexport class Clusterer {\n markers: MarkerExtended[]\n clusters: Cluster[]\n listeners: google.maps.MapsEventListener[]\n activeMap: google.maps.Map | google.maps.StreetViewPanorama | null\n ready: boolean\n gridSize: number\n minClusterSize: number\n maxZoom: number | null\n styles: ClusterIconStyle[]\n title: string\n zoomOnClick: boolean\n averageCenter: boolean\n ignoreHidden: boolean\n enableRetinaIcons: boolean\n imagePath: string\n imageExtension: string\n imageSizes: number[]\n calculator: TCalculator\n batchSize: number\n batchSizeIE: number\n clusterClass: string\n timerRefStatic: number | null\n\n constructor(\n map: google.maps.Map,\n optMarkers: MarkerExtended[] = [],\n optOptions: ClustererOptions = {}\n ) {\n this.extend(Clusterer, google.maps.OverlayView)\n\n this.markers = []\n this.clusters = []\n this.listeners = []\n this.activeMap = null\n this.ready = false\n this.gridSize = optOptions.gridSize || 60\n this.minClusterSize = optOptions.minimumClusterSize || 2\n this.maxZoom = optOptions.maxZoom || null\n this.styles = optOptions.styles || []\n\n this.title = optOptions.title || ''\n\n this.zoomOnClick = true\n\n if (optOptions.zoomOnClick !== undefined) {\n this.zoomOnClick = optOptions.zoomOnClick\n }\n\n this.averageCenter = false\n\n if (optOptions.averageCenter !== undefined) {\n this.averageCenter = optOptions.averageCenter\n }\n\n this.ignoreHidden = false\n\n if (optOptions.ignoreHidden !== undefined) {\n this.ignoreHidden = optOptions.ignoreHidden\n }\n\n this.enableRetinaIcons = false\n\n if (optOptions.enableRetinaIcons !== undefined) {\n this.enableRetinaIcons = optOptions.enableRetinaIcons\n }\n this.imagePath = optOptions.imagePath || IMAGE_PATH\n\n this.imageExtension = optOptions.imageExtension || IMAGE_EXTENSION\n\n this.imageSizes = optOptions.imageSizes || IMAGE_SIZES\n\n this.calculator = optOptions.calculator || CALCULATOR\n\n this.batchSize = optOptions.batchSize || BATCH_SIZE\n\n this.batchSizeIE = optOptions.batchSizeIE || BATCH_SIZE_IE\n\n this.clusterClass = optOptions.clusterClass || CLUSTERER_CLASS\n\n if (navigator.userAgent.toLowerCase().indexOf('msie') !== -1) {\n // Try to avoid IE timeout when processing a huge number of markers:\n this.batchSize = this.batchSizeIE\n }\n\n this.timerRefStatic = null\n\n this.setupStyles()\n\n this.addMarkers(optMarkers, true)\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.setMap(map) // Note: this causes onAdd to be called\n }\n\n onAdd() {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.activeMap = this.getMap()\n\n this.ready = true\n\n this.repaint()\n\n // Add the map event listeners\n this.listeners = [\n google.maps.event.addListener(\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap(),\n 'zoom_changed',\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n () => {\n this.resetViewport(false)\n // Workaround for this Google bug: when map is at level 0 and \"-\" of\n // zoom slider is clicked, a \"zoom_changed\" event is fired even though\n // the map doesn't zoom out any further. In this situation, no \"idle\"\n // event is triggered so the cluster markers that have been removed\n // do not get redrawn. Same goes for a zoom in at maxZoom.\n if (\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap().getZoom() === (this.get('minZoom') || 0) ||\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap().getZoom() === this.get('maxZoom')\n ) {\n google.maps.event.trigger(this, 'idle')\n }\n }\n ),\n google.maps.event.addListener(\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap(),\n 'idle',\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n () => {\n this.redraw()\n }\n ),\n ]\n }\n\n // eslint-disable-next-line @getify/proper-arrows/this\n onRemove() {\n // Put all the managed markers back on the map:\n for (let i = 0; i < this.markers.length; i++) {\n if (this.markers[i].getMap() !== this.activeMap) {\n this.markers[i].setMap(this.activeMap)\n }\n }\n\n // Remove all clusters:\n for (let i = 0; i < this.clusters.length; i++) {\n this.clusters[i].remove()\n }\n\n this.clusters = []\n\n // Remove map event listeners:\n for (let i = 0; i < this.listeners.length; i++) {\n google.maps.event.removeListener(this.listeners[i])\n }\n\n this.listeners = []\n\n this.activeMap = null\n\n this.ready = false\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n draw() {}\n\n setupStyles() {\n if (this.styles.length > 0) {\n return\n }\n\n for (let i = 0; i < this.imageSizes.length; i++) {\n this.styles.push({\n url: this.imagePath + (i + 1) + '.' + this.imageExtension,\n height: this.imageSizes[i],\n width: this.imageSizes[i],\n })\n }\n }\n\n fitMapToMarkers() {\n const markers = this.getMarkers()\n\n const bounds = new google.maps.LatLngBounds()\n\n for (let i = 0; i < markers.length; i++) {\n const position = markers[i].getPosition()\n if (position) {\n bounds.extend(position)\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap().fitBounds(bounds)\n }\n\n getGridSize(): number {\n return this.gridSize\n }\n\n setGridSize(gridSize: number) {\n this.gridSize = gridSize\n }\n\n getMinimumClusterSize(): number {\n return this.minClusterSize\n }\n\n setMinimumClusterSize(minimumClusterSize: number) {\n this.minClusterSize = minimumClusterSize\n }\n\n getMaxZoom(): number | null {\n return this.maxZoom\n }\n\n setMaxZoom(maxZoom: number) {\n this.maxZoom = maxZoom\n }\n\n getStyles(): ClusterIconStyle[] {\n return this.styles\n }\n\n setStyles(styles: ClusterIconStyle[]) {\n this.styles = styles\n }\n\n getTitle(): string {\n return this.title\n }\n\n setTitle(title: string) {\n this.title = title\n }\n\n getZoomOnClick(): boolean {\n return this.zoomOnClick\n }\n\n setZoomOnClick(zoomOnClick: boolean) {\n this.zoomOnClick = zoomOnClick\n }\n\n getAverageCenter(): boolean {\n return this.averageCenter\n }\n\n setAverageCenter(averageCenter: boolean) {\n this.averageCenter = averageCenter\n }\n\n getIgnoreHidden(): boolean {\n return this.ignoreHidden\n }\n\n setIgnoreHidden(ignoreHidden: boolean) {\n this.ignoreHidden = ignoreHidden\n }\n\n getEnableRetinaIcons(): boolean {\n return this.enableRetinaIcons\n }\n\n setEnableRetinaIcons(enableRetinaIcons: boolean) {\n this.enableRetinaIcons = enableRetinaIcons\n }\n\n getImageExtension(): string {\n return this.imageExtension\n }\n\n setImageExtension(imageExtension: string) {\n this.imageExtension = imageExtension\n }\n\n getImagePath(): string {\n return this.imagePath\n }\n\n setImagePath(imagePath: string) {\n this.imagePath = imagePath\n }\n\n getImageSizes(): number[] {\n return this.imageSizes\n }\n\n setImageSizes(imageSizes: number[]) {\n this.imageSizes = imageSizes\n }\n\n getCalculator(): TCalculator {\n return this.calculator\n }\n\n setCalculator(calculator: TCalculator) {\n this.calculator = calculator\n }\n\n getBatchSizeIE(): number {\n return this.batchSizeIE\n }\n\n setBatchSizeIE(batchSizeIE: number) {\n this.batchSizeIE = batchSizeIE\n }\n\n getClusterClass(): string {\n return this.clusterClass\n }\n\n setClusterClass(clusterClass: string) {\n this.clusterClass = clusterClass\n }\n\n getMarkers(): MarkerExtended[] {\n return this.markers\n }\n\n getTotalMarkers(): number {\n return this.markers.length\n }\n\n getClusters(): Cluster[] {\n return this.clusters\n }\n\n getTotalClusters(): number {\n return this.clusters.length\n }\n\n addMarker(marker: MarkerExtended, optNoDraw: boolean) {\n this.pushMarkerTo(marker)\n\n if (!optNoDraw) {\n this.redraw()\n }\n }\n\n addMarkers(markers: MarkerExtended[], optNoDraw: boolean) {\n for (const key in markers) {\n if (markers.hasOwnProperty(key)) {\n this.pushMarkerTo(markers[key])\n }\n }\n\n if (!optNoDraw) {\n this.redraw()\n }\n }\n\n pushMarkerTo(marker: MarkerExtended) {\n // If the marker is draggable add a listener so we can update the clusters on the dragend:\n if (marker.getDraggable()) {\n // eslint-disable-next-line @getify/proper-arrows/name, @getify/proper-arrows/this\n google.maps.event.addListener(marker, 'dragend', () => {\n if (this.ready) {\n marker.isAdded = false\n\n this.repaint()\n }\n })\n }\n\n marker.isAdded = false\n\n this.markers.push(marker)\n }\n\n removeMarker_(marker: MarkerExtended): boolean {\n let index = -1\n\n if (this.markers.indexOf) {\n index = this.markers.indexOf(marker)\n } else {\n for (let i = 0; i < this.markers.length; i++) {\n if (marker === this.markers[i]) {\n index = i\n\n break\n }\n }\n }\n\n if (index === -1) {\n // Marker is not in our list of markers, so do nothing:\n return false\n }\n\n marker.setMap(null)\n\n this.markers.splice(index, 1) // Remove the marker from the list of managed markers\n\n return true\n }\n\n removeMarker(marker: MarkerExtended, optNoDraw: boolean): boolean {\n const removed = this.removeMarker_(marker)\n\n if (!optNoDraw && removed) {\n this.repaint()\n }\n\n return removed\n }\n\n removeMarkers(markers: MarkerExtended[], optNoDraw: boolean): boolean {\n let removed = false\n\n for (let i = 0; i < markers.length; i++) {\n removed = removed || this.removeMarker_(markers[i])\n }\n\n if (!optNoDraw && removed) {\n this.repaint()\n }\n\n return removed\n }\n\n clearMarkers() {\n this.resetViewport(true)\n\n this.markers = []\n }\n\n repaint() {\n const oldClusters = this.clusters.slice()\n\n this.clusters = []\n\n this.resetViewport(false)\n\n this.redraw()\n\n // Remove the old clusters.\n // Do it in a timeout to prevent blinking effect.\n setTimeout(function timeout() {\n for (let i = 0; i < oldClusters.length; i++) {\n oldClusters[i].remove()\n }\n }, 0)\n }\n\n getExtendedBounds(bounds: google.maps.LatLngBounds): google.maps.LatLngBounds {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n const projection = this.getProjection()\n // Convert the points to pixels and the extend out by the grid size.\n const trPix = projection.fromLatLngToDivPixel(\n // Turn the bounds into latlng.\n new google.maps.LatLng(bounds.getNorthEast().lat(), bounds.getNorthEast().lng())\n )\n\n trPix.x += this.gridSize\n trPix.y -= this.gridSize\n\n const blPix = projection.fromLatLngToDivPixel(\n // Turn the bounds into latlng.\n new google.maps.LatLng(bounds.getSouthWest().lat(), bounds.getSouthWest().lng())\n )\n\n blPix.x -= this.gridSize\n blPix.y += this.gridSize\n\n // Extend the bounds to contain the new bounds.\n bounds.extend(\n // Convert the pixel points back to LatLng nw\n projection.fromDivPixelToLatLng(trPix)\n )\n\n bounds.extend(\n // Convert the pixel points back to LatLng sw\n projection.fromDivPixelToLatLng(blPix)\n )\n\n return bounds\n }\n\n redraw() {\n // Redraws all the clusters.\n this.createClusters(0)\n }\n\n resetViewport(optHide: boolean) {\n // Remove all the clusters\n for (let i = 0; i < this.clusters.length; i++) {\n this.clusters[i].remove()\n }\n\n this.clusters = []\n\n // Reset the markers to not be added and to be removed from the map.\n for (let i = 0; i < this.markers.length; i++) {\n const marker = this.markers[i]\n\n marker.isAdded = false\n\n if (optHide) {\n marker.setMap(null)\n }\n }\n }\n\n distanceBetweenPoints(p1: google.maps.LatLng, p2: google.maps.LatLng): number {\n const R = 6371 // Radius of the Earth in km\n\n const dLat = ((p2.lat() - p1.lat()) * Math.PI) / 180\n const dLon = ((p2.lng() - p1.lng()) * Math.PI) / 180\n\n const a =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos((p1.lat() * Math.PI) / 180) *\n Math.cos((p2.lat() * Math.PI) / 180) *\n Math.sin(dLon / 2) *\n Math.sin(dLon / 2)\n\n return R * (2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)))\n }\n\n isMarkerInBounds(marker: MarkerExtended, bounds: google.maps.LatLngBounds): boolean {\n const position = marker.getPosition()\n\n if (position) {\n return bounds.contains(position)\n }\n\n return false\n }\n\n addToClosestCluster(marker: MarkerExtended) {\n let cluster\n\n let distance = 40000 // Some large number\n\n let clusterToAddTo = null\n\n for (let i = 0; i < this.clusters.length; i++) {\n cluster = this.clusters[i]\n\n const center = cluster.getCenter()\n\n const position = marker.getPosition()\n\n if (center && position) {\n const d = this.distanceBetweenPoints(center, position)\n\n if (d < distance) {\n distance = d\n\n clusterToAddTo = cluster\n }\n }\n }\n\n if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\n clusterToAddTo.addMarker(marker)\n } else {\n cluster = new Cluster(this)\n\n cluster.addMarker(marker)\n\n this.clusters.push(cluster)\n }\n }\n\n createClusters(iFirst: number) {\n if (!this.ready) {\n return\n }\n\n // Cancel previous batch processing if we're working on the first batch:\n if (iFirst === 0) {\n /**\n * This event is fired when the Clusterer begins\n * clustering markers.\n * @name Clusterer#clusteringbegin\n * @param {Clusterer} mc The Clusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringbegin', this)\n\n if (this.timerRefStatic !== null) {\n window.clearTimeout(this.timerRefStatic)\n\n delete this.timerRefStatic\n }\n }\n\n // Get our current map view bounds.\n // Create a new bounds object so we don't affect the map.\n //\n // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug:\n const mapBounds =\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap().getZoom() > 3\n ? new google.maps.LatLngBounds(\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap()\n .getBounds()\n .getSouthWest(),\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap()\n .getBounds()\n .getNorthEast()\n )\n : new google.maps.LatLngBounds(\n new google.maps.LatLng(85.02070771743472, -178.48388434375),\n new google.maps.LatLng(-85.08136444384544, 178.00048865625)\n )\n\n const bounds = this.getExtendedBounds(mapBounds)\n\n const iLast = Math.min(iFirst + this.batchSize, this.markers.length)\n\n for (let i = iFirst; i < iLast; i++) {\n const marker = this.markers[i]\n\n if (!marker.isAdded && this.isMarkerInBounds(marker, bounds)) {\n if (!this.ignoreHidden || (this.ignoreHidden && marker.getVisible())) {\n this.addToClosestCluster(marker)\n }\n }\n }\n\n if (iLast < this.markers.length) {\n this.timerRefStatic = window.setTimeout(\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n () => {\n this.createClusters(iLast)\n },\n 0\n )\n } else {\n this.timerRefStatic = null\n\n /**\n * This event is fired when the Clusterer stops\n * clustering markers.\n * @name Clusterer#clusteringend\n * @param {Clusterer} mc The Clusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringend', this)\n\n for (let i = 0; i < this.clusters.length; i++) {\n this.clusters[i].updateIcon()\n }\n }\n }\n\n extend(obj1: any, obj2: any): any {\n return function applyExtend(object: any) {\n // eslint-disable-next-line guard-for-in\n for (const property in object.prototype) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.prototype[property] = object.prototype[property]\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n return this\n }.apply(obj1, [obj2])\n }\n}\n","/* global google */\n/* eslint-disable filenames/match-regex */\nimport { InfoBoxOptions } from './types'\n\nexport class InfoBox {\n content: string | Node\n disableAutoPan: boolean\n maxWidth: number\n pixelOffset: google.maps.Size\n position: google.maps.LatLng\n zIndex: number | undefined | null\n boxClass: string\n boxStyle: {\n [key: string]: any\n }\n closeBoxMargin: string\n closeBoxURL: string\n infoBoxClearance: google.maps.Size\n isHidden: boolean\n alignBottom: boolean\n pane: string\n enableEventPropagation: boolean\n div: HTMLDivElement | null\n closeListener: google.maps.MapsEventListener | null\n moveListener: google.maps.MapsEventListener | null\n mapListener: google.maps.MapsEventListener | null\n contextListener: google.maps.MapsEventListener | null\n eventListeners: google.maps.MapsEventListener[] | null\n fixedWidthSet: boolean | null\n\n constructor(options: InfoBoxOptions = {}) {\n this.extend(InfoBox, google.maps.OverlayView)\n\n // Standard options (in common with google.maps.InfoWindow):\n this.content = options.content || ''\n this.disableAutoPan = options.disableAutoPan || false\n this.maxWidth = options.maxWidth || 0\n this.pixelOffset = options.pixelOffset || new google.maps.Size(0, 0)\n this.position = options.position || new google.maps.LatLng(0, 0)\n this.zIndex = options.zIndex || null\n\n // Additional options (unique to InfoBox):\n this.boxClass = options.boxClass || 'infoBox'\n this.boxStyle = options.boxStyle || {}\n this.closeBoxMargin = options.closeBoxMargin || '2px'\n this.closeBoxURL = options.closeBoxURL || 'http://www.google.com/intl/en_us/mapfiles/close.gif'\n if (options.closeBoxURL === '') {\n this.closeBoxURL = ''\n }\n this.infoBoxClearance = options.infoBoxClearance || new google.maps.Size(1, 1)\n\n if (typeof options.visible === 'undefined') {\n if (typeof options.isHidden === 'undefined') {\n options.visible = true\n } else {\n options.visible = !options.isHidden\n }\n }\n this.isHidden = !options.visible\n\n this.alignBottom = options.alignBottom || false\n this.pane = options.pane || 'floatPane'\n this.enableEventPropagation = options.enableEventPropagation || false\n\n this.div = null\n this.closeListener = null\n this.moveListener = null\n this.mapListener = null\n this.contextListener = null\n this.eventListeners = null\n this.fixedWidthSet = null\n }\n\n createInfoBoxDiv(): void {\n // This handler prevents an event in the InfoBox from being passed on to the map.\n function cancelHandler(event: Event) {\n event.cancelBubble = true\n if (event.stopPropagation) {\n event.stopPropagation()\n }\n }\n\n // This handler ignores the current event in the InfoBox and conditionally prevents\n // the event from being passed on to the map. It is used for the contextmenu event.\n // eslint-disable-next-line @getify/proper-arrows/this\n const ignoreHandler = (event: Event) => {\n event.returnValue = false\n\n if (event.preventDefault) {\n event.preventDefault()\n }\n\n if (!this.enableEventPropagation) {\n cancelHandler(event)\n }\n }\n\n if (!this.div) {\n this.div = document.createElement('div')\n this.setBoxStyle()\n\n if (typeof this.content === 'string') {\n this.div.innerHTML = this.getCloseBoxImg() + this.content\n } else {\n this.div.innerHTML = this.getCloseBoxImg()\n this.div.appendChild(this.content)\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n const panes = this.getPanes()\n panes[this.pane].appendChild(this.div) // Add the InfoBox div to the DOM\n\n this.addClickHandler()\n\n if (this.div.style.width) {\n this.fixedWidthSet = true\n } else {\n if (this.maxWidth !== 0 && this.div.offsetWidth > this.maxWidth) {\n this.div.style.width = this.maxWidth + 'px'\n this.fixedWidthSet = true\n } else {\n // The following code is needed to overcome problems with MSIE\n const bw = this.getBoxWidths()\n this.div.style.width = this.div.offsetWidth - bw.left - bw.right + 'px'\n this.fixedWidthSet = false\n }\n }\n\n this.panBox(this.disableAutoPan)\n\n if (!this.enableEventPropagation) {\n this.eventListeners = []\n\n // Cancel event propagation.\n // Note: mousemove not included (to resolve Issue 152)\n const events = [\n 'mousedown',\n 'mouseover',\n 'mouseout',\n 'mouseup',\n 'click',\n 'dblclick',\n 'touchstart',\n 'touchend',\n 'touchmove',\n ]\n\n for (let i = 0; i < events.length; i++) {\n this.eventListeners.push(\n google.maps.event.addDomListener(this.div, events[i], cancelHandler)\n )\n }\n\n // Workaround for Google bug that causes the cursor to change to a pointer\n // when the mouse moves over a marker underneath InfoBox.\n this.eventListeners.push(\n google.maps.event.addDomListener(\n this.div,\n 'mouseover',\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n () => {\n if (this.div) {\n this.div.style.cursor = 'default'\n }\n }\n )\n )\n }\n\n this.contextListener = google.maps.event.addDomListener(\n this.div,\n 'contextmenu',\n ignoreHandler\n )\n\n /**\n * This event is fired when the DIV containing the InfoBox's content is attached to the DOM.\n * @name InfoBox#domready\n * @event\n */\n google.maps.event.trigger(this, 'domready')\n }\n }\n\n getCloseBoxImg(): string {\n let img = ''\n\n if (this.closeBoxURL !== '') {\n img = '\"\"'\n\"\n }\n\n return img\n }\n\n addClickHandler(): void {\n if (this.div && this.div.firstChild && this.closeBoxURL !== '') {\n const closeBox = this.div.firstChild\n this.closeListener = google.maps.event.addDomListener(\n closeBox,\n 'click',\n this.getCloseClickHandler()\n )\n } else {\n this.closeListener = null\n }\n }\n\n getCloseClickHandler() {\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n return (event: Event) => {\n // 1.0.3 fix: Always prevent propagation of a close box click to the map:\n event.cancelBubble = true\n\n if (event.stopPropagation) {\n event.stopPropagation()\n }\n\n /**\n * This event is fired when the InfoBox's close box is clicked.\n * @name InfoBox#closeclick\n * @event\n */\n google.maps.event.trigger(this, 'closeclick')\n\n this.close()\n }\n }\n\n panBox(disablePan?: boolean): void {\n if (this.div && !disablePan) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n const map: google.maps.Map | google.maps.StreetViewPanorama | null | undefined = this.getMap()\n\n // Only pan if attached to map, not panorama\n if (map instanceof google.maps.Map) {\n let xOffset = 0\n let yOffset = 0\n\n const bounds = map.getBounds()\n if (bounds && !bounds.contains(this.position)) {\n // Marker not in visible area of map, so set center\n // of map to the marker position first.\n map.setCenter(this.position)\n }\n\n const mapDiv = map.getDiv()\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n const mapWidth = mapDiv.offsetWidth\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n const mapHeight = mapDiv.offsetHeight\n const iwOffsetX = this.pixelOffset.width\n const iwOffsetY = this.pixelOffset.height\n const iwWidth = this.div.offsetWidth\n const iwHeight = this.div.offsetHeight\n const padX = this.infoBoxClearance.width\n const padY = this.infoBoxClearance.height\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n const projection: google.maps.MapCanvasProjection = this.getProjection()\n const pixPosition = projection.fromLatLngToContainerPixel(this.position)\n\n if (pixPosition.x < -iwOffsetX + padX) {\n xOffset = pixPosition.x + iwOffsetX - padX\n } else if (pixPosition.x + iwWidth + iwOffsetX + padX > mapWidth) {\n xOffset = pixPosition.x + iwWidth + iwOffsetX + padX - mapWidth\n }\n if (this.alignBottom) {\n if (pixPosition.y < -iwOffsetY + padY + iwHeight) {\n yOffset = pixPosition.y + iwOffsetY - padY - iwHeight\n } else if (pixPosition.y + iwOffsetY + padY > mapHeight) {\n yOffset = pixPosition.y + iwOffsetY + padY - mapHeight\n }\n } else {\n if (pixPosition.y < -iwOffsetY + padY) {\n yOffset = pixPosition.y + iwOffsetY - padY\n } else if (pixPosition.y + iwHeight + iwOffsetY + padY > mapHeight) {\n yOffset = pixPosition.y + iwHeight + iwOffsetY + padY - mapHeight\n }\n }\n\n if (!(xOffset === 0 && yOffset === 0)) {\n // Move the map to the shifted center.\n map.panBy(xOffset, yOffset)\n }\n }\n }\n }\n\n setBoxStyle(): void {\n if (this.div) {\n // Apply style values from the style sheet defined in the boxClass parameter:\n this.div.className = this.boxClass\n\n // Clear existing inline style values:\n this.div.style.cssText = ''\n\n // Apply style values defined in the boxStyle parameter:\n const boxStyle = this.boxStyle\n for (const i in boxStyle) {\n if (boxStyle.hasOwnProperty(i)) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.div.style[i] = boxStyle[i]\n }\n }\n\n // Fix for iOS disappearing InfoBox problem\n // See http://stackoverflow.com/questions/9229535/google-maps-markers-disappear-at-certain-zoom-level-only-on-iphone-ipad\n this.div.style.webkitTransform = 'translateZ(0)'\n\n // Fix up opacity style for benefit of MSIE\n if (typeof this.div.style.opacity !== 'undefined' && this.div.style.opacity !== '') {\n // See http://www.quirksmode.org/css/opacity.html\n const opacity = parseFloat(this.div.style.opacity || '')\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.div.style.msFilter =\n '\"progid:DXImageTransform.Microsoft.Alpha(Opacity=' + opacity * 100 + ')\"'\n this.div.style.filter = 'alpha(opacity=' + opacity * 100 + ')'\n }\n\n // Apply required styles\n this.div.style.position = 'absolute'\n this.div.style.visibility = 'hidden'\n if (this.zIndex !== null) {\n this.div.style.zIndex = this.zIndex + ''\n }\n if (!this.div.style.overflow) {\n this.div.style.overflow = 'auto'\n }\n }\n }\n\n getBoxWidths(): { bottom: number; left: number; right: number; top: number } {\n const bw = { top: 0, bottom: 0, left: 0, right: 0 }\n\n if (!this.div) {\n return bw\n }\n\n if (document.defaultView && document.defaultView.getComputedStyle) {\n const ownerDocument = this.div.ownerDocument\n const computedStyle =\n ownerDocument && ownerDocument.defaultView\n ? ownerDocument.defaultView.getComputedStyle(this.div, '')\n : null\n\n if (computedStyle) {\n // The computed styles are always in pixel units (good!)\n bw.top = parseInt(computedStyle.borderTopWidth || '', 10) || 0\n bw.bottom = parseInt(computedStyle.borderBottomWidth || '', 10) || 0\n bw.left = parseInt(computedStyle.borderLeftWidth || '', 10) || 0\n bw.right = parseInt(computedStyle.borderRightWidth || '', 10) || 0\n }\n } else if (\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n document.documentElement.currentStyle // MSIE\n ) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n const currentStyle = this.div.currentStyle\n\n if (currentStyle) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // The current styles may not be in pixel units, but assume they are (bad!)\n bw.top = parseInt(currentStyle.borderTopWidth || '', 10) || 0\n bw.bottom = parseInt(currentStyle.borderBottomWidth || '', 10) || 0\n bw.left = parseInt(currentStyle.borderLeftWidth || '', 10) || 0\n bw.right = parseInt(currentStyle.borderRightWidth || '', 10) || 0\n }\n }\n\n return bw\n }\n\n onRemove(): void {\n if (this.div && this.div.parentNode) {\n this.div.parentNode.removeChild(this.div)\n this.div = null\n }\n }\n\n draw(): void {\n this.createInfoBoxDiv()\n\n if (this.div) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n const projection: google.maps.MapCanvasProjection = this.getProjection()\n const pixPosition = projection.fromLatLngToDivPixel(this.position)\n\n this.div.style.left = pixPosition.x + this.pixelOffset.width + 'px'\n\n if (this.alignBottom) {\n this.div.style.bottom = -(pixPosition.y + this.pixelOffset.height) + 'px'\n } else {\n this.div.style.top = pixPosition.y + this.pixelOffset.height + 'px'\n }\n\n if (this.isHidden) {\n this.div.style.visibility = 'hidden'\n } else {\n this.div.style.visibility = 'visible'\n }\n }\n }\n\n setOptions(options: InfoBoxOptions = {}): void {\n if (typeof options.boxClass !== 'undefined') {\n // Must be first\n this.boxClass = options.boxClass\n this.setBoxStyle()\n }\n if (typeof options.boxStyle !== 'undefined') {\n // Must be second\n this.boxStyle = options.boxStyle\n this.setBoxStyle()\n }\n if (typeof options.content !== 'undefined') {\n this.setContent(options.content)\n }\n if (typeof options.disableAutoPan !== 'undefined') {\n this.disableAutoPan = options.disableAutoPan\n }\n if (typeof options.maxWidth !== 'undefined') {\n this.maxWidth = options.maxWidth\n }\n if (typeof options.pixelOffset !== 'undefined') {\n this.pixelOffset = options.pixelOffset\n }\n if (typeof options.alignBottom !== 'undefined') {\n this.alignBottom = options.alignBottom\n }\n if (typeof options.position !== 'undefined') {\n this.setPosition(options.position)\n }\n if (typeof options.zIndex !== 'undefined') {\n this.setZIndex(options.zIndex)\n }\n if (typeof options.closeBoxMargin !== 'undefined') {\n this.closeBoxMargin = options.closeBoxMargin\n }\n if (typeof options.closeBoxURL !== 'undefined') {\n this.closeBoxURL = options.closeBoxURL\n }\n if (typeof options.infoBoxClearance !== 'undefined') {\n this.infoBoxClearance = options.infoBoxClearance\n }\n if (typeof options.isHidden !== 'undefined') {\n this.isHidden = options.isHidden\n }\n if (typeof options.visible !== 'undefined') {\n this.isHidden = !options.visible\n }\n if (typeof options.enableEventPropagation !== 'undefined') {\n this.enableEventPropagation = options.enableEventPropagation\n }\n\n if (this.div) {\n this.draw()\n }\n }\n\n setContent(content: string | Node): void {\n this.content = content\n\n if (this.div) {\n if (this.closeListener) {\n google.maps.event.removeListener(this.closeListener)\n this.closeListener = null\n }\n\n // Odd code required to make things work with MSIE.\n if (!this.fixedWidthSet) {\n this.div.style.width = ''\n }\n\n if (typeof content === 'string') {\n this.div.innerHTML = this.getCloseBoxImg() + content\n } else {\n this.div.innerHTML = this.getCloseBoxImg()\n this.div.appendChild(content)\n }\n\n // Perverse code required to make things work with MSIE.\n // (Ensures the close box does, in fact, float to the right.)\n if (!this.fixedWidthSet) {\n this.div.style.width = this.div.offsetWidth + 'px'\n if (typeof content === 'string') {\n this.div.innerHTML = this.getCloseBoxImg() + content\n } else {\n this.div.innerHTML = this.getCloseBoxImg()\n this.div.appendChild(content)\n }\n }\n\n this.addClickHandler()\n }\n\n /**\n * This event is fired when the content of the InfoBox changes.\n * @name InfoBox#content_changed\n * @event\n */\n google.maps.event.trigger(this, 'content_changed')\n }\n\n setPosition(latLng: google.maps.LatLng): void {\n this.position = latLng\n\n if (this.div) {\n this.draw()\n }\n\n /**\n * This event is fired when the position of the InfoBox changes.\n * @name InfoBox#position_changed\n * @event\n */\n google.maps.event.trigger(this, 'position_changed')\n }\n\n setVisible(isVisible: boolean): void {\n this.isHidden = !isVisible\n if (this.div) {\n this.div.style.visibility = this.isHidden ? 'hidden' : 'visible'\n }\n }\n\n setZIndex(index: number): void {\n this.zIndex = index\n\n if (this.div) {\n this.div.style.zIndex = index + ''\n }\n\n /**\n * This event is fired when the zIndex of the InfoBox changes.\n * @name InfoBox#zindex_changed\n * @event\n */\n google.maps.event.trigger(this, 'zindex_changed')\n }\n\n getContent(): string | Node {\n return this.content\n }\n\n getPosition(): google.maps.LatLng {\n return this.position\n }\n\n getZIndex(): number | null | undefined {\n return this.zIndex\n }\n\n getVisible(): boolean {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n const map: google.maps.Map | google.maps.StreetViewPanorama | null | undefined = this.getMap()\n let isVisible\n\n if (typeof map === 'undefined' || map === null) {\n isVisible = false\n } else {\n isVisible = !this.isHidden\n }\n\n return isVisible\n }\n\n show(): void {\n this.isHidden = false\n if (this.div) {\n this.div.style.visibility = 'visible'\n }\n }\n\n hide(): void {\n this.isHidden = true\n if (this.div) {\n this.div.style.visibility = 'hidden'\n }\n }\n\n open(\n map: google.maps.Map | google.maps.StreetViewPanorama,\n anchor?: google.maps.MVCObject\n ): void {\n if (anchor) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.position = anchor.getPosition()\n this.moveListener = google.maps.event.addListener(\n anchor,\n 'position_changed',\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n () => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n const position = anchor.getPosition()\n this.setPosition(position)\n }\n )\n\n this.mapListener = google.maps.event.addListener(\n anchor,\n 'map_changed',\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n () => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.setMap(anchor.map)\n }\n )\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.setMap(map)\n\n if (this.div) {\n this.panBox()\n }\n }\n\n close() {\n if (this.closeListener) {\n google.maps.event.removeListener(this.closeListener)\n this.closeListener = null\n }\n\n if (this.eventListeners) {\n for (let i = 0; i < this.eventListeners.length; i++) {\n google.maps.event.removeListener(this.eventListeners[i])\n }\n this.eventListeners = null\n }\n\n if (this.moveListener) {\n google.maps.event.removeListener(this.moveListener)\n this.moveListener = null\n }\n\n if (this.mapListener) {\n google.maps.event.removeListener(this.mapListener)\n this.mapListener = null\n }\n\n if (this.contextListener) {\n google.maps.event.removeListener(this.contextListener)\n this.contextListener = null\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.setMap(null)\n }\n\n extend(obj1: any, obj2: any): any {\n return function applyExtend(object: any) {\n // eslint-disable-next-line guard-for-in\n for (const property in object.prototype) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n if (!this.prototype.hasOwnProperty(property)) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.prototype[property] = object.prototype[property]\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n return this\n }.apply(obj1, [obj2])\n }\n}\n","// React core\r\nimport React, {\r\n ChangeEvent,\r\n FunctionComponent,\r\n useContext,\r\n useEffect,\r\n useRef,\r\n useState\r\n} from \"react\";\r\n\r\n// Vendor\r\nimport cx from \"classnames\";\r\nimport \"devbridge-autocomplete\"; // This is used on the site - using it here for consistency and to avoid bloating the code\r\nimport $ from \"jquery\";\r\n\r\nimport { initialize } from \"../../../../input\";\r\nimport { initializeSelectBox } from \"../../../../selectbox\";\r\n\r\n// App\r\nimport SVGIcon from \"../../../components/SVGIcon\";\r\nimport autocomplete, {\r\n geocodeLatLngToCountry,\r\n getPlaceLatLngAndCountry\r\n} from \"../../../services/maps/autocomplete\";\r\nimport { createBrowserLocationResult } from \"../../../utils/maps\";\r\nimport { ILocationResult, ILocationSearch } from \"../../types\";\r\nimport { ConfigContext, ThemeContext } from \"../../utils/context\";\r\n\r\nconst LocationSearch: FunctionComponent = ({\r\n searchTerm,\r\n className,\r\n id,\r\n onSelect,\r\n onSelectLatLngAndCountry,\r\n isWidget,\r\n backgroundTheme,\r\n simpleResults,\r\n storelabels\r\n}) => {\r\n const inputEl = useRef(null);\r\n const inputParentEl = useRef(null);\r\n const [currValue, setCurrValue] = useState(searchTerm);\r\n const [browserLocation, setBrowserLocation] = useState(false);\r\n const [locationError, setLocationError] = useState(false);\r\n\r\n const attrContainer = useRef(null);\r\n const placesService = useRef(null);\r\n const geocoderService = useRef();\r\n const sessionToken = useRef();\r\n // determine if location has been set already to prevent it running twice fix for ios.\r\n const [BrowserLocationRan, setBrowserLocationRan] = useState(false);\r\n\r\n const theme =\r\n backgroundTheme !== \"\" ? backgroundTheme : useContext(ThemeContext);\r\n const {\r\n labels,\r\n labels: { usingMyLocationLabel, clearAllLabel, useMyLocationLabel },\r\n latitude,\r\n longitude,\r\n locationErrorText\r\n } = useContext(ConfigContext);\r\n const enterSearchStoreLabel =\r\n labels.enterSearchStoreLabel || \"Enter country, town or postcode\"; // only hardcoding this because it's used as an h1 on the page and can't be blank.\r\n\r\n useEffect(() => {\r\n if (inputEl && inputEl.current) {\r\n $(inputEl.current).off();\r\n initializeSelectBox();\r\n initialize();\r\n $(inputEl.current).autocomplete({\r\n minChars: 3,\r\n autoSelectFirst: true,\r\n appendTo: inputParentEl.current, // attach to container instead of document body so we can add wrapper for styling\r\n forceFixPosition: true, // ensure dropdown is positioned below the field (no need to force it with our styles)\r\n triggerSelectOnValidInput: false, // stop selecting a value when clicking into the field & there's only one suggestion (which in our case would not allow changing the query at all)\r\n lookup: async (query: string, done: any) => {\r\n if (usingMyLocationLabel && query.includes(usingMyLocationLabel)) {\r\n return;\r\n }\r\n const results = await getResults(query);\r\n const suggestions: AutocompleteResponse = {\r\n suggestions: results\r\n ? results.map((res: any) => {\r\n return {\r\n value: res.name,\r\n data: res.id\r\n };\r\n })\r\n : []\r\n };\r\n done(suggestions);\r\n },\r\n onSelect: async (suggestion: AutocompleteSuggestion) => {\r\n const val = suggestion.value;\r\n if (attrContainer.current && !placesService.current) {\r\n placesService.current = new window.google.maps.places.PlacesService(\r\n attrContainer.current\r\n );\r\n }\r\n if (placesService.current && sessionToken.current) {\r\n const latLngAndCountry = await getPlaceLatLngAndCountry(\r\n placesService.current,\r\n suggestion.data,\r\n sessionToken.current\r\n );\r\n const { lat, lng, regionCode } = latLngAndCountry;\r\n if (lat && lng) {\r\n onSelectLatLngAndCountry({ lat, lng, regionCode });\r\n }\r\n }\r\n setCurrValue(val);\r\n onSelect(val);\r\n }\r\n });\r\n }\r\n }, [searchTerm]);\r\n const getResults = async (input: string): Promise => {\r\n if (!sessionToken.current) {\r\n sessionToken.current = new window.google.maps.places.AutocompleteSessionToken();\r\n }\r\n try {\r\n const results = await autocomplete(\r\n input,\r\n sessionToken.current as google.maps.places.AutocompleteSessionToken,\r\n parseFloat(latitude as any),\r\n parseFloat(longitude as any)\r\n );\r\n setLocationError(false);\r\n return results;\r\n } catch (e) {\r\n return [];\r\n }\r\n };\r\n useEffect(() => {\r\n // Only apply this if user agreed to use their location\r\n if (currValue && currValue.length) {\r\n setBrowserLocation(false);\r\n }\r\n }, [currValue]);\r\n const handleChange = (e: ChangeEvent) => {\r\n const val = e.currentTarget.value;\r\n setCurrValue(val);\r\n if (!val) {\r\n setBrowserLocation(true);\r\n }\r\n };\r\n const handleFieldClick = (e: any) => {\r\n if (!e.currentTarget.value.length) {\r\n setBrowserLocation(true);\r\n }\r\n };\r\n\r\n const handleUseBrowserLocation = (\r\n event: React.MouseEvent\r\n ) => {\r\n event.preventDefault();\r\n navigator.geolocation.getCurrentPosition(\r\n async position => {\r\n const result: ILocationResult = createBrowserLocationResult({\r\n lat: position.coords.latitude,\r\n lng: position.coords.longitude\r\n });\r\n if (result && result.latLng) {\r\n $(inputEl!.current!).focus(); // focus so that the label animates up\r\n setCurrValue(usingMyLocationLabel);\r\n setBrowserLocation(false); \r\n setLocationError(false);\r\n if (attrContainer.current && !geocoderService.current) {\r\n geocoderService.current = new window.google.maps.Geocoder(\r\n attrContainer.current\r\n );\r\n const regionCode = await geocodeLatLngToCountry(\r\n geocoderService.current as google.maps.Geocoder,\r\n result.latLng.lat,\r\n result.latLng.lng\r\n );\r\n onSelectLatLngAndCountry({\r\n ...result.latLng,\r\n regionCode\r\n });\r\n }\r\n }\r\n },\r\n () => {\r\n setLocationError(true); \r\n setCurrValue(\"\");\r\n setBrowserLocation(false);\r\n onSelectLatLngAndCountry();\r\n }\r\n );\r\n };\r\n const handleBlur = (e: any) => {\r\n if (e.relatedTarget && e.relatedTarget.id === \"faux-suggestion\") {\r\n setBrowserLocation(true); \r\n setBrowserLocationRan(true);\r\n return;\r\n }\r\n };\r\n const handleInputBlur = (e: any) => {\r\n // if setBrowserLocation has run already dont run again\r\n if (BrowserLocationRan) {\r\n setBrowserLocation(false);\r\n } else {\r\n setBrowserLocation(true); \r\n }\r\n };\r\n const clearSearch = () => {\r\n setCurrValue(\"\");\r\n if (inputEl.current) {\r\n inputEl.current.focus();\r\n }\r\n };\r\n const handleSubmit = (event: React.FormEvent) => {\r\n event.preventDefault();\r\n };\r\n const renderFieldIcon = () => (\r\n // Using style here rather than rendering / not rendering as it seems to save subsequent requests for the sprite\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n\r\n {renderFieldIcon()}\r\n {browserLocation && (\r\n \r\n {!!storelabels && !!storelabels.useMyLocationLabel ? storelabels.useMyLocationLabel : labels.useMyLocationLabel}\r\n \r\n )}\r\n {locationError && (\r\n
{locationErrorText}
\r\n )}\r\n
\r\n {/* TODO: Put inside the below statement if when using the map component */}\r\n
\r\n {isWidget &&\r\n {\r\n /* */\r\n }}\r\n \r\n );\r\n};\r\n\r\nexport default LocationSearch;\r\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _objectSpread;\nvar _defineProperty = _interopRequireDefault(require(\"./_define_property\"));\nfunction _objectSpread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n (0, _defineProperty).default(target, key, source[key]);\n });\n }\n return target;\n}\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _defineProperty;\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n","import { ILatLng, ILocation, ILocationResult } from \"../../store-search/types\";\r\n\r\nconst autocomplete = async (\r\n input: string,\r\n sessionToken: google.maps.places.AutocompleteSessionToken,\r\n lat?: number,\r\n lng?: number,\r\n biasRadiusInMetres: number = 1000000 // default to 1000km\r\n): Promise => {\r\n const biasLocation: ILatLng = {\r\n lat: lat || 51.509865,\r\n lng: lng || -0.118092\r\n }; // lat & lng for current region (defaults to UK)\r\n const promise = new Promise((resolve, reject) => {\r\n const autocompleteService = new window.google.maps.places.AutocompleteService();\r\n try {\r\n autocompleteService.getPlacePredictions(\r\n {\r\n input,\r\n location:\r\n biasLocation && biasRadiusInMetres\r\n ? new window.google.maps.LatLng(biasLocation)\r\n : undefined,\r\n radius:\r\n biasLocation && biasRadiusInMetres ? biasRadiusInMetres : undefined,\r\n sessionToken,\r\n types: [\"geocode\"]\r\n },\r\n (\r\n results: google.maps.places.AutocompletePrediction[],\r\n status: google.maps.places.PlacesServiceStatus\r\n ) => {\r\n if (\r\n status === window.google.maps.places.PlacesServiceStatus.OK &&\r\n results\r\n ) {\r\n const autcompleteResults = results.map(\r\n (r): ILocationResult => ({\r\n id: r.place_id,\r\n name: r.description,\r\n sessionToken,\r\n type: \"location\"\r\n })\r\n );\r\n resolve(autcompleteResults);\r\n } else {\r\n reject(status);\r\n }\r\n }\r\n );\r\n } catch (e) {\r\n console.error(e);\r\n reject(e);\r\n }\r\n });\r\n return promise;\r\n};\r\n\r\nexport const getPlaceLatLngAndCountry = async (\r\n placesService: google.maps.places.PlacesService,\r\n placeId: string,\r\n sessionToken: google.maps.places.AutocompleteSessionToken\r\n) => {\r\n const promise = new Promise((resolve, reject) => {\r\n // tslint:disable-next-line: no-undef\r\n placesService.getDetails(\r\n {\r\n fields: [\r\n \"geometry.location\",\r\n \"address_component.short_name\",\r\n \"address_component.types\"\r\n ],\r\n placeId,\r\n sessionToken\r\n },\r\n (result, status) => {\r\n if (\r\n status === window.google.maps.places.PlacesServiceStatus.OK &&\r\n result &&\r\n result.geometry\r\n ) {\r\n const regionCode = (result.address_components &&\r\n result.address_components.find(\r\n (comp: any) =>\r\n comp.types.includes(\"administrative_area_level_1\") &&\r\n comp.short_name === \"Northern Ireland\"\r\n )) ||\r\n (result.address_components &&\r\n result.address_components.find((comp: any) =>\r\n comp.types.includes(\"country\")\r\n )) || { short_name: \"-1\" };\r\n\r\n resolve({\r\n lat: result.geometry.location.lat(),\r\n lng: result.geometry.location.lng(),\r\n regionCode:\r\n regionCode.short_name === \"Northern Ireland\"\r\n ? \"NI\"\r\n : regionCode.short_name\r\n });\r\n } else {\r\n reject(status);\r\n }\r\n }\r\n );\r\n });\r\n return promise;\r\n};\r\n\r\nexport const geocodeLatLngToCountry = async (\r\n geocoderService: google.maps.Geocoder,\r\n lat: number,\r\n lng: number\r\n) => {\r\n const promise = new Promise((resolve, reject) => {\r\n geocoderService.geocode(\r\n {\r\n location: { lat, lng }\r\n },\r\n (results, status) => {\r\n if (\r\n status === window.google.maps.places.PlacesServiceStatus.OK &&\r\n results\r\n ) {\r\n const region = results.find(res => res.types.includes(\"country\"));\r\n const regionCode = (region && region.address_components[0]) || {\r\n short_name: \"-1\"\r\n };\r\n resolve(regionCode.short_name);\r\n } else {\r\n reject(status);\r\n }\r\n }\r\n );\r\n });\r\n return promise;\r\n};\r\n\r\nexport default autocomplete;\r\n","import { ILatLng, ILocationResult, IStore } from \"../store-search/types\";\r\n\r\nexport type fitBoundsFn = (\r\n bounds: google.maps.LatLngBounds,\r\n padding?: number | google.maps.Padding\r\n) => void;\r\n\r\n// Fit map to bounds, see https://github.com/google-map-react/google-map-react-examples/blob/master/src/examples/Main.js#L36\r\nexport const getMapBounds = (locations: IStore[]) => {\r\n const bounds = new window.google.maps.LatLngBounds();\r\n locations.map(\r\n (l: IStore): google.maps.LatLngBounds =>\r\n bounds.extend(new window.google.maps.LatLng(l.lat, l.lng))\r\n );\r\n return bounds;\r\n};\r\n\r\n// Fit map to its bounds after the api is loaded\r\nexport const fitMapToLocations = (\r\n map: google.maps.Map | null,\r\n locations: IStore[],\r\n padding?: number | google.maps.Padding\r\n) => {\r\n // Get bounds by all locations\r\n if (map) {\r\n const bounds = getMapBounds(locations);\r\n if (locations.length === 1) {\r\n map.fitBounds(bounds, padding);\r\n map.setZoom(13); // zoom out a bit so that location is shown with its surroundings\r\n return;\r\n }\r\n map.fitBounds(bounds, padding);\r\n }\r\n};\r\n\r\nexport const isValidLatLng = ({ lat, lng }: ILatLng): boolean => {\r\n const latIsNaN = Number.isNaN(Number.parseFloat(lat.toString())); // TS will complain about parseFloat() called on a number\r\n const lngIsNaN = Number.isNaN(Number.parseFloat(lng.toString()));\r\n if (latIsNaN || lngIsNaN) {\r\n return false;\r\n }\r\n return lat <= 90 && lat >= -90 && lng <= 180 && lng >= -180;\r\n};\r\n\r\nexport const createBrowserLocationResult = (\r\n latLng: ILatLng\r\n): ILocationResult => ({\r\n id: \"your-location\",\r\n latLng,\r\n name: \"Your current location\",\r\n type: \"browserLocation\"\r\n});\r\n\r\nexport const searchCriteriaToLocationResult = (\r\n criteria: any // ISearchCriteria\r\n): ILocationResult | undefined => {\r\n if (\r\n criteria.useBrowserLocation &&\r\n typeof criteria.lat !== \"undefined\" &&\r\n typeof criteria.lng !== \"undefined\"\r\n ) {\r\n return createBrowserLocationResult({\r\n lat: criteria.lat,\r\n lng: criteria.lng\r\n });\r\n }\r\n if (\r\n typeof criteria.lat !== \"undefined\" &&\r\n typeof criteria.lng !== \"undefined\"\r\n ) {\r\n return {\r\n id: `${criteria.lat},${criteria.lng}`,\r\n latLng: { lat: criteria.lat, lng: criteria.lng },\r\n name: criteria.locationSearch || \"\",\r\n type: \"location\"\r\n };\r\n }\r\n return undefined;\r\n};\r\n\r\nexport default { createBrowserLocationResult };\r\n","import { createContext } from \"react\";\r\nimport { IStoreAppConfig } from \"../types\";\r\n\r\nconst ConfigContext = createContext({\r\n searchEndpoint: \"\",\r\n regionCode: \"\",\r\n storeResultsPageUrl: \"\",\r\n googleMapsApiKey: \"\",\r\n errorText: \"\",\r\n locationErrorText: \"\",\r\n noResultsFoundErrorText: \"\",\r\n locale: \"\",\r\n neptuneStoreHeading: \"\",\r\n neptuneByStoreHeading: \"\",\r\n partnerStoreHeading: \"\",\r\n labels: {},\r\n defaultRegionCode: \"\",\r\n defaultLatLngs: { GB: { lat: 0, lng: 0 } }\r\n});\r\n\r\nconst ThemeContext = createContext(\"dark\");\r\n\r\nexport { ConfigContext, ThemeContext };\r\n"],"names":["$cbf972ae7e663d49$export$2e2bcd8739ae039","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","$eA4hF","parcelRequire","$ddfb682d87db8331$export$2e2bcd8739ae039","text","onToggle","value","seasonalTextColor","id","className","alignRight","defaultFilter","theme","checked","setChecked","$kgL75","useState","useEffect","jsx","$parcel$interopDefault","$aGMAK","jsxs","htmlFor","type","onChange","e","name","$hvKyL","$6829e90caa33d245$var$MediaQueryListener","MediaQueryListener1","targetWindow","query","listener","_this","nativeMediaQueryList","matchMedia","active","cancellableListener","matches","addListener","cancel","removeListener","$6829e90caa33d245$var$queryType","$dsM4G","oneOfType","string","object","arrayOf","isRequired","$6829e90caa33d245$var$Media","_React$Component","Media1","props","$8yTri","default","$9TZeO","queryObject","queryNames","result","queries","reduce","acc","_ref","_extends2","mqListener","keys","__DEFAULT__","newMatches","getMatches","setState","$2S2uh","undefined","defaultMatches","window","_extends3","state","initialize","$6ujNK","_proto","_this2","map","qs","$4GYPc","updateMatches","componentDidMount","componentWillUnmount","forEach","_ref2","render","_this$props","children","isAnyMatches","some","Array","isArray","Children","only","cloneElement","Component","bool","objectOf","func","node","$6829e90caa33d245$export$2e2bcd8739ae039","$7358c0a987360d2c$export$2e2bcd8739ae039","self","ReferenceError","$63bc80cecd973921$export$2e2bcd8739ae039","obj","defineProperty","enumerable","configurable","writable","module","exports","$65dc44e65a72a51a$var$emptyFunction","$65dc44e65a72a51a$var$emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","location","propFullName","secret","$bJa8H","err","Error","getShim","ReactPropTypes","array","bigint","number","symbol","any","element","elementType","instanceOf","oneOf","shape","exact","checkPropTypes","PropTypes","condition","format","a","b","c","d","f","error","args","argIndex","replace","framesToPop","$2yM52","$36aa442ee79cc493$var$obj2mq","mq","features","feature","index","test","$36aa442ee79cc493$var$isDimension","q","str","match","toLowerCase","$2183264aab3c9233$export$2e2bcd8739ae039","min","S","M","L","XL","max","XS","MapContext","createContext","applyUpdaterToNextProps","updaterMap","prevProps","nextProps","instance","fn","nextValue","registerEvents","eventMap","registeredList","googleEventName","onEventName","push","google","maps","event","newAcc","unregisterEvent","registered","unregisterEvents","events","applyUpdatersToPropsAndRegisterEvents","registeredEvents","onDblClick","onDragEnd","onDragStart","onMapTypeIdChanged","onMouseMove","onMouseOut","onMouseOver","onMouseDown","onMouseUp","onRightClick","onTilesLoaded","onBoundsChanged","onCenterChanged","onClick","onDrag","onHeadingChanged","onIdle","onProjectionChanged","onResize","onTiltChanged","onZoomChanged","extraMapTypes","extra","it","mapTypes","set","String","center","setCenter","clickableIcons","clickable","setClickableIcons","heading","setHeading","mapTypeId","setMapTypeId","options","setOptions","streetView","setStreetView","tilt","setTilt","zoom","setZoom","GoogleMap","_React$PureComponent","GoogleMap1","mapRef","getInstance","Map","panTo","latLng","setMapCallback","onLoad","getRef","ref","$eaa5967bcb2fced6$var$_inheritsLoose","componentDidUpdate","onUnmount","React","style","mapContainerStyle","mapContainerClassName","Provider","Fragment","runtime","Op","hasOwn","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","GenStateSuspendedStart","method","arg","GenStateExecuting","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","done","GenStateSuspendedYield","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","invoke","resolve","reject","value1","__await","then","unwrapped","previousPromise","callInvokeWithMethodAndArg","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","next1","constructor","displayName","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","toString","key1","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","Function","isBrowser","document","injectScript","url","nonce","existingScript","getElementById","windowWithGoogleMap","dataStateAttribute","getAttribute","src","originalInitMap","initMap","originalErrorCallback","onerror","remove","script","createElement","setAttribute","head","appendChild","console","isRobotoStyle","href","indexOf","tagName","styleSheet","cssText","innerHTML","preventGoogleFonts","getElementsByTagName","trueInsertBefore","insertBefore","newElement","referenceElement","Reflect","trueAppend","textNode","makeLoadScriptUrl","googleMapsApiKey","googleMapsClientId","version","language","region","libraries","channel","mapIds","params","invariant","sort","join","cleaningUp","DefaultLoadingElement","previouslyLoadedUrl","defaultLoadScriptProps","LoadScript","LoadScript1","check","loaded","cleanupCallback","isCleaningUp","$eaa5967bcb2fced6$var$_asyncToGenerator","$eaa5967bcb2fced6$var$runtime_1","_callee","promiseCallback","_context","timer","setInterval","clearInterval","cleanup","parentNode","removeChild","filter","includes","link","innerText","preventGoogleFontsLoading","injectScriptOptions","onError","warn","setTimeout","current","loadingElement","useLoadScript","isMounted","isLoaded","setLoaded","loadError","setLoadError","setLoadedIfMounted","prevLibraries","TrafficLayer","_PureComponent","TrafficLayer1","trafficLayer","setTrafficLayerCallback","$eaa5967bcb2fced6$var$_extends","setMap","PureComponent","BicyclingLayer","BicyclingLayer1","bicyclingLayer","setBicyclingLayerCallback","TransitLayer","TransitLayer1","transitLayer","setTransitLayerCallback","onCircleComplete","onMarkerComplete","onOverlayComplete","onPolygonComplete","onPolylineComplete","onRectangleComplete","drawingMode","setDrawingMode","DrawingManager1","drawingManager","setDrawingManagerCallback","drawing","DrawingManager","onAnimationChanged","onClickableChanged","onCursorChanged","onDraggableChanged","onFlatChanged","onIconChanged","onPositionChanged","onShapeChanged","onTitleChanged","onVisibleChanged","onZindexChanged","animation","setAnimation","setClickable","cursor","setCursor","draggable","setDraggable","icon","setIcon","label","setLabel","opacity","setOpacity","position","setPosition","setShape","title","setTitle","visible","setVisible","zIndex","setZIndex","Marker","Marker1","marker","setMarkerCallback","markerOptions","clusterer","addMarker","noClustererRedraw","removeMarker","child","elementChild","anchor","onClusteringBegin","onClusteringEnd","averageCenter","setAverageCenter","batchSizeIE","setBatchSizeIE","calculator","setCalculator","clusterClass","setClusterClass","enableRetinaIcons","setEnableRetinaIcons","gridSize","setGridSize","ignoreHidden","setIgnoreHidden","imageExtension","setImageExtension","imagePath","setImagePath","imageSizes","setImageSizes","maxZoom","setMaxZoom","minimumClusterSize","setMinimumClusterSize","styles","setStyles","zoomOnClick","setZoomOnClick","ClustererComponent","ClustererComponent1","markerClusterer","setClustererCallback","Clusterer","onCloseClick","onContentChanged","onDomReady","LatLng","lat","lng","InfoBoxComponent","InfoBoxComponent1","containerElement","infoBox","open","getPosition","setInfoBoxCallback","setContent","positionLatLng","infoBoxOptions","GoogleMapsInfoBox","close","ReactDOM","InfoWindow","InfoWindow1","infoWindow","setInfoWindowCallback","editable","setEditable","path","setPath","Polyline","Polyline1","polyline","setPolylineCallback","paths","setPaths","Polygon","Polygon1","polygon","setPolygonCallback","bounds","setBounds","Rectangle","Rectangle1","rectangle","setRectangleCallback","onRadiusChanged","radius","setRadius","Circle","Circle1","circle","setCircleCallback","onAddFeature","onRemoveFeature","onRemoveProperty","onSetGeometry","onSetProperty","add","addgeojson","geojson","addGeoJson","contains","foreach","callback","loadgeojson","loadGeoJson","overridestyle","overrideStyle","revertstyle","revertStyle","controlposition","controlPosition","setControlPosition","controls","setControls","drawingmode","mode","setStyle","togeojson","toGeoJson","Data","Data1","data","setDataCallback","onDefaultViewportChanged","onStatusChanged","setUrl","KmlLayer","KmlLayer1","kmlLayer","setKmlLayerCallback","createLatLng","inst","Type","createLatLngBounds","ne","sw","ensureOfType","factory","convertToLatLngString","latLngLike","convertToLatLngBoundsString","latLngBoundsLike","LatLngBounds","south","east","north","west","OverlayView","OverlayView1","paneEl","containerStyle","updatePane","mapPaneName","mapPanes","overlayView","getPanes","onAdd","onPositionElement","getPixelPositionOffset","currentPosition","previousPosition","layoutStyles","mapCanvasProjection","offset","fromLatLngToDivPixel","getNorthEast","getSouthWest","left","x","top","y","width","height","getLayoutStylesByBounds","point","getLayoutStylesByPosition","getLayoutStyles","getProjection","containerRef","offsetWidth","offsetHeight","_this$state$container","draw","onRemove","prevPositionString","positionString","prevBoundsString","boundsString","GroundOverlay","GroundOverlay1","groundOverlay","setGroundOverlayCallback","noop","setData","HeatmapLayer","HeatmapLayer1","heatmapLayer","setHeatmapLayerCallback","visualization","onPanoChanged","onPovChanged","register","provider","registerPanoProvider","links","setLinks","motionTracking","setMotionTracking","pano","setPano","pov","setPov","StreetViewPanorama","StreetViewPanorama1","streetViewPanorama","setStreetViewPanoramaCallback","getStreetView","StreetViewService","StreetViewService1","streetViewService","setStreetViewServiceCallback","DirectionsService","onDirectionsChanged","directions","setDirections","panel","setPanel","routeIndex","setRouteIndex","DirectionsRenderer","DirectionsRenderer1","directionsRenderer","setDirectionsRendererCallback","DistanceMatrixService","onPlacesChanged","StandaloneSearchBox","StandaloneSearchBox1","searchBox","setSearchBoxCallback","places","input","querySelector","SearchBox","onPlaceChanged","restrictions","setComponentRestrictions","fields","setFields","types","setTypes","Autocomplete","Autocomplete1","autocomplete","setAutocompleteCallback","$765853c9f7b7d5bb$export$3b0d6d7590275603","Loader1","_a","_b","_c","_d","CALLBACK","callbacks","apiKey","createUrl","load","loadPromise","loadCallback","ClusterIcon","ClusterIcon1","cluster","getClusterer","extend","getClusterClass","div","sums","boundsChangedListener","anchorText","anchorIcon","textColor","textSize","textDecoration","fontWeight","fontStyle","fontFamily","backgroundPosition","getMap","cMouseDownInCluster","cDraggingMapByCluster","show","overlayMouseTarget","addDomListener","trigger","getMaxZoom","getBounds","fitBounds","cancelBubble","stopPropagation","clearInstanceListeners","hide","spriteH","spriteV","parseInt","pos","getPosFromLatLng","_this$getPosFromLatLn","divTitle","img","bp","split","useStyle","getTitle","Math","createCss","display","latlng","Cluster","getAverageCenter","markers","clusterIcon","Cluster1","getMarkers","getCenter","getGridSize","minClusterSize","getMinimumClusterSize","$2f9d91a2af87f661$export$74377966a779a285","getStyles","isMarkerAlreadyAdded","isAdded","mCount","_position","calculateBounds","isMarkerInClusterBounds","getZoom","updateIcon","getCalculator","count","dv","IMAGE_PATH","BATCH_SIZE","BATCH_SIZE_IE","CLUSTERER_CLASS","numStyles","optOptions","optMarkers","CALCULATOR","batchSize","navigator","userAgent","timerRefStatic","setupStyles","addMarkers","$2f9d91a2af87f661$var$CALCULATOR","activeMap","ready","listeners","resetViewport","Clusterer1","clusters","get","redraw","_i","fitMapToMarkers","_i2","getZoomOnClick","getIgnoreHidden","getEnableRetinaIcons","getImageExtension","getImagePath","getImageSizes","getBatchSizeIE","getTotalMarkers","getClusters","getTotalClusters","optNoDraw","pushMarkerTo","repaint","removeMarker_","splice","removed","removeMarkers","clearMarkers","oldClusters","projection","trPix","blPix","getExtendedBounds","optHide","fromDivPixelToLatLng","dLon","isMarkerInBounds","_i3","addToClosestCluster","distanceBetweenPoints","p1","p2","PI","dLat","cos","sin","sqrt","distance","clusterToAddTo","createClusters","$2f9d91a2af87f661$export$57ed47926628b770","_this3","iLast","clearTimeout","applyExtend","property","mapBounds","iFirst","getVisible","InfoBox","InfoBox1","content","disableAutoPan","maxWidth","pixelOffset","Size","boxClass","boxStyle","closeBoxMargin","closeBoxURL","infoBoxClearance","isHidden","alignBottom","pane","enableEventPropagation","closeListener","moveListener","mapListener","contextListener","eventListeners","fixedWidthSet","createInfoBoxDiv","cancelHandler","setBoxStyle","getCloseBoxImg","addClickHandler","bw","getBoxWidths","right","panBox","returnValue","preventDefault","firstChild","getCloseClickHandler","mapDiv","mapWidth","yOffset","mapHeight","iwOffsetX","iwWidth","iwHeight","getDiv","padY","pixPosition","fromLatLngToContainerPixel","padX","iwOffsetY","xOffset","panBy","webkitTransform","parseFloat","msFilter","visibility","bottom","defaultView","ownerDocument","computedStyle","borderRightWidth","getComputedStyle","borderTopWidth","borderBottomWidth","currentStyle","borderLeftWidth","getContent","isVisible","obj1","$7oZCY","$0d52299a432ed38b$export$2e2bcd8739ae039","searchTerm","onSelect","onSelectLatLngAndCountry","isWidget","backgroundTheme","simpleResults","storelabels","inputEl","useRef","inputParentEl","currValue","setCurrValue","browserLocation","setBrowserLocation","locationError","setLocationError","attrContainer","placesService","geocoderService","sessionToken","BrowserLocationRan","setBrowserLocationRan","useContext","$jVB03","ThemeContext","labels","usingMyLocationLabel","clearAllLabel","useMyLocationLabel","latitude","longitude","locationErrorText","ConfigContext","enterSearchStoreLabel","$4sYka","off","$6B2Xd","initializeSelectBox","$2c8OX","minChars","autoSelectFirst","appendTo","forceFixPosition","triggerSelectOnValidInput","lookup","results","getResults","suggestions","res","suggestion","val","PlacesService","latLngAndCountry","$fxjcg","getPlaceLatLngAndCountry","regionCode","AutocompleteSessionToken","clearSearch","focus","onSubmit","onBlur","relatedTarget","currentTarget","$bEN3t","geolocation","getCurrentPosition","$40b8Z","createBrowserLocationResult","coords","Geocoder","geocodeLatLngToCountry","ownKeys","getOwnPropertySymbols","concat","sym","getOwnPropertyDescriptor","$563a94455075ba37$var$_defineProperty","__esModule","$bc4732e6b4284c89$export$7061db99acdab42e","placeId","getDetails","status","PlacesServiceStatus","OK","geometry","address_components","find","comp","short_name","$bc4732e6b4284c89$export$84ccca8ef9c92950","geocode","$bc4732e6b4284c89$export$2e2bcd8739ae039","biasRadiusInMetres","biasLocation","autocompleteService","AutocompleteService","getPlacePredictions","autcompleteResults","r","place_id","description","$3834b2b156954284$export$9ff459732b27d563","locations","padding","l","$3834b2b156954284$export$789115b46607fab2","$3834b2b156954284$export$182722687e689498","$723abecb7b61ae7e$export$a92f85ab3e9ad68b","searchEndpoint","storeResultsPageUrl","errorText","noResultsFoundErrorText","locale","neptuneStoreHeading","neptuneByStoreHeading","partnerStoreHeading","defaultRegionCode","defaultLatLngs","GB","$723abecb7b61ae7e$export$2c657da244d00bd6"],"version":3,"file":"product-options.3244fa0a.js.map"}