1 line
90 KiB
JavaScript
1 line
90 KiB
JavaScript
"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[8012],{25045:(t,e,s)=>{s.d(e,{BH:()=>A,Fu:()=>Tt,KD:()=>K,Ro:()=>Wt,i3:()=>ve,pH:()=>ct,u6:()=>x});var i,n,o=s(65908),r=s(85672),a=s(40829);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function h(t){var e=function(t,e){if("object"!=l(t)||!t)return t;var s=t[Symbol.toPrimitive];if(void 0!==s){var i=s.call(t,e||"default");if("object"!=l(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==l(e)?e:e+""}function p(t,e,s){return(e=h(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function c(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var u=c(n?i:(n=1,i=function(t,e,s,i,n,o,r,a){if(!t){var l;if(void 0===e)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var h=[s,i,n,o,r,a],p=0;(l=new Error(e.replace(/%s/g,(function(){return h[p++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}})),d=(0,r.createContext)(null);function g(t,e,s,i){var n,o,r={};return n=t,o=(t,n)=>{var o=s[n];o!==e[n]&&(r[n]=o,t(i,o))},Object.keys(n).forEach((t=>o(n[t],t))),r}function m(t,e,s){var i,n,o,r=(i=s,n=function(s,i,n){return"function"===typeof t[n]&&s.push(google.maps.event.addListener(e,i,t[n])),s},o=[],Object.keys(i).reduce((function(t,e){return n(t,i[e],e)}),o));return r}function v(t){google.maps.event.removeListener(t)}function f(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(v)}function y(t){var{updaterMap:e,eventMap:s,prevProps:i,nextProps:n,instance:o}=t,r=m(n,o,s);return g(e,i,n,o),r}var b={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(t,e){e.forEach((function(e,s){t.mapTypes.set(String(s),e)}))},center(t,e){t.setCenter(e)},clickableIcons(t,e){t.setClickableIcons(e)},heading(t,e){t.setHeading(e)},mapTypeId(t,e){t.setMapTypeId(e)},options(t,e){t.setOptions(e)},streetView(t,e){t.setStreetView(e)},tilt(t,e){t.setTilt(e)},zoom(t,e){t.setZoom(e)}};class x extends r.PureComponent{constructor(){super(...arguments),p(this,"state",{map:null}),p(this,"registeredEvents",[]),p(this,"mapRef",null),p(this,"getInstance",(()=>null===this.mapRef?null:new google.maps.Map(this.mapRef,this.props.options))),p(this,"panTo",(t=>{var e=this.getInstance();e&&e.panTo(t)})),p(this,"setMapCallback",(()=>{null!==this.state.map&&this.props.onLoad&&this.props.onLoad(this.state.map)})),p(this,"getRef",(t=>{this.mapRef=t}))}componentDidMount(){var t=this.getInstance();this.registeredEvents=y({updaterMap:C,eventMap:b,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{map:t}}),this.setMapCallback)}componentDidUpdate(t){null!==this.state.map&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:C,eventMap:b,prevProps:t,nextProps:this.props,instance:this.state.map}))}componentWillUnmount(){null!==this.state.map&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),f(this.registeredEvents))}render(){return(0,o.jsx)("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:(0,o.jsx)(d.Provider,{value:this.state.map,children:null!==this.state.map?this.props.children:null})})}}function w(t,e,s,i,n,o,r){try{var a=t[o](r),l=a.value}catch(t){return void s(t)}a.done?e(l):Promise.resolve(l).then(i,n)}function P(t){return function(){var e=this,s=arguments;return new Promise((function(i,n){var o=t.apply(e,s);function r(t){w(o,i,n,r,a,"next",t)}function a(t){w(o,i,n,r,a,"throw",t)}r(void 0)}))}}function M(t){var{googleMapsApiKey:e,googleMapsClientId:s,version:i="weekly",language:n,region:o,libraries:r,channel:a,mapIds:l,authReferrerPolicy:h,apiUrl:p="https://maps.googleapis.com"}=t,c=[];return u(e&&s||!(e&&s),"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?c.push("key=".concat(e)):s&&c.push("client=".concat(s)),i&&c.push("v=".concat(i)),n&&c.push("language=".concat(n)),o&&c.push("region=".concat(o)),r&&r.length&&c.push("libraries=".concat(r.sort().join(","))),a&&c.push("channel=".concat(a)),l&&l.length&&c.push("map_ids=".concat(l.join(","))),h&&c.push("auth_referrer_policy=".concat(h)),c.push("loading=async"),c.push("callback=initMap"),"".concat(p,"/maps/api/js?").concat(c.join("&"))}var O="undefined"!==typeof document;function k(t){var{url:e,id:s,nonce:i}=t;return O?new Promise((function(t,n){var o=document.getElementById(s),r=window;if(o){var a=o.getAttribute("data-state");if(o.src===e&&"error"!==a){if("ready"===a)return t(s);var l=r.initMap,h=o.onerror;return r.initMap=function(){l&&l(),t(s)},void(o.onerror=function(t){h&&h(t),n(t)})}o.remove()}var p=document.createElement("script");p.type="text/javascript",p.src=e,p.id=s,p.async=!0,p.nonce=i||"",p.onerror=function(t){p.setAttribute("data-state","error"),n(t)},r.initMap=function(){p.setAttribute("data-state","ready"),t(s)},document.head.appendChild(p)})).catch((t=>{throw console.error("injectScript error: ",t),t})):Promise.reject(new Error("document is undefined"))}function L(t){var e=t.href;return!(!e||0!==e.indexOf("https://fonts.googleapis.com/css?family=Roboto")&&0!==e.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text"))||("style"===t.tagName.toLowerCase()&&t.styleSheet&&t.styleSheet.cssText&&0===t.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(t.styleSheet.cssText="",!0):"style"===t.tagName.toLowerCase()&&t.innerHTML&&0===t.innerHTML.replace("\r\n","").indexOf(".gm-style")?(t.innerHTML="",!0):"style"===t.tagName.toLowerCase()&&!t.styleSheet&&!t.innerHTML)}function E(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(s,i){return L(s)||Reflect.apply(e,t,[s,i]),s};var s=t.appendChild.bind(t);t.appendChild=function(e){return L(e)||Reflect.apply(s,t,[e]),e}}}var S=!1;function I(){return(0,o.jsx)("div",{children:"Loading..."})}var j,D={id:"script-loader",version:"weekly"};class B extends r.PureComponent{constructor(){super(...arguments),p(this,"check",null),p(this,"state",{loaded:!1}),p(this,"cleanupCallback",(()=>{delete window.google.maps,this.injectScript()})),p(this,"isCleaningUp",P((function*(){return new Promise((function(t){if(S){if(O)var e=window.setInterval((function(){S||(window.clearInterval(e),t())}),1)}else t()}))}))),p(this,"cleanup",(()=>{S=!0;var t=document.getElementById(this.props.id);t&&t.parentNode&&t.parentNode.removeChild(t),Array.prototype.slice.call(document.getElementsByTagName("script")).filter((function(t){return"string"===typeof t.src&&t.src.includes("maps.googleapis")})).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)})),Array.prototype.slice.call(document.getElementsByTagName("link")).filter((function(t){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===t.href})).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)})),Array.prototype.slice.call(document.getElementsByTagName("style")).filter((function(t){return void 0!==t.innerText&&t.innerText.length>0&&t.innerText.includes(".gm-")})).forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))})),p(this,"injectScript",(()=>{this.props.preventGoogleFontsLoading&&E(),u(!!this.props.id,'LoadScript requires "id" prop to be a string: %s',this.props.id),k({id:this.props.id,nonce:this.props.nonce,url:M(this.props)}).then((()=>{this.props.onLoad&&this.props.onLoad(),this.setState((function(){return{loaded:!0}}))})).catch((t=>{this.props.onError&&this.props.onError(t),console.error("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (".concat(this.props.googleMapsApiKey||"-",") or Client ID (").concat(this.props.googleMapsClientId||"-",") to <LoadScript />\n Otherwise it is a Network issue.\n "))}))})),p(this,"getRef",(t=>{this.check=t}))}componentDidMount(){if(O){if(window.google&&window.google.maps&&!S)return void console.error("google api is already presented");this.isCleaningUp().then(this.injectScript).catch((function(t){console.error("Error at injecting script after cleaning up: ",t)}))}}componentDidUpdate(t){this.props.libraries!==t.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),O&&t.language!==this.props.language&&(this.cleanup(),this.setState((function(){return{loaded:!1}}),this.cleanupCallback))}componentWillUnmount(){if(O){this.cleanup();window.setTimeout((()=>{this.check||(delete window.google,S=!1)}),1),this.props.onUnmount&&this.props.onUnmount()}}render(){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{ref:this.getRef}),this.state.loaded?this.props.children:this.props.loadingElement||(0,o.jsx)(I,{})]})}}function T(t,e){if(null==t)return{};var s,i,n=function(t,e){if(null==t)return{};var s={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;s[i]=t[i]}return s}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)s=o[i],e.includes(s)||{}.propertyIsEnumerable.call(t,s)&&(n[s]=t[s])}return n}p(B,"defaultProps",D);var R=["loadingElement","onLoad","onError","onUnmount","children"],U=(0,o.jsx)(I,{});function z(t){var{loadingElement:e,onLoad:s,onError:i,onUnmount:n,children:o}=t,a=T(t,R),{isLoaded:l,loadError:h}=function(t){var{id:e=D.id,version:s=D.version,nonce:i,googleMapsApiKey:n,googleMapsClientId:o,language:a,region:l,libraries:h,preventGoogleFontsLoading:p,channel:c,mapIds:d,authReferrerPolicy:g,apiUrl:m="https://maps.googleapis.com"}=t,v=(0,r.useRef)(!1),[f,y]=(0,r.useState)(!1),[b,C]=(0,r.useState)(void 0);(0,r.useEffect)((function(){return v.current=!0,()=>{v.current=!1}}),[]),(0,r.useEffect)((function(){O&&p&&E()}),[p]),(0,r.useEffect)((function(){f&&u(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")}),[f]);var x=M({version:s,googleMapsApiKey:n,googleMapsClientId:o,language:a,region:l,libraries:h,channel:c,mapIds:d,authReferrerPolicy:g,apiUrl:m});(0,r.useEffect)((function(){function t(){v.current&&(y(!0),j=x)}O&&(window.google&&window.google.maps&&j===x?t():k({id:e,url:x,nonce:i}).then(t).catch((function(t){v.current&&C(t),console.warn("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (".concat(n||"-",") or Client ID (").concat(o||"-",")\n Otherwise it is a Network issue.\n ")),console.error(t)})))}),[e,x,i]);var w=(0,r.useRef)(void 0);return(0,r.useEffect)((function(){w.current&&h!==w.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"),w.current=h}),[h]),{isLoaded:f,loadError:b,url:x}}(a);return(0,r.useEffect)((function(){l&&"function"===typeof s&&s()}),[l,s]),(0,r.useEffect)((function(){h&&"function"===typeof i&&i(h)}),[h,i]),(0,r.useEffect)((function(){return()=>{n&&n()}}),[n]),l?o:e||U}var A=(0,r.memo)(z);function W(t,e,s,i){return new(s||(s=Promise))((function(e,n){function o(t){try{a(i.next(t))}catch(e){n(e)}}function r(t){try{a(i.throw(t))}catch(e){n(e)}}function a(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(t){t(i)}))).then(o,r)}a((i=i.apply(t,[])).next())}))}function _(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}"function"===typeof SuppressedError&&SuppressedError;var V,H=function t(e,s){if(e===s)return!0;if(e&&s&&"object"==typeof e&&"object"==typeof s){if(e.constructor!==s.constructor)return!1;var i,n,o;if(Array.isArray(e)){if((i=e.length)!=s.length)return!1;for(n=i;0!==n--;)if(!t(e[n],s[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===s.source&&e.flags===s.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===s.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===s.toString();if((i=(o=Object.keys(e)).length)!==Object.keys(s).length)return!1;for(n=i;0!==n--;)if(!Object.prototype.hasOwnProperty.call(s,o[n]))return!1;for(n=i;0!==n--;){var r=o[n];if(!t(e[r],s[r]))return!1}return!0}return e!==e&&s!==s},N=_(H),Z="__googleMapsScriptId";!function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"}(V||(V={}));class G{constructor(t){var{apiKey:e,authReferrerPolicy:s,channel:i,client:n,id:o=Z,language:r,libraries:a=[],mapIds:l,nonce:h,region:p,retries:c=3,url:u="https://maps.googleapis.com/maps/api/js",version:d}=t;if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=s,this.channel=i,this.client=n,this.id=o||Z,this.language=r,this.libraries=a,this.mapIds=l,this.nonce=h,this.region=p,this.retries=c,this.url=u,this.version=d,G.instance){if(!N(this.options,G.instance.options))throw new Error("Loader must not be called again with different options. ".concat(JSON.stringify(this.options)," !== ").concat(JSON.stringify(G.instance.options)));return G.instance}G.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?V.FAILURE:this.done?V.SUCCESS:this.loading?V.LOADING:V.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){var t=this.url;return t+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(t+="&key=".concat(this.apiKey)),this.channel&&(t+="&channel=".concat(this.channel)),this.client&&(t+="&client=".concat(this.client)),this.libraries.length>0&&(t+="&libraries=".concat(this.libraries.join(","))),this.language&&(t+="&language=".concat(this.language)),this.region&&(t+="®ion=".concat(this.region)),this.version&&(t+="&v=".concat(this.version)),this.mapIds&&(t+="&map_ids=".concat(this.mapIds.join(","))),this.authReferrerPolicy&&(t+="&auth_referrer_policy=".concat(this.authReferrerPolicy)),t}deleteScript(){var t=document.getElementById(this.id);t&&t.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((t,e)=>{this.loadCallback((s=>{s?e(s.error):t(window.google)}))}))}importLibrary(t){return this.execute(),google.maps.importLibrary(t)}loadCallback(t){this.callbacks.push(t),this.execute()}setScript(){var t,e;if(document.getElementById(this.id))this.callback();else{var s={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(s).forEach((t=>!s[t]&&delete s[t])),(null===(e=null===(t=null===window||void 0===window?void 0:window.google)||void 0===t?void 0:t.maps)||void 0===e?void 0:e.importLibrary)||(t=>{var e,s,i,n="The Google Maps JavaScript API",o="google",r="importLibrary",a="__ib__",l=document,h=window,p=(h=h[o]||(h[o]={})).maps||(h.maps={}),c=new Set,u=new URLSearchParams,d=()=>e||(e=new Promise(((r,h)=>W(this,0,void 0,(function*(){var d;for(i in yield s=l.createElement("script"),s.id=this.id,u.set("libraries",[...c]+""),t)u.set(i.replace(/[A-Z]/g,(t=>"_"+t[0].toLowerCase())),t[i]);u.set("callback",o+".maps."+a),s.src=this.url+"?"+u,p[a]=r,s.onerror=()=>e=h(Error(n+" could not load.")),s.nonce=this.nonce||(null===(d=l.querySelector("script[nonce]"))||void 0===d?void 0:d.nonce)||"",l.head.append(s)})))));p[r]?console.warn(n+" only loads once. Ignoring:",t):p[r]=function(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),i=1;i<e;i++)s[i-1]=arguments[i];return c.add(t)&&d().then((()=>p[r](t,...s)))}})(s);var i=this.libraries.map((t=>this.importLibrary(t)));i.length||i.push(this.importLibrary("core")),Promise.all(i).then((()=>this.callback()),(t=>{var e=new ErrorEvent("error",{error:t});this.loadErrorCallback(e)}))}}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(t){if(this.errors.push(t),this.errors.length<=this.retries){var e=this.errors.length*Math.pow(2,this.errors.length);console.error("Failed to load Google Maps script, retrying in ".concat(e," ms.")),setTimeout((()=>{this.deleteScript(),this.setScript()}),e)}else this.onerrorEvent=t,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((t=>{t(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading=!0,this.setScript()}}}var F=["maps"];function K(t){var{id:e=D.id,version:s=D.version,nonce:i,googleMapsApiKey:n,language:o,region:a,libraries:l=F,preventGoogleFontsLoading:h,mapIds:p,authReferrerPolicy:c}=t,u=(0,r.useRef)(!1),[d,g]=(0,r.useState)(!1),[m,v]=(0,r.useState)(void 0);(0,r.useEffect)((function(){return u.current=!0,()=>{u.current=!1}}),[]);var f=(0,r.useMemo)((()=>new G({id:e,apiKey:n,version:s,libraries:l,language:o||"en",region:a||"US",mapIds:p||[],nonce:i||"",authReferrerPolicy:c||"origin"})),[e,n,s,l,o,a,p,i,c]);(0,r.useEffect)((function(){d||f.load().then((()=>{u.current&&g(!0)})).catch((t=>{v(t)}))}),[]),(0,r.useEffect)((()=>{O&&h&&E()}),[h]);var y=(0,r.useRef)();return(0,r.useEffect)((()=>{y.current&&l!==y.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"),y.current=l}),[l]),{isLoaded:d,loadError:m}}function Y(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function q(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?Y(Object(s),!0).forEach((function(e){p(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):Y(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}var J={},$={options(t,e){t.setOptions(e)}};class X extends r.PureComponent{constructor(){super(...arguments),p(this,"state",{trafficLayer:null}),p(this,"setTrafficLayerCallback",(()=>{null!==this.state.trafficLayer&&this.props.onLoad&&this.props.onLoad(this.state.trafficLayer)})),p(this,"registeredEvents",[])}componentDidMount(){var t=new google.maps.TrafficLayer(q(q({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:$,eventMap:J,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{trafficLayer:t}}),this.setTrafficLayerCallback)}componentDidUpdate(t){null!==this.state.trafficLayer&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:$,eventMap:J,prevProps:t,nextProps:this.props,instance:this.state.trafficLayer}))}componentWillUnmount(){null!==this.state.trafficLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),f(this.registeredEvents),this.state.trafficLayer.setMap(null))}render(){return null}}p(X,"contextType",d);class Q extends r.PureComponent{constructor(){super(...arguments),p(this,"state",{bicyclingLayer:null}),p(this,"setBicyclingLayerCallback",(()=>{null!==this.state.bicyclingLayer&&(this.state.bicyclingLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.bicyclingLayer))}))}componentDidMount(){var t=new google.maps.BicyclingLayer;this.setState((()=>({bicyclingLayer:t})),this.setBicyclingLayerCallback)}componentWillUnmount(){null!==this.state.bicyclingLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))}render(){return null}}p(Q,"contextType",d);class tt extends r.PureComponent{constructor(){super(...arguments),p(this,"state",{transitLayer:null}),p(this,"setTransitLayerCallback",(()=>{null!==this.state.transitLayer&&(this.state.transitLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.transitLayer))}))}componentDidMount(){var t=new google.maps.TransitLayer;this.setState((function(){return{transitLayer:t}}),this.setTransitLayerCallback)}componentWillUnmount(){null!==this.state.transitLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))}render(){return null}}function et(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function st(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?et(Object(s),!0).forEach((function(e){p(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):et(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}p(tt,"contextType",d);var it={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},nt={drawingMode(t,e){t.setDrawingMode(e)},options(t,e){t.setOptions(e)}};class ot extends r.PureComponent{constructor(t){super(t),p(this,"registeredEvents",[]),p(this,"state",{drawingManager:null}),p(this,"setDrawingManagerCallback",(()=>{null!==this.state.drawingManager&&this.props.onLoad&&this.props.onLoad(this.state.drawingManager)})),u(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing)}componentDidMount(){var t=new google.maps.drawing.DrawingManager(st(st({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:nt,eventMap:it,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{drawingManager:t}}),this.setDrawingManagerCallback)}componentDidUpdate(t){null!==this.state.drawingManager&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:nt,eventMap:it,prevProps:t,nextProps:this.props,instance:this.state.drawingManager}))}componentWillUnmount(){null!==this.state.drawingManager&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),f(this.registeredEvents),this.state.drawingManager.setMap(null))}render(){return null}}function rt(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function at(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?rt(Object(s),!0).forEach((function(e){p(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):rt(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}p(ot,"contextType",d);var lt={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"},ht={animation(t,e){t.setAnimation(e)},clickable(t,e){t.setClickable(e)},cursor(t,e){t.setCursor(e)},draggable(t,e){t.setDraggable(e)},icon(t,e){t.setIcon(e)},label(t,e){t.setLabel(e)},map(t,e){t.setMap(e)},opacity(t,e){t.setOpacity(e)},options(t,e){t.setOptions(e)},position(t,e){t.setPosition(e)},shape(t,e){t.setShape(e)},title(t,e){t.setTitle(e)},visible(t,e){t.setVisible(e)},zIndex(t,e){t.setZIndex(e)}},pt={};class ct extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[])}componentDidMount(){var t=this;return P((function*(){var e=at(at(at({},t.props.options||pt),t.props.clusterer?pt:{map:t.context}),{},{position:t.props.position});t.marker=new google.maps.Marker(e),t.props.clusterer?t.props.clusterer.addMarker(t.marker,!!t.props.noClustererRedraw):t.marker.setMap(t.context),t.registeredEvents=y({updaterMap:ht,eventMap:lt,prevProps:{},nextProps:t.props,instance:t.marker}),t.props.onLoad&&t.props.onLoad(t.marker)}))()}componentDidUpdate(t){this.marker&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:ht,eventMap:lt,prevProps:t,nextProps:this.props,instance:this.marker}))}componentWillUnmount(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),f(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))}render(){return(this.props.children?r.Children.map(this.props.children,(t=>{if(!(0,r.isValidElement)(t))return t;var e=t;return(0,r.cloneElement)(e,{anchor:this.marker})})):null)||null}}p(ct,"contextType",d);var ut=function(){function t(e,s){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=s,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(e.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 t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(t){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var e=this.cluster.getClusterer();if(google.maps.event.trigger(e,"click",this.cluster),google.maps.event.trigger(e,"clusterclick",this.cluster),e.getZoomOnClick()){var s=e.getMaxZoom(),i=this.cluster.getBounds(),n=e.getMap();null!==n&&"fitBounds"in n&&n.fitBounds(i),this.timeOut=window.setTimeout((function(){var t=e.getMap();if(null!==t){"fitBounds"in t&&t.fitBounds(i);var n=t.getZoom()||0;null!==s&&n>s&&t.setZoom(s+1)}}),100)}t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var t;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),null===(t=this.getPanes())||void 0===t||t.overlayMouseTarget.appendChild(this.div);var e=this.getMap();null!==e&&(this.boundsChangedListener=google.maps.event.addListener(e,"bounds_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))},t.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)},t.prototype.draw=function(){if(this.visible&&null!==this.div&&this.center){var t=this.getPosFromLatLng(this.center);this.div.style.top=null!==t?"".concat(t.y,"px"):"0",this.div.style.left=null!==t?"".concat(t.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var t,e,s,i,n,o;if(this.div&&this.center){var r=null===this.sums||"undefined"===typeof this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,a=this.backgroundPosition.split(" "),l=parseInt((null===(t=a[0])||void 0===t?void 0:t.replace(/^\s+|\s+$/g,""))||"0",10),h=parseInt((null===(e=a[1])||void 0===e?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),p=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(null!==p?"".concat(p.y,"px"):"0","; left: ").concat(null!==p?"".concat(p.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var c=document.createElement("img");c.alt=r,c.src=this.url,c.width=this.width,c.height=this.height,c.setAttribute("style","position: absolute; top: ".concat(h,"px; left: ").concat(l,"px")),this.cluster.getClusterer().enableRetinaIcons||(c.style.clip="rect(-".concat(h,"px, -").concat(l+this.width,"px, -").concat(h+this.height,", -").concat(l,")"));var u=document.createElement("div");u.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===(s=this.sums)||void 0===s?void 0:s.text)&&(u.innerText="".concat(null===(i=this.sums)||void 0===i?void 0:i.text)),(null===(n=this.sums)||void 0===n?void 0:n.html)&&(u.innerHTML="".concat(null===(o=this.sums)||void 0===o?void 0:o.html)),this.div.innerHTML="",this.div.appendChild(c),this.div.appendChild(u),this.div.title=r,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(t){this.sums=t;var e=this.cluster.getClusterer().getStyles(),s=e[Math.min(e.length-1,Math.max(0,t.index-1))];s&&(this.url=s.url,this.height=s.height,this.width=s.width,s.className&&(this.className="".concat(this.clusterClassName," ").concat(s.className)),this.anchorText=s.anchorText||[0,0],this.anchorIcon=s.anchorIcon||[this.height/2,this.width/2],this.textColor=s.textColor||"black",this.textSize=s.textSize||11,this.textDecoration=s.textDecoration||"none",this.fontWeight=s.fontWeight||"bold",this.fontStyle=s.fontStyle||"normal",this.fontFamily=s.fontFamily||"Arial,sans-serif",this.backgroundPosition=s.backgroundPosition||"0 0")},t.prototype.setCenter=function(t){this.center=t},t.prototype.getPosFromLatLng=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return null!==e&&(e.x-=this.anchorIcon[1],e.y-=this.anchorIcon[0]),e},t}(),dt=function(){function t(t){this.markerClusterer=t,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 ut(this,this.markerClusterer.getStyles()),this.getSize=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 t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center,this.center),e=0,s=this.getMarkers();e<s.length;e++){var i=s[e].getPosition();i&&t.extend(i)}return t},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(t){var e,s;if(this.isMarkerAlreadyAdded(t))return!1;if(this.center){if(this.averageCenter&&(s=t.getPosition())){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+s.lat())/i,(this.center.lng()*(i-1)+s.lng())/i),this.calculateBounds()}}else(s=t.getPosition())&&(this.center=s,this.calculateBounds());t.isAdded=!0,this.markers.push(t);var n=this.markers.length,o=this.markerClusterer.getMaxZoom(),r=null===(e=this.map)||void 0===e?void 0:e.getZoom();if(null!==o&&"undefined"!==typeof r&&r>o)t.getMap()!==this.map&&t.setMap(this.map);else if(n<this.minClusterSize)t.getMap()!==this.map&&t.setMap(this.map);else if(n===this.minClusterSize)for(var a=0,l=this.markers;a<l.length;a++){l[a].setMap(null)}else t.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(t){if(null!==this.bounds){var e=t.getPosition();if(e)return this.bounds.contains(e)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var t,e=this.markers.length,s=this.markerClusterer.getMaxZoom(),i=null===(t=this.map)||void 0===t?void 0:t.getZoom();null!==s&&"undefined"!==typeof i&&i>s||e<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())},t.prototype.isMarkerAlreadyAdded=function(t){if(this.markers.includes)return this.markers.includes(t);for(var e=0;e<this.markers.length;e++)if(t===this.markers[e])return!0;return!1},t}();function gt(t,e){var s=t.length,i=s.toString().length,n=Math.min(i,e);return{text:s.toString(),index:n,title:""}}var mt=[53,56,66,78,90],vt=function(){function t(e,s,i){void 0===s&&(s=[]),void 0===i&&(i={}),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.createClusters=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.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=i.gridSize||60,this.minClusterSize=i.minimumClusterSize||2,this.maxZoom=i.maxZoom||null,this.styles=i.styles||[],this.title=i.title||"",this.zoomOnClick=!0,void 0!==i.zoomOnClick&&(this.zoomOnClick=i.zoomOnClick),this.averageCenter=!1,void 0!==i.averageCenter&&(this.averageCenter=i.averageCenter),this.ignoreHidden=!1,void 0!==i.ignoreHidden&&(this.ignoreHidden=i.ignoreHidden),this.enableRetinaIcons=!1,void 0!==i.enableRetinaIcons&&(this.enableRetinaIcons=i.enableRetinaIcons),this.imagePath=i.imagePath||"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",this.imageExtension=i.imageExtension||"png",this.imageSizes=i.imageSizes||mt,this.calculator=i.calculator||gt,this.batchSize=i.batchSize||2e3,this.batchSizeIE=i.batchSizeIE||500,this.clusterClass=i.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(s,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var t,e;this.resetViewport(!1),(null===(t=this.getMap())||void 0===t?void 0:t.getZoom())!==(this.get("minZoom")||0)&&(null===(e=this.getMap())||void 0===e?void 0:e.getZoom())!==this.get("maxZoom")||google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var t=this.getMap();this.activeMap=t,this.ready=!0,this.repaint(),null!==t&&(this.listeners=[google.maps.event.addListener(t,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(t,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var t=0,e=this.markers;t<e.length;t++){var s=e[t];s.getMap()!==this.activeMap&&s.setMap(this.activeMap)}for(var i=0,n=this.clusters;i<n.length;i++){n[i].remove()}this.clusters=[];for(var o=0,r=this.listeners;o<r.length;o++){var a=r[o];google.maps.event.removeListener(a)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var t=0;t<this.imageSizes.length;t++)this.styles.push({url:"".concat(this.imagePath+(t+1),".").concat(this.imageExtension),height:this.imageSizes[t]||0,width:this.imageSizes[t]||0})},t.prototype.fitMapToMarkers=function(){for(var t=this.getMarkers(),e=new google.maps.LatLngBounds,s=0,i=t;s<i.length;s++){var n=i[s].getPosition();n&&e.extend(n)}var o=this.getMap();null!==o&&"fitBounds"in o&&o.fitBounds(e)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(t){this.gridSize=t},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(t){this.minClusterSize=t},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(t){this.maxZoom=t},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(t){this.styles=t},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(t){this.title=t},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(t){this.zoomOnClick=t},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(t){this.averageCenter=t},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(t){this.ignoreHidden=t},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(t){this.enableRetinaIcons=t},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(t){this.imageExtension=t},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(t){this.imagePath=t},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(t){this.imageSizes=t},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(t){this.calculator=t},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(t){this.batchSizeIE=t},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(t){this.clusterClass=t},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(t,e){this.pushMarkerTo(t),e||this.redraw()},t.prototype.addMarkers=function(t,e){for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){var i=t[s];i&&this.pushMarkerTo(i)}e||this.redraw()},t.prototype.pushMarkerTo=function(t){var e=this;t.getDraggable()&&google.maps.event.addListener(t,"dragend",(function(){e.ready&&(t.isAdded=!1,e.repaint())})),t.isAdded=!1,this.markers.push(t)},t.prototype.removeMarker_=function(t){var e=-1;if(this.markers.indexOf)e=this.markers.indexOf(t);else for(var s=0;s<this.markers.length;s++)if(t===this.markers[s]){e=s;break}return-1!==e&&(t.setMap(null),this.markers.splice(e,1),!0)},t.prototype.removeMarker=function(t,e){var s=this.removeMarker_(t);return!e&&s&&this.repaint(),s},t.prototype.removeMarkers=function(t,e){for(var s=!1,i=0,n=t;i<n.length;i++){var o=n[i];s=s||this.removeMarker_(o)}return!e&&s&&this.repaint(),s},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var t=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout((function(){for(var e=0,s=t;e<s.length;e++){s[e].remove()}}),0)},t.prototype.getExtendedBounds=function(t){var e=this.getProjection(),s=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()));null!==s&&(s.x+=this.gridSize,s.y-=this.gridSize);var i=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()));if(null!==i&&(i.x-=this.gridSize,i.y+=this.gridSize),null!==s){var n=e.fromDivPixelToLatLng(s);null!==n&&t.extend(n)}if(null!==i){var o=e.fromDivPixelToLatLng(i);null!==o&&t.extend(o)}return t},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(t){for(var e=0,s=this.clusters;e<s.length;e++){s[e].remove()}this.clusters=[];for(var i=0,n=this.markers;i<n.length;i++){var o=n[i];o.isAdded=!1,t&&o.setMap(null)}},t.prototype.distanceBetweenPoints=function(t,e){var s=(e.lat()-t.lat())*Math.PI/180,i=(e.lng()-t.lng())*Math.PI/180,n=Math.sin(s/2)*Math.sin(s/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(i/2)*Math.sin(i/2);return 2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n))*6371},t.prototype.isMarkerInBounds=function(t,e){var s=t.getPosition();return!!s&&e.contains(s)},t.prototype.addToClosestCluster=function(t){for(var e,s=4e4,i=null,n=0,o=this.clusters;n<o.length;n++){var r=(e=o[n]).getCenter(),a=t.getPosition();if(r&&a){var l=this.distanceBetweenPoints(r,a);l<s&&(s=l,i=e)}}i&&i.isMarkerInClusterBounds(t)?i.addMarker(t):((e=new dt(this)).addMarker(t),this.clusters.push(e))},t.prototype.createClusters=function(t){var e=this;if(this.ready){0===t&&(google.maps.event.trigger(this,"clusteringbegin",this),null!==this.timerRefStatic&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var s=this.getMap(),i=(null!==s&&"getBounds"in s?s.getBounds():null),n=((null===s||void 0===s?void 0:s.getZoom())||0)>3?new google.maps.LatLngBounds(null===i||void 0===i?void 0:i.getSouthWest(),null===i||void 0===i?void 0:i.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),o=this.getExtendedBounds(n),r=Math.min(t+this.batchSize,this.markers.length),a=t;a<r;a++){var l=this.markers[a];l&&!l.isAdded&&this.isMarkerInBounds(l,o)&&(!this.ignoreHidden||this.ignoreHidden&&l.getVisible())&&this.addToClosestCluster(l)}if(r<this.markers.length)this.timerRefStatic=window.setTimeout((function(){e.createClusters(r)}),0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var h=0,p=this.clusters;h<p.length;h++){p[h].updateIcon()}}}},t.prototype.extend=function(t,e){return function(t){for(var e in t.prototype){var s=e;this.prototype[s]=t.prototype[s]}return this}.apply(t,[e])},t}();var ft={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},yt={averageCenter(t,e){t.setAverageCenter(e)},batchSizeIE(t,e){t.setBatchSizeIE(e)},calculator(t,e){t.setCalculator(e)},clusterClass(t,e){t.setClusterClass(e)},enableRetinaIcons(t,e){t.setEnableRetinaIcons(e)},gridSize(t,e){t.setGridSize(e)},ignoreHidden(t,e){t.setIgnoreHidden(e)},imageExtension(t,e){t.setImageExtension(e)},imagePath(t,e){t.setImagePath(e)},imageSizes(t,e){t.setImageSizes(e)},maxZoom(t,e){t.setMaxZoom(e)},minimumClusterSize(t,e){t.setMinimumClusterSize(e)},styles(t,e){t.setStyles(e)},title(t,e){t.setTitle(e)},zoomOnClick(t,e){t.setZoomOnClick(e)}};class bt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{markerClusterer:null}),p(this,"setClustererCallback",(()=>{null!==this.state.markerClusterer&&this.props.onLoad&&this.props.onLoad(this.state.markerClusterer)}))}componentDidMount(){if(this.context){var t=new vt(this.context,[],this.props.options);this.registeredEvents=y({updaterMap:yt,eventMap:ft,prevProps:{},nextProps:this.props,instance:t}),this.setState((()=>({markerClusterer:t})),this.setClustererCallback)}}componentDidUpdate(t){this.state.markerClusterer&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:yt,eventMap:ft,prevProps:t,nextProps:this.props,instance:this.state.markerClusterer}))}componentWillUnmount(){null!==this.state.markerClusterer&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),f(this.registeredEvents),this.state.markerClusterer.setMap(null))}render(){return null!==this.state.markerClusterer?this.props.children(this.state.markerClusterer):null}}function Ct(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}p(bt,"contextType",d);var xt=function(){function t(e){void 0===e&&(e={}),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.bind(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(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",""===e.closeBoxURL&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),"undefined"===typeof e.visible&&("undefined"===typeof e.isHidden?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var t=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 e=this.getPanes();if(null!==e&&e[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 s=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-s.left-s.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var i=0,n=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"];i<n.length;i++){var o=n[i];this.eventListeners.push(google.maps.event.addListener(this.div,o,Ct))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",(function(){t.div&&(t.div.style.cursor="default")})))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",(function(e){e.returnValue=!1,e.preventDefault&&e.preventDefault(),t.enableEventPropagation||Ct(e)})),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var t="";return""!==this.closeBoxURL&&(t='<img alt=""',t+=' aria-hidden="true"',t+=" src='"+this.closeBoxURL+"'",t+=" align=right",t+=" style='",t+=" position: relative;",t+=" cursor: pointer;",t+=" margin: "+this.closeBoxMargin+";",t+="'>"),t},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&""!==this.closeBoxURL?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(t){if(this.div&&!t){var e=this.getMap();if(e instanceof google.maps.Map){var s=0,i=0,n=e.getBounds();n&&!n.contains(this.position)&&e.setCenter(this.position);var o=e.getDiv(),r=o.offsetWidth,a=o.offsetHeight,l=this.pixelOffset.width,h=this.pixelOffset.height,p=this.div.offsetWidth,c=this.div.offsetHeight,u=this.infoBoxClearance.width,d=this.infoBoxClearance.height,g=this.getProjection().fromLatLngToContainerPixel(this.position);null!==g&&(g.x<-l+u?s=g.x+l-u:g.x+p+l+u>r&&(s=g.x+p+l+u-r),this.alignBottom?g.y<-h+d+c?i=g.y+h-d-c:g.y+h+d>a&&(i=g.y+h+d-a):g.y<-h+d?i=g.y+h-d:g.y+c+h+d>a&&(i=g.y+c+h+d-a)),0===s&&0===i||e.panBy(s,i)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var t=this.boxStyle;for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(this.div.style[e]=t[e]);if(this.div.style.webkitTransform="translateZ(0)","undefined"!==typeof this.div.style.opacity&&""!==this.div.style.opacity){var s=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*s+')"',this.div.style.filter="alpha(opacity="+100*s+")"}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")}},t.prototype.getBoxWidths=function(){var t={top:0,bottom:0,left:0,right:0};if(!this.div)return t;if(document.defaultView){var e=this.div.ownerDocument,s=e&&e.defaultView?e.defaultView.getComputedStyle(this.div,""):null;s&&(t.top=parseInt(s.borderTopWidth||"",10)||0,t.bottom=parseInt(s.borderBottomWidth||"",10)||0,t.left=parseInt(s.borderLeftWidth||"",10)||0,t.right=parseInt(s.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var i=this.div.currentStyle;i&&(t.top=parseInt(i.borderTopWidth||"",10)||0,t.bottom=parseInt(i.borderBottomWidth||"",10)||0,t.left=parseInt(i.borderLeftWidth||"",10)||0,t.right=parseInt(i.borderRightWidth||"",10)||0)}return t},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var t=this.getProjection().fromLatLngToDivPixel(this.position);null!==t&&(this.div.style.left=t.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(t.y+this.pixelOffset.height)+"px":this.div.style.top=t.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(t){void 0===t&&(t={}),"undefined"!==typeof t.boxClass&&(this.boxClass=t.boxClass,this.setBoxStyle()),"undefined"!==typeof t.boxStyle&&(this.boxStyle=t.boxStyle,this.setBoxStyle()),"undefined"!==typeof t.content&&this.setContent(t.content),"undefined"!==typeof t.disableAutoPan&&(this.disableAutoPan=t.disableAutoPan),"undefined"!==typeof t.maxWidth&&(this.maxWidth=t.maxWidth),"undefined"!==typeof t.pixelOffset&&(this.pixelOffset=t.pixelOffset),"undefined"!==typeof t.alignBottom&&(this.alignBottom=t.alignBottom),"undefined"!==typeof t.position&&this.setPosition(t.position),"undefined"!==typeof t.zIndex&&this.setZIndex(t.zIndex),"undefined"!==typeof t.closeBoxMargin&&(this.closeBoxMargin=t.closeBoxMargin),"undefined"!==typeof t.closeBoxURL&&(this.closeBoxURL=t.closeBoxURL),"undefined"!==typeof t.infoBoxClearance&&(this.infoBoxClearance=t.infoBoxClearance),"undefined"!==typeof t.isHidden&&(this.isHidden=t.isHidden),"undefined"!==typeof t.visible&&(this.isHidden=!t.visible),"undefined"!==typeof t.enableEventPropagation&&(this.enableEventPropagation=t.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(t){this.content=t,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),"string"===typeof t?this.div.innerHTML=this.getCloseBoxImg()+t:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(t)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px","string"===typeof t?this.div.innerHTML=this.getCloseBoxImg()+t:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(t))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(t){this.position=t,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(t){this.isHidden=!t,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(t){this.zIndex=t,this.div&&(this.div.style.zIndex=t+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var t=this.getMap();return"undefined"!==typeof t&&null!==t&&!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(t,e){var s=this;e&&(this.position=e.getPosition(),this.moveListener=google.maps.event.addListener(e,"position_changed",(function(){var t=e.getPosition();s.setPosition(t)})),this.mapListener=google.maps.event.addListener(e,"map_changed",(function(){s.setMap(e.map)}))),this.setMap(t),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var t=0,e=this.eventListeners;t<e.length;t++){var s=e[t];google.maps.event.removeListener(s)}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)},t.prototype.extend=function(t,e){return function(t){for(var e in t.prototype)Object.prototype.hasOwnProperty.call(this,e)||(this.prototype[e]=t.prototype[e]);return this}.apply(t,[e])},t}(),wt=["position"];function Pt(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function Mt(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?Pt(Object(s),!0).forEach((function(e){p(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):Pt(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}var Ot={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},kt={options(t,e){t.setOptions(e)},position(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible(t,e){t.setVisible(e)},zIndex(t,e){t.setZIndex(e)}};var Lt,Et;class St extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"containerElement",null),p(this,"state",{infoBox:null}),p(this,"open",((t,e)=>{e?null!==this.context&&t.open(this.context,e):t.getPosition()?null!==this.context&&t.open(this.context):u(!1,"You must provide either an anchor or a position prop for <InfoBox>.")})),p(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(){var t,e=this.props.options||{},{position:s}=e,i=T(e,wt);!s||s instanceof google.maps.LatLng||(t=new google.maps.LatLng(s.lat,s.lng));var n=new xt(Mt(Mt({},i),t?{position:t}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=y({updaterMap:kt,eventMap:Ot,prevProps:{},nextProps:this.props,instance:n}),this.setState({infoBox:n},this.setInfoBoxCallback)}componentDidUpdate(t){var{infoBox:e}=this.state;null!==e&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:kt,eventMap:Ot,prevProps:t,nextProps:this.props,instance:e}))}componentWillUnmount(){var{onUnmount:t}=this.props,{infoBox:e}=this.state;null!==e&&(t&&t(e),f(this.registeredEvents),e.close())}render(){return this.containerElement?(0,a.createPortal)(r.Children.only(this.props.children),this.containerElement):null}}p(St,"contextType",d);Et||(Et=1,Lt=function t(e,s){if(e===s)return!0;if(e&&s&&"object"==typeof e&&"object"==typeof s){if(e.constructor!==s.constructor)return!1;var i,n,o;if(Array.isArray(e)){if((i=e.length)!=s.length)return!1;for(n=i;0!==n--;)if(!t(e[n],s[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===s.source&&e.flags===s.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===s.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===s.toString();if((i=(o=Object.keys(e)).length)!==Object.keys(s).length)return!1;for(n=i;0!==n--;)if(!Object.prototype.hasOwnProperty.call(s,o[n]))return!1;for(n=i;0!==n--;){var r=o[n];if(!t(e[r],s[r]))return!1}return!0}return e!==e&&s!==s}),Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;var It;Math.fround||(It=new Float32Array(1));var jt;!function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"}(jt||(jt={}));var Dt={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Bt={options(t,e){t.setOptions(e)},position(t,e){t.setPosition(e)},zIndex(t,e){t.setZIndex(e)}};class Tt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"containerElement",null),p(this,"state",{infoWindow:null}),p(this,"open",((t,e)=>{e?t.open(this.context,e):t.getPosition()?t.open(this.context):u(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")})),p(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(){var t=new google.maps.InfoWindow(this.props.options);this.containerElement=document.createElement("div"),this.registeredEvents=y({updaterMap:Bt,eventMap:Dt,prevProps:{},nextProps:this.props,instance:t}),this.setState((()=>({infoWindow:t})),this.setInfoWindowCallback)}componentDidUpdate(t){null!==this.state.infoWindow&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:Bt,eventMap:Dt,prevProps:t,nextProps:this.props,instance:this.state.infoWindow}))}componentWillUnmount(){null!==this.state.infoWindow&&(f(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())}render(){return this.containerElement?(0,a.createPortal)(r.Children.only(this.props.children),this.containerElement):null}}function Rt(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function Ut(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?Rt(Object(s),!0).forEach((function(e){p(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):Rt(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}p(Tt,"contextType",d);var zt={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},At={draggable(t,e){t.setDraggable(e)},editable(t,e){t.setEditable(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},path(t,e){t.setPath(e)},visible(t,e){t.setVisible(e)}};class Wt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{polyline:null}),p(this,"setPolylineCallback",(()=>{null!==this.state.polyline&&this.props.onLoad&&this.props.onLoad(this.state.polyline)}))}componentDidMount(){var t=new google.maps.Polyline(Ut(Ut({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:At,eventMap:zt,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{polyline:t}}),this.setPolylineCallback)}componentDidUpdate(t){null!==this.state.polyline&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:At,eventMap:zt,prevProps:t,nextProps:this.props,instance:this.state.polyline}))}componentWillUnmount(){null!==this.state.polyline&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),f(this.registeredEvents),this.state.polyline.setMap(null))}render(){return null}}p(Wt,"contextType",d);var _t={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Vt={draggable(t,e){t.setDraggable(e)},editable(t,e){t.setEditable(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},path(t,e){t.setPath(e)},paths(t,e){t.setPaths(e)},visible(t,e){t.setVisible(e)}};class Ht extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[])}componentDidMount(){var t=this.props.options||{};this.polygon=new google.maps.Polygon(t),this.polygon.setMap(this.context),this.registeredEvents=y({updaterMap:Vt,eventMap:_t,prevProps:{},nextProps:this.props,instance:this.polygon}),this.props.onLoad&&this.props.onLoad(this.polygon)}componentDidUpdate(t){this.polygon&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:Vt,eventMap:_t,prevProps:t,nextProps:this.props,instance:this.polygon}))}componentWillUnmount(){this.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.polygon),f(this.registeredEvents),this.polygon&&this.polygon.setMap(null))}render(){return null}}function Nt(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function Zt(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?Nt(Object(s),!0).forEach((function(e){p(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):Nt(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}p(Ht,"contextType",d);var Gt={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"},Ft={bounds(t,e){t.setBounds(e)},draggable(t,e){t.setDraggable(e)},editable(t,e){t.setEditable(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},visible(t,e){t.setVisible(e)}};class Kt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{rectangle:null}),p(this,"setRectangleCallback",(()=>{null!==this.state.rectangle&&this.props.onLoad&&this.props.onLoad(this.state.rectangle)}))}componentDidMount(){var t=new google.maps.Rectangle(Zt(Zt({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:Ft,eventMap:Gt,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{rectangle:t}}),this.setRectangleCallback)}componentDidUpdate(t){null!==this.state.rectangle&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:Ft,eventMap:Gt,prevProps:t,nextProps:this.props,instance:this.state.rectangle}))}componentWillUnmount(){null!==this.state.rectangle&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),f(this.registeredEvents),this.state.rectangle.setMap(null))}render(){return null}}function Yt(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function qt(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?Yt(Object(s),!0).forEach((function(e){p(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):Yt(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}p(Kt,"contextType",d);var Jt={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"},$t={center(t,e){t.setCenter(e)},draggable(t,e){t.setDraggable(e)},editable(t,e){t.setEditable(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},radius(t,e){t.setRadius(e)},visible(t,e){t.setVisible(e)}};class Xt extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{circle:null}),p(this,"setCircleCallback",(()=>{null!==this.state.circle&&this.props.onLoad&&this.props.onLoad(this.state.circle)}))}componentDidMount(){var t=new google.maps.Circle(qt(qt({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:$t,eventMap:Jt,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{circle:t}}),this.setCircleCallback)}componentDidUpdate(t){null!==this.state.circle&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:$t,eventMap:Jt,prevProps:t,nextProps:this.props,instance:this.state.circle}))}componentWillUnmount(){var t;null!==this.state.circle&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),f(this.registeredEvents),null===(t=this.state.circle)||void 0===t||t.setMap(null))}render(){return null}}function Qt(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function te(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?Qt(Object(s),!0).forEach((function(e){p(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):Qt(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}p(Xt,"contextType",d);var ee={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},se={add(t,e){t.add(e)},addgeojson(t,e,s){t.addGeoJson(e,s)},contains(t,e){t.contains(e)},foreach(t,e){t.forEach(e)},loadgeojson(t,e,s,i){t.loadGeoJson(e,s,i)},overridestyle(t,e,s){t.overrideStyle(e,s)},remove(t,e){t.remove(e)},revertstyle(t,e){t.revertStyle(e)},controlposition(t,e){t.setControlPosition(e)},controls(t,e){t.setControls(e)},drawingmode(t,e){t.setDrawingMode(e)},map(t,e){t.setMap(e)},style(t,e){t.setStyle(e)},togeojson(t,e){t.toGeoJson(e)}};class ie extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{data:null}),p(this,"setDataCallback",(()=>{null!==this.state.data&&this.props.onLoad&&this.props.onLoad(this.state.data)}))}componentDidMount(){if(null!==this.context){var t=new google.maps.Data(te(te({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:se,eventMap:ee,prevProps:{},nextProps:this.props,instance:t}),this.setState((()=>({data:t})),this.setDataCallback)}}componentDidUpdate(t){null!==this.state.data&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:se,eventMap:ee,prevProps:t,nextProps:this.props,instance:this.state.data}))}componentWillUnmount(){null!==this.state.data&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),f(this.registeredEvents),this.state.data&&this.state.data.setMap(null))}render(){return null}}function ne(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function oe(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?ne(Object(s),!0).forEach((function(e){p(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):ne(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}p(ie,"contextType",d);var re={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},ae={options(t,e){t.setOptions(e)},url(t,e){t.setUrl(e)},zIndex(t,e){t.setZIndex(e)}};class le extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{kmlLayer:null}),p(this,"setKmlLayerCallback",(()=>{null!==this.state.kmlLayer&&this.props.onLoad&&this.props.onLoad(this.state.kmlLayer)}))}componentDidMount(){var t=new google.maps.KmlLayer(oe(oe({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:ae,eventMap:re,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{kmlLayer:t}}),this.setKmlLayerCallback)}componentDidUpdate(t){null!==this.state.kmlLayer&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:ae,eventMap:re,prevProps:t,nextProps:this.props,instance:this.state.kmlLayer}))}componentWillUnmount(){null!==this.state.kmlLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),f(this.registeredEvents),this.state.kmlLayer.setMap(null))}render(){return null}}function he(t,e){return"function"===typeof e?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function pe(t,e){return new e(t.lat,t.lng)}function ce(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function ue(t,e,s,i){return void 0!==s?function(t,e,s){var i=t&&t.fromLatLngToDivPixel(s.getNorthEast()),n=t&&t.fromLatLngToDivPixel(s.getSouthWest());return i&&n?{left:"".concat(n.x+e.x,"px"),top:"".concat(i.y+e.y,"px"),width:"".concat(i.x-n.x-e.x,"px"),height:"".concat(n.y-i.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}(t,e,(n=s,o=google.maps.LatLngBounds,r=ce,n instanceof o?n:r(n,o))):function(t,e,s){var i=t&&t.fromLatLngToDivPixel(s);if(i){var{x:n,y:o}=i;return{left:"".concat(n+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}(t,e,function(t,e,s){return t instanceof e?t:s(t,e)}(i,google.maps.LatLng,pe));var n,o,r}function de(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function ge(t){return t?(t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng))+"":""}function me(t){return t?(t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west)))+"":""}p(le,"contextType",d);class ve extends r.PureComponent{constructor(t){super(t),p(this,"state",{paneEl:null,containerStyle:{position:"absolute"}}),p(this,"updatePane",(()=>{var t=this.props.mapPaneName,e=this.overlayView.getPanes();u(!!t,"OverlayView requires props.mapPaneName but got %s",t),e?this.setState({paneEl:e[t]}):this.setState({paneEl:null})})),p(this,"onAdd",(()=>{var t,e;this.updatePane(),null===(t=(e=this.props).onLoad)||void 0===t||t.call(e,this.overlayView)})),p(this,"onPositionElement",(()=>{var t,e,s,i,n,o,r=this.overlayView.getProjection(),a=function(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?de(Object(s),!0).forEach((function(e){p(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):de(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}({x:0,y:0},this.containerRef.current?he(this.containerRef.current,this.props.getPixelPositionOffset):{}),l=ue(r,a,this.props.bounds,this.props.position);(n=l,o={left:this.state.containerStyle.left,top:this.state.containerStyle.top,width:this.state.containerStyle.width,height:this.state.containerStyle.height},n.left!==o.left||n.top!==o.top||n.width!==o.height||n.height!==o.height)&&this.setState({containerStyle:{top:null!==(t=l.top)&&void 0!==t?t:0,left:null!==(e=l.left)&&void 0!==e?e:0,width:null!==(s=l.width)&&void 0!==s?s:0,height:null!==(i=l.height)&&void 0!==i?i:0,position:"absolute"}})})),p(this,"draw",(()=>{this.onPositionElement()})),p(this,"onRemove",(()=>{var t,e;this.setState((()=>({paneEl:null}))),null===(t=(e=this.props).onUnmount)||void 0===t||t.call(e,this.overlayView)})),this.containerRef=(0,r.createRef)();var e=new google.maps.OverlayView;e.onAdd=this.onAdd,e.draw=this.draw,e.onRemove=this.onRemove,this.overlayView=e}componentDidMount(){this.overlayView.setMap(this.context)}componentDidUpdate(t){var e=ge(t.position),s=ge(this.props.position),i=me(t.bounds),n=me(this.props.bounds);e===s&&i===n||this.overlayView.draw(),t.mapPaneName!==this.props.mapPaneName&&this.updatePane()}componentWillUnmount(){this.overlayView.setMap(null)}render(){var t=this.state.paneEl;return t?a.createPortal((0,o.jsx)("div",{ref:this.containerRef,style:this.state.containerStyle,children:r.Children.only(this.props.children)}),t):null}}function fe(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function ye(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?fe(Object(s),!0).forEach((function(e){p(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):fe(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}p(ve,"FLOAT_PANE","floatPane"),p(ve,"MAP_PANE","mapPane"),p(ve,"MARKER_LAYER","markerLayer"),p(ve,"OVERLAY_LAYER","overlayLayer"),p(ve,"OVERLAY_MOUSE_TARGET","overlayMouseTarget"),p(ve,"contextType",d);var be={onDblClick:"dblclick",onClick:"click"},Ce={opacity(t,e){t.setOpacity(e)}};class xe extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{groundOverlay:null}),p(this,"setGroundOverlayCallback",(()=>{null!==this.state.groundOverlay&&this.props.onLoad&&this.props.onLoad(this.state.groundOverlay)}))}componentDidMount(){u(!!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");var t=new google.maps.GroundOverlay(this.props.url,this.props.bounds,ye(ye({},this.props.options),{},{map:this.context}));this.registeredEvents=y({updaterMap:Ce,eventMap:be,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{groundOverlay:t}}),this.setGroundOverlayCallback)}componentDidUpdate(t){null!==this.state.groundOverlay&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:Ce,eventMap:be,prevProps:t,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}}function we(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function Pe(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?we(Object(s),!0).forEach((function(e){p(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):we(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}p(xe,"defaultProps",{onLoad:function(){}}),p(xe,"contextType",d);var Me={},Oe={data(t,e){t.setData(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)}};class ke extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{heatmapLayer:null}),p(this,"setHeatmapLayerCallback",(()=>{null!==this.state.heatmapLayer&&this.props.onLoad&&this.props.onLoad(this.state.heatmapLayer)}))}componentDidMount(){u(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),u(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var t=new google.maps.visualization.HeatmapLayer(Pe(Pe({},this.props.options),{},{data:this.props.data,map:this.context}));this.registeredEvents=y({updaterMap:Oe,eventMap:Me,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{heatmapLayer:t}}),this.setHeatmapLayerCallback)}componentDidUpdate(t){f(this.registeredEvents),this.registeredEvents=y({updaterMap:Oe,eventMap:Me,prevProps:t,nextProps:this.props,instance:this.state.heatmapLayer})}componentWillUnmount(){null!==this.state.heatmapLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),f(this.registeredEvents),this.state.heatmapLayer.setMap(null))}render(){return null}}p(ke,"contextType",d);var Le={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Ee={register(t,e,s){t.registerPanoProvider(e,s)},links(t,e){t.setLinks(e)},motionTracking(t,e){t.setMotionTracking(e)},options(t,e){t.setOptions(e)},pano(t,e){t.setPano(e)},position(t,e){t.setPosition(e)},pov(t,e){t.setPov(e)},visible(t,e){t.setVisible(e)},zoom(t,e){t.setZoom(e)}};class Se extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{streetViewPanorama:null}),p(this,"setStreetViewPanoramaCallback",(()=>{null!==this.state.streetViewPanorama&&this.props.onLoad&&this.props.onLoad(this.state.streetViewPanorama)}))}componentDidMount(){var t,e,s=null!==(t=null===(e=this.context)||void 0===e?void 0:e.getStreetView())&&void 0!==t?t:null;this.registeredEvents=y({updaterMap:Ee,eventMap:Le,prevProps:{},nextProps:this.props,instance:s}),this.setState((()=>({streetViewPanorama:s})),this.setStreetViewPanoramaCallback)}componentDidUpdate(t){null!==this.state.streetViewPanorama&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:Ee,eventMap:Le,prevProps:t,nextProps:this.props,instance:this.state.streetViewPanorama}))}componentWillUnmount(){null!==this.state.streetViewPanorama&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),f(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))}render(){return null}}p(Se,"contextType",d);class Ie extends r.PureComponent{constructor(){super(...arguments),p(this,"state",{streetViewService:null}),p(this,"setStreetViewServiceCallback",(()=>{null!==this.state.streetViewService&&this.props.onLoad&&this.props.onLoad(this.state.streetViewService)}))}componentDidMount(){var t=new google.maps.StreetViewService;this.setState((function(){return{streetViewService:t}}),this.setStreetViewServiceCallback)}componentWillUnmount(){null!==this.state.streetViewService&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)}render(){return null}}p(Ie,"contextType",d);r.PureComponent;var je={onDirectionsChanged:"directions_changed"},De={directions(t,e){t.setDirections(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},panel(t,e){t.setPanel(e)},routeIndex(t,e){t.setRouteIndex(e)}};class Be extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"state",{directionsRenderer:null}),p(this,"setDirectionsRendererCallback",(()=>{null!==this.state.directionsRenderer&&(this.state.directionsRenderer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.directionsRenderer))}))}componentDidMount(){var t=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=y({updaterMap:De,eventMap:je,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{directionsRenderer:t}}),this.setDirectionsRendererCallback)}componentDidUpdate(t){null!==this.state.directionsRenderer&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:De,eventMap:je,prevProps:t,nextProps:this.props,instance:this.state.directionsRenderer}))}componentWillUnmount(){null!==this.state.directionsRenderer&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),f(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))}render(){return null}}p(Be,"contextType",d);r.PureComponent;var Te={onPlacesChanged:"places_changed"},Re={bounds(t,e){t.setBounds(e)}};class Ue extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"containerElement",(0,r.createRef)()),p(this,"state",{searchBox:null}),p(this,"setSearchBoxCallback",(()=>{null!==this.state.searchBox&&this.props.onLoad&&this.props.onLoad(this.state.searchBox)}))}componentDidMount(){if(u(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),null!==this.containerElement&&null!==this.containerElement.current){var t=this.containerElement.current.querySelector("input");if(null!==t){var e=new google.maps.places.SearchBox(t,this.props.options);this.registeredEvents=y({updaterMap:Re,eventMap:Te,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{searchBox:e}}),this.setSearchBoxCallback)}}}componentDidUpdate(t){null!==this.state.searchBox&&(f(this.registeredEvents),this.registeredEvents=y({updaterMap:Re,eventMap:Te,prevProps:t,nextProps:this.props,instance:this.state.searchBox}))}componentWillUnmount(){null!==this.state.searchBox&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),f(this.registeredEvents))}render(){return(0,o.jsx)("div",{ref:this.containerElement,children:r.Children.only(this.props.children)})}}p(Ue,"contextType",d);var ze={onPlaceChanged:"place_changed"},Ae={bounds(t,e){t.setBounds(e)},restrictions(t,e){t.setComponentRestrictions(e)},fields(t,e){t.setFields(e)},options(t,e){t.setOptions(e)},types(t,e){t.setTypes(e)}};class We extends r.PureComponent{constructor(){super(...arguments),p(this,"registeredEvents",[]),p(this,"containerElement",(0,r.createRef)()),p(this,"state",{autocomplete:null}),p(this,"setAutocompleteCallback",(()=>{null!==this.state.autocomplete&&this.props.onLoad&&this.props.onLoad(this.state.autocomplete)}))}componentDidMount(){var t;u(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var e=null===(t=this.containerElement.current)||void 0===t?void 0:t.querySelector("input");if(e){var s=new google.maps.places.Autocomplete(e,this.props.options);this.registeredEvents=y({updaterMap:Ae,eventMap:ze,prevProps:{},nextProps:this.props,instance:s}),this.setState((()=>({autocomplete:s})),this.setAutocompleteCallback)}}componentDidUpdate(t){f(this.registeredEvents),this.registeredEvents=y({updaterMap:Ae,eventMap:ze,prevProps:t,nextProps:this.props,instance:this.state.autocomplete})}componentWillUnmount(){null!==this.state.autocomplete&&f(this.registeredEvents)}render(){return(0,o.jsx)("div",{ref:this.containerElement,className:this.props.className,children:r.Children.only(this.props.children)})}}p(We,"defaultProps",{className:""}),p(We,"contextType",d)},68320:(t,e,s)=>{s.d(e,{I:()=>o});var i=s(48149),n=s(59363);function o(t,e){return(0,n.t)(t,i.$,e)}}}]); |