{"version":3,"sources":["webpack://@verndale/toolkit/./node_modules/fast-deep-equal/index.js","webpack://@verndale/toolkit/./node_modules/js-cookie/src/js.cookie.js","webpack://@verndale/toolkit/./node_modules/uuid/index.js","webpack://@verndale/toolkit/./node_modules/uuid/lib/bytesToUuid.js","webpack://@verndale/toolkit/./node_modules/uuid/lib/rng-browser.js","webpack://@verndale/toolkit/./node_modules/uuid/v1.js","webpack://@verndale/toolkit/./node_modules/uuid/v4.js","webpack://@verndale/toolkit/./node_modules/@vis.gl/react-google-maps/dist/index.modern.mjs"],"names":["module","equal","a","b","length","i","keys","key","factory","registeredInModuleLoader","OldCookies","api","extend","result","attributes","decode","s","init","converter","set","value","stringifiedAttributes","attributeName","get","json","jar","cookies","parts","cookie","name","v1","v4","uuid","byteToHex","bytesToUuid","buf","offset","bth","getRandomValues","rnds8","rnds","r","rng","_nodeId","_clockseq","_lastMSecs","_lastNSecs","options","node","clockseq","seedBytes","msecs","nsecs","dt","tl","tmh","n","ii","_extends","_objectWithoutPropertiesLoose","_toPrimitive","t","e","_toPropertyKey","APILoadingStatus","MAPS_API_BASE_URL","GoogleMapsApiLoader","params","onLoadingStatusChange","_window$google","libraries","serializedParams","librariesToLoad","apiPromise","loadApi","resolve","reject","_document$querySelect","scriptElement","urlParams","urlParamName","libraryName","fn","_excluded$3","_excluded2$1","DEFAULT_SOLUTION_CHANNEL","APIProviderContext","useMapInstances","mapInstances","setMapInstances","mapInstance","id","instances","_ref","useGoogleMapsApiLoader","props","onLoad","onError","apiKey","version","otherApiParams","status","setStatus","loadedLibraries","addLoadedLibrary","action","librariesString","importLibrary","_google","res","error","APIProvider","children","loaderProps","addMapInstance","removeMapInstance","clearMapInstances","contextValue","useMapEvents","map","propName","eventPropNames","handler","eventType","propNameToEventType","listener","ev","createMapEvent","type","srcEvent","cameraEventTypes","camEvent","center","zoom","heading","tilt","bounds","mouseEventTypes","_srcEvent$latLng","mouseEvent","useDeepCompareEffect","effect","deps","ref","mapOptionKeys","useMapOptions","mapProps","mapOptions","useApiLoadingStatus","_useContext","useDeckGLCameraUpdate","viewport","viewState","isDeckGlControlled","latitude","longitude","isLatLngLiteral","obj","latLngEquals","A","toLatLngLiteral","B","useMapCameraParams","cameraStateRef","lat","lng","nextCamera","needsUpdate","AuthFailureMessage","style","useCallbackRef","el","setEl","useApiIsLoaded","useForceUpdate","forceUpdate","x","handleBoundsChange","useTrackedCameraStateRef","_excluded$2","_excluded2","CachedMapStack","useMapInstance","context","apiIsLoaded","setMap","container","containerRef","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme","hasZoom","hasCenter","savedMapStateRef","mapId","cacheKey","mapDiv","padding","defBounds","savedMapId","savedCameraState","GoogleMapsContext","ColorScheme","RenderingType","Map","className","loadingStatus","mapRef","isControlledExternally","cameraOptions","_lat","_lng","_props$zoom","_props$heading","_props$tilt","combinedStyle","shownMessages","logErrorOnce","args","useMap","ctx","useMapsLibrary","useMapsEventListener","target","callback","usePropBinding","object","prop","useDomEventListener","isAdvancedMarker","marker","isElementNode","CollisionBehavior","AdvancedMarkerContext","AdvancedMarkerAnchorPoint","MarkerContent","styles","anchorPoint","xTranslation","yTranslation","transformStyle","useAdvancedMarker","setMarker","contentContainer","setContentContainer","markerLibrary","onClick","onMouseEnter","onMouseLeave","onDrag","onDragStart","onDragEnd","collisionBehavior","clickable","draggable","position","title","zIndex","numChildren","newMarker","contentElement","_contentElement","gmpClickable","AdvancedMarker","advancedMarkerContextValue","useAdvancedMarkerRef","m","setValueForStyles","element","prevStyles","elementStyle","styleName","setValueForStyle","isCustomProperty","isUnitlessNumber","unitlessNumbers","_excluded$1","InfoWindow","headerContent","pixelOffset","anchor","shouldFocus","onClose","onCloseClick","infoWindowOptions","mapsLibrary","infoWindow","setInfoWindow","contentContainerRef","headerContainerRef","opts","_contentContainerRef$","_headerContainerRef$c","prevStyleRef","isOpenedWithAnchor","openOptions","wrapper","wrapperBcr","_anchor$content$first","anchorDomContent","contentBcr","anchorOffsetX","anchorOffsetY","ControlPosition","MapControl","controlContainer","controls","controlsArray","index","_excluded","useMarker","onMouseOver","onMouseOut","markerOptions","gme","Marker","useMarkerRef","Pin","advancedMarker","glyphContainer","_advancedMarker$conte","pinViewOptions","pinElement","markerContent","mapLinear","a1","a2","b1","b2","getMapMaxTilt","limitTiltRange","pitch","gmZoom","maxTilt"],"mappings":"yHAMAA,EAAO,QAAU,SAASC,EAAMC,EAAGC,EAAG,CACpC,GAAID,IAAMC,EAAG,MAAO,GAEpB,GAAID,GAAKC,GAAK,OAAOD,GAAK,UAAY,OAAOC,GAAK,SAAU,CAC1D,GAAID,EAAE,cAAgBC,EAAE,YAAa,MAAO,GAE5C,IAAIC,EAAQC,EAAGC,EACf,GAAI,MAAM,QAAQJ,CAAC,EAAG,CAEpB,GADAE,EAASF,EAAE,OACPE,GAAUD,EAAE,OAAQ,MAAO,GAC/B,IAAKE,EAAID,EAAQC,MAAQ,GACvB,GAAI,CAACJ,EAAMC,EAAEG,GAAIF,EAAEE,EAAE,EAAG,MAAO,GACjC,MAAO,EACT,CAIA,GAAIH,EAAE,cAAgB,OAAQ,OAAOA,EAAE,SAAWC,EAAE,QAAUD,EAAE,QAAUC,EAAE,MAC5E,GAAID,EAAE,UAAY,OAAO,UAAU,QAAS,OAAOA,EAAE,QAAQ,IAAMC,EAAE,QAAQ,EAC7E,GAAID,EAAE,WAAa,OAAO,UAAU,SAAU,OAAOA,EAAE,SAAS,IAAMC,EAAE,SAAS,EAIjF,GAFAG,EAAO,OAAO,KAAKJ,CAAC,EACpBE,EAASE,EAAK,OACVF,IAAW,OAAO,KAAKD,CAAC,EAAE,OAAQ,MAAO,GAE7C,IAAKE,EAAID,EAAQC,MAAQ,GACvB,GAAI,CAAC,OAAO,UAAU,eAAe,KAAKF,EAAGG,EAAKD,EAAE,EAAG,MAAO,GAEhE,IAAKA,EAAID,EAAQC,MAAQ,GAAI,CAC3B,IAAIE,EAAMD,EAAKD,GAEf,GAAI,CAACJ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e,UAAY,OAASE,EAAwBA,EAAsB,aAAe,KAAO,OAASA,EAAsB,WACtL,KAAOG,GAAiB,MAAQA,EAAc,YAC5CA,EAAc,YAAYA,EAAc,UAAU,EAEhDA,GACFA,EAAc,YAAYD,EAAW,OAAO,CAEhD,EAAG,CAACJ,EAAgBC,EAAgBrO,CAAK,CAAC,EACnC,aAAaA,EAAM,SAAUqO,CAAc,CACpD,EAEMK,GAAY,CAACzJ,EAAG0J,EAAIC,EAAIC,EAAIC,IAAOD,GAAM5J,EAAI0J,IAAOG,EAAKD,IAAOD,EAAKD,GACrEI,GAAgBzM,GAChBA,GAAQ,GACH,GAELA,GAAQ,KACH,KAGLA,GAAQ,GACHoM,GAAUpM,EAAM,GAAI,GAAI,GAAI,EAAE,EAGhCoM,GAAUpM,EAAM,GAAI,KAAM,GAAI,IAAI,EAMrC0M,GAAiB,CAAC,CACtB,UAAAvL,CACF,IAAM,CACJ,MAAMwL,EAAQxL,EAAU,MAClByL,EAASzL,EAAU,KAAO,EAC1B0L,EAAUJ,GAAcG,CAAM,EACpC,OAAOvR,EAAS,CAAC,EAAG8F,EAAW,CAC7B,KAAM,GACN,MAAO,KAAK,IAAI0L,EAASF,CAAK,CAChC,CAAC,CACH,C","file":"Areas/SunriseSeniorLiving/Scripts/3957.0d40beb64c29c6fced48.bundle.js","sourcesContent":["'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","/*!\n * JavaScript Cookie v2.2.1\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n;(function (factory) {\n\tvar registeredInModuleLoader;\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(factory);\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (typeof exports === 'object') {\n\t\tmodule.exports = factory();\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (!registeredInModuleLoader) {\n\t\tvar OldCookies = window.Cookies;\n\t\tvar api = window.Cookies = factory();\n\t\tapi.noConflict = function () {\n\t\t\twindow.Cookies = OldCookies;\n\t\t\treturn api;\n\t\t};\n\t}\n}(function () {\n\tfunction extend () {\n\t\tvar i = 0;\n\t\tvar result = {};\n\t\tfor (; i < arguments.length; i++) {\n\t\t\tvar attributes = arguments[ i ];\n\t\t\tfor (var key in attributes) {\n\t\t\t\tresult[key] = attributes[key];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tfunction decode (s) {\n\t\treturn s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);\n\t}\n\n\tfunction init (converter) {\n\t\tfunction api() {}\n\n\t\tfunction set (key, value, attributes) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tattributes = extend({\n\t\t\t\tpath: '/'\n\t\t\t}, api.defaults, attributes);\n\n\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\tattributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);\n\t\t\t}\n\n\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\n\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n\n\t\t\ttry {\n\t\t\t\tvar result = JSON.stringify(value);\n\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\tvalue = result;\n\t\t\t\t}\n\t\t\t} catch (e) {}\n\n\t\t\tvalue = converter.write ?\n\t\t\t\tconverter.write(value, key) :\n\t\t\t\tencodeURIComponent(String(value))\n\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\n\t\t\tkey = encodeURIComponent(String(key))\n\t\t\t\t.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)\n\t\t\t\t.replace(/[\\(\\)]/g, escape);\n\n\t\t\tvar stringifiedAttributes = '';\n\t\t\tfor (var attributeName in attributes) {\n\t\t\t\tif (!attributes[attributeName]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tstringifiedAttributes += '; ' + attributeName;\n\t\t\t\tif (attributes[attributeName] === true) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Considers RFC 6265 section 5.2:\n\t\t\t\t// ...\n\t\t\t\t// 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n\t\t\t\t// character:\n\t\t\t\t// Consume the characters of the unparsed-attributes up to,\n\t\t\t\t// not including, the first %x3B (\";\") character.\n\t\t\t\t// ...\n\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n\t\t\t}\n\n\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\n\t\t}\n\n\t\tfunction get (key, json) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar jar = {};\n\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t// in case there are no cookies at all.\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\tvar i = 0;\n\n\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\tvar cookie = parts.slice(1).join('=');\n\n\t\t\t\tif (!json && cookie.charAt(0) === '\"') {\n\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tvar name = decode(parts[0]);\n\t\t\t\t\tcookie = (converter.read || converter)(cookie, name) ||\n\t\t\t\t\t\tdecode(cookie);\n\n\t\t\t\t\tif (json) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tjar[name] = cookie;\n\n\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\treturn key ? jar[key] : jar;\n\t\t}\n\n\t\tapi.set = set;\n\t\tapi.get = function (key) {\n\t\t\treturn get(key, false /* read as raw */);\n\t\t};\n\t\tapi.getJSON = function (key) {\n\t\t\treturn get(key, true /* read as json */);\n\t\t};\n\t\tapi.remove = function (key, attributes) {\n\t\t\tset(key, '', extend(attributes, {\n\t\t\t\texpires: -1\n\t\t\t}));\n\t\t};\n\n\t\tapi.defaults = {};\n\n\t\tapi.withConverter = init;\n\n\t\treturn api;\n\t}\n\n\treturn init(function () {});\n}));\n","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","import React, { useMemo, useState, useReducer, useCallback, useEffect, useRef, useContext, useLayoutEffect, forwardRef, useImperativeHandle, Children } from 'react';\nimport { createPortal } from 'react-dom';\nimport isDeepEqual from 'fast-deep-equal';\n\nfunction _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nfunction _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.includes(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nfunction _toPrimitive(t, r) {\n if (\"object\" != typeof t || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != typeof i) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n var i = _toPrimitive(t, \"string\");\n return \"symbol\" == typeof i ? i : i + \"\";\n}\n\nconst APILoadingStatus = {\n NOT_LOADED: 'NOT_LOADED',\n LOADING: 'LOADING',\n LOADED: 'LOADED',\n FAILED: 'FAILED',\n AUTH_FAILURE: 'AUTH_FAILURE'\n};\n\nconst MAPS_API_BASE_URL = 'https://maps.googleapis.com/maps/api/js';\n/**\n * A GoogleMapsApiLoader to reliably load and unload the Google Maps JavaScript API.\n *\n * The actual loading and unloading is delayed into the microtask queue, to\n * allow using the API in an useEffect hook, without worrying about multiple API loads.\n */\nclass GoogleMapsApiLoader {\n /**\n * Loads the Maps JavaScript API with the specified parameters.\n * Since the Maps library can only be loaded once per page, this will\n * produce a warning when called multiple times with different\n * parameters.\n *\n * The returned promise resolves when loading completes\n * and rejects in case of an error or when the loading was aborted.\n */\n static async load(params, onLoadingStatusChange) {\n var _window$google;\n const libraries = params.libraries ? params.libraries.split(',') : [];\n const serializedParams = this.serializeParams(params);\n this.listeners.push(onLoadingStatusChange);\n // Note: if `google.maps.importLibrary` has been defined externally, we\n // assume that loading is complete and successful.\n // If it was defined by a previous call to this method, a warning\n // message is logged if there are differences in api-parameters used\n // for both calls.\n if ((_window$google = window.google) != null && (_window$google = _window$google.maps) != null && _window$google.importLibrary) {\n // no serialized parameters means it was loaded externally\n if (!this.serializedApiParams) {\n this.loadingStatus = APILoadingStatus.LOADED;\n }\n this.notifyLoadingStatusListeners();\n } else {\n this.serializedApiParams = serializedParams;\n this.initImportLibrary(params);\n }\n if (this.serializedApiParams && this.serializedApiParams !== serializedParams) {\n console.warn(`[google-maps-api-loader] The maps API has already been loaded ` + `with different parameters and will not be loaded again. Refresh the ` + `page for new values to have effect.`);\n }\n const librariesToLoad = ['maps', ...libraries];\n await Promise.all(librariesToLoad.map(name => google.maps.importLibrary(name)));\n }\n /**\n * Serialize the paramters used to load the library for easier comparison.\n */\n static serializeParams(params) {\n return [params.v, params.key, params.language, params.region, params.authReferrerPolicy, params.solutionChannel].join('/');\n }\n /**\n * Creates the global `google.maps.importLibrary` function for bootstrapping.\n * This is essentially a formatted version of the dynamic loading script\n * from the official documentation with some minor adjustments.\n *\n * The created importLibrary function will load the Google Maps JavaScript API,\n * which will then replace the `google.maps.importLibrary` function with the full\n * implementation.\n *\n * @see https://developers.google.com/maps/documentation/javascript/load-maps-js-api#dynamic-library-import\n */\n static initImportLibrary(params) {\n if (!window.google) window.google = {};\n if (!window.google.maps) window.google.maps = {};\n if (window.google.maps['importLibrary']) {\n console.error('[google-maps-api-loader-internal]: initImportLibrary must only be called once');\n return;\n }\n let apiPromise = null;\n const loadApi = () => {\n if (apiPromise) return apiPromise;\n apiPromise = new Promise((resolve, reject) => {\n var _document$querySelect;\n const scriptElement = document.createElement('script');\n const urlParams = new URLSearchParams();\n for (const [key, value] of Object.entries(params)) {\n const urlParamName = key.replace(/[A-Z]/g, t => '_' + t[0].toLowerCase());\n urlParams.set(urlParamName, String(value));\n }\n urlParams.set('loading', 'async');\n urlParams.set('callback', '__googleMapsCallback__');\n scriptElement.async = true;\n scriptElement.src = MAPS_API_BASE_URL + `?` + urlParams.toString();\n scriptElement.nonce = ((_document$querySelect = document.querySelector('script[nonce]')) == null ? void 0 : _document$querySelect.nonce) || '';\n scriptElement.onerror = () => {\n this.loadingStatus = APILoadingStatus.FAILED;\n this.notifyLoadingStatusListeners();\n reject(new Error('The Google Maps JavaScript API could not load.'));\n };\n window.__googleMapsCallback__ = () => {\n this.loadingStatus = APILoadingStatus.LOADED;\n this.notifyLoadingStatusListeners();\n resolve();\n };\n window.gm_authFailure = () => {\n this.loadingStatus = APILoadingStatus.AUTH_FAILURE;\n this.notifyLoadingStatusListeners();\n };\n this.loadingStatus = APILoadingStatus.LOADING;\n this.notifyLoadingStatusListeners();\n document.head.append(scriptElement);\n });\n return apiPromise;\n };\n // for the first load, we declare an importLibrary function that will\n // be overwritten once the api is loaded.\n google.maps.importLibrary = libraryName => loadApi().then(() => google.maps.importLibrary(libraryName));\n }\n /**\n * Calls all registered loadingStatusListeners after a status update.\n */\n static notifyLoadingStatusListeners() {\n for (const fn of this.listeners) {\n fn(this.loadingStatus);\n }\n }\n}\n/**\n * The current loadingStatus of the API.\n */\nGoogleMapsApiLoader.loadingStatus = APILoadingStatus.NOT_LOADED;\n/**\n * The parameters used for first loading the API.\n */\nGoogleMapsApiLoader.serializedApiParams = void 0;\n/**\n * A list of functions to be notified when the loading status changes.\n */\nGoogleMapsApiLoader.listeners = [];\n\nconst _excluded$3 = [\"onLoad\", \"onError\", \"apiKey\", \"version\", \"libraries\"],\n _excluded2$1 = [\"children\"];\nconst DEFAULT_SOLUTION_CHANNEL = 'GMP_visgl_rgmlibrary_v1_default';\nconst APIProviderContext = React.createContext(null);\n/**\n * local hook to set up the map-instance management context.\n */\nfunction useMapInstances() {\n const [mapInstances, setMapInstances] = useState({});\n const addMapInstance = (mapInstance, id = 'default') => {\n setMapInstances(instances => _extends({}, instances, {\n [id]: mapInstance\n }));\n };\n const removeMapInstance = (id = 'default') => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n setMapInstances(_ref => {\n let remaining = _objectWithoutPropertiesLoose(_ref, [id].map(_toPropertyKey));\n return remaining;\n });\n };\n const clearMapInstances = () => {\n setMapInstances({});\n };\n return {\n mapInstances,\n addMapInstance,\n removeMapInstance,\n clearMapInstances\n };\n}\n/**\n * local hook to handle the loading of the maps API, returns the current loading status\n * @param props\n */\nfunction useGoogleMapsApiLoader(props) {\n const {\n onLoad,\n onError,\n apiKey,\n version,\n libraries = []\n } = props,\n otherApiParams = _objectWithoutPropertiesLoose(props, _excluded$3);\n const [status, setStatus] = useState(GoogleMapsApiLoader.loadingStatus);\n const [loadedLibraries, addLoadedLibrary] = useReducer((loadedLibraries, action) => {\n return loadedLibraries[action.name] ? loadedLibraries : _extends({}, loadedLibraries, {\n [action.name]: action.value\n });\n }, {});\n const librariesString = useMemo(() => libraries == null ? void 0 : libraries.join(','), [libraries]);\n const serializedParams = useMemo(() => JSON.stringify(_extends({\n apiKey,\n version\n }, otherApiParams)), [apiKey, version, otherApiParams]);\n const importLibrary = useCallback(async name => {\n var _google;\n if (loadedLibraries[name]) {\n return loadedLibraries[name];\n }\n if (!((_google = google) != null && (_google = _google.maps) != null && _google.importLibrary)) {\n throw new Error('[api-provider-internal] importLibrary was called before ' + 'google.maps.importLibrary was defined.');\n }\n const res = await window.google.maps.importLibrary(name);\n addLoadedLibrary({\n name,\n value: res\n });\n return res;\n }, [loadedLibraries]);\n useEffect(() => {\n (async () => {\n try {\n const params = _extends({\n key: apiKey\n }, otherApiParams);\n if (version) params.v = version;\n if ((librariesString == null ? void 0 : librariesString.length) > 0) params.libraries = librariesString;\n if (params.channel === undefined || params.channel < 0 || params.channel > 999) delete params.channel;\n if (params.solutionChannel === undefined) params.solutionChannel = DEFAULT_SOLUTION_CHANNEL;else if (params.solutionChannel === '') delete params.solutionChannel;\n await GoogleMapsApiLoader.load(params, status => setStatus(status));\n for (const name of ['core', 'maps', ...libraries]) {\n await importLibrary(name);\n }\n if (onLoad) {\n onLoad();\n }\n } catch (error) {\n if (onError) {\n onError(error);\n } else {\n console.error(' failed to load the Google Maps JavaScript API', error);\n }\n }\n })();\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [apiKey, librariesString, serializedParams]);\n return {\n status,\n loadedLibraries,\n importLibrary\n };\n}\n/**\n * Component to wrap the components from this library and load the Google Maps JavaScript API\n */\nconst APIProvider = props => {\n const {\n children\n } = props,\n loaderProps = _objectWithoutPropertiesLoose(props, _excluded2$1);\n const {\n mapInstances,\n addMapInstance,\n removeMapInstance,\n clearMapInstances\n } = useMapInstances();\n const {\n status,\n loadedLibraries,\n importLibrary\n } = useGoogleMapsApiLoader(loaderProps);\n const contextValue = useMemo(() => ({\n mapInstances,\n addMapInstance,\n removeMapInstance,\n clearMapInstances,\n status,\n loadedLibraries,\n importLibrary\n }), [mapInstances, addMapInstance, removeMapInstance, clearMapInstances, status, loadedLibraries, importLibrary]);\n return /*#__PURE__*/React.createElement(APIProviderContext.Provider, {\n value: contextValue\n }, children);\n};\n\n/**\n * Sets up effects to bind event-handlers for all event-props in MapEventProps.\n * @internal\n */\nfunction useMapEvents(map, props) {\n // note: calling a useEffect hook from within a loop is prohibited by the\n // rules of hooks, but it's ok here since it's unconditional and the number\n // and order of iterations is always strictly the same.\n // (see https://legacy.reactjs.org/docs/hooks-rules.html)\n for (const propName of eventPropNames) {\n // fixme: this cast is essentially a 'trust me, bro' for typescript, but\n // a proper solution seems way too complicated right now\n const handler = props[propName];\n const eventType = propNameToEventType[propName];\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(() => {\n if (!map) return;\n if (!handler) return;\n const listener = google.maps.event.addListener(map, eventType, ev => {\n handler(createMapEvent(eventType, map, ev));\n });\n return () => listener.remove();\n }, [map, eventType, handler]);\n }\n}\n/**\n * Create the wrapped map-events used for the event-props.\n * @param type the event type as it is specified to the maps api\n * @param map the map instance the event originates from\n * @param srcEvent the source-event if there is one.\n */\nfunction createMapEvent(type, map, srcEvent) {\n const ev = {\n type,\n map,\n detail: {},\n stoppable: false,\n stop: () => {}\n };\n if (cameraEventTypes.includes(type)) {\n const camEvent = ev;\n const center = map.getCenter();\n const zoom = map.getZoom();\n const heading = map.getHeading() || 0;\n const tilt = map.getTilt() || 0;\n const bounds = map.getBounds();\n if (!center || !bounds || !Number.isFinite(zoom)) {\n console.warn('[createEvent] at least one of the values from the map ' + 'returned undefined. This is not expected to happen. Please ' + 'report an issue at https://github.com/visgl/react-google-maps/issues/new');\n }\n camEvent.detail = {\n center: (center == null ? void 0 : center.toJSON()) || {\n lat: 0,\n lng: 0\n },\n zoom: zoom || 0,\n heading: heading,\n tilt: tilt,\n bounds: (bounds == null ? void 0 : bounds.toJSON()) || {\n north: 90,\n east: 180,\n south: -90,\n west: -180\n }\n };\n return camEvent;\n } else if (mouseEventTypes.includes(type)) {\n var _srcEvent$latLng;\n if (!srcEvent) throw new Error('[createEvent] mouse events must provide a srcEvent');\n const mouseEvent = ev;\n mouseEvent.domEvent = srcEvent.domEvent;\n mouseEvent.stoppable = true;\n mouseEvent.stop = () => srcEvent.stop();\n mouseEvent.detail = {\n latLng: ((_srcEvent$latLng = srcEvent.latLng) == null ? void 0 : _srcEvent$latLng.toJSON()) || null,\n placeId: srcEvent.placeId\n };\n return mouseEvent;\n }\n return ev;\n}\n/**\n * maps the camelCased names of event-props to the corresponding event-types\n * used in the maps API.\n */\nconst propNameToEventType = {\n onBoundsChanged: 'bounds_changed',\n onCenterChanged: 'center_changed',\n onClick: 'click',\n onContextmenu: 'contextmenu',\n onDblclick: 'dblclick',\n onDrag: 'drag',\n onDragend: 'dragend',\n onDragstart: 'dragstart',\n onHeadingChanged: 'heading_changed',\n onIdle: 'idle',\n onIsFractionalZoomEnabledChanged: 'isfractionalzoomenabled_changed',\n onMapCapabilitiesChanged: 'mapcapabilities_changed',\n onMapTypeIdChanged: 'maptypeid_changed',\n onMousemove: 'mousemove',\n onMouseout: 'mouseout',\n onMouseover: 'mouseover',\n onProjectionChanged: 'projection_changed',\n onRenderingTypeChanged: 'renderingtype_changed',\n onTilesLoaded: 'tilesloaded',\n onTiltChanged: 'tilt_changed',\n onZoomChanged: 'zoom_changed',\n // note: onCameraChanged is an alias for the bounds_changed event,\n // since that is going to be fired in every situation where the camera is\n // updated.\n onCameraChanged: 'bounds_changed'\n};\nconst cameraEventTypes = ['bounds_changed', 'center_changed', 'heading_changed', 'tilt_changed', 'zoom_changed'];\nconst mouseEventTypes = ['click', 'contextmenu', 'dblclick', 'mousemove', 'mouseout', 'mouseover'];\nconst eventPropNames = Object.keys(propNameToEventType);\n\nfunction useDeepCompareEffect(effect, deps) {\n const ref = useRef(undefined);\n if (!ref.current || !isDeepEqual(deps, ref.current)) {\n ref.current = deps;\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(effect, ref.current);\n}\n\nconst mapOptionKeys = new Set(['backgroundColor', 'clickableIcons', 'controlSize', 'disableDefaultUI', 'disableDoubleClickZoom', 'draggable', 'draggableCursor', 'draggingCursor', 'fullscreenControl', 'fullscreenControlOptions', 'gestureHandling', 'headingInteractionEnabled', 'isFractionalZoomEnabled', 'keyboardShortcuts', 'mapTypeControl', 'mapTypeControlOptions', 'mapTypeId', 'maxZoom', 'minZoom', 'noClear', 'panControl', 'panControlOptions', 'restriction', 'rotateControl', 'rotateControlOptions', 'scaleControl', 'scaleControlOptions', 'scrollwheel', 'streetView', 'streetViewControl', 'streetViewControlOptions', 'styles', 'tiltInteractionEnabled', 'zoomControl', 'zoomControlOptions']);\n/**\n * Internal hook to update the map-options when props are changed.\n *\n * @param map the map instance\n * @param mapProps the props to update the map-instance with\n * @internal\n */\nfunction useMapOptions(map, mapProps) {\n /* eslint-disable react-hooks/exhaustive-deps --\n *\n * The following effects aren't triggered when the map is changed.\n * In that case, the values will be or have been passed to the map\n * constructor via mapOptions.\n */\n const mapOptions = {};\n const keys = Object.keys(mapProps);\n for (const key of keys) {\n if (!mapOptionKeys.has(key)) continue;\n mapOptions[key] = mapProps[key];\n }\n // update the map options when mapOptions is changed\n // Note: due to the destructuring above, mapOptions will be seen as changed\n // with every re-render, so we're assuming the maps-api will properly\n // deal with unchanged option-values passed into setOptions.\n useDeepCompareEffect(() => {\n if (!map) return;\n map.setOptions(mapOptions);\n }, [mapOptions]);\n /* eslint-enable react-hooks/exhaustive-deps */\n}\n\nfunction useApiLoadingStatus() {\n var _useContext;\n return ((_useContext = useContext(APIProviderContext)) == null ? void 0 : _useContext.status) || APILoadingStatus.NOT_LOADED;\n}\n\n/**\n * Internal hook that updates the camera when deck.gl viewState changes.\n * @internal\n */\nfunction useDeckGLCameraUpdate(map, props) {\n const {\n viewport,\n viewState\n } = props;\n const isDeckGlControlled = !!viewport;\n useLayoutEffect(() => {\n if (!map || !viewState) return;\n const {\n latitude,\n longitude,\n bearing: heading,\n pitch: tilt,\n zoom\n } = viewState;\n map.moveCamera({\n center: {\n lat: latitude,\n lng: longitude\n },\n heading,\n tilt,\n zoom: zoom + 1\n });\n }, [map, viewState]);\n return isDeckGlControlled;\n}\n\nfunction isLatLngLiteral(obj) {\n if (!obj || typeof obj !== 'object') return false;\n if (!('lat' in obj && 'lng' in obj)) return false;\n return Number.isFinite(obj.lat) && Number.isFinite(obj.lng);\n}\nfunction latLngEquals(a, b) {\n if (!a || !b) return false;\n const A = toLatLngLiteral(a);\n const B = toLatLngLiteral(b);\n if (A.lat !== B.lat || A.lng !== B.lng) return false;\n return true;\n}\nfunction toLatLngLiteral(obj) {\n if (isLatLngLiteral(obj)) return obj;\n return obj.toJSON();\n}\n\nfunction useMapCameraParams(map, cameraStateRef, mapProps) {\n const center = mapProps.center ? toLatLngLiteral(mapProps.center) : null;\n let lat = null;\n let lng = null;\n if (center && Number.isFinite(center.lat) && Number.isFinite(center.lng)) {\n lat = center.lat;\n lng = center.lng;\n }\n const zoom = Number.isFinite(mapProps.zoom) ? mapProps.zoom : null;\n const heading = Number.isFinite(mapProps.heading) ? mapProps.heading : null;\n const tilt = Number.isFinite(mapProps.tilt) ? mapProps.tilt : null;\n // the following effect runs for every render of the map component and checks\n // if there are differences between the known state of the map instance\n // (cameraStateRef, which is updated by all bounds_changed events) and the\n // desired state in the props.\n useLayoutEffect(() => {\n if (!map) return;\n const nextCamera = {};\n let needsUpdate = false;\n if (lat !== null && lng !== null && (cameraStateRef.current.center.lat !== lat || cameraStateRef.current.center.lng !== lng)) {\n nextCamera.center = {\n lat,\n lng\n };\n needsUpdate = true;\n }\n if (zoom !== null && cameraStateRef.current.zoom !== zoom) {\n nextCamera.zoom = zoom;\n needsUpdate = true;\n }\n if (heading !== null && cameraStateRef.current.heading !== heading) {\n nextCamera.heading = heading;\n needsUpdate = true;\n }\n if (tilt !== null && cameraStateRef.current.tilt !== tilt) {\n nextCamera.tilt = tilt;\n needsUpdate = true;\n }\n if (needsUpdate) {\n map.moveCamera(nextCamera);\n }\n });\n}\n\nconst AuthFailureMessage = () => {\n const style = {\n position: 'absolute',\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n zIndex: 999,\n display: 'flex',\n flexFlow: 'column nowrap',\n textAlign: 'center',\n justifyContent: 'center',\n fontSize: '.8rem',\n color: 'rgba(0,0,0,0.6)',\n background: '#dddddd',\n padding: '1rem 1.5rem'\n };\n return /*#__PURE__*/React.createElement(\"div\", {\n style: style\n }, /*#__PURE__*/React.createElement(\"h2\", null, \"Error: AuthFailure\"), /*#__PURE__*/React.createElement(\"p\", null, \"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the \", /*#__PURE__*/React.createElement(\"code\", null, \"APIProvider.apiKey\"), \" prop is correct. Check the error-message in the console for further details.\"));\n};\n\nfunction useCallbackRef() {\n const [el, setEl] = useState(null);\n const ref = useCallback(value => setEl(value), [setEl]);\n return [el, ref];\n}\n\n/**\n * Hook to check if the Maps JavaScript API is loaded\n */\nfunction useApiIsLoaded() {\n const status = useApiLoadingStatus();\n return status === APILoadingStatus.LOADED;\n}\n\nfunction useForceUpdate() {\n const [, forceUpdate] = useReducer(x => x + 1, 0);\n return forceUpdate;\n}\n\nfunction handleBoundsChange(map, ref) {\n const center = map.getCenter();\n const zoom = map.getZoom();\n const heading = map.getHeading() || 0;\n const tilt = map.getTilt() || 0;\n const bounds = map.getBounds();\n if (!center || !bounds || !Number.isFinite(zoom)) {\n console.warn('[useTrackedCameraState] at least one of the values from the map ' + 'returned undefined. This is not expected to happen. Please ' + 'report an issue at https://github.com/visgl/react-google-maps/issues/new');\n }\n // fixme: do we need the `undefined` cases for the camera-params? When are they used in the maps API?\n Object.assign(ref.current, {\n center: (center == null ? void 0 : center.toJSON()) || {\n lat: 0,\n lng: 0\n },\n zoom: zoom || 0,\n heading: heading,\n tilt: tilt\n });\n}\n/**\n * Creates a mutable ref object to track the last known state of the map camera.\n * This is used in `useMapCameraParams` to reduce stuttering in normal operation\n * by avoiding updates of the map camera with values that have already been processed.\n */\nfunction useTrackedCameraStateRef(map) {\n const forceUpdate = useForceUpdate();\n const ref = useRef({\n center: {\n lat: 0,\n lng: 0\n },\n heading: 0,\n tilt: 0,\n zoom: 0\n });\n // Record camera state with every bounds_changed event dispatched by the map.\n // This data is used to prevent feeding these values back to the\n // map-instance when a typical \"controlled component\" setup (state variable is\n // fed into and updated by the map).\n useEffect(() => {\n if (!map) return;\n const listener = google.maps.event.addListener(map, 'bounds_changed', () => {\n handleBoundsChange(map, ref);\n // When an event is occured, we have to update during the next cycle.\n // The application could decide to ignore the event and not update any\n // camera props of the map, meaning that in that case we will have to\n // 'undo' the change to the camera.\n forceUpdate();\n });\n return () => listener.remove();\n }, [map, forceUpdate]);\n return ref;\n}\n\nconst _excluded$2 = [\"id\", \"defaultBounds\", \"defaultCenter\", \"defaultZoom\", \"defaultHeading\", \"defaultTilt\", \"reuseMaps\", \"renderingType\", \"colorScheme\"],\n _excluded2 = [\"padding\"];\n/**\n * Stores a stack of map-instances for each mapId. Whenever an\n * instance is used, it is removed from the stack while in use,\n * and returned to the stack when the component unmounts.\n * This allows us to correctly implement caching for multiple\n * maps om the same page, while reusing as much as possible.\n *\n * FIXME: while it should in theory be possible to reuse maps solely\n * based on the mapId (as all other parameters can be changed at\n * runtime), we don't yet have good enough tracking of options to\n * reliably unset all the options that have been set.\n */\nclass CachedMapStack {\n static has(key) {\n return this.entries[key] && this.entries[key].length > 0;\n }\n static pop(key) {\n if (!this.entries[key]) return null;\n return this.entries[key].pop() || null;\n }\n static push(key, value) {\n if (!this.entries[key]) this.entries[key] = [];\n this.entries[key].push(value);\n }\n}\n/**\n * The main hook takes care of creating map-instances and registering them in\n * the api-provider context.\n * @return a tuple of the map-instance created (or null) and the callback\n * ref that will be used to pass the map-container into this hook.\n * @internal\n */\nCachedMapStack.entries = {};\nfunction useMapInstance(props, context) {\n const apiIsLoaded = useApiIsLoaded();\n const [map, setMap] = useState(null);\n const [container, containerRef] = useCallbackRef();\n const cameraStateRef = useTrackedCameraStateRef(map);\n const {\n id,\n defaultBounds,\n defaultCenter,\n defaultZoom,\n defaultHeading,\n defaultTilt,\n reuseMaps,\n renderingType,\n colorScheme\n } = props,\n mapOptions = _objectWithoutPropertiesLoose(props, _excluded$2);\n const hasZoom = props.zoom !== undefined || props.defaultZoom !== undefined;\n const hasCenter = props.center !== undefined || props.defaultCenter !== undefined;\n if (!defaultBounds && (!hasZoom || !hasCenter)) {\n console.warn(' component is missing configuration. ' + 'You have to provide zoom and center (via the `zoom`/`defaultZoom` and ' + '`center`/`defaultCenter` props) or specify the region to show using ' + '`defaultBounds`. See ' + 'https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required');\n }\n // apply default camera props if available and not overwritten by controlled props\n if (!mapOptions.center && defaultCenter) mapOptions.center = defaultCenter;\n if (!mapOptions.zoom && Number.isFinite(defaultZoom)) mapOptions.zoom = defaultZoom;\n if (!mapOptions.heading && Number.isFinite(defaultHeading)) mapOptions.heading = defaultHeading;\n if (!mapOptions.tilt && Number.isFinite(defaultTilt)) mapOptions.tilt = defaultTilt;\n for (const key of Object.keys(mapOptions)) if (mapOptions[key] === undefined) delete mapOptions[key];\n const savedMapStateRef = useRef();\n // create the map instance and register it in the context\n useEffect(() => {\n if (!container || !apiIsLoaded) return;\n const {\n addMapInstance,\n removeMapInstance\n } = context;\n // note: colorScheme (upcoming feature) isn't yet in the typings, remove once that is fixed:\n const {\n mapId\n } = props;\n const cacheKey = `${mapId || 'default'}:${renderingType || 'default'}:${colorScheme || 'LIGHT'}`;\n let mapDiv;\n let map;\n if (reuseMaps && CachedMapStack.has(cacheKey)) {\n map = CachedMapStack.pop(cacheKey);\n mapDiv = map.getDiv();\n container.appendChild(mapDiv);\n map.setOptions(mapOptions);\n // detaching the element from the DOM lets the map fall back to its default\n // size, setting the center will trigger reloading the map.\n setTimeout(() => map.setCenter(map.getCenter()), 0);\n } else {\n mapDiv = document.createElement('div');\n mapDiv.style.height = '100%';\n container.appendChild(mapDiv);\n map = new google.maps.Map(mapDiv, _extends({}, mapOptions, renderingType ? {\n renderingType: renderingType\n } : {}, colorScheme ? {\n colorScheme: colorScheme\n } : {}));\n }\n setMap(map);\n addMapInstance(map, id);\n if (defaultBounds) {\n const {\n padding\n } = defaultBounds,\n defBounds = _objectWithoutPropertiesLoose(defaultBounds, _excluded2);\n map.fitBounds(defBounds, padding);\n }\n // prevent map not rendering due to missing configuration\n else if (!hasZoom || !hasCenter) {\n map.fitBounds({\n east: 180,\n west: -180,\n south: -90,\n north: 90\n });\n }\n // the savedMapState is used to restore the camera parameters when the mapId is changed\n if (savedMapStateRef.current) {\n const {\n mapId: savedMapId,\n cameraState: savedCameraState\n } = savedMapStateRef.current;\n if (savedMapId !== mapId) {\n map.setOptions(savedCameraState);\n }\n }\n return () => {\n savedMapStateRef.current = {\n mapId,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n cameraState: cameraStateRef.current\n };\n // detach the map-div from the dom\n mapDiv.remove();\n if (reuseMaps) {\n // push back on the stack\n CachedMapStack.push(cacheKey, map);\n } else {\n // remove all event-listeners to minimize the possibility of memory-leaks\n google.maps.event.clearInstanceListeners(map);\n }\n setMap(null);\n removeMapInstance(id);\n };\n },\n // some dependencies are ignored in the list below:\n // - defaultBounds and the default* camera props will only be used once, and\n // changes should be ignored\n // - mapOptions has special hooks that take care of updating the options\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [container, apiIsLoaded, id,\n // these props can't be changed after initialization and require a new\n // instance to be created\n props.mapId, props.renderingType, props.colorScheme]);\n return [map, containerRef, cameraStateRef];\n}\n\nconst GoogleMapsContext = React.createContext(null);\n// ColorScheme and RenderingType are redefined here to make them usable before the\n// maps API has been fully loaded.\nconst ColorScheme = {\n DARK: 'DARK',\n LIGHT: 'LIGHT',\n FOLLOW_SYSTEM: 'FOLLOW_SYSTEM'\n};\nconst RenderingType = {\n VECTOR: 'VECTOR',\n RASTER: 'RASTER',\n UNINITIALIZED: 'UNINITIALIZED'\n};\nconst Map = props => {\n const {\n children,\n id,\n className,\n style\n } = props;\n const context = useContext(APIProviderContext);\n const loadingStatus = useApiLoadingStatus();\n if (!context) {\n throw new Error(' can only be used inside an component.');\n }\n const [map, mapRef, cameraStateRef] = useMapInstance(props, context);\n useMapCameraParams(map, cameraStateRef, props);\n useMapEvents(map, props);\n useMapOptions(map, props);\n const isDeckGlControlled = useDeckGLCameraUpdate(map, props);\n const isControlledExternally = !!props.controlled;\n // disable interactions with the map for externally controlled maps\n useEffect(() => {\n if (!map) return;\n // fixme: this doesn't seem to belong here (and it's mostly there for convenience anyway).\n // The reasoning is that a deck.gl canvas will be put on top of the map, rendering\n // any default map controls pretty much useless\n if (isDeckGlControlled) {\n map.setOptions({\n disableDefaultUI: true\n });\n }\n // disable all control-inputs when the map is controlled externally\n if (isDeckGlControlled || isControlledExternally) {\n map.setOptions({\n gestureHandling: 'none',\n keyboardShortcuts: false\n });\n }\n return () => {\n map.setOptions({\n gestureHandling: props.gestureHandling,\n keyboardShortcuts: props.keyboardShortcuts\n });\n };\n }, [map, isDeckGlControlled, isControlledExternally, props.gestureHandling, props.keyboardShortcuts]);\n // setup a stable cameraOptions object that can be used as dependency\n const center = props.center ? toLatLngLiteral(props.center) : null;\n let lat = null;\n let lng = null;\n if (center && Number.isFinite(center.lat) && Number.isFinite(center.lng)) {\n lat = center.lat;\n lng = center.lng;\n }\n const cameraOptions = useMemo(() => {\n var _lat, _lng, _props$zoom, _props$heading, _props$tilt;\n return {\n center: {\n lat: (_lat = lat) != null ? _lat : 0,\n lng: (_lng = lng) != null ? _lng : 0\n },\n zoom: (_props$zoom = props.zoom) != null ? _props$zoom : 0,\n heading: (_props$heading = props.heading) != null ? _props$heading : 0,\n tilt: (_props$tilt = props.tilt) != null ? _props$tilt : 0\n };\n }, [lat, lng, props.zoom, props.heading, props.tilt]);\n // externally controlled mode: reject all camera changes that don't correspond to changes in props\n useLayoutEffect(() => {\n if (!map || !isControlledExternally) return;\n map.moveCamera(cameraOptions);\n const listener = map.addListener('bounds_changed', () => {\n map.moveCamera(cameraOptions);\n });\n return () => listener.remove();\n }, [map, isControlledExternally, cameraOptions]);\n const combinedStyle = useMemo(() => _extends({\n width: '100%',\n height: '100%',\n position: 'relative',\n // when using deckgl, the map should be sent to the back\n zIndex: isDeckGlControlled ? -1 : 0\n }, style), [style, isDeckGlControlled]);\n const contextValue = useMemo(() => ({\n map\n }), [map]);\n if (loadingStatus === APILoadingStatus.AUTH_FAILURE) {\n return /*#__PURE__*/React.createElement(\"div\", {\n style: _extends({\n position: 'relative'\n }, className ? {} : combinedStyle),\n className: className\n }, /*#__PURE__*/React.createElement(AuthFailureMessage, null));\n }\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: mapRef,\n \"data-testid\": 'map',\n style: className ? undefined : combinedStyle,\n className: className\n }, id ? {\n id\n } : {}), map ? /*#__PURE__*/React.createElement(GoogleMapsContext.Provider, {\n value: contextValue\n }, children) : null);\n};\nMap.deckGLViewProps = true;\n\nconst shownMessages = new Set();\nfunction logErrorOnce(...args) {\n const key = JSON.stringify(args);\n if (!shownMessages.has(key)) {\n shownMessages.add(key);\n console.error(...args);\n }\n}\n\n/**\n * Retrieves a map-instance from the context. This is either an instance\n * identified by id or the parent map instance if no id is specified.\n * Returns null if neither can be found.\n */\nconst useMap = (id = null) => {\n const ctx = useContext(APIProviderContext);\n const {\n map\n } = useContext(GoogleMapsContext) || {};\n if (ctx === null) {\n logErrorOnce('useMap(): failed to retrieve APIProviderContext. ' + 'Make sure that the component exists and that the ' + 'component you are calling `useMap()` from is a sibling of the ' + '.');\n return null;\n }\n const {\n mapInstances\n } = ctx;\n // if an id is specified, the corresponding map or null is returned\n if (id !== null) return mapInstances[id] || null;\n // otherwise, return the closest ancestor\n if (map) return map;\n // finally, return the default map instance\n return mapInstances['default'] || null;\n};\n\nfunction useMapsLibrary(name) {\n const apiIsLoaded = useApiIsLoaded();\n const ctx = useContext(APIProviderContext);\n useEffect(() => {\n if (!apiIsLoaded || !ctx) return;\n // Trigger loading the libraries via our proxy-method.\n // The returned promise is ignored, since importLibrary will update loadedLibraries\n // list in the context, triggering a re-render.\n void ctx.importLibrary(name);\n }, [apiIsLoaded, ctx, name]);\n return (ctx == null ? void 0 : ctx.loadedLibraries[name]) || null;\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Internally used to bind events to Maps JavaScript API objects.\n * @internal\n */\nfunction useMapsEventListener(target, name, callback) {\n useEffect(() => {\n if (!target || !name || !callback) return;\n const listener = google.maps.event.addListener(target, name, callback);\n return () => listener.remove();\n }, [target, name, callback]);\n}\n\n/**\n * Internally used to copy values from props into API-Objects\n * whenever they change.\n *\n * @example\n * usePropBinding(marker, 'position', position);\n *\n * @internal\n */\nfunction usePropBinding(object, prop, value) {\n useEffect(() => {\n if (!object) return;\n object[prop] = value;\n }, [object, prop, value]);\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Internally used to bind events to DOM nodes.\n * @internal\n */\nfunction useDomEventListener(target, name, callback) {\n useEffect(() => {\n if (!target || !name || !callback) return;\n target.addEventListener(name, callback);\n return () => target.removeEventListener(name, callback);\n }, [target, name, callback]);\n}\n\n/* eslint-disable complexity */\nfunction isAdvancedMarker(marker) {\n return marker.content !== undefined;\n}\nfunction isElementNode(node) {\n return node.nodeType === Node.ELEMENT_NODE;\n}\n/**\n * Copy of the `google.maps.CollisionBehavior` constants.\n * They have to be duplicated here since we can't wait for the maps API to load to be able to use them.\n */\nconst CollisionBehavior = {\n REQUIRED: 'REQUIRED',\n REQUIRED_AND_HIDES_OPTIONAL: 'REQUIRED_AND_HIDES_OPTIONAL',\n OPTIONAL_AND_HIDES_LOWER_PRIORITY: 'OPTIONAL_AND_HIDES_LOWER_PRIORITY'\n};\nconst AdvancedMarkerContext = React.createContext(null);\n// [xPosition, yPosition] when the top left corner is [0, 0]\nconst AdvancedMarkerAnchorPoint = {\n TOP_LEFT: ['0%', '0%'],\n TOP_CENTER: ['50%', '0%'],\n TOP: ['50%', '0%'],\n TOP_RIGHT: ['100%', '0%'],\n LEFT_CENTER: ['0%', '50%'],\n LEFT_TOP: ['0%', '0%'],\n LEFT: ['0%', '50%'],\n LEFT_BOTTOM: ['0%', '100%'],\n RIGHT_TOP: ['100%', '0%'],\n RIGHT: ['100%', '50%'],\n RIGHT_CENTER: ['100%', '50%'],\n RIGHT_BOTTOM: ['100%', '100%'],\n BOTTOM_LEFT: ['0%', '100%'],\n BOTTOM_CENTER: ['50%', '100%'],\n BOTTOM: ['50%', '100%'],\n BOTTOM_RIGHT: ['100%', '100%'],\n CENTER: ['50%', '50%']\n};\nconst MarkerContent = ({\n children,\n styles,\n className,\n anchorPoint\n}) => {\n const [xTranslation, yTranslation] = anchorPoint != null ? anchorPoint : AdvancedMarkerAnchorPoint['BOTTOM'];\n // The \"translate(50%, 100%)\" is here to counter and reset the default anchoring of the advanced marker element\n // that comes from the api\n const transformStyle = `translate(50%, 100%) translate(-${xTranslation}, -${yTranslation})`;\n return (\n /*#__PURE__*/\n // anchoring container\n React.createElement(\"div\", {\n style: {\n transform: transformStyle\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: className,\n style: styles\n }, children))\n );\n};\nfunction useAdvancedMarker(props) {\n const [marker, setMarker] = useState(null);\n const [contentContainer, setContentContainer] = useState(null);\n const map = useMap();\n const markerLibrary = useMapsLibrary('marker');\n const {\n children,\n onClick,\n className,\n onMouseEnter,\n onMouseLeave,\n onDrag,\n onDragStart,\n onDragEnd,\n collisionBehavior,\n clickable,\n draggable,\n position,\n title,\n zIndex\n } = props;\n const numChildren = Children.count(children);\n // create an AdvancedMarkerElement instance and add it to the map once available\n useEffect(() => {\n if (!map || !markerLibrary) return;\n const newMarker = new markerLibrary.AdvancedMarkerElement();\n newMarker.map = map;\n setMarker(newMarker);\n // create the container for marker content if there are children\n let contentElement = null;\n if (numChildren > 0) {\n contentElement = document.createElement('div');\n // We need some kind of flag to identify the custom marker content\n // in the infowindow component. Choosing a custom property instead of a className\n // to not encourage users to style the marker content directly.\n contentElement.isCustomMarker = true;\n newMarker.content = contentElement;\n setContentContainer(contentElement);\n }\n return () => {\n var _contentElement;\n newMarker.map = null;\n (_contentElement = contentElement) == null || _contentElement.remove();\n setMarker(null);\n setContentContainer(null);\n };\n }, [map, markerLibrary, numChildren]);\n // When no children are present we don't have our own wrapper div\n // which usually gets the user provided className. In this case\n // we set the className directly on the marker.content element that comes\n // with the AdvancedMarker.\n useEffect(() => {\n if (!marker || !marker.content || numChildren > 0) return;\n marker.content.className = className || '';\n }, [marker, className, numChildren]);\n // copy other props\n usePropBinding(marker, 'position', position);\n usePropBinding(marker, 'title', title != null ? title : '');\n usePropBinding(marker, 'zIndex', zIndex);\n usePropBinding(marker, 'collisionBehavior', collisionBehavior);\n // set gmpDraggable from props (when unspecified, it's true if any drag-event\n // callbacks are specified)\n useEffect(() => {\n if (!marker) return;\n if (draggable !== undefined) marker.gmpDraggable = draggable;else if (onDrag || onDragStart || onDragEnd) marker.gmpDraggable = true;else marker.gmpDraggable = false;\n }, [marker, draggable, onDrag, onDragEnd, onDragStart]);\n // set gmpClickable from props (when unspecified, it's true if the onClick or one of\n // the hover events callbacks are specified)\n useEffect(() => {\n if (!marker) return;\n const gmpClickable = clickable !== undefined || Boolean(onClick) || Boolean(onMouseEnter) || Boolean(onMouseLeave);\n // gmpClickable is only available in beta version of the\n // maps api (as of 2024-10-10)\n marker.gmpClickable = gmpClickable;\n // enable pointer events for the markers with custom content\n if (gmpClickable && marker != null && marker.content && isElementNode(marker.content)) {\n marker.content.style.pointerEvents = 'none';\n if (marker.content.firstElementChild) {\n marker.content.firstElementChild.style.pointerEvents = 'all';\n }\n }\n }, [marker, clickable, onClick, onMouseEnter, onMouseLeave]);\n useMapsEventListener(marker, 'click', onClick);\n useMapsEventListener(marker, 'drag', onDrag);\n useMapsEventListener(marker, 'dragstart', onDragStart);\n useMapsEventListener(marker, 'dragend', onDragEnd);\n useDomEventListener(marker == null ? void 0 : marker.element, 'mouseenter', onMouseEnter);\n useDomEventListener(marker == null ? void 0 : marker.element, 'mouseleave', onMouseLeave);\n return [marker, contentContainer];\n}\nconst AdvancedMarker = forwardRef((props, ref) => {\n const {\n children,\n style,\n className,\n anchorPoint\n } = props;\n const [marker, contentContainer] = useAdvancedMarker(props);\n const advancedMarkerContextValue = useMemo(() => marker ? {\n marker\n } : null, [marker]);\n useImperativeHandle(ref, () => marker, [marker]);\n if (!contentContainer) return null;\n return /*#__PURE__*/React.createElement(AdvancedMarkerContext.Provider, {\n value: advancedMarkerContextValue\n }, createPortal(/*#__PURE__*/React.createElement(MarkerContent, {\n anchorPoint: anchorPoint,\n styles: style,\n className: className\n }, children), contentContainer));\n});\nfunction useAdvancedMarkerRef() {\n const [marker, setMarker] = useState(null);\n const refCallback = useCallback(m => {\n setMarker(m);\n }, []);\n return [refCallback, marker];\n}\n\nfunction setValueForStyles(element, styles, prevStyles) {\n if (styles != null && typeof styles !== 'object') {\n throw new Error('The `style` prop expects a mapping from style properties to values, ' + \"not a string. For example, style={{marginRight: spacing + 'em'}} when \" + 'using JSX.');\n }\n const elementStyle = element.style;\n // without `prevStyles`, just set all values\n if (prevStyles == null) {\n if (styles == null) return;\n for (const styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) continue;\n setValueForStyle(elementStyle, styleName, styles[styleName]);\n }\n return;\n }\n // unset all styles in `prevStyles` that aren't in `styles`\n for (const styleName in prevStyles) {\n if (prevStyles.hasOwnProperty(styleName) && (styles == null || !styles.hasOwnProperty(styleName))) {\n // Clear style\n const isCustomProperty = styleName.indexOf('--') === 0;\n if (isCustomProperty) {\n elementStyle.setProperty(styleName, '');\n } else if (styleName === 'float') {\n elementStyle.cssFloat = '';\n } else {\n elementStyle[styleName] = '';\n }\n }\n }\n // only assign values from `styles` that are different from `prevStyles`\n if (styles == null) return;\n for (const styleName in styles) {\n const value = styles[styleName];\n if (styles.hasOwnProperty(styleName) && prevStyles[styleName] !== value) {\n setValueForStyle(elementStyle, styleName, value);\n }\n }\n}\nfunction setValueForStyle(elementStyle, styleName, value) {\n const isCustomProperty = styleName.indexOf('--') === 0;\n // falsy values will unset the style property\n if (value == null || typeof value === 'boolean' || value === '') {\n if (isCustomProperty) {\n elementStyle.setProperty(styleName, '');\n } else if (styleName === 'float') {\n elementStyle.cssFloat = '';\n } else {\n elementStyle[styleName] = '';\n }\n }\n // custom properties can't be directly assigned\n else if (isCustomProperty) {\n elementStyle.setProperty(styleName, value);\n }\n // numeric values are treated as 'px' unless the style property expects unitless numbers\n else if (typeof value === 'number' && value !== 0 && !isUnitlessNumber(styleName)) {\n elementStyle[styleName] = value + 'px'; // Presumes implicit 'px' suffix for unitless numbers\n }\n // everything else can just be assigned\n else {\n if (styleName === 'float') {\n elementStyle.cssFloat = value;\n } else {\n elementStyle[styleName] = ('' + value).trim();\n }\n }\n}\n// CSS properties which accept numbers but are not in units of \"px\".\nconst unitlessNumbers = new Set(['animationIterationCount', 'aspectRatio', 'borderImageOutset', 'borderImageSlice', 'borderImageWidth', 'boxFlex', 'boxFlexGroup', 'boxOrdinalGroup', 'columnCount', 'columns', 'flex', 'flexGrow', 'flexPositive', 'flexShrink', 'flexNegative', 'flexOrder', 'gridArea', 'gridRow', 'gridRowEnd', 'gridRowSpan', 'gridRowStart', 'gridColumn', 'gridColumnEnd', 'gridColumnSpan', 'gridColumnStart', 'fontWeight', 'lineClamp', 'lineHeight', 'opacity', 'order', 'orphans', 'scale', 'tabSize', 'widows', 'zIndex', 'zoom', 'fillOpacity',\n// SVG-related properties\n'floodOpacity', 'stopOpacity', 'strokeDasharray', 'strokeDashoffset', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth']);\nfunction isUnitlessNumber(name) {\n return unitlessNumbers.has(name);\n}\n\nconst _excluded$1 = [\"children\", \"headerContent\", \"style\", \"className\", \"pixelOffset\", \"anchor\", \"shouldFocus\", \"onClose\", \"onCloseClick\"];\n/**\n * Component to render an Info Window with the Maps JavaScript API\n */\nconst InfoWindow = props => {\n const {\n // content options\n children,\n headerContent,\n style,\n className,\n pixelOffset,\n // open options\n anchor,\n shouldFocus,\n // events\n onClose,\n onCloseClick\n // other options\n } = props,\n infoWindowOptions = _objectWithoutPropertiesLoose(props, _excluded$1);\n // ## create infowindow instance once the mapsLibrary is available.\n const mapsLibrary = useMapsLibrary('maps');\n const [infoWindow, setInfoWindow] = useState(null);\n const contentContainerRef = useRef(null);\n const headerContainerRef = useRef(null);\n useEffect(() => {\n if (!mapsLibrary) return;\n contentContainerRef.current = document.createElement('div');\n headerContainerRef.current = document.createElement('div');\n const opts = infoWindowOptions;\n if (pixelOffset) {\n opts.pixelOffset = new google.maps.Size(pixelOffset[0], pixelOffset[1]);\n }\n if (headerContent) {\n // if headerContent is specified as string we can directly forward it,\n // otherwise we'll pass the element the portal will render into\n opts.headerContent = typeof headerContent === 'string' ? headerContent : headerContainerRef.current;\n }\n // intentionally shadowing the state variables here\n const infoWindow = new google.maps.InfoWindow(infoWindowOptions);\n infoWindow.setContent(contentContainerRef.current);\n setInfoWindow(infoWindow);\n // unmount: remove infoWindow and content elements (note: close is called in a different effect-cleanup)\n return () => {\n var _contentContainerRef$, _headerContainerRef$c;\n infoWindow.setContent(null);\n (_contentContainerRef$ = contentContainerRef.current) == null || _contentContainerRef$.remove();\n (_headerContainerRef$c = headerContainerRef.current) == null || _headerContainerRef$c.remove();\n contentContainerRef.current = null;\n headerContainerRef.current = null;\n setInfoWindow(null);\n };\n },\n // `infoWindowOptions` and other props are missing from dependencies:\n //\n // We don't want to re-create the infowindow instance\n // when the options change.\n // Updating the options is handled in the useEffect below.\n //\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [mapsLibrary]);\n // ## update className and styles for `contentContainer`\n // stores previously applied style properties, so they can be removed when unset\n const prevStyleRef = useRef(null);\n useEffect(() => {\n if (!infoWindow || !contentContainerRef.current) return;\n setValueForStyles(contentContainerRef.current, style || null, prevStyleRef.current);\n prevStyleRef.current = style || null;\n if (className !== contentContainerRef.current.className) contentContainerRef.current.className = className || '';\n }, [infoWindow, className, style]);\n // ## update options\n useDeepCompareEffect(() => {\n if (!infoWindow) return;\n const opts = infoWindowOptions;\n if (!pixelOffset) {\n opts.pixelOffset = null;\n } else {\n opts.pixelOffset = new google.maps.Size(pixelOffset[0], pixelOffset[1]);\n }\n if (!headerContent) {\n opts.headerContent = null;\n } else {\n opts.headerContent = typeof headerContent === 'string' ? headerContent : headerContainerRef.current;\n }\n infoWindow.setOptions(infoWindowOptions);\n },\n // dependency `infoWindow` isn't needed since options are also passed\n // to the constructor when a new infoWindow is created.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [infoWindowOptions, pixelOffset, headerContent]);\n // ## bind event handlers\n useMapsEventListener(infoWindow, 'close', onClose);\n useMapsEventListener(infoWindow, 'closeclick', onCloseClick);\n // ## open info window when content and map are available\n const map = useMap();\n useEffect(() => {\n // `anchor === null` means an anchor is defined but not ready yet.\n if (!map || !infoWindow || anchor === null) return;\n const isOpenedWithAnchor = !!anchor;\n const openOptions = {\n map\n };\n if (anchor) {\n openOptions.anchor = anchor;\n // Only do the infowindow adjusting when dealing with an AdvancedMarker\n if (isAdvancedMarker(anchor) && anchor.content instanceof Element) {\n const wrapper = anchor.content;\n const wrapperBcr = wrapper == null ? void 0 : wrapper.getBoundingClientRect();\n // This checks whether or not the anchor has custom content with our own\n // div wrapper. If not, that means we have a regular AdvancedMarker without any children.\n // In that case we do not want to adjust the infowindow since it is all handled correctly\n // by the Google Maps API.\n if (wrapperBcr && wrapper != null && wrapper.isCustomMarker) {\n var _anchor$content$first;\n // We can safely typecast here since we control that element and we know that\n // it is a div\n const anchorDomContent = (_anchor$content$first = anchor.content.firstElementChild) == null ? void 0 : _anchor$content$first.firstElementChild;\n const contentBcr = anchorDomContent == null ? void 0 : anchorDomContent.getBoundingClientRect();\n // center infowindow above marker\n const anchorOffsetX = contentBcr.x - wrapperBcr.x + (contentBcr.width - wrapperBcr.width) / 2;\n const anchorOffsetY = contentBcr.y - wrapperBcr.y;\n const opts = infoWindowOptions;\n opts.pixelOffset = new google.maps.Size(pixelOffset ? pixelOffset[0] + anchorOffsetX : anchorOffsetX, pixelOffset ? pixelOffset[1] + anchorOffsetY : anchorOffsetY);\n infoWindow.setOptions(opts);\n }\n }\n }\n if (shouldFocus !== undefined) {\n openOptions.shouldFocus = shouldFocus;\n }\n infoWindow.open(openOptions);\n return () => {\n // Note: when the infowindow has an anchor, it will automatically show up again when the\n // anchor was removed from the map before infoWindow.close() is called but the it gets\n // added back to the map after that.\n // More information here: https://issuetracker.google.com/issues/343750849\n if (isOpenedWithAnchor) infoWindow.set('anchor', null);\n infoWindow.close();\n };\n }, [infoWindow, anchor, map, shouldFocus, infoWindowOptions, pixelOffset]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, contentContainerRef.current && createPortal(children, contentContainerRef.current), headerContainerRef.current !== null && createPortal(headerContent, headerContainerRef.current));\n};\n\n/**\n * Copy of the `google.maps.ControlPosition` constants.\n * They have to be duplicated here since we can't wait for the maps API to load to be able to use them.\n */\nconst ControlPosition = {\n TOP_LEFT: 1,\n TOP_CENTER: 2,\n TOP: 2,\n TOP_RIGHT: 3,\n LEFT_CENTER: 4,\n LEFT_TOP: 5,\n LEFT: 5,\n LEFT_BOTTOM: 6,\n RIGHT_TOP: 7,\n RIGHT: 7,\n RIGHT_CENTER: 8,\n RIGHT_BOTTOM: 9,\n BOTTOM_LEFT: 10,\n BOTTOM_CENTER: 11,\n BOTTOM: 11,\n BOTTOM_RIGHT: 12,\n CENTER: 13,\n BLOCK_START_INLINE_START: 14,\n BLOCK_START_INLINE_CENTER: 15,\n BLOCK_START_INLINE_END: 16,\n INLINE_START_BLOCK_CENTER: 17,\n INLINE_START_BLOCK_START: 18,\n INLINE_START_BLOCK_END: 19,\n INLINE_END_BLOCK_START: 20,\n INLINE_END_BLOCK_CENTER: 21,\n INLINE_END_BLOCK_END: 22,\n BLOCK_END_INLINE_START: 23,\n BLOCK_END_INLINE_CENTER: 24,\n BLOCK_END_INLINE_END: 25\n};\nconst MapControl = ({\n children,\n position\n}) => {\n const controlContainer = useMemo(() => document.createElement('div'), []);\n const map = useMap();\n useEffect(() => {\n if (!map) return;\n const controls = map.controls[position];\n controls.push(controlContainer);\n return () => {\n const controlsArray = controls.getArray();\n // controlsArray could be undefined if the map is in an undefined state (e.g. invalid API-key, see #276\n if (!controlsArray) return;\n const index = controlsArray.indexOf(controlContainer);\n controls.removeAt(index);\n };\n }, [controlContainer, map, position]);\n return createPortal(children, controlContainer);\n};\n\nconst _excluded = [\"onClick\", \"onDrag\", \"onDragStart\", \"onDragEnd\", \"onMouseOver\", \"onMouseOut\"];\nfunction useMarker(props) {\n const [marker, setMarker] = useState(null);\n const map = useMap();\n const {\n onClick,\n onDrag,\n onDragStart,\n onDragEnd,\n onMouseOver,\n onMouseOut\n } = props,\n markerOptions = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n position,\n draggable\n } = markerOptions;\n // create marker instance and add to the map once the map is available\n useEffect(() => {\n if (!map) {\n if (map === undefined) console.error(' has to be inside a Map component.');\n return;\n }\n const newMarker = new google.maps.Marker(markerOptions);\n newMarker.setMap(map);\n setMarker(newMarker);\n return () => {\n newMarker.setMap(null);\n setMarker(null);\n };\n // We do not want to re-render the whole marker when the options change.\n // Marker options update is handled in a useEffect below.\n // Excluding markerOptions from dependency array on purpose here.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [map]);\n // attach and re-attach event-handlers when any of the properties change\n useEffect(() => {\n if (!marker) return;\n const m = marker;\n // Add event listeners\n const gme = google.maps.event;\n if (onClick) gme.addListener(m, 'click', onClick);\n if (onDrag) gme.addListener(m, 'drag', onDrag);\n if (onDragStart) gme.addListener(m, 'dragstart', onDragStart);\n if (onDragEnd) gme.addListener(m, 'dragend', onDragEnd);\n if (onMouseOver) gme.addListener(m, 'mouseover', onMouseOver);\n if (onMouseOut) gme.addListener(m, 'mouseout', onMouseOut);\n marker.setDraggable(Boolean(draggable));\n return () => {\n gme.clearInstanceListeners(m);\n };\n }, [marker, draggable, onClick, onDrag, onDragStart, onDragEnd, onMouseOver, onMouseOut]);\n // update markerOptions (note the dependencies aren't properly checked\n // here, we just assume that setOptions is smart enough to not waste a\n // lot of time updating values that didn't change)\n useEffect(() => {\n if (!marker) return;\n if (markerOptions) marker.setOptions(markerOptions);\n }, [marker, markerOptions]);\n // update position when changed\n useEffect(() => {\n // Should not update position when draggable\n if (draggable || !position || !marker) return;\n marker.setPosition(position);\n }, [draggable, position, marker]);\n return marker;\n}\n/**\n * Component to render a marker on a map\n */\nconst Marker = forwardRef((props, ref) => {\n const marker = useMarker(props);\n useImperativeHandle(ref, () => marker, [marker]);\n return /*#__PURE__*/React.createElement(React.Fragment, null);\n});\nfunction useMarkerRef() {\n const [marker, setMarker] = useState(null);\n const refCallback = useCallback(m => {\n setMarker(m);\n }, []);\n return [refCallback, marker];\n}\n\n/**\n * Component to configure the appearance of an AdvancedMarker\n */\nconst Pin = props => {\n var _useContext;\n const advancedMarker = (_useContext = useContext(AdvancedMarkerContext)) == null ? void 0 : _useContext.marker;\n const glyphContainer = useMemo(() => document.createElement('div'), []);\n // Create Pin View instance\n useEffect(() => {\n var _advancedMarker$conte;\n if (!advancedMarker) {\n if (advancedMarker === undefined) {\n console.error('The component can only be used inside .');\n }\n return;\n }\n if (props.glyph && props.children) {\n logErrorOnce('The component only uses children to render the glyph if both the glyph property and children are present.');\n }\n if (Children.count(props.children) > 1) {\n logErrorOnce('Passing multiple children to the component might lead to unexpected results.');\n }\n const pinViewOptions = _extends({}, props);\n const pinElement = new google.maps.marker.PinElement(pinViewOptions);\n // Set glyph to glyph container if children are present (rendered via portal).\n // If both props.glyph and props.children are present, props.children takes priority.\n if (props.children) {\n pinElement.glyph = glyphContainer;\n }\n // Set content of Advanced Marker View to the Pin View element\n // Here we are selecting the anchor container.\n // The hierarchy is as follows:\n // \"advancedMarker.content\" (from google) -> \"pointer events reset div\" -> \"anchor container\"\n const markerContent = (_advancedMarker$conte = advancedMarker.content) == null || (_advancedMarker$conte = _advancedMarker$conte.firstChild) == null ? void 0 : _advancedMarker$conte.firstChild;\n while (markerContent != null && markerContent.firstChild) {\n markerContent.removeChild(markerContent.firstChild);\n }\n if (markerContent) {\n markerContent.appendChild(pinElement.element);\n }\n }, [advancedMarker, glyphContainer, props]);\n return createPortal(props.children, glyphContainer);\n};\n\nconst mapLinear = (x, a1, a2, b1, b2) => b1 + (x - a1) * (b2 - b1) / (a2 - a1);\nconst getMapMaxTilt = zoom => {\n if (zoom <= 10) {\n return 30;\n }\n if (zoom >= 15.5) {\n return 67.5;\n }\n // range [10...14]\n if (zoom <= 14) {\n return mapLinear(zoom, 10, 14, 30, 45);\n }\n // range [14...15.5]\n return mapLinear(zoom, 14, 15.5, 45, 67.5);\n};\n/**\n * Function to limit the tilt range of the Google map when updating the view state\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst limitTiltRange = ({\n viewState\n}) => {\n const pitch = viewState.pitch;\n const gmZoom = viewState.zoom + 1;\n const maxTilt = getMapMaxTilt(gmZoom);\n return _extends({}, viewState, {\n fovy: 25,\n pitch: Math.min(maxTilt, pitch)\n });\n};\n\nexport { APILoadingStatus, APIProvider, APIProviderContext, AdvancedMarker, AdvancedMarkerAnchorPoint, AdvancedMarkerContext, CollisionBehavior, ColorScheme, ControlPosition, GoogleMapsContext, InfoWindow, Map, MapControl, Marker, Pin, RenderingType, isAdvancedMarker, isLatLngLiteral, latLngEquals, limitTiltRange, toLatLngLiteral, useAdvancedMarkerRef, useApiIsLoaded, useApiLoadingStatus, useMap, useMapsLibrary, useMarkerRef };\n//# sourceMappingURL=index.modern.mjs.map\n"],"sourceRoot":""}