@react-google-maps/api
Advanced tools
Comparing version 1.9.5 to 2.0.0-alpha
@@ -7,6 +7,4 @@ /// <reference types="googlemaps" /> | ||
}; | ||
interface InfoBoxState { | ||
infoBox: GoogleMapsInfoBox | null; | ||
} | ||
export interface InfoBoxProps { | ||
children: React.ReactNode; | ||
/** 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. */ | ||
@@ -34,14 +32,4 @@ anchor?: google.maps.MVCObject; | ||
} | ||
export declare class InfoBoxComponent extends React.PureComponent<InfoBoxProps, InfoBoxState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
containerElement: HTMLElement | null; | ||
state: InfoBoxState; | ||
open: (infoBox: GoogleMapsInfoBox, anchor?: google.maps.MVCObject | undefined) => void; | ||
setInfoBoxCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: InfoBoxProps): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactPortal | null; | ||
} | ||
export default InfoBoxComponent; | ||
declare function InfoBoxComponent(props: InfoBoxProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof InfoBoxComponent>; | ||
export default _default; |
@@ -1,7 +0,3 @@ | ||
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
import { Clusterer, ClusterIconStyle, Cluster, ClustererOptions, TCalculator } from '@react-google-maps/marker-clusterer'; | ||
interface ClustererState { | ||
markerClusterer: Clusterer | null; | ||
} | ||
export interface ClustererProps { | ||
@@ -55,12 +51,4 @@ children: (markerClusterer: Clusterer) => React.ReactNode; | ||
} | ||
export declare class ClustererComponent extends React.PureComponent<ClustererProps, ClustererState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
state: ClustererState; | ||
setClustererCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: ClustererProps): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactNode; | ||
} | ||
export default ClustererComponent; | ||
declare function ClustererComponent(props: ClustererProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof ClustererComponent>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface DirectionsRendererState { | ||
directionsRenderer: google.maps.DirectionsRenderer | null; | ||
} | ||
export interface DirectionsRendererProps { | ||
@@ -21,12 +18,4 @@ options?: google.maps.DirectionsRendererOptions; | ||
} | ||
export declare class DirectionsRenderer extends React.PureComponent<DirectionsRendererProps, DirectionsRendererState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
state: DirectionsRendererState; | ||
setDirectionsRendererCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: DirectionsRendererProps): void; | ||
componentWillUnmount(): void; | ||
render(): JSX.Element; | ||
} | ||
export default DirectionsRenderer; | ||
declare function DirectionsRenderer(props: DirectionsRendererProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof DirectionsRenderer>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface DirectionsServiceState { | ||
directionsService: google.maps.DirectionsService | null; | ||
} | ||
export interface DirectionsServiceProps { | ||
@@ -18,10 +15,4 @@ options: google.maps.DirectionsRequest; | ||
} | ||
export declare class DirectionsService extends React.PureComponent<DirectionsServiceProps, DirectionsServiceState> { | ||
state: DirectionsServiceState; | ||
setDirectionsServiceCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(): void; | ||
componentWillUnmount(): void; | ||
render(): JSX.Element; | ||
} | ||
export default DirectionsService; | ||
declare function DirectionsService(props: DirectionsServiceProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof DirectionsService>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface DistanceMatrixServiceState { | ||
distanceMatrixService: google.maps.DistanceMatrixService | null; | ||
} | ||
export interface DistanceMatrixServiceProps { | ||
@@ -18,10 +15,4 @@ options: google.maps.DistanceMatrixRequest; | ||
} | ||
export declare class DistanceMatrixService extends React.PureComponent<DistanceMatrixServiceProps, DistanceMatrixServiceState> { | ||
state: DistanceMatrixServiceState; | ||
setDistanceMatrixServiceCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(): void; | ||
componentWillUnmount(): void; | ||
render(): JSX.Element; | ||
} | ||
export default DistanceMatrixService; | ||
declare function DistanceMatrixService(props: DistanceMatrixServiceProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof DistanceMatrixService>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
/// <reference types="react" /> | ||
export declare function getOffsetOverride(containerElement: HTMLElement, getPixelPositionOffset?: (offsetWidth: number, offsetHeight: number) => { | ||
@@ -8,11 +9,6 @@ x: number; | ||
y: number; | ||
} | {}; | ||
export declare const getLayoutStyles: (mapCanvasProjection: google.maps.MapCanvasProjection, offset: { | ||
} | Record<string, unknown>; | ||
export declare function getLayoutStyles(mapCanvasProjection: google.maps.MapCanvasProjection, offset: { | ||
x: number; | ||
y: number; | ||
}, bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | undefined, position?: google.maps.LatLng | google.maps.LatLngLiteral | undefined) => { | ||
left: string; | ||
top: string; | ||
width?: string | undefined; | ||
height?: string | undefined; | ||
}; | ||
}, bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, position?: google.maps.LatLng | google.maps.LatLngLiteral): React.CSSProperties | null; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface OverlayViewState { | ||
overlayView: google.maps.OverlayView | null; | ||
containerStyle: React.CSSProperties; | ||
} | ||
export interface OverlayViewProps { | ||
mapPaneName: string; | ||
children: React.ReactChild; | ||
mapPaneName: keyof google.maps.MapPanes; | ||
getPixelPositionOffset?: (offsetWidth: number, offsetHeight: number) => { | ||
@@ -18,23 +15,4 @@ x: number; | ||
} | ||
export declare class OverlayView extends React.PureComponent<OverlayViewProps, OverlayViewState> { | ||
static FLOAT_PANE: string; | ||
static MAP_PANE: string; | ||
static MARKER_LAYER: string; | ||
static OVERLAY_LAYER: string; | ||
static OVERLAY_MOUSE_TARGET: string; | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
state: OverlayViewState; | ||
mapPaneEl: Element | null; | ||
containerRef: React.RefObject<HTMLDivElement>; | ||
setOverlayViewCallback: () => void; | ||
onAdd: () => void; | ||
onPositionElement: () => void; | ||
draw: () => void; | ||
onRemove: () => void; | ||
constructor(props: OverlayViewProps); | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: OverlayViewProps): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactPortal | React.ReactNode; | ||
} | ||
export default OverlayView; | ||
declare function OverlayView(props: OverlayViewProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof OverlayView>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface CircleState { | ||
circle: google.maps.Circle | null; | ||
} | ||
export interface CircleProps { | ||
@@ -49,12 +46,4 @@ options?: google.maps.CircleOptions; | ||
} | ||
export declare class Circle extends React.PureComponent<CircleProps, CircleState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
state: CircleState; | ||
setCircleCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: CircleProps): void; | ||
componentWillUnmount(): void; | ||
render(): JSX.Element; | ||
} | ||
export default Circle; | ||
declare function Circle(props: CircleProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof Circle>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface DataState { | ||
data: google.maps.Data | null; | ||
} | ||
export interface DataProps { | ||
@@ -37,12 +34,4 @@ options?: google.maps.Data.DataOptions; | ||
} | ||
export declare class Data extends React.PureComponent<DataProps, DataState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
state: DataState; | ||
setDataCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: DataProps): void; | ||
componentWillUnmount(): void; | ||
render(): null; | ||
} | ||
export default Data; | ||
declare function Data(props: DataProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof Data>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface DrawingManagerState { | ||
drawingManager: google.maps.drawing.DrawingManager | null; | ||
} | ||
export interface DrawingManagerProps { | ||
@@ -27,13 +24,4 @@ options?: google.maps.drawing.DrawingManagerOptions; | ||
} | ||
export declare class DrawingManager extends React.PureComponent<DrawingManagerProps, DrawingManagerState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
state: DrawingManagerState; | ||
constructor(props: DrawingManagerProps); | ||
setDrawingManagerCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: DrawingManagerProps): void; | ||
componentWillUnmount(): void; | ||
render(): JSX.Element; | ||
} | ||
export default DrawingManager; | ||
declare function DrawingManager(props: DrawingManagerProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof DrawingManager>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface InfoWindowState { | ||
infoWindow: google.maps.InfoWindow | null; | ||
} | ||
export interface InfoWindowProps { | ||
children: React.ReactNode; | ||
/** 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. */ | ||
@@ -29,14 +27,4 @@ anchor?: google.maps.MVCObject; | ||
} | ||
export declare class InfoWindow extends React.PureComponent<InfoWindowProps, InfoWindowState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
containerElement: HTMLElement | null; | ||
state: InfoWindowState; | ||
open: (infoWindow: google.maps.InfoWindow, anchor?: google.maps.MVCObject | undefined) => void; | ||
setInfoWindowCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: InfoWindowProps): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactPortal | React.ReactNode; | ||
} | ||
export default InfoWindow; | ||
declare function InfoWindow(props: InfoWindowProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof InfoWindow>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
import { Clusterer } from '@react-google-maps/marker-clusterer'; | ||
interface MarkerState { | ||
marker: google.maps.Marker | null; | ||
} | ||
export interface MarkerProps { | ||
children?: React.ReactNode; | ||
options?: google.maps.MarkerOptions; | ||
@@ -84,12 +82,4 @@ /** Start an animation. Any ongoing animation will be cancelled. Currently supported animations are: BOUNCE, DROP. Passing in null will cause any animation to stop. */ | ||
} | ||
export declare class Marker extends React.PureComponent<MarkerProps, MarkerState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
state: MarkerState; | ||
setMarkerCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: MarkerProps): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactNode; | ||
} | ||
export default Marker; | ||
declare function Marker(props: MarkerProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof Marker>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface PolygonState { | ||
polygon: google.maps.Polygon | null; | ||
} | ||
export interface PolygonProps { | ||
@@ -45,12 +42,4 @@ options?: google.maps.PolygonOptions; | ||
} | ||
export declare class Polygon extends React.PureComponent<PolygonProps, PolygonState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
state: PolygonState; | ||
setPolygonCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: PolygonProps): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactNode; | ||
} | ||
export default Polygon; | ||
declare function Polygon(props: PolygonProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof Polygon>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface PolylineState { | ||
polyline: google.maps.Polyline | null; | ||
} | ||
export interface PolylineProps { | ||
@@ -43,12 +40,4 @@ options?: google.maps.PolylineOptions; | ||
} | ||
export declare class Polyline extends React.PureComponent<PolylineProps, PolylineState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
state: PolylineState; | ||
setPolylineCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: PolylineProps): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactNode; | ||
} | ||
export default Polyline; | ||
declare function Polyline(props: PolylineProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof Polyline>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface RectangleState { | ||
rectangle: google.maps.Rectangle | null; | ||
} | ||
export interface RectangleProps { | ||
@@ -47,12 +44,4 @@ options?: google.maps.RectangleOptions; | ||
} | ||
export declare class Rectangle extends React.PureComponent<RectangleProps, RectangleState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
state: RectangleState; | ||
setRectangleCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: RectangleProps): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactNode; | ||
} | ||
export default Rectangle; | ||
declare function Rectangle(props: RectangleProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof Rectangle>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface HeatmapLayerState { | ||
heatmapLayer: google.maps.visualization.HeatmapLayer | null; | ||
} | ||
export interface HeatmapLayerProps { | ||
@@ -15,12 +12,4 @@ /** The data points to display. Required. */ | ||
} | ||
export declare class HeatmapLayer extends React.PureComponent<HeatmapLayerProps, HeatmapLayerState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
state: HeatmapLayerState; | ||
setHeatmapLayerCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: HeatmapLayerProps): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactNode; | ||
} | ||
export default HeatmapLayer; | ||
declare function HeatmapLayer(props: HeatmapLayerProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof HeatmapLayer>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import { PureComponent } from 'react'; | ||
interface KmlLayerState { | ||
kmlLayer: google.maps.KmlLayer | null; | ||
} | ||
import * as React from 'react'; | ||
export interface KmlLayerProps { | ||
@@ -23,12 +20,4 @@ options?: google.maps.KmlLayerOptions; | ||
} | ||
export declare class KmlLayer extends PureComponent<KmlLayerProps, KmlLayerState> { | ||
static contextType: import("react").Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
state: KmlLayerState; | ||
setKmlLayerCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: KmlLayerProps): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactNode; | ||
} | ||
export default KmlLayer; | ||
declare function KmlLayer(props: KmlLayerProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof KmlLayer>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface BicyclingLayerState { | ||
bicyclingLayer: google.maps.BicyclingLayer | null; | ||
} | ||
export interface BicyclingLayerProps { | ||
@@ -12,12 +9,4 @@ /** This callback is called when the bicyclingLayer instance has loaded. It is called with the bicyclingLayer instance. */ | ||
} | ||
export declare class BicyclingLayer extends React.PureComponent<BicyclingLayerProps, BicyclingLayerState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
state: { | ||
bicyclingLayer: null; | ||
}; | ||
setBicyclingLayerCallback: () => void; | ||
componentDidMount(): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactNode; | ||
} | ||
export default BicyclingLayer; | ||
declare function BicyclingLayer({ onLoad, onUnmount, }: BicyclingLayerProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof BicyclingLayer>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import { PureComponent } from 'react'; | ||
interface TrafficLayerState { | ||
trafficLayer: google.maps.TrafficLayer | null; | ||
} | ||
import * as React from 'react'; | ||
export interface TrafficLayerProps { | ||
@@ -13,14 +10,4 @@ options?: google.maps.TrafficLayerOptions; | ||
} | ||
export declare class TrafficLayer extends PureComponent<TrafficLayerProps, TrafficLayerState> { | ||
static contextType: import("react").Context<google.maps.Map<Element> | null>; | ||
state: { | ||
trafficLayer: null; | ||
}; | ||
setTrafficLayerCallback: () => void; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: TrafficLayerProps): void; | ||
componentWillUnmount(): void; | ||
render(): null; | ||
} | ||
export default TrafficLayer; | ||
declare function TrafficLayer(props: TrafficLayerProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof TrafficLayer>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface TransitLayerState { | ||
transitLayer: google.maps.TransitLayer | null; | ||
} | ||
export interface TransitLayerProps { | ||
@@ -12,12 +9,4 @@ /** This callback is called when the transitLayer instance has loaded. It is called with the transitLayer instance. */ | ||
} | ||
export declare class TransitLayer extends React.PureComponent<TransitLayerProps, TransitLayerState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
state: { | ||
transitLayer: null; | ||
}; | ||
setTransitLayerCallback: () => void; | ||
componentDidMount(): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactNode; | ||
} | ||
export default TransitLayer; | ||
declare function TransitLayer(props: TransitLayerProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof TransitLayer>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
import { noop } from '../../utils/noop'; | ||
interface GroundOverlayState { | ||
groundOverlay: google.maps.GroundOverlay | null; | ||
} | ||
export interface GroundOverlayProps { | ||
@@ -24,15 +20,4 @@ options?: google.maps.GroundOverlayOptions; | ||
} | ||
export declare class GroundOverlay extends React.PureComponent<GroundOverlayProps, GroundOverlayState> { | ||
static defaultProps: { | ||
onLoad: typeof noop; | ||
}; | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
state: GroundOverlayState; | ||
setGroundOverlayCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: GroundOverlayProps): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactNode; | ||
} | ||
export default GroundOverlay; | ||
declare function GroundOverlay(props: GroundOverlayProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof GroundOverlay>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface AutocompleteState { | ||
autocomplete: google.maps.places.Autocomplete | null; | ||
} | ||
export interface AutocompleteProps { | ||
@@ -24,13 +21,4 @@ children: React.ReactChild; | ||
} | ||
export declare class Autocomplete extends React.PureComponent<AutocompleteProps, AutocompleteState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
containerElement: React.RefObject<HTMLDivElement>; | ||
state: AutocompleteState; | ||
setAutocompleteCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: AutocompleteProps): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactNode; | ||
} | ||
export default Autocomplete; | ||
declare function Autocomplete(props: AutocompleteProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof Autocomplete>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface StandaloneSearchBoxState { | ||
searchBox: google.maps.places.SearchBox | null; | ||
} | ||
export interface StandaloneSearchBoxProps { | ||
children: React.ReactNode; | ||
/** The area towards which to bias query predictions. Predictions are biased towards, but not restricted to, queries targeting these bounds. */ | ||
@@ -17,13 +15,4 @@ bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral; | ||
} | ||
declare class StandaloneSearchBox extends React.PureComponent<StandaloneSearchBoxProps, StandaloneSearchBoxState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
containerElement: React.RefObject<HTMLDivElement>; | ||
state: StandaloneSearchBoxState; | ||
setSearchBoxCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: StandaloneSearchBoxProps): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactNode; | ||
} | ||
export default StandaloneSearchBox; | ||
declare function StandaloneSearchBox(props: StandaloneSearchBoxProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof StandaloneSearchBox>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface StreetViewPanoramaState { | ||
streetViewPanorama: google.maps.StreetViewPanorama | null; | ||
} | ||
/// <reference types="react" /> | ||
export interface StreetViewPanoramaProps { | ||
@@ -29,12 +26,3 @@ options?: google.maps.StreetViewPanoramaOptions; | ||
} | ||
export declare class StreetViewPanorama extends React.PureComponent<StreetViewPanoramaProps, StreetViewPanoramaState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
state: StreetViewPanoramaState; | ||
setStreetViewPanoramaCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: StreetViewPanoramaProps): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactNode; | ||
} | ||
declare function StreetViewPanorama(props: StreetViewPanoramaProps): JSX.Element; | ||
export default StreetViewPanorama; |
@@ -9,15 +9,4 @@ /// <reference types="googlemaps" /> | ||
} | ||
interface StreetViewServiceState { | ||
streetViewService: google.maps.StreetViewService | null; | ||
} | ||
export declare class StreetViewService extends React.PureComponent<StreetViewServiceProps, StreetViewServiceState> { | ||
static contextType: React.Context<google.maps.Map<Element> | null>; | ||
state: { | ||
streetViewService: null; | ||
}; | ||
setStreetViewServiceCallback: () => void; | ||
componentDidMount(): void; | ||
componentWillUnmount(): void; | ||
render(): React.ReactNode; | ||
} | ||
export default StreetViewService; | ||
declare function StreetViewService(props: StreetViewServiceProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof StreetViewService>; | ||
export default _default; |
export declare function setKey(key: string): void; | ||
export declare function getKey(): string | null; | ||
export declare function removeKey(): void; |
import * as React from 'react'; | ||
interface DocsApiKeyInputState { | ||
key: string; | ||
loadScript: boolean; | ||
interface DocsApiKeyInputProps { | ||
children: React.ReactChild; | ||
} | ||
declare class DocsApiKeyInput extends React.Component<{}, DocsApiKeyInputState> { | ||
constructor(props: {}); | ||
onInputChange: ({ target: { value } }: React.ChangeEvent<HTMLInputElement>) => void; | ||
onFormSubmit: (event: React.FormEvent<HTMLFormElement>) => void; | ||
render(): React.ReactNode; | ||
} | ||
export default DocsApiKeyInput; | ||
declare function DocsApiKeyInput({ children }: DocsApiKeyInputProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof DocsApiKeyInput>; | ||
export default _default; |
import * as React from 'react'; | ||
interface ScriptLoadedState { | ||
scriptLoaded: boolean; | ||
} | ||
interface ScriptLoadedProps { | ||
children: React.ReactChild | React.ReactChildren | Function; | ||
} | ||
declare class ScriptLoaded extends React.Component<ScriptLoadedProps, ScriptLoadedState> { | ||
interval: number | undefined; | ||
constructor(props: ScriptLoadedProps); | ||
setScriptLoadedCallback: () => void; | ||
checkIfScriptLoaded: () => void; | ||
componentWillUnmount(): void; | ||
render(): JSX.Element; | ||
} | ||
export default ScriptLoaded; | ||
declare function ScriptLoaded(props: ScriptLoadedProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof ScriptLoaded>; | ||
export default _default; |
/// <reference types="googlemaps" /> | ||
import * as React from 'react'; | ||
interface GoogleMapState { | ||
map: google.maps.Map | null; | ||
} | ||
export interface GoogleMapProps { | ||
children: React.ReactNode; | ||
id?: string; | ||
@@ -70,15 +68,4 @@ mapContainerStyle?: React.CSSProperties; | ||
} | ||
export declare class GoogleMap extends React.PureComponent<GoogleMapProps, GoogleMapState> { | ||
state: GoogleMapState; | ||
registeredEvents: google.maps.MapsEventListener[]; | ||
mapRef: Element | null; | ||
getInstance: () => google.maps.Map<Element> | null; | ||
panTo: (latLng: google.maps.LatLng | google.maps.LatLngLiteral) => void; | ||
setMapCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: GoogleMapProps): void; | ||
componentWillUnmount(): void; | ||
getRef: (ref: HTMLDivElement | null) => void; | ||
render(): React.ReactNode; | ||
} | ||
export default GoogleMap; | ||
declare function GoogleMap(props: GoogleMapProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof GoogleMap>; | ||
export default _default; |
export { default as GoogleMap, GoogleMapProps } from './GoogleMap'; | ||
export { default as LoadScript, LoadScriptProps } from './LoadScript'; | ||
export { default as LoadScriptNext, LoadScriptNextProps } from './LoadScriptNext'; | ||
export { default as LoadScriptNext, LoadScriptNextProps, } from './LoadScriptNext'; | ||
export { useLoadScript } from './useLoadScript'; | ||
export { default as TrafficLayer, TrafficLayerProps } from './components/maps/TrafficLayer'; | ||
export { default as BicyclingLayer, BicyclingLayerProps } from './components/maps/BicyclingLayer'; | ||
export { default as TransitLayer, TransitLayerProps } from './components/maps/TransitLayer'; | ||
export { default as DrawingManager, DrawingManagerProps } from './components/drawing/DrawingManager'; | ||
export { default as TrafficLayer, TrafficLayerProps, } from './components/maps/TrafficLayer'; | ||
export { default as BicyclingLayer, BicyclingLayerProps, } from './components/maps/BicyclingLayer'; | ||
export { default as TransitLayer, TransitLayerProps, } from './components/maps/TransitLayer'; | ||
export { default as DrawingManager, DrawingManagerProps, } from './components/drawing/DrawingManager'; | ||
export { default as Marker, MarkerProps } from './components/drawing/Marker'; | ||
export { default as MarkerClusterer, ClustererProps as MarkerClustererProps, } from './components/addons/MarkerClusterer'; | ||
export { default as InfoBox, InfoBoxProps } from './components/addons/InfoBox'; | ||
export { default as InfoWindow, InfoWindowProps } from './components/drawing/InfoWindow'; | ||
export { default as Polyline, PolylineProps } from './components/drawing/Polyline'; | ||
export { default as InfoWindow, InfoWindowProps, } from './components/drawing/InfoWindow'; | ||
export { default as Polyline, PolylineProps, } from './components/drawing/Polyline'; | ||
export { default as Polygon, PolygonProps } from './components/drawing/Polygon'; | ||
export { default as Rectangle, RectangleProps } from './components/drawing/Rectangle'; | ||
export { default as Rectangle, RectangleProps, } from './components/drawing/Rectangle'; | ||
export { default as Circle, CircleProps } from './components/drawing/Circle'; | ||
export { default as Data, DataProps } from './components/drawing/Data'; | ||
export { default as KmlLayer, KmlLayerProps } from './components/kml/KmlLayer'; | ||
export { default as OverlayView, OverlayViewProps } from './components/dom/OverlayView'; | ||
export { default as GroundOverlay, GroundOverlayProps } from './components/overlays/GroundOverlay'; | ||
export { default as HeatmapLayer, HeatmapLayerProps } from './components/heatmap/HeatmapLayer'; | ||
export { default as OverlayView, OverlayViewProps, } from './components/dom/OverlayView'; | ||
export { default as GroundOverlay, GroundOverlayProps, } from './components/overlays/GroundOverlay'; | ||
export { default as HeatmapLayer, HeatmapLayerProps, } from './components/heatmap/HeatmapLayer'; | ||
export { default as StreetViewPanorama, StreetViewPanoramaProps, } from './components/streetview/StreetViewPanorama'; | ||
@@ -28,3 +28,3 @@ export { default as StreetViewService, StreetViewServiceProps, } from './components/streetview/StreetViewService'; | ||
export { default as StandaloneSearchBox, StandaloneSearchBoxProps, } from './components/places/StandaloneSearchBox'; | ||
export { default as Autocomplete, AutocompleteProps } from './components/places/Autocomplete'; | ||
export { default as Autocomplete, AutocompleteProps, } from './components/places/Autocomplete'; | ||
export { default as MapContext, useGoogleMap } from './map-context'; |
import * as React from 'react'; | ||
import { LoadScriptUrlOptions } from './utils/make-load-script-url'; | ||
interface LoadScriptState { | ||
loaded: boolean; | ||
} | ||
export interface LoadScriptProps extends LoadScriptUrlOptions { | ||
children: React.ReactNode; | ||
id: string; | ||
@@ -19,20 +17,4 @@ loadingElement?: React.ReactNode; | ||
}; | ||
declare class LoadScript extends React.PureComponent<LoadScriptProps, LoadScriptState> { | ||
static defaultProps: { | ||
id: string; | ||
version: string; | ||
}; | ||
check: React.RefObject<HTMLDivElement>; | ||
state: { | ||
loaded: boolean; | ||
}; | ||
cleanupCallback: () => void; | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: LoadScriptProps): void; | ||
componentWillUnmount(): void; | ||
isCleaningUp: () => Promise<void>; | ||
cleanup: () => void; | ||
injectScript: () => void; | ||
render(): React.ReactNode; | ||
} | ||
export default LoadScript; | ||
declare function LoadScript(props: LoadScriptProps): JSX.Element; | ||
declare const _default: React.MemoExoticComponent<typeof LoadScript>; | ||
export default _default; |
@@ -1,2 +0,2 @@ | ||
"use strict";var t,e=require("react"),n=(t=require("invariant"))&&"object"==typeof t&&"default"in t?t.default:t,o=require("@react-google-maps/marker-clusterer"),r=require("react-dom"),s=require("@react-google-maps/infobox");function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function a(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function p(t,e){if(null==t)return{};var n,o,r={},s=Object.keys(t);for(o=0;o<s.length;o++)e.indexOf(n=s[o])>=0||(r[n]=t[n]);return r}var c=e.createContext(null);function l(t){google.maps.event.removeListener(t)}function u(t){void 0===t&&(t=[]),t.forEach(l)}function d(t){var e=t.updaterMap,n=t.prevProps,o=t.nextProps,r=t.instance,s=function(t,e,n){return o=n,Object.keys(o).reduce((function(n,r){return s=n,"function"==typeof t[i=r]&&s.push(google.maps.event.addListener(e,o[r],t[i])),s;var s,i}),[]);var o}(o,r,t.eventMap);return function(t,e,n,o){var r,s={};r=t,Object.keys(r).forEach((function(t){return function(t,r){var i=n[r];i!==e[r]&&(s[r]=i,t(o,i))}(r[t],t)}))}(e,n,o,r),s}var h={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},g={extraMapTypes:function(t,e){e.forEach((function(e,n){t.mapTypes.set(String(n),e)}))},center:function(t,e){t.setCenter(e)},clickableIcons:function(t,e){t.setClickableIcons(e)},heading:function(t,e){t.setHeading(e)},mapTypeId:function(t,e){t.setMapTypeId(e)},options:function(t,e){t.setOptions(e)},streetView:function(t,e){t.setStreetView(e)},tilt:function(t,e){t.setTilt(e)},zoom:function(t,e){t.setZoom(e)}},f=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={map:null},e.registeredEvents=[],e.mapRef=null,e.getInstance=function(){return null===e.mapRef?null:new google.maps.Map(e.mapRef,e.props.options)},e.panTo=function(t){var n=e.getInstance();n&&n.panTo(t)},e.setMapCallback=function(){null!==e.state.map&&e.props.onLoad&&e.props.onLoad(e.state.map)},e.getRef=function(t){e.mapRef=t},e}a(n,t);var o=n.prototype;return o.componentDidMount=function(){var t=this.getInstance();this.registeredEvents=d({updaterMap:g,eventMap:h,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{map:t}}),this.setMapCallback)},o.componentDidUpdate=function(t){null!==this.state.map&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:g,eventMap:h,prevProps:t,nextProps:this.props,instance:this.state.map}))},o.componentWillUnmount=function(){null!==this.state.map&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),u(this.registeredEvents))},o.render=function(){return e.createElement("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName},e.createElement(c.Provider,{value:this.state.map},null!==this.state.map?this.props.children:e.createElement(e.Fragment,null)))},n}(e.PureComponent),m="undefined"!=typeof document,v=function(t){var e=t.url,n=t.id;return m?new Promise((function(t,o){var r=document.getElementById(n),s=window;if(r){var i=r.getAttribute("data-state");if(r.src===e&&"error"!==i){if("ready"===i)return t(n);var a=s.initMap,p=r.onerror;return s.initMap=function(){a&&a(),t(n)},void(r.onerror=function(t){p&&p(t),o(t)})}r.remove()}var c=document.createElement("script");c.type="text/javascript",c.src=e,c.id=n,c.async=!0,c.onerror=function(t){c.setAttribute("data-state","error"),o(t)},s.initMap=function(){c.setAttribute("data-state","ready"),t(n)},document.head.appendChild(c)})).catch((function(t){throw console.error("injectScript error: ",t),t})):Promise.reject(new Error("document is undefined"))},y=function(t){return!((!t.href||0!==t.href.indexOf("https://fonts.googleapis.com/css?family=Roboto"))&&("style"===t.tagName.toLowerCase()&&t.styleSheet&&t.styleSheet.cssText&&0===t.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(t.styleSheet.cssText="",0):"style"===t.tagName.toLowerCase()&&t.innerHTML&&0===t.innerHTML.replace("\r\n","").indexOf(".gm-style")?(t.innerHTML="",0):"style"!==t.tagName.toLowerCase()||t.styleSheet||t.innerHTML))},M=function(){var t=document.getElementsByTagName("head")[0],e=t.insertBefore.bind(t);t.insertBefore=function(n,o){y(n)||Reflect.apply(e,t,[n,o])};var n=t.appendChild.bind(t);t.appendChild=function(e){y(e)||Reflect.apply(n,t,[e])}};function C(t){var e=t.googleMapsApiKey,o=t.googleMapsClientId,r=t.version,s=void 0===r?"weekly":r,i=t.language,a=t.region,p=t.libraries,c=t.channel,l=[];return e&&o||!e||!o||n(!1),e?l.push("key="+e):o&&l.push("client="+o),s&&l.push("v="+s),i&&l.push("language="+i),a&&l.push("region="+a),p&&p.length&&l.push("libraries="+p.sort().join(",")),c&&l.push("channel="+c),l.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?"+l.join("&")}var E=!1;function x(){return e.createElement("div",null,"Loading...")}var P,k={id:"script-loader",version:"weekly"},L=function(t){function o(){var o;return(o=t.apply(this,arguments)||this).check=e.createRef(),o.state={loaded:!1},o.cleanupCallback=function(){delete window.google,o.injectScript()},o.isCleaningUp=function(){try{return Promise.resolve(new Promise((function(t){if(E){if(m)var e=window.setInterval((function(){E||(window.clearInterval(e),t())}),1)}else t()})))}catch(t){return Promise.reject(t)}},o.cleanup=function(){E=!0;var t=document.getElementById(o.props.id);t&&t.parentNode&&t.parentNode.removeChild(t),Array.prototype.slice.call(document.getElementsByTagName("script")).filter((function(t){return"string"==typeof t.src&&t.src.includes("maps.googleapis")})).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)})),Array.prototype.slice.call(document.getElementsByTagName("link")).filter((function(t){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===t.href})).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)})),Array.prototype.slice.call(document.getElementsByTagName("style")).filter((function(t){return void 0!==t.innerText&&t.innerText.length>0&&t.innerText.includes(".gm-")})).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))},o.injectScript=function(){o.props.preventGoogleFontsLoading&&M(),o.props.id||n(!1);var t={id:o.props.id,url:C(o.props)};v(t).then((function(){o.props.onLoad&&o.props.onLoad(),o.setState((function(){return{loaded:!0}}))})).catch((function(t){o.props.onError&&o.props.onError(t),console.error("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(o.props.googleMapsApiKey||"-")+") or Client ID ("+(o.props.googleMapsClientId||"-")+") to <LoadScript />\n Otherwise it is a Network issue.\n ")}))},o}a(o,t);var r=o.prototype;return r.componentDidMount=function(){if(m){if(window.google&&!E)return void console.error("google api is already presented");this.isCleaningUp().then(this.injectScript).catch((function(t){console.error("Error at injecting script after cleaning up: ",t)}))}},r.componentDidUpdate=function(t){this.props.libraries!==t.libraries&&console.warn("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"),m&&t.language!==this.props.language&&(this.cleanup(),this.setState((function(){return{loaded:!1}}),this.cleanupCallback))},r.componentWillUnmount=function(){var t=this;m&&(this.cleanup(),window.setTimeout((function(){t.check.current||(delete window.google,E=!1)}),1),this.props.onUnmount&&this.props.onUnmount())},r.render=function(){return e.createElement(e.Fragment,null,e.createElement("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||e.createElement(x,null))},o}(e.PureComponent);function w(t){var o=t.id,r=void 0===o?k.id:o,s=t.version,i=void 0===s?k.version:s,a=t.googleMapsApiKey,p=t.googleMapsClientId,c=t.language,l=t.region,u=t.libraries,d=t.preventGoogleFontsLoading,h=t.channel,g=e.useRef(!1),f=e.useState(!1),y=f[0],E=f[1],x=e.useState(void 0),L=x[0],w=x[1];e.useEffect((function(){return g.current=!0,function(){g.current=!1}}),[]),e.useEffect((function(){m&&d&&M()}),[d]),e.useEffect((function(){y&&(window.google||n(!1))}),[y]);var b=C({version:i,googleMapsApiKey:a,googleMapsClientId:p,language:c,region:l,libraries:u,channel:h});e.useEffect((function(){function t(){g.current&&(E(!0),P=b)}m&&(window.google&&P===b?t():v({id:r,url:b}).then(t).catch((function(t){g.current&&w(t),console.warn("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(a||"-")+") or Client ID ("+(p||"-")+")\n Otherwise it is a Network issue.\n "),console.error(t)})))}),[r,b]);var S=e.useRef();return e.useEffect((function(){S.current&&u!==S.current&&console.warn("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"),S.current=u}),[u]),{isLoaded:y,loadError:L,url:b}}L.defaultProps=k;var b=e.createElement(x,null);function S(t){var n=t.loadingElement,o=t.onLoad,r=t.onError,s=t.onUnmount,i=t.children,a=w(p(t,["loadingElement","onLoad","onError","onUnmount","children"])),c=a.isLoaded,l=a.loadError;return e.useEffect((function(){c&&"function"==typeof o&&o()}),[c,o]),e.useEffect((function(){l&&"function"==typeof r&&r(l)}),[l,r]),e.useEffect((function(){return function(){s&&s()}}),[s]),c?i:n||b}var D=e.memo(S),U={},O={options:function(t,e){t.setOptions(e)}},R=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).state={trafficLayer:null},e.setTrafficLayerCallback=function(){null!==e.state.trafficLayer&&e.props.onLoad&&e.props.onLoad(e.state.trafficLayer)},e.registeredEvents=[],e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=new google.maps.TrafficLayer(i({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:O,eventMap:U,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{trafficLayer:t}}),this.setTrafficLayerCallback)},n.componentDidUpdate=function(t){null!==this.state.trafficLayer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:O,eventMap:U,prevProps:t,nextProps:this.props,instance:this.state.trafficLayer}))},n.componentWillUnmount=function(){null!==this.state.trafficLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),u(this.registeredEvents),this.state.trafficLayer.setMap(null))},n.render=function(){return null},e}(e.PureComponent);R.contextType=c;var T=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).state={bicyclingLayer:null},e.setBicyclingLayerCallback=function(){null!==e.state.bicyclingLayer&&(e.state.bicyclingLayer.setMap(e.context),e.props.onLoad&&e.props.onLoad(e.state.bicyclingLayer))},e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=new google.maps.BicyclingLayer;this.setState((function(){return{bicyclingLayer:t}}),this.setBicyclingLayerCallback)},n.componentWillUnmount=function(){null!==this.state.bicyclingLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},n.render=function(){return null},e}(e.PureComponent);T.contextType=c;var V=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).state={transitLayer:null},e.setTransitLayerCallback=function(){null!==e.state.transitLayer&&(e.state.transitLayer.setMap(e.context),e.props.onLoad&&e.props.onLoad(e.state.transitLayer))},e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=new google.maps.TransitLayer;this.setState((function(){return{transitLayer:t}}),this.setTransitLayerCallback)},n.componentWillUnmount=function(){null!==this.state.transitLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},n.render=function(){return null},e}(e.PureComponent);V.contextType=c;var I={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},_={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}},B=function(t){function o(e){var o;return(o=t.call(this,e)||this).registeredEvents=[],o.state={drawingManager:null},o.setDrawingManagerCallback=function(){null!==o.state.drawingManager&&o.props.onLoad&&o.props.onLoad(o.state.drawingManager)},google.maps.drawing||n(!1),o}a(o,t);var r=o.prototype;return r.componentDidMount=function(){var t=new google.maps.drawing.DrawingManager(i({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:_,eventMap:I,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{drawingManager:t}}),this.setDrawingManagerCallback)},r.componentDidUpdate=function(t){null!==this.state.drawingManager&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:_,eventMap:I,prevProps:t,nextProps:this.props,instance:this.state.drawingManager}))},r.componentWillUnmount=function(){null!==this.state.drawingManager&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),u(this.registeredEvents),this.state.drawingManager.setMap(null))},r.render=function(){return e.createElement(e.Fragment,null)},o}(e.PureComponent);B.contextType=c;var W={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},A={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},N=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={marker:null},e.setMarkerCallback=function(){null!==e.state.marker&&e.props.onLoad&&e.props.onLoad(e.state.marker)},e}a(n,t);var o=n.prototype;return o.componentDidMount=function(){var t=i({},this.props.options||{},{},this.props.clusterer?{}:{map:this.context},{position:this.props.position}),e=new google.maps.Marker(t);this.props.clusterer?this.props.clusterer.addMarker(e,!!this.props.noClustererRedraw):e.setMap(this.context),this.registeredEvents=d({updaterMap:A,eventMap:W,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{marker:e}}),this.setMarkerCallback)},o.componentDidUpdate=function(t){null!==this.state.marker&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:A,eventMap:W,prevProps:t,nextProps:this.props,instance:this.state.marker}))},o.componentWillUnmount=function(){null!==this.state.marker&&(this.props.onUnmount&&this.props.onUnmount(this.state.marker),u(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.state.marker,!!this.props.noClustererRedraw):this.state.marker&&this.state.marker.setMap(null))},o.render=function(){var t=this,n=null;return this.props.children&&(n=e.Children.map(this.props.children,(function(n){return e.isValidElement(n)?e.cloneElement(n,{anchor:t.state.marker}):n}))),n||null},n}(e.PureComponent);N.contextType=c;var j={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},z={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},F=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={markerClusterer:null},e.setClustererCallback=function(){null!==e.state.markerClusterer&&e.props.onLoad&&e.props.onLoad(e.state.markerClusterer)},e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){if(this.context){var t=new o.Clusterer(this.context,[],this.props.options);this.registeredEvents=d({updaterMap:z,eventMap:j,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{markerClusterer:t}}),this.setClustererCallback)}},n.componentDidUpdate=function(t){this.state.markerClusterer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:z,eventMap:j,prevProps:t,nextProps:this.props,instance:this.state.markerClusterer}))},n.componentWillUnmount=function(){null!==this.state.markerClusterer&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),u(this.registeredEvents),this.state.markerClusterer.setMap(null))},n.render=function(){return null!==this.state.markerClusterer?this.props.children(this.state.markerClusterer):null},e}(e.PureComponent);F.contextType=c;var G={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Z={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},H=function(t){function o(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.containerElement=null,e.state={infoBox:null},e.open=function(t,o){o?t.open(e.context,o):t.getPosition()?t.open(e.context):n(!1)},e.setInfoBoxCallback=function(){var t=e.props,n=t.anchor,o=t.onLoad,r=e.state.infoBox;null!==r&&null!==e.containerElement&&(r.setContent(e.containerElement),e.open(r,n),o&&o(r))},e}a(o,t);var c=o.prototype;return c.componentDidMount=function(){var t,e=this.props.options||{},n=e.position,o=p(e,["position"]);!n||n instanceof google.maps.LatLng||(t=new google.maps.LatLng(n.lat,n.lng));var r=new s.InfoBox(i({},o,{},t?{position:t}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=d({updaterMap:Z,eventMap:G,prevProps:{},nextProps:this.props,instance:r}),this.setState({infoBox:r},this.setInfoBoxCallback)},c.componentDidUpdate=function(t){var e=this.state.infoBox;null!==e&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:Z,eventMap:G,prevProps:t,nextProps:this.props,instance:e}))},c.componentWillUnmount=function(){var t=this.props.onUnmount,e=this.state.infoBox;null!==e&&(t&&t(e),u(this.registeredEvents),e.close())},c.render=function(){return this.containerElement?r.createPortal(e.Children.only(this.props.children),this.containerElement):null},o}(e.PureComponent);H.contextType=c;var K={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},q={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}},Y=function(t){function o(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.containerElement=null,e.state={infoWindow:null},e.open=function(t,o){o?t.open(e.context,o):t.getPosition()?t.open(e.context):n(!1)},e.setInfoWindowCallback=function(){null!==e.state.infoWindow&&null!==e.containerElement&&(e.state.infoWindow.setContent(e.containerElement),e.open(e.state.infoWindow,e.props.anchor),e.props.onLoad&&e.props.onLoad(e.state.infoWindow))},e}a(o,t);var s=o.prototype;return s.componentDidMount=function(){var t=new google.maps.InfoWindow(i({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=d({updaterMap:q,eventMap:K,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{infoWindow:t}}),this.setInfoWindowCallback)},s.componentDidUpdate=function(t){null!==this.state.infoWindow&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:q,eventMap:K,prevProps:t,nextProps:this.props,instance:this.state.infoWindow}))},s.componentWillUnmount=function(){null!==this.state.infoWindow&&(u(this.registeredEvents),this.state.infoWindow.close())},s.render=function(){return this.containerElement?r.createPortal(e.Children.only(this.props.children),this.containerElement):e.createElement(e.Fragment,null)},o}(e.PureComponent);Y.contextType=c;var J={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Q={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},X=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={polyline:null},e.setPolylineCallback=function(){null!==e.state.polyline&&e.props.onLoad&&e.props.onLoad(e.state.polyline)},e}a(n,t);var o=n.prototype;return o.componentDidMount=function(){var t=new google.maps.Polyline(i({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:Q,eventMap:J,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{polyline:t}}),this.setPolylineCallback)},o.componentDidUpdate=function(t){null!==this.state.polyline&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:Q,eventMap:J,prevProps:t,nextProps:this.props,instance:this.state.polyline}))},o.componentWillUnmount=function(){null!==this.state.polyline&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),u(this.registeredEvents),this.state.polyline.setMap(null))},o.render=function(){return e.createElement(e.Fragment,null)},n}(e.PureComponent);X.contextType=c;var $={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},tt={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}},et=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={polygon:null},e.setPolygonCallback=function(){null!==e.state.polygon&&e.props.onLoad&&e.props.onLoad(e.state.polygon)},e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=new google.maps.Polygon(i({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:tt,eventMap:$,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{polygon:t}}),this.setPolygonCallback)},n.componentDidUpdate=function(t){null!==this.state.polygon&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:tt,eventMap:$,prevProps:t,nextProps:this.props,instance:this.state.polygon}))},n.componentWillUnmount=function(){null!==this.state.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),u(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},n.render=function(){return null},e}(e.PureComponent);et.contextType=c;var nt={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},ot={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}},rt=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={rectangle:null},e.setRectangleCallback=function(){null!==e.state.rectangle&&e.props.onLoad&&e.props.onLoad(e.state.rectangle)},e}a(n,t);var o=n.prototype;return o.componentDidMount=function(){var t=new google.maps.Rectangle(i({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:ot,eventMap:nt,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{rectangle:t}}),this.setRectangleCallback)},o.componentDidUpdate=function(t){null!==this.state.rectangle&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:ot,eventMap:nt,prevProps:t,nextProps:this.props,instance:this.state.rectangle}))},o.componentWillUnmount=function(){null!==this.state.rectangle&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),u(this.registeredEvents),this.state.rectangle.setMap(null))},o.render=function(){return e.createElement(e.Fragment,null)},n}(e.PureComponent);rt.contextType=c;var st={onCenterChanged:"center_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRadiusChanged:"radius_changed",onRightClick:"rightclick"},it={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},at=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={circle:null},e.setCircleCallback=function(){null!==e.state.circle&&e.props.onLoad&&e.props.onLoad(e.state.circle)},e}a(n,t);var o=n.prototype;return o.componentDidMount=function(){var t=new google.maps.Circle(i({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:it,eventMap:st,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{circle:t}}),this.setCircleCallback)},o.componentDidUpdate=function(t){null!==this.state.circle&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:it,eventMap:st,prevProps:t,nextProps:this.props,instance:this.state.circle}))},o.componentWillUnmount=function(){null!==this.state.circle&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),u(this.registeredEvents),this.state.circle&&this.state.circle.setMap(null))},o.render=function(){return e.createElement(e.Fragment,null)},n}(e.PureComponent);at.contextType=c;var pt={onAddFeature:"addfeature",onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onRightClick:"rightclick",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},ct={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,o){t.loadGeoJson(e,n,o)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}},lt=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={data:null},e.setDataCallback=function(){null!==e.state.data&&e.props.onLoad&&e.props.onLoad(e.state.data)},e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=new google.maps.Data(i({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:ct,eventMap:pt,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{data:t}}),this.setDataCallback)},n.componentDidUpdate=function(t){null!==this.state.data&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:ct,eventMap:pt,prevProps:t,nextProps:this.props,instance:this.state.data}))},n.componentWillUnmount=function(){null!==this.state.data&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),u(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},n.render=function(){return null},e}(e.PureComponent);lt.contextType=c;var ut={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},dt={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}},ht=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={kmlLayer:null},e.setKmlLayerCallback=function(){null!==e.state.kmlLayer&&e.props.onLoad&&e.props.onLoad(e.state.kmlLayer)},e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=new google.maps.KmlLayer(i({},this.props.options,{map:this.context}));this.registeredEvents=d({updaterMap:dt,eventMap:ut,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{kmlLayer:t}}),this.setKmlLayerCallback)},n.componentDidUpdate=function(t){null!==this.state.kmlLayer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:dt,eventMap:ut,prevProps:t,nextProps:this.props,instance:this.state.kmlLayer}))},n.componentWillUnmount=function(){null!==this.state.kmlLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),u(this.registeredEvents),this.state.kmlLayer.setMap(null))},n.render=function(){return null},e}(e.PureComponent);ht.contextType=c;var gt=function(t,e){return new e(t.lat,t.lng)},ft=function(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))},mt=function(t,e,n){return t instanceof e?t:n(t,e)},vt=function(t){function e(){return t.apply(this,arguments)||this}a(e,t);var n=e.prototype;return n.componentDidMount=function(){this.props.onLoad&&this.props.onLoad()},n.render=function(){return this.props.children},e}(e.Component);function yt(t){return t?(t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng))+"":""}function Mt(t){return t?(t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west)))+"":""}var Ct=function(t){function o(o){var r;return(r=t.call(this,o)||this).state={overlayView:null,containerStyle:{}},r.mapPaneEl=null,r.setOverlayViewCallback=function(){null!==r.state.overlayView&&r.props.onLoad&&r.props.onLoad(r.state.overlayView),r.onPositionElement()},r.onAdd=function(){var t;r.props.mapPaneName||n(!1);var e=null===(t=r.state.overlayView)||void 0===t?void 0:t.getPanes();e&&(r.mapPaneEl=e[r.props.mapPaneName])},r.onPositionElement=function(){if(null!==r.state.overlayView){var t=(e=r.state.overlayView.getProjection(),n=i({x:0,y:0},r.containerRef.current?(a=r.containerRef.current,"function"==typeof(p=r.props.getPixelPositionOffset)?p(a.offsetWidth,a.offsetHeight):{}):{}),s=r.props.position,void 0!==(o=r.props.bounds)?function(t,e,n){var o=t.fromLatLngToDivPixel(n.getNorthEast()),r=t.fromLatLngToDivPixel(n.getSouthWest());return o&&r?{left:r.x+e.x+"px",top:o.y+e.y+"px",width:o.x-r.x-e.x+"px",height:r.y-o.y-e.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,n,mt(o,google.maps.LatLngBounds,ft)):function(t,e,n){var o=t.fromLatLngToDivPixel(n);return o?{left:o.x+e.x+"px",top:o.y+e.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,n,mt(s,google.maps.LatLng,gt)));r.setState({containerStyle:t})}var e,n,o,s,a,p},r.draw=function(){r.onPositionElement()},r.onRemove=function(){r.mapPaneEl=null},r.containerRef=e.createRef(),r}a(o,t);var s=o.prototype;return s.componentDidMount=function(){var t=new google.maps.OverlayView;t.onAdd=this.onAdd,t.draw=this.draw,t.onRemove=this.onRemove,t.setMap(this.context),this.setState((function(){return{overlayView:t}}))},s.componentDidUpdate=function(t){var e=this,n=yt(t.position),o=yt(this.props.position),r=Mt(t.bounds),s=Mt(this.props.bounds);n===o&&r===s||setTimeout((function(){null!==e.state.overlayView&&e.state.overlayView.draw()}),0)},s.componentWillUnmount=function(){null!==this.state.overlayView&&(this.props.onUnmount&&this.props.onUnmount(this.state.overlayView),this.state.overlayView.setMap(null))},s.render=function(){return this.mapPaneEl?r.createPortal(e.createElement("div",{ref:this.containerRef,style:i({},this.state.containerStyle,{position:"absolute"})},e.createElement(vt,{onLoad:this.setOverlayViewCallback},e.Children.only(this.props.children))),this.mapPaneEl):e.createElement(e.Fragment,null)},o}(e.PureComponent);Ct.FLOAT_PANE="floatPane",Ct.MAP_PANE="mapPane",Ct.MARKER_LAYER="markerLayer",Ct.OVERLAY_LAYER="overlayLayer",Ct.OVERLAY_MOUSE_TARGET="overlayMouseTarget",Ct.contextType=c;var Et={onDblClick:"dblclick",onClick:"click"},xt={opacity:function(t,e){t.setOpacity(e)}},Pt=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={groundOverlay:null},e.setGroundOverlayCallback=function(){null!==e.state.groundOverlay&&e.props.onLoad&&e.props.onLoad(e.state.groundOverlay)},e}a(e,t);var o=e.prototype;return o.componentDidMount=function(){this.props.url||this.props.bounds||n(!1);var t=new google.maps.GroundOverlay(this.props.url,this.props.bounds,i({},this.props.options,{map:this.context}));this.registeredEvents=d({updaterMap:xt,eventMap:Et,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{groundOverlay:t}}),this.setGroundOverlayCallback)},o.componentDidUpdate=function(t){null!==this.state.groundOverlay&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:xt,eventMap:Et,prevProps:t,nextProps:this.props,instance:this.state.groundOverlay}))},o.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},o.render=function(){return null},e}(e.PureComponent);Pt.defaultProps={onLoad:function(){}},Pt.contextType=c;var kt={},Lt={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}},wt=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={heatmapLayer:null},e.setHeatmapLayerCallback=function(){null!==e.state.heatmapLayer&&e.props.onLoad&&e.props.onLoad(e.state.heatmapLayer)},e}a(e,t);var o=e.prototype;return o.componentDidMount=function(){google.maps.visualization||n(!1),this.props.data||n(!1);var t=new google.maps.visualization.HeatmapLayer(i({},this.props.options||{},{data:this.props.data,map:this.context}));this.registeredEvents=d({updaterMap:Lt,eventMap:kt,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{heatmapLayer:t}}),this.setHeatmapLayerCallback)},o.componentDidUpdate=function(t){u(this.registeredEvents),this.registeredEvents=d({updaterMap:Lt,eventMap:kt,prevProps:t,nextProps:this.props,instance:this.state.heatmapLayer})},o.componentWillUnmount=function(){null!==this.state.heatmapLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),u(this.registeredEvents),this.state.heatmapLayer.setMap(null))},o.render=function(){return null},e}(e.PureComponent);wt.contextType=c;var bt={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},St={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}},Dt=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={streetViewPanorama:null},e.setStreetViewPanoramaCallback=function(){null!==e.state.streetViewPanorama&&e.props.onLoad&&e.props.onLoad(e.state.streetViewPanorama)},e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=this.context.getStreetView();this.registeredEvents=d({updaterMap:St,eventMap:bt,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{streetViewPanorama:t}}),this.setStreetViewPanoramaCallback)},n.componentDidUpdate=function(t){null!==this.state.streetViewPanorama&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:St,eventMap:bt,prevProps:t,nextProps:this.props,instance:this.state.streetViewPanorama}))},n.componentWillUnmount=function(){null!==this.state.streetViewPanorama&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),u(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},n.render=function(){return null},e}(e.PureComponent);Dt.contextType=c;var Ut=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).state={streetViewService:null},e.setStreetViewServiceCallback=function(){null!==e.state.streetViewService&&e.props.onLoad&&e.props.onLoad(e.state.streetViewService)},e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=new google.maps.StreetViewService;this.setState((function(){return{streetViewService:t}}),this.setStreetViewServiceCallback)},n.componentWillUnmount=function(){null!==this.state.streetViewService&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},n.render=function(){return null},e}(e.PureComponent);Ut.contextType=c;var Ot=function(t){function o(){var e;return(e=t.apply(this,arguments)||this).state={directionsService:null},e.setDirectionsServiceCallback=function(){null!==e.state.directionsService&&e.props.onLoad&&e.props.onLoad(e.state.directionsService)},e}a(o,t);var r=o.prototype;return r.componentDidMount=function(){this.props.options||n(!1);var t=new google.maps.DirectionsService;this.setState((function(){return{directionsService:t}}),this.setDirectionsServiceCallback)},r.componentDidUpdate=function(){null!==this.state.directionsService&&this.state.directionsService.route(this.props.options,this.props.callback)},r.componentWillUnmount=function(){null!==this.state.directionsService&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},r.render=function(){return e.createElement(e.Fragment,null)},o}(e.PureComponent),Rt={onDirectionsChanged:"directions_changed"},Tt={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}},Vt=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={directionsRenderer:null},e.setDirectionsRendererCallback=function(){null!==e.state.directionsRenderer&&(e.state.directionsRenderer.setMap(e.context),e.props.onLoad&&e.props.onLoad(e.state.directionsRenderer))},e}a(n,t);var o=n.prototype;return o.componentDidMount=function(){var t=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=d({updaterMap:Tt,eventMap:Rt,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{directionsRenderer:t}}),this.setDirectionsRendererCallback)},o.componentDidUpdate=function(t){null!==this.state.directionsRenderer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:Tt,eventMap:Rt,prevProps:t,nextProps:this.props,instance:this.state.directionsRenderer}))},o.componentWillUnmount=function(){null!==this.state.directionsRenderer&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),u(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},o.render=function(){return e.createElement(e.Fragment,null)},n}(e.PureComponent);Vt.contextType=c;var It=function(t){function o(){var e;return(e=t.apply(this,arguments)||this).state={distanceMatrixService:null},e.setDistanceMatrixServiceCallback=function(){null!==e.state.distanceMatrixService&&e.props.onLoad&&e.props.onLoad(e.state.distanceMatrixService)},e}a(o,t);var r=o.prototype;return r.componentDidMount=function(){this.props.options||n(!1);var t=new google.maps.DistanceMatrixService;this.setState((function(){return{distanceMatrixService:t}}),this.setDistanceMatrixServiceCallback)},r.componentDidUpdate=function(){null!==this.state.distanceMatrixService&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},r.componentWillUnmount=function(){null!==this.state.distanceMatrixService&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},r.render=function(){return e.createElement(e.Fragment,null)},o}(e.PureComponent),_t={onPlacesChanged:"places_changed"},Bt={bounds:function(t,e){t.setBounds(e)}},Wt=function(t){function o(){var n;return(n=t.apply(this,arguments)||this).registeredEvents=[],n.containerElement=e.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){null!==n.state.searchBox&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}a(o,t);var r=o.prototype;return r.componentDidMount=function(){if(google.maps.places||n(!1),null!==this.containerElement&&null!==this.containerElement.current){var t=this.containerElement.current.querySelector("input");if(null!==t){var e=new google.maps.places.SearchBox(t,this.props.options);this.registeredEvents=d({updaterMap:Bt,eventMap:_t,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{searchBox:e}}),this.setSearchBoxCallback)}}},r.componentDidUpdate=function(t){null!==this.state.searchBox&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:Bt,eventMap:_t,prevProps:t,nextProps:this.props,instance:this.state.searchBox}))},r.componentWillUnmount=function(){null!==this.state.searchBox&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),u(this.registeredEvents))},r.render=function(){return e.createElement("div",{ref:this.containerElement},e.Children.only(this.props.children))},o}(e.PureComponent);Wt.contextType=c;var At={onPlaceChanged:"place_changed"},Nt={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}},jt=function(t){function o(){var n;return(n=t.apply(this,arguments)||this).registeredEvents=[],n.containerElement=e.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){null!==n.state.autocomplete&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}a(o,t);var r=o.prototype;return r.componentDidMount=function(){google.maps.places||n(!1);var t=this.containerElement.current.querySelector("input");if(t){var e=new google.maps.places.Autocomplete(t,this.props.options);this.registeredEvents=d({updaterMap:Nt,eventMap:At,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{autocomplete:e}}),this.setAutocompleteCallback)}},r.componentDidUpdate=function(t){u(this.registeredEvents),this.registeredEvents=d({updaterMap:Nt,eventMap:At,prevProps:t,nextProps:this.props,instance:this.state.autocomplete})},r.componentWillUnmount=function(){null!==this.state.autocomplete&&u(this.registeredEvents)},r.render=function(){return e.createElement("div",{ref:this.containerElement},e.Children.only(this.props.children))},o}(e.PureComponent);jt.contextType=c,exports.Autocomplete=jt,exports.BicyclingLayer=T,exports.Circle=at,exports.Data=lt,exports.DirectionsRenderer=Vt,exports.DirectionsService=Ot,exports.DistanceMatrixService=It,exports.DrawingManager=B,exports.GoogleMap=f,exports.GroundOverlay=Pt,exports.HeatmapLayer=wt,exports.InfoBox=H,exports.InfoWindow=Y,exports.KmlLayer=ht,exports.LoadScript=L,exports.LoadScriptNext=D,exports.MapContext=c,exports.Marker=N,exports.MarkerClusterer=F,exports.OverlayView=Ct,exports.Polygon=et,exports.Polyline=X,exports.Rectangle=rt,exports.StandaloneSearchBox=Wt,exports.StreetViewPanorama=Dt,exports.StreetViewService=Ut,exports.TrafficLayer=R,exports.TransitLayer=V,exports.useGoogleMap=function(){e.useContext||n(!1);var t=e.useContext(c);return t||n(!1),t},exports.useLoadScript=w; | ||
"use strict";var e,n=require("react"),t=(e=require("invariant"))&&"object"==typeof e&&"default"in e?e.default:e,o=require("@react-google-maps/marker-clusterer"),r=require("react-dom"),a=require("@react-google-maps/infobox"),u=n.createContext(null);function i(e){google.maps.event.removeListener(e)}function l(e){void 0===e&&(e=[]),e.forEach(i)}function s(e){var n=e.updaterMap,t=e.prevProps,o=e.nextProps,r=e.instance,a=function(e,n,t){return o=t,Object.keys(o).reduce((function(t,r){return a=t,"function"==typeof e[u=r]&&a.push(google.maps.event.addListener(n,o[r],e[u])),a;var a,u}),[]);var o}(o,r,e.eventMap);return function(e,n,t,o){var r,a={};r=e,Object.keys(r).forEach((function(e){return function(e,r){var u=t[r];u!==n[r]&&(a[r]=u,e(o,u))}(r[e],e)}))}(n,t,o,r),a}function c(e){var t=n.useRef(e);return n.useEffect((function(){t.current=e}),[e]),t.current}var f={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},p={extraMapTypes:function(e,n){n.forEach((function(n,t){e.mapTypes.set(String(t),n)}))},center:function(e,n){e.setCenter(n)},clickableIcons:function(e,n){e.setClickableIcons(n)},heading:function(e,n){e.setHeading(n)},mapTypeId:function(e,n){e.setMapTypeId(n)},options:function(e,n){e.setOptions(n)},streetView:function(e,n){e.setStreetView(n)},tilt:function(e,n){e.setTilt(n)},zoom:function(e,n){e.setZoom(n)}};function g(e){var t=e.children,o=e.options,r=e.id,a=e.mapContainerStyle,i=e.mapContainerClassName,g=e.onLoad,d=e.onUnmount,m=n.useState(null),v=m[0],h=m[1],C=n.createRef(),M=c(e);return n.useEffect((function(){return null===v&&null!==C.current&&h(new google.maps.Map(C.current,o)),null!==v&&g&&g(v),function(){null!==v&&d&&d(v)}}),[v,o,g,d,C]),n.useEffect((function(){var n=s({updaterMap:p,eventMap:f,prevProps:M,nextProps:e,instance:v});return function(){l(n)}}),[e,v,M]),n.createElement("div",{id:r,ref:C,style:a,className:i},n.createElement(u.Provider,{value:v},null!==v?t:n.createElement(n.Fragment,null)))}var d=n.memo(g),m="undefined"!=typeof document;function v(e){var n=e.url,t=e.id;return m?new Promise((function(e,o){var r=document.getElementById(t),a=window;if(r){var u=r.getAttribute("data-state");if(r.src===n&&"error"!==u){if("ready"===u)return e(t);var i=a.initMap,l=r.onerror;a.initMap=function(){i&&i(),e(t)},r.onerror=function(e){l&&l(e),o(e)}}else r.remove()}var s=document.createElement("script");s.type="text/javascript",s.src=n,s.id=t,s.async=!0,s.onerror=function(e){s.setAttribute("data-state","error"),o(e)},a.initMap=function(){s.setAttribute("data-state","ready"),e(t)},document.head.appendChild(s)})).catch((function(e){throw console.error("injectScript error: ",e),e})):Promise.reject(new Error("document is undefined"))}var h=function(e){return!((!e.href||0!==e.href.indexOf("https://fonts.googleapis.com/css?family=Roboto"))&&("style"===e.tagName.toLowerCase()&&e.styleSheet&&e.styleSheet.cssText&&0===e.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(e.styleSheet.cssText="",0):"style"===e.tagName.toLowerCase()&&e.innerHTML&&0===e.innerHTML.replace("\r\n","").indexOf(".gm-style")?(e.innerHTML="",0):"style"!==e.tagName.toLowerCase()||e.styleSheet||e.innerHTML))},C=function(){var e=document.getElementsByTagName("head")[0],n=e.insertBefore.bind(e);e.insertBefore=function(t,o){h(t)||Reflect.apply(n,e,[t,o])};var t=e.appendChild.bind(e);e.appendChild=function(n){h(n)||Reflect.apply(t,e,[n])}};function M(e){var n=e.googleMapsApiKey,o=e.googleMapsClientId,r=e.version,a=void 0===r?"weekly":r,u=e.language,i=e.region,l=e.libraries,s=e.channel,c=[];return n&&o||!n||!o||t(!1),n?c.push("key="+n):o&&c.push("client="+o),a&&c.push("v="+a),u&&c.push("language="+u),i&&c.push("region="+i),l&&l.length&&c.push("libraries="+l.sort().join(",")),s&&c.push("channel="+s),c.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?"+c.join("&")}var E=!1;function y(){return n.createElement("div",null,"Loading...")}function x(e){var o=e.googleMapsApiKey,r=e.googleMapsClientId,a=e.children,u=e.id,i=void 0===u?"script-loader":u,l=e.version,s=void 0===l?"weekly":l,f=e.language,p=e.region,g=e.channel,d=e.libraries,h=e.loadingElement,x=e.onLoad,w=e.onUnmount,b=e.onError,P=e.preventGoogleFontsLoading,k=c(e),L=n.useState(!1),S=L[0],D=L[1],O=n.useRef(null),I=n.useCallback((function(){P&&C(),i||t(!1),v({id:i,url:M({googleMapsApiKey:o,googleMapsClientId:r,version:s,language:f,region:p,libraries:d,channel:g})}).then((function(){x&&x(),D(!0)})).catch((function(e){b&&b(e),console.error("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(o||"-")+") or Client ID ("+(r||"-")+") to <LoadScript />\n Otherwise it is a Network issue.\n ")}))}),[o,i,s,f,p,g,d,r,P,b,x]),R=n.useCallback((function(){try{return Promise.resolve(new Promise((function(e){if(E){if(m)var n=window.setInterval((function(){E||(window.clearInterval(n),e())}),1)}else e()})))}catch(e){return Promise.reject(e)}}),[]),T=n.useCallback((function(){E=!0;var e=document.getElementById(i);e&&e.parentNode&&e.parentNode.removeChild(e),Array.prototype.slice.call(document.getElementsByTagName("script")).filter((function(e){return"string"==typeof e.src&&e.src.includes("maps.googleapis")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),Array.prototype.slice.call(document.getElementsByTagName("link")).filter((function(e){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===e.href})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),Array.prototype.slice.call(document.getElementsByTagName("style")).filter((function(e){return void 0!==e.innerText&&e.innerText.length>0&&e.innerText.includes(".gm-")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}),[i]);return n.useEffect((function(){if(m){if(window.google&&!E)return console.error("google api is already presented"),function(){};R().then(I).catch((function(e){console.error("Error at injecting script after cleaning up: ",e)}))}return function(){m&&(T(),window.setTimeout((function(){null===O.current&&(delete window.google,E=!1)}),1),w&&w())}}),[T,R,w,I]),n.useEffect((function(){d!==k.libraries&&console.warn("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"),m&&k.language!==f&&(T(),D(!1),delete window.google,I())}),[T,I,f,d,k.language,k.libraries]),n.createElement(n.Fragment,null,n.createElement("div",{ref:O}),S?a:h||n.createElement(y,null))}var w,b=n.memo(x);function P(){return(P=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}function k(e,n){if(null==e)return{};var t,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n.indexOf(t=a[o])>=0||(r[t]=e[t]);return r}function L(e){var o=e.id,r=void 0===o?"script-loader":o,a=e.version,u=void 0===a?"weekly":a,i=e.googleMapsApiKey,l=e.googleMapsClientId,s=e.language,c=e.region,f=e.libraries,p=e.preventGoogleFontsLoading,g=e.channel,d=n.useRef(!1),h=n.useState(!1),E=h[0],y=h[1],x=n.useState(void 0),b=x[0],P=x[1];n.useEffect((function(){return d.current=!0,function(){d.current=!1}}),[]),n.useEffect((function(){m&&p&&C()}),[p]),n.useEffect((function(){E&&(window.google||t(!1))}),[E]);var k=M({version:u,googleMapsApiKey:i,googleMapsClientId:l,language:s,region:c,libraries:f,channel:g});n.useEffect((function(){function e(){d.current&&(y(!0),w=k)}m&&(window.google&&w===k?e():v({id:r,url:k}).then(e).catch((function(e){d.current&&P(e),console.warn("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(i||"-")+") or Client ID ("+(l||"-")+")\n Otherwise it is a Network issue.\n "),console.error(e)})))}),[r,k,i,l]);var L=n.useRef();return n.useEffect((function(){L.current&&f!==L.current&&console.warn("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"),L.current=f}),[f]),{isLoaded:E,loadError:b,url:k}}var S=n.createElement(y,null);function D(e){var t=e.loadingElement,o=e.onLoad,r=e.onError,a=e.onUnmount,u=e.children,i=L(k(e,["loadingElement","onLoad","onError","onUnmount","children"])),l=i.isLoaded,s=i.loadError;return n.useEffect((function(){l&&"function"==typeof o&&o()}),[l,o]),n.useEffect((function(){s&&"function"==typeof r&&r(s)}),[s,r]),n.useEffect((function(){return function(){a&&a()}}),[a]),l?u:t||S}var O=n.memo(D),I={},R={options:function(e,n){e.setOptions(n)}};function T(e){var t=e.options,o=e.onLoad,r=e.onUnmount,a=n.useContext(u),i=c(e),f=n.useState(null),p=f[0],g=f[1];return n.useEffect((function(){return null!==a&&(null===p&&g(new google.maps.TrafficLayer(P({},t||{},{map:a}))),null!==p&&(p.setMap(a),o&&o(p))),function(){null!==p&&(r&&r(p),p.setMap(null))}}),[p,a,t,o,r]),n.useEffect((function(){var n=s({updaterMap:R,eventMap:I,prevProps:i,nextProps:e,instance:p});return function(){l(n)}}),[e,p,i]),n.createElement(n.Fragment,null)}var _=n.memo(T);function U(e){var t=e.onLoad,o=e.onUnmount,r=n.useContext(u),a=n.useState(null),i=a[0],l=a[1];return n.useEffect((function(){return null!==r&&(null===i&&l(new google.maps.BicyclingLayer),null!==i&&(i.setMap(r),t&&t(i))),function(){null!==i&&(o&&o(i),i.setMap(null))}}),[i,r,t,o]),n.createElement(n.Fragment,null)}var F=n.memo(U);function z(e){var t=e.onLoad,o=e.onUnmount,r=n.useContext(u),a=n.useState(null),i=a[0],l=a[1];return n.useEffect((function(){var e=new google.maps.TransitLayer;return l(e),e.setMap(r),t&&t(e),function(){null!==i&&(o&&o(i),i.setMap(null))}}),[i,r,t,o]),n.createElement(n.Fragment,null)}var B=n.memo(z),N={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},j={drawingMode:function(e,n){e.setDrawingMode(n)},options:function(e,n){e.setOptions(n)}};function A(e){var o=e.options,r=e.onLoad,a=e.onUnmount,i=n.useContext(u),f=c(e),p=n.useState(null),g=p[0],d=p[1];return n.useEffect((function(){return google.maps.drawing||t(!1),null!==i&&(null===g&&d(new google.maps.drawing.DrawingManager(P({},o||{},{map:i}))),null!==g&&(g.setMap(i),r&&r(g))),function(){null!==g&&(a&&a(g),g.setMap(null))}}),[g,i,o,r,a]),n.useEffect((function(){var n=s({updaterMap:j,eventMap:N,prevProps:f,nextProps:e,instance:g});return function(){l(n)}}),[e,g,f]),n.createElement(n.Fragment,null)}var V=n.memo(A),G={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},Z={animation:function(e,n){e.setAnimation(n)},clickable:function(e,n){e.setClickable(n)},cursor:function(e,n){e.setCursor(n)},draggable:function(e,n){e.setDraggable(n)},icon:function(e,n){e.setIcon(n)},label:function(e,n){e.setLabel(n)},map:function(e,n){e.setMap(n)},opacity:function(e,n){e.setOpacity(n)},options:function(e,n){e.setOptions(n)},position:function(e,n){e.setPosition(n)},shape:function(e,n){e.setShape(n)},title:function(e,n){e.setTitle(n)},visible:function(e,n){e.setVisible(n)},zIndex:function(e,n){e.setZIndex(n)}};function H(e){var t=e.children,o=e.options,r=e.position,a=e.clusterer,i=e.noClustererRedraw,f=e.onLoad,p=e.onUnmount,g=n.useContext(u),d=c(e),m=n.useState(null),v=m[0],h=m[1];return n.useEffect((function(){if(null!==g){if(null===v){var e=new google.maps.Marker(P({},o||{},{},a?{}:{map:g},{position:r}));a?a.addMarker(e,!!i):e.setMap(g),h(e)}null!==v&&(v.setMap(g),f&&f(v))}return function(){null!==v&&(p&&p(v),a?a.removeMarker(v,!!i):v&&v.setMap(null))}}),[v,g,o,a,i,r,f,p]),n.useEffect((function(){var n=s({updaterMap:Z,eventMap:G,prevProps:d,nextProps:e,instance:v});return function(){l(n)}}),[e,v,d]),t?n.createElement(n.Fragment,null,n.Children.map(t,(function(e){return n.isValidElement(e)?n.cloneElement(e,{anchor:v}):e}))):n.createElement(n.Fragment,null)}var q=n.memo(H),K={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},W={averageCenter:function(e,n){e.setAverageCenter(n)},batchSizeIE:function(e,n){e.setBatchSizeIE(n)},calculator:function(e,n){e.setCalculator(n)},clusterClass:function(e,n){e.setClusterClass(n)},enableRetinaIcons:function(e,n){e.setEnableRetinaIcons(n)},gridSize:function(e,n){e.setGridSize(n)},ignoreHidden:function(e,n){e.setIgnoreHidden(n)},imageExtension:function(e,n){e.setImageExtension(n)},imagePath:function(e,n){e.setImagePath(n)},imageSizes:function(e,n){e.setImageSizes(n)},maxZoom:function(e,n){e.setMaxZoom(n)},minimumClusterSize:function(e,n){e.setMinimumClusterSize(n)},styles:function(e,n){e.setStyles(n)},title:function(e,n){e.setTitle(n)},zoomOnClick:function(e,n){e.setZoomOnClick(n)}};function J(e){var t=e.children,r=e.options,a=e.onLoad,i=e.onUnmount,f=n.useContext(u),p=c(e),g=n.useState(null),d=g[0],m=g[1];return n.useEffect((function(){return null!==f&&(null===d&&m(new o.Clusterer(f,[],r)),null!==d&&a&&a(d)),function(){null!==d&&(i&&i(d),d.setMap(null))}}),[d,f,r,a,i]),n.useEffect((function(){var n=s({updaterMap:W,eventMap:K,prevProps:p,nextProps:e,instance:d});return function(){l(n)}}),[e,d,p]),null!==d?n.createElement(n.Fragment,null,t(d)):n.createElement(n.Fragment,null)}var Y=n.memo(J),Q={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},X={options:function(e,n){e.setOptions(n)},position:function(e,n){n instanceof google.maps.LatLng?e.setPosition(n):e.setPosition(new google.maps.LatLng(n.lat,n.lng))},visible:function(e,n){e.setVisible(n)},zIndex:function(e,n){e.setZIndex(n)}};function $(e){var o=e.children,i=e.options,f=e.anchor,p=e.onLoad,g=e.onUnmount,d=i||{},m=d.position,v=k(d,["position"]),h=n.useContext(u),C=c(e),M=n.useRef(null),E=n.useState(null),y=E[0],x=E[1];return n.useEffect((function(){if(null!==h){if(null===y){var e;!m||m instanceof google.maps.LatLng||(e=new google.maps.LatLng(m.lat,m.lng)),M.current=document.createElement("div");var n=new a.InfoBox(P({},v,{},e?{position:e}:{}));x(n)}null!==y&&null!==M.current&&(y.setContent(M.current),f?y.open(h,f):y.getPosition()?y.open(h):t(!1),p&&p(y))}return function(){null!==y&&(g&&g(y),y.close())}}),[y,h,i,p,g,f,M,v,m]),n.useEffect((function(){var n=s({updaterMap:X,eventMap:Q,prevProps:C,nextProps:e,instance:y});return function(){l(n)}}),[e,y,C]),null===M.current?n.createElement(n.Fragment,null):n.createElement(n.Fragment,null,r.createPortal(n.Children.only(o),M.current))}var ee=n.memo($),ne={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},te={options:function(e,n){e.setOptions(n)},position:function(e,n){e.setPosition(n)},zIndex:function(e,n){e.setZIndex(n)}};function oe(e){var o=e.children,a=e.anchor,i=e.options,f=e.onLoad,p=e.onUnmount,g=n.useContext(u),d=c(e),m=n.useState(null),v=m[0],h=m[1],C=n.useState(null),M=C[0],E=C[1];return n.useEffect((function(){return null!==g&&(null===M&&(E(new google.maps.InfoWindow(P({},i||{}))),h(document.createElement("div"))),null!==M&&null!==v&&(M.setContent(v),a?M.open(g,a):M.getPosition()?M.open(g):t(!1),f&&f(M))),function(){null!==M&&(p&&p(M),M.close())}}),[M,a,v,g,i,f,p]),n.useEffect((function(){var n=s({updaterMap:te,eventMap:ne,prevProps:d,nextProps:e,instance:M});return function(){l(n)}}),[e,M,d]),v?n.createElement(n.Fragment,null,r.createPortal(n.Children.only(o),v)):n.createElement(n.Fragment,null)}var re=n.memo(oe),ae={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},ue={draggable:function(e,n){e.setDraggable(n)},editable:function(e,n){e.setEditable(n)},map:function(e,n){e.setMap(n)},options:function(e,n){e.setOptions(n)},path:function(e,n){e.setPath(n)},visible:function(e,n){e.setVisible(n)}};function ie(e){var t=e.options,o=e.onLoad,r=e.onUnmount,a=n.useContext(u),i=c(e),f=n.useState(null),p=f[0],g=f[1];return n.useEffect((function(){return null!==a&&(null===p&&g(new google.maps.Polyline(P({},t||{},{map:a}))),null!==p&&(p.setMap(a),o&&o(p))),function(){null!==p&&(r&&r(p),p.setMap(null))}}),[p,a,t,o,r]),n.useEffect((function(){var n=s({updaterMap:ue,eventMap:ae,prevProps:i,nextProps:e,instance:p});return function(){l(n)}}),[e,p,i]),n.createElement(n.Fragment,null)}var le=n.memo(ie),se={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},ce={draggable:function(e,n){e.setDraggable(n)},editable:function(e,n){e.setEditable(n)},map:function(e,n){e.setMap(n)},options:function(e,n){e.setOptions(n)},path:function(e,n){e.setPath(n)},paths:function(e,n){e.setPaths(n)},visible:function(e,n){e.setVisible(n)}};function fe(e){var t=e.options,o=e.onLoad,r=e.onUnmount,a=n.useContext(u),i=c(e),f=n.useState(null),p=f[0],g=f[1];return n.useEffect((function(){return null!==a&&(null===p&&g(new google.maps.Polygon(P({},t||{},{map:a}))),null!==p&&(p.setMap(a),o&&o(p))),function(){null!==p&&(r&&r(p),p.setMap(null))}}),[p,a,t,o,r]),n.useEffect((function(){var n=s({updaterMap:ce,eventMap:se,prevProps:i,nextProps:e,instance:p});return function(){l(n)}}),[e,p,i]),n.createElement(n.Fragment,null)}var pe=n.memo(fe),ge={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},de={bounds:function(e,n){e.setBounds(n)},draggable:function(e,n){e.setDraggable(n)},editable:function(e,n){e.setEditable(n)},map:function(e,n){e.setMap(n)},options:function(e,n){e.setOptions(n)},visible:function(e,n){e.setVisible(n)}};function me(e){var t=e.options,o=e.onLoad,r=e.onUnmount,a=n.useContext(u),i=c(e),f=n.useState(null),p=f[0],g=f[1];return n.useEffect((function(){return null!==a&&(null===p&&g(new google.maps.Rectangle(P({},t||{},{map:a}))),null!==p&&(p.setMap(a),o&&o(p))),function(){null!==p&&(r&&r(p),p.setMap(null))}}),[p,a,t,o,r]),n.useEffect((function(){var n=s({updaterMap:de,eventMap:ge,prevProps:i,nextProps:e,instance:p});return function(){l(n)}}),[e,p,i]),n.createElement(n.Fragment,null)}var ve=n.memo(me),he={onCenterChanged:"center_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRadiusChanged:"radius_changed",onRightClick:"rightclick"},Ce={center:function(e,n){e.setCenter(n)},draggable:function(e,n){e.setDraggable(n)},editable:function(e,n){e.setEditable(n)},map:function(e,n){e.setMap(n)},options:function(e,n){e.setOptions(n)},radius:function(e,n){e.setRadius(n)},visible:function(e,n){e.setVisible(n)}};function Me(e){var t=e.options,o=e.onLoad,r=e.onUnmount,a=n.useContext(u),i=c(e),f=n.useState(null),p=f[0],g=f[1];return n.useEffect((function(){return null!==a&&(null===p&&g(new google.maps.Circle(P({},t||{},{map:a}))),null!==p&&(p.setMap(a),o&&o(p))),function(){null!==p&&(r&&r(p),p.setMap(null))}}),[p,a,t,o,r]),n.useEffect((function(){var n=s({updaterMap:Ce,eventMap:he,prevProps:i,nextProps:e,instance:p});return function(){l(n)}}),[e,p,i]),n.createElement(n.Fragment,null)}var Ee=n.memo(Me),ye={onAddFeature:"addfeature",onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onRightClick:"rightclick",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},xe={add:function(e,n){e.add(n)},addgeojson:function(e,n,t){e.addGeoJson(n,t)},contains:function(e,n){e.contains(n)},foreach:function(e,n){e.forEach(n)},loadgeojson:function(e,n,t,o){e.loadGeoJson(n,t,o)},overridestyle:function(e,n,t){e.overrideStyle(n,t)},remove:function(e,n){e.remove(n)},revertstyle:function(e,n){e.revertStyle(n)},controlposition:function(e,n){e.setControlPosition(n)},controls:function(e,n){e.setControls(n)},drawingmode:function(e,n){e.setDrawingMode(n)},map:function(e,n){e.setMap(n)},style:function(e,n){e.setStyle(n)},togeojson:function(e,n){e.toGeoJson(n)}};function we(e){var t=e.options,o=e.onLoad,r=e.onUnmount,a=n.useContext(u),i=c(e),f=n.useState(null),p=f[0],g=f[1];return n.useEffect((function(){return null!==a&&(null===p&&g(new google.maps.Data(P({},t||{},{map:a}))),null!==p&&(p.setMap(a),o&&o(p))),function(){null!==p&&(r&&r(p),p.setMap(null))}}),[p,a,t,o,r]),n.useEffect((function(){var n=s({updaterMap:xe,eventMap:ye,prevProps:i,nextProps:e,instance:p});return function(){l(n)}}),[e,p,i]),n.createElement(n.Fragment,null)}var be=n.memo(we),Pe={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},ke={options:function(e,n){e.setOptions(n)},url:function(e,n){e.setUrl(n)},zIndex:function(e,n){e.setZIndex(n)}};function Le(e){var t=e.options,o=e.onLoad,r=e.onUnmount,a=n.useContext(u),i=c(e),f=n.useState(null),p=f[0],g=f[1];return n.useEffect((function(){return null!==a&&(null===p&&g(new google.maps.KmlLayer(P({},t||{},{map:a}))),null!==p&&(p.setMap(a),o&&o(p))),function(){null!==p&&(r&&r(p),p.setMap(null))}}),[p,a,t,o,r]),n.useEffect((function(){var n=s({updaterMap:ke,eventMap:Pe,prevProps:i,nextProps:e,instance:p});return function(){l(n)}}),[e,p,i]),n.createElement(n.Fragment,null)}var Se=n.memo(Le);function De(e){var t=e.children,o=e.onLoad;return n.useEffect((function(){o&&o()}),[o]),n.createElement(n.Fragment,null,t)}var Oe=n.memo(De);function Ie(e,n){return new n(e.lat,e.lng)}function Re(e,n){return new n(new google.maps.LatLng(e.ne.lat,e.ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))}function Te(e,n,t){return e instanceof n?e:t(e,n)}function _e(e){return e?(e instanceof google.maps.LatLng?e:new google.maps.LatLng(e.lat,e.lng))+"":""}function Ue(e){return e?(e instanceof google.maps.LatLngBounds?e:new google.maps.LatLngBounds(new google.maps.LatLng(e.south,e.east),new google.maps.LatLng(e.north,e.west)))+"":""}function Fe(e){var o=e.children,a=e.mapPaneName,i=e.bounds,l=e.getPixelPositionOffset,s=e.onLoad,f=e.onUnmount,p=e.position,g=c(e),d=n.useContext(u),m=n.useState(null),v=m[0],h=m[1],C=n.useState(null),M=C[0],E=C[1],y=n.useRef(null),x=n.useRef(null),w=n.useCallback((function(){if(null!==v){var e=function(e,n,t,o){return void 0!==t?function(e,n,t){var o=e.fromLatLngToDivPixel(t.getNorthEast()),r=e.fromLatLngToDivPixel(t.getSouthWest());return o&&r?{left:r.x+n.x+"px",top:o.y+n.y+"px",width:o.x-r.x-n.x+"px",height:r.y-o.y-n.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,n,Te(t,google.maps.LatLngBounds,Re)):void 0!==o?function(e,n,t){var o=e.fromLatLngToDivPixel(t);return o?{left:o.x+n.x+"px",top:o.y+n.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,n,Te(o,google.maps.LatLng,Ie)):null}(v.getProjection(),P({x:0,y:0},x.current?function(e,n){return"function"==typeof n?n(e.offsetWidth,e.offsetHeight):{}}(x.current,l):{}),i,p);E(e)}}),[i,l,v,p]),b=n.useCallback((function(){w()}),[w]),k=n.useCallback((function(){y.current=null}),[]),L=n.useCallback((function(){null!==v&&s&&s(v),w()}),[v,s,w]),S=n.useCallback((function(){if(a||t(!1),null!==v){var e=v.getPanes();if(!e)return;y.current=e[a]}}),[v,a]);n.useEffect((function(){var e=new google.maps.OverlayView;return e.onAdd=S,e.draw=b,e.onRemove=k,e.setMap(d),h(e),function(){null!==e&&(f&&f(e),e.setMap(null))}}),[b,d,S,k,f]),n.useEffect((function(){var e=_e(g.position),n=_e(p),t=Ue(g.bounds),o=Ue(i),r=0;return e===n&&t===o||(r=window.setTimeout((function(){null!==v&&v.draw()}),0)),function(){window.clearTimeout(r)}}),[i,v,p,g.bounds,g.position]);var D=n.useMemo((function(){return P({},M,{position:"absolute"})}),[M]);return null!==y.current?r.createPortal(n.createElement("div",{ref:x,style:D},n.createElement(Oe,{onLoad:L},n.Children.only(o))),y.current):n.createElement(n.Fragment,null)}var ze=n.memo(Fe);function Be(){}var Ne={onDblClick:"dblclick",onClick:"click"},je={opacity:function(e,n){e.setOpacity(n)}};function Ae(e){var o=e.options,r=e.url,a=e.bounds,i=e.onLoad,f=void 0===i?Be:i,p=e.onUnmount,g=n.useContext(u),d=c(e),m=n.useState(null),v=m[0],h=m[1];return n.useEffect((function(){return r||a||t(!1),null!==g&&(null===v&&h(new google.maps.GroundOverlay(r,a,P({},o||{},{map:g}))),null!==v&&(v.setMap(g),f&&f(v))),function(){null!==v&&(p&&p(v),v.setMap(null))}}),[v,g,a,r,o,f,p]),n.useEffect((function(){var n=s({updaterMap:je,eventMap:Ne,prevProps:d,nextProps:e,instance:v});return function(){l(n)}}),[e,v,d]),n.createElement(n.Fragment,null)}var Ve=n.memo(Ae),Ge={},Ze={data:function(e,n){e.setData(n)},map:function(e,n){e.setMap(n)},options:function(e,n){e.setOptions(n)}};function He(e){var o=e.data,r=e.options,a=e.onLoad,i=e.onUnmount,f=n.useContext(u),p=c(e),g=n.useState(null),d=g[0],m=g[1];return n.useEffect((function(){return google.maps.visualization||t(!1),o||t(!1),null!==f&&(null===d&&m(new google.maps.visualization.HeatmapLayer(P({},r||{},{data:o,map:f}))),null!==d&&(d.setMap(f),a&&a(d))),function(){null!==d&&(i&&i(d),d.setMap(null))}}),[d,o,f,r,a,i]),n.useEffect((function(){var n=s({updaterMap:Ze,eventMap:Ge,prevProps:p,nextProps:e,instance:d});return function(){l(n)}}),[e,d,p]),n.createElement(n.Fragment,null)}var qe=n.memo(He),Ke={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},We={register:function(e,n,t){e.registerPanoProvider(n,t)},links:function(e,n){e.setLinks(n)},motionTracking:function(e,n){e.setMotionTracking(n)},options:function(e,n){e.setOptions(n)},pano:function(e,n){e.setPano(n)},position:function(e,n){e.setPosition(n)},pov:function(e,n){e.setPov(n)},visible:function(e,n){e.setVisible(n)},zoom:function(e,n){e.setZoom(n)}};function Je(e){var t=e.onLoad,o=e.onUnmount,r=n.useState(null),a=r[0],u=r[1];return n.useEffect((function(){var e=new google.maps.StreetViewService;return u(e),null!==a&&t&&t(a),function(){null!==a&&o&&o(a)}}),[a,t,o]),n.createElement(n.Fragment,null)}var Ye=n.memo(Je);function Qe(e){var o=e.options,r=e.callback,a=e.onLoad,u=e.onUnmount,i=n.useState(null),l=i[0],s=i[1];return n.useEffect((function(){return o||t(!1),null===l&&s(new google.maps.DirectionsService),null!==l&&a&&a(l),function(){null!==l&&u&&u(l)}}),[l,o,a,u]),n.useEffect((function(){null!==l&&l.route(o,r)}),[l,o,r]),n.createElement(n.Fragment,null)}var Xe=n.memo(Qe),$e={onDirectionsChanged:"directions_changed"},en={directions:function(e,n){e.setDirections(n)},map:function(e,n){e.setMap(n)},options:function(e,n){e.setOptions(n)},panel:function(e,n){e.setPanel(n)},routeIndex:function(e,n){e.setRouteIndex(n)}};function nn(e){var t=e.options,o=e.onLoad,r=e.onUnmount,a=n.useContext(u),i=c(e),f=n.useState(null),p=f[0],g=f[1];return n.useEffect((function(){return null!==a&&(null===p&&g(new google.maps.DirectionsRenderer(t)),null!==p&&(p.setMap(a),o&&o(p))),function(){null!==p&&(r&&r(p),p.setMap(null))}}),[p,a,t,o,r]),n.useEffect((function(){var n=s({updaterMap:en,eventMap:$e,prevProps:i,nextProps:e,instance:p});return function(){l(n)}}),[e,p,i]),n.createElement(n.Fragment,null)}var tn=n.memo(nn);function on(e){var o=e.options,r=e.callback,a=e.onLoad,u=e.onUnmount,i=n.useState(null),l=i[0],s=i[1];return n.useEffect((function(){return o||t(!1),null===l&&s(new google.maps.DistanceMatrixService),null!==l&&a&&a(l),function(){null!==l&&u&&u(l)}}),[l,o,a,u]),n.useEffect((function(){null!==l&&l.getDistanceMatrix(o,r)}),[l,o,r]),n.createElement(n.Fragment,null)}var rn=n.memo(on),an={onPlacesChanged:"places_changed"},un={bounds:function(e,n){e.setBounds(n)}};function ln(e){var o=e.children,r=e.options,a=e.onLoad,i=e.onUnmount,f=n.useContext(u),p=c(e),g=n.useRef(null),d=n.useState(null),m=d[0],v=d[1];return n.useEffect((function(){if(google.maps.places||t(!1),null!==f&&null!==g.current){var e=g.current.querySelector("input");if(null!==e){var n=new google.maps.places.SearchBox(e,r);v(n),null!==n&&a&&a(n)}}return function(){null!==m&&i&&i(m)}}),[m,f,r,a,i]),n.useEffect((function(){var n=s({updaterMap:un,eventMap:an,prevProps:p,nextProps:e,instance:m});return function(){l(n)}}),[e,m,p]),n.createElement("div",{ref:g},n.Children.only(o))}var sn=n.memo(ln),cn={onPlaceChanged:"place_changed"},fn={bounds:function(e,n){e.setBounds(n)},restrictions:function(e,n){e.setComponentRestrictions(n)},fields:function(e,n){e.setFields(n)},options:function(e,n){e.setOptions(n)},types:function(e,n){e.setTypes(n)}};function pn(e){var o=e.children,r=e.options,a=e.onLoad,i=e.onUnmount,f=n.useContext(u),p=c(e),g=n.useRef(null),d=n.useState(null),m=d[0],v=d[1];return n.useEffect((function(){if(google.maps.places||t(!1),null!==g.current){var e=g.current.querySelector("input");if(e){var n=new google.maps.places.Autocomplete(e,r);v(n),a&&a(n)}}return function(){null!==m&&i&&i(m)}}),[m,f,r,a,i]),n.useEffect((function(){var n=s({updaterMap:fn,eventMap:cn,prevProps:p,nextProps:e,instance:m});return function(){l(n)}}),[e,m,p]),n.createElement("div",{ref:g},n.Children.only(o))}exports.Autocomplete=n.memo(pn),exports.BicyclingLayer=F,exports.Circle=Ee,exports.Data=be,exports.DirectionsRenderer=tn,exports.DirectionsService=Xe,exports.DistanceMatrixService=rn,exports.DrawingManager=V,exports.GoogleMap=d,exports.GroundOverlay=Ve,exports.HeatmapLayer=qe,exports.InfoBox=ee,exports.InfoWindow=re,exports.KmlLayer=Se,exports.LoadScript=b,exports.LoadScriptNext=O,exports.MapContext=u,exports.Marker=q,exports.MarkerClusterer=Y,exports.OverlayView=ze,exports.Polygon=pe,exports.Polyline=le,exports.Rectangle=ve,exports.StandaloneSearchBox=sn,exports.StreetViewPanorama=function(e){var t=e.options,o=e.onLoad,r=e.onUnmount,a=n.useContext(u),i=c(e),f=n.useState(null),p=f[0],g=f[1];return n.useEffect((function(){return null!==a&&(null===p&&g(a.getStreetView()),null!==p&&o&&o(p)),function(){null!==p&&(r&&r(p),p.setVisible(!1))}}),[p,a,t,o,r]),n.useEffect((function(){var n=s({updaterMap:We,eventMap:Ke,prevProps:i,nextProps:e,instance:p});return function(){l(n)}}),[e,p,i]),n.createElement(n.Fragment,null)},exports.StreetViewService=Ye,exports.TrafficLayer=_,exports.TransitLayer=B,exports.useGoogleMap=function(){n.useContext||t(!1);var e=n.useContext(u);return e||t(!1),e},exports.useLoadScript=L; | ||
//# sourceMappingURL=reactgooglemapsapi.cjs.production.min.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("invariant"),require("@react-google-maps/marker-clusterer"),require("react-dom"),require("@react-google-maps/infobox")):"function"==typeof define&&define.amd?define(["exports","react","invariant","@react-google-maps/marker-clusterer","react-dom","@react-google-maps/infobox"],e):e((t=t||self).reactGoogleMapsApi={},t.React,t.invariant,t.markerClusterer,t.ReactDOM,t.infobox)}(this,(function(t,e,n,o,r,s){"use strict";function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function a(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function p(t,e){if(null==t)return{};var n,o,r={},s=Object.keys(t);for(o=0;o<s.length;o++)e.indexOf(n=s[o])>=0||(r[n]=t[n]);return r}n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;var c=e.createContext(null);function l(t){google.maps.event.removeListener(t)}function u(t){void 0===t&&(t=[]),t.forEach(l)}function d(t){var e=t.updaterMap,n=t.prevProps,o=t.nextProps,r=t.instance,s=function(t,e,n){return o=n,Object.keys(o).reduce((function(n,r){return s=n,"function"==typeof t[i=r]&&s.push(google.maps.event.addListener(e,o[r],t[i])),s;var s,i}),[]);var o}(o,r,t.eventMap);return function(t,e,n,o){var r,s={};r=t,Object.keys(r).forEach((function(t){return function(t,r){var i=n[r];i!==e[r]&&(s[r]=i,t(o,i))}(r[t],t)}))}(e,n,o,r),s}var h={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},g={extraMapTypes:function(t,e){e.forEach((function(e,n){t.mapTypes.set(String(n),e)}))},center:function(t,e){t.setCenter(e)},clickableIcons:function(t,e){t.setClickableIcons(e)},heading:function(t,e){t.setHeading(e)},mapTypeId:function(t,e){t.setMapTypeId(e)},options:function(t,e){t.setOptions(e)},streetView:function(t,e){t.setStreetView(e)},tilt:function(t,e){t.setTilt(e)},zoom:function(t,e){t.setZoom(e)}},f=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={map:null},e.registeredEvents=[],e.mapRef=null,e.getInstance=function(){return null===e.mapRef?null:new google.maps.Map(e.mapRef,e.props.options)},e.panTo=function(t){var n=e.getInstance();n&&n.panTo(t)},e.setMapCallback=function(){null!==e.state.map&&e.props.onLoad&&e.props.onLoad(e.state.map)},e.getRef=function(t){e.mapRef=t},e}a(n,t);var o=n.prototype;return o.componentDidMount=function(){var t=this.getInstance();this.registeredEvents=d({updaterMap:g,eventMap:h,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{map:t}}),this.setMapCallback)},o.componentDidUpdate=function(t){null!==this.state.map&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:g,eventMap:h,prevProps:t,nextProps:this.props,instance:this.state.map}))},o.componentWillUnmount=function(){null!==this.state.map&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),u(this.registeredEvents))},o.render=function(){return e.createElement("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName},e.createElement(c.Provider,{value:this.state.map},null!==this.state.map?this.props.children:e.createElement(e.Fragment,null)))},n}(e.PureComponent),m="undefined"!=typeof document,v=function(t){var e=t.url,n=t.id;return m?new Promise((function(t,o){var r=document.getElementById(n),s=window;if(r){var i=r.getAttribute("data-state");if(r.src===e&&"error"!==i){if("ready"===i)return t(n);var a=s.initMap,p=r.onerror;return s.initMap=function(){a&&a(),t(n)},void(r.onerror=function(t){p&&p(t),o(t)})}r.remove()}var c=document.createElement("script");c.type="text/javascript",c.src=e,c.id=n,c.async=!0,c.onerror=function(t){c.setAttribute("data-state","error"),o(t)},s.initMap=function(){c.setAttribute("data-state","ready"),t(n)},document.head.appendChild(c)})).catch((function(t){throw console.error("injectScript error: ",t),t})):Promise.reject(new Error("document is undefined"))},y=function(t){return!((!t.href||0!==t.href.indexOf("https://fonts.googleapis.com/css?family=Roboto"))&&("style"===t.tagName.toLowerCase()&&t.styleSheet&&t.styleSheet.cssText&&0===t.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(t.styleSheet.cssText="",0):"style"===t.tagName.toLowerCase()&&t.innerHTML&&0===t.innerHTML.replace("\r\n","").indexOf(".gm-style")?(t.innerHTML="",0):"style"!==t.tagName.toLowerCase()||t.styleSheet||t.innerHTML))},M=function(){var t=document.getElementsByTagName("head")[0],e=t.insertBefore.bind(t);t.insertBefore=function(n,o){y(n)||Reflect.apply(e,t,[n,o])};var n=t.appendChild.bind(t);t.appendChild=function(e){y(e)||Reflect.apply(n,t,[e])}};function C(t){var e=t.googleMapsApiKey,o=t.googleMapsClientId,r=t.version,s=void 0===r?"weekly":r,i=t.language,a=t.region,p=t.libraries,c=t.channel,l=[];return e&&o||!e||!o||n(!1),e?l.push("key="+e):o&&l.push("client="+o),s&&l.push("v="+s),i&&l.push("language="+i),a&&l.push("region="+a),p&&p.length&&l.push("libraries="+p.sort().join(",")),c&&l.push("channel="+c),l.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?"+l.join("&")}var E=!1;function P(){return e.createElement("div",null,"Loading...")}var k,x={id:"script-loader",version:"weekly"},L=function(t){function o(){var o;return(o=t.apply(this,arguments)||this).check=e.createRef(),o.state={loaded:!1},o.cleanupCallback=function(){delete window.google,o.injectScript()},o.isCleaningUp=function(){try{return Promise.resolve(new Promise((function(t){if(E){if(m)var e=window.setInterval((function(){E||(window.clearInterval(e),t())}),1)}else t()})))}catch(t){return Promise.reject(t)}},o.cleanup=function(){E=!0;var t=document.getElementById(o.props.id);t&&t.parentNode&&t.parentNode.removeChild(t),Array.prototype.slice.call(document.getElementsByTagName("script")).filter((function(t){return"string"==typeof t.src&&t.src.includes("maps.googleapis")})).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)})),Array.prototype.slice.call(document.getElementsByTagName("link")).filter((function(t){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===t.href})).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)})),Array.prototype.slice.call(document.getElementsByTagName("style")).filter((function(t){return void 0!==t.innerText&&t.innerText.length>0&&t.innerText.includes(".gm-")})).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))},o.injectScript=function(){o.props.preventGoogleFontsLoading&&M(),o.props.id||n(!1);var t={id:o.props.id,url:C(o.props)};v(t).then((function(){o.props.onLoad&&o.props.onLoad(),o.setState((function(){return{loaded:!0}}))})).catch((function(t){o.props.onError&&o.props.onError(t),console.error("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(o.props.googleMapsApiKey||"-")+") or Client ID ("+(o.props.googleMapsClientId||"-")+") to <LoadScript />\n Otherwise it is a Network issue.\n ")}))},o}a(o,t);var r=o.prototype;return r.componentDidMount=function(){if(m){if(window.google&&!E)return void console.error("google api is already presented");this.isCleaningUp().then(this.injectScript).catch((function(t){console.error("Error at injecting script after cleaning up: ",t)}))}},r.componentDidUpdate=function(t){this.props.libraries!==t.libraries&&console.warn("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"),m&&t.language!==this.props.language&&(this.cleanup(),this.setState((function(){return{loaded:!1}}),this.cleanupCallback))},r.componentWillUnmount=function(){var t=this;m&&(this.cleanup(),window.setTimeout((function(){t.check.current||(delete window.google,E=!1)}),1),this.props.onUnmount&&this.props.onUnmount())},r.render=function(){return e.createElement(e.Fragment,null,e.createElement("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||e.createElement(P,null))},o}(e.PureComponent);function w(t){var o=t.id,r=void 0===o?x.id:o,s=t.version,i=void 0===s?x.version:s,a=t.googleMapsApiKey,p=t.googleMapsClientId,c=t.language,l=t.region,u=t.libraries,d=t.preventGoogleFontsLoading,h=t.channel,g=e.useRef(!1),f=e.useState(!1),y=f[0],E=f[1],P=e.useState(void 0),L=P[0],w=P[1];e.useEffect((function(){return g.current=!0,function(){g.current=!1}}),[]),e.useEffect((function(){m&&d&&M()}),[d]),e.useEffect((function(){y&&(window.google||n(!1))}),[y]);var b=C({version:i,googleMapsApiKey:a,googleMapsClientId:p,language:c,region:l,libraries:u,channel:h});e.useEffect((function(){function t(){g.current&&(E(!0),k=b)}m&&(window.google&&k===b?t():v({id:r,url:b}).then(t).catch((function(t){g.current&&w(t),console.warn("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(a||"-")+") or Client ID ("+(p||"-")+")\n Otherwise it is a Network issue.\n "),console.error(t)})))}),[r,b]);var S=e.useRef();return e.useEffect((function(){S.current&&u!==S.current&&console.warn("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"),S.current=u}),[u]),{isLoaded:y,loadError:L,url:b}}L.defaultProps=x;var b=e.createElement(P,null);function S(t){var n=t.loadingElement,o=t.onLoad,r=t.onError,s=t.onUnmount,i=t.children,a=w(p(t,["loadingElement","onLoad","onError","onUnmount","children"])),c=a.isLoaded,l=a.loadError;return e.useEffect((function(){c&&"function"==typeof o&&o()}),[c,o]),e.useEffect((function(){l&&"function"==typeof r&&r(l)}),[l,r]),e.useEffect((function(){return function(){s&&s()}}),[s]),c?i:n||b}var D=e.memo(S),U={},O={options:function(t,e){t.setOptions(e)}},R=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).state={trafficLayer:null},e.setTrafficLayerCallback=function(){null!==e.state.trafficLayer&&e.props.onLoad&&e.props.onLoad(e.state.trafficLayer)},e.registeredEvents=[],e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=new google.maps.TrafficLayer(i({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:O,eventMap:U,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{trafficLayer:t}}),this.setTrafficLayerCallback)},n.componentDidUpdate=function(t){null!==this.state.trafficLayer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:O,eventMap:U,prevProps:t,nextProps:this.props,instance:this.state.trafficLayer}))},n.componentWillUnmount=function(){null!==this.state.trafficLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),u(this.registeredEvents),this.state.trafficLayer.setMap(null))},n.render=function(){return null},e}(e.PureComponent);R.contextType=c;var T=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).state={bicyclingLayer:null},e.setBicyclingLayerCallback=function(){null!==e.state.bicyclingLayer&&(e.state.bicyclingLayer.setMap(e.context),e.props.onLoad&&e.props.onLoad(e.state.bicyclingLayer))},e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=new google.maps.BicyclingLayer;this.setState((function(){return{bicyclingLayer:t}}),this.setBicyclingLayerCallback)},n.componentWillUnmount=function(){null!==this.state.bicyclingLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},n.render=function(){return null},e}(e.PureComponent);T.contextType=c;var V=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).state={transitLayer:null},e.setTransitLayerCallback=function(){null!==e.state.transitLayer&&(e.state.transitLayer.setMap(e.context),e.props.onLoad&&e.props.onLoad(e.state.transitLayer))},e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=new google.maps.TransitLayer;this.setState((function(){return{transitLayer:t}}),this.setTransitLayerCallback)},n.componentWillUnmount=function(){null!==this.state.transitLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},n.render=function(){return null},e}(e.PureComponent);V.contextType=c;var I={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},_={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}},B=function(t){function o(e){var o;return(o=t.call(this,e)||this).registeredEvents=[],o.state={drawingManager:null},o.setDrawingManagerCallback=function(){null!==o.state.drawingManager&&o.props.onLoad&&o.props.onLoad(o.state.drawingManager)},google.maps.drawing||n(!1),o}a(o,t);var r=o.prototype;return r.componentDidMount=function(){var t=new google.maps.drawing.DrawingManager(i({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:_,eventMap:I,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{drawingManager:t}}),this.setDrawingManagerCallback)},r.componentDidUpdate=function(t){null!==this.state.drawingManager&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:_,eventMap:I,prevProps:t,nextProps:this.props,instance:this.state.drawingManager}))},r.componentWillUnmount=function(){null!==this.state.drawingManager&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),u(this.registeredEvents),this.state.drawingManager.setMap(null))},r.render=function(){return e.createElement(e.Fragment,null)},o}(e.PureComponent);B.contextType=c;var W={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},A={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},j=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={marker:null},e.setMarkerCallback=function(){null!==e.state.marker&&e.props.onLoad&&e.props.onLoad(e.state.marker)},e}a(n,t);var o=n.prototype;return o.componentDidMount=function(){var t=i({},this.props.options||{},{},this.props.clusterer?{}:{map:this.context},{position:this.props.position}),e=new google.maps.Marker(t);this.props.clusterer?this.props.clusterer.addMarker(e,!!this.props.noClustererRedraw):e.setMap(this.context),this.registeredEvents=d({updaterMap:A,eventMap:W,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{marker:e}}),this.setMarkerCallback)},o.componentDidUpdate=function(t){null!==this.state.marker&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:A,eventMap:W,prevProps:t,nextProps:this.props,instance:this.state.marker}))},o.componentWillUnmount=function(){null!==this.state.marker&&(this.props.onUnmount&&this.props.onUnmount(this.state.marker),u(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.state.marker,!!this.props.noClustererRedraw):this.state.marker&&this.state.marker.setMap(null))},o.render=function(){var t=this,n=null;return this.props.children&&(n=e.Children.map(this.props.children,(function(n){return e.isValidElement(n)?e.cloneElement(n,{anchor:t.state.marker}):n}))),n||null},n}(e.PureComponent);j.contextType=c;var N={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},z={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},F=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={markerClusterer:null},e.setClustererCallback=function(){null!==e.state.markerClusterer&&e.props.onLoad&&e.props.onLoad(e.state.markerClusterer)},e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){if(this.context){var t=new o.Clusterer(this.context,[],this.props.options);this.registeredEvents=d({updaterMap:z,eventMap:N,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{markerClusterer:t}}),this.setClustererCallback)}},n.componentDidUpdate=function(t){this.state.markerClusterer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:z,eventMap:N,prevProps:t,nextProps:this.props,instance:this.state.markerClusterer}))},n.componentWillUnmount=function(){null!==this.state.markerClusterer&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),u(this.registeredEvents),this.state.markerClusterer.setMap(null))},n.render=function(){return null!==this.state.markerClusterer?this.props.children(this.state.markerClusterer):null},e}(e.PureComponent);F.contextType=c;var G={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Z={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},H=function(t){function o(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.containerElement=null,e.state={infoBox:null},e.open=function(t,o){o?t.open(e.context,o):t.getPosition()?t.open(e.context):n(!1)},e.setInfoBoxCallback=function(){var t=e.props,n=t.anchor,o=t.onLoad,r=e.state.infoBox;null!==r&&null!==e.containerElement&&(r.setContent(e.containerElement),e.open(r,n),o&&o(r))},e}a(o,t);var c=o.prototype;return c.componentDidMount=function(){var t,e=this.props.options||{},n=e.position,o=p(e,["position"]);!n||n instanceof google.maps.LatLng||(t=new google.maps.LatLng(n.lat,n.lng));var r=new s.InfoBox(i({},o,{},t?{position:t}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=d({updaterMap:Z,eventMap:G,prevProps:{},nextProps:this.props,instance:r}),this.setState({infoBox:r},this.setInfoBoxCallback)},c.componentDidUpdate=function(t){var e=this.state.infoBox;null!==e&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:Z,eventMap:G,prevProps:t,nextProps:this.props,instance:e}))},c.componentWillUnmount=function(){var t=this.props.onUnmount,e=this.state.infoBox;null!==e&&(t&&t(e),u(this.registeredEvents),e.close())},c.render=function(){return this.containerElement?r.createPortal(e.Children.only(this.props.children),this.containerElement):null},o}(e.PureComponent);H.contextType=c;var K={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},q={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}},Y=function(t){function o(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.containerElement=null,e.state={infoWindow:null},e.open=function(t,o){o?t.open(e.context,o):t.getPosition()?t.open(e.context):n(!1)},e.setInfoWindowCallback=function(){null!==e.state.infoWindow&&null!==e.containerElement&&(e.state.infoWindow.setContent(e.containerElement),e.open(e.state.infoWindow,e.props.anchor),e.props.onLoad&&e.props.onLoad(e.state.infoWindow))},e}a(o,t);var s=o.prototype;return s.componentDidMount=function(){var t=new google.maps.InfoWindow(i({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=d({updaterMap:q,eventMap:K,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{infoWindow:t}}),this.setInfoWindowCallback)},s.componentDidUpdate=function(t){null!==this.state.infoWindow&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:q,eventMap:K,prevProps:t,nextProps:this.props,instance:this.state.infoWindow}))},s.componentWillUnmount=function(){null!==this.state.infoWindow&&(u(this.registeredEvents),this.state.infoWindow.close())},s.render=function(){return this.containerElement?r.createPortal(e.Children.only(this.props.children),this.containerElement):e.createElement(e.Fragment,null)},o}(e.PureComponent);Y.contextType=c;var J={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Q={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},X=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={polyline:null},e.setPolylineCallback=function(){null!==e.state.polyline&&e.props.onLoad&&e.props.onLoad(e.state.polyline)},e}a(n,t);var o=n.prototype;return o.componentDidMount=function(){var t=new google.maps.Polyline(i({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:Q,eventMap:J,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{polyline:t}}),this.setPolylineCallback)},o.componentDidUpdate=function(t){null!==this.state.polyline&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:Q,eventMap:J,prevProps:t,nextProps:this.props,instance:this.state.polyline}))},o.componentWillUnmount=function(){null!==this.state.polyline&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),u(this.registeredEvents),this.state.polyline.setMap(null))},o.render=function(){return e.createElement(e.Fragment,null)},n}(e.PureComponent);X.contextType=c;var $={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},tt={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}},et=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={polygon:null},e.setPolygonCallback=function(){null!==e.state.polygon&&e.props.onLoad&&e.props.onLoad(e.state.polygon)},e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=new google.maps.Polygon(i({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:tt,eventMap:$,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{polygon:t}}),this.setPolygonCallback)},n.componentDidUpdate=function(t){null!==this.state.polygon&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:tt,eventMap:$,prevProps:t,nextProps:this.props,instance:this.state.polygon}))},n.componentWillUnmount=function(){null!==this.state.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),u(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},n.render=function(){return null},e}(e.PureComponent);et.contextType=c;var nt={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},ot={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}},rt=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={rectangle:null},e.setRectangleCallback=function(){null!==e.state.rectangle&&e.props.onLoad&&e.props.onLoad(e.state.rectangle)},e}a(n,t);var o=n.prototype;return o.componentDidMount=function(){var t=new google.maps.Rectangle(i({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:ot,eventMap:nt,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{rectangle:t}}),this.setRectangleCallback)},o.componentDidUpdate=function(t){null!==this.state.rectangle&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:ot,eventMap:nt,prevProps:t,nextProps:this.props,instance:this.state.rectangle}))},o.componentWillUnmount=function(){null!==this.state.rectangle&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),u(this.registeredEvents),this.state.rectangle.setMap(null))},o.render=function(){return e.createElement(e.Fragment,null)},n}(e.PureComponent);rt.contextType=c;var st={onCenterChanged:"center_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRadiusChanged:"radius_changed",onRightClick:"rightclick"},it={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},at=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={circle:null},e.setCircleCallback=function(){null!==e.state.circle&&e.props.onLoad&&e.props.onLoad(e.state.circle)},e}a(n,t);var o=n.prototype;return o.componentDidMount=function(){var t=new google.maps.Circle(i({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:it,eventMap:st,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{circle:t}}),this.setCircleCallback)},o.componentDidUpdate=function(t){null!==this.state.circle&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:it,eventMap:st,prevProps:t,nextProps:this.props,instance:this.state.circle}))},o.componentWillUnmount=function(){null!==this.state.circle&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),u(this.registeredEvents),this.state.circle&&this.state.circle.setMap(null))},o.render=function(){return e.createElement(e.Fragment,null)},n}(e.PureComponent);at.contextType=c;var pt={onAddFeature:"addfeature",onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onRightClick:"rightclick",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},ct={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,o){t.loadGeoJson(e,n,o)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}},lt=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={data:null},e.setDataCallback=function(){null!==e.state.data&&e.props.onLoad&&e.props.onLoad(e.state.data)},e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=new google.maps.Data(i({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:ct,eventMap:pt,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{data:t}}),this.setDataCallback)},n.componentDidUpdate=function(t){null!==this.state.data&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:ct,eventMap:pt,prevProps:t,nextProps:this.props,instance:this.state.data}))},n.componentWillUnmount=function(){null!==this.state.data&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),u(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},n.render=function(){return null},e}(e.PureComponent);lt.contextType=c;var ut={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},dt={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}},ht=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={kmlLayer:null},e.setKmlLayerCallback=function(){null!==e.state.kmlLayer&&e.props.onLoad&&e.props.onLoad(e.state.kmlLayer)},e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=new google.maps.KmlLayer(i({},this.props.options,{map:this.context}));this.registeredEvents=d({updaterMap:dt,eventMap:ut,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{kmlLayer:t}}),this.setKmlLayerCallback)},n.componentDidUpdate=function(t){null!==this.state.kmlLayer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:dt,eventMap:ut,prevProps:t,nextProps:this.props,instance:this.state.kmlLayer}))},n.componentWillUnmount=function(){null!==this.state.kmlLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),u(this.registeredEvents),this.state.kmlLayer.setMap(null))},n.render=function(){return null},e}(e.PureComponent);ht.contextType=c;var gt=function(t,e){return new e(t.lat,t.lng)},ft=function(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))},mt=function(t,e,n){return t instanceof e?t:n(t,e)},vt=function(t){function e(){return t.apply(this,arguments)||this}a(e,t);var n=e.prototype;return n.componentDidMount=function(){this.props.onLoad&&this.props.onLoad()},n.render=function(){return this.props.children},e}(e.Component);function yt(t){return t?(t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng))+"":""}function Mt(t){return t?(t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west)))+"":""}var Ct=function(t){function o(o){var r;return(r=t.call(this,o)||this).state={overlayView:null,containerStyle:{}},r.mapPaneEl=null,r.setOverlayViewCallback=function(){null!==r.state.overlayView&&r.props.onLoad&&r.props.onLoad(r.state.overlayView),r.onPositionElement()},r.onAdd=function(){var t;r.props.mapPaneName||n(!1);var e=null===(t=r.state.overlayView)||void 0===t?void 0:t.getPanes();e&&(r.mapPaneEl=e[r.props.mapPaneName])},r.onPositionElement=function(){if(null!==r.state.overlayView){var t=(e=r.state.overlayView.getProjection(),n=i({x:0,y:0},r.containerRef.current?(a=r.containerRef.current,"function"==typeof(p=r.props.getPixelPositionOffset)?p(a.offsetWidth,a.offsetHeight):{}):{}),s=r.props.position,void 0!==(o=r.props.bounds)?function(t,e,n){var o=t.fromLatLngToDivPixel(n.getNorthEast()),r=t.fromLatLngToDivPixel(n.getSouthWest());return o&&r?{left:r.x+e.x+"px",top:o.y+e.y+"px",width:o.x-r.x-e.x+"px",height:r.y-o.y-e.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,n,mt(o,google.maps.LatLngBounds,ft)):function(t,e,n){var o=t.fromLatLngToDivPixel(n);return o?{left:o.x+e.x+"px",top:o.y+e.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,n,mt(s,google.maps.LatLng,gt)));r.setState({containerStyle:t})}var e,n,o,s,a,p},r.draw=function(){r.onPositionElement()},r.onRemove=function(){r.mapPaneEl=null},r.containerRef=e.createRef(),r}a(o,t);var s=o.prototype;return s.componentDidMount=function(){var t=new google.maps.OverlayView;t.onAdd=this.onAdd,t.draw=this.draw,t.onRemove=this.onRemove,t.setMap(this.context),this.setState((function(){return{overlayView:t}}))},s.componentDidUpdate=function(t){var e=this,n=yt(t.position),o=yt(this.props.position),r=Mt(t.bounds),s=Mt(this.props.bounds);n===o&&r===s||setTimeout((function(){null!==e.state.overlayView&&e.state.overlayView.draw()}),0)},s.componentWillUnmount=function(){null!==this.state.overlayView&&(this.props.onUnmount&&this.props.onUnmount(this.state.overlayView),this.state.overlayView.setMap(null))},s.render=function(){return this.mapPaneEl?r.createPortal(e.createElement("div",{ref:this.containerRef,style:i({},this.state.containerStyle,{position:"absolute"})},e.createElement(vt,{onLoad:this.setOverlayViewCallback},e.Children.only(this.props.children))),this.mapPaneEl):e.createElement(e.Fragment,null)},o}(e.PureComponent);Ct.FLOAT_PANE="floatPane",Ct.MAP_PANE="mapPane",Ct.MARKER_LAYER="markerLayer",Ct.OVERLAY_LAYER="overlayLayer",Ct.OVERLAY_MOUSE_TARGET="overlayMouseTarget",Ct.contextType=c;var Et={onDblClick:"dblclick",onClick:"click"},Pt={opacity:function(t,e){t.setOpacity(e)}},kt=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={groundOverlay:null},e.setGroundOverlayCallback=function(){null!==e.state.groundOverlay&&e.props.onLoad&&e.props.onLoad(e.state.groundOverlay)},e}a(e,t);var o=e.prototype;return o.componentDidMount=function(){this.props.url||this.props.bounds||n(!1);var t=new google.maps.GroundOverlay(this.props.url,this.props.bounds,i({},this.props.options,{map:this.context}));this.registeredEvents=d({updaterMap:Pt,eventMap:Et,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{groundOverlay:t}}),this.setGroundOverlayCallback)},o.componentDidUpdate=function(t){null!==this.state.groundOverlay&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:Pt,eventMap:Et,prevProps:t,nextProps:this.props,instance:this.state.groundOverlay}))},o.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},o.render=function(){return null},e}(e.PureComponent);kt.defaultProps={onLoad:function(){}},kt.contextType=c;var xt={},Lt={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}},wt=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={heatmapLayer:null},e.setHeatmapLayerCallback=function(){null!==e.state.heatmapLayer&&e.props.onLoad&&e.props.onLoad(e.state.heatmapLayer)},e}a(e,t);var o=e.prototype;return o.componentDidMount=function(){google.maps.visualization||n(!1),this.props.data||n(!1);var t=new google.maps.visualization.HeatmapLayer(i({},this.props.options||{},{data:this.props.data,map:this.context}));this.registeredEvents=d({updaterMap:Lt,eventMap:xt,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{heatmapLayer:t}}),this.setHeatmapLayerCallback)},o.componentDidUpdate=function(t){u(this.registeredEvents),this.registeredEvents=d({updaterMap:Lt,eventMap:xt,prevProps:t,nextProps:this.props,instance:this.state.heatmapLayer})},o.componentWillUnmount=function(){null!==this.state.heatmapLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),u(this.registeredEvents),this.state.heatmapLayer.setMap(null))},o.render=function(){return null},e}(e.PureComponent);wt.contextType=c;var bt={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},St={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}},Dt=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={streetViewPanorama:null},e.setStreetViewPanoramaCallback=function(){null!==e.state.streetViewPanorama&&e.props.onLoad&&e.props.onLoad(e.state.streetViewPanorama)},e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=this.context.getStreetView();this.registeredEvents=d({updaterMap:St,eventMap:bt,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{streetViewPanorama:t}}),this.setStreetViewPanoramaCallback)},n.componentDidUpdate=function(t){null!==this.state.streetViewPanorama&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:St,eventMap:bt,prevProps:t,nextProps:this.props,instance:this.state.streetViewPanorama}))},n.componentWillUnmount=function(){null!==this.state.streetViewPanorama&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),u(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},n.render=function(){return null},e}(e.PureComponent);Dt.contextType=c;var Ut=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).state={streetViewService:null},e.setStreetViewServiceCallback=function(){null!==e.state.streetViewService&&e.props.onLoad&&e.props.onLoad(e.state.streetViewService)},e}a(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=new google.maps.StreetViewService;this.setState((function(){return{streetViewService:t}}),this.setStreetViewServiceCallback)},n.componentWillUnmount=function(){null!==this.state.streetViewService&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},n.render=function(){return null},e}(e.PureComponent);Ut.contextType=c;var Ot=function(t){function o(){var e;return(e=t.apply(this,arguments)||this).state={directionsService:null},e.setDirectionsServiceCallback=function(){null!==e.state.directionsService&&e.props.onLoad&&e.props.onLoad(e.state.directionsService)},e}a(o,t);var r=o.prototype;return r.componentDidMount=function(){this.props.options||n(!1);var t=new google.maps.DirectionsService;this.setState((function(){return{directionsService:t}}),this.setDirectionsServiceCallback)},r.componentDidUpdate=function(){null!==this.state.directionsService&&this.state.directionsService.route(this.props.options,this.props.callback)},r.componentWillUnmount=function(){null!==this.state.directionsService&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},r.render=function(){return e.createElement(e.Fragment,null)},o}(e.PureComponent),Rt={onDirectionsChanged:"directions_changed"},Tt={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}},Vt=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).registeredEvents=[],e.state={directionsRenderer:null},e.setDirectionsRendererCallback=function(){null!==e.state.directionsRenderer&&(e.state.directionsRenderer.setMap(e.context),e.props.onLoad&&e.props.onLoad(e.state.directionsRenderer))},e}a(n,t);var o=n.prototype;return o.componentDidMount=function(){var t=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=d({updaterMap:Tt,eventMap:Rt,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{directionsRenderer:t}}),this.setDirectionsRendererCallback)},o.componentDidUpdate=function(t){null!==this.state.directionsRenderer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:Tt,eventMap:Rt,prevProps:t,nextProps:this.props,instance:this.state.directionsRenderer}))},o.componentWillUnmount=function(){null!==this.state.directionsRenderer&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),u(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},o.render=function(){return e.createElement(e.Fragment,null)},n}(e.PureComponent);Vt.contextType=c;var It=function(t){function o(){var e;return(e=t.apply(this,arguments)||this).state={distanceMatrixService:null},e.setDistanceMatrixServiceCallback=function(){null!==e.state.distanceMatrixService&&e.props.onLoad&&e.props.onLoad(e.state.distanceMatrixService)},e}a(o,t);var r=o.prototype;return r.componentDidMount=function(){this.props.options||n(!1);var t=new google.maps.DistanceMatrixService;this.setState((function(){return{distanceMatrixService:t}}),this.setDistanceMatrixServiceCallback)},r.componentDidUpdate=function(){null!==this.state.distanceMatrixService&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},r.componentWillUnmount=function(){null!==this.state.distanceMatrixService&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},r.render=function(){return e.createElement(e.Fragment,null)},o}(e.PureComponent),_t={onPlacesChanged:"places_changed"},Bt={bounds:function(t,e){t.setBounds(e)}},Wt=function(t){function o(){var n;return(n=t.apply(this,arguments)||this).registeredEvents=[],n.containerElement=e.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){null!==n.state.searchBox&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}a(o,t);var r=o.prototype;return r.componentDidMount=function(){if(google.maps.places||n(!1),null!==this.containerElement&&null!==this.containerElement.current){var t=this.containerElement.current.querySelector("input");if(null!==t){var e=new google.maps.places.SearchBox(t,this.props.options);this.registeredEvents=d({updaterMap:Bt,eventMap:_t,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{searchBox:e}}),this.setSearchBoxCallback)}}},r.componentDidUpdate=function(t){null!==this.state.searchBox&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:Bt,eventMap:_t,prevProps:t,nextProps:this.props,instance:this.state.searchBox}))},r.componentWillUnmount=function(){null!==this.state.searchBox&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),u(this.registeredEvents))},r.render=function(){return e.createElement("div",{ref:this.containerElement},e.Children.only(this.props.children))},o}(e.PureComponent);Wt.contextType=c;var At={onPlaceChanged:"place_changed"},jt={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}},Nt=function(t){function o(){var n;return(n=t.apply(this,arguments)||this).registeredEvents=[],n.containerElement=e.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){null!==n.state.autocomplete&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}a(o,t);var r=o.prototype;return r.componentDidMount=function(){google.maps.places||n(!1);var t=this.containerElement.current.querySelector("input");if(t){var e=new google.maps.places.Autocomplete(t,this.props.options);this.registeredEvents=d({updaterMap:jt,eventMap:At,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{autocomplete:e}}),this.setAutocompleteCallback)}},r.componentDidUpdate=function(t){u(this.registeredEvents),this.registeredEvents=d({updaterMap:jt,eventMap:At,prevProps:t,nextProps:this.props,instance:this.state.autocomplete})},r.componentWillUnmount=function(){null!==this.state.autocomplete&&u(this.registeredEvents)},r.render=function(){return e.createElement("div",{ref:this.containerElement},e.Children.only(this.props.children))},o}(e.PureComponent);Nt.contextType=c,t.Autocomplete=Nt,t.BicyclingLayer=T,t.Circle=at,t.Data=lt,t.DirectionsRenderer=Vt,t.DirectionsService=Ot,t.DistanceMatrixService=It,t.DrawingManager=B,t.GoogleMap=f,t.GroundOverlay=kt,t.HeatmapLayer=wt,t.InfoBox=H,t.InfoWindow=Y,t.KmlLayer=ht,t.LoadScript=L,t.LoadScriptNext=D,t.MapContext=c,t.Marker=j,t.MarkerClusterer=F,t.OverlayView=Ct,t.Polygon=et,t.Polyline=X,t.Rectangle=rt,t.StandaloneSearchBox=Wt,t.StreetViewPanorama=Dt,t.StreetViewService=Ut,t.TrafficLayer=R,t.TransitLayer=V,t.useGoogleMap=function(){e.useContext||n(!1);var t=e.useContext(c);return t||n(!1),t},t.useLoadScript=w})); | ||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("invariant"),require("@react-google-maps/marker-clusterer"),require("react-dom"),require("@react-google-maps/infobox")):"function"==typeof define&&define.amd?define(["exports","react","invariant","@react-google-maps/marker-clusterer","react-dom","@react-google-maps/infobox"],e):e((n=n||self).reactGoogleMapsApi={},n.React,n.invariant,n.markerClusterer,n.ReactDOM,n.infobox)}(this,(function(n,e,t,o,r,a){"use strict";t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var u=e.createContext(null);function i(n){google.maps.event.removeListener(n)}function l(n){void 0===n&&(n=[]),n.forEach(i)}function s(n){var e=n.updaterMap,t=n.prevProps,o=n.nextProps,r=n.instance,a=function(n,e,t){return o=t,Object.keys(o).reduce((function(t,r){return a=t,"function"==typeof n[u=r]&&a.push(google.maps.event.addListener(e,o[r],n[u])),a;var a,u}),[]);var o}(o,r,n.eventMap);return function(n,e,t,o){var r,a={};r=n,Object.keys(r).forEach((function(n){return function(n,r){var u=t[r];u!==e[r]&&(a[r]=u,n(o,u))}(r[n],n)}))}(e,t,o,r),a}function c(n){var t=e.useRef(n);return e.useEffect((function(){t.current=n}),[n]),t.current}var f={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},p={extraMapTypes:function(n,e){e.forEach((function(e,t){n.mapTypes.set(String(t),e)}))},center:function(n,e){n.setCenter(e)},clickableIcons:function(n,e){n.setClickableIcons(e)},heading:function(n,e){n.setHeading(e)},mapTypeId:function(n,e){n.setMapTypeId(e)},options:function(n,e){n.setOptions(e)},streetView:function(n,e){n.setStreetView(e)},tilt:function(n,e){n.setTilt(e)},zoom:function(n,e){n.setZoom(e)}};function d(n){var t=n.children,o=n.options,r=n.id,a=n.mapContainerStyle,i=n.mapContainerClassName,d=n.onLoad,g=n.onUnmount,m=e.useState(null),v=m[0],h=m[1],C=e.createRef(),M=c(n);return e.useEffect((function(){return null===v&&null!==C.current&&h(new google.maps.Map(C.current,o)),null!==v&&d&&d(v),function(){null!==v&&g&&g(v)}}),[v,o,d,g,C]),e.useEffect((function(){var e=s({updaterMap:p,eventMap:f,prevProps:M,nextProps:n,instance:v});return function(){l(e)}}),[n,v,M]),e.createElement("div",{id:r,ref:C,style:a,className:i},e.createElement(u.Provider,{value:v},null!==v?t:e.createElement(e.Fragment,null)))}var g=e.memo(d),m="undefined"!=typeof document;function v(n){var e=n.url,t=n.id;return m?new Promise((function(n,o){var r=document.getElementById(t),a=window;if(r){var u=r.getAttribute("data-state");if(r.src===e&&"error"!==u){if("ready"===u)return n(t);var i=a.initMap,l=r.onerror;a.initMap=function(){i&&i(),n(t)},r.onerror=function(n){l&&l(n),o(n)}}else r.remove()}var s=document.createElement("script");s.type="text/javascript",s.src=e,s.id=t,s.async=!0,s.onerror=function(n){s.setAttribute("data-state","error"),o(n)},a.initMap=function(){s.setAttribute("data-state","ready"),n(t)},document.head.appendChild(s)})).catch((function(n){throw console.error("injectScript error: ",n),n})):Promise.reject(new Error("document is undefined"))}var h=function(n){return!((!n.href||0!==n.href.indexOf("https://fonts.googleapis.com/css?family=Roboto"))&&("style"===n.tagName.toLowerCase()&&n.styleSheet&&n.styleSheet.cssText&&0===n.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(n.styleSheet.cssText="",0):"style"===n.tagName.toLowerCase()&&n.innerHTML&&0===n.innerHTML.replace("\r\n","").indexOf(".gm-style")?(n.innerHTML="",0):"style"!==n.tagName.toLowerCase()||n.styleSheet||n.innerHTML))},C=function(){var n=document.getElementsByTagName("head")[0],e=n.insertBefore.bind(n);n.insertBefore=function(t,o){h(t)||Reflect.apply(e,n,[t,o])};var t=n.appendChild.bind(n);n.appendChild=function(e){h(e)||Reflect.apply(t,n,[e])}};function M(n){var e=n.googleMapsApiKey,o=n.googleMapsClientId,r=n.version,a=void 0===r?"weekly":r,u=n.language,i=n.region,l=n.libraries,s=n.channel,c=[];return e&&o||!e||!o||t(!1),e?c.push("key="+e):o&&c.push("client="+o),a&&c.push("v="+a),u&&c.push("language="+u),i&&c.push("region="+i),l&&l.length&&c.push("libraries="+l.sort().join(",")),s&&c.push("channel="+s),c.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?"+c.join("&")}var E=!1;function y(){return e.createElement("div",null,"Loading...")}function b(n){var o=n.googleMapsApiKey,r=n.googleMapsClientId,a=n.children,u=n.id,i=void 0===u?"script-loader":u,l=n.version,s=void 0===l?"weekly":l,f=n.language,p=n.region,d=n.channel,g=n.libraries,h=n.loadingElement,b=n.onLoad,w=n.onUnmount,x=n.onError,k=n.preventGoogleFontsLoading,P=c(n),L=e.useState(!1),S=L[0],D=L[1],O=e.useRef(null),I=e.useCallback((function(){k&&C(),i||t(!1),v({id:i,url:M({googleMapsApiKey:o,googleMapsClientId:r,version:s,language:f,region:p,libraries:g,channel:d})}).then((function(){b&&b(),D(!0)})).catch((function(n){x&&x(n),console.error("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(o||"-")+") or Client ID ("+(r||"-")+") to <LoadScript />\n Otherwise it is a Network issue.\n ")}))}),[o,i,s,f,p,d,g,r,k,x,b]),R=e.useCallback((function(){try{return Promise.resolve(new Promise((function(n){if(E){if(m)var e=window.setInterval((function(){E||(window.clearInterval(e),n())}),1)}else n()})))}catch(n){return Promise.reject(n)}}),[]),T=e.useCallback((function(){E=!0;var n=document.getElementById(i);n&&n.parentNode&&n.parentNode.removeChild(n),Array.prototype.slice.call(document.getElementsByTagName("script")).filter((function(n){return"string"==typeof n.src&&n.src.includes("maps.googleapis")})).forEach((function(n){n.parentNode&&n.parentNode.removeChild(n)})),Array.prototype.slice.call(document.getElementsByTagName("link")).filter((function(n){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===n.href})).forEach((function(n){n.parentNode&&n.parentNode.removeChild(n)})),Array.prototype.slice.call(document.getElementsByTagName("style")).filter((function(n){return void 0!==n.innerText&&n.innerText.length>0&&n.innerText.includes(".gm-")})).forEach((function(n){n.parentNode&&n.parentNode.removeChild(n)}))}),[i]);return e.useEffect((function(){if(m){if(window.google&&!E)return console.error("google api is already presented"),function(){};R().then(I).catch((function(n){console.error("Error at injecting script after cleaning up: ",n)}))}return function(){m&&(T(),window.setTimeout((function(){null===O.current&&(delete window.google,E=!1)}),1),w&&w())}}),[T,R,w,I]),e.useEffect((function(){g!==P.libraries&&console.warn("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"),m&&P.language!==f&&(T(),D(!1),delete window.google,I())}),[T,I,f,g,P.language,P.libraries]),e.createElement(e.Fragment,null,e.createElement("div",{ref:O}),S?a:h||e.createElement(y,null))}var w,x=e.memo(b);function k(){return(k=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}return n}).apply(this,arguments)}function P(n,e){if(null==n)return{};var t,o,r={},a=Object.keys(n);for(o=0;o<a.length;o++)e.indexOf(t=a[o])>=0||(r[t]=n[t]);return r}function L(n){var o=n.id,r=void 0===o?"script-loader":o,a=n.version,u=void 0===a?"weekly":a,i=n.googleMapsApiKey,l=n.googleMapsClientId,s=n.language,c=n.region,f=n.libraries,p=n.preventGoogleFontsLoading,d=n.channel,g=e.useRef(!1),h=e.useState(!1),E=h[0],y=h[1],b=e.useState(void 0),x=b[0],k=b[1];e.useEffect((function(){return g.current=!0,function(){g.current=!1}}),[]),e.useEffect((function(){m&&p&&C()}),[p]),e.useEffect((function(){E&&(window.google||t(!1))}),[E]);var P=M({version:u,googleMapsApiKey:i,googleMapsClientId:l,language:s,region:c,libraries:f,channel:d});e.useEffect((function(){function n(){g.current&&(y(!0),w=P)}m&&(window.google&&w===P?n():v({id:r,url:P}).then(n).catch((function(n){g.current&&k(n),console.warn("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(i||"-")+") or Client ID ("+(l||"-")+")\n Otherwise it is a Network issue.\n "),console.error(n)})))}),[r,P,i,l]);var L=e.useRef();return e.useEffect((function(){L.current&&f!==L.current&&console.warn("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"),L.current=f}),[f]),{isLoaded:E,loadError:x,url:P}}var S=e.createElement(y,null);function D(n){var t=n.loadingElement,o=n.onLoad,r=n.onError,a=n.onUnmount,u=n.children,i=L(P(n,["loadingElement","onLoad","onError","onUnmount","children"])),l=i.isLoaded,s=i.loadError;return e.useEffect((function(){l&&"function"==typeof o&&o()}),[l,o]),e.useEffect((function(){s&&"function"==typeof r&&r(s)}),[s,r]),e.useEffect((function(){return function(){a&&a()}}),[a]),l?u:t||S}var O=e.memo(D),I={},R={options:function(n,e){n.setOptions(e)}};function T(n){var t=n.options,o=n.onLoad,r=n.onUnmount,a=e.useContext(u),i=c(n),f=e.useState(null),p=f[0],d=f[1];return e.useEffect((function(){return null!==a&&(null===p&&d(new google.maps.TrafficLayer(k({},t||{},{map:a}))),null!==p&&(p.setMap(a),o&&o(p))),function(){null!==p&&(r&&r(p),p.setMap(null))}}),[p,a,t,o,r]),e.useEffect((function(){var e=s({updaterMap:R,eventMap:I,prevProps:i,nextProps:n,instance:p});return function(){l(e)}}),[n,p,i]),e.createElement(e.Fragment,null)}var _=e.memo(T);function U(n){var t=n.onLoad,o=n.onUnmount,r=e.useContext(u),a=e.useState(null),i=a[0],l=a[1];return e.useEffect((function(){return null!==r&&(null===i&&l(new google.maps.BicyclingLayer),null!==i&&(i.setMap(r),t&&t(i))),function(){null!==i&&(o&&o(i),i.setMap(null))}}),[i,r,t,o]),e.createElement(e.Fragment,null)}var F=e.memo(U);function z(n){var t=n.onLoad,o=n.onUnmount,r=e.useContext(u),a=e.useState(null),i=a[0],l=a[1];return e.useEffect((function(){var n=new google.maps.TransitLayer;return l(n),n.setMap(r),t&&t(n),function(){null!==i&&(o&&o(i),i.setMap(null))}}),[i,r,t,o]),e.createElement(e.Fragment,null)}var B=e.memo(z),N={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},j={drawingMode:function(n,e){n.setDrawingMode(e)},options:function(n,e){n.setOptions(e)}};function A(n){var o=n.options,r=n.onLoad,a=n.onUnmount,i=e.useContext(u),f=c(n),p=e.useState(null),d=p[0],g=p[1];return e.useEffect((function(){return google.maps.drawing||t(!1),null!==i&&(null===d&&g(new google.maps.drawing.DrawingManager(k({},o||{},{map:i}))),null!==d&&(d.setMap(i),r&&r(d))),function(){null!==d&&(a&&a(d),d.setMap(null))}}),[d,i,o,r,a]),e.useEffect((function(){var e=s({updaterMap:j,eventMap:N,prevProps:f,nextProps:n,instance:d});return function(){l(e)}}),[n,d,f]),e.createElement(e.Fragment,null)}var V=e.memo(A),G={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},Z={animation:function(n,e){n.setAnimation(e)},clickable:function(n,e){n.setClickable(e)},cursor:function(n,e){n.setCursor(e)},draggable:function(n,e){n.setDraggable(e)},icon:function(n,e){n.setIcon(e)},label:function(n,e){n.setLabel(e)},map:function(n,e){n.setMap(e)},opacity:function(n,e){n.setOpacity(e)},options:function(n,e){n.setOptions(e)},position:function(n,e){n.setPosition(e)},shape:function(n,e){n.setShape(e)},title:function(n,e){n.setTitle(e)},visible:function(n,e){n.setVisible(e)},zIndex:function(n,e){n.setZIndex(e)}};function H(n){var t=n.children,o=n.options,r=n.position,a=n.clusterer,i=n.noClustererRedraw,f=n.onLoad,p=n.onUnmount,d=e.useContext(u),g=c(n),m=e.useState(null),v=m[0],h=m[1];return e.useEffect((function(){if(null!==d){if(null===v){var n=new google.maps.Marker(k({},o||{},{},a?{}:{map:d},{position:r}));a?a.addMarker(n,!!i):n.setMap(d),h(n)}null!==v&&(v.setMap(d),f&&f(v))}return function(){null!==v&&(p&&p(v),a?a.removeMarker(v,!!i):v&&v.setMap(null))}}),[v,d,o,a,i,r,f,p]),e.useEffect((function(){var e=s({updaterMap:Z,eventMap:G,prevProps:g,nextProps:n,instance:v});return function(){l(e)}}),[n,v,g]),t?e.createElement(e.Fragment,null,e.Children.map(t,(function(n){return e.isValidElement(n)?e.cloneElement(n,{anchor:v}):n}))):e.createElement(e.Fragment,null)}var q=e.memo(H),K={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},W={averageCenter:function(n,e){n.setAverageCenter(e)},batchSizeIE:function(n,e){n.setBatchSizeIE(e)},calculator:function(n,e){n.setCalculator(e)},clusterClass:function(n,e){n.setClusterClass(e)},enableRetinaIcons:function(n,e){n.setEnableRetinaIcons(e)},gridSize:function(n,e){n.setGridSize(e)},ignoreHidden:function(n,e){n.setIgnoreHidden(e)},imageExtension:function(n,e){n.setImageExtension(e)},imagePath:function(n,e){n.setImagePath(e)},imageSizes:function(n,e){n.setImageSizes(e)},maxZoom:function(n,e){n.setMaxZoom(e)},minimumClusterSize:function(n,e){n.setMinimumClusterSize(e)},styles:function(n,e){n.setStyles(e)},title:function(n,e){n.setTitle(e)},zoomOnClick:function(n,e){n.setZoomOnClick(e)}};function J(n){var t=n.children,r=n.options,a=n.onLoad,i=n.onUnmount,f=e.useContext(u),p=c(n),d=e.useState(null),g=d[0],m=d[1];return e.useEffect((function(){return null!==f&&(null===g&&m(new o.Clusterer(f,[],r)),null!==g&&a&&a(g)),function(){null!==g&&(i&&i(g),g.setMap(null))}}),[g,f,r,a,i]),e.useEffect((function(){var e=s({updaterMap:W,eventMap:K,prevProps:p,nextProps:n,instance:g});return function(){l(e)}}),[n,g,p]),null!==g?e.createElement(e.Fragment,null,t(g)):e.createElement(e.Fragment,null)}var Y=e.memo(J),Q={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},X={options:function(n,e){n.setOptions(e)},position:function(n,e){e instanceof google.maps.LatLng?n.setPosition(e):n.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(n,e){n.setVisible(e)},zIndex:function(n,e){n.setZIndex(e)}};function $(n){var o=n.children,i=n.options,f=n.anchor,p=n.onLoad,d=n.onUnmount,g=i||{},m=g.position,v=P(g,["position"]),h=e.useContext(u),C=c(n),M=e.useRef(null),E=e.useState(null),y=E[0],b=E[1];return e.useEffect((function(){if(null!==h){if(null===y){var n;!m||m instanceof google.maps.LatLng||(n=new google.maps.LatLng(m.lat,m.lng)),M.current=document.createElement("div");var e=new a.InfoBox(k({},v,{},n?{position:n}:{}));b(e)}null!==y&&null!==M.current&&(y.setContent(M.current),f?y.open(h,f):y.getPosition()?y.open(h):t(!1),p&&p(y))}return function(){null!==y&&(d&&d(y),y.close())}}),[y,h,i,p,d,f,M,v,m]),e.useEffect((function(){var e=s({updaterMap:X,eventMap:Q,prevProps:C,nextProps:n,instance:y});return function(){l(e)}}),[n,y,C]),null===M.current?e.createElement(e.Fragment,null):e.createElement(e.Fragment,null,r.createPortal(e.Children.only(o),M.current))}var nn=e.memo($),en={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},tn={options:function(n,e){n.setOptions(e)},position:function(n,e){n.setPosition(e)},zIndex:function(n,e){n.setZIndex(e)}};function on(n){var o=n.children,a=n.anchor,i=n.options,f=n.onLoad,p=n.onUnmount,d=e.useContext(u),g=c(n),m=e.useState(null),v=m[0],h=m[1],C=e.useState(null),M=C[0],E=C[1];return e.useEffect((function(){return null!==d&&(null===M&&(E(new google.maps.InfoWindow(k({},i||{}))),h(document.createElement("div"))),null!==M&&null!==v&&(M.setContent(v),a?M.open(d,a):M.getPosition()?M.open(d):t(!1),f&&f(M))),function(){null!==M&&(p&&p(M),M.close())}}),[M,a,v,d,i,f,p]),e.useEffect((function(){var e=s({updaterMap:tn,eventMap:en,prevProps:g,nextProps:n,instance:M});return function(){l(e)}}),[n,M,g]),v?e.createElement(e.Fragment,null,r.createPortal(e.Children.only(o),v)):e.createElement(e.Fragment,null)}var rn=e.memo(on),an={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},un={draggable:function(n,e){n.setDraggable(e)},editable:function(n,e){n.setEditable(e)},map:function(n,e){n.setMap(e)},options:function(n,e){n.setOptions(e)},path:function(n,e){n.setPath(e)},visible:function(n,e){n.setVisible(e)}};function ln(n){var t=n.options,o=n.onLoad,r=n.onUnmount,a=e.useContext(u),i=c(n),f=e.useState(null),p=f[0],d=f[1];return e.useEffect((function(){return null!==a&&(null===p&&d(new google.maps.Polyline(k({},t||{},{map:a}))),null!==p&&(p.setMap(a),o&&o(p))),function(){null!==p&&(r&&r(p),p.setMap(null))}}),[p,a,t,o,r]),e.useEffect((function(){var e=s({updaterMap:un,eventMap:an,prevProps:i,nextProps:n,instance:p});return function(){l(e)}}),[n,p,i]),e.createElement(e.Fragment,null)}var sn=e.memo(ln),cn={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},fn={draggable:function(n,e){n.setDraggable(e)},editable:function(n,e){n.setEditable(e)},map:function(n,e){n.setMap(e)},options:function(n,e){n.setOptions(e)},path:function(n,e){n.setPath(e)},paths:function(n,e){n.setPaths(e)},visible:function(n,e){n.setVisible(e)}};function pn(n){var t=n.options,o=n.onLoad,r=n.onUnmount,a=e.useContext(u),i=c(n),f=e.useState(null),p=f[0],d=f[1];return e.useEffect((function(){return null!==a&&(null===p&&d(new google.maps.Polygon(k({},t||{},{map:a}))),null!==p&&(p.setMap(a),o&&o(p))),function(){null!==p&&(r&&r(p),p.setMap(null))}}),[p,a,t,o,r]),e.useEffect((function(){var e=s({updaterMap:fn,eventMap:cn,prevProps:i,nextProps:n,instance:p});return function(){l(e)}}),[n,p,i]),e.createElement(e.Fragment,null)}var dn=e.memo(pn),gn={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},mn={bounds:function(n,e){n.setBounds(e)},draggable:function(n,e){n.setDraggable(e)},editable:function(n,e){n.setEditable(e)},map:function(n,e){n.setMap(e)},options:function(n,e){n.setOptions(e)},visible:function(n,e){n.setVisible(e)}};function vn(n){var t=n.options,o=n.onLoad,r=n.onUnmount,a=e.useContext(u),i=c(n),f=e.useState(null),p=f[0],d=f[1];return e.useEffect((function(){return null!==a&&(null===p&&d(new google.maps.Rectangle(k({},t||{},{map:a}))),null!==p&&(p.setMap(a),o&&o(p))),function(){null!==p&&(r&&r(p),p.setMap(null))}}),[p,a,t,o,r]),e.useEffect((function(){var e=s({updaterMap:mn,eventMap:gn,prevProps:i,nextProps:n,instance:p});return function(){l(e)}}),[n,p,i]),e.createElement(e.Fragment,null)}var hn=e.memo(vn),Cn={onCenterChanged:"center_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRadiusChanged:"radius_changed",onRightClick:"rightclick"},Mn={center:function(n,e){n.setCenter(e)},draggable:function(n,e){n.setDraggable(e)},editable:function(n,e){n.setEditable(e)},map:function(n,e){n.setMap(e)},options:function(n,e){n.setOptions(e)},radius:function(n,e){n.setRadius(e)},visible:function(n,e){n.setVisible(e)}};function En(n){var t=n.options,o=n.onLoad,r=n.onUnmount,a=e.useContext(u),i=c(n),f=e.useState(null),p=f[0],d=f[1];return e.useEffect((function(){return null!==a&&(null===p&&d(new google.maps.Circle(k({},t||{},{map:a}))),null!==p&&(p.setMap(a),o&&o(p))),function(){null!==p&&(r&&r(p),p.setMap(null))}}),[p,a,t,o,r]),e.useEffect((function(){var e=s({updaterMap:Mn,eventMap:Cn,prevProps:i,nextProps:n,instance:p});return function(){l(e)}}),[n,p,i]),e.createElement(e.Fragment,null)}var yn=e.memo(En),bn={onAddFeature:"addfeature",onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onRightClick:"rightclick",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},wn={add:function(n,e){n.add(e)},addgeojson:function(n,e,t){n.addGeoJson(e,t)},contains:function(n,e){n.contains(e)},foreach:function(n,e){n.forEach(e)},loadgeojson:function(n,e,t,o){n.loadGeoJson(e,t,o)},overridestyle:function(n,e,t){n.overrideStyle(e,t)},remove:function(n,e){n.remove(e)},revertstyle:function(n,e){n.revertStyle(e)},controlposition:function(n,e){n.setControlPosition(e)},controls:function(n,e){n.setControls(e)},drawingmode:function(n,e){n.setDrawingMode(e)},map:function(n,e){n.setMap(e)},style:function(n,e){n.setStyle(e)},togeojson:function(n,e){n.toGeoJson(e)}};function xn(n){var t=n.options,o=n.onLoad,r=n.onUnmount,a=e.useContext(u),i=c(n),f=e.useState(null),p=f[0],d=f[1];return e.useEffect((function(){return null!==a&&(null===p&&d(new google.maps.Data(k({},t||{},{map:a}))),null!==p&&(p.setMap(a),o&&o(p))),function(){null!==p&&(r&&r(p),p.setMap(null))}}),[p,a,t,o,r]),e.useEffect((function(){var e=s({updaterMap:wn,eventMap:bn,prevProps:i,nextProps:n,instance:p});return function(){l(e)}}),[n,p,i]),e.createElement(e.Fragment,null)}var kn=e.memo(xn),Pn={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},Ln={options:function(n,e){n.setOptions(e)},url:function(n,e){n.setUrl(e)},zIndex:function(n,e){n.setZIndex(e)}};function Sn(n){var t=n.options,o=n.onLoad,r=n.onUnmount,a=e.useContext(u),i=c(n),f=e.useState(null),p=f[0],d=f[1];return e.useEffect((function(){return null!==a&&(null===p&&d(new google.maps.KmlLayer(k({},t||{},{map:a}))),null!==p&&(p.setMap(a),o&&o(p))),function(){null!==p&&(r&&r(p),p.setMap(null))}}),[p,a,t,o,r]),e.useEffect((function(){var e=s({updaterMap:Ln,eventMap:Pn,prevProps:i,nextProps:n,instance:p});return function(){l(e)}}),[n,p,i]),e.createElement(e.Fragment,null)}var Dn=e.memo(Sn);function On(n){var t=n.children,o=n.onLoad;return e.useEffect((function(){o&&o()}),[o]),e.createElement(e.Fragment,null,t)}var In=e.memo(On);function Rn(n,e){return new e(n.lat,n.lng)}function Tn(n,e){return new e(new google.maps.LatLng(n.ne.lat,n.ne.lng),new google.maps.LatLng(n.sw.lat,n.sw.lng))}function _n(n,e,t){return n instanceof e?n:t(n,e)}function Un(n){return n?(n instanceof google.maps.LatLng?n:new google.maps.LatLng(n.lat,n.lng))+"":""}function Fn(n){return n?(n instanceof google.maps.LatLngBounds?n:new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.east),new google.maps.LatLng(n.north,n.west)))+"":""}function zn(n){var o=n.children,a=n.mapPaneName,i=n.bounds,l=n.getPixelPositionOffset,s=n.onLoad,f=n.onUnmount,p=n.position,d=c(n),g=e.useContext(u),m=e.useState(null),v=m[0],h=m[1],C=e.useState(null),M=C[0],E=C[1],y=e.useRef(null),b=e.useRef(null),w=e.useCallback((function(){if(null!==v){var n=function(n,e,t,o){return void 0!==t?function(n,e,t){var o=n.fromLatLngToDivPixel(t.getNorthEast()),r=n.fromLatLngToDivPixel(t.getSouthWest());return o&&r?{left:r.x+e.x+"px",top:o.y+e.y+"px",width:o.x-r.x-e.x+"px",height:r.y-o.y-e.y+"px"}:{left:"-9999px",top:"-9999px"}}(n,e,_n(t,google.maps.LatLngBounds,Tn)):void 0!==o?function(n,e,t){var o=n.fromLatLngToDivPixel(t);return o?{left:o.x+e.x+"px",top:o.y+e.y+"px"}:{left:"-9999px",top:"-9999px"}}(n,e,_n(o,google.maps.LatLng,Rn)):null}(v.getProjection(),k({x:0,y:0},b.current?function(n,e){return"function"==typeof e?e(n.offsetWidth,n.offsetHeight):{}}(b.current,l):{}),i,p);E(n)}}),[i,l,v,p]),x=e.useCallback((function(){w()}),[w]),P=e.useCallback((function(){y.current=null}),[]),L=e.useCallback((function(){null!==v&&s&&s(v),w()}),[v,s,w]),S=e.useCallback((function(){if(a||t(!1),null!==v){var n=v.getPanes();if(!n)return;y.current=n[a]}}),[v,a]);e.useEffect((function(){var n=new google.maps.OverlayView;return n.onAdd=S,n.draw=x,n.onRemove=P,n.setMap(g),h(n),function(){null!==n&&(f&&f(n),n.setMap(null))}}),[x,g,S,P,f]),e.useEffect((function(){var n=Un(d.position),e=Un(p),t=Fn(d.bounds),o=Fn(i),r=0;return n===e&&t===o||(r=window.setTimeout((function(){null!==v&&v.draw()}),0)),function(){window.clearTimeout(r)}}),[i,v,p,d.bounds,d.position]);var D=e.useMemo((function(){return k({},M,{position:"absolute"})}),[M]);return null!==y.current?r.createPortal(e.createElement("div",{ref:b,style:D},e.createElement(In,{onLoad:L},e.Children.only(o))),y.current):e.createElement(e.Fragment,null)}var Bn=e.memo(zn);function Nn(){}var jn={onDblClick:"dblclick",onClick:"click"},An={opacity:function(n,e){n.setOpacity(e)}};function Vn(n){var o=n.options,r=n.url,a=n.bounds,i=n.onLoad,f=void 0===i?Nn:i,p=n.onUnmount,d=e.useContext(u),g=c(n),m=e.useState(null),v=m[0],h=m[1];return e.useEffect((function(){return r||a||t(!1),null!==d&&(null===v&&h(new google.maps.GroundOverlay(r,a,k({},o||{},{map:d}))),null!==v&&(v.setMap(d),f&&f(v))),function(){null!==v&&(p&&p(v),v.setMap(null))}}),[v,d,a,r,o,f,p]),e.useEffect((function(){var e=s({updaterMap:An,eventMap:jn,prevProps:g,nextProps:n,instance:v});return function(){l(e)}}),[n,v,g]),e.createElement(e.Fragment,null)}var Gn=e.memo(Vn),Zn={},Hn={data:function(n,e){n.setData(e)},map:function(n,e){n.setMap(e)},options:function(n,e){n.setOptions(e)}};function qn(n){var o=n.data,r=n.options,a=n.onLoad,i=n.onUnmount,f=e.useContext(u),p=c(n),d=e.useState(null),g=d[0],m=d[1];return e.useEffect((function(){return google.maps.visualization||t(!1),o||t(!1),null!==f&&(null===g&&m(new google.maps.visualization.HeatmapLayer(k({},r||{},{data:o,map:f}))),null!==g&&(g.setMap(f),a&&a(g))),function(){null!==g&&(i&&i(g),g.setMap(null))}}),[g,o,f,r,a,i]),e.useEffect((function(){var e=s({updaterMap:Hn,eventMap:Zn,prevProps:p,nextProps:n,instance:g});return function(){l(e)}}),[n,g,p]),e.createElement(e.Fragment,null)}var Kn=e.memo(qn),Wn={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Jn={register:function(n,e,t){n.registerPanoProvider(e,t)},links:function(n,e){n.setLinks(e)},motionTracking:function(n,e){n.setMotionTracking(e)},options:function(n,e){n.setOptions(e)},pano:function(n,e){n.setPano(e)},position:function(n,e){n.setPosition(e)},pov:function(n,e){n.setPov(e)},visible:function(n,e){n.setVisible(e)},zoom:function(n,e){n.setZoom(e)}};function Yn(n){var t=n.onLoad,o=n.onUnmount,r=e.useState(null),a=r[0],u=r[1];return e.useEffect((function(){var n=new google.maps.StreetViewService;return u(n),null!==a&&t&&t(a),function(){null!==a&&o&&o(a)}}),[a,t,o]),e.createElement(e.Fragment,null)}var Qn=e.memo(Yn);function Xn(n){var o=n.options,r=n.callback,a=n.onLoad,u=n.onUnmount,i=e.useState(null),l=i[0],s=i[1];return e.useEffect((function(){return o||t(!1),null===l&&s(new google.maps.DirectionsService),null!==l&&a&&a(l),function(){null!==l&&u&&u(l)}}),[l,o,a,u]),e.useEffect((function(){null!==l&&l.route(o,r)}),[l,o,r]),e.createElement(e.Fragment,null)}var $n=e.memo(Xn),ne={onDirectionsChanged:"directions_changed"},ee={directions:function(n,e){n.setDirections(e)},map:function(n,e){n.setMap(e)},options:function(n,e){n.setOptions(e)},panel:function(n,e){n.setPanel(e)},routeIndex:function(n,e){n.setRouteIndex(e)}};function te(n){var t=n.options,o=n.onLoad,r=n.onUnmount,a=e.useContext(u),i=c(n),f=e.useState(null),p=f[0],d=f[1];return e.useEffect((function(){return null!==a&&(null===p&&d(new google.maps.DirectionsRenderer(t)),null!==p&&(p.setMap(a),o&&o(p))),function(){null!==p&&(r&&r(p),p.setMap(null))}}),[p,a,t,o,r]),e.useEffect((function(){var e=s({updaterMap:ee,eventMap:ne,prevProps:i,nextProps:n,instance:p});return function(){l(e)}}),[n,p,i]),e.createElement(e.Fragment,null)}var oe=e.memo(te);function re(n){var o=n.options,r=n.callback,a=n.onLoad,u=n.onUnmount,i=e.useState(null),l=i[0],s=i[1];return e.useEffect((function(){return o||t(!1),null===l&&s(new google.maps.DistanceMatrixService),null!==l&&a&&a(l),function(){null!==l&&u&&u(l)}}),[l,o,a,u]),e.useEffect((function(){null!==l&&l.getDistanceMatrix(o,r)}),[l,o,r]),e.createElement(e.Fragment,null)}var ae=e.memo(re),ue={onPlacesChanged:"places_changed"},ie={bounds:function(n,e){n.setBounds(e)}};function le(n){var o=n.children,r=n.options,a=n.onLoad,i=n.onUnmount,f=e.useContext(u),p=c(n),d=e.useRef(null),g=e.useState(null),m=g[0],v=g[1];return e.useEffect((function(){if(google.maps.places||t(!1),null!==f&&null!==d.current){var n=d.current.querySelector("input");if(null!==n){var e=new google.maps.places.SearchBox(n,r);v(e),null!==e&&a&&a(e)}}return function(){null!==m&&i&&i(m)}}),[m,f,r,a,i]),e.useEffect((function(){var e=s({updaterMap:ie,eventMap:ue,prevProps:p,nextProps:n,instance:m});return function(){l(e)}}),[n,m,p]),e.createElement("div",{ref:d},e.Children.only(o))}var se=e.memo(le),ce={onPlaceChanged:"place_changed"},fe={bounds:function(n,e){n.setBounds(e)},restrictions:function(n,e){n.setComponentRestrictions(e)},fields:function(n,e){n.setFields(e)},options:function(n,e){n.setOptions(e)},types:function(n,e){n.setTypes(e)}};function pe(n){var o=n.children,r=n.options,a=n.onLoad,i=n.onUnmount,f=e.useContext(u),p=c(n),d=e.useRef(null),g=e.useState(null),m=g[0],v=g[1];return e.useEffect((function(){if(google.maps.places||t(!1),null!==d.current){var n=d.current.querySelector("input");if(n){var e=new google.maps.places.Autocomplete(n,r);v(e),a&&a(e)}}return function(){null!==m&&i&&i(m)}}),[m,f,r,a,i]),e.useEffect((function(){var e=s({updaterMap:fe,eventMap:ce,prevProps:p,nextProps:n,instance:m});return function(){l(e)}}),[n,m,p]),e.createElement("div",{ref:d},e.Children.only(o))}n.Autocomplete=e.memo(pe),n.BicyclingLayer=F,n.Circle=yn,n.Data=kn,n.DirectionsRenderer=oe,n.DirectionsService=$n,n.DistanceMatrixService=ae,n.DrawingManager=V,n.GoogleMap=g,n.GroundOverlay=Gn,n.HeatmapLayer=Kn,n.InfoBox=nn,n.InfoWindow=rn,n.KmlLayer=Dn,n.LoadScript=x,n.LoadScriptNext=O,n.MapContext=u,n.Marker=q,n.MarkerClusterer=Y,n.OverlayView=Bn,n.Polygon=dn,n.Polyline=sn,n.Rectangle=hn,n.StandaloneSearchBox=se,n.StreetViewPanorama=function(n){var t=n.options,o=n.onLoad,r=n.onUnmount,a=e.useContext(u),i=c(n),f=e.useState(null),p=f[0],d=f[1];return e.useEffect((function(){return null!==a&&(null===p&&d(a.getStreetView()),null!==p&&o&&o(p)),function(){null!==p&&(r&&r(p),p.setVisible(!1))}}),[p,a,t,o,r]),e.useEffect((function(){var e=s({updaterMap:Jn,eventMap:Wn,prevProps:i,nextProps:n,instance:p});return function(){l(e)}}),[n,p,i]),e.createElement(e.Fragment,null)},n.StreetViewService=Qn,n.TrafficLayer=_,n.TransitLayer=B,n.useGoogleMap=function(){e.useContext||t(!1);var n=e.useContext(u);return n||t(!1),n},n.useLoadScript=L})); | ||
//# sourceMappingURL=reactgooglemapsapi.umd.production.min.js.map |
/// <reference types="googlemaps" /> | ||
export declare const applyUpdaterToNextProps: (updaterMap: any, prevProps: any, nextProps: any, instance: any) => any; | ||
export declare function applyUpdaterToNextProps(updaterMap: any, prevProps: any, nextProps: any, instance: any): any; | ||
export declare function registerEvents(props: any, instance: any, eventMap: Record<string, string>): google.maps.MapsEventListener[]; | ||
@@ -4,0 +4,0 @@ export declare function unregisterEvents(events?: google.maps.MapsEventListener[]): void; |
@@ -5,3 +5,3 @@ interface InjectScriptArg { | ||
} | ||
export declare const injectScript: ({ url, id }: InjectScriptArg) => Promise<any>; | ||
export declare function injectScript({ url, id }: InjectScriptArg): Promise<unknown>; | ||
export {}; |
{ | ||
"name": "@react-google-maps/api", | ||
"sideEffects": false, | ||
"version": "1.9.5", | ||
"version": "2.0.0-alpha", | ||
"description": "React.js Google Maps API integration", | ||
@@ -74,8 +74,8 @@ "license": "MIT", | ||
"prebuild": "rimraf dist", | ||
"build": "npx tsdx build --name reactGoogleMapsApi --format=cjs,esm,umd", | ||
"build": "tsdx build --name reactGoogleMapsApi --format=cjs,esm,umd", | ||
"clean": "rimraf ./package-lock.json ./yarn.lock ./node_modules/ && yarn", | ||
"update": "yarn-check -u", | ||
"lint": "npx eslint ./src/**/*.{ts,tsx} --fix", | ||
"docs:dev": "npx styleguidist server --config ./styleguide.config.js --verbose", | ||
"docs:build": "npx styleguidist build --config ./styleguide.config.js --verbose", | ||
"lint": "eslint ./src --fix", | ||
"docs:dev": "styleguidist server --config ./styleguide.config.js --verbose", | ||
"docs:build": "styleguidist build --config ./styleguide.config.js --verbose", | ||
"tc": "tsc -p ./tsconfig.json --noEmit --traceResolution", | ||
@@ -88,6 +88,6 @@ "test": "jest", | ||
"dependencies": { | ||
"@react-google-maps/infobox": "1.9.3", | ||
"@react-google-maps/marker-clusterer": "1.9.3", | ||
"acorn": "^7.2.0", | ||
"acorn-jsx": "^5.2.0", | ||
"@react-google-maps/infobox": "2.0.0-alpha", | ||
"@react-google-maps/marker-clusterer": "2.0.0-alpha", | ||
"acorn": "7.2.0", | ||
"acorn-jsx": "5.2.0", | ||
"invariant": "2.2.4" | ||
@@ -101,3 +101,3 @@ }, | ||
"@getify/eslint-plugin-proper-arrows": "9.1.1", | ||
"@testing-library/react": "10.0.4", | ||
"@testing-library/react": "10.2.1", | ||
"@types/babel-types": "7.0.7", | ||
@@ -108,6 +108,7 @@ "@types/googlemaps": "3.39.6", | ||
"@types/react-dom": "16.9.8", | ||
"@typescript-eslint/eslint-plugin": "3.0.2", | ||
"@typescript-eslint/parser": "3.0.2", | ||
"@typescript-eslint/eslint-plugin": "3.1.0", | ||
"@typescript-eslint/parser": "3.1.0", | ||
"awesome-typescript-loader": "5.2.1", | ||
"eslint": "7.1.0", | ||
"eslint": "7.2.0", | ||
"eslint-config-prettier": "6.11.0", | ||
"eslint-config-standard": "14.1.1", | ||
@@ -118,10 +119,16 @@ "eslint-config-standard-react": "9.2.0", | ||
"eslint-plugin-babel": "5.3.0", | ||
"eslint-plugin-chai-expect": "2.1.0", | ||
"eslint-plugin-cypress": "2.11.1", | ||
"eslint-plugin-filenames": "1.3.2", | ||
"eslint-plugin-html": "6.0.2", | ||
"eslint-plugin-import": "2.20.2", | ||
"eslint-plugin-jest": "23.13.2", | ||
"eslint-plugin-json": "2.1.1", | ||
"eslint-plugin-jsx-a11y": "6.2.3", | ||
"eslint-plugin-markdown": "1.0.2", | ||
"eslint-plugin-no-inferred-method-name": "2.0.0", | ||
"eslint-plugin-node": "11.1.0", | ||
"eslint-plugin-optimize-regex": "1.2.0", | ||
"eslint-plugin-perf-standard": "1.0.3", | ||
"eslint-plugin-prettier": "3.1.3", | ||
"eslint-plugin-promise": "4.2.1", | ||
@@ -134,2 +141,4 @@ "eslint-plugin-react": "7.20.0", | ||
"eslint-plugin-standard": "4.0.1", | ||
"eslint-plugin-tree-shaking": "1.8.0", | ||
"eslint-plugin-xss": "^0.1.10", | ||
"eslint-plugin-you-dont-need-lodash-underscore": "6.10.0", | ||
@@ -144,5 +153,5 @@ "jest": "26.0.1", | ||
"rimraf": "3.0.2", | ||
"ts-jest": "26.0.0", | ||
"ts-jest": "26.1.0", | ||
"tsdx": "0.13.2", | ||
"typescript": "3.9.3", | ||
"typescript": "3.9.5", | ||
"webpack": "4.43.0" | ||
@@ -149,0 +158,0 @@ }, |
@@ -23,2 +23,5 @@ # InfoBox example | ||
const styleOuterDiv = { backgroundColor: 'yellow', opacity: 0.75, padding: 12 }; | ||
const styleInnerDiv = { fontSize: 16, fontColor: `#08233B` }; | ||
<ScriptLoaded> | ||
@@ -36,4 +39,4 @@ <GoogleMap | ||
> | ||
<div style={{ backgroundColor: 'yellow', opacity: 0.75, padding: 12 }}> | ||
<div style={{ fontSize: 16, fontColor: `#08233B` }}> | ||
<div style={styleOuterDiv}> | ||
<div style={styleInnerDiv}> | ||
Hello, World! | ||
@@ -40,0 +43,0 @@ </div> |
@@ -1,8 +0,13 @@ | ||
/* eslint-disable filenames/match-regex */ | ||
export function getOffsetOverride( | ||
containerElement: HTMLElement, | ||
getPixelPositionOffset?: (offsetWidth: number, offsetHeight: number) => { x: number; y: number } | ||
): { x: number; y: number } | {} { | ||
getPixelPositionOffset?: ( | ||
offsetWidth: number, | ||
offsetHeight: number | ||
) => { x: number; y: number } | ||
): { x: number; y: number } | Record<string, unknown> { | ||
return typeof getPixelPositionOffset === 'function' | ||
? getPixelPositionOffset(containerElement.offsetWidth, containerElement.offsetHeight) | ||
? getPixelPositionOffset( | ||
containerElement.offsetWidth, | ||
containerElement.offsetHeight | ||
) | ||
: {} | ||
@@ -12,13 +17,26 @@ } | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const createLatLng = (inst: any, Type: any): any => new Type(inst.lat, inst.lng) | ||
function createLatLng(inst: any, Type: any): any { | ||
return new Type(inst.lat, inst.lng) | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const createLatLngBounds = (inst: any, Type: any): any => | ||
new Type( | ||
function createLatLngBounds(inst: any, Type: any): any { | ||
return new Type( | ||
new google.maps.LatLng(inst.ne.lat, inst.ne.lng), | ||
new google.maps.LatLng(inst.sw.lat, inst.sw.lng) | ||
) | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const ensureOfType = (inst: any, type: any, factory: any): any => { | ||
function ensureOfType( | ||
inst: | ||
| google.maps.LatLngBounds | ||
| google.maps.LatLngBoundsLiteral | ||
| google.maps.LatLng | ||
| google.maps.LatLngLiteral, | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
type: any, | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
factory: any | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
): any { | ||
return inst instanceof type ? inst : factory(inst, type) | ||
@@ -31,3 +49,3 @@ } | ||
bounds: google.maps.LatLngBounds | ||
): { left: string; top: string; width?: string; height?: string } => { | ||
): React.CSSProperties => { | ||
const ne = mapCanvasProjection.fromLatLngToDivPixel(bounds.getNorthEast()) | ||
@@ -52,7 +70,7 @@ | ||
const getLayoutStylesByPosition = ( | ||
function getLayoutStylesByPosition( | ||
mapCanvasProjection: google.maps.MapCanvasProjection, | ||
offset: { x: number; y: number }, | ||
position: google.maps.LatLng | ||
): { left: string; top: string } => { | ||
): React.CSSProperties { | ||
const point = mapCanvasProjection.fromLatLngToDivPixel(position) | ||
@@ -75,3 +93,3 @@ | ||
export const getLayoutStyles = ( | ||
export function getLayoutStyles( | ||
mapCanvasProjection: google.maps.MapCanvasProjection, | ||
@@ -81,14 +99,20 @@ offset: { x: number; y: number }, | ||
position?: google.maps.LatLng | google.maps.LatLngLiteral | ||
): { left: string; top: string; width?: string; height?: string } => { | ||
return bounds !== undefined | ||
? getLayoutStylesByBounds( | ||
mapCanvasProjection, | ||
offset, | ||
ensureOfType(bounds, google.maps.LatLngBounds, createLatLngBounds) | ||
) | ||
: getLayoutStylesByPosition( | ||
mapCanvasProjection, | ||
offset, | ||
ensureOfType(position, google.maps.LatLng, createLatLng) | ||
) | ||
): React.CSSProperties | null { | ||
if (bounds !== undefined) { | ||
return getLayoutStylesByBounds( | ||
mapCanvasProjection, | ||
offset, | ||
ensureOfType(bounds, google.maps.LatLngBounds, createLatLngBounds) | ||
) | ||
} | ||
if (position !== undefined) { | ||
return getLayoutStylesByPosition( | ||
mapCanvasProjection, | ||
offset, | ||
ensureOfType(position, google.maps.LatLng, createLatLng) | ||
) | ||
} | ||
return null | ||
} |
@@ -10,3 +10,3 @@ # Data example | ||
width: "800px" | ||
} | ||
}; | ||
@@ -16,80 +16,82 @@ const center = { | ||
lng: -115.234 | ||
} | ||
}; | ||
const onLoad = data => { | ||
console.log('data: ', data) | ||
} | ||
}; | ||
<ScriptLoaded> | ||
<GoogleMap | ||
id="data-example" | ||
mapContainerStyle={mapContainerStyle} | ||
zoom={2.5} | ||
center={center} | ||
> | ||
<Data | ||
onLoad={onLoad} | ||
options={{ | ||
controlPosition: window.google ? window.google.maps.ControlPosition.TOP_LEFT : undefined, | ||
controls: ["Point"], | ||
drawingMode: "Point", // "LineString" or "Polygon". | ||
featureFactory: geometry => { | ||
console.log("geometry: ", geometry); | ||
}, | ||
// Type: boolean | ||
// If true, the marker receives mouse and touch events. Default value is true. | ||
clickable: true, | ||
const options = { | ||
controlPosition: window.google ? window.google.maps.ControlPosition.TOP_LEFT : undefined, | ||
controls: ["Point"], | ||
drawingMode: "Point", // "LineString" or "Polygon". | ||
featureFactory: geometry => { | ||
console.log("geometry: ", geometry); | ||
}, | ||
// Type: boolean | ||
// If true, the marker receives mouse and touch events. Default value is true. | ||
clickable: true, | ||
// Type: string | ||
// Mouse cursor to show on hover. Only applies to point geometries. | ||
// cursor: 'cursor', | ||
// Type: string | ||
// Mouse cursor to show on hover. Only applies to point geometries. | ||
// cursor: 'cursor', | ||
// Type: boolean | ||
// If true, the object can be dragged across the map and the underlying feature will have its geometry updated. Default value is false. | ||
draggable: true, | ||
// Type: boolean | ||
// If true, the object can be dragged across the map and the underlying feature will have its geometry updated. Default value is false. | ||
draggable: true, | ||
// Type: boolean | ||
// If true, the object can be edited by dragging control points and the underlying feature will have its geometry updated. Only applies to LineString and Polygon geometries. Default value is false. | ||
editable: false, | ||
// Type: boolean | ||
// If true, the object can be edited by dragging control points and the underlying feature will have its geometry updated. Only applies to LineString and Polygon geometries. Default value is false. | ||
editable: false, | ||
// Type: string | ||
// The fill color. All CSS3 colors are supported except for extended named colors. Only applies to polygon geometries. | ||
fillColor: "#FF0055", | ||
// Type: string | ||
// The fill color. All CSS3 colors are supported except for extended named colors. Only applies to polygon geometries. | ||
fillColor: "#FF0055", | ||
// Type: number | ||
// The fill opacity between 0.0 and 1.0. Only applies to polygon geometries. | ||
fillOpacity: 1, | ||
// Type: number | ||
// The fill opacity between 0.0 and 1.0. Only applies to polygon geometries. | ||
fillOpacity: 1, | ||
// Type: string|Icon|Symbol | ||
// Icon for the foreground. If a string is provided, it is treated as though it were an Icon with the string as url. Only applies to point geometries. | ||
// icon: 'icon', | ||
// Type: string|Icon|Symbol | ||
// Icon for the foreground. If a string is provided, it is treated as though it were an Icon with the string as url. Only applies to point geometries. | ||
// icon: 'icon', | ||
// Type: MarkerShape | ||
// Defines the image map used for hit detection. Only applies to point geometries. | ||
// shape: 'shape', | ||
// Type: MarkerShape | ||
// Defines the image map used for hit detection. Only applies to point geometries. | ||
// shape: 'shape', | ||
// Type: string | ||
// The stroke color. All CSS3 colors are supported except for extended named colors. Only applies to line and polygon geometries. | ||
strokeColor: "#00FF55", | ||
// Type: string | ||
// The stroke color. All CSS3 colors are supported except for extended named colors. Only applies to line and polygon geometries. | ||
strokeColor: "#00FF55", | ||
// Type: number | ||
// The stroke opacity between 0.0 and 1.0. Only applies to line and polygon geometries. | ||
strokeOpacity: 1, | ||
// Type: number | ||
// The stroke opacity between 0.0 and 1.0. Only applies to line and polygon geometries. | ||
strokeOpacity: 1, | ||
// Type: number | ||
// The stroke width in pixels. Only applies to line and polygon geometries. | ||
strokeWeight: 2, | ||
// Type: number | ||
// The stroke width in pixels. Only applies to line and polygon geometries. | ||
strokeWeight: 2, | ||
// Type: string | ||
// Rollover text. Only applies to point geometries. | ||
title: "Title", | ||
// Type: string | ||
// Rollover text. Only applies to point geometries. | ||
title: "Title", | ||
// Type: boolean | ||
// Whether the feature is visible. Defaults to true. | ||
visible: true, | ||
// Type: boolean | ||
// Whether the feature is visible. Defaults to true. | ||
visible: true, | ||
// Type: number | ||
// All features are displayed on the map in order of their zIndex, with higher values displaying in front of features with lower values. Markers are always displayed in front of line-strings and polygons. | ||
zIndex: 2 | ||
}} | ||
// Type: number | ||
// All features are displayed on the map in order of their zIndex, with higher values displaying in front of features with lower values. Markers are always displayed in front of line-strings and polygons. | ||
zIndex: 2 | ||
} | ||
<ScriptLoaded> | ||
<GoogleMap | ||
id="data-example" | ||
mapContainerStyle={mapContainerStyle} | ||
zoom={2.5} | ||
center={center} | ||
> | ||
<Data | ||
onLoad={onLoad} | ||
options={options} | ||
/> | ||
@@ -96,0 +98,0 @@ </GoogleMap> |
@@ -11,1 +11,5 @@ import localDevKey from './googleMapKey' | ||
} | ||
export function removeKey(): void { | ||
window.sessionStorage.removeItem(KEY_NAME) | ||
} |
@@ -7,14 +7,18 @@ # Google Map example | ||
const mapContainerStyle = { | ||
height: "400px", | ||
width: "800px" | ||
}; | ||
const center = { | ||
lat: -3.745, | ||
lng: -38.523 | ||
}; | ||
<ScriptLoaded> | ||
<GoogleMap | ||
id="circle-example" | ||
mapContainerStyle={{ | ||
height: "400px", | ||
width: "800px" | ||
}} | ||
mapContainerStyle={mapContainerStyle} | ||
zoom={7} | ||
center={{ | ||
lat: -3.745, | ||
lng: -38.523 | ||
}} | ||
center={center} | ||
/> | ||
@@ -21,0 +25,0 @@ </ScriptLoaded>; |
@@ -5,13 +5,28 @@ export { default as GoogleMap, GoogleMapProps } from './GoogleMap' | ||
export { default as LoadScriptNext, LoadScriptNextProps } from './LoadScriptNext' | ||
export { | ||
default as LoadScriptNext, | ||
LoadScriptNextProps, | ||
} from './LoadScriptNext' | ||
export { useLoadScript } from './useLoadScript' | ||
export { default as TrafficLayer, TrafficLayerProps } from './components/maps/TrafficLayer' | ||
export { | ||
default as TrafficLayer, | ||
TrafficLayerProps, | ||
} from './components/maps/TrafficLayer' | ||
export { default as BicyclingLayer, BicyclingLayerProps } from './components/maps/BicyclingLayer' | ||
export { | ||
default as BicyclingLayer, | ||
BicyclingLayerProps, | ||
} from './components/maps/BicyclingLayer' | ||
export { default as TransitLayer, TransitLayerProps } from './components/maps/TransitLayer' | ||
export { | ||
default as TransitLayer, | ||
TransitLayerProps, | ||
} from './components/maps/TransitLayer' | ||
export { default as DrawingManager, DrawingManagerProps } from './components/drawing/DrawingManager' | ||
export { | ||
default as DrawingManager, | ||
DrawingManagerProps, | ||
} from './components/drawing/DrawingManager' | ||
@@ -27,9 +42,18 @@ export { default as Marker, MarkerProps } from './components/drawing/Marker' | ||
export { default as InfoWindow, InfoWindowProps } from './components/drawing/InfoWindow' | ||
export { | ||
default as InfoWindow, | ||
InfoWindowProps, | ||
} from './components/drawing/InfoWindow' | ||
export { default as Polyline, PolylineProps } from './components/drawing/Polyline' | ||
export { | ||
default as Polyline, | ||
PolylineProps, | ||
} from './components/drawing/Polyline' | ||
export { default as Polygon, PolygonProps } from './components/drawing/Polygon' | ||
export { default as Rectangle, RectangleProps } from './components/drawing/Rectangle' | ||
export { | ||
default as Rectangle, | ||
RectangleProps, | ||
} from './components/drawing/Rectangle' | ||
@@ -42,7 +66,16 @@ export { default as Circle, CircleProps } from './components/drawing/Circle' | ||
export { default as OverlayView, OverlayViewProps } from './components/dom/OverlayView' | ||
export { | ||
default as OverlayView, | ||
OverlayViewProps, | ||
} from './components/dom/OverlayView' | ||
export { default as GroundOverlay, GroundOverlayProps } from './components/overlays/GroundOverlay' | ||
export { | ||
default as GroundOverlay, | ||
GroundOverlayProps, | ||
} from './components/overlays/GroundOverlay' | ||
export { default as HeatmapLayer, HeatmapLayerProps } from './components/heatmap/HeatmapLayer' | ||
export { | ||
default as HeatmapLayer, | ||
HeatmapLayerProps, | ||
} from './components/heatmap/HeatmapLayer' | ||
@@ -79,4 +112,7 @@ export { | ||
export { default as Autocomplete, AutocompleteProps } from './components/places/Autocomplete' | ||
export { | ||
default as Autocomplete, | ||
AutocompleteProps, | ||
} from './components/places/Autocomplete' | ||
export { default as MapContext, useGoogleMap } from './map-context' |
@@ -7,3 +7,6 @@ import { useContext, createContext } from 'react' | ||
export function useGoogleMap(): google.maps.Map | null { | ||
invariant(!!useContext, 'useGoogleMap is React hook and requires React version 16.8+') | ||
invariant( | ||
!!useContext, | ||
'useGoogleMap is React hook and requires React version 16.8+' | ||
) | ||
@@ -10,0 +13,0 @@ const map = useContext(MapContext) |
@@ -46,11 +46,11 @@ const createMockFuncsFromArray = (instance, names = []) => { | ||
}, | ||
BicyclingLayer: jest.fn().mockImplementation(function() { | ||
BicyclingLayer: jest.fn().mockImplementation(function BicyclingLayer() { | ||
createMVCObject(this) | ||
createMockFuncsFromArray(this, ['setMap']) | ||
}), | ||
TransitLayer: jest.fn().mockImplementation(function() { | ||
TransitLayer: jest.fn().mockImplementation(function TransitLayer() { | ||
createMVCObject(this) | ||
createMockFuncsFromArray(this, ['setMap']) | ||
}), | ||
Circle: jest.fn().mockImplementation(function(opts) { | ||
Circle: jest.fn().mockImplementation(function Circle(opts) { | ||
this.opts = opts | ||
@@ -86,3 +86,3 @@ createMVCObject(this) | ||
}, | ||
Data: jest.fn().mockImplementation(function(options) { | ||
Data: jest.fn().mockImplementation(function Data(options) { | ||
this.options = options | ||
@@ -98,14 +98,18 @@ createMVCObject(this) | ||
}), | ||
DirectionsRenderer: jest.fn().mockImplementation(function(opts) { | ||
this.opts = opts | ||
createMVCObject(this) | ||
createMockFuncsFromArray(this, [ | ||
'setDirections', | ||
'setMap', | ||
'setOptions', | ||
'setPanel', | ||
'setRouteIndex', | ||
]) | ||
}), | ||
DirectionsService: function() {}, | ||
DirectionsRenderer: jest | ||
.fn() | ||
.mockImplementation(function DirectionsRenderer(opts) { | ||
this.opts = opts | ||
createMVCObject(this) | ||
createMockFuncsFromArray(this, [ | ||
'setDirections', | ||
'setMap', | ||
'setOptions', | ||
'setPanel', | ||
'setRouteIndex', | ||
]) | ||
}), | ||
DirectionsService: function DirectionsService() { | ||
return | ||
}, | ||
DirectionsStatus: { | ||
@@ -136,3 +140,5 @@ INVALID_REQUEST: 'INVALID_REQUEST', | ||
}, | ||
DistanceMatrixService: function() {}, | ||
DistanceMatrixService: function DistanceMatrixService() { | ||
return | ||
}, | ||
DistanceMatrixStatus: { | ||
@@ -147,3 +153,5 @@ INVALID_REQUEST: 'INVALID_REQUEST', | ||
}, | ||
ElevationService: function() {}, | ||
ElevationService: function ElevationService() { | ||
return | ||
}, | ||
ElevationStatus: { | ||
@@ -157,8 +165,12 @@ Co: 'DATA_NOT_AVAILABLE', | ||
}, | ||
FusionTablesLayer: jest.fn().mockImplementation(function(options) { | ||
this.options = options | ||
createMVCObject(this) | ||
createMockFuncsFromArray(this, ['setMap', 'setOptions']) | ||
}), | ||
Geocoder: function() {}, | ||
FusionTablesLayer: jest | ||
.fn() | ||
.mockImplementation(function FusionTablesLayer(options) { | ||
this.options = options | ||
createMVCObject(this) | ||
createMockFuncsFromArray(this, ['setMap', 'setOptions']) | ||
}), | ||
Geocoder: function Geocoder() { | ||
return | ||
}, | ||
GeocoderLocationType: { | ||
@@ -179,6 +191,14 @@ APPROXIMATE: 'APPROXIMATE', | ||
}, | ||
GroundOverlay: function() {}, | ||
ImageMapType: function() {}, | ||
InfoWindow: function() {}, | ||
KmlLayer: function() {}, | ||
GroundOverlay: function GroundOverlay() { | ||
return | ||
}, | ||
ImageMapType: function ImageMapType() { | ||
return | ||
}, | ||
InfoWindow: function InfoWindow() { | ||
return | ||
}, | ||
KmlLayer: function KmlLayer() { | ||
return | ||
}, | ||
KmlLayerStatus: { | ||
@@ -195,9 +215,15 @@ DOCUMENT_NOT_FOUND: 'DOCUMENT_NOT_FOUND', | ||
}, | ||
LatLng: function() {}, | ||
LatLngBounds: function() {}, | ||
MVCArray: function() {}, | ||
MVCObject: jest.fn().mockImplementation(function() { | ||
LatLng: function LatLng() { | ||
return | ||
}, | ||
LatLngBounds: function LatLngBounds() { | ||
return | ||
}, | ||
MVCArray: function MVCArray() { | ||
return | ||
}, | ||
MVCObject: jest.fn().mockImplementation(function MVCObject() { | ||
createMVCObject(this) | ||
}), | ||
Map: jest.fn().mockImplementation(function(mapDiv, opts) { | ||
Map: jest.fn().mockImplementation(function Map(mapDiv, opts) { | ||
this.mapDiv = mapDiv | ||
@@ -233,4 +259,6 @@ this.opts = opts | ||
}, | ||
MapTypeRegistry: function() {}, | ||
Marker: jest.fn().mockImplementation(function(opts) { | ||
MapTypeRegistry: function MapTypeRegistry() { | ||
return | ||
}, | ||
Marker: jest.fn().mockImplementation(function Marker(opts) { | ||
this.opts = opts | ||
@@ -249,6 +277,10 @@ createMVCObject(this) | ||
}), | ||
MarkerImage: function() {}, | ||
MaxZoomService: function() { | ||
MarkerImage: function MarkerImage() { | ||
return | ||
}, | ||
MaxZoomService: function MaxZoomService() { | ||
return { | ||
getMaxZoomAtLatLng: function() {}, | ||
getMaxZoomAtLatLng: function getMaxZoomAtLatLng() { | ||
return | ||
}, | ||
} | ||
@@ -268,14 +300,32 @@ }, | ||
}, | ||
OverlayView: function() {}, | ||
Point: function() {}, | ||
Polygon: function() {}, | ||
Polyline: function() {}, | ||
Rectangle: function() {}, | ||
SaveWidget: function() {}, | ||
OverlayView: function OverlayView() { | ||
return | ||
}, | ||
Point: function Point() { | ||
return | ||
}, | ||
Polygon: function Polygon() { | ||
return | ||
}, | ||
Polyline: function Polyline() { | ||
return | ||
}, | ||
Rectangle: function Rectangle() { | ||
return | ||
}, | ||
SaveWidget: function SaveWidget() { | ||
return | ||
}, | ||
ScaleControlStyle: { | ||
DEFAULT: 0, | ||
}, | ||
Size: function() {}, | ||
StreetViewCoverageLayer: function() {}, | ||
StreetViewPanorama: function() {}, | ||
Size: function Size() { | ||
return | ||
}, | ||
StreetViewCoverageLayer: function StreetViewCoverageLayer() { | ||
return | ||
}, | ||
StreetViewPanorama: function StreetViewPanorama() { | ||
return | ||
}, | ||
StreetViewPreference: { | ||
@@ -285,3 +335,5 @@ BEST: 'best', | ||
}, | ||
StreetViewService: function() {}, | ||
StreetViewService: function StreetViewService() { | ||
return | ||
}, | ||
StreetViewSource: { | ||
@@ -301,3 +353,5 @@ DEFAULT: 'default', | ||
}, | ||
StyledMapType: function() {}, | ||
StyledMapType: function StyledMapType() { | ||
return | ||
}, | ||
SymbolPath: { | ||
@@ -310,3 +364,3 @@ BACKWARD_CLOSED_ARROW: 3, | ||
}, | ||
TrafficLayer: jest.fn().mockImplementation(function(opts) { | ||
TrafficLayer: jest.fn().mockImplementation(function TrafficLayer(opts) { | ||
this.opts = opts | ||
@@ -348,3 +402,5 @@ createMVCObject(this) | ||
}, | ||
__gjsload__: function() {}, | ||
__gjsload__: function __gjsload__() { | ||
return | ||
}, | ||
event: { | ||
@@ -351,0 +407,0 @@ clearInstanceListeners: jest.fn().mockName('clearInstanceListeners'), |
@@ -1,6 +0,6 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any | ||
export function forEach(obj: any, fn: any): any { | ||
Object.keys(obj).forEach(function iterator(key) { | ||
Object.keys(obj).forEach(function callbackfn(key) { | ||
return fn(obj[key], key) | ||
}) | ||
} |
/* global google */ | ||
/* eslint-disable filenames/match-regex */ | ||
import { reduce } from './reduce' | ||
import { forEach } from './foreach' | ||
export const applyUpdaterToNextProps = ( | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
export function applyUpdaterToNextProps( | ||
updaterMap: any, | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
prevProps: any, | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
nextProps: any, | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
instance: any | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
): any => { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
): any { | ||
const map: any = {} | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const iter = (fn: any, key: string): void => { | ||
function iter(fn: any, key: string): void { | ||
const nextValue = nextProps[key] | ||
@@ -36,5 +28,4 @@ | ||
export function registerEvents( | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
props: any, | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
instance: any, | ||
@@ -48,7 +39,13 @@ eventMap: Record<string, string> | ||
googleEventName: string, | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
onEventName: any | ||
): google.maps.MapsEventListener[] { | ||
if (typeof props[onEventName] === 'function') { | ||
acc.push(google.maps.event.addListener(instance, googleEventName, props[onEventName])) | ||
acc.push( | ||
google.maps.event.addListener( | ||
instance, | ||
googleEventName, | ||
props[onEventName] | ||
) | ||
) | ||
} | ||
@@ -67,3 +64,5 @@ | ||
export function unregisterEvents(events: google.maps.MapsEventListener[] = []): void { | ||
export function unregisterEvents( | ||
events: google.maps.MapsEventListener[] = [] | ||
): void { | ||
events.forEach(unregisterEvent) | ||
@@ -79,10 +78,6 @@ } | ||
}: { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
updaterMap: any | ||
eventMap: Record<string, string> | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
prevProps: any | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
nextProps: any | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
instance: any | ||
@@ -89,0 +84,0 @@ }): google.maps.MapsEventListener[] { |
@@ -12,3 +12,3 @@ import { isBrowser } from './isbrowser' | ||
export const injectScript = ({ url, id }: InjectScriptArg): Promise<any> => { | ||
export function injectScript({ url, id }: InjectScriptArg): Promise<unknown> { | ||
if (!isBrowser) { | ||
@@ -18,8 +18,15 @@ return Promise.reject(new Error('document is undefined')) | ||
return new Promise(function injectScriptCallback(resolve, reject) { | ||
const existingScript = document.getElementById(id) as HTMLScriptElement | undefined | ||
return new Promise(function injectScriptCallback( | ||
resolve: (value?: unknown) => void, | ||
reject: (reason?: unknown) => void | ||
): void { | ||
const existingScript = document.getElementById(id) as | ||
| HTMLScriptElement | ||
| undefined | ||
const windowWithGoogleMap: WindowWithGoogleMap = window | ||
if (existingScript) { | ||
// Same script id/url: keep same script | ||
const dataStateAttribute = existingScript.getAttribute('data-state') | ||
if (existingScript.src === url && dataStateAttribute !== 'error') { | ||
@@ -39,3 +46,3 @@ if (dataStateAttribute === 'ready') { | ||
existingScript.onerror = function(err): void { | ||
existingScript.onerror = function onerror(err): void { | ||
if (originalErrorCallback) { | ||
@@ -46,4 +53,2 @@ originalErrorCallback(err) | ||
} | ||
return | ||
} | ||
@@ -50,0 +55,0 @@ } |
@@ -1,1 +0,3 @@ | ||
export function noop(): void {} | ||
export function noop(): void { | ||
return | ||
} |
@@ -5,4 +5,5 @@ const isRobotoStyle = (element: HTMLElement): boolean => { | ||
(element as HTMLLinkElement).href && | ||
(element as HTMLLinkElement).href.indexOf('https://fonts.googleapis.com/css?family=Roboto') === | ||
0 | ||
(element as HTMLLinkElement).href.indexOf( | ||
'https://fonts.googleapis.com/css?family=Roboto' | ||
) === 0 | ||
) { | ||
@@ -14,13 +15,13 @@ return true | ||
element.tagName.toLowerCase() === 'style' && | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
element.styleSheet && | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
element.styleSheet.cssText && | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
element.styleSheet.cssText.replace('\r\n', '').indexOf('.gm-style') === 0 | ||
) { | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
@@ -42,3 +43,3 @@ element.styleSheet.cssText = '' | ||
element.tagName.toLowerCase() === 'style' && | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
@@ -63,3 +64,3 @@ !element.styleSheet && | ||
// TODO: adding return before reflect solves the TS issue | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
@@ -78,3 +79,3 @@ head.insertBefore = function insertBefore( | ||
// TODO: adding return before reflect solves the TS issue | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
@@ -81,0 +82,0 @@ head.appendChild = function appendChild(textNode: HTMLElement): void { |
@@ -1,2 +0,2 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any | ||
export const reduce = (obj: any, fn: any, acc: any): any => { | ||
@@ -3,0 +3,0 @@ return Object.keys(obj).reduce(function reducer(newAcc, key) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1633545
53
13189
4
+ Added@react-google-maps/infobox@2.0.0-alpha(transitive)
+ Added@react-google-maps/marker-clusterer@2.0.0-alpha(transitive)
+ Addedacorn@7.2.0(transitive)
+ Addedacorn-jsx@5.2.0(transitive)
- Removed@react-google-maps/infobox@1.9.3(transitive)
- Removed@react-google-maps/marker-clusterer@1.9.3(transitive)
- Removedacorn@7.4.1(transitive)
- Removedacorn-jsx@5.3.2(transitive)
Updatedacorn@7.2.0
Updatedacorn-jsx@5.2.0