1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1255],{37054:function(e,t,n){"use strict";n.d(t,{b6:function(){return m},nx:function(){return Re},KJ:function(){return w},Jx:function(){return V}});var s=n(85893),o=n(67294),i=n(73935),r=("undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self&&self,function(e,t,n,s,o,i,r,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,s,o,i,r,a],p=0;(l=new Error(t.replace(/%s/g,(function(){return u[p++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}});const a=(0,o.createContext)(null);function l(e,t,n,s){const o={};var i,r;return i=e,r=(e,i)=>{const r=n[i];r!==t[i]&&(o[i]=r,e(s,r))},Object.keys(i).forEach((e=>r(i[e],e))),o}function u(e,t,n){var s,o,i;return s=n,o=function(n,s,o){return"function"===typeof e[o]&&n.push(google.maps.event.addListener(t,s,e[o])),n},i=[],Object.keys(s).reduce((function(e,t){return o(e,s[t],t)}),i)}function p(e){google.maps.event.removeListener(e)}function d(e=[]){e.forEach(p)}function g({updaterMap:e,eventMap:t,prevProps:n,nextProps:s,instance:o}){const i=u(s,o,t);return l(e,n,s,o),i}const 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"},c={extraMapTypes(e,t){t.forEach((function(t,n){e.mapTypes.set(String(n),t)}))},center(e,t){e.setCenter(t)},clickableIcons(e,t){e.setClickableIcons(t)},heading(e,t){e.setHeading(t)},mapTypeId(e,t){e.setMapTypeId(t)},options(e,t){e.setOptions(t)},streetView(e,t){e.setStreetView(t)},tilt(e,t){e.setTilt(t)},zoom(e,t){e.setZoom(t)}};(0,o.memo)((function({children:e,options:t,id:n,mapContainerStyle:i,mapContainerClassName:r,center:l,onClick:u,onDblClick:p,onDrag:d,onDragEnd:g,onDragStart:h,onMouseMove:c,onMouseOut:m,onMouseOver:v,onMouseDown:f,onMouseUp:L,onRightClick:y,onCenterChanged:b,onLoad:C,onUnmount:x}){const[M,E]=(0,o.useState)(null),k=(0,o.useRef)(null),[w,S]=(0,o.useState)(null),[P,O]=(0,o.useState)(null),[I,D]=(0,o.useState)(null),[B,z]=(0,o.useState)(null),[R,U]=(0,o.useState)(null),[T,_]=(0,o.useState)(null),[j,A]=(0,o.useState)(null),[Z,V]=(0,o.useState)(null),[W,N]=(0,o.useState)(null),[H,F]=(0,o.useState)(null),[G,$]=(0,o.useState)(null),[Y,K]=(0,o.useState)(null);return(0,o.useEffect)((()=>{t&&null!==M&&M.setOptions(t)}),[M,t]),(0,o.useEffect)((()=>{null!==M&&"undefined"!==typeof l&&M.setCenter(l)}),[M,l]),(0,o.useEffect)((()=>{M&&p&&(null!==P&&google.maps.event.removeListener(P),O(google.maps.event.addListener(M,"dblclick",p)))}),[p]),(0,o.useEffect)((()=>{M&&g&&(null!==I&&google.maps.event.removeListener(I),D(google.maps.event.addListener(M,"dragend",g)))}),[g]),(0,o.useEffect)((()=>{M&&h&&(null!==B&&google.maps.event.removeListener(B),z(google.maps.event.addListener(M,"dragstart",h)))}),[h]),(0,o.useEffect)((()=>{M&&f&&(null!==R&&google.maps.event.removeListener(R),U(google.maps.event.addListener(M,"mousedown",f)))}),[f]),(0,o.useEffect)((()=>{M&&c&&(null!==T&&google.maps.event.removeListener(T),_(google.maps.event.addListener(M,"mousemove",c)))}),[c]),(0,o.useEffect)((()=>{M&&m&&(null!==j&&google.maps.event.removeListener(j),A(google.maps.event.addListener(M,"mouseout",m)))}),[m]),(0,o.useEffect)((()=>{M&&v&&(null!==Z&&google.maps.event.removeListener(Z),V(google.maps.event.addListener(M,"mouseover",v)))}),[v]),(0,o.useEffect)((()=>{M&&L&&(null!==W&&google.maps.event.removeListener(W),N(google.maps.event.addListener(M,"mouseup",L)))}),[L]),(0,o.useEffect)((()=>{M&&y&&(null!==H&&google.maps.event.removeListener(H),F(google.maps.event.addListener(M,"rightclick",y)))}),[y]),(0,o.useEffect)((()=>{M&&u&&(null!==G&&google.maps.event.removeListener(G),$(google.maps.event.addListener(M,"click",u)))}),[u]),(0,o.useEffect)((()=>{M&&d&&(null!==Y&&google.maps.event.removeListener(Y),K(google.maps.event.addListener(M,"drag",d)))}),[d]),(0,o.useEffect)((()=>{M&&b&&(null!==w&&google.maps.event.removeListener(w),S(google.maps.event.addListener(M,"center_changed",b)))}),[u]),(0,o.useEffect)((()=>{const e=null===k.current?null:new google.maps.Map(k.current,t);return E(e),null!==e&&C&&C(e),()=>{null!==e&&x&&x(e)}}),[]),(0,s.jsx)("div",Object.assign({id:n,ref:k,style:i,className:r},{children:(0,s.jsx)(a.Provider,Object.assign({value:M},{children:null!==M?e:(0,s.jsx)(s.Fragment,{})}))}))}));class m extends o.PureComponent{constructor(){super(...arguments),this.state={map:null},this.registeredEvents=[],this.mapRef=null,this.getInstance=()=>null===this.mapRef?null:new google.maps.Map(this.mapRef,this.props.options),this.panTo=e=>{const t=this.getInstance();t&&t.panTo(e)},this.setMapCallback=()=>{null!==this.state.map&&this.props.onLoad&&this.props.onLoad(this.state.map)},this.getRef=e=>{this.mapRef=e}}componentDidMount(){const e=this.getInstance();this.registeredEvents=g({updaterMap:c,eventMap:h,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{map:e}}),this.setMapCallback)}componentDidUpdate(e){null!==this.state.map&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:c,eventMap:h,prevProps:e,nextProps:this.props,instance:this.state.map}))}componentWillUnmount(){null!==this.state.map&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),d(this.registeredEvents))}render(){return(0,s.jsx)("div",Object.assign({id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName},{children:(0,s.jsx)(a.Provider,Object.assign({value:this.state.map},{children:null!==this.state.map?this.props.children:(0,s.jsx)(s.Fragment,{})}))}))}}function v(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]])}return n}
1function f(e,t,n,s){return new(n||(n=Promise))((function(o,i){function r(e){try{l(s.next(e))}catch(t){i(t)}}function a(e){try{l(s.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,a)}l((s=s.apply(e,t||[])).next())}))}const L="undefined"!==typeof document;function y({url:e,id:t,nonce:n}){return L?new Promise((function(s,o){const i=document.getElementById(t),r=window;if(i){const n=i.getAttribute("data-state");if(i.src===e&&"error"!==n){if("ready"===n)return s(t);{const e=r.initMap,n=i.onerror;return r.initMap=function(){e&&e(),s(t)},void(i.onerror=function(e){n&&n(e),o(e)})}}i.remove()}const a=document.createElement("script");a.type="text/javascript",a.src=e,a.id=t,a.async=!0,a.nonce=n,a.onerror=function(e){a.setAttribute("data-state","error"),o(e)},r.initMap=function(){a.setAttribute("data-state","ready"),s(t)},document.head.appendChild(a)})).catch((e=>{throw console.error("injectScript error: ",e),e})):Promise.reject(new Error("document is undefined"))}function b(e){const t=e.href;return!(!t||0!==t.indexOf("https://fonts.googleapis.com/css?family=Roboto")&&0!==t.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text"))||("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)}function C(){const e=document.getElementsByTagName("head")[0],t=e.insertBefore.bind(e);e.insertBefore=function(n,s){b(n)||Reflect.apply(t,e,[n,s])};const n=e.appendChild.bind(e);e.appendChild=function(t){b(t)||Reflect.apply(n,e,[t])}}function x({googleMapsApiKey:e,googleMapsClientId:t,version:n="weekly",language:s,region:o,libraries:i,channel:a,mapIds:l,authReferrerPolicy:u}){const p=[];return r(e&&t||!(e&&t),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),e?p.push(`key=${e}`):t&&p.push(`client=${t}`),n&&p.push(`v=${n}`),s&&p.push(`language=${s}`),o&&p.push(`region=${o}`),i&&i.length&&p.push(`libraries=${i.sort().join(",")}`),a&&p.push(`channel=${a}`),l&&l.length&&p.push(`map_ids=${l.join(",")}`),u&&p.push(`auth_referrer_policy=${u}`),p.push("callback=initMap"),`https://maps.googleapis.com/maps/api/js?${p.join("&")}`}let M=!1;function E(){return(0,s.jsx)("div",{children:"Loading..."})}const k={id:"script-loader",version:"weekly"};class w extends o.PureComponent{constructor(){super(...arguments),this.check=(0,o.createRef)(),this.state={loaded:!1},this.cleanupCallback=()=>{delete window.google.maps,this.injectScript()},this.isCleaningUp=()=>f(this,void 0,void 0,(function*(){return new Promise((function(e){if(M){if(L){const t=window.setInterval((function(){M||(window.clearInterval(t),e())}),1)}}else e()}))})),this.cleanup=()=>{M=!0;const e=document.getElementById(this.props.id);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)}))},this.injectScript=()=>{this.props.preventGoogleFontsLoading&&C(),r(!!this.props.id,'LoadScript requires "id" prop to be a string: %s',this.props.id);y({id:this.props.id,nonce:this.props.nonce,url:x(this.props)}).then((()=>{this.props.onLoad&&this.props.onLoad(),this.setState((function(){return{loaded:!0}}))})).catch((e=>{this.props.onError&&this.props.onError(e),console.error(`\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (${this.props.googleMapsApiKey||"-"}) or Client ID (${this.props.googleMapsClientId||"-"}) to <LoadScript />\n Otherwise it is a Network issue.\n `)}))}}componentDidMount(){if(L){if(window.google&&window.google.maps&&!M)return void console.error("google api is already presented");this.isCleaningUp().then(this.injectScript).catch((function(e){console.error("Error at injecting script after cleaning up: ",e)}))}}componentDidUpdate(e){this.props.libraries!==e.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
1static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),L&&e.language!==this.props.language&&(this.cleanup(),this.setState((function(){return{loaded:!1}}),this.cleanupCallback))}componentWillUnmount(){if(L){this.cleanup();const e=()=>{this.check.current||(delete window.google,M=!1)};window.setTimeout(e,1),this.props.onUnmount&&this.props.onUnmount()}}render(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||(0,s.jsx)(E,{})]})}}let S;w.defaultProps=k;const P=(0,s.jsx)(E,{});(0,o.memo)((function(e){var{loadingElement:t,onLoad:n,onError:s,onUnmount:i,children:a}=e,l=v(e,["loadingElement","onLoad","onError","onUnmount","children"]);const{isLoaded:u,loadError:p}=function({id:e=k.id,version:t=k.version,nonce:n,googleMapsApiKey:s,googleMapsClientId:i,language:a,region:l,libraries:u,preventGoogleFontsLoading:p,channel:d,mapIds:g,authReferrerPolicy:h}){const c=(0,o.useRef)(!1),[m,v]=(0,o.useState)(!1),[f,b]=(0,o.useState)(void 0);(0,o.useEffect)((function(){return c.current=!0,()=>{c.current=!1}}),[]),(0,o.useEffect)((function(){L&&p&&C()}),[p]),(0,o.useEffect)((function(){m&&r(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")}),[m]);const M=x({version:t,googleMapsApiKey:s,googleMapsClientId:i,language:a,region:l,libraries:u,channel:d,mapIds:g,authReferrerPolicy:h});(0,o.useEffect)((function(){function t(){c.current&&(v(!0),S=M)}L&&(window.google&&window.google.maps&&S===M?t():y({id:e,url:M,nonce:n}).then(t).catch((function(e){c.current&&b(e),console.warn(`\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (${s||"-"}) or Client ID (${i||"-"})\n Otherwise it is a Network issue.\n `),console.error(e)})))}),[e,M,n]);const E=(0,o.useRef)();return(0,o.useEffect)((function(){E.current&&u!==E.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"),E.current=u}),[u]),{isLoaded:m,loadError:f,url:M}}(l);return(0,o.useEffect)((function(){u&&"function"===typeof n&&n()}),[u,n]),(0,o.useEffect)((function(){p&&"function"===typeof s&&s(p)}),[p,s]),(0,o.useEffect)((function(){return()=>{i&&i()}}),[i]),u?a:t||P}));var O;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(O||(O={}));const I={},D={options(e,t){e.setOptions(t)}};(0,o.memo)((function({options:e,onLoad:t,onUnmount:n}){const s=(0,o.useContext)(a),[i,r]=(0,o.useState)(null);return(0,o.useEffect)((()=>{null!==i&&i.setMap(s)}),[s]),(0,o.useEffect)((()=>{e&&null!==i&&i.setOptions(e)}),[i,e]),(0,o.useEffect)((()=>{const o=new google.maps.TrafficLayer(Object.assign(Object.assign({},e||{}),{map:s}));return r(o),t&&t(o),()=>{null!==i&&(n&&n(i),i.setMap(null))}}),[]),null}));class B extends o.PureComponent{constructor(){super(...arguments),this.state={trafficLayer:null},this.setTrafficLayerCallback=()=>{null!==this.state.trafficLayer&&this.props.onLoad&&this.props.onLoad(this.state.trafficLayer)},this.registeredEvents=[]}componentDidMount(){const e=new google.maps.TrafficLayer(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=g({updaterMap:D,eventMap:I,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{trafficLayer:e}}),this.setTrafficLayerCallback)}componentDidUpdate(e){null!==this.state.trafficLayer&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:D,eventMap:I,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))}componentWillUnmount(){null!==this.state.trafficLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),d(this.registeredEvents),this.state.trafficLayer.setMap(null))}render(){return null}}B.contextType=a;(0,o.memo)((function({onLoad:e,onUnmount:t}){const n=(0,o.useContext)(a),[s,i]=(0,o.useState)(null);return(0,o.useEffect)((()=>{null!==s&&s.setMap(n)}),[n]),(0,o.useEffect)((()=>{const s=new google.maps.BicyclingLayer;return i(s),s.setMap(n),e&&e(s),()=>{null!==s&&(t&&t(s),s.setMap(null))}}),[]),null}));class z extends o.PureComponent{constructor(){super(...arguments),this.state={bicyclingLayer:null},this.setBicyclingLayerCallback=()=>{null!==this.state.bicyclingLayer&&(this.state.bicyclingLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.bicyclingLayer))}}componentDidMount(){const e=new google.maps.BicyclingLayer;this.setState((()=>({bicyclingLayer:e})),this.setBicyclingLayerCallback)}componentWillUnmount(){null!==this.state.bicyclingLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))}render(){return null}}z.contextType=a;(0,o.memo)((function({onLoad:e,onUnmount:t}){const n=(0,o.useContext)(a),[s,i]=(0,o.useState)(null);return(0,o.useEffect)((()=>{null!==s&&s.setMap(n)}),[n]),(0,o.useEffect)((()=>{const o=new google.maps.TransitLayer;return i(o),o.setMap(n),e&&e(o),()=>{null!==s&&(t&&t(s),this.state.transitLayer.setMap(null))}}),[]),null}));class R extends o.PureComponent{constructor(){super(...arguments),this.state={transitLayer:null},this.setTransitLayerCallback=()=>{null!==this.state.transitLayer&&(this.state.transitLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.transitLayer))}}componentDidMount(){const e=new google.maps.TransitLayer;this.setState((function(){return{transitLayer:e}}),this.setTransitLayerCallback)}componentWillUnmount(){null!==this.state.transitLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))}render(){return null}}R.contextType=a;const U={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},T={drawingMode(e,t){e.setDrawingMode(t)},options(e,t){e.setOptions(t)}};(0,o.memo)((function({options:e,drawingMode:t,onCircleComplete:n,onMarkerComplete:s,onOverlayComplete:i,onPolygonComplete:l,onPolylineComplete:u,onRectangleComplete:p,onLoad:d,onUnmount:g}){const h=(0,o.useContext)(a),[c,m]=(0,o.useState)(null),[v,f]=(0,o.useState)(null),[L,y]=(0,o.useState)(null),[b,C]=(0,o.useState)(null),[x,M]=(0,o.useState)(null),[E,k]=(0,o.useState)(null),[w,S]=(0,o.useState)(null);return(0,o.useEffect)((()=>{null!==c&&c.setMap(h)}),[h]),(0,o.useEffect)((()=>{e&&null!==c&&c.setOptions(e)}),[c,e]),(0,o.useEffect)((()=>{t&&null!==c&&c.setDrawingMode(t)}),[c,t]),(0,o.useEffect)((()=>{c&&n&&(null!==v&&google.maps.event.removeListener(v),f(google.maps.event.addListener(c,"cir
1clecomplete",n)))}),[c,n]),(0,o.useEffect)((()=>{c&&s&&(null!==L&&google.maps.event.removeListener(L),y(google.maps.event.addListener(c,"markercomplete",s)))}),[c,s]),(0,o.useEffect)((()=>{c&&i&&(null!==b&&google.maps.event.removeListener(b),C(google.maps.event.addListener(c,"overlaycomplete",i)))}),[c,i]),(0,o.useEffect)((()=>{c&&l&&(null!==x&&google.maps.event.removeListener(x),M(google.maps.event.addListener(c,"polygoncomplete",l)))}),[c,l]),(0,o.useEffect)((()=>{c&&u&&(null!==E&&google.maps.event.removeListener(E),k(google.maps.event.addListener(c,"polylinecomplete",u)))}),[c,u]),(0,o.useEffect)((()=>{c&&p&&(null!==w&&google.maps.event.removeListener(w),S(google.maps.event.addListener(c,"rectanglecomplete",p)))}),[c,p]),(0,o.useEffect)((()=>{r(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);const o=new google.maps.drawing.DrawingManager(Object.assign(Object.assign({},e||{}),{map:h}));return t&&o.setDrawingMode(t),n&&f(google.maps.event.addListener(o,"circlecomplete",n)),s&&y(google.maps.event.addListener(o,"markercomplete",s)),i&&C(google.maps.event.addListener(o,"overlaycomplete",i)),l&&M(google.maps.event.addListener(o,"polygoncomplete",l)),u&&k(google.maps.event.addListener(o,"polylinecomplete",u)),p&&S(google.maps.event.addListener(o,"rectanglecomplete",p)),m(o),d&&d(o),()=>{null!==c&&(v&&google.maps.event.removeListener(v),L&&google.maps.event.removeListener(L),b&&google.maps.event.removeListener(b),x&&google.maps.event.removeListener(x),E&&google.maps.event.removeListener(E),w&&google.maps.event.removeListener(w),g&&g(c),c.setMap(null))}}),[]),null}));class _ extends o.PureComponent{constructor(e){super(e),this.registeredEvents=[],this.state={drawingManager:null},this.setDrawingManagerCallback=()=>{null!==this.state.drawingManager&&this.props.onLoad&&this.props.onLoad(this.state.drawingManager)},r(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing)}componentDidMount(){const e=new google.maps.drawing.DrawingManager(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=g({updaterMap:T,eventMap:U,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{drawingManager:e}}),this.setDrawingManagerCallback)}componentDidUpdate(e){null!==this.state.drawingManager&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:T,eventMap:U,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))}componentWillUnmount(){null!==this.state.drawingManager&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),d(this.registeredEvents),this.state.drawingManager.setMap(null))}render(){return null}}_.contextType=a;const j={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(e,t){e.setAnimation(t)},clickable(e,t){e.setClickable(t)},cursor(e,t){e.setCursor(t)},draggable(e,t){e.setDraggable(t)},icon(e,t){e.setIcon(t)},label(e,t){e.setLabel(t)},map(e,t){e.setMap(t)},opacity(e,t){e.setOpacity(t)},options(e,t){e.setOptions(t)},position(e,t){e.setPosition(t)},shape(e,t){e.setShape(t)},title(e,t){e.setTitle(t)},visible(e,t){e.setVisible(t)},zIndex(e,t){e.setZIndex(t)}},Z={};(0,o.memo)((function({position:e,options:t,clusterer:n,noClustererRedraw:i,children:r,draggable:l,visible:u,animation:p,clickable:d,cursor:g,icon:h,label:c,opacity:m,shape:v,title:f,zIndex:L,onClick:y,onDblClick:b,onDrag:C,onDragEnd:x,onDragStart:M,onMouseOut:E,onMouseOver:k,onMouseUp:w,onMouseDown:S,onRightClick:P,onClickableChanged:O,onCursorChanged:I,onAnimationChanged:D,onDraggableChanged:B,onFlatChanged:z,onIconChanged:R,onPositionChanged:U,onShapeChanged:T,onTitleChanged:_,onVisibleChanged:j,onZindexChanged:A,onLoad:V,onUnmount:W}){const N=(0,o.useContext)(a),[H,F]=(0,o.useState)(null),[G,$]=(0,o.useState)(null),[Y,K]=(0,o.useState)(null),[q,J]=(0,o.useState)(null),[X,Q]=(0,o.useState)(null),[ee,te]=(0,o.useState)(null),[ne,se]=(0,o.useState)(null),[oe,ie]=(0,o.useState)(null),[re,ae]=(0,o.useState)(null),[le,ue]=(0,o.useState)(null),[pe,de]=(0,o.useState)(null),[ge,he]=(0,o.useState)(null),[ce,me]=(0,o.useState)(null),[ve,fe]=(0,o.useState)(null),[Le,ye]=(0,o.useState)(null),[be,Ce]=(0,o.useState)(null),[xe,Me]=(0,o.useState)(null),[Ee,ke]=(0,o.useState)(null),[we,Se]=(0,o.useState)(null),[Pe,Oe]=(0,o.useState)(null),[Ie,De]=(0,o.useState)(null),[Be,ze]=(0,o.useState)(null);(0,o.useEffect)((()=>{null!==H&&H.setMap(N)}),[N]),(0,o.useEffect)((()=>{"undefined"!==typeof t&&null!==H&&H.setOptions(t)}),[H,t]),(0,o.useEffect)((()=>{"undefined"!==typeof l&&null!==H&&H.setDraggable(l)}),[H,l]),(0,o.useEffect)((()=>{e&&null!==H&&H.setPosition(e)}),[H,e]),(0,o.useEffect)((()=>{"undefined"!==typeof u&&null!==H&&H.setVisible(u)}),[H,u]),(0,o.useEffect)((()=>{p&&null!==H&&H.setAnimation(p)}),[H,p]),(0,o.useEffect)((()=>{H&&b&&(null!==G&&google.maps.event.removeListener(G),$(google.maps.event.addListener(H,"dblclick",b)))}),[b]),(0,o.useEffect)((()=>{H&&x&&(null!==Y&&google.maps.event.removeListener(Y),K(google.maps.event.addListener(H,"dragend",x)))}),[x]),(0,o.useEffect)((()=>{H&&M&&(null!==q&&google.maps.event.removeListener(q),J(google.maps.event.addListener(H,"dragstart",M)))}),[M]),(0,o.useEffect)((()=>{H&&S&&(null!==X&&google.maps.event.removeListener(X),Q(google.maps.event.addListener(H,"mousedown",S
1)))}),[S]),(0,o.useEffect)((()=>{H&&E&&(null!==ee&&google.maps.event.removeListener(ee),te(google.maps.event.addListener(H,"mouseout",E)))}),[E]),(0,o.useEffect)((()=>{H&&k&&(null!==ne&&google.maps.event.removeListener(ne),se(google.maps.event.addListener(H,"mouseover",k)))}),[k]),(0,o.useEffect)((()=>{H&&w&&(null!==oe&&google.maps.event.removeListener(oe),ie(google.maps.event.addListener(H,"mouseup",w)))}),[w]),(0,o.useEffect)((()=>{H&&P&&(null!==re&&google.maps.event.removeListener(re),ae(google.maps.event.addListener(H,"rightclick",P)))}),[P]),(0,o.useEffect)((()=>{H&&y&&(null!==le&&google.maps.event.removeListener(le),ue(google.maps.event.addListener(H,"click",y)))}),[y]),(0,o.useEffect)((()=>{H&&C&&(null!==pe&&google.maps.event.removeListener(pe),de(google.maps.event.addListener(H,"drag",C)))}),[C]),(0,o.useEffect)((()=>{H&&O&&(null!==ge&&google.maps.event.removeListener(ge),he(google.maps.event.addListener(H,"clickable_changed",O)))}),[O]),(0,o.useEffect)((()=>{H&&I&&(null!==ce&&google.maps.event.removeListener(ce),me(google.maps.event.addListener(H,"cursor_changed",I)))}),[I]),(0,o.useEffect)((()=>{H&&D&&(null!==ve&&google.maps.event.removeListener(ve),fe(google.maps.event.addListener(H,"animation_changed",D)))}),[D]),(0,o.useEffect)((()=>{H&&B&&(null!==Le&&google.maps.event.removeListener(Le),ye(google.maps.event.addListener(H,"draggable_changed",B)))}),[B]),(0,o.useEffect)((()=>{H&&z&&(null!==be&&google.maps.event.removeListener(be),Ce(google.maps.event.addListener(H,"flat_changed",z)))}),[z]),(0,o.useEffect)((()=>{H&&R&&(null!==xe&&google.maps.event.removeListener(xe),Me(google.maps.event.addListener(H,"icon_changed",R)))}),[R]),(0,o.useEffect)((()=>{H&&U&&(null!==Ee&&google.maps.event.removeListener(Ee),ke(google.maps.event.addListener(H,"position_changed",U)))}),[U]),(0,o.useEffect)((()=>{H&&T&&(null!==we&&google.maps.event.removeListener(we),Se(google.maps.event.addListener(H,"shape_changed",T)))}),[T]),(0,o.useEffect)((()=>{H&&_&&(null!==Pe&&google.maps.event.removeListener(Pe),Oe(google.maps.event.addListener(H,"title_changed",_)))}),[_]),(0,o.useEffect)((()=>{H&&j&&(null!==Ie&&google.maps.event.removeListener(Ie),De(google.maps.event.addListener(H,"visible_changed",j)))}),[j]),(0,o.useEffect)((()=>{H&&A&&(null!==Be&&google.maps.event.removeListener(Be),ze(google.maps.event.addListener(H,"zindex_changed",A)))}),[A]),(0,o.useEffect)((()=>{const s=Object.assign(Object.assign(Object.assign({},t||Z),n?Z:{map:N}),{position:e}),o=new google.maps.Marker(s);return n?n.addMarker(o,!!i):o.setMap(N),e&&o.setPosition(e),"undefined"!==typeof u&&o.setVisible(u),"undefined"!==typeof l&&o.setDraggable(l),"undefined"!==typeof d&&o.setClickable(d),"string"===typeof g&&o.setCursor(g),h&&o.setIcon(h),"undefined"!==typeof c&&o.setLabel(c),"undefined"!==typeof m&&o.setOpacity(m),v&&o.setShape(v),"string"===typeof f&&o.setTitle(f),"number"===typeof L&&o.setZIndex(L),b&&$(google.maps.event.addListener(o,"dblclick",b)),x&&K(google.maps.event.addListener(o,"dragend",x)),M&&J(google.maps.event.addListener(o,"dragstart",M)),S&&Q(google.maps.event.addListener(o,"mousedown",S)),E&&te(google.maps.event.addListener(o,"mouseout",E)),k&&se(google.maps.event.addListener(o,"mouseover",k)),w&&ie(google.maps.event.addListener(o,"mouseup",w)),P&&ae(google.maps.event.addListener(o,"rightclick",P)),y&&ue(google.maps.event.addListener(o,"click",y)),C&&de(google.maps.event.addListener(o,"drag",C)),O&&he(google.maps.event.addListener(o,"clickable_changed",O)),I&&me(google.maps.event.addListener(o,"cursor_changed",I)),D&&fe(google.maps.event.addListener(o,"animation_changed",D)),B&&ye(google.maps.event.addListener(o,"draggable_changed",B)),z&&Ce(google.maps.event.addListener(o,"flat_changed",z)),R&&Me(google.maps.event.addListener(o,"icon_changed",R)),U&&ke(google.maps.event.addListener(o,"position_changed",U)),T&&Se(google.maps.event.addListener(o,"shape_changed",T)),_&&Oe(google.maps.event.addListener(o,"title_changed",_)),j&&De(google.maps.event.addListener(o,"visible_changed",j)),A&&ze(google.maps.event.addListener(o,"zindex_changed",A)),F(o),V&&
1V(o),()=>{null!==G&&google.maps.event.removeListener(G),null!==Y&&google.maps.event.removeListener(Y),null!==q&&google.maps.event.removeListener(q),null!==X&&google.maps.event.removeListener(X),null!==ee&&google.maps.event.removeListener(ee),null!==ne&&google.maps.event.removeListener(ne),null!==oe&&google.maps.event.removeListener(oe),null!==re&&google.maps.event.removeListener(re),null!==le&&google.maps.event.removeListener(le),null!==ge&&google.maps.event.removeListener(ge),null!==ce&&google.maps.event.removeListener(ce),null!==ve&&google.maps.event.removeListener(ve),null!==Le&&google.maps.event.removeListener(Le),null!==be&&google.maps.event.removeListener(be),null!==xe&&google.maps.event.removeListener(xe),null!==Ee&&google.maps.event.removeListener(Ee),null!==Pe&&google.maps.event.removeListener(Pe),null!==Ie&&google.maps.event.removeListener(Ie),null!==Be&&google.maps.event.removeListener(Be),W&&W(o),n?n.removeMarker(o,!!i):o&&o.setMap(null)}}),[]);const Re=(0,o.useMemo)((()=>r?o.Children.map(r,(e=>{if(!(0,o.isValidElement)(e))return e;const t=e;return(0,o.cloneElement)(t,{anchor:H})})):null),[r,H]);return(0,s.jsx)(s.Fragment,{children:Re})||null}));class V extends o.PureComponent{constructor(){super(...arguments),this.registeredEvents=[]}componentDidMount(){const e=Object.assign(Object.assign(Object.assign({},this.props.options||Z),this.props.clusterer?Z:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(e),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=g({updaterMap:A,eventMap:j,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)}componentDidUpdate(e){this.marker&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:A,eventMap:j,prevProps:e,nextProps:this.props,instance:this.marker}))}componentWillUnmount(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),d(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))}render(){let e=null;return this.props.children&&(e=o.Children.map(this.props.children,(e=>{if(!(0,o.isValidElement)(e))return e;const t=e;return(0,o.cloneElement)(t,{anchor:this.marker})}))),e||null}}V.contextType=a;var W=function(){function e(t,n){t.getClusterer().extend(e,google.maps.OverlayView),this.cluster=t,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(t.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return e.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},e.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},e.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var t=this.cluster.getClusterer();if(google.maps.event.trigger(t,"click",this.cluster),google.maps.event.trigger(t,"clusterclick",this.cluster),t.getZoomOnClick()){var n=t.getMaxZoom(),s=this.cluster.getBounds(),o=t.getMap();null!==o&&"fitBounds"in o&&o.fitBounds(s),this.timeOut=window.setTimeout((function(){var e=t.getMap();if(null!==e){"fitBounds"in e&&e.fitBounds(s);var o=e.getZoom()||0;null!==n&&o>n&&e.setZoom(n+1)}}),100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},e.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},e.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},e.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),null===(e=this.getPanes())||void 0===e||e.overlayMouseTarget.appendChild(this.div);var t=this.getMap();null!==t&&(this.boundsChangedListener=google.maps.event.addListener(t,"boun
1ds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),null!==this.timeOut&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},e.prototype.draw=function(){if(this.visible&&null!==this.div&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=null!==e?"".concat(e.y,"px"):"0",this.div.style.left=null!==e?"".concat(e.x,"px"):"0"}},e.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},e.prototype.show=function(){var e,t,n,s;if(this.div&&this.center){var o=null===this.sums||"undefined"===typeof this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,i=this.backgroundPosition.split(" "),r=parseInt(i[0].replace(/^\s+|\s+$/g,""),10),a=parseInt(i[1].replace(/^\s+|\s+$/g,""),10),l=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(null!==l?"".concat(l.y,"px"):"0","; left: ").concat(null!==l?"".concat(l.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var u=document.createElement("img");u.alt=o,u.src=this.url,u.width=this.width,u.height=this.height,u.setAttribute("style","position: absolute; top: ".concat(a,"px; left: ").concat(r,"px")),this.cluster.getClusterer().enableRetinaIcons||(u.style.clip="rect(-".concat(a,"px, -").concat(r+this.width,"px, -").concat(a+this.height,", -").concat(r,")"));var p=document.createElement("div");p.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),(null===(e=this.sums)||void 0===e?void 0:e.text)&&(p.innerText="".concat(null===(t=this.sums)||void 0===t?void 0:t.text)),(null===(n=this.sums)||void 0===n?void 0:n.html)&&(p.innerHTML="".concat(null===(s=this.sums)||void 0===s?void 0:s.html)),this.div.innerHTML="",this.div.appendChild(u),this.div.appendChild(p),this.div.title=o,this.div.style.display=""}this.visible=!0},e.prototype.useStyle=function(e){this.sums=e;var t=this.cluster.getClusterer().getStyles(),n=t[Math.min(t.length-1,Math.max(0,e.index-1))];this.url=n.url,this.height=n.height,this.width=n.width,n.className&&(this.className="".concat(this.clusterClassName," ").concat(n.className)),this.anchorText=n.anchorText||[0,0],this.anchorIcon=n.anchorIcon||[this.height/2,this.width/2],this.textColor=n.textColor||"black",this.textSize=n.textSize||11,this.textDecoration=n.textDecoration||"none",this.fontWeight=n.fontWeight||"bold",this.fontStyle=n.fontStyle||"normal",this.fontFamily=n.fontFamily||"Arial,sans-serif",this.backgroundPosition=n.backgroundPosition||"0 0"},e.prototype.setCenter=function(e){this.center=e},e.prototype.getPosFromLatLng=function(e){var t=this.getProjection().fromLatLngToDivPixel(e);return null!==t&&(t.x-=this.anchorIcon[1],t.y-=this.anchorIcon[0]),t},e}(),N=function(){function e(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new W(this,this.markerClusterer.getStyles()),this.get
1Size=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return e.prototype.getSize=function(){return this.markers.length},e.prototype.getMarkers=function(){return this.markers},e.prototype.getCenter=function(){return this.center},e.prototype.getMap=function(){return this.map},e.prototype.getClusterer=function(){return this.markerClusterer},e.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),t=this.getMarkers(),n=0;n<t.length;n++){var s=t[n].getPosition();s&&e.extend(s)}return e},e.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},e.prototype.addMarker=function(e){var t,n;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter&&(n=e.getPosition())){var s=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(s-1)+n.lat())/s,(this.center.lng()*(s-1)+n.lng())/s),this.calculateBounds()}}else(n=e.getPosition())&&(this.center=n,this.calculateBounds());e.isAdded=!0,this.markers.push(e);var o=this.markers.length,i=this.markerClusterer.getMaxZoom(),r=null===(t=this.map)||void 0===t?void 0:t.getZoom();if(null!==i&&"undefined"!==typeof r&&r>i)e.getMap()!==this.map&&e.setMap(this.map);else if(o<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(o===this.minClusterSize)for(var a=0;a<o;a++)this.markers[a].setMap(null);else e.setMap(null);return!0},e.prototype.isMarkerInClusterBounds=function(e){if(null!==this.bounds){var t=e.getPosition();if(t)return this.bounds.contains(t)}return!1},e.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},e.prototype.updateIcon=function(){var e,t=this.markers.length,n=this.markerClusterer.getMaxZoom(),s=null===(e=this.map)||void 0===e?void 0:e.getZoom();null!==n&&"undefined"!==typeof s&&s>n||t<this.minClusterSize?this.clusterIcon.hide():(this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show())},e.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var t=0;t<this.markers.length;t++)if(e===this.markers[t])return!0;return!1},e}();function H(e,t){var n=e.length,s=n.toString().length,o=Math.min(s,t);return{text:n.toString(),index:o,title:""}}var F=[53,56,66,78,90],G=function(){function e(t,n,s){void 0===n&&(n=[]),void 0===s&&(s={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createCluster
1s=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.extend=this.extend.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend(e,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=s.gridSize||60,this.minClusterSize=s.minimumClusterSize||2,this.maxZoom=s.maxZoom||null,this.styles=s.styles||[],this.title=s.title||"",this.zoomOnClick=!0,void 0!==s.zoomOnClick&&(this.zoomOnClick=s.zoomOnClick),this.averageCenter=!1,void 0!==s.averageCenter&&(this.averageCenter=s.averageCenter),this.ignoreHidden=!1,void 0!==s.ignoreHidden&&(this.ignoreHidden=s.ignoreHidden),this.enableRetinaIcons=!1,void 0!==s.enableRetinaIcons&&(this.enableRetinaIcons=s.enableRetinaIcons),this.imagePath=s.imagePath||"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",this.imageExtension=s.imageExtension||"png",this.imageSizes=s.imageSizes||F,this.calculator=s.calculator||H,this.batchSize=s.batchSize||2e3,this.batchSizeIE=s.batchSizeIE||500,this.clusterClass=s.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(t)}return e.prototype.onZoomChanged=function(){var e,t;this.resetViewport(!1),(null===(e=this.getMap())||void 0===e?void 0:e.getZoom())!==(this.get("minZoom")||0)&&(null===(t=this.getMap())||void 0===t?void 0:t.getZoom())!==this.get("maxZoom")||google.maps.event.trigger(this,"idle")},e.prototype.onIdle=function(){this.redraw()},e.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),null!==e&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},e.prototype.onRemove=function(){for(var e=0;e<this.markers.length;e++)this.markers[e].getMap()!==this.activeMap&&this.markers[e].setMap(this.activeMap);for(e=0;
1e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(e=0;e<this.listeners.length;e++)google.maps.event.removeListener(this.listeners[e]);this.listeners=[],this.activeMap=null,this.ready=!1},e.prototype.draw=function(){},e.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e],width:this.imageSizes[e]})},e.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),t=new google.maps.LatLngBounds,n=0;n<e.length;n++){var s=e[n].getPosition();s&&t.extend(s)}var o=this.getMap();null!==o&&"fitBounds"in o&&o.fitBounds(t)},e.prototype.getGridSize=function(){return this.gridSize},e.prototype.setGridSize=function(e){this.gridSize=e},e.prototype.getMinimumClusterSize=function(){return this.minClusterSize},e.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},e.prototype.getMaxZoom=function(){return this.maxZoom},e.prototype.setMaxZoom=function(e){this.maxZoom=e},e.prototype.getStyles=function(){return this.styles},e.prototype.setStyles=function(e){this.styles=e},e.prototype.getTitle=function(){return this.title},e.prototype.setTitle=function(e){this.title=e},e.prototype.getZoomOnClick=function(){return this.zoomOnClick},e.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},e.prototype.getAverageCenter=function(){return this.averageCenter},e.prototype.setAverageCenter=function(e){this.averageCenter=e},e.prototype.getIgnoreHidden=function(){return this.ignoreHidden},e.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},e.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},e.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},e.prototype.getImageExtension=function(){return this.imageExtension},e.prototype.setImageExtension=function(e){this.imageExtension=e},e.prototype.getImagePath=function(){return this.imagePath},e.prototype.setImagePath=function(e){this.imagePath=e},e.prototype.getImageSizes=function(){return this.imageSizes},e.prototype.setImageSizes=function(e){this.imageSizes=e},e.prototype.getCalculator=function(){return this.calculator},e.prototype.setCalculator=function(e){this.calculator=e},e.prototype.getBatchSizeIE=function(){return this.batchSizeIE},e.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},e.prototype.getClusterClass=function(){return this.clusterClass},e.prototype.setClusterClass=function(e){this.clusterClass=e},e.prototype.getMarkers=function(){return this.markers},e.prototype.getTotalMarkers=function(){return this.markers.length},e.prototype.getClusters=function(){return this.clusters},e.prototype.getTotalClusters=function(){return this.clusters.length},e.prototype.addMarker=function(e,t){this.pushMarkerTo(e),t||this.redraw()},e.prototype.addMarkers=function(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.pushMarkerTo(e[n]);t||this.redraw()},e.prototype.pushMarkerTo=function(e){var t=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",(function(){t.ready&&(e.isAdded=!1,t.repaint())})),e.isAdded=!1,this.markers.push(e)},e.prototype.removeMarker_=function(e){var t=-1;if(this.markers.indexOf)t=this.markers.indexOf(e);else for(var n=0;n<this.markers.length;n++)if(e===this.markers[n]){t=n;break}return-1!==t&&(e.setMap(null),this.markers.splice(t,1),!0)},e.prototype.removeMarker=function(e,t){var n=this.removeMarker_(e);return!t&&n&&this.repaint(),n},e.prototype.removeMarkers=function(e,t){for(var n=!1,s=0;s<e.length;s++)n=n||this.removeMarker_(e[s]);return!t&&n&&this.repaint(),n},e.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]}
1,e.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout((function(){for(var t=0;t<e.length;t++)e[t].remove()}),0)},e.prototype.getExtendedBounds=function(e){var t=this.getProjection(),n=t.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));null!==n&&(n.x+=this.gridSize,n.y-=this.gridSize);var s=t.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(null!==s&&(s.x-=this.gridSize,s.y+=this.gridSize),null!==n){var o=t.fromDivPixelToLatLng(n);null!==o&&e.extend(o)}if(null!==s){var i=t.fromDivPixelToLatLng(s);null!==i&&e.extend(i)}return e},e.prototype.redraw=function(){this.createClusters(0)},e.prototype.resetViewport=function(e){for(var t=0;t<this.clusters.length;t++)this.clusters[t].remove();this.clusters=[];for(t=0;t<this.markers.length;t++){var n=this.markers[t];n.isAdded=!1,e&&n.setMap(null)}},e.prototype.distanceBetweenPoints=function(e,t){var n=(t.lat()-e.lat())*Math.PI/180,s=(t.lng()-e.lng())*Math.PI/180,o=Math.sin(n/2)*Math.sin(n/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(t.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2);return 2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))*6371},e.prototype.isMarkerInBounds=function(e,t){var n=e.getPosition();return!!n&&t.contains(n)},e.prototype.addToClosestCluster=function(e){for(var t,n=4e4,s=null,o=0;
1o<this.clusters.length;o++){var i=(t=this.clusters[o]).getCenter(),r=e.getPosition();if(i&&r){var a=this.distanceBetweenPoints(i,r);a<n&&(n=a,s=t)}}s&&s.isMarkerInClusterBounds(e)?s.addMarker(e):((t=new N(this)).addMarker(e),this.clusters.push(t))},e.prototype.createClusters=function(e){var t=this;if(this.ready){0===e&&(google.maps.event.trigger(this,"clusteringbegin",this),null!==this.timerRefStatic&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var n=this.getMap(),s=(null!==n&&"getBounds"in n?n.getBounds():null),o=((null===n||void 0===n?void 0:n.getZoom())||0)>3?new google.maps.LatLngBounds(null===s||void 0===s?void 0:s.getSouthWest(),null===s||void 0===s?void 0:s.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),i=this.getExtendedBounds(o),r=Math.min(e+this.batchSize,this.markers.length),a=e;a<r;a++){var l=this.markers[a];!l.isAdded&&this.isMarkerInBounds(l,i)&&(!this.ignoreHidden||this.ignoreHidden&&l.getVisible())&&this.addToClosestCluster(l)}if(r<this.markers.length)this.timerRefStatic=window.setTimeout((function(){t.createClusters(r)}),0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(a=0;
1a<this.clusters.length;a++)this.clusters[a].updateIcon()}}},e.prototype.extend=function(e,t){return function(e){for(var t in e.prototype)this.prototype[t]=e.prototype[t];return this}.apply(e,[t])},e}();const $={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},Y={averageCenter(e,t){e.setAverageCenter(t)},batchSizeIE(e,t){e.setBatchSizeIE(t)},calculator(e,t){e.setCalculator(t)},clusterClass(e,t){e.setClusterClass(t)},enableRetinaIcons(e,t){e.setEnableRetinaIcons(t)},gridSize(e,t){e.setGridSize(t)},ignoreHidden(e,t){e.setIgnoreHidden(t)},imageExtension(e,t){e.setImageExtension(t)},imagePath(e,t){e.setImagePath(t)},imageSizes(e,t){e.setImageSizes(t)},maxZoom(e,t){e.setMaxZoom(t)},minimumClusterSize(e,t){e.setMinimumClusterSize(t)},styles(e,t){e.setStyles(t)},title(e,t){e.setTitle(t)},zoomOnClick(e,t){e.setZoomOnClick(t)}},K={};(0,o.memo)((function(e){const{children:t,options:n,averageCenter:s,batchSizeIE:i,calculator:r,clusterClass:l,enableRetinaIcons:u,gridSize:p,ignoreHidden:d,imageExtension:g,imagePath:h,imageSizes:c,maxZoom:m,minimumClusterSize:v,styles:f,title:L,zoomOnClick:y,onClick:b,onClusteringBegin:C,onClusteringEnd:x,onMouseOver:M,onMouseOut:E,onLoad:k,onUnmount:w}=e,[S,P]=(0,o.useState)(null),O=(0,o.useContext)(a),[I,D]=(0,o.useState)(null),[B,z]=(0,o.useState)(null),[R,U]=(0,o.useState)(null),[T,_]=(0,o.useState)(null),[j,A]=(0,o.useState)(null);return(0,o.useEffect)((()=>{S&&E&&(null!==T&&google.maps.event.removeListener(T),_(google.maps.event.addListener(S,$.onMouseOut,E)))}),[E]),(0,o.useEffect)((()=>{S&&M&&(null!==j&&google.maps.event.removeListener(j),A(google.maps.event.addListener(S,$.onMouseOver,M)))}),[M]),(0,o.useEffect)((()=>{S&&b&&(null!==I&&google.maps.event.removeListener(I),D(google.maps.event.addListener(S,$.onClick,b)))}),[b]),(0,o.useEffect)((()=>{S&&C&&(null!==B&&google.maps.event.removeListener(B),z(google.maps.event.addListener(S,$.onClusteringBegin,C)))}),[C]),(0,o.useEffect)((()=>{S&&x&&(null!==R&&google.maps.event.removeListener(R),z(google.maps.event.addListener(S,$.onClusteringEnd,x)))}),[x]),(0,o.useEffect)((()=>{"undefined"!==typeof s&&null!==S&&Y.averageCenter(S,s)}),[S,s]),(0,o.useEffect)((()=>{"undefined"!==typeof i&&null!==S&&Y.batchSizeIE(S,i)}),[S,i]),(0,o.useEffect)((()=>{"undefined"!==typeof r&&null!==S&&Y.calculator(S,r)}),[S,r]),(0,o.useEffect)((()=>{"undefined"!==typeof l&&null!==S&&Y.clusterClass(S,l)}),[S,l]),(0,o.useEffect)((()=>{"undefined"!==typeof u&&null!==S&&Y.enableRetinaIcons(S,u)}),[S,u]),(0,o.useEffect)((()=>{"undefined"!==typeof p&&null!==S&&Y.gridSize(S,p)}),[S,p]),(0,o.useEffect)((()=>{"undefined"!==typeof d&&null!==S&&Y.ignoreHidden(S,d)}),[S,d]),(0,o.useEffect)((()=>{"undefined"!==typeof g&&null!==S&&Y.imageExtension(S,g)}),[S,g]),(0,o.useEffect)((()=>{"undefined"!==typeof h&&null!==S&&Y.imagePath(S,h)}),[S,h]),(0,o.useEffect)((()=>{"undefined"!==typeof c&&null!==S&&Y.imageSizes(S,c)}),[S,c]),(0,o.useEffect)((()=>{"undefined"!==typeof m&&null!==S&&Y.maxZoom(S,m)}),[S,m]),(0,o.useEffect)((()=>{"undefined"!==typeof v&&null!==S&&Y.minimumClusterSize(S,v)}),[S,v]),(0,o.useEffect)((()=>{"undefined"!==typeof f&&null!==S&&Y.styles(S,f)}),[S,f]),(0,o.useEffect)((()=>{"undefined"!==typeof L&&null!==S&&Y.title(S,L)}),[S,L]),(0,o.useEffect)((()=>{"undefined"!==typeof y&&null!==S&&Y.zoomOnClick(S,y)}),[S,y]),(0,o.useEffect)((()=>{if(!O)return;const e=Object.assign({},n||K),t=new G(O,[],e);return s&&Y.averageCenter(t,s),i&&Y.batchSizeIE(t,i),r&&Y.calculator(t,r),l&&Y.clusterClass(t,l),u&&Y.enableRetinaIcons(t,u),p&&Y.gridSize(t,p),d&&Y.ignoreHidden(t,d),g&&Y.imageExtension(t,g),h&&Y.imagePath(t,h),c&&Y.imageSizes(t,c),m&&Y.maxZoom(t,m),v&&Y.minimumClusterSize(t,v),f&&Y.styles(t,f),L&&Y.title(t,L),y&&Y.zoomOnClick(t,y),E&&_(google.maps.event.addListener(t,$.onMouseOut,E)),M&&A(google.maps.event.addListener(t,$.onMouseOver,M)),b&&D(google.maps.event.addListener(t,$.onClick,b)),C&&z(google.maps.event.addListener(t,$.onClusteringBegin,C)),x&&U(google.maps.event.addListener(t,$.onClusteringEnd,x)),P(t),k&&k(t),()=>{null!==T&&google.maps.event.removeListener(T),null!==j&&google.maps.event.removeListener(j),null!==I&&google.maps.event.removeListener(I),null!==B&&google.maps.event.removeListener(B),null!==R&&google.maps.event.removeListener(R),w&&w(t)}}),[]),null!==S&&t(S)||null}));class q extends o.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={markerClusterer:null},this.setClustererCallback=()=>{null!==this.state.markerClusterer&&this.props.onLoad&&this.props.onLoad(this.state.markerClusterer)}}componentDidMount(){if(this.context){const e=new G(this.context,[],this.props.options);this.registeredEvents=g({updaterMap:Y,eventMap:$,prevProps:{},nextProps:this.props,instance:e}),this.setState((()=>({markerClusterer:e})),this.setClustererCallback)}}componentDidUpdate(e){this.state.markerClusterer&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:Y,eventMap:$,prevProps:e,nextProps:this.props,instance:this.state.markerClusterer}))}componentWillUnmount(){null!==this.state.markerClusterer&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),d(this.registeredEvents),this.state.markerClusterer.setMap(null))}render(){return null!==this.state.markerClusterer?this.props.children(this.state.markerClusterer):null}}function J(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}q.contextType=a;var X=function(){function e(t){void 0===t&&(t={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.b
1ind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(e,google.maps.OverlayView),this.content=t.content||"",this.disableAutoPan=t.disableAutoPan||!1,this.maxWidth=t.maxWidth||0,this.pixelOffset=t.pixelOffset||new google.maps.Size(0,0),this.position=t.position||new google.maps.LatLng(0,0),this.zIndex=t.zIndex||null,this.boxClass=t.boxClass||"infoBox",this.boxStyle=t.boxStyle||{},this.closeBoxMargin=t.closeBoxMargin||"2px",this.closeBoxURL=t.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",""===t.closeBoxURL&&(this.closeBoxURL=""),this.infoBoxClearance=t.infoBoxClearance||new google.maps.Size(1,1),"undefined"===typeof t.visible&&("undefined"===typeof t.isHidden?t.visible=!0:t.visible=!t.isHidden),this.isHidden=!t.visible,this.alignBottom=t.alignBottom||!1,this.pane=t.pane||"floatPane",this.enableEventPropagation=t.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return e.prototype.createInfoBoxDiv=function(){var e=this;if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),"string"===typeof this.content?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var t=this.getPanes();if(null!==t&&t[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(0!==this.maxWidth&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var n=this.getBoxWidths();
1this.div.style.width=this.div.offsetWidth-n.left-n.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var s=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],o=0;o<s.length;o++)this.eventListeners.push(google.maps.event.addListener(this.div,s[o],J));this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",(function(){e.div&&(e.div.style.cursor="default")})))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",(function(t){t.returnValue=!1,t.preventDefault&&t.preventDefault(),e.enableEventPropagation||J(t)})),google.maps.event.trigger(this,"domready")}},e.prototype.getCloseBoxImg=function(){var e="";return""!==this.closeBoxURL&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},e.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&""!==this.closeBoxURL?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},e.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},e.prototype.getCloseClickHandler=function(){return this.closeClickHandler},e.prototype.panBox=function(e){if(this.div&&!e){var t=this.getMap();if(t instanceof google.maps.Map){var n=0,s=0,o=t.getBounds();o&&!o.contains(this.position)&&t.setCenter(this.position);var i=t.getDiv(),r=i.offsetWidth,a=i.offsetHeight,l=this.pixelOffset.width,u=this.pixelOffset.height,p=this.div.offsetWidth,d=this.div.offsetHeight,g=this.infoBoxClearance.width,h=this.infoBoxClearance.height,c=this.getProjection().fromLatLngToContainerPixel(this.position);null!==c&&(c.x<-l+g?n=c.x+l-g:c.x+p+l+g>r&&(n=c.x+p+l+g-r),this.alignBottom?c.y<-u+h+d?s=c.y+u-h-d:c.y+u+h>a&&(s=c.y+u+h-a):c.y<-u+h?s=c.y+u-h:c.y+d+u+h>a&&(s=c.y+d+u+h-a)),0===n&&0===s||t.panBy(n,s)}}},e.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.div.style[t]=e[t]);if(this.div.style.webkitTransform="translateZ(0)","undefined"!==typeof this.div.style.opacity&&""!==this.div.style.opacity){var n=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*n+')"',this.div.style.filter="alpha(opacity="+100*n+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",null!==this.zIndex&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},e.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var t=this.div.ownerDocument,n=t&&t.defaultView?t.defaultView.getComputedStyle(this.div,""):null;n&&(e.top=parseInt(n.borderTopWidth||"",10)||0,e.bottom=parseInt(n.borderBottomWidth||"",10)||0,e.left=parseInt(n.borderLeftWidth||"",10)||0,e.right=parseInt(n.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var s=this.div.currentStyle;s&&(e.top=parseInt(s.borderTopWidth||"",10)||0,e.bottom=parseInt(s.borderBottomWidth||"",10)||0,e.left=parseInt(s.borderLeftWidth||"",10)||0,e.right=parseInt(s.borderRightWidth||"",10)||0)}return e},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},e.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection().fromLatLngToDivPixel(this.position);null!==e&&(this.div.style.left=e.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(e.y+this.pixelOffset.height)+"px":this.div.style.top=e.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},e.prototype.setOptions=function(e){void 0===e&&(e={}),"undefined"!==typeof e.boxClass&&(this.boxClass=e.boxClass,this.setBoxStyle()),"undefined"!==typeof e.boxStyle&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),"undefined"!==typeof e.content&&this.setContent(e.content),"undefined"!==typeof e.disableAutoPan&&(this.disableAutoPan=e.disableAutoPan),"undefined"!==typeof e.maxWidth&&(this.maxWidth=e.maxWidth),"undefined"!==typeof e.pixelOffset&&(this.pixelOffset=e.pixelOffset),"undefined"!==typeof e.alignBottom&&(this.alignBottom=e.alignBottom),"undefined"!==typeof e.position&&this.setPosition(e.position),"undefined"!==typeof e.zIndex&&this.setZIndex(e.zIndex),"undefined"!==typeof e.closeBoxMargin&&(this.closeBoxMargin=e.closeBoxMargin),"undefined"!==typeof e.closeBoxURL&&(this.closeBoxURL=e.closeBoxURL),"undefined"!==typeof e.infoBoxClearance&&(this.infoBoxClearance=e.infoBoxClearance),"undefined"!==typeof e.isHidden&&(this.isHidden=e.isHidden),"undefined"!==typeof e.visible&&(this.isHidden=!e.visible),"undefined"!==typeof e.enableEventPropagation&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},e.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),"string"===typeof e?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px","string"===typeof e?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},e.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},e.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},e.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},e.prototype.getContent=function(){return this.content},e.prototype.getPosition=function(){return this.position},e.prototype.getZIndex=function(){return this.zIndex},e.prototype.getVisible=function(){var e=this.getMap();return"undefined"!==typeof e&&null!==e&&!this.isHidden},e.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},e.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},e.prototype.open=function(e,t){var n=this;t&&(this.position=t.getPosition(),this.moveListener=google.maps.event.addListener(t,"position_changed",(function(){var e=t.getPosition();n.setPosition(e)})),this.mapListener=google.maps.event.addListener(t,"map_changed",(function(){n.setMap(t.map)}))),this.setMap(e),this.div&&this.panBox()},e.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0;e<this.eventListeners.length;e++)google.maps.event.removeListener(this.eventListeners[e]);this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},e.prototype.extend=function(e,t){return function(e){for(var t in e.prototype)Object.prototype.hasOwnProperty.call(this,t)||(this.prototype[t]=e.prototype[t]);return this}.apply(e,[t])},e}();const Q={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"}
1,ee={options(e,t){e.setOptions(t)},position(e,t){t instanceof google.maps.LatLng?e.setPosition(t):e.setPosition(new google.maps.LatLng(t.lat,t.lng))},visible(e,t){e.setVisible(t)},zIndex(e,t){e.setZIndex(t)}},te={};(0,o.memo)((function({children:e,anchor:t,options:n,position:s,zIndex:l,onCloseClick:u,onDomReady:p,onContentChanged:d,onPositionChanged:g,onZindexChanged:h,onLoad:c,onUnmount:m}){const f=(0,o.useContext)(a),[L,y]=(0,o.useState)(null),[b,C]=(0,o.useState)(null),[x,M]=(0,o.useState)(null),[E,k]=(0,o.useState)(null),[w,S]=(0,o.useState)(null),[P,O]=(0,o.useState)(null),I=(0,o.useRef)(null);return(0,o.useEffect)((()=>{f&&null!==L&&(L.close(),t?L.open(f,t):L.getPosition()&&L.open(f))}),[f,L,t]),(0,o.useEffect)((()=>{n&&null!==L&&L.setOptions(n)}),[L,n]),(0,o.useEffect)((()=>{if(s&&null!==L){const e=s instanceof google.maps.LatLng?s:new google.maps.LatLng(s.lat,s.lng);L.setPosition(e)}}),[s]),(0,o.useEffect)((()=>{"number"===typeof l&&null!==L&&L.setZIndex(l)}),[l]),(0,o.useEffect)((()=>{L&&u&&(null!==b&&google.maps.event.removeListener(b),C(google.maps.event.addListener(L,"closeclick",u)))}),[u]),(0,o.useEffect)((()=>{L&&p&&(null!==x&&google.maps.event.removeListener(x),M(google.maps.event.addListener(L,"domready",p)))}),[p]),(0,o.useEffect)((()=>{L&&d&&(null!==E&&google.maps.event.removeListener(E),k(google.maps.event.addListener(L,"content_changed",d)))}),[d]),(0,o.useEffect)((()=>{L&&g&&(null!==w&&google.maps.event.removeListener(w),S(google.maps.event.addListener(L,"position_changed",g)))}),[g]),(0,o.useEffect)((()=>{L&&h&&(null!==P&&google.maps.event.removeListener(P),O(google.maps.event.addListener(L,"zindex_changed",h)))}),[h]),(0,o.useEffect)((()=>{if(f){const e=n||te,{position:s}=e,o=v(e,["position"]);let i;!s||s instanceof google.maps.LatLng||(i=new google.maps.LatLng(s.lat,s.lng));const a=new X(Object.assign(Object.assign({},o),i?{position:i}:{}));I.current=document.createElement("div"),y(a),u&&C(google.maps.event.addListener(a,"closeclick",u)),p&&M(google.maps.event.addListener(a,"domready",p)),d&&k(google.maps.event.addListener(a,"content_changed",d)),g&&S(google.maps.event.addListener(a,"position_changed",g)),h&&O(google.maps.event.addListener(a,"zindex_changed",h)),a.setContent(I.current),t?a.open(f,t):a.getPosition()?a.open(f):r(!1,"You must provide either an anchor or a position prop for <InfoBox>."),c&&c(a)}return()=>{null!==L&&(b&&google.maps.event.removeListener(b),E&&google.maps.event.removeListener(E),x&&google.maps.event.removeListener(x),w&&google.maps.event.removeListener(w),P&&google.maps.event.removeListener(P),m&&m(L),L.close())}}),[]),I.current?(0,i.createPortal)(o.Children.only(e),I.current):null}));
1class ne extends o.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.containerElement=null,this.state={infoBox:null},this.open=(e,t)=>{t?e.open(this.context,t):e.getPosition()?e.open(this.context):r(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},this.setInfoBoxCallback=()=>{null!==this.state.infoBox&&null!==this.containerElement&&(this.state.infoBox.setContent(this.containerElement),this.open(this.state.infoBox,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoBox))}}componentDidMount(){const e=this.props.options||{},{position:t}=e,n=v(e,["position"]);let s;!t||t instanceof google.maps.LatLng||(s=new google.maps.LatLng(t.lat,t.lng));const o=new X(Object.assign(Object.assign({},n),s?{position:s}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=g({updaterMap:ee,eventMap:Q,prevProps:{},nextProps:this.props,instance:o}),this.setState({infoBox:o},this.setInfoBoxCallback)}componentDidUpdate(e){const{infoBox:t}=this.state;null!==t&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:ee,eventMap:Q,prevProps:e,nextProps:this.props,instance:t}))}componentWillUnmount(){const{onUnmount:e}=this.props,{infoBox:t}=this.state;null!==t&&(e&&e(t),d(this.registeredEvents),t.close())}render(){return this.containerElement?(0,i.createPortal)(o.Children.only(this.props.children),this.containerElement):null}}ne.contextType=a;var se=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var s,o,i;if(Array.isArray(t)){if((s=t.length)!=n.length)return!1;for(o=s;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((s=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=s;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=s;0!==o--;){var r=i[o];if(!e(t[r],n[r]))return!1}return!0}return t!==t&&n!==n},oe={exports:{}};oe.exports=function(){function e(n,s,o,i,r,a){if(!(r-i<=o)){var l=i+r>>1;t(n,s,l,i,r,a%2),e(n,s,o,i,l-1,a+1),e(n,s,o,l+1,r,a+1)}}function t(e,s,o,i,r,a){for(;r>i;){if(r-i>600){var l=r-i+1,u=o-i+1,p=Math.log(l),d=.5*Math.exp(2*p/3),g=.5*Math.sqrt(p*d*(l-d)/l)*(u-l/2<0?-1:1);t(e,s,o,Math.max(i,Math.floor(o-u*d/l+g)),Math.min(r,Math.floor(o+(l-u)*d/l+g)),a)}var h=s[2*o+a],c=i,m=r;for(n(e,s,i,o),s[2*r+a]>h&&n(e,s,i,r);c<m;){for(n(e,s,c,m),c++,m--;s[2*c+a]<h;)c++;for(;s[2*m+a]>h;)m--}s[2*i+a]===h?n(e,s,i,m):n(e,s,++m,r),m<=o&&(i=m+1),o<=m&&(r=m-1)}}function n(e,t,n,o){s(e,n,o),s(t,2*n,2*o),s(t,2*n+1,2*o+1)}function s(e,t,n){var s=e[t];e[t]=e[n],e[n]=s}function o(e,t,n,s,o,i,r){for(var a,l,u=[0,e.length-1,0],p=[];u.length;){var d=u.pop(),g=u.pop(),h=u.pop();if(g-h<=r)for(var c=h;c<=g;c++)a=t[2*c],l=t[2*c+1],a>=n&&a<=o&&l>=s&&l<=i&&p.push(e[c]);else{var m=Math.floor((h+g)/2);a=t[2*m],l=t[2*m+1],a>=n&&a<=o&&l>=s&&l<=i&&p.push(e[m]);var v=(d+1)%2;(0===d?n<=a:s<=l)&&(u.push(h),u.push(m-1),u.push(v)),(0===d?o>=a:i>=l)&&(u.push(m+1),u.push(g),u.push(v))}}return p}function i(e,t,n,s,o,i){for(var a=[0,e.length-1,0],l=[],u=o*o;a.length;){var p=a.pop(),d=a.pop(),g=a.pop();if(d-g<=i)for(var h=g;h<=d;h++)r(t[2*h],t[2*h+1],n,s)<=u&&l.push(e[h]);else{var c=Math.floor((g+d)/2),m=t[2*c],v=t[2*c+1];r(m,v,n,s)<=u&&l.push(e[c]);var f=(p+1)%2;(0===p?n-o<=m:s-o<=v)&&(a.push(g),a.push(c-1),a.push(f)),(0===p?n+o>=m:s+o>=v)&&(a.push(c+1),a.push(d),a.push(f))}}return l}function r(e,t,n,s){var o=e-n,i=t-s;return o*o+i*i}var a=function(e){return e[0]},l=function(e){return e[1]},u=function(t,n,s,o,i){void 0===n&&(n=a),void 0===s&&(s=l),void 0===o&&(o=64),void 0===i&&(i=Float64Array),this.nodeSize=o,this.points=t;for(var r=t.length<65536?Uint16Array:Uint32Array,u=this.ids=new r(t.length),p=this.coords=new i(2*t.length),d=0;d<t.length;d++)u[d]=d,p[2*d]=n(t[d]),p[2*d+1]=s(t[d]);e(u,p,o,0,u.length-1,0)};return u.prototype.range=function(e,t,n,s){return o(this.ids,this.coords,e,t,n,s,this.nodeSize)},u.prototype.within=function(e,t,n){return i(this.ids,this.coords,e,t,n,this.nodeSize)},u}();var ie=oe.exports;const re={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},ae=Math.fround||(le=new Float32Array(1),e=>(le[0]=+e,le[0]));var le;class ue{constructor(e){this.options=fe(Object.create(re),e),this.trees=new Array(this.options.maxZoom+1)}load(e){const{log:t,minZoom:n,maxZoom:s,nodeSize:o}=this.options;t&&console.time("total time");const i=`prepare ${e.length} points`;t&&console.time(i),this.points=e;let r=[];for(let a=0;a<e.length;a++)e[a].geometry&&r.push(de(e[a],a));this.trees[s+1]=new ie(r,Le,ye,o,Float32Array),t&&console.timeEnd(i);for(let a=s;a>=n;a--){const e=+Date.now();r=this._cluster(r,a),this.trees[a]=new ie(r,Le,ye,o,Float32Array),t&&console.log("z%d: %d clusters in %dms",a,r.length,+Date.now()-e)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let n=((e[0]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,e[1]));let o=180===e[2]?180:((e[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,o=180;else if(n>o){const e=this.getClusters([n,s,180,i],t),r=this.getClusters([-180,s,o,i],t);return e.concat(r)}const r=this.trees[this._limitZoom(t)],a=r.range(ce(n),me(i),ce(o),me(s)),l=[];for(const u of a){const e=r.points[u];l.push(e.numPoints?ge(e):this.points[e.index])}return l}getChildren(e){const t=this._getOriginId(e),n=this._getOriginZoom(e),s="No cluster with the specified id.",o=this.trees[n];if(!o)throw new Error(s);const i=o.points[t];if(!i)throw new Error(s);const r=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=o.within(i.x,i.y,r),l=[];for(const u of a){const t=o.points[u];t.parentId===e&&l.push(t.numPoints?ge(t):this.points[t.index])}if(0===l.length)throw new Error(s);return l}
1getLeaves(e,t,n){t=t||10,n=n||0;const s=[];return this._appendLeaves(s,e,t,n,0),s}getTile(e,t,n){const s=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:i,radius:r}=this.options,a=r/i,l=(n-a)/o,u=(n+1+a)/o,p={features:[]};return this._addTileFeatures(s.range((t-a)/o,l,(t+1+a)/o,u),s.points,t,n,o,p),0===t&&this._addTileFeatures(s.range(1-a/o,l,1,u),s.points,o,n,o,p),t===o-1&&this._addTileFeatures(s.range(0,l,a/o,u),s.points,-1,n,o,p),p.features.length?p:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,s,o){const i=this.getChildren(t);for(const r of i){const t=r.properties;if(t&&t.cluster?o+t.point_count<=s?o+=t.point_count:o=this._appendLeaves(e,t.cluster_id,n,s,o):o<s?o++:e.push(r),e.length===n)break}return o}_addTileFeatures(e,t,n,s,o,i){for(const r of e){const e=t[r],a=e.numPoints;let l,u,p;if(a)l=he(e),u=e.x,p=e.y;else{const t=this.points[e.index];l=t.properties,u=ce(t.geometry.coordinates[0]),p=me(t.geometry.coordinates[1])}const d={type:1,geometry:[[Math.round(this.options.extent*(u*o-n)),Math.round(this.options.extent*(p*o-s))]],tags:l};let g;a?g=e.id:this.options.generateId?g=e.index:this.points[e.index].id&&(g=this.points[e.index].id),void 0!==g&&(d.id=g),i.features.push(d)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(+e,this.options.maxZoom+1))}_cluster(e,t){const n=[],{radius:s,extent:o,reduce:i,minPoints:r}=this.options,a=s/(o*Math.pow(2,t));for(let l=0;l<e.length;l++){const s=e[l];if(s.zoom<=t)continue;s.zoom=t;const o=this.trees[t+1],u=o.within(s.x,s.y,a),p=s.numPoints||1;let d=p;for(const e of u){const n=o.points[e];n.zoom>t&&(d+=n.numPoints||1)}if(d>p&&d>=r){let e=s.x*p,r=s.y*p,a=i&&p>1?this._map(s,!0):null;const g=(l<<5)+(t+1)+this.points.length;for(const n of u){const l=o.points[n];if(l.zoom<=t)continue;l.zoom=t;const u=l.numPoints||1;e+=l.x*u,r+=l.y*u,l.parentId=g,i&&(a||(a=this._map(s,!0)),i(a,this._map(l)))}s.parentId=g,n.push(pe(e/d,r/d,g,d,a))}else if(n.push(s),d>1)for(const e of u){const s=o.points[e];s.zoom<=t||(s.zoom=t,n.push(s))}}return n}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t){if(e.numPoints)return t?fe({},e.properties):e.properties;const n=this.points[e.index].properties,s=this.options.map(n);return t&&s===n?fe({},s):s}}function pe(e,t,n,s,o){return{x:ae(e),y:ae(t),zoom:1/0,id:n,parentId:-1,numPoints:s,properties:o}}function de(e,t){const[n,s]=e.geometry.coordinates;return{x:ae(ce(n)),y:ae(me(s)),zoom:1/0,index:t,parentId:-1}}function ge(e){return{type:"Feature",id:e.id,properties:he(e),geometry:{type:"Point",coordinates:[(t=e.x,360*(t-.5)),ve(e.y)]}};var t}function he(e){const t=e.numPoints,n=t>=1e4?`${Math.round(t/1e3)}k`:t>=1e3?Math.round(t/100)/10+"k":t;return fe(fe({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:n})}function ce(e){return e/360+.5}function me(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function ve(e){const t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function fe(e,t){for(const n in t)e[n]=t[n];return e}function Le(e){return e.x}function ye(e){return e.y}function be(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]])}return n}class Ce{constructor({markers:e,position:t}){this.markers=e,t&&(t instanceof google.maps.LatLng?this._position=t:this._position=new google.maps.LatLng(t))}get bounds(){if(0!==this.markers.length||this._position)return this.markers.reduce(((e,t)=>e.extend(t.getPosition())),new google.maps.LatLngBounds(this._position,this._position))}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter((e=>e.getVisible())).length}push(e){this.markers.push(e)}delete(){this.marker&&(this.marker.setMap(null),delete this.marker),this.markers.length=0}}class xe{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return Me(e)}}const Me=e=>e.map((e=>new Ce({position:e.getPosition(),markers:[e]})));class Ee extends xe{constructor(e){var{maxZoom:t,radius:n=60}=e,s=be(e,["maxZoom","radius"]);super({maxZoom:t}
1),this.superCluster=new ue(Object.assign({maxZoom:this.maxZoom,radius:n},s)),this.state={zoom:null}}calculate(e){let t=!1;if(!se(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const n=this.markers.map((e=>({type:"Feature",geometry:{type:"Point",coordinates:[e.getPosition().lng(),e.getPosition().lat()]},properties:{marker:e}})));this.superCluster.load(n)}const n={zoom:e.map.getZoom()};return t||this.state.zoom>this.maxZoom&&n.zoom>this.maxZoom||(t=t||!se(this.state,n)),this.state=n,t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(this.transformCluster.bind(this))}transformCluster({geometry:{coordinates:[e,t]},properties:n}){if(n.cluster)return new Ce({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map((e=>e.properties.marker)),position:new google.maps.LatLng({lat:t,lng:e})});{const e=n.marker;return new Ce({markers:[e],position:e.getPosition()})}}}class ke{constructor(e,t){this.markers={sum:e.length};const n=t.map((e=>e.count)),s=n.reduce(((e,t)=>e+t),0);this.clusters={count:t.length,markers:{mean:s/t.length,sum:s,min:Math.min(...n),max:Math.max(...n)}}}}class we{render({count:e,position:t},n){const s=e>Math.max(10,n.clusters.markers.mean)?"#ff0000":"#0000ff",o=window.btoa(`\n <svg fill="${s}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240">\n <circle cx="120" cy="120" opacity=".6" r="70" />\n <circle cx="120" cy="120" opacity=".3" r="90" />\n <circle cx="120" cy="120" opacity=".2" r="110" />\n </svg>`);return new google.maps.Marker({position:t,icon:{url:`data:image/svg+xml;base64,${o}`,scaledSize:new google.maps.Size(45,45)},label:{text:String(e),color:"rgba(255,255,255,0.9)",fontSize:"12px"},title:`Cluster of ${e} markers`,zIndex:Number(google.maps.Marker.MAX_ZINDEX)+e})}}class Se{constructor(){!function(e,t){for(let n in t.prototype)e.prototype[n]=t.prototype[n]}(Se,google.maps.OverlayView)}}var Pe;!function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click"}(Pe||(Pe={}));const Oe=(e,t,n)=>{n.fitBounds(t.bounds)};class Ie extends Se{constructor({map:e,markers:t=[],algorithm:n=new Ee({}),renderer:s=new we,onClusterClick:o=Oe}){super(),this.markers=[...t],this.clusters=[],this.algorithm=n,this.renderer=s,this.onClusterClick=o,e&&this.setMap(e)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach((e=>{this.addMarker(e,!0)})),t||this.render()}removeMarker(e,t){const n=this.markers.indexOf(e);return-1!==n&&(e.setMap(null),this.markers.splice(n,1),t||this.render(),!0)}removeMarkers(e,t){let n=!1;return e.forEach((e=>{n=this.removeMarker(e,!0)||n})),n&&!t&&this.render(),n}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&this.getProjection()){google.maps.event.trigger(this,Pe.CLUSTERING_BEGIN,this);const{clusters:t,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});(n||void 0==n)&&(this.reset(),this.clusters=t,this.renderClusters()),google.maps.event.trigger(this,Pe.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach((e=>e.setMap(null))),this.clusters.forEach((e=>e.delete())),this.clusters=[]}renderClusters(){const e=new ke(this.markers,this.clusters),t=this.getMap();this.clusters.forEach((n=>{1===n.markers.length?n.marker=n.markers[0]:(n.marker=this.renderer.render(n,e),this.onClusterClick&&n.marker.addListener("click",(e=>{google.maps.event.trigger(this,Pe.CLUSTER_CLICK,n),this.onClusterClick(e,n,t)}))),n.marker.setMap(t)}))}}function De(e){const t=function(){r(!!o.useContext,"useGoogleMap is React hook and requires React version 16.8+");const e=(0,o.useContext)(a);return r(!!e,"useGoogleMap needs a GoogleMap available up in the tree"),e}(),[n,s]=(0,o.useState)(null);return(0,o.useEffect)((()=>
1{if(t&&null===n){const n=new Ie(Object.assign(Object.assign({},e),{map:t}));s(n)}}),[t]),n}(0,o.memo)((function({children:e,options:t}){const n=De(t);return null!==n?e(n):null}));const Be={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},ze={options(e,t){e.setOptions(t)},position(e,t){e.setPosition(t)},zIndex(e,t){e.setZIndex(t)}};(0,o.memo)((function({children:e,anchor:t,options:n,position:s,zIndex:l,onCloseClick:u,onDomReady:p,onContentChanged:d,onPositionChanged:g,onZindexChanged:h,onLoad:c,onUnmount:m}){const v=(0,o.useContext)(a),[f,L]=(0,o.useState)(null),[y,b]=(0,o.useState)(null),[C,x]=(0,o.useState)(null),[M,E]=(0,o.useState)(null),[k,w]=(0,o.useState)(null),[S,P]=(0,o.useState)(null),O=(0,o.useRef)(null);return(0,o.useEffect)((()=>{null!==f&&(f.close(),t?f.open(v,t):f.getPosition()&&f.open(v))}),[v,f,t]),(0,o.useEffect)((()=>{n&&null!==f&&f.setOptions(n)}),[f,n]),(0,o.useEffect)((()=>{s&&null!==f&&f.setPosition(s)}),[s]),(0,o.useEffect)((()=>{"number"===typeof l&&null!==f&&f.setZIndex(l)}),[l]),(0,o.useEffect)((()=>{f&&u&&(null!==y&&google.maps.event.removeListener(y),b(google.maps.event.addListener(f,"closeclick",u)))}),[u]),(0,o.useEffect)((()=>{f&&p&&(null!==C&&google.maps.event.removeListener(C),x(google.maps.event.addListener(f,"domready",p)))}),[p]),(0,o.useEffect)((()=>{f&&d&&(null!==M&&google.maps.event.removeListener(M),E(google.maps.event.addListener(f,"content_changed",d)))}),[d]),(0,o.useEffect)((()=>{f&&g&&(null!==k&&google.maps.event.removeListener(k),w(google.maps.event.addListener(f,"position_changed",g)))}),[g]),(0,o.useEffect)((()=>{f&&h&&(null!==S&&google.maps.event.removeListener(S),P(google.maps.event.addListener(f,"zindex_changed",h)))}),[h]),(0,o.useEffect)((()=>{const e=new google.maps.InfoWindow(Object.assign({},n||{}));return L(e),O.current=document.createElement("div"),u&&b(google.maps.event.addListener(e,"closeclick",u)),p&&x(google.maps.event.addListener(e,"domready",p)),d&&E(google.maps.event.addListener(e,"content_changed",d)),g&&w(google.maps.event.addListener(e,"position_changed",g)),h&&P(google.maps.event.addListener(e,"zindex_changed",h)),e.setContent(O.current),s&&e.setPosition(s),l&&e.setZIndex(l),t?e.open(v,t):e.getPosition()?e.open(v):r(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),c&&c(e),()=>{y&&google.maps.event.removeListener(y),M&&google.maps.event.removeListener(M),C&&google.maps.event.removeListener(C),k&&google.maps.event.removeListener(k),S&&google.maps.event.removeListener(S),m&&m(e),e.close()}}),[]),O.current?(0,i.createPortal)(o.Children.only(e),O.current):null}));class Re extends o.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.containerElement=null,this.state={infoWindow:null},this.open=(e,t)=>{t?e.open(this.context,t):e.getPosition()?e.open(this.context):r(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},this.setInfoWindowCallback=()=>{null!==this.state.infoWindow&&null!==this.containerElement&&(this.state.infoWindow.setContent(this.containerElement),this.open(this.state.infoWindow,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoWindow))}}componentDidMount(){const e=new google.maps.InfoWindow(Object.assign({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=g({updaterMap:ze,eventMap:Be,prevProps:{},nextProps:this.props,instance:e}),this.setState((()=>({infoWindow:e})),this.setInfoWindowCallback)}componentDidUpdate(e){null!==this.state.infoWindow&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:ze,eventMap:Be,prevProps:e,nextProps:this.props,instance:this.state.infoWindow}))}componentWillUnmount(){null!==this.state.infoWindow&&(d(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())}render(){return this.containerElement?(0,i.createPortal)(o.Children.only(this.props.children),this.containerElement):null}}Re.contextType=a;const Ue={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Te={draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},path(e,t){e.setPath(t)},visible(e,t){e.setVisible(t)}},_e={};(0,o.memo)((function({options:e,draggable:t,editable:n,visible:s,path:i,onDblClick:r,onDragEnd:l,onDragStart:u,onMouseDown:p,onMouseMove:d,onMouseOut:g,onMouseOver:h,onMouseUp:c,onRightClick:m,onClick:v,onDrag:f,onLoad:L,onUnmount:y}){const b=(0,o.useContext)(a),[C,x]=(0,o.useState)(null),[M,E]=(0,o.useState)(null),[k,w]=(0,o.useState)(null),[S,P]=(0,o.useState)(null),[O,I]=(0,o.useState)(null),[D,B]=(0,o.useState)(null),[z,R]=(0,o.useState)(null),[U,T]=(0,o.useState)(null),[_,j]=(0,o.useState)(null),[A,Z]=(0,o.useState)(null),[V,W]=(0,o.useState)(null),[N,H]=(0,o.useState)(null);return(0,o.useEffect)((()=>{null!==C&&C.setMap(b)}),[b]),(0,o.useEffect)((()=>{"undefined"!==typeof e&&null!==C&&C.setOptions(e)}),[C,e]),(0,o.useEffect)((()=>{"undefined"!==typeof t&&null!==C&&C.setDraggable(t)}),[C,t]),(0,o.useEffect)((()=>{"undefined"!==typeof n&&null!==C&&C.setEditable(n)}),[C,n]),(0,o.useEffect)((()=>{"undefined"!==typeof s&&null!==C&&C.setVisible(s)}),[C,s]),(0,o.useEffect)((()=>{"undefined"!==typeof i&&null!==C&&C.setPath(i)}),[C,i]),(0,o.useEffect)((()=>{C&&r&&(null!==M&&google.maps.event.removeListener(M),E(google.maps.event.addListener(C,"dblclick",r)))}),[r]),(0,o.useEffect)((()=>{C&&l&&(null!==k&&google.maps.event.removeListener(k),w(google.maps.event.addListener(C,"dragend",l)))}),[l]),(0,o.useEffect)((()=>{C&&u&&(null!==S&&google.maps.event.removeListener(S),P(google.maps.event.addListener(C,"dragstart",u)))}),[u]),(0,o.useEffect)((()=>{C&&p&&(null!==O&&google.maps.event.removeListener(O),I(google.maps.event.addListener(C,"mousedown",p)))}),[p]),(0,o.useEffect)((()=>
1{C&&d&&(null!==D&&google.maps.event.removeListener(D),B(google.maps.event.addListener(C,"mousemove",d)))}),[d]),(0,o.useEffect)((()=>{C&&g&&(null!==z&&google.maps.event.removeListener(z),R(google.maps.event.addListener(C,"mouseout",g)))}),[g]),(0,o.useEffect)((()=>{C&&h&&(null!==U&&google.maps.event.removeListener(U),T(google.maps.event.addListener(C,"mouseover",h)))}),[h]),(0,o.useEffect)((()=>{C&&c&&(null!==_&&google.maps.event.removeListener(_),j(google.maps.event.addListener(C,"mouseup",c)))}),[c]),(0,o.useEffect)((()=>{C&&m&&(null!==A&&google.maps.event.removeListener(A),Z(google.maps.event.addListener(C,"rightclick",m)))}),[m]),(0,o.useEffect)((()=>{C&&v&&(null!==V&&google.maps.event.removeListener(V),W(google.maps.event.addListener(C,"click",v)))}),[v]),(0,o.useEffect)((()=>{C&&f&&(null!==N&&google.maps.event.removeListener(N),H(google.maps.event.addListener(C,"drag",f)))}),[f]),(0,o.useEffect)((()=>{const o=new google.maps.Polyline(Object.assign(Object.assign({},e||_e),{map:b}));return i&&o.setPath(i),"undefined"!==typeof s&&o.setVisible(s),"undefined"!==typeof n&&o.setEditable(n),"undefined"!==typeof t&&o.setDraggable(t),r&&E(google.maps.event.addListener(o,"dblclick",r)),l&&w(google.maps.event.addListener(o,"dragend",l)),u&&P(google.maps.event.addListener(o,"dragstart",u)),p&&I(google.maps.event.addListener(o,"mousedown",p)),d&&B(google.maps.event.addListener(o,"mousemove",d)),g&&R(google.maps.event.addListener(o,"mouseout",g)),h&&T(google.maps.event.addListener(o,"mouseover",h)),c&&j(google.maps.event.addListener(o,"mouseup",c)),m&&Z(google.maps.event.addListener(o,"rightclick",m)),v&&W(google.maps.event.addListener(o,"click",v)),f&&H(google.maps.event.addListener(o,"drag",f)),x(o),L&&L(o),()=>{null!==M&&google.maps.event.removeListener(M),null!==k&&google.maps.event.removeListener(k),null!==S&&google.maps.event.removeListener(S),null!==O&&google.maps.event.removeListener(O),null!==D&&google.maps.event.removeListener(D),null!==z&&google.maps.event.removeListener(z),null!==U&&google.maps.event.removeListener(U),null!==_&&google.maps.event.removeListener(_),null!==A&&google.maps.event.removeListener(A),null!==V&&google.maps.event.removeListener(V),y&&y(o),o.setMap(null)}}),[]),null}));class je extends o.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={polyline:null},this.setPolylineCallback=()=>{null!==this.state.polyline&&this.props.onLoad&&this.props.onLoad(this.state.polyline)}}componentDidMount(){const e=new google.maps.Polyline(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=g({updaterMap:Te,eventMap:Ue,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{polyline:e}}),this.setPolylineCallback)}componentDidUpdate(e){null!==this.state.polyline&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:Te,eventMap:Ue,prevProps:e,nextProps:this.props,instance:this.state.polyline}))}componentWillUnmount(){null!==this.state.polyline&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),d(this.registeredEvents),this.state.polyline.setMap(null))}render(){return null}}je.contextType=a;const Ae={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Ze={draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},path(e,t){e.setPath(t)},paths(e,t){e.setPaths(t)},visible(e,t){e.setVisible(t)}};(0,o.memo)((function({options:e,draggable:t,editable:n,visible:s,path:i,paths:r,onDblClick:l,onDragEnd:u,onDragStart:p,onMouseDown:d,onMouseMove:g,onMouseOut:h,onMouseOver:c,onMouseUp:m,onRightClick:v,onClick:f,onDrag:L,onLoad:y,onUnmount:b}){const C=(0,o.useContext)(a),[x,M]=(0,o.useState)(null),[E,k]=(0,o.useState)(null),[w,S]=(0,o.useState)(null),[P,O]=(0,o.useState)(null),[I,D]=(0,o.useState)(null),[B,z]=(0,o.useState)(null),[R,U]=(0,o.useState)(null),[T,_]=(0,o.useState)(null),[j,A]=(0,o.useState)(null),[Z,V]=(0,o.useState)(null),[W,N]=(0,o.useState)(null),[H,F]=(0,o.useState)(null);return(0,o.useEffect)((()=>{null!==x&&x.setMap(C)}),[C]),(0,o.useEffect)((()=>{"undefined"!==typeof e&&null!==x&&x.setOptions(e)}),[x,e]),(0,o.useEffect)((()=>{"undefined"!==typeof t&&null!==x&&x.setDraggable(t)}),[x,t]),(0,o.useEffect)((()=>{"undefined"!==typeof n&&null!==x&&x.setEditable(n)}),[x,n]),(0,o.useEffect)((()=>{"undefined"!==typeof s&&null!==x&&x.setVisible(s)}),[x,s]),(0,o.useEffect)((()=>{"undefined"!==typeof i&&null!==x&&x.setPath(i)}),[x,i]),(0,o.useEffect)((()=>{"undefined"!==typeof r&&null!==x&&x.setPaths(r)}),[x,r]),(0,o.useEffect)((()=>{x&&l&&(null!==E&&google.maps.event.removeListener(E),k(google.maps.event.addListener(x,"dblclick",l)))}),[l]),(0,o.useEffect)((()=>{x&&u&&(null!==w&&google.maps.event.removeListener(w),S(google.maps.event.addListener(x,"dragend",u)))}),[u]),(0,o.useEffect)((()=>{x&&p&&(null!==P&&google.maps.event.removeListener(P),O(google.maps.event.addListener(x,"dragstart",p)))}),[p]),(0,o.useEffect)((()=>{x&&d&&(null!==I&&google.maps.event.removeListener(I),D(google.maps.event.addListener(x,"mousedown",d)))}),[d]),(0,o.useEffect)((()=>{x&&g&&(null!==B&&google.maps.event.removeListener(B),z(google.maps.event.addListener(x,"mousemove",g)))}),[g]),(0,o.useEffect)((()=>{x&&h&&(null!==R&&google.maps.event.removeListener(R),U(google.maps.event.addListener(x,"mouseout",h)))}),[h]),(0,o.useEffect)((()=>{x&&c&&(null!==T&&google.maps.event.removeListener(T),_(google.maps.event.addListener(x,"mouseover",c)))}),[c]),(0,o.useEffect)((()=>{x&&m&&(null!==j&&google.maps.event.removeListener(j),A(google.maps.event.addListener(x,"mouseup",m)))}),[m]),(0,o.useEffect)((()=>{x&&v&&(null!==Z&&google.maps.event.removeListener(Z),V(google.maps.event.addListener(x,"rightclick",v)))}),[v]),(0,o.useEffect)((()=>{x&&f&&(null!==W&&google.maps.event.removeListener(W),N(google.maps.event.addListener(x,"click",f)))}),[f]),(0,o.useEffect)((()=>{x&&L&&(null!==H&&google.maps.event.removeListener(H),F(google.maps.event.addListener(x,"drag",L)))}),[L]),(0,o.useEffect)((()=>{const o=new google.maps.Polygon(Object.assign(Object.assign({},e||{}),{map:C}));return i&&o.setPath(i),r&&o.setPaths(r),"undefined"!==typeof s&&o.setVisible(s),"undefined"!==typeof n&&o.setEditable(n),"undefined"!==typeof t&&o.setDraggable(t),l&&k(google.maps.event.addListener(o,"dblclick",l)),u&&S(google.maps.event.addListener(o,"dragend",u)),p&&O(google.maps.event.addListener(o,"dragstart",p)),d&&D(google.maps.event.addListener(o,"mousedown",d)),g&&z(google.maps.event.addListener(o,"mousemove",g)),h&&U(google.maps.event.addListener(o,"mouseout",h)),c&&_(google.maps.event.addListener(o,"mouseover",c)),m&&A(google.maps.event.addListener(o,"mouseup",m)),v&&V(google.maps.event.addListener(o,"rightclick",v)),f&&N(google.maps.event.addListener(o,"click",f)),L&&F(google.maps.event.addListener(o,"drag",L)),M(o),y&&y(o),()=>{null!==E&&google.maps.event.removeListener(E),null!==w&&google.maps.event.removeListener(w),null!==P&&google.maps.event.removeListener(P),null!==I&&google.maps.event.removeListener(I),null!==B&&google.maps.event.removeListener(B),null!==R&&google.maps.event.removeListener(R),null!==T&&google.maps.event.removeListener(T),null!==j&&google.maps.event.removeListener(j),null!==Z&&google.maps.event.removeListener(Z),null!==W&&google.maps.event.removeListener(W),b&&b(o),o.setMap(null)}}),[]),null}));class Ve extends o.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={polygon:null},this.setPolygonCallback=()=>{null!==this.state.polygon&&this.props.onLoad&&this.props.onLoad(this.state.polygon)}}componentDidMount(){const e=new google.maps.Polygon(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=g({updaterMap:Ze,eventMap:Ae,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{polygon:e}}),this.setPolygonCallback)}componentDidUpdate(e){null!==this.state.polygon&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:Ze,eventMap:Ae,prevProps:e,nextProps:this.props,instance:this.state.polygon}))}componentWillUnmount(){null!==this.state.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),d(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))}render(){return null}}Ve.contextType=a;const We={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"}
1,Ne={bounds(e,t){e.setBounds(t)},draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},visible(e,t){e.setVisible(t)}};(0,o.memo)((function({options:e,bounds:t,draggable:n,editable:s,visible:i,onDblClick:r,onDragEnd:l,onDragStart:u,onMouseDown:p,onMouseMove:d,onMouseOut:g,onMouseOver:h,onMouseUp:c,onRightClick:m,onClick:v,onDrag:f,onBoundsChanged:L,onLoad:y,onUnmount:b}){const C=(0,o.useContext)(a),[x,M]=(0,o.useState)(null),[E,k]=(0,o.useState)(null),[w,S]=(0,o.useState)(null),[P,O]=(0,o.useState)(null),[I,D]=(0,o.useState)(null),[B,z]=(0,o.useState)(null),[R,U]=(0,o.useState)(null),[T,_]=(0,o.useState)(null),[j,A]=(0,o.useState)(null),[Z,V]=(0,o.useState)(null),[W,N]=(0,o.useState)(null),[H,F]=(0,o.useState)(null),[G,$]=(0,o.useState)(null);return(0,o.useEffect)((()=>{null!==x&&x.setMap(C)}),[C]),(0,o.useEffect)((()=>{"undefined"!==typeof e&&null!==x&&x.setOptions(e)}),[x,e]),(0,o.useEffect)((()=>{"undefined"!==typeof n&&null!==x&&x.setDraggable(n)}),[x,n]),(0,o.useEffect)((()=>{"undefined"!==typeof s&&null!==x&&x.setEditable(s)}),[x,s]),(0,o.useEffect)((()=>{"undefined"!==typeof i&&null!==x&&x.setVisible(i)}),[x,i]),(0,o.useEffect)((()=>{"undefined"!==typeof t&&null!==x&&x.setBounds(t)}),[x,t]),(0,o.useEffect)((()=>{x&&r&&(null!==E&&google.maps.event.removeListener(E),k(google.maps.event.addListener(x,"dblclick",r)))}),[r]),(0,o.useEffect)((()=>{x&&l&&(null!==w&&google.maps.event.removeListener(w),S(google.maps.event.addListener(x,"dragend",l)))}),[l]),(0,o.useEffect)((()=>{x&&u&&(null!==P&&google.maps.event.removeListener(P),O(google.maps.event.addListener(x,"dragstart",u)))}),[u]),(0,o.useEffect)((()=>{x&&p&&(null!==I&&google.maps.event.removeListener(I),D(google.maps.event.addListener(x,"mousedown",p)))}),[p]),(0,o.useEffect)((()=>{x&&d&&(null!==B&&google.maps.event.removeListener(B),z(google.maps.event.addListener(x,"mousemove",d)))}),[d]),(0,o.useEffect)((()=>{x&&g&&(null!==R&&google.maps.event.removeListener(R),U(google.maps.event.addListener(x,"mouseout",g)))}),[g]),(0,o.useEffect)((()=>{x&&h&&(null!==T&&google.maps.event.removeListener(T),_(google.maps.event.addListener(x,"mouseover",h)))}),[h]),(0,o.useEffect)((()=>{x&&c&&(null!==j&&google.maps.event.removeListener(j),A(google.maps.event.addListener(x,"mouseup",c)))}),[c]),(0,o.useEffect)((()=>{x&&m&&(null!==Z&&google.maps.event.removeListener(Z),V(google.maps.event.addListener(x,"rightclick",m)))}),[m]),(0,o.useEffect)((()=>{x&&v&&(null!==W&&google.maps.event.removeListener(W),N(google.maps.event.addListener(x,"click",v)))}),[v]),(0,o.useEffect)((()=>{x&&f&&(null!==H&&google.maps.event.removeListener(H),F(google.maps.event.addListener(x,"drag",f)))}),[f]),(0,o.useEffect)((()=>{x&&L&&(null!==G&&google.maps.event.removeListener(G),$(google.maps.event.addListener(x,"bounds_changed",L)))}),[L]),(0,o.useEffect)((()=>{const o=new google.maps.Rectangle(Object.assign(Object.assign({},e||{}),{map:C}));return"undefined"!==typeof i&&o.setVisible(i),"undefined"!==typeof s&&o.setEditable(s),"undefined"!==typeof n&&o.setDraggable(n),"undefined"!==typeof t&&o.setBounds(t),r&&k(google.maps.event.addListener(o,"dblclick",r)),l&&S(google.maps.event.addListener(o,"dragend",l)),u&&O(google.maps.event.addListener(o,"dragstart",u)),p&&D(google.maps.event.addListener(o,"mousedown",p)),d&&z(google.maps.event.addListener(o,"mousemove",d)),g&&U(google.maps.event.addListener(o,"mouseout",g)),h&&_(google.maps.event.addListener(o,"mouseover",h)),c&&A(google.maps.event.addListener(o,"mouseup",c)),m&&V(google.maps.event.addListener(o,"rightclick",m)),v&&N(google.maps.event.addListener(o,"click",v)),f&&F(google.maps.event.addListener(o,"drag",f)),L&&$(google.maps.event.addListener(o,"bounds_changed",L)),M(o),y&&y(o),()=>{null!==E&&google.maps.event.removeListener(E),null!==w&&google.maps.event.removeListener(w),null!==P&&google.maps.event.removeListener(P),null!==I&&google.maps.event.removeListener(I),null!==B&&google.maps.event.removeListener(B),null!==R&&google.maps.event.removeListener(R),null!==T&&google.maps.event.removeListener(T),null!==j&&google.maps.event.removeListener(j),null!==Z&&google.maps.event.removeListener(Z),null!==W&&google.maps.event.removeListener(W),null!==H&&google.maps.event.removeListener(H),null!==G&&google.maps.event.removeListener(G),b&&b(o),o.setMap(null)}}),[]),null}));class He extends o.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={rectangle:null},this.setRectangleCallback=()=>{null!==this.state.rectangle&&this.props.onLoad&&this.props.onLoad(this.state.rectangle)}}componentDidMount(){const e=new google.maps.Rectangle(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=g({updaterMap:Ne,eventMap:We,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{rectangle:e}}),this.setRectangleCallback)}componentDidUpdate(e){null!==this.state.rectangle&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:Ne,eventMap:We,prevProps:e,nextProps:this.props,instance:this.state.rectangle}))}componentWillUnmount(){null!==this.state.rectangle&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),d(this.registeredEvents),this.state.rectangle.setMap(null))}render(){return null}}He.contextType=a;const Fe={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Ge={center(e,t){e.setCenter(t)},draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},radius(e,t){e.setRadius(t)},visible(e,t){e.setVisible(t)}},$e={};(0,o.memo)((function({options:e,center:t,radius:n,draggable:s,editable:i,visible:r,onDblClick:l,onDragEnd:u,onDragStart:p,onMouseDown:d,onMouseMove:g,onMouseOut:h,onMouseOver:c,onMouseUp:m,onRightClick:v,onClick:f,onDrag:L,onCenterChanged:y,onRadiusChanged:b,onLoad:C,onUnmount:x}){const M=(0,o.useContext)(a),[E,k]=(0,o.useState)(null),[w,S]=(0,o.useState)(null),[P,O]=(0,o.useState)(null),[I,D]=(0,o.useState)(null),[B,z]=(0,o.useState)(null),[R,U]=(0,o.useState)(null),[T,_]=(0,o.useState)(null),[j,A]=(0,o.useState)(null),[Z,V]=(0,o.useState)(null),[W,N]=(0,o.useState)(null),[H,F]=(0,o.useState)(null),[G,$]=(0,o.useState)(null),[Y,K]=(0,o.useState)(null),[q,J]=(0,o.useState)(null);return(0,o.useEffect)((()=>{null!==E&&E.setMap(M)}),[M]),(0,o.useEffect)((()=>{"undefined"!==typeof e&&null!==E&&E.setOptions(e)}),[E,e]),(0,o.useEffect)((()=>{"undefined"!==typeof s&&null!==E&&E.setDraggable(s)}),[E,s]),(0,o.useEffect)((()=>{"undefined"!==typeof i&&null!==E&&E.setEditable(i)}),[E,i]),(0,o.useEffect)((()=>{"undefined"!==typeof r&&null!==E&&E.setVisible(r)}),[E,r]),(0,o.useEffect)((()=>{"number"===typeof n&&null!==E&&E.setRadius(n)}),[E,n]),(0,o.useEffect)((()=>{"undefined"!==typeof t&&null!==E&&E.setCenter(t)}),[E,t]),(0,o.useEffect)((()=>{E&&l&&(null!==w&&google.maps.event.removeListener(w),S(google.maps.event.addListener(E,"dblclick",l)))}),[l]),(0,o.useEffect)((()=>{E&&u&&(null!==P&&google.maps.event.removeListener(P),O(google.maps.event.addListener(E,"dragend",u)))}),[u]),(0,o.useEffect)((()=>{E&&p&&(null!==I&&google.maps.event.removeListener(I),D(google.maps.event.addListener(E,"dragstart",p)))}),[p]),(0,o.useEffect)((()=>{E&&d&&(null!==B&&google.maps.event.removeListener(B),z(google.maps.event.addListener(E,"mousedown",d)))}),[d]),(0,o.useEffect)((()=>{E&&g&&(null!==R&&google.maps.event.removeListener(R),U(google.maps.event.addListener(E,"mousemove",g)))}),[g]),(0,o.useEffect)((()=>{E&&h&&(null!==T&&google.maps.event.removeListener(T),_(google.maps.event.addListener(E,"mouseout",h)))}),[h]),(0,o.useEffect)((()=>
1{E&&c&&(null!==j&&google.maps.event.removeListener(j),A(google.maps.event.addListener(E,"mouseover",c)))}),[c]),(0,o.useEffect)((()=>{E&&m&&(null!==Z&&google.maps.event.removeListener(Z),V(google.maps.event.addListener(E,"mouseup",m)))}),[m]),(0,o.useEffect)((()=>{E&&v&&(null!==W&&google.maps.event.removeListener(W),N(google.maps.event.addListener(E,"rightclick",v)))}),[v]),(0,o.useEffect)((()=>{E&&f&&(null!==H&&google.maps.event.removeListener(H),F(google.maps.event.addListener(E,"click",f)))}),[f]),(0,o.useEffect)((()=>{E&&L&&(null!==G&&google.maps.event.removeListener(G),$(google.maps.event.addListener(E,"drag",L)))}),[L]),(0,o.useEffect)((()=>{E&&y&&(null!==Y&&google.maps.event.removeListener(Y),K(google.maps.event.addListener(E,"center_changed",y)))}),[f]),(0,o.useEffect)((()=>{E&&b&&(null!==q&&google.maps.event.removeListener(q),J(google.maps.event.addListener(E,"radius_changed",b)))}),[b]),(0,o.useEffect)((()=>{const o=new google.maps.Circle(Object.assign(Object.assign({},e||$e),{map:M}));return"number"===typeof n&&o.setRadius(n),"undefined"!==typeof t&&o.setCenter(t),"number"===typeof n&&o.setRadius(n),"undefined"!==typeof r&&o.setVisible(r),"undefined"!==typeof i&&o.setEditable(i),"undefined"!==typeof s&&o.setDraggable(s),l&&S(google.maps.event.addListener(o,"dblclick",l)),u&&O(google.maps.event.addListener(o,"dragend",u)),p&&D(google.maps.event.addListener(o,"dragstart",p)),d&&z(google.maps.event.addListener(o,"mousedown",d)),g&&U(google.maps.event.addListener(o,"mousemove",g)),h&&_(google.maps.event.addListener(o,"mouseout",h)),c&&A(google.maps.event.addListener(o,"mouseover",c)),m&&V(google.maps.event.addListener(o,"mouseup",m)),v&&N(google.maps.event.addListener(o,"rightclick",v)),f&&F(google.maps.event.addListener(o,"click",f)),L&&$(google.maps.event.addListener(o,"drag",L)),y&&K(google.maps.event.addListener(o,"center_changed",y)),b&&J(google.maps.event.addListener(o,"radius_changed",b)),k(o),C&&C(o),()=>{null!==w&&google.maps.event.removeListener(w),null!==P&&google.maps.event.removeListener(P),null!==I&&google.maps.event.removeListener(I),null!==B&&google.maps.event.removeListener(B),null!==R&&google.maps.event.removeListener(R),null!==T&&google.maps.event.removeListener(T),null!==j&&google.maps.event.removeListener(j),null!==Z&&google.maps.event.removeListener(Z),null!==W&&google.maps.event.removeListener(W),null!==H&&google.maps.event.removeListener(H),null!==Y&&google.maps.event.removeListener(Y),null!==q&&google.maps.event.removeListener(q),x&&x(o),o.setMap(null)}}),[]),null}));class Ye extends o.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={circle:null},this.setCircleCallback=()=>{null!==this.state.circle&&this.props.onLoad&&this.props.onLoad(this.state.circle)}}componentDidMount(){const e=new google.maps.Circle(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=g({updaterMap:Ge,eventMap:Fe,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{circle:e}}),this.setCircleCallback)}componentDidUpdate(e){null!==this.state.circle&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:Ge,eventMap:Fe,prevProps:e,nextProps:this.props,instance:this.state.circle}))}componentWillUnmount(){null!==this.state.circle&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),d(this.registeredEvents),this.state.circle&&this.state.circle.setMap(null))}render(){return null}}Ye.contextType=a;const Ke={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},qe={add(e,t){e.add(t)},addgeojson(e,t,n){e.addGeoJson(t,n)},contains(e,t){e.contains(t)},foreach(e,t){e.forEach(t)},loadgeojson(e,t,n,s){e.loadGeoJson(t,n,s)},overridestyle(e,t,n){e.overrideStyle(t,n)},remove(e,t){e.remove(t)},revertstyle(e,t){e.revertStyle(t)},controlposition(e,t){e.setControlPosition(t)},controls(e,t){e.setControls(t)},drawingmode(e,t){e.setDrawingMode(t)},map(e,t){e.setMap(t)},style(e,t){e.setStyle(t)},togeojson(e,t){e.toGeoJson(t)}};(0,o.memo)((function({options:e,onClick:t,onDblClick:n,onMouseDown:s,onMouseMove:i,onMouseOut:r,onMouseOver:l,onMouseUp:u,onRightClick:p,onAddFeature:d,onRemoveFeature:g,onRemoveProperty:h,onSetGeometry:c,onSetProperty:m,onLoad:v,onUnmount:f}){const L=(0,o.useContext)(a),[y,b]=(0,o.useState)(null),[C,x]=(0,o.useState)(null),[M,E]=(0,o.useState)(null),[k,w]=(0,o.useState)(null),[S,P]=(0,o.useState)(null),[O,I]=(0,o.useState)(null),[D,B]=(0,o.useState)(null),[z,R]=(0,o.useState)(null),[U,T]=(0,o.useState)(null),[_,j]=(0,o.useState)(null),[A,Z]=(0,o.useState)(null),[V,W]=(0,o.useState)(null),[N,H]=(0,o.useState)(null),[F,G]=(0,o.useState)(null);return(0,o.useEffect)((()=>{null!==y&&y.setMap(L)}),[L]),(0,o.useEffect)((()=>{y&&n&&(null!==C&&google.maps.event.removeListener(C),x(google.maps.event.addListener(y,"dblclick",n)))}),[n]),(0,o.useEffect)((()=>{y&&s&&(null!==M&&google.maps.event.removeListener(M),E(google.maps.event.addListener(y,"mousedown",s)))}),[s]),(0,o.useEffect)((()=>{y&&i&&(null!==k&&google.maps.event.removeListener(k),w(google.maps.event.addListener(y,"mousemove",i)))}),[i]),(0,o.useEffect)((()=>{y&&r&&(null!==S&&google.maps.event.removeListener(S),P(google.maps.event.addListener(y,"mouseout",r)))}),[r]),(0,o.useEffect)((()=>{y&&l&&(null!==O&&google.maps.event.removeListener(O),I(google.maps.event.addListener(y,"mouseover",l)))}),[l]),(0,o.useEffect)((()=>
1{y&&u&&(null!==D&&google.maps.event.removeListener(D),B(google.maps.event.addListener(y,"mouseup",u)))}),[u]),(0,o.useEffect)((()=>{y&&p&&(null!==z&&google.maps.event.removeListener(z),R(google.maps.event.addListener(y,"rightclick",p)))}),[p]),(0,o.useEffect)((()=>{y&&t&&(null!==U&&google.maps.event.removeListener(U),T(google.maps.event.addListener(y,"click",t)))}),[t]),(0,o.useEffect)((()=>{y&&d&&(null!==_&&google.maps.event.removeListener(_),j(google.maps.event.addListener(y,"addfeature",d)))}),[d]),(0,o.useEffect)((()=>{y&&g&&(null!==A&&google.maps.event.removeListener(A),Z(google.maps.event.addListener(y,"removefeature",g)))}),[g]),(0,o.useEffect)((()=>{y&&h&&(null!==V&&google.maps.event.removeListener(V),W(google.maps.event.addListener(y,"removeproperty",h)))}),[h]),(0,o.useEffect)((()=>{y&&c&&(null!==N&&google.maps.event.removeListener(N),H(google.maps.event.addListener(y,"setgeometry",c)))}),[c]),(0,o.useEffect)((()=>{y&&m&&(null!==F&&google.maps.event.removeListener(F),G(google.maps.event.addListener(y,"setproperty",m)))}),[m]),(0,o.useEffect)((()=>{if(null!==L){const o=new google.maps.Data(Object.assign(Object.assign({},e||{}),{map:L}));n&&x(google.maps.event.addListener(o,"dblclick",n)),s&&E(google.maps.event.addListener(o,"mousedown",s)),i&&w(google.maps.event.addListener(o,"mousemove",i)),r&&P(google.maps.event.addListener(o,"mouseout",r)),l&&I(google.maps.event.addListener(o,"mouseover",l)),u&&B(google.maps.event.addListener(o,"mouseup",u)),p&&R(google.maps.event.addListener(o,"rightclick",p)),t&&T(google.maps.event.addListener(o,"click",t)),d&&j(google.maps.event.addListener(o,"addfeature",d)),g&&Z(google.maps.event.addListener(o,"removefeature",g)),h&&W(google.maps.event.addListener(o,"removeproperty",h)),c&&H(google.maps.event.addListener(o,"setgeometry",c)),m&&G(google.maps.event.addListener(o,"setproperty",m)),b(o),v&&v(o)}return()=>{y&&(null!==C&&google.maps.event.removeListener(C),null!==M&&google.maps.event.removeListener(M),null!==k&&google.maps.event.removeListener(k),null!==S&&google.maps.event.removeListener(S),null!==O&&google.maps.event.removeListener(O),null!==D&&google.maps.event.removeListener(D),null!==z&&google.maps.event.removeListener(z),null!==U&&google.maps.event.removeListener(U),null!==_&&google.maps.event.removeListener(_),null!==A&&google.maps.event.removeListener(A),null!==V&&google.maps.event.removeListener(V),null!==N&&google.maps.event.removeListener(N),null!==F&&google.maps.event.removeListener(F),f&&f(y),y.setMap(null))}}),[]),null}));class Je extends o.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={data:null},this.setDataCallback=()=>{null!==this.state.data&&this.props.onLoad&&this.props.onLoad(this.state.data)}}componentDidMount(){if(null!==this.context){const e=new google.maps.Data(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=g({updaterMap:qe,eventMap:Ke,prevProps:{},nextProps:this.props,instance:e}),this.setState((()=>({data:e})),this.setDataCallback)}}componentDidUpdate(e){null!==this.state.data&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:qe,eventMap:Ke,prevProps:e,nextProps:this.props,instance:this.state.data}))}componentWillUnmount(){null!==this.state.data&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),d(this.registeredEvents),this.state.data&&this.state.data.setMap(null))}render(){return null}}Je.contextType=a;const Xe={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},Qe={options(e,t){e.setOptions(t)},url(e,t){e.setUrl(t)},zIndex(e,t){e.setZIndex(t)}};class et extends o.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={kmlLayer:null},this.setKmlLayerCallback=()=>{null!==this.state.kmlLayer&&this.props.onLoad&&this.props.onLoad(this.state.kmlLayer)}}componentDidMount(){const e=new google.maps.KmlLayer(Object.assign(Object.assign({},this.props.options),{map:this.context}));this.registeredEvents=g({updaterMap:Qe,eventMap:Xe,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{kmlLayer:e}}),this.setKmlLayerCallback)}componentDidUpdate(e){null!==this.state.kmlLayer&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:Qe,eventMap:Xe,prevProps:e,nextProps:this.props,instance:this.state.kmlLayer}))}componentWillUnmount(){null!==this.state.kmlLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),d(this.registeredEvents),this.state.kmlLayer.setMap(null))}render(){return null}}function tt(e,t){return"function"===typeof t?t(e.offsetWidth,e.offsetHeight):{x:0,y:0}}function nt(e,t){return new t(e.lat,e.lng)}function st(e,t){return new t(new google.maps.LatLng(e.ne.lat,e.
1ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))}function ot(e,t,n,s){return void 0!==n?function(e,t,n){const s=e&&e.fromLatLngToDivPixel(n.getNorthEast()),o=e&&e.fromLatLngToDivPixel(n.getSouthWest());return s&&o?{left:`${o.x+t.x}px`,top:`${s.y+t.y}px`,width:s.x-o.x-t.x+"px",height:o.y-s.y-t.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,t,(o=n,i=google.maps.LatLngBounds,r=st,o instanceof i?o:r(o,i))):function(e,t,n){const s=e&&e.fromLatLngToDivPixel(n);if(s){const{x:e,y:n}=s;return{left:`${e+t.x}px`,top:`${n+t.y}px`}}return{left:"-9999px",top:"-9999px"}}(e,t,function(e,t,n){return e instanceof t?e:n(e,t)}(s,google.maps.LatLng,nt));var o,i,r}function it(e){if(!e)return"";return(e instanceof google.maps.LatLng?e:new google.maps.LatLng(e.lat,e.lng))+""}function rt(e){if(!e)return"";return(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)))+""}et.contextType=a;(0,o.memo)((function({position:e,bounds:t,mapPaneName:n,zIndex:s,onLoad:r,onUnmount:l,getPixelPositionOffset:u,children:p}){const d=(0,o.useContext)(a),g=(0,o.useMemo)((()=>{const e=document.createElement("div");return e.style.position="absolute",e}),[]),h=(0,o.useMemo)((()=>function(e,t,n,s,o){class i extends google.maps.OverlayView{constructor(e,t,n,s){super(),this.container=e,this.pane=t,this.position=n,this.bounds=s}onAdd(){var e;const t=null===(e=this.getPanes())||void 0===e?void 0:e[this.pane];null===t||void 0===t||t.appendChild(this.container)}draw(){const e=ot(this.getProjection(),Object.assign({},this.container?tt(this.container,o):{x:0,y:0}),this.bounds,this.position);for(const[t,n]of Object.entries(e))this.container.style[t]=n}onRemove(){null!==this.container.parentNode&&this.container.parentNode.removeChild(this.container)}}return new i(e,t,n,s)}(g,n,e,t,u)),[g,n,e,t]);return(0,o.useEffect)((()=>(null===r||void 0===r||r(h),null===h||void 0===h||h.setMap(d),()=>{null===l||void 0===l||l(h),null===h||void 0===h||h.setMap(null)})),[d,h]),(0,o.useEffect)((()=>{g.style.zIndex=`${s}`}),[s,g]),i.createPortal(p,g)}));class at extends o.PureComponent{constructor(e){super(e),this.state={paneEl:null,containerStyle:{position:"absolute"}},this.updatePane=()=>{const e=this.props.mapPaneName,t=this.overlayView.getPanes();r(!!e,"OverlayView requires props.mapPaneName but got %s",e),t?this.setState({paneEl:t[e]}):this.setState({paneEl:null})},this.onAdd=()=>{var e,t;this.updatePane(),null===(t=(e=this.props).onLoad)||void 0===t||t.call(e,this.overlayView)},this.onPositionElement=()=>{const e=ot(this.overlayView.getProjection(),Object.assign({x:0,y:0},this.containerRef.current?tt(this.containerRef.current,this.props.getPixelPositionOffset):{}),this.props.bounds,this.props.position),{left:t,top:n,width:s,height:o}=this.state.containerStyle;var i,r;r={left:t,top:n,width:s,height:o},((i=e).left!==r.left||i.top!==r.top||i.width!==r.height||i.height!==r.height)&&this.setState({containerStyle:Object.assign(Object.assign({},e),{position:"absolute"})})},this.draw=()=>{this.onPositionElement()},this.onRemove=()=>{var e,t;this.setState((()=>({paneEl:null}))),null===(t=(e=this.props).onUnmount)||void 0===t||t.call(e,this.overlayView)},this.containerRef=(0,o.createRef)();const t=new google.maps.OverlayView;t.onAdd=this.onAdd,t.draw=this.draw,t.onRemove=this.onRemove,this.overlayView=t}componentDidMount(){this.overlayView.setMap(this.context)}componentDidUpdate(e){const t=it(e.position),n=it(this.props.position),s=rt(e.bounds),o=rt(this.props.bounds);t===n&&s===o||this.overlayView.draw(),e.mapPaneName!==this.props.mapPaneName&&this.updatePane()}componentWillUnmount(){this.overlayView.setMap(null)}render(){const e=this.state.paneEl;return e?i.createPortal((0,s.jsx)("div",Object.assign({ref:this.containerRef,style:this.state.containerStyle},{children:o.Children.only(this.props.children)})),e):null}}at.FLOAT_PANE="floatPane",at.MAP_PANE="mapPane",at.MARKER_LAYER="markerLayer",at.OVERLAY_LAYER="overlayLayer",at.OVERLAY_MOUSE_TARGET="overlayMouseTarget",at.contextType=a;const lt={onDblClick:"dblclick",onClick:"click"},ut={opacity(e,t){e.setOpacity(t)}};(0,o.memo)((function({url:e,bounds:t,options:n,visible:s}
1){const i=(0,o.useContext)(a),r=new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.west),new google.maps.LatLng(t.north,t.east)),l=(0,o.useMemo)((()=>new google.maps.GroundOverlay(e,r,Object.assign({},n))),[]);return(0,o.useEffect)((()=>{null!==l&&l.setMap(i)}),[i]),(0,o.useEffect)((()=>{"undefined"!==typeof e&&null!==l&&(l.set("url",e),l.setMap(i))}),[l,e]),(0,o.useEffect)((()=>{"undefined"!==typeof s&&null!==l&&l.setOpacity(s?1:0)}),[l,s]),(0,o.useEffect)((()=>{const e=new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.west),new google.maps.LatLng(t.north,t.east));"undefined"!==typeof t&&null!==l&&(l.set("bounds",e),l.setMap(i))}),[l,t]),null}));class pt extends o.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={groundOverlay:null},this.setGroundOverlayCallback=()=>{null!==this.state.groundOverlay&&this.props.onLoad&&this.props.onLoad(this.state.groundOverlay)}}componentDidMount(){r(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");const e=new google.maps.GroundOverlay(this.props.url,this.props.bounds,Object.assign(Object.assign({},this.props.options),{map:this.context}));this.registeredEvents=g({updaterMap:ut,eventMap:lt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{groundOverlay:e}}),this.setGroundOverlayCallback)}componentDidUpdate(e){null!==this.state.groundOverlay&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:ut,eventMap:lt,prevProps:e,nextProps:this.props,instance:this.state.groundOverlay}))}componentWillUnmount(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))}render(){return null}}pt.defaultProps={onLoad:function(){}},pt.contextType=a;const dt={},gt={data(e,t){e.setData(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)}};(0,o.memo)((function({data:e,onLoad:t,onUnmount:n,options:s}){const i=(0,o.useContext)(a),[l,u]=(0,o.useState)(null);return(0,o.useEffect)((()=>{google.maps.visualization||r(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)}),[]),(0,o.useEffect)((()=>{r(!!e,"data property is required in HeatmapLayer %s",e)}),[e]),(0,o.useEffect)((()=>{null!==l&&l.setMap(i)}),[i]),(0,o.useEffect)((()=>{s&&null!==l&&l.setOptions(s)}),[l,s]),(0,o.useEffect)((()=>{const o=new google.maps.visualization.HeatmapLayer(Object.assign(Object.assign({},s||{}),{data:e,map:i}));return u(o),t&&t(o),()=>{null!==l&&(n&&n(l),l.setMap(null))}}),[]),null}));class ht extends o.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={heatmapLayer:null},this.setHeatmapLayerCallback=()=>{null!==this.state.heatmapLayer&&this.props.onLoad&&this.props.onLoad(this.state.heatmapLayer)}}componentDidMount(){r(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),r(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);const e=new google.maps.visualization.HeatmapLayer(Object.assign(Object.assign({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=g({updaterMap:gt,eventMap:dt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{heatmapLayer:e}}),this.setHeatmapLayerCallback)}componentDidUpdate(e){d(this.registeredEvents),this.registeredEvents=g({updaterMap:gt,eventMap:dt,prevProps:e,nextProps:this.props,instance:this.state.heatmapLayer})}componentWillUnmount(){null!==this.state.heatmapLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),d(this.registeredEvents),this.state.heatmapLayer.setMap(null))}render(){return null}}ht.contextType=a;const ct={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"}
1,mt={register(e,t,n){e.registerPanoProvider(t,n)},links(e,t){e.setLinks(t)},motionTracking(e,t){e.setMotionTracking(t)},options(e,t){e.setOptions(t)},pano(e,t){e.setPano(t)},position(e,t){e.setPosition(t)},pov(e,t){e.setPov(t)},visible(e,t){e.setVisible(t)},zoom(e,t){e.setZoom(t)}};class vt extends o.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={streetViewPanorama:null},this.setStreetViewPanoramaCallback=()=>{null!==this.state.streetViewPanorama&&this.props.onLoad&&this.props.onLoad(this.state.streetViewPanorama)}}componentDidMount(){const e=this.context.getStreetView();this.registeredEvents=g({updaterMap:mt,eventMap:ct,prevProps:{},nextProps:this.props,instance:e}),this.setState((()=>({streetViewPanorama:e})),this.setStreetViewPanoramaCallback)}componentDidUpdate(e){null!==this.state.streetViewPanorama&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:mt,eventMap:ct,prevProps:e,nextProps:this.props,instance:this.state.streetViewPanorama}))}componentWillUnmount(){null!==this.state.streetViewPanorama&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),d(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))}render(){return null}}vt.contextType=a;class ft extends o.PureComponent{constructor(){super(...arguments),this.state={streetViewService:null},this.setStreetViewServiceCallback=()=>{null!==this.state.streetViewService&&this.props.onLoad&&this.props.onLoad(this.state.streetViewService)}}componentDidMount(){const e=new google.maps.StreetViewService;this.setState((function(){return{streetViewService:e}}),this.setStreetViewServiceCallback)}componentWillUnmount(){null!==this.state.streetViewService&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)}render(){return null}}ft.contextType=a;o.PureComponent;const Lt={onDirectionsChanged:"directions_changed"},yt={directions(e,t){e.setDirections(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},panel(e,t){e.setPanel(t)},routeIndex(e,t){e.setRouteIndex(t)}};class bt extends o.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.state={directionsRenderer:null},this.setDirectionsRendererCallback=()=>{null!==this.state.directionsRenderer&&(this.state.directionsRenderer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.directionsRenderer))}}componentDidMount(){const e=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=g({updaterMap:yt,eventMap:Lt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{directionsRenderer:e}}),this.setDirectionsRendererCallback)}componentDidUpdate(e){null!==this.state.directionsRenderer&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:yt,eventMap:Lt,prevProps:e,nextProps:this.props,instance:this.state.directionsRenderer}))}componentWillUnmount(){null!==this.state.directionsRenderer&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),d(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))}render(){return(0,s.jsx)(s.Fragment,{})}}bt.contextType=a;o.PureComponent;const Ct={onPlacesChanged:"places_changed"},xt={bounds(e,t){e.setBounds(t)}};class Mt extends o.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.containerElement=(0,o.createRef)(),this.state={searchBox:null},this.setSearchBoxCallback=()=>{null!==this.state.searchBox&&this.props.onLoad&&this.props.onLoad(this.state.searchBox)}}componentDidMount(){if(r(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),null!==this.containerElement&&null!==this.containerElement.current){const e=this.containerElement.current.querySelector("input");if(null!==e){const t=new google.maps.places.SearchBox(e,this.props.options);this.registeredEvents=g({updaterMap:xt,eventMap:Ct,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{searchBox:t}}),this.setSearchBoxCallback)}}}componentDidUpdate(e){null!==this.state.searchBox&&(d(this.registeredEvents),this.registeredEvents=g({updaterMap:xt,eventMap:Ct,prevProps:e,nextProps:this.props,instance:this.state.searchBox}))}componentWillUnmount(){null!==this.state.searchBox&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox
1),d(this.registeredEvents))}render(){return(0,s.jsx)("div",Object.assign({ref:this.containerElement},{children:o.Children.only(this.props.children)}))}}Mt.contextType=a;const Et={onPlaceChanged:"place_changed"},kt={bounds(e,t){e.setBounds(t)},restrictions(e,t){e.setComponentRestrictions(t)},fields(e,t){e.setFields(t)},options(e,t){e.setOptions(t)},types(e,t){e.setTypes(t)}};class wt extends o.PureComponent{constructor(){super(...arguments),this.registeredEvents=[],this.containerElement=(0,o.createRef)(),this.state={autocomplete:null},this.setAutocompleteCallback=()=>{null!==this.state.autocomplete&&this.props.onLoad&&this.props.onLoad(this.state.autocomplete)}}componentDidMount(){r(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);const e=this.containerElement.current.querySelector("input");if(e){const t=new google.maps.places.Autocomplete(e,this.props.options);this.registeredEvents=g({updaterMap:kt,eventMap:Et,prevProps:{},nextProps:this.props,instance:t}),this.setState((()=>({autocomplete:t})),this.setAutocompleteCallback)}}componentDidUpdate(e){d(this.registeredEvents),this.registeredEvents=g({updaterMap:kt,eventMap:Et,prevProps:e,nextProps:this.props,instance:this.state.autocomplete})}componentWillUnmount(){null!==this.state.autocomplete&&d(this.registeredEvents)}render(){return(0,s.jsx)("div",Object.assign({ref:this.containerElement,className:this.props.className},{children:o.Children.only(this.props.children)}))}}wt.defaultProps={className:""},wt.contextType=a}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.