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7C,SAAS+6C,OAAS/6C,SAAS+6C,OAAOtmB,MAAM,MAAQ,GAC1DymB,EAAM,GACDv9C,EAAI,EAAGA,EAAIs9C,EAAQ78C,OAAQT,IAAK,CACvC,IAAIw9C,EAAQF,EAAQt9C,GAAG82B,MAAM,KACzBpiB,EAAQ8oC,EAAM30B,MAAM,GAAGzB,KAAK,KAEhC,IACE,IAAIq2B,EAAWT,mBAAmBQ,EAAM,IAGxC,GAFAD,EAAIE,GAAYf,EAAUgB,KAAKhpC,EAAO+oC,GAElC9zC,IAAQ8zC,EACV,MAEF,MAAOt+C,KAGX,OAAOwK,EAAM4zC,EAAI5zC,GAAO4zC,IAOtBt4B,OAAQ,SAAUtb,EAAKizC,GACrB38B,EACEtW,EACA,GACArJ,EAAO,GAAIs8C,EAAY,CACrBC,SAAU,MAIhBc,eAAgB,SAAUf,GACxB,OAAOH,EAAK17C,KAAK27C,UAAWp8C,EAAO,GAAIS,KAAK67C,WAAYA,KAE1DgB,cAAe,SAAUlB,GACvB,OAAOD,EAAKn8C,EAAO,GAAIS,KAAK27C,UAAWA,GAAY37C,KAAK67C,cAG5D,CACEA,WAAY,CAAEloC,MAAOrU,OAAOkM,OAAOowC,IACnCD,UAAW,CAAEhoC,MAAOrU,OAAOkM,OAAOmwC,MAK9BD,CApHa,CACrBiB,KAAM,SAAUhpC,GAId,MAHiB,MAAbA,EAAM,KACRA,EAAQA,EAAMmU,MAAM,GAAI,IAEnBnU,EAAMoI,QAAQ,mBAAoBkgC,qBAE3CK,MAAO,SAAU3oC,GACf,OAAOqoC,mBAAmBroC,GAAOoI,QAC/B,2CACAkgC,sBA0G2B,CAAEpM,KAAM","sources":["webpack://adjusters/./node_modules/compute-scroll-into-view/dist/index.module.js","webpack://adjusters/./node_modules/tslib/tslib.es6.js","webpack://adjusters/./node_modules/downshift/dist/downshift.esm.js","webpack://adjusters/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://adjusters/./node_modules/prop-types/index.js","webpack://adjusters/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://adjusters/./node_modules/react-is/cjs/react-is.production.min.js","webpack://adjusters/./node_modules/react-is/index.js","webpack://adjusters/./node_modules/@react-google-maps/api/dist/esm.js","webpack://adjusters/./node_modules/js-cookie/dist/js.cookie.mjs"],"sourcesContent":["function t(t){return\"object\"==typeof t&&null!=t&&1===t.nodeType}function e(t,e){return(!e||\"hidden\"!==t)&&\"visible\"!==t&&\"clip\"!==t}function n(t,n){if(t.clientHeighte||o>t&&l=e&&d>=n?o-t-r:l>e&&dn?l-e+i:0}export default function(e,i){var o=window,l=i.scrollMode,d=i.block,u=i.inline,h=i.boundary,a=i.skipOverflowHiddenElements,c=\"function\"==typeof h?h:function(t){return t!==h};if(!t(e))throw new TypeError(\"Invalid target\");for(var f=document.scrollingElement||document.documentElement,s=[],p=e;t(p)&&c(p);){if((p=p.parentElement)===f){s.push(p);break}null!=p&&p===document.body&&n(p)&&!n(document.documentElement)||null!=p&&n(p,a)&&s.push(p)}for(var m=o.visualViewport?o.visualViewport.width:innerWidth,g=o.visualViewport?o.visualViewport.height:innerHeight,w=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,W=e.getBoundingClientRect(),b=W.height,H=W.width,y=W.top,E=W.right,M=W.bottom,V=W.left,x=\"start\"===d||\"nearest\"===d?y:\"end\"===d?M:y+b/2,I=\"center\"===u?V+H/2:\"end\"===u?E:V,C=[],T=0;T=0&&V>=0&&M<=g&&E<=m&&y>=R&&M<=Y&&V>=L&&E<=X)return C;var S=getComputedStyle(k),j=parseInt(S.borderLeftWidth,10),q=parseInt(S.borderTopWidth,10),z=parseInt(S.borderRightWidth,10),A=parseInt(S.borderBottomWidth,10),F=0,G=0,J=\"offsetWidth\"in k?k.offsetWidth-k.clientWidth-j-z:0,K=\"offsetHeight\"in k?k.offsetHeight-k.clientHeight-q-A:0;if(f===k)F=\"start\"===d?x:\"end\"===d?x-g:\"nearest\"===d?r(v,v+g,g,q,A,v+x,v+x+b,b):x-g/2,G=\"start\"===u?I:\"center\"===u?I-m/2:\"end\"===u?I-m:r(w,w+m,m,j,z,w+I,w+I+H,H),F=Math.max(0,F+v),G=Math.max(0,G+w);else{F=\"start\"===d?x-R-q:\"end\"===d?x-Y+A+K:\"nearest\"===d?r(R,Y,D,q,A+K,x,x+b,b):x-(R+D/2)+K/2,G=\"start\"===u?I-L-j:\"center\"===u?I-(L+O/2)+J/2:\"end\"===u?I-X+z+J:r(L,X,O,j,z+J,I,I+H,H);var N=k.scrollLeft,P=k.scrollTop;x+=P-(F=Math.max(0,Math.min(P+F,k.scrollHeight-D+K))),I+=N-(G=Math.max(0,Math.min(N+G,k.scrollWidth-O+J)))}C.push({el:k,top:F,left:G})}return C}\n//# sourceMappingURL=index.module.js.map\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","import PropTypes from 'prop-types';\nimport { Component, cloneElement, useRef, useEffect, useCallback, useLayoutEffect, useReducer, useMemo } from 'react';\nimport { isForwardRef } from 'react-is';\nimport computeScrollIntoView from 'compute-scroll-into-view';\nimport { __assign } from 'tslib';\n\nlet idCounter = 0;\n\n/**\n * Accepts a parameter and returns it if it's a function\n * or a noop function if it's not. This allows us to\n * accept a callback, but not worry about it if it's not\n * passed.\n * @param {Function} cb the callback\n * @return {Function} a function\n */\nfunction cbToCb(cb) {\n return typeof cb === 'function' ? cb : noop;\n}\nfunction noop() {}\n\n/**\n * Scroll node into view if necessary\n * @param {HTMLElement} node the element that should scroll into view\n * @param {HTMLElement} menuNode the menu element of the component\n */\nfunction scrollIntoView(node, menuNode) {\n if (!node) {\n return;\n }\n const actions = computeScrollIntoView(node, {\n boundary: menuNode,\n block: 'nearest',\n scrollMode: 'if-needed'\n });\n actions.forEach(_ref => {\n let {\n el,\n top,\n left\n } = _ref;\n el.scrollTop = top;\n el.scrollLeft = left;\n });\n}\n\n/**\n * @param {HTMLElement} parent the parent node\n * @param {HTMLElement} child the child node\n * @param {Window} environment The window context where downshift renders.\n * @return {Boolean} whether the parent is the child or the child is in the parent\n */\nfunction isOrContainsNode(parent, child, environment) {\n const result = parent === child || child instanceof environment.Node && parent.contains && parent.contains(child);\n return result;\n}\n\n/**\n * Simple debounce implementation. Will call the given\n * function once after the time given has passed since\n * it was last called.\n * @param {Function} fn the function to call after the time\n * @param {Number} time the time to wait\n * @return {Function} the debounced function\n */\nfunction debounce(fn, time) {\n let timeoutId;\n function cancel() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n }\n function wrapper() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n cancel();\n timeoutId = setTimeout(() => {\n timeoutId = null;\n fn(...args);\n }, time);\n }\n wrapper.cancel = cancel;\n return wrapper;\n}\n\n/**\n * This is intended to be used to compose event handlers.\n * They are executed in order until one of them sets\n * `event.preventDownshiftDefault = true`.\n * @param {...Function} fns the event handler functions\n * @return {Function} the event handler to add to an element\n */\nfunction callAllEventHandlers() {\n for (var _len2 = arguments.length, fns = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n fns[_key2] = arguments[_key2];\n }\n return function (event) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n return fns.some(fn => {\n if (fn) {\n fn(event, ...args);\n }\n return event.preventDownshiftDefault || event.hasOwnProperty('nativeEvent') && event.nativeEvent.preventDownshiftDefault;\n });\n };\n}\nfunction handleRefs() {\n for (var _len4 = arguments.length, refs = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n refs[_key4] = arguments[_key4];\n }\n return node => {\n refs.forEach(ref => {\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n });\n };\n}\n\n/**\n * This generates a unique ID for an instance of Downshift\n * @return {String} the unique ID\n */\nfunction generateId() {\n return String(idCounter++);\n}\n\n/**\n * Resets idCounter to 0. Used for SSR.\n */\nfunction resetIdCounter() {\n idCounter = 0;\n}\n\n/**\n * Default implementation for status message. Only added when menu is open.\n * Will specify if there are results in the list, and if so, how many,\n * and what keys are relevant.\n *\n * @param {Object} param the downshift state and other relevant properties\n * @return {String} the a11y status message\n */\nfunction getA11yStatusMessage$1(_ref2) {\n let {\n isOpen,\n resultCount,\n previousResultCount\n } = _ref2;\n if (!isOpen) {\n return '';\n }\n if (!resultCount) {\n return 'No results are available.';\n }\n if (resultCount !== previousResultCount) {\n return `${resultCount} result${resultCount === 1 ? ' is' : 's are'} available, use up and down arrow keys to navigate. Press Enter key to select.`;\n }\n return '';\n}\n\n/**\n * Takes an argument and if it's an array, returns the first item in the array\n * otherwise returns the argument\n * @param {*} arg the maybe-array\n * @param {*} defaultValue the value if arg is falsey not defined\n * @return {*} the arg or it's first item\n */\nfunction unwrapArray(arg, defaultValue) {\n arg = Array.isArray(arg) ? /* istanbul ignore next (preact) */arg[0] : arg;\n if (!arg && defaultValue) {\n return defaultValue;\n } else {\n return arg;\n }\n}\n\n/**\n * @param {Object} element (P)react element\n * @return {Boolean} whether it's a DOM element\n */\nfunction isDOMElement(element) {\n\n // then we assume this is react\n return typeof element.type === 'string';\n}\n\n/**\n * @param {Object} element (P)react element\n * @return {Object} the props\n */\nfunction getElementProps(element) {\n return element.props;\n}\n\n/**\n * Throws a helpful error message for required properties. Useful\n * to be used as a default in destructuring or object params.\n * @param {String} fnName the function name\n * @param {String} propName the prop name\n */\nfunction requiredProp(fnName, propName) {\n // eslint-disable-next-line no-console\n console.error(`The property \"${propName}\" is required in \"${fnName}\"`);\n}\nconst stateKeys = ['highlightedIndex', 'inputValue', 'isOpen', 'selectedItem', 'type'];\n/**\n * @param {Object} state the state object\n * @return {Object} state that is relevant to downshift\n */\nfunction pickState(state) {\n if (state === void 0) {\n state = {};\n }\n const result = {};\n stateKeys.forEach(k => {\n if (state.hasOwnProperty(k)) {\n result[k] = state[k];\n }\n });\n return result;\n}\n\n/**\n * This will perform a shallow merge of the given state object\n * with the state coming from props\n * (for the controlled component scenario)\n * This is used in state updater functions so they're referencing\n * the right state regardless of where it comes from.\n *\n * @param {Object} state The state of the component/hook.\n * @param {Object} props The props that may contain controlled values.\n * @returns {Object} The merged controlled state.\n */\nfunction getState(state, props) {\n return Object.keys(state).reduce((prevState, key) => {\n prevState[key] = isControlledProp(props, key) ? props[key] : state[key];\n return prevState;\n }, {});\n}\n\n/**\n * This determines whether a prop is a \"controlled prop\" meaning it is\n * state which is controlled by the outside of this component rather\n * than within this component.\n *\n * @param {Object} props The props that may contain controlled values.\n * @param {String} key the key to check\n * @return {Boolean} whether it is a controlled controlled prop\n */\nfunction isControlledProp(props, key) {\n return props[key] !== undefined;\n}\n\n/**\n * Normalizes the 'key' property of a KeyboardEvent in IE/Edge\n * @param {Object} event a keyboardEvent object\n * @return {String} keyboard key\n */\nfunction normalizeArrowKey(event) {\n const {\n key,\n keyCode\n } = event;\n /* istanbul ignore next (ie) */\n if (keyCode >= 37 && keyCode <= 40 && key.indexOf('Arrow') !== 0) {\n return `Arrow${key}`;\n }\n return key;\n}\n\n/**\n * Simple check if the value passed is object literal\n * @param {*} obj any things\n * @return {Boolean} whether it's object literal\n */\nfunction isPlainObject(obj) {\n return Object.prototype.toString.call(obj) === '[object Object]';\n}\n\n/**\n * Returns the new index in the list, in a circular way. If next value is out of bonds from the total,\n * it will wrap to either 0 or itemCount - 1.\n *\n * @param {number} moveAmount Number of positions to move. Negative to move backwards, positive forwards.\n * @param {number} baseIndex The initial position to move from.\n * @param {number} itemCount The total number of items.\n * @param {Function} getItemNodeFromIndex Used to check if item is disabled.\n * @param {boolean} circular Specify if navigation is circular. Default is true.\n * @returns {number} The new index after the move.\n */\nfunction getNextWrappingIndex(moveAmount, baseIndex, itemCount, getItemNodeFromIndex, circular) {\n if (circular === void 0) {\n circular = true;\n }\n if (itemCount === 0) {\n return -1;\n }\n const itemsLastIndex = itemCount - 1;\n if (typeof baseIndex !== 'number' || baseIndex < 0 || baseIndex >= itemCount) {\n baseIndex = moveAmount > 0 ? -1 : itemsLastIndex + 1;\n }\n let newIndex = baseIndex + moveAmount;\n if (newIndex < 0) {\n newIndex = circular ? itemsLastIndex : 0;\n } else if (newIndex > itemsLastIndex) {\n newIndex = circular ? 0 : itemsLastIndex;\n }\n const nonDisabledNewIndex = getNextNonDisabledIndex(moveAmount, newIndex, itemCount, getItemNodeFromIndex, circular);\n if (nonDisabledNewIndex === -1) {\n return baseIndex >= itemCount ? -1 : baseIndex;\n }\n return nonDisabledNewIndex;\n}\n\n/**\n * Returns the next index in the list of an item that is not disabled.\n *\n * @param {number} moveAmount Number of positions to move. Negative to move backwards, positive forwards.\n * @param {number} baseIndex The initial position to move from.\n * @param {number} itemCount The total number of items.\n * @param {Function} getItemNodeFromIndex Used to check if item is disabled.\n * @param {boolean} circular Specify if navigation is circular. Default is true.\n * @returns {number} The new index. Returns baseIndex if item is not disabled. Returns next non-disabled item otherwise. If no non-disabled found it will return -1.\n */\nfunction getNextNonDisabledIndex(moveAmount, baseIndex, itemCount, getItemNodeFromIndex, circular) {\n const currentElementNode = getItemNodeFromIndex(baseIndex);\n if (!currentElementNode || !currentElementNode.hasAttribute('disabled')) {\n return baseIndex;\n }\n if (moveAmount > 0) {\n for (let index = baseIndex + 1; index < itemCount; index++) {\n if (!getItemNodeFromIndex(index).hasAttribute('disabled')) {\n return index;\n }\n }\n } else {\n for (let index = baseIndex - 1; index >= 0; index--) {\n if (!getItemNodeFromIndex(index).hasAttribute('disabled')) {\n return index;\n }\n }\n }\n if (circular) {\n return moveAmount > 0 ? getNextNonDisabledIndex(1, 0, itemCount, getItemNodeFromIndex, false) : getNextNonDisabledIndex(-1, itemCount - 1, itemCount, getItemNodeFromIndex, false);\n }\n return -1;\n}\n\n/**\n * Checks if event target is within the downshift elements.\n *\n * @param {EventTarget} target Target to check.\n * @param {HTMLElement[]} downshiftElements The elements that form downshift (list, toggle button etc).\n * @param {Window} environment The window context where downshift renders.\n * @param {boolean} checkActiveElement Whether to also check activeElement.\n *\n * @returns {boolean} Whether or not the target is within downshift elements.\n */\nfunction targetWithinDownshift(target, downshiftElements, environment, checkActiveElement) {\n if (checkActiveElement === void 0) {\n checkActiveElement = true;\n }\n return downshiftElements.some(contextNode => contextNode && (isOrContainsNode(contextNode, target, environment) || checkActiveElement && isOrContainsNode(contextNode, environment.document.activeElement, environment)));\n}\n\n// eslint-disable-next-line import/no-mutable-exports\nlet validateControlledUnchanged = noop;\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n validateControlledUnchanged = (state, prevProps, nextProps) => {\n const warningDescription = `This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props`;\n Object.keys(state).forEach(propKey => {\n if (prevProps[propKey] !== undefined && nextProps[propKey] === undefined) {\n // eslint-disable-next-line no-console\n console.error(`downshift: A component has changed the controlled prop \"${propKey}\" to be uncontrolled. ${warningDescription}`);\n } else if (prevProps[propKey] === undefined && nextProps[propKey] !== undefined) {\n // eslint-disable-next-line no-console\n console.error(`downshift: A component has changed the uncontrolled prop \"${propKey}\" to be controlled. ${warningDescription}`);\n }\n });\n };\n}\n\nconst cleanupStatus = debounce(documentProp => {\n getStatusDiv(documentProp).textContent = '';\n}, 500);\n\n/**\n * @param {String} status the status message\n * @param {Object} documentProp document passed by the user.\n */\nfunction setStatus(status, documentProp) {\n const div = getStatusDiv(documentProp);\n if (!status) {\n return;\n }\n div.textContent = status;\n cleanupStatus(documentProp);\n}\n\n/**\n * Get the status node or create it if it does not already exist.\n * @param {Object} documentProp document passed by the user.\n * @return {HTMLElement} the status node.\n */\nfunction getStatusDiv(documentProp) {\n if (documentProp === void 0) {\n documentProp = document;\n }\n let statusDiv = documentProp.getElementById('a11y-status-message');\n if (statusDiv) {\n return statusDiv;\n }\n statusDiv = documentProp.createElement('div');\n statusDiv.setAttribute('id', 'a11y-status-message');\n statusDiv.setAttribute('role', 'status');\n statusDiv.setAttribute('aria-live', 'polite');\n statusDiv.setAttribute('aria-relevant', 'additions text');\n Object.assign(statusDiv.style, {\n border: '0',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0',\n position: 'absolute',\n width: '1px'\n });\n documentProp.body.appendChild(statusDiv);\n return statusDiv;\n}\n\nconst unknown = process.env.NODE_ENV !== \"production\" ? '__autocomplete_unknown__' : 0;\nconst mouseUp = process.env.NODE_ENV !== \"production\" ? '__autocomplete_mouseup__' : 1;\nconst itemMouseEnter = process.env.NODE_ENV !== \"production\" ? '__autocomplete_item_mouseenter__' : 2;\nconst keyDownArrowUp = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_arrow_up__' : 3;\nconst keyDownArrowDown = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_arrow_down__' : 4;\nconst keyDownEscape = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_escape__' : 5;\nconst keyDownEnter = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_enter__' : 6;\nconst keyDownHome = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_home__' : 7;\nconst keyDownEnd = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_end__' : 8;\nconst clickItem = process.env.NODE_ENV !== \"production\" ? '__autocomplete_click_item__' : 9;\nconst blurInput = process.env.NODE_ENV !== \"production\" ? '__autocomplete_blur_input__' : 10;\nconst changeInput = process.env.NODE_ENV !== \"production\" ? '__autocomplete_change_input__' : 11;\nconst keyDownSpaceButton = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_space_button__' : 12;\nconst clickButton = process.env.NODE_ENV !== \"production\" ? '__autocomplete_click_button__' : 13;\nconst blurButton = process.env.NODE_ENV !== \"production\" ? '__autocomplete_blur_button__' : 14;\nconst controlledPropUpdatedSelectedItem = process.env.NODE_ENV !== \"production\" ? '__autocomplete_controlled_prop_updated_selected_item__' : 15;\nconst touchEnd = process.env.NODE_ENV !== \"production\" ? '__autocomplete_touchend__' : 16;\n\nvar stateChangeTypes$3 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n unknown: unknown,\n mouseUp: mouseUp,\n itemMouseEnter: itemMouseEnter,\n keyDownArrowUp: keyDownArrowUp,\n keyDownArrowDown: keyDownArrowDown,\n keyDownEscape: keyDownEscape,\n keyDownEnter: keyDownEnter,\n keyDownHome: keyDownHome,\n keyDownEnd: keyDownEnd,\n clickItem: clickItem,\n blurInput: blurInput,\n changeInput: changeInput,\n keyDownSpaceButton: keyDownSpaceButton,\n clickButton: clickButton,\n blurButton: blurButton,\n controlledPropUpdatedSelectedItem: controlledPropUpdatedSelectedItem,\n touchEnd: touchEnd\n});\n\n/* eslint camelcase:0 */\nconst Downshift = /*#__PURE__*/(() => {\n class Downshift extends Component {\n constructor(_props) {\n var _this;\n super(_props);\n _this = this;\n this.id = this.props.id || `downshift-${generateId()}`;\n this.menuId = this.props.menuId || `${this.id}-menu`;\n this.labelId = this.props.labelId || `${this.id}-label`;\n this.inputId = this.props.inputId || `${this.id}-input`;\n this.getItemId = this.props.getItemId || (index => `${this.id}-item-${index}`);\n this.input = null;\n this.items = [];\n this.itemCount = null;\n this.previousResultCount = 0;\n this.timeoutIds = [];\n this.internalSetTimeout = (fn, time) => {\n const id = setTimeout(() => {\n this.timeoutIds = this.timeoutIds.filter(i => i !== id);\n fn();\n }, time);\n this.timeoutIds.push(id);\n };\n this.setItemCount = count => {\n this.itemCount = count;\n };\n this.unsetItemCount = () => {\n this.itemCount = null;\n };\n this.setHighlightedIndex = function (highlightedIndex, otherStateToSet) {\n if (highlightedIndex === void 0) {\n highlightedIndex = _this.props.defaultHighlightedIndex;\n }\n if (otherStateToSet === void 0) {\n otherStateToSet = {};\n }\n otherStateToSet = pickState(otherStateToSet);\n _this.internalSetState({\n highlightedIndex,\n ...otherStateToSet\n });\n };\n this.clearSelection = cb => {\n this.internalSetState({\n selectedItem: null,\n inputValue: '',\n highlightedIndex: this.props.defaultHighlightedIndex,\n isOpen: this.props.defaultIsOpen\n }, cb);\n };\n this.selectItem = (item, otherStateToSet, cb) => {\n otherStateToSet = pickState(otherStateToSet);\n this.internalSetState({\n isOpen: this.props.defaultIsOpen,\n highlightedIndex: this.props.defaultHighlightedIndex,\n selectedItem: item,\n inputValue: this.props.itemToString(item),\n ...otherStateToSet\n }, cb);\n };\n this.selectItemAtIndex = (itemIndex, otherStateToSet, cb) => {\n const item = this.items[itemIndex];\n if (item == null) {\n return;\n }\n this.selectItem(item, otherStateToSet, cb);\n };\n this.selectHighlightedItem = (otherStateToSet, cb) => {\n return this.selectItemAtIndex(this.getState().highlightedIndex, otherStateToSet, cb);\n };\n this.internalSetState = (stateToSet, cb) => {\n let isItemSelected, onChangeArg;\n const onStateChangeArg = {};\n const isStateToSetFunction = typeof stateToSet === 'function';\n\n // we want to call `onInputValueChange` before the `setState` call\n // so someone controlling the `inputValue` state gets notified of\n // the input change as soon as possible. This avoids issues with\n // preserving the cursor position.\n // See https://github.com/downshift-js/downshift/issues/217 for more info.\n if (!isStateToSetFunction && stateToSet.hasOwnProperty('inputValue')) {\n this.props.onInputValueChange(stateToSet.inputValue, {\n ...this.getStateAndHelpers(),\n ...stateToSet\n });\n }\n return this.setState(state => {\n state = this.getState(state);\n let newStateToSet = isStateToSetFunction ? stateToSet(state) : stateToSet;\n\n // Your own function that could modify the state that will be set.\n newStateToSet = this.props.stateReducer(state, newStateToSet);\n\n // checks if an item is selected, regardless of if it's different from\n // what was selected before\n // used to determine if onSelect and onChange callbacks should be called\n isItemSelected = newStateToSet.hasOwnProperty('selectedItem');\n // this keeps track of the object we want to call with setState\n const nextState = {};\n // we need to call on change if the outside world is controlling any of our state\n // and we're trying to update that state. OR if the selection has changed and we're\n // trying to update the selection\n if (isItemSelected && newStateToSet.selectedItem !== state.selectedItem) {\n onChangeArg = newStateToSet.selectedItem;\n }\n newStateToSet.type = newStateToSet.type || unknown;\n Object.keys(newStateToSet).forEach(key => {\n // onStateChangeArg should only have the state that is\n // actually changing\n if (state[key] !== newStateToSet[key]) {\n onStateChangeArg[key] = newStateToSet[key];\n }\n // the type is useful for the onStateChangeArg\n // but we don't actually want to set it in internal state.\n // this is an undocumented feature for now... Not all internalSetState\n // calls support it and I'm not certain we want them to yet.\n // But it enables users controlling the isOpen state to know when\n // the isOpen state changes due to mouseup events which is quite handy.\n if (key === 'type') {\n return;\n }\n newStateToSet[key];\n // if it's coming from props, then we don't care to set it internally\n if (!isControlledProp(this.props, key)) {\n nextState[key] = newStateToSet[key];\n }\n });\n\n // if stateToSet is a function, then we weren't able to call onInputValueChange\n // earlier, so we'll call it now that we know what the inputValue state will be.\n if (isStateToSetFunction && newStateToSet.hasOwnProperty('inputValue')) {\n this.props.onInputValueChange(newStateToSet.inputValue, {\n ...this.getStateAndHelpers(),\n ...newStateToSet\n });\n }\n return nextState;\n }, () => {\n // call the provided callback if it's a function\n cbToCb(cb)();\n\n // only call the onStateChange and onChange callbacks if\n // we have relevant information to pass them.\n const hasMoreStateThanType = Object.keys(onStateChangeArg).length > 1;\n if (hasMoreStateThanType) {\n this.props.onStateChange(onStateChangeArg, this.getStateAndHelpers());\n }\n if (isItemSelected) {\n this.props.onSelect(stateToSet.selectedItem, this.getStateAndHelpers());\n }\n if (onChangeArg !== undefined) {\n this.props.onChange(onChangeArg, this.getStateAndHelpers());\n }\n // this is currently undocumented and therefore subject to change\n // We'll try to not break it, but just be warned.\n this.props.onUserAction(onStateChangeArg, this.getStateAndHelpers());\n });\n };\n this.rootRef = node => this._rootNode = node;\n this.getRootProps = function (_temp, _temp2) {\n let {\n refKey = 'ref',\n ref,\n ...rest\n } = _temp === void 0 ? {} : _temp;\n let {\n suppressRefError = false\n } = _temp2 === void 0 ? {} : _temp2;\n // this is used in the render to know whether the user has called getRootProps.\n // It uses that to know whether to apply the props automatically\n _this.getRootProps.called = true;\n _this.getRootProps.refKey = refKey;\n _this.getRootProps.suppressRefError = suppressRefError;\n const {\n isOpen\n } = _this.getState();\n return {\n [refKey]: handleRefs(ref, _this.rootRef),\n role: 'combobox',\n 'aria-expanded': isOpen,\n 'aria-haspopup': 'listbox',\n 'aria-owns': isOpen ? _this.menuId : null,\n 'aria-labelledby': _this.labelId,\n ...rest\n };\n };\n this.keyDownHandlers = {\n ArrowDown(event) {\n event.preventDefault();\n if (this.getState().isOpen) {\n const amount = event.shiftKey ? 5 : 1;\n this.moveHighlightedIndex(amount, {\n type: keyDownArrowDown\n });\n } else {\n this.internalSetState({\n isOpen: true,\n type: keyDownArrowDown\n }, () => {\n const itemCount = this.getItemCount();\n if (itemCount > 0) {\n const {\n highlightedIndex\n } = this.getState();\n const nextHighlightedIndex = getNextWrappingIndex(1, highlightedIndex, itemCount, index => this.getItemNodeFromIndex(index));\n this.setHighlightedIndex(nextHighlightedIndex, {\n type: keyDownArrowDown\n });\n }\n });\n }\n },\n ArrowUp(event) {\n event.preventDefault();\n if (this.getState().isOpen) {\n const amount = event.shiftKey ? -5 : -1;\n this.moveHighlightedIndex(amount, {\n type: keyDownArrowUp\n });\n } else {\n this.internalSetState({\n isOpen: true,\n type: keyDownArrowUp\n }, () => {\n const itemCount = this.getItemCount();\n if (itemCount > 0) {\n const {\n highlightedIndex\n } = this.getState();\n const nextHighlightedIndex = getNextWrappingIndex(-1, highlightedIndex, itemCount, index => this.getItemNodeFromIndex(index));\n this.setHighlightedIndex(nextHighlightedIndex, {\n type: keyDownArrowUp\n });\n }\n });\n }\n },\n Enter(event) {\n if (event.which === 229) {\n return;\n }\n const {\n isOpen,\n highlightedIndex\n } = this.getState();\n if (isOpen && highlightedIndex != null) {\n event.preventDefault();\n const item = this.items[highlightedIndex];\n const itemNode = this.getItemNodeFromIndex(highlightedIndex);\n if (item == null || itemNode && itemNode.hasAttribute('disabled')) {\n return;\n }\n this.selectHighlightedItem({\n type: keyDownEnter\n });\n }\n },\n Escape(event) {\n event.preventDefault();\n this.reset({\n type: keyDownEscape,\n ...(!this.state.isOpen && {\n selectedItem: null,\n inputValue: ''\n })\n });\n }\n };\n this.buttonKeyDownHandlers = {\n ...this.keyDownHandlers,\n ' '(event) {\n event.preventDefault();\n this.toggleMenu({\n type: keyDownSpaceButton\n });\n }\n };\n this.inputKeyDownHandlers = {\n ...this.keyDownHandlers,\n Home(event) {\n const {\n isOpen\n } = this.getState();\n if (!isOpen) {\n return;\n }\n event.preventDefault();\n const itemCount = this.getItemCount();\n if (itemCount <= 0 || !isOpen) {\n return;\n }\n\n // get next non-disabled starting downwards from 0 if that's disabled.\n const newHighlightedIndex = getNextNonDisabledIndex(1, 0, itemCount, index => this.getItemNodeFromIndex(index), false);\n this.setHighlightedIndex(newHighlightedIndex, {\n type: keyDownHome\n });\n },\n End(event) {\n const {\n isOpen\n } = this.getState();\n if (!isOpen) {\n return;\n }\n event.preventDefault();\n const itemCount = this.getItemCount();\n if (itemCount <= 0 || !isOpen) {\n return;\n }\n\n // get next non-disabled starting upwards from last index if that's disabled.\n const newHighlightedIndex = getNextNonDisabledIndex(-1, itemCount - 1, itemCount, index => this.getItemNodeFromIndex(index), false);\n this.setHighlightedIndex(newHighlightedIndex, {\n type: keyDownEnd\n });\n }\n };\n this.getToggleButtonProps = function (_temp3) {\n let {\n onClick,\n onPress,\n onKeyDown,\n onKeyUp,\n onBlur,\n ...rest\n } = _temp3 === void 0 ? {} : _temp3;\n const {\n isOpen\n } = _this.getState();\n const enabledEventHandlers = {\n onClick: callAllEventHandlers(onClick, _this.buttonHandleClick),\n onKeyDown: callAllEventHandlers(onKeyDown, _this.buttonHandleKeyDown),\n onKeyUp: callAllEventHandlers(onKeyUp, _this.buttonHandleKeyUp),\n onBlur: callAllEventHandlers(onBlur, _this.buttonHandleBlur)\n };\n const eventHandlers = rest.disabled ? {} : enabledEventHandlers;\n return {\n type: 'button',\n role: 'button',\n 'aria-label': isOpen ? 'close menu' : 'open menu',\n 'aria-haspopup': true,\n 'data-toggle': true,\n ...eventHandlers,\n ...rest\n };\n };\n this.buttonHandleKeyUp = event => {\n // Prevent click event from emitting in Firefox\n event.preventDefault();\n };\n this.buttonHandleKeyDown = event => {\n const key = normalizeArrowKey(event);\n if (this.buttonKeyDownHandlers[key]) {\n this.buttonKeyDownHandlers[key].call(this, event);\n }\n };\n this.buttonHandleClick = event => {\n event.preventDefault();\n // handle odd case for Safari and Firefox which\n // don't give the button the focus properly.\n /* istanbul ignore if (can't reasonably test this) */\n if (this.props.environment.document.activeElement === this.props.environment.document.body) {\n event.target.focus();\n }\n // to simplify testing components that use downshift, we'll not wrap this in a setTimeout\n // if the NODE_ENV is test. With the proper build system, this should be dead code eliminated\n // when building for production and should therefore have no impact on production code.\n if (process.env.NODE_ENV === 'test') {\n this.toggleMenu({\n type: clickButton\n });\n } else {\n // Ensure that toggle of menu occurs after the potential blur event in iOS\n this.internalSetTimeout(() => this.toggleMenu({\n type: clickButton\n }));\n }\n };\n this.buttonHandleBlur = event => {\n const blurTarget = event.target; // Save blur target for comparison with activeElement later\n // Need setTimeout, so that when the user presses Tab, the activeElement is the next focused element, not body element\n this.internalSetTimeout(() => {\n if (!this.isMouseDown && (this.props.environment.document.activeElement == null || this.props.environment.document.activeElement.id !== this.inputId) && this.props.environment.document.activeElement !== blurTarget // Do nothing if we refocus the same element again (to solve issue in Safari on iOS)\n ) {\n this.reset({\n type: blurButton\n });\n }\n });\n };\n this.getLabelProps = props => {\n return {\n htmlFor: this.inputId,\n id: this.labelId,\n ...props\n };\n };\n this.getInputProps = function (_temp4) {\n let {\n onKeyDown,\n onBlur,\n onChange,\n onInput,\n onChangeText,\n ...rest\n } = _temp4 === void 0 ? {} : _temp4;\n let onChangeKey;\n let eventHandlers = {};\n\n /* istanbul ignore next (preact) */\n {\n onChangeKey = 'onChange';\n }\n const {\n inputValue,\n isOpen,\n highlightedIndex\n } = _this.getState();\n if (!rest.disabled) {\n eventHandlers = {\n [onChangeKey]: callAllEventHandlers(onChange, onInput, _this.inputHandleChange),\n onKeyDown: callAllEventHandlers(onKeyDown, _this.inputHandleKeyDown),\n onBlur: callAllEventHandlers(onBlur, _this.inputHandleBlur)\n };\n }\n return {\n 'aria-autocomplete': 'list',\n 'aria-activedescendant': isOpen && typeof highlightedIndex === 'number' && highlightedIndex >= 0 ? _this.getItemId(highlightedIndex) : null,\n 'aria-controls': isOpen ? _this.menuId : null,\n 'aria-labelledby': _this.labelId,\n // https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion\n // revert back since autocomplete=\"nope\" is ignored on latest Chrome and Opera\n autoComplete: 'off',\n value: inputValue,\n id: _this.inputId,\n ...eventHandlers,\n ...rest\n };\n };\n this.inputHandleKeyDown = event => {\n const key = normalizeArrowKey(event);\n if (key && this.inputKeyDownHandlers[key]) {\n this.inputKeyDownHandlers[key].call(this, event);\n }\n };\n this.inputHandleChange = event => {\n this.internalSetState({\n type: changeInput,\n isOpen: true,\n inputValue: event.target.value,\n highlightedIndex: this.props.defaultHighlightedIndex\n });\n };\n this.inputHandleBlur = () => {\n // Need setTimeout, so that when the user presses Tab, the activeElement is the next focused element, not the body element\n this.internalSetTimeout(() => {\n const downshiftButtonIsActive = this.props.environment.document && !!this.props.environment.document.activeElement && !!this.props.environment.document.activeElement.dataset && this.props.environment.document.activeElement.dataset.toggle && this._rootNode && this._rootNode.contains(this.props.environment.document.activeElement);\n if (!this.isMouseDown && !downshiftButtonIsActive) {\n this.reset({\n type: blurInput\n });\n }\n });\n };\n this.menuRef = node => {\n this._menuNode = node;\n };\n this.getMenuProps = function (_temp5, _temp6) {\n let {\n refKey = 'ref',\n ref,\n ...props\n } = _temp5 === void 0 ? {} : _temp5;\n let {\n suppressRefError = false\n } = _temp6 === void 0 ? {} : _temp6;\n _this.getMenuProps.called = true;\n _this.getMenuProps.refKey = refKey;\n _this.getMenuProps.suppressRefError = suppressRefError;\n return {\n [refKey]: handleRefs(ref, _this.menuRef),\n role: 'listbox',\n 'aria-labelledby': props && props['aria-label'] ? null : _this.labelId,\n id: _this.menuId,\n ...props\n };\n };\n this.getItemProps = function (_temp7) {\n let {\n onMouseMove,\n onMouseDown,\n onClick,\n onPress,\n index,\n item = process.env.NODE_ENV === 'production' ? /* istanbul ignore next */undefined : requiredProp('getItemProps', 'item'),\n ...rest\n } = _temp7 === void 0 ? {} : _temp7;\n if (index === undefined) {\n _this.items.push(item);\n index = _this.items.indexOf(item);\n } else {\n _this.items[index] = item;\n }\n const onSelectKey = 'onClick';\n const customClickHandler = onClick;\n const enabledEventHandlers = {\n // onMouseMove is used over onMouseEnter here. onMouseMove\n // is only triggered on actual mouse movement while onMouseEnter\n // can fire on DOM changes, interrupting keyboard navigation\n onMouseMove: callAllEventHandlers(onMouseMove, () => {\n if (index === _this.getState().highlightedIndex) {\n return;\n }\n _this.setHighlightedIndex(index, {\n type: itemMouseEnter\n });\n\n // We never want to manually scroll when changing state based\n // on `onMouseMove` because we will be moving the element out\n // from under the user which is currently scrolling/moving the\n // cursor\n _this.avoidScrolling = true;\n _this.internalSetTimeout(() => _this.avoidScrolling = false, 250);\n }),\n onMouseDown: callAllEventHandlers(onMouseDown, event => {\n // This prevents the activeElement from being changed\n // to the item so it can remain with the current activeElement\n // which is a more common use case.\n event.preventDefault();\n }),\n [onSelectKey]: callAllEventHandlers(customClickHandler, () => {\n _this.selectItemAtIndex(index, {\n type: clickItem\n });\n })\n };\n\n // Passing down the onMouseDown handler to prevent redirect\n // of the activeElement if clicking on disabled items\n const eventHandlers = rest.disabled ? {\n onMouseDown: enabledEventHandlers.onMouseDown\n } : enabledEventHandlers;\n return {\n id: _this.getItemId(index),\n role: 'option',\n 'aria-selected': _this.getState().highlightedIndex === index,\n ...eventHandlers,\n ...rest\n };\n };\n this.clearItems = () => {\n this.items = [];\n };\n this.reset = function (otherStateToSet, cb) {\n if (otherStateToSet === void 0) {\n otherStateToSet = {};\n }\n otherStateToSet = pickState(otherStateToSet);\n _this.internalSetState(_ref => {\n let {\n selectedItem\n } = _ref;\n return {\n isOpen: _this.props.defaultIsOpen,\n highlightedIndex: _this.props.defaultHighlightedIndex,\n inputValue: _this.props.itemToString(selectedItem),\n ...otherStateToSet\n };\n }, cb);\n };\n this.toggleMenu = function (otherStateToSet, cb) {\n if (otherStateToSet === void 0) {\n otherStateToSet = {};\n }\n otherStateToSet = pickState(otherStateToSet);\n _this.internalSetState(_ref2 => {\n let {\n isOpen\n } = _ref2;\n return {\n isOpen: !isOpen,\n ...(isOpen && {\n highlightedIndex: _this.props.defaultHighlightedIndex\n }),\n ...otherStateToSet\n };\n }, () => {\n const {\n isOpen,\n highlightedIndex\n } = _this.getState();\n if (isOpen) {\n if (_this.getItemCount() > 0 && typeof highlightedIndex === 'number') {\n _this.setHighlightedIndex(highlightedIndex, otherStateToSet);\n }\n }\n cbToCb(cb)();\n });\n };\n this.openMenu = cb => {\n this.internalSetState({\n isOpen: true\n }, cb);\n };\n this.closeMenu = cb => {\n this.internalSetState({\n isOpen: false\n }, cb);\n };\n this.updateStatus = debounce(() => {\n const state = this.getState();\n const item = this.items[state.highlightedIndex];\n const resultCount = this.getItemCount();\n const status = this.props.getA11yStatusMessage({\n itemToString: this.props.itemToString,\n previousResultCount: this.previousResultCount,\n resultCount,\n highlightedItem: item,\n ...state\n });\n this.previousResultCount = resultCount;\n setStatus(status, this.props.environment.document);\n }, 200);\n // fancy destructuring + defaults + aliases\n // this basically says each value of state should either be set to\n // the initial value or the default value if the initial value is not provided\n const {\n defaultHighlightedIndex,\n initialHighlightedIndex: _highlightedIndex = defaultHighlightedIndex,\n defaultIsOpen,\n initialIsOpen: _isOpen = defaultIsOpen,\n initialInputValue: _inputValue = '',\n initialSelectedItem: _selectedItem = null\n } = this.props;\n const _state = this.getState({\n highlightedIndex: _highlightedIndex,\n isOpen: _isOpen,\n inputValue: _inputValue,\n selectedItem: _selectedItem\n });\n if (_state.selectedItem != null && this.props.initialInputValue === undefined) {\n _state.inputValue = this.props.itemToString(_state.selectedItem);\n }\n this.state = _state;\n }\n /**\n * Clear all running timeouts\n */\n internalClearTimeouts() {\n this.timeoutIds.forEach(id => {\n clearTimeout(id);\n });\n this.timeoutIds = [];\n }\n\n /**\n * Gets the state based on internal state or props\n * If a state value is passed via props, then that\n * is the value given, otherwise it's retrieved from\n * stateToMerge\n *\n * @param {Object} stateToMerge defaults to this.state\n * @return {Object} the state\n */\n getState(stateToMerge) {\n if (stateToMerge === void 0) {\n stateToMerge = this.state;\n }\n return getState(stateToMerge, this.props);\n }\n getItemCount() {\n // things read better this way. They're in priority order:\n // 1. `this.itemCount`\n // 2. `this.props.itemCount`\n // 3. `this.items.length`\n let itemCount = this.items.length;\n if (this.itemCount != null) {\n itemCount = this.itemCount;\n } else if (this.props.itemCount !== undefined) {\n itemCount = this.props.itemCount;\n }\n return itemCount;\n }\n getItemNodeFromIndex(index) {\n return this.props.environment.document.getElementById(this.getItemId(index));\n }\n scrollHighlightedItemIntoView() {\n /* istanbul ignore else (react-native) */\n {\n const node = this.getItemNodeFromIndex(this.getState().highlightedIndex);\n this.props.scrollIntoView(node, this._menuNode);\n }\n }\n moveHighlightedIndex(amount, otherStateToSet) {\n const itemCount = this.getItemCount();\n const {\n highlightedIndex\n } = this.getState();\n if (itemCount > 0) {\n const nextHighlightedIndex = getNextWrappingIndex(amount, highlightedIndex, itemCount, index => this.getItemNodeFromIndex(index));\n this.setHighlightedIndex(nextHighlightedIndex, otherStateToSet);\n }\n }\n getStateAndHelpers() {\n const {\n highlightedIndex,\n inputValue,\n selectedItem,\n isOpen\n } = this.getState();\n const {\n itemToString\n } = this.props;\n const {\n id\n } = this;\n const {\n getRootProps,\n getToggleButtonProps,\n getLabelProps,\n getMenuProps,\n getInputProps,\n getItemProps,\n openMenu,\n closeMenu,\n toggleMenu,\n selectItem,\n selectItemAtIndex,\n selectHighlightedItem,\n setHighlightedIndex,\n clearSelection,\n clearItems,\n reset,\n setItemCount,\n unsetItemCount,\n internalSetState: setState\n } = this;\n return {\n // prop getters\n getRootProps,\n getToggleButtonProps,\n getLabelProps,\n getMenuProps,\n getInputProps,\n getItemProps,\n // actions\n reset,\n openMenu,\n closeMenu,\n toggleMenu,\n selectItem,\n selectItemAtIndex,\n selectHighlightedItem,\n setHighlightedIndex,\n clearSelection,\n clearItems,\n setItemCount,\n unsetItemCount,\n setState,\n // props\n itemToString,\n // derived\n id,\n // state\n highlightedIndex,\n inputValue,\n isOpen,\n selectedItem\n };\n }\n\n //////////////////////////// ROOT\n\n componentDidMount() {\n /* istanbul ignore if (react-native) */\n if (process.env.NODE_ENV !== 'production' && !false && this.getMenuProps.called && !this.getMenuProps.suppressRefError) {\n validateGetMenuPropsCalledCorrectly(this._menuNode, this.getMenuProps);\n }\n\n /* istanbul ignore if (react-native) */\n {\n // this.isMouseDown helps us track whether the mouse is currently held down.\n // This is useful when the user clicks on an item in the list, but holds the mouse\n // down long enough for the list to disappear (because the blur event fires on the input)\n // this.isMouseDown is used in the blur handler on the input to determine whether the blur event should\n // trigger hiding the menu.\n const onMouseDown = () => {\n this.isMouseDown = true;\n };\n const onMouseUp = event => {\n this.isMouseDown = false;\n // if the target element or the activeElement is within a downshift node\n // then we don't want to reset downshift\n const contextWithinDownshift = targetWithinDownshift(event.target, [this._rootNode, this._menuNode], this.props.environment);\n if (!contextWithinDownshift && this.getState().isOpen) {\n this.reset({\n type: mouseUp\n }, () => this.props.onOuterClick(this.getStateAndHelpers()));\n }\n };\n // Touching an element in iOS gives focus and hover states, but touching out of\n // the element will remove hover, and persist the focus state, resulting in the\n // blur event not being triggered.\n // this.isTouchMove helps us track whether the user is tapping or swiping on a touch screen.\n // If the user taps outside of Downshift, the component should be reset,\n // but not if the user is swiping\n const onTouchStart = () => {\n this.isTouchMove = false;\n };\n const onTouchMove = () => {\n this.isTouchMove = true;\n };\n const onTouchEnd = event => {\n const contextWithinDownshift = targetWithinDownshift(event.target, [this._rootNode, this._menuNode], this.props.environment, false);\n if (!this.isTouchMove && !contextWithinDownshift && this.getState().isOpen) {\n this.reset({\n type: touchEnd\n }, () => this.props.onOuterClick(this.getStateAndHelpers()));\n }\n };\n const {\n environment\n } = this.props;\n environment.addEventListener('mousedown', onMouseDown);\n environment.addEventListener('mouseup', onMouseUp);\n environment.addEventListener('touchstart', onTouchStart);\n environment.addEventListener('touchmove', onTouchMove);\n environment.addEventListener('touchend', onTouchEnd);\n this.cleanup = () => {\n this.internalClearTimeouts();\n this.updateStatus.cancel();\n environment.removeEventListener('mousedown', onMouseDown);\n environment.removeEventListener('mouseup', onMouseUp);\n environment.removeEventListener('touchstart', onTouchStart);\n environment.removeEventListener('touchmove', onTouchMove);\n environment.removeEventListener('touchend', onTouchEnd);\n };\n }\n }\n shouldScroll(prevState, prevProps) {\n const {\n highlightedIndex: currentHighlightedIndex\n } = this.props.highlightedIndex === undefined ? this.getState() : this.props;\n const {\n highlightedIndex: prevHighlightedIndex\n } = prevProps.highlightedIndex === undefined ? prevState : prevProps;\n const scrollWhenOpen = currentHighlightedIndex && this.getState().isOpen && !prevState.isOpen;\n const scrollWhenNavigating = currentHighlightedIndex !== prevHighlightedIndex;\n return scrollWhenOpen || scrollWhenNavigating;\n }\n componentDidUpdate(prevProps, prevState) {\n if (process.env.NODE_ENV !== 'production') {\n validateControlledUnchanged(this.state, prevProps, this.props);\n /* istanbul ignore if (react-native) */\n if (this.getMenuProps.called && !this.getMenuProps.suppressRefError) {\n validateGetMenuPropsCalledCorrectly(this._menuNode, this.getMenuProps);\n }\n }\n if (isControlledProp(this.props, 'selectedItem') && this.props.selectedItemChanged(prevProps.selectedItem, this.props.selectedItem)) {\n this.internalSetState({\n type: controlledPropUpdatedSelectedItem,\n inputValue: this.props.itemToString(this.props.selectedItem)\n });\n }\n if (!this.avoidScrolling && this.shouldScroll(prevState, prevProps)) {\n this.scrollHighlightedItemIntoView();\n }\n\n /* istanbul ignore else (react-native) */\n {\n this.updateStatus();\n }\n }\n componentWillUnmount() {\n this.cleanup(); // avoids memory leak\n }\n\n render() {\n const children = unwrapArray(this.props.children, noop);\n // because the items are rerendered every time we call the children\n // we clear this out each render and it will be populated again as\n // getItemProps is called.\n this.clearItems();\n // we reset this so we know whether the user calls getRootProps during\n // this render. If they do then we don't need to do anything,\n // if they don't then we need to clone the element they return and\n // apply the props for them.\n this.getRootProps.called = false;\n this.getRootProps.refKey = undefined;\n this.getRootProps.suppressRefError = undefined;\n // we do something similar for getMenuProps\n this.getMenuProps.called = false;\n this.getMenuProps.refKey = undefined;\n this.getMenuProps.suppressRefError = undefined;\n // we do something similar for getLabelProps\n this.getLabelProps.called = false;\n // and something similar for getInputProps\n this.getInputProps.called = false;\n const element = unwrapArray(children(this.getStateAndHelpers()));\n if (!element) {\n return null;\n }\n if (this.getRootProps.called || this.props.suppressRefError) {\n if (process.env.NODE_ENV !== 'production' && !this.getRootProps.suppressRefError && !this.props.suppressRefError) {\n validateGetRootPropsCalledCorrectly(element, this.getRootProps);\n }\n return element;\n } else if (isDOMElement(element)) {\n // they didn't apply the root props, but we can clone\n // this and apply the props ourselves\n return /*#__PURE__*/cloneElement(element, this.getRootProps(getElementProps(element)));\n }\n\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n // they didn't apply the root props, but they need to\n // otherwise we can't query around the autocomplete\n\n throw new Error('downshift: If you return a non-DOM element, you must apply the getRootProps function');\n }\n\n /* istanbul ignore next */\n return undefined;\n }\n }\n Downshift.defaultProps = {\n defaultHighlightedIndex: null,\n defaultIsOpen: false,\n getA11yStatusMessage: getA11yStatusMessage$1,\n itemToString: i => {\n if (i == null) {\n return '';\n }\n if (process.env.NODE_ENV !== 'production' && isPlainObject(i) && !i.hasOwnProperty('toString')) {\n // eslint-disable-next-line no-console\n console.warn('downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.', 'The object that was passed:', i);\n }\n return String(i);\n },\n onStateChange: noop,\n onInputValueChange: noop,\n onUserAction: noop,\n onChange: noop,\n onSelect: noop,\n onOuterClick: noop,\n selectedItemChanged: (prevItem, item) => prevItem !== item,\n environment: /* istanbul ignore next (ssr) */\n typeof window === 'undefined' ? {} : window,\n stateReducer: (state, stateToSet) => stateToSet,\n suppressRefError: false,\n scrollIntoView\n };\n Downshift.stateChangeTypes = stateChangeTypes$3;\n return Downshift;\n})();\nprocess.env.NODE_ENV !== \"production\" ? Downshift.propTypes = {\n children: PropTypes.func,\n defaultHighlightedIndex: PropTypes.number,\n defaultIsOpen: PropTypes.bool,\n initialHighlightedIndex: PropTypes.number,\n initialSelectedItem: PropTypes.any,\n initialInputValue: PropTypes.string,\n initialIsOpen: PropTypes.bool,\n getA11yStatusMessage: PropTypes.func,\n itemToString: PropTypes.func,\n onChange: PropTypes.func,\n onSelect: PropTypes.func,\n onStateChange: PropTypes.func,\n onInputValueChange: PropTypes.func,\n onUserAction: PropTypes.func,\n onOuterClick: PropTypes.func,\n selectedItemChanged: PropTypes.func,\n stateReducer: PropTypes.func,\n itemCount: PropTypes.number,\n id: PropTypes.string,\n environment: PropTypes.shape({\n addEventListener: PropTypes.func,\n removeEventListener: PropTypes.func,\n document: PropTypes.shape({\n getElementById: PropTypes.func,\n activeElement: PropTypes.any,\n body: PropTypes.any\n })\n }),\n suppressRefError: PropTypes.bool,\n scrollIntoView: PropTypes.func,\n // things we keep in state for uncontrolled components\n // but can accept as props for controlled components\n /* eslint-disable react/no-unused-prop-types */\n selectedItem: PropTypes.any,\n isOpen: PropTypes.bool,\n inputValue: PropTypes.string,\n highlightedIndex: PropTypes.number,\n labelId: PropTypes.string,\n inputId: PropTypes.string,\n menuId: PropTypes.string,\n getItemId: PropTypes.func\n /* eslint-enable react/no-unused-prop-types */\n} : void 0;\nvar Downshift$1 = Downshift;\nfunction validateGetMenuPropsCalledCorrectly(node, _ref3) {\n let {\n refKey\n } = _ref3;\n if (!node) {\n // eslint-disable-next-line no-console\n console.error(`downshift: The ref prop \"${refKey}\" from getMenuProps was not applied correctly on your menu element.`);\n }\n}\nfunction validateGetRootPropsCalledCorrectly(element, _ref4) {\n let {\n refKey\n } = _ref4;\n const refKeySpecified = refKey !== 'ref';\n const isComposite = !isDOMElement(element);\n if (isComposite && !refKeySpecified && !isForwardRef(element)) {\n // eslint-disable-next-line no-console\n console.error('downshift: You returned a non-DOM element. You must specify a refKey in getRootProps');\n } else if (!isComposite && refKeySpecified) {\n // eslint-disable-next-line no-console\n console.error(`downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified \"${refKey}\"`);\n }\n if (!isForwardRef(element) && !getElementProps(element)[refKey]) {\n // eslint-disable-next-line no-console\n console.error(`downshift: You must apply the ref prop \"${refKey}\" from getRootProps onto your root element.`);\n }\n}\n\nconst dropdownDefaultStateValues = {\n highlightedIndex: -1,\n isOpen: false,\n selectedItem: null,\n inputValue: ''\n};\nfunction callOnChangeProps(action, state, newState) {\n const {\n props,\n type\n } = action;\n const changes = {};\n Object.keys(state).forEach(key => {\n invokeOnChangeHandler(key, action, state, newState);\n if (newState[key] !== state[key]) {\n changes[key] = newState[key];\n }\n });\n if (props.onStateChange && Object.keys(changes).length) {\n props.onStateChange({\n type,\n ...changes\n });\n }\n}\nfunction invokeOnChangeHandler(key, action, state, newState) {\n const {\n props,\n type\n } = action;\n const handler = `on${capitalizeString(key)}Change`;\n if (props[handler] && newState[key] !== undefined && newState[key] !== state[key]) {\n props[handler]({\n type,\n ...newState\n });\n }\n}\n\n/**\n * Default state reducer that returns the changes.\n *\n * @param {Object} s state.\n * @param {Object} a action with changes.\n * @returns {Object} changes.\n */\nfunction stateReducer(s, a) {\n return a.changes;\n}\n\n/**\n * Returns a message to be added to aria-live region when item is selected.\n *\n * @param {Object} selectionParameters Parameters required to build the message.\n * @returns {string} The a11y message.\n */\nfunction getA11ySelectionMessage(selectionParameters) {\n const {\n selectedItem,\n itemToString: itemToStringLocal\n } = selectionParameters;\n return selectedItem ? `${itemToStringLocal(selectedItem)} has been selected.` : '';\n}\n\n/**\n * Debounced call for updating the a11y message.\n */\nconst updateA11yStatus = debounce((getA11yMessage, document) => {\n setStatus(getA11yMessage(), document);\n}, 200);\n\n// istanbul ignore next\nconst useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? useLayoutEffect : useEffect;\nfunction useElementIds(_ref) {\n let {\n id = `downshift-${generateId()}`,\n labelId,\n menuId,\n getItemId,\n toggleButtonId,\n inputId\n } = _ref;\n const elementIdsRef = useRef({\n labelId: labelId || `${id}-label`,\n menuId: menuId || `${id}-menu`,\n getItemId: getItemId || (index => `${id}-item-${index}`),\n toggleButtonId: toggleButtonId || `${id}-toggle-button`,\n inputId: inputId || `${id}-input`\n });\n return elementIdsRef.current;\n}\nfunction getItemIndex(index, item, items) {\n if (index !== undefined) {\n return index;\n }\n if (items.length === 0) {\n return -1;\n }\n return items.indexOf(item);\n}\nfunction itemToString(item) {\n return item ? String(item) : '';\n}\nfunction isAcceptedCharacterKey(key) {\n return /^\\S{1}$/.test(key);\n}\nfunction capitalizeString(string) {\n return `${string.slice(0, 1).toUpperCase()}${string.slice(1)}`;\n}\nfunction useLatestRef(val) {\n const ref = useRef(val);\n // technically this is not \"concurrent mode safe\" because we're manipulating\n // the value during render (so it's not idempotent). However, the places this\n // hook is used is to support memoizing callbacks which will be called\n // *during* render, so we need the latest values *during* render.\n // If not for this, then we'd probably want to use useLayoutEffect instead.\n ref.current = val;\n return ref;\n}\n\n/**\n * Computes the controlled state using a the previous state, props,\n * two reducers, one from downshift and an optional one from the user.\n * Also calls the onChange handlers for state values that have changed.\n *\n * @param {Function} reducer Reducer function from downshift.\n * @param {Object} initialState Initial state of the hook.\n * @param {Object} props The hook props.\n * @returns {Array} An array with the state and an action dispatcher.\n */\nfunction useEnhancedReducer(reducer, initialState, props) {\n const prevStateRef = useRef();\n const actionRef = useRef();\n const enhancedReducer = useCallback((state, action) => {\n actionRef.current = action;\n state = getState(state, action.props);\n const changes = reducer(state, action);\n const newState = action.props.stateReducer(state, {\n ...action,\n changes\n });\n return newState;\n }, [reducer]);\n const [state, dispatch] = useReducer(enhancedReducer, initialState);\n const propsRef = useLatestRef(props);\n const dispatchWithProps = useCallback(action => dispatch({\n props: propsRef.current,\n ...action\n }), [propsRef]);\n const action = actionRef.current;\n useEffect(() => {\n if (action && prevStateRef.current && prevStateRef.current !== state) {\n callOnChangeProps(action, getState(prevStateRef.current, action.props), state);\n }\n prevStateRef.current = state;\n }, [state, props, action]);\n return [state, dispatchWithProps];\n}\n\n/**\n * Wraps the useEnhancedReducer and applies the controlled prop values before\n * returning the new state.\n *\n * @param {Function} reducer Reducer function from downshift.\n * @param {Object} initialState Initial state of the hook.\n * @param {Object} props The hook props.\n * @returns {Array} An array with the state and an action dispatcher.\n */\nfunction useControlledReducer$1(reducer, initialState, props) {\n const [state, dispatch] = useEnhancedReducer(reducer, initialState, props);\n return [getState(state, props), dispatch];\n}\nconst defaultProps$3 = {\n itemToString,\n stateReducer,\n getA11ySelectionMessage,\n scrollIntoView,\n environment: /* istanbul ignore next (ssr) */\n typeof window === 'undefined' ? {} : window\n};\nfunction getDefaultValue$1(props, propKey, defaultStateValues) {\n if (defaultStateValues === void 0) {\n defaultStateValues = dropdownDefaultStateValues;\n }\n const defaultValue = props[`default${capitalizeString(propKey)}`];\n if (defaultValue !== undefined) {\n return defaultValue;\n }\n return defaultStateValues[propKey];\n}\nfunction getInitialValue$1(props, propKey, defaultStateValues) {\n if (defaultStateValues === void 0) {\n defaultStateValues = dropdownDefaultStateValues;\n }\n const value = props[propKey];\n if (value !== undefined) {\n return value;\n }\n const initialValue = props[`initial${capitalizeString(propKey)}`];\n if (initialValue !== undefined) {\n return initialValue;\n }\n return getDefaultValue$1(props, propKey, defaultStateValues);\n}\nfunction getInitialState$2(props) {\n const selectedItem = getInitialValue$1(props, 'selectedItem');\n const isOpen = getInitialValue$1(props, 'isOpen');\n const highlightedIndex = getInitialValue$1(props, 'highlightedIndex');\n const inputValue = getInitialValue$1(props, 'inputValue');\n return {\n highlightedIndex: highlightedIndex < 0 && selectedItem && isOpen ? props.items.indexOf(selectedItem) : highlightedIndex,\n isOpen,\n selectedItem,\n inputValue\n };\n}\nfunction getHighlightedIndexOnOpen(props, state, offset) {\n const {\n items,\n initialHighlightedIndex,\n defaultHighlightedIndex\n } = props;\n const {\n selectedItem,\n highlightedIndex\n } = state;\n if (items.length === 0) {\n return -1;\n }\n\n // initialHighlightedIndex will give value to highlightedIndex on initial state only.\n if (initialHighlightedIndex !== undefined && highlightedIndex === initialHighlightedIndex) {\n return initialHighlightedIndex;\n }\n if (defaultHighlightedIndex !== undefined) {\n return defaultHighlightedIndex;\n }\n if (selectedItem) {\n return items.indexOf(selectedItem);\n }\n if (offset === 0) {\n return -1;\n }\n return offset < 0 ? items.length - 1 : 0;\n}\n\n/**\n * Reuse the movement tracking of mouse and touch events.\n *\n * @param {boolean} isOpen Whether the dropdown is open or not.\n * @param {Array} downshiftElementRefs Downshift element refs to track movement (toggleButton, menu etc.)\n * @param {Object} environment Environment where component/hook exists.\n * @param {Function} handleBlur Handler on blur from mouse or touch.\n * @returns {Object} Ref containing whether mouseDown or touchMove event is happening\n */\nfunction useMouseAndTouchTracker(isOpen, downshiftElementRefs, environment, handleBlur) {\n const mouseAndTouchTrackersRef = useRef({\n isMouseDown: false,\n isTouchMove: false\n });\n useEffect(() => {\n // The same strategy for checking if a click occurred inside or outside downsift\n // as in downshift.js.\n const onMouseDown = () => {\n mouseAndTouchTrackersRef.current.isMouseDown = true;\n };\n const onMouseUp = event => {\n mouseAndTouchTrackersRef.current.isMouseDown = false;\n if (isOpen && !targetWithinDownshift(event.target, downshiftElementRefs.map(ref => ref.current), environment)) {\n handleBlur();\n }\n };\n const onTouchStart = () => {\n mouseAndTouchTrackersRef.current.isTouchMove = false;\n };\n const onTouchMove = () => {\n mouseAndTouchTrackersRef.current.isTouchMove = true;\n };\n const onTouchEnd = event => {\n if (isOpen && !mouseAndTouchTrackersRef.current.isTouchMove && !targetWithinDownshift(event.target, downshiftElementRefs.map(ref => ref.current), environment, false)) {\n handleBlur();\n }\n };\n environment.addEventListener('mousedown', onMouseDown);\n environment.addEventListener('mouseup', onMouseUp);\n environment.addEventListener('touchstart', onTouchStart);\n environment.addEventListener('touchmove', onTouchMove);\n environment.addEventListener('touchend', onTouchEnd);\n return function cleanup() {\n environment.removeEventListener('mousedown', onMouseDown);\n environment.removeEventListener('mouseup', onMouseUp);\n environment.removeEventListener('touchstart', onTouchStart);\n environment.removeEventListener('touchmove', onTouchMove);\n environment.removeEventListener('touchend', onTouchEnd);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpen, environment]);\n return mouseAndTouchTrackersRef;\n}\n\n/* istanbul ignore next */\n// eslint-disable-next-line import/no-mutable-exports\nlet useGetterPropsCalledChecker = () => noop;\n/**\n * Custom hook that checks if getter props are called correctly.\n *\n * @param {...any} propKeys Getter prop names to be handled.\n * @returns {Function} Setter function called inside getter props to set call information.\n */\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n useGetterPropsCalledChecker = function () {\n const isInitialMountRef = useRef(true);\n for (var _len = arguments.length, propKeys = new Array(_len), _key = 0; _key < _len; _key++) {\n propKeys[_key] = arguments[_key];\n }\n const getterPropsCalledRef = useRef(propKeys.reduce((acc, propKey) => {\n acc[propKey] = {};\n return acc;\n }, {}));\n useEffect(() => {\n Object.keys(getterPropsCalledRef.current).forEach(propKey => {\n const propCallInfo = getterPropsCalledRef.current[propKey];\n if (isInitialMountRef.current) {\n if (!Object.keys(propCallInfo).length) {\n // eslint-disable-next-line no-console\n console.error(`downshift: You forgot to call the ${propKey} getter function on your component / element.`);\n return;\n }\n }\n const {\n suppressRefError,\n refKey,\n elementRef\n } = propCallInfo;\n if ((!elementRef || !elementRef.current) && !suppressRefError) {\n // eslint-disable-next-line no-console\n console.error(`downshift: The ref prop \"${refKey}\" from ${propKey} was not applied correctly on your element.`);\n }\n });\n isInitialMountRef.current = false;\n });\n const setGetterPropCallInfo = useCallback((propKey, suppressRefError, refKey, elementRef) => {\n getterPropsCalledRef.current[propKey] = {\n suppressRefError,\n refKey,\n elementRef\n };\n }, []);\n return setGetterPropCallInfo;\n };\n}\nfunction useA11yMessageSetter(getA11yMessage, dependencyArray, _ref2) {\n let {\n isInitialMount,\n highlightedIndex,\n items,\n environment,\n ...rest\n } = _ref2;\n // Sets a11y status message on changes in state.\n useEffect(() => {\n if (isInitialMount || false) {\n return;\n }\n updateA11yStatus(() => getA11yMessage({\n highlightedIndex,\n highlightedItem: items[highlightedIndex],\n resultCount: items.length,\n ...rest\n }), environment.document);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, dependencyArray);\n}\nfunction useScrollIntoView(_ref3) {\n let {\n highlightedIndex,\n isOpen,\n itemRefs,\n getItemNodeFromIndex,\n menuElement,\n scrollIntoView: scrollIntoViewProp\n } = _ref3;\n // used not to scroll on highlight by mouse.\n const shouldScrollRef = useRef(true);\n // Scroll on highlighted item if change comes from keyboard.\n useIsomorphicLayoutEffect(() => {\n if (highlightedIndex < 0 || !isOpen || !Object.keys(itemRefs.current).length) {\n return;\n }\n if (shouldScrollRef.current === false) {\n shouldScrollRef.current = true;\n } else {\n scrollIntoViewProp(getItemNodeFromIndex(highlightedIndex), menuElement);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [highlightedIndex]);\n return shouldScrollRef;\n}\n\n// eslint-disable-next-line import/no-mutable-exports\nlet useControlPropsValidator = noop;\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n useControlPropsValidator = _ref4 => {\n let {\n isInitialMount,\n props,\n state\n } = _ref4;\n // used for checking when props are moving from controlled to uncontrolled.\n const prevPropsRef = useRef(props);\n useEffect(() => {\n if (isInitialMount) {\n return;\n }\n validateControlledUnchanged(state, prevPropsRef.current, props);\n prevPropsRef.current = props;\n }, [state, props, isInitialMount]);\n };\n}\n\nfunction downshiftCommonReducer(state, action, stateChangeTypes) {\n const {\n type,\n props\n } = action;\n let changes;\n switch (type) {\n case stateChangeTypes.ItemMouseMove:\n changes = {\n highlightedIndex: action.disabled ? -1 : action.index\n };\n break;\n case stateChangeTypes.MenuMouseLeave:\n changes = {\n highlightedIndex: -1\n };\n break;\n case stateChangeTypes.ToggleButtonClick:\n case stateChangeTypes.FunctionToggleMenu:\n changes = {\n isOpen: !state.isOpen,\n highlightedIndex: state.isOpen ? -1 : getHighlightedIndexOnOpen(props, state, 0)\n };\n break;\n case stateChangeTypes.FunctionOpenMenu:\n changes = {\n isOpen: true,\n highlightedIndex: getHighlightedIndexOnOpen(props, state, 0)\n };\n break;\n case stateChangeTypes.FunctionCloseMenu:\n changes = {\n isOpen: false\n };\n break;\n case stateChangeTypes.FunctionSetHighlightedIndex:\n changes = {\n highlightedIndex: action.highlightedIndex\n };\n break;\n case stateChangeTypes.FunctionSetInputValue:\n changes = {\n inputValue: action.inputValue\n };\n break;\n case stateChangeTypes.FunctionReset:\n changes = {\n highlightedIndex: getDefaultValue$1(props, 'highlightedIndex'),\n isOpen: getDefaultValue$1(props, 'isOpen'),\n selectedItem: getDefaultValue$1(props, 'selectedItem'),\n inputValue: getDefaultValue$1(props, 'inputValue')\n };\n break;\n default:\n throw new Error('Reducer called without proper action type.');\n }\n return {\n ...state,\n ...changes\n };\n}\n/* eslint-enable complexity */\n\nfunction getItemIndexByCharacterKey(_a) {\n var keysSoFar = _a.keysSoFar, highlightedIndex = _a.highlightedIndex, items = _a.items, itemToString = _a.itemToString, getItemNodeFromIndex = _a.getItemNodeFromIndex;\n var lowerCasedKeysSoFar = keysSoFar.toLowerCase();\n for (var index = 0; index < items.length; index++) {\n var offsetIndex = (index + highlightedIndex + 1) % items.length;\n var item = items[offsetIndex];\n if (item !== undefined &&\n itemToString(item)\n .toLowerCase()\n .startsWith(lowerCasedKeysSoFar)) {\n var element = getItemNodeFromIndex(offsetIndex);\n if (!(element === null || element === void 0 ? void 0 : element.hasAttribute('disabled'))) {\n return offsetIndex;\n }\n }\n }\n return highlightedIndex;\n}\nvar propTypes$2 = {\n items: PropTypes.array.isRequired,\n itemToString: PropTypes.func,\n getA11yStatusMessage: PropTypes.func,\n getA11ySelectionMessage: PropTypes.func,\n highlightedIndex: PropTypes.number,\n defaultHighlightedIndex: PropTypes.number,\n initialHighlightedIndex: PropTypes.number,\n isOpen: PropTypes.bool,\n defaultIsOpen: PropTypes.bool,\n initialIsOpen: PropTypes.bool,\n selectedItem: PropTypes.any,\n initialSelectedItem: PropTypes.any,\n defaultSelectedItem: PropTypes.any,\n id: PropTypes.string,\n labelId: PropTypes.string,\n menuId: PropTypes.string,\n getItemId: PropTypes.func,\n toggleButtonId: PropTypes.string,\n stateReducer: PropTypes.func,\n onSelectedItemChange: PropTypes.func,\n onHighlightedIndexChange: PropTypes.func,\n onStateChange: PropTypes.func,\n onIsOpenChange: PropTypes.func,\n environment: PropTypes.shape({\n addEventListener: PropTypes.func,\n removeEventListener: PropTypes.func,\n document: PropTypes.shape({\n getElementById: PropTypes.func,\n activeElement: PropTypes.any,\n body: PropTypes.any\n })\n })\n};\n/**\n * Default implementation for status message. Only added when menu is open.\n * Will specift if there are results in the list, and if so, how many,\n * and what keys are relevant.\n *\n * @param {Object} param the downshift state and other relevant properties\n * @return {String} the a11y status message\n */\nfunction getA11yStatusMessage(_a) {\n var isOpen = _a.isOpen, resultCount = _a.resultCount, previousResultCount = _a.previousResultCount;\n if (!isOpen) {\n return '';\n }\n if (!resultCount) {\n return 'No results are available.';\n }\n if (resultCount !== previousResultCount) {\n return \"\".concat(resultCount, \" result\").concat(resultCount === 1 ? ' is' : 's are', \" available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.\");\n }\n return '';\n}\nvar defaultProps$2 = __assign(__assign({}, defaultProps$3), { getA11yStatusMessage: getA11yStatusMessage });\n// eslint-disable-next-line import/no-mutable-exports\nvar validatePropTypes$2 = noop;\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n validatePropTypes$2 = function (options, caller) {\n PropTypes.checkPropTypes(propTypes$2, options, 'prop', caller.name);\n };\n}\n\nconst ToggleButtonClick$1 = process.env.NODE_ENV !== \"production\" ? '__togglebutton_click__' : 0;\nconst ToggleButtonKeyDownArrowDown = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_arrow_down__' : 1;\nconst ToggleButtonKeyDownArrowUp = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_arrow_up__' : 2;\nconst ToggleButtonKeyDownCharacter = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_character__' : 3;\nconst ToggleButtonKeyDownEscape = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_escape__' : 4;\nconst ToggleButtonKeyDownHome = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_home__' : 5;\nconst ToggleButtonKeyDownEnd = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_end__' : 6;\nconst ToggleButtonKeyDownEnter = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_enter__' : 7;\nconst ToggleButtonKeyDownSpaceButton = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_space_button__' : 8;\nconst ToggleButtonKeyDownPageUp = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_page_up__' : 9;\nconst ToggleButtonKeyDownPageDown = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_page_down__' : 10;\nconst ToggleButtonBlur = process.env.NODE_ENV !== \"production\" ? '__togglebutton_blur__' : 11;\nconst MenuMouseLeave$1 = process.env.NODE_ENV !== \"production\" ? '__menu_mouse_leave__' : 12;\nconst ItemMouseMove$1 = process.env.NODE_ENV !== \"production\" ? '__item_mouse_move__' : 13;\nconst ItemClick$1 = process.env.NODE_ENV !== \"production\" ? '__item_click__' : 14;\nconst FunctionToggleMenu$1 = process.env.NODE_ENV !== \"production\" ? '__function_toggle_menu__' : 15;\nconst FunctionOpenMenu$1 = process.env.NODE_ENV !== \"production\" ? '__function_open_menu__' : 16;\nconst FunctionCloseMenu$1 = process.env.NODE_ENV !== \"production\" ? '__function_close_menu__' : 17;\nconst FunctionSetHighlightedIndex$1 = process.env.NODE_ENV !== \"production\" ? '__function_set_highlighted_index__' : 18;\nconst FunctionSelectItem$1 = process.env.NODE_ENV !== \"production\" ? '__function_select_item__' : 19;\nconst FunctionSetInputValue$1 = process.env.NODE_ENV !== \"production\" ? '__function_set_input_value__' : 20;\nconst FunctionReset$2 = process.env.NODE_ENV !== \"production\" ? '__function_reset__' : 21;\n\nvar stateChangeTypes$2 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n ToggleButtonClick: ToggleButtonClick$1,\n ToggleButtonKeyDownArrowDown: ToggleButtonKeyDownArrowDown,\n ToggleButtonKeyDownArrowUp: ToggleButtonKeyDownArrowUp,\n ToggleButtonKeyDownCharacter: ToggleButtonKeyDownCharacter,\n ToggleButtonKeyDownEscape: ToggleButtonKeyDownEscape,\n ToggleButtonKeyDownHome: ToggleButtonKeyDownHome,\n ToggleButtonKeyDownEnd: ToggleButtonKeyDownEnd,\n ToggleButtonKeyDownEnter: ToggleButtonKeyDownEnter,\n ToggleButtonKeyDownSpaceButton: ToggleButtonKeyDownSpaceButton,\n ToggleButtonKeyDownPageUp: ToggleButtonKeyDownPageUp,\n ToggleButtonKeyDownPageDown: ToggleButtonKeyDownPageDown,\n ToggleButtonBlur: ToggleButtonBlur,\n MenuMouseLeave: MenuMouseLeave$1,\n ItemMouseMove: ItemMouseMove$1,\n ItemClick: ItemClick$1,\n FunctionToggleMenu: FunctionToggleMenu$1,\n FunctionOpenMenu: FunctionOpenMenu$1,\n FunctionCloseMenu: FunctionCloseMenu$1,\n FunctionSetHighlightedIndex: FunctionSetHighlightedIndex$1,\n FunctionSelectItem: FunctionSelectItem$1,\n FunctionSetInputValue: FunctionSetInputValue$1,\n FunctionReset: FunctionReset$2\n});\n\n/* eslint-disable complexity */\nfunction downshiftSelectReducer(state, action) {\n const {\n type,\n props,\n altKey\n } = action;\n let changes;\n switch (type) {\n case ItemClick$1:\n changes = {\n isOpen: getDefaultValue$1(props, 'isOpen'),\n highlightedIndex: getDefaultValue$1(props, 'highlightedIndex'),\n selectedItem: props.items[action.index]\n };\n break;\n case ToggleButtonKeyDownCharacter:\n {\n const lowercasedKey = action.key;\n const inputValue = `${state.inputValue}${lowercasedKey}`;\n const prevHighlightedIndex = !state.isOpen && state.selectedItem ? props.items.indexOf(state.selectedItem) : state.highlightedIndex;\n const highlightedIndex = getItemIndexByCharacterKey({\n keysSoFar: inputValue,\n highlightedIndex: prevHighlightedIndex,\n items: props.items,\n itemToString: props.itemToString,\n getItemNodeFromIndex: action.getItemNodeFromIndex\n });\n changes = {\n inputValue,\n highlightedIndex,\n isOpen: true\n };\n }\n break;\n case ToggleButtonKeyDownArrowDown:\n {\n const highlightedIndex = state.isOpen ? getNextWrappingIndex(1, state.highlightedIndex, props.items.length, action.getItemNodeFromIndex, false) : altKey && state.selectedItem == null ? -1 : getHighlightedIndexOnOpen(props, state, 1);\n changes = {\n highlightedIndex,\n isOpen: true\n };\n }\n break;\n case ToggleButtonKeyDownArrowUp:\n if (state.isOpen && altKey) {\n changes = {\n isOpen: getDefaultValue$1(props, 'isOpen'),\n highlightedIndex: getDefaultValue$1(props, 'highlightedIndex'),\n ...(state.highlightedIndex >= 0 && {\n selectedItem: props.items[state.highlightedIndex]\n })\n };\n } else {\n const highlightedIndex = state.isOpen ? getNextWrappingIndex(-1, state.highlightedIndex, props.items.length, action.getItemNodeFromIndex, false) : getHighlightedIndexOnOpen(props, state, -1);\n changes = {\n highlightedIndex,\n isOpen: true\n };\n }\n break;\n // only triggered when menu is open.\n case ToggleButtonKeyDownEnter:\n case ToggleButtonKeyDownSpaceButton:\n changes = {\n isOpen: getDefaultValue$1(props, 'isOpen'),\n highlightedIndex: getDefaultValue$1(props, 'highlightedIndex'),\n ...(state.highlightedIndex >= 0 && {\n selectedItem: props.items[state.highlightedIndex]\n })\n };\n break;\n case ToggleButtonKeyDownHome:\n changes = {\n highlightedIndex: getNextNonDisabledIndex(1, 0, props.items.length, action.getItemNodeFromIndex, false),\n isOpen: true\n };\n break;\n case ToggleButtonKeyDownEnd:\n changes = {\n highlightedIndex: getNextNonDisabledIndex(-1, props.items.length - 1, props.items.length, action.getItemNodeFromIndex, false),\n isOpen: true\n };\n break;\n case ToggleButtonKeyDownPageUp:\n changes = {\n highlightedIndex: getNextWrappingIndex(-10, state.highlightedIndex, props.items.length, action.getItemNodeFromIndex, false)\n };\n break;\n case ToggleButtonKeyDownPageDown:\n changes = {\n highlightedIndex: getNextWrappingIndex(10, state.highlightedIndex, props.items.length, action.getItemNodeFromIndex, false)\n };\n break;\n case ToggleButtonKeyDownEscape:\n changes = {\n isOpen: false,\n highlightedIndex: -1\n };\n break;\n case ToggleButtonBlur:\n changes = {\n isOpen: false,\n highlightedIndex: -1,\n ...(state.highlightedIndex >= 0 && {\n selectedItem: props.items[state.highlightedIndex]\n })\n };\n break;\n case FunctionSelectItem$1:\n changes = {\n selectedItem: action.selectedItem\n };\n break;\n default:\n return downshiftCommonReducer(state, action, stateChangeTypes$2);\n }\n return {\n ...state,\n ...changes\n };\n}\n/* eslint-enable complexity */\n\nuseSelect.stateChangeTypes = stateChangeTypes$2;\nfunction useSelect(userProps) {\n if (userProps === void 0) {\n userProps = {};\n }\n validatePropTypes$2(userProps, useSelect);\n // Props defaults and destructuring.\n const props = {\n ...defaultProps$2,\n ...userProps\n };\n const {\n items,\n scrollIntoView,\n environment,\n itemToString,\n getA11ySelectionMessage,\n getA11yStatusMessage\n } = props;\n // Initial state depending on controlled props.\n const initialState = getInitialState$2(props);\n const [state, dispatch] = useControlledReducer$1(downshiftSelectReducer, initialState, props);\n const {\n isOpen,\n highlightedIndex,\n selectedItem,\n inputValue\n } = state;\n\n // Element efs.\n const toggleButtonRef = useRef(null);\n const menuRef = useRef(null);\n const itemRefs = useRef({});\n // used to keep the inputValue clearTimeout object between renders.\n const clearTimeoutRef = useRef(null);\n // prevent id re-generation between renders.\n const elementIds = useElementIds(props);\n // used to keep track of how many items we had on previous cycle.\n const previousResultCountRef = useRef();\n const isInitialMountRef = useRef(true);\n // utility callback to get item element.\n const latest = useLatestRef({\n state,\n props\n });\n\n // Some utils.\n const getItemNodeFromIndex = useCallback(index => itemRefs.current[elementIds.getItemId(index)], [elementIds]);\n\n // Effects.\n // Sets a11y status message on changes in state.\n useA11yMessageSetter(getA11yStatusMessage, [isOpen, highlightedIndex, inputValue, items], {\n isInitialMount: isInitialMountRef.current,\n previousResultCount: previousResultCountRef.current,\n items,\n environment,\n itemToString,\n ...state\n });\n // Sets a11y status message on changes in selectedItem.\n useA11yMessageSetter(getA11ySelectionMessage, [selectedItem], {\n isInitialMount: isInitialMountRef.current,\n previousResultCount: previousResultCountRef.current,\n items,\n environment,\n itemToString,\n ...state\n });\n // Scroll on highlighted item if change comes from keyboard.\n const shouldScrollRef = useScrollIntoView({\n menuElement: menuRef.current,\n highlightedIndex,\n isOpen,\n itemRefs,\n scrollIntoView,\n getItemNodeFromIndex\n });\n\n // Sets cleanup for the keysSoFar callback, debounded after 500ms.\n useEffect(() => {\n // init the clean function here as we need access to dispatch.\n clearTimeoutRef.current = debounce(outerDispatch => {\n outerDispatch({\n type: FunctionSetInputValue$1,\n inputValue: ''\n });\n }, 500);\n\n // Cancel any pending debounced calls on mount\n return () => {\n clearTimeoutRef.current.cancel();\n };\n }, []);\n\n // Invokes the keysSoFar callback set up above.\n useEffect(() => {\n if (!inputValue) {\n return;\n }\n clearTimeoutRef.current(dispatch);\n }, [dispatch, inputValue]);\n useControlPropsValidator({\n isInitialMount: isInitialMountRef.current,\n props,\n state\n });\n useEffect(() => {\n if (isInitialMountRef.current) {\n return;\n }\n previousResultCountRef.current = items.length;\n });\n // Add mouse/touch events to document.\n const mouseAndTouchTrackersRef = useMouseAndTouchTracker(isOpen, [menuRef, toggleButtonRef], environment, () => {\n dispatch({\n type: ToggleButtonBlur\n });\n });\n const setGetterPropCallInfo = useGetterPropsCalledChecker('getMenuProps', 'getToggleButtonProps');\n // Make initial ref false.\n useEffect(() => {\n isInitialMountRef.current = false;\n }, []);\n // Reset itemRefs on close.\n useEffect(() => {\n if (!isOpen) {\n itemRefs.current = {};\n }\n }, [isOpen]);\n\n // Event handler functions.\n const toggleButtonKeyDownHandlers = useMemo(() => ({\n ArrowDown(event) {\n event.preventDefault();\n dispatch({\n type: ToggleButtonKeyDownArrowDown,\n getItemNodeFromIndex,\n altKey: event.altKey\n });\n },\n ArrowUp(event) {\n event.preventDefault();\n dispatch({\n type: ToggleButtonKeyDownArrowUp,\n getItemNodeFromIndex,\n altKey: event.altKey\n });\n },\n Home(event) {\n event.preventDefault();\n dispatch({\n type: ToggleButtonKeyDownHome,\n getItemNodeFromIndex\n });\n },\n End(event) {\n event.preventDefault();\n dispatch({\n type: ToggleButtonKeyDownEnd,\n getItemNodeFromIndex\n });\n },\n Escape() {\n if (latest.current.state.isOpen) {\n dispatch({\n type: ToggleButtonKeyDownEscape\n });\n }\n },\n Enter(event) {\n event.preventDefault();\n dispatch({\n type: latest.current.state.isOpen ? ToggleButtonKeyDownEnter : ToggleButtonClick$1\n });\n },\n PageUp(event) {\n if (latest.current.state.isOpen) {\n event.preventDefault();\n dispatch({\n type: ToggleButtonKeyDownPageUp,\n getItemNodeFromIndex\n });\n }\n },\n PageDown(event) {\n if (latest.current.state.isOpen) {\n event.preventDefault();\n dispatch({\n type: ToggleButtonKeyDownPageDown,\n getItemNodeFromIndex\n });\n }\n },\n ' '(event) {\n event.preventDefault();\n dispatch({\n type: latest.current.state.isOpen ? ToggleButtonKeyDownSpaceButton : ToggleButtonClick$1\n });\n }\n }), [dispatch, getItemNodeFromIndex, latest]);\n\n // Action functions.\n const toggleMenu = useCallback(() => {\n dispatch({\n type: FunctionToggleMenu$1\n });\n }, [dispatch]);\n const closeMenu = useCallback(() => {\n dispatch({\n type: FunctionCloseMenu$1\n });\n }, [dispatch]);\n const openMenu = useCallback(() => {\n dispatch({\n type: FunctionOpenMenu$1\n });\n }, [dispatch]);\n const setHighlightedIndex = useCallback(newHighlightedIndex => {\n dispatch({\n type: FunctionSetHighlightedIndex$1,\n highlightedIndex: newHighlightedIndex\n });\n }, [dispatch]);\n const selectItem = useCallback(newSelectedItem => {\n dispatch({\n type: FunctionSelectItem$1,\n selectedItem: newSelectedItem\n });\n }, [dispatch]);\n const reset = useCallback(() => {\n dispatch({\n type: FunctionReset$2\n });\n }, [dispatch]);\n const setInputValue = useCallback(newInputValue => {\n dispatch({\n type: FunctionSetInputValue$1,\n inputValue: newInputValue\n });\n }, [dispatch]);\n // Getter functions.\n const getLabelProps = useCallback(labelProps => ({\n id: elementIds.labelId,\n htmlFor: elementIds.toggleButtonId,\n ...labelProps\n }), [elementIds]);\n const getMenuProps = useCallback(function (_temp, _temp2) {\n let {\n onMouseLeave,\n refKey = 'ref',\n onKeyDown,\n onBlur,\n ref,\n ...rest\n } = _temp === void 0 ? {} : _temp;\n let {\n suppressRefError = false\n } = _temp2 === void 0 ? {} : _temp2;\n const menuHandleMouseLeave = () => {\n dispatch({\n type: MenuMouseLeave$1\n });\n };\n setGetterPropCallInfo('getMenuProps', suppressRefError, refKey, menuRef);\n return {\n [refKey]: handleRefs(ref, menuNode => {\n menuRef.current = menuNode;\n }),\n id: elementIds.menuId,\n role: 'listbox',\n 'aria-labelledby': elementIds.labelId,\n tabIndex: -1,\n onMouseLeave: callAllEventHandlers(onMouseLeave, menuHandleMouseLeave),\n ...rest\n };\n }, [dispatch, setGetterPropCallInfo, elementIds]);\n const getToggleButtonProps = useCallback(function (_temp3, _temp4) {\n let {\n onBlur,\n onClick,\n onKeyDown,\n refKey = 'ref',\n ref,\n ...rest\n } = _temp3 === void 0 ? {} : _temp3;\n let {\n suppressRefError = false\n } = _temp4 === void 0 ? {} : _temp4;\n const latestState = latest.current.state;\n const toggleButtonHandleClick = () => {\n dispatch({\n type: ToggleButtonClick$1\n });\n };\n const toggleButtonHandleBlur = () => {\n if (latestState.isOpen && !mouseAndTouchTrackersRef.current.isMouseDown) {\n dispatch({\n type: ToggleButtonBlur\n });\n }\n };\n const toggleButtonHandleKeyDown = event => {\n const key = normalizeArrowKey(event);\n if (key && toggleButtonKeyDownHandlers[key]) {\n toggleButtonKeyDownHandlers[key](event);\n } else if (isAcceptedCharacterKey(key)) {\n dispatch({\n type: ToggleButtonKeyDownCharacter,\n key,\n getItemNodeFromIndex\n });\n }\n };\n const toggleProps = {\n [refKey]: handleRefs(ref, toggleButtonNode => {\n toggleButtonRef.current = toggleButtonNode;\n }),\n 'aria-activedescendant': latestState.isOpen && latestState.highlightedIndex > -1 ? elementIds.getItemId(latestState.highlightedIndex) : '',\n 'aria-controls': elementIds.menuId,\n 'aria-expanded': latest.current.state.isOpen,\n 'aria-haspopup': 'listbox',\n 'aria-labelledby': `${elementIds.labelId} ${elementIds.toggleButtonId}`,\n id: elementIds.toggleButtonId,\n role: 'combobox',\n tabIndex: 0,\n onBlur: callAllEventHandlers(onBlur, toggleButtonHandleBlur),\n ...rest\n };\n if (!rest.disabled) {\n toggleProps.onClick = callAllEventHandlers(onClick, toggleButtonHandleClick);\n toggleProps.onKeyDown = callAllEventHandlers(onKeyDown, toggleButtonHandleKeyDown);\n }\n setGetterPropCallInfo('getToggleButtonProps', suppressRefError, refKey, toggleButtonRef);\n return toggleProps;\n }, [latest, elementIds, setGetterPropCallInfo, dispatch, mouseAndTouchTrackersRef, toggleButtonKeyDownHandlers, getItemNodeFromIndex]);\n const getItemProps = useCallback(function (_temp5) {\n let {\n item: itemProp,\n index: indexProp,\n onMouseMove,\n onClick,\n refKey = 'ref',\n ref,\n disabled,\n ...rest\n } = _temp5 === void 0 ? {} : _temp5;\n const {\n state: latestState,\n props: latestProps\n } = latest.current;\n const item = itemProp ?? items[indexProp];\n const index = getItemIndex(indexProp, item, latestProps.items);\n const itemHandleMouseMove = () => {\n if (index === latestState.highlightedIndex) {\n return;\n }\n shouldScrollRef.current = false;\n dispatch({\n type: ItemMouseMove$1,\n index,\n disabled\n });\n };\n const itemHandleClick = () => {\n dispatch({\n type: ItemClick$1,\n index\n });\n };\n const itemIndex = getItemIndex(index, item, latestProps.items);\n if (itemIndex < 0) {\n throw new Error('Pass either item or item index in getItemProps!');\n }\n const itemProps = {\n disabled,\n role: 'option',\n 'aria-selected': `${item === selectedItem}`,\n id: elementIds.getItemId(itemIndex),\n [refKey]: handleRefs(ref, itemNode => {\n if (itemNode) {\n itemRefs.current[elementIds.getItemId(itemIndex)] = itemNode;\n }\n }),\n ...rest\n };\n if (!disabled) {\n itemProps.onClick = callAllEventHandlers(onClick, itemHandleClick);\n }\n itemProps.onMouseMove = callAllEventHandlers(onMouseMove, itemHandleMouseMove);\n return itemProps;\n }, [latest, items, selectedItem, elementIds, shouldScrollRef, dispatch]);\n return {\n // prop getters.\n getToggleButtonProps,\n getLabelProps,\n getMenuProps,\n getItemProps,\n // actions.\n toggleMenu,\n openMenu,\n closeMenu,\n setHighlightedIndex,\n selectItem,\n reset,\n setInputValue,\n // state.\n highlightedIndex,\n isOpen,\n selectedItem,\n inputValue\n };\n}\n\nconst InputKeyDownArrowDown = process.env.NODE_ENV !== \"production\" ? '__input_keydown_arrow_down__' : 0;\nconst InputKeyDownArrowUp = process.env.NODE_ENV !== \"production\" ? '__input_keydown_arrow_up__' : 1;\nconst InputKeyDownEscape = process.env.NODE_ENV !== \"production\" ? '__input_keydown_escape__' : 2;\nconst InputKeyDownHome = process.env.NODE_ENV !== \"production\" ? '__input_keydown_home__' : 3;\nconst InputKeyDownEnd = process.env.NODE_ENV !== \"production\" ? '__input_keydown_end__' : 4;\nconst InputKeyDownPageUp = process.env.NODE_ENV !== \"production\" ? '__input_keydown_page_up__' : 5;\nconst InputKeyDownPageDown = process.env.NODE_ENV !== \"production\" ? '__input_keydown_page_down__' : 6;\nconst InputKeyDownEnter = process.env.NODE_ENV !== \"production\" ? '__input_keydown_enter__' : 7;\nconst InputChange = process.env.NODE_ENV !== \"production\" ? '__input_change__' : 8;\nconst InputBlur = process.env.NODE_ENV !== \"production\" ? '__input_blur__' : 9;\nconst InputFocus = process.env.NODE_ENV !== \"production\" ? '__input_focus__' : 10;\nconst MenuMouseLeave = process.env.NODE_ENV !== \"production\" ? '__menu_mouse_leave__' : 11;\nconst ItemMouseMove = process.env.NODE_ENV !== \"production\" ? '__item_mouse_move__' : 12;\nconst ItemClick = process.env.NODE_ENV !== \"production\" ? '__item_click__' : 13;\nconst ToggleButtonClick = process.env.NODE_ENV !== \"production\" ? '__togglebutton_click__' : 14;\nconst FunctionToggleMenu = process.env.NODE_ENV !== \"production\" ? '__function_toggle_menu__' : 15;\nconst FunctionOpenMenu = process.env.NODE_ENV !== \"production\" ? '__function_open_menu__' : 16;\nconst FunctionCloseMenu = process.env.NODE_ENV !== \"production\" ? '__function_close_menu__' : 17;\nconst FunctionSetHighlightedIndex = process.env.NODE_ENV !== \"production\" ? '__function_set_highlighted_index__' : 18;\nconst FunctionSelectItem = process.env.NODE_ENV !== \"production\" ? '__function_select_item__' : 19;\nconst FunctionSetInputValue = process.env.NODE_ENV !== \"production\" ? '__function_set_input_value__' : 20;\nconst FunctionReset$1 = process.env.NODE_ENV !== \"production\" ? '__function_reset__' : 21;\nconst ControlledPropUpdatedSelectedItem = process.env.NODE_ENV !== \"production\" ? '__controlled_prop_updated_selected_item__' : 22;\n\nvar stateChangeTypes$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n InputKeyDownArrowDown: InputKeyDownArrowDown,\n InputKeyDownArrowUp: InputKeyDownArrowUp,\n InputKeyDownEscape: InputKeyDownEscape,\n InputKeyDownHome: InputKeyDownHome,\n InputKeyDownEnd: InputKeyDownEnd,\n InputKeyDownPageUp: InputKeyDownPageUp,\n InputKeyDownPageDown: InputKeyDownPageDown,\n InputKeyDownEnter: InputKeyDownEnter,\n InputChange: InputChange,\n InputBlur: InputBlur,\n InputFocus: InputFocus,\n MenuMouseLeave: MenuMouseLeave,\n ItemMouseMove: ItemMouseMove,\n ItemClick: ItemClick,\n ToggleButtonClick: ToggleButtonClick,\n FunctionToggleMenu: FunctionToggleMenu,\n FunctionOpenMenu: FunctionOpenMenu,\n FunctionCloseMenu: FunctionCloseMenu,\n FunctionSetHighlightedIndex: FunctionSetHighlightedIndex,\n FunctionSelectItem: FunctionSelectItem,\n FunctionSetInputValue: FunctionSetInputValue,\n FunctionReset: FunctionReset$1,\n ControlledPropUpdatedSelectedItem: ControlledPropUpdatedSelectedItem\n});\n\nfunction getInitialState$1(props) {\n const initialState = getInitialState$2(props);\n const {\n selectedItem\n } = initialState;\n let {\n inputValue\n } = initialState;\n if (inputValue === '' && selectedItem && props.defaultInputValue === undefined && props.initialInputValue === undefined && props.inputValue === undefined) {\n inputValue = props.itemToString(selectedItem);\n }\n return {\n ...initialState,\n inputValue\n };\n}\nconst propTypes$1 = {\n items: PropTypes.array.isRequired,\n itemToString: PropTypes.func,\n getA11yStatusMessage: PropTypes.func,\n getA11ySelectionMessage: PropTypes.func,\n highlightedIndex: PropTypes.number,\n defaultHighlightedIndex: PropTypes.number,\n initialHighlightedIndex: PropTypes.number,\n isOpen: PropTypes.bool,\n defaultIsOpen: PropTypes.bool,\n initialIsOpen: PropTypes.bool,\n selectedItem: PropTypes.any,\n initialSelectedItem: PropTypes.any,\n defaultSelectedItem: PropTypes.any,\n inputValue: PropTypes.string,\n defaultInputValue: PropTypes.string,\n initialInputValue: PropTypes.string,\n id: PropTypes.string,\n labelId: PropTypes.string,\n menuId: PropTypes.string,\n getItemId: PropTypes.func,\n inputId: PropTypes.string,\n toggleButtonId: PropTypes.string,\n stateReducer: PropTypes.func,\n onSelectedItemChange: PropTypes.func,\n onHighlightedIndexChange: PropTypes.func,\n onStateChange: PropTypes.func,\n onIsOpenChange: PropTypes.func,\n onInputValueChange: PropTypes.func,\n environment: PropTypes.shape({\n addEventListener: PropTypes.func,\n removeEventListener: PropTypes.func,\n document: PropTypes.shape({\n getElementById: PropTypes.func,\n activeElement: PropTypes.any,\n body: PropTypes.any\n })\n })\n};\n\n/**\n * The useCombobox version of useControlledReducer, which also\n * checks if the controlled prop selectedItem changed between\n * renders. If so, it will also update inputValue with its\n * string equivalent. It uses the common useEnhancedReducer to\n * compute the rest of the state.\n *\n * @param {Function} reducer Reducer function from downshift.\n * @param {Object} initialState Initial state of the hook.\n * @param {Object} props The hook props.\n * @returns {Array} An array with the state and an action dispatcher.\n */\nfunction useControlledReducer(reducer, initialState, props) {\n const previousSelectedItemRef = useRef();\n const [state, dispatch] = useEnhancedReducer(reducer, initialState, props);\n\n // ToDo: if needed, make same approach as selectedItemChanged from Downshift.\n useEffect(() => {\n if (isControlledProp(props, 'selectedItem')) {\n if (previousSelectedItemRef.current !== props.selectedItem) {\n dispatch({\n type: ControlledPropUpdatedSelectedItem,\n inputValue: props.itemToString(props.selectedItem)\n });\n }\n previousSelectedItemRef.current = state.selectedItem === previousSelectedItemRef.current ? props.selectedItem : state.selectedItem;\n }\n });\n return [getState(state, props), dispatch];\n}\n\n// eslint-disable-next-line import/no-mutable-exports\nlet validatePropTypes$1 = noop;\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n validatePropTypes$1 = (options, caller) => {\n PropTypes.checkPropTypes(propTypes$1, options, 'prop', caller.name);\n };\n}\nconst defaultProps$1 = {\n ...defaultProps$3,\n getA11yStatusMessage: getA11yStatusMessage$1\n};\n\n/* eslint-disable complexity */\nfunction downshiftUseComboboxReducer(state, action) {\n const {\n type,\n props,\n altKey\n } = action;\n let changes;\n switch (type) {\n case ItemClick:\n changes = {\n isOpen: getDefaultValue$1(props, 'isOpen'),\n highlightedIndex: getDefaultValue$1(props, 'highlightedIndex'),\n selectedItem: props.items[action.index],\n inputValue: props.itemToString(props.items[action.index])\n };\n break;\n case InputKeyDownArrowDown:\n if (state.isOpen) {\n changes = {\n highlightedIndex: getNextWrappingIndex(1, state.highlightedIndex, props.items.length, action.getItemNodeFromIndex, true)\n };\n } else {\n changes = {\n highlightedIndex: altKey && state.selectedItem == null ? -1 : getHighlightedIndexOnOpen(props, state, 1, action.getItemNodeFromIndex),\n isOpen: props.items.length >= 0\n };\n }\n break;\n case InputKeyDownArrowUp:\n if (state.isOpen) {\n if (altKey) {\n changes = {\n isOpen: getDefaultValue$1(props, 'isOpen'),\n highlightedIndex: getDefaultValue$1(props, 'highlightedIndex'),\n ...(state.highlightedIndex >= 0 && {\n selectedItem: props.items[state.highlightedIndex],\n inputValue: props.itemToString(props.items[state.highlightedIndex])\n })\n };\n } else {\n changes = {\n highlightedIndex: getNextWrappingIndex(-1, state.highlightedIndex, props.items.length, action.getItemNodeFromIndex, true)\n };\n }\n } else {\n changes = {\n highlightedIndex: getHighlightedIndexOnOpen(props, state, -1, action.getItemNodeFromIndex),\n isOpen: props.items.length >= 0\n };\n }\n break;\n case InputKeyDownEnter:\n changes = {\n isOpen: getDefaultValue$1(props, 'isOpen'),\n highlightedIndex: getDefaultValue$1(props, 'highlightedIndex'),\n ...(state.highlightedIndex >= 0 && {\n selectedItem: props.items[state.highlightedIndex],\n inputValue: props.itemToString(props.items[state.highlightedIndex])\n })\n };\n break;\n case InputKeyDownEscape:\n changes = {\n isOpen: false,\n highlightedIndex: -1,\n ...(!state.isOpen && {\n selectedItem: null,\n inputValue: ''\n })\n };\n break;\n case InputKeyDownPageUp:\n changes = {\n highlightedIndex: getNextWrappingIndex(-10, state.highlightedIndex, props.items.length, action.getItemNodeFromIndex, false)\n };\n break;\n case InputKeyDownPageDown:\n changes = {\n highlightedIndex: getNextWrappingIndex(10, state.highlightedIndex, props.items.length, action.getItemNodeFromIndex, false)\n };\n break;\n case InputKeyDownHome:\n changes = {\n highlightedIndex: getNextNonDisabledIndex(1, 0, props.items.length, action.getItemNodeFromIndex, false)\n };\n break;\n case InputKeyDownEnd:\n changes = {\n highlightedIndex: getNextNonDisabledIndex(-1, props.items.length - 1, props.items.length, action.getItemNodeFromIndex, false)\n };\n break;\n case InputBlur:\n changes = {\n isOpen: false,\n highlightedIndex: -1,\n ...(state.highlightedIndex >= 0 && action.selectItem && {\n selectedItem: props.items[state.highlightedIndex],\n inputValue: props.itemToString(props.items[state.highlightedIndex])\n })\n };\n break;\n case InputChange:\n changes = {\n isOpen: true,\n highlightedIndex: getDefaultValue$1(props, 'highlightedIndex'),\n inputValue: action.inputValue\n };\n break;\n case InputFocus:\n changes = {\n isOpen: true,\n highlightedIndex: getHighlightedIndexOnOpen(props, state, 0)\n };\n break;\n case FunctionSelectItem:\n changes = {\n selectedItem: action.selectedItem,\n inputValue: props.itemToString(action.selectedItem)\n };\n break;\n case ControlledPropUpdatedSelectedItem:\n changes = {\n inputValue: action.inputValue\n };\n break;\n default:\n return downshiftCommonReducer(state, action, stateChangeTypes$1);\n }\n return {\n ...state,\n ...changes\n };\n}\n/* eslint-enable complexity */\n\n/* eslint-disable max-statements */\nuseCombobox.stateChangeTypes = stateChangeTypes$1;\nfunction useCombobox(userProps) {\n if (userProps === void 0) {\n userProps = {};\n }\n validatePropTypes$1(userProps, useCombobox);\n // Props defaults and destructuring.\n const props = {\n ...defaultProps$1,\n ...userProps\n };\n const {\n initialIsOpen,\n defaultIsOpen,\n items,\n scrollIntoView,\n environment,\n getA11yStatusMessage,\n getA11ySelectionMessage,\n itemToString\n } = props;\n // Initial state depending on controlled props.\n const initialState = getInitialState$1(props);\n const [state, dispatch] = useControlledReducer(downshiftUseComboboxReducer, initialState, props);\n const {\n isOpen,\n highlightedIndex,\n selectedItem,\n inputValue\n } = state;\n\n // Element refs.\n const menuRef = useRef(null);\n const itemRefs = useRef({});\n const inputRef = useRef(null);\n const toggleButtonRef = useRef(null);\n const isInitialMountRef = useRef(true);\n // prevent id re-generation between renders.\n const elementIds = useElementIds(props);\n // used to keep track of how many items we had on previous cycle.\n const previousResultCountRef = useRef();\n // utility callback to get item element.\n const latest = useLatestRef({\n state,\n props\n });\n const getItemNodeFromIndex = useCallback(index => itemRefs.current[elementIds.getItemId(index)], [elementIds]);\n\n // Effects.\n // Sets a11y status message on changes in state.\n useA11yMessageSetter(getA11yStatusMessage, [isOpen, highlightedIndex, inputValue, items], {\n isInitialMount: isInitialMountRef.current,\n previousResultCount: previousResultCountRef.current,\n items,\n environment,\n itemToString,\n ...state\n });\n // Sets a11y status message on changes in selectedItem.\n useA11yMessageSetter(getA11ySelectionMessage, [selectedItem], {\n isInitialMount: isInitialMountRef.current,\n previousResultCount: previousResultCountRef.current,\n items,\n environment,\n itemToString,\n ...state\n });\n // Scroll on highlighted item if change comes from keyboard.\n const shouldScrollRef = useScrollIntoView({\n menuElement: menuRef.current,\n highlightedIndex,\n isOpen,\n itemRefs,\n scrollIntoView,\n getItemNodeFromIndex\n });\n useControlPropsValidator({\n isInitialMount: isInitialMountRef.current,\n props,\n state\n });\n // Focus the input on first render if required.\n useEffect(() => {\n const focusOnOpen = initialIsOpen || defaultIsOpen || isOpen;\n if (focusOnOpen && inputRef.current) {\n inputRef.current.focus();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n useEffect(() => {\n if (isInitialMountRef.current) {\n return;\n }\n previousResultCountRef.current = items.length;\n });\n // Add mouse/touch events to document.\n const mouseAndTouchTrackersRef = useMouseAndTouchTracker(isOpen, [inputRef, menuRef, toggleButtonRef], environment, () => {\n dispatch({\n type: InputBlur,\n selectItem: false\n });\n });\n const setGetterPropCallInfo = useGetterPropsCalledChecker('getInputProps', 'getMenuProps');\n // Make initial ref false.\n useEffect(() => {\n isInitialMountRef.current = false;\n }, []);\n // Reset itemRefs on close.\n useEffect(() => {\n if (!isOpen) {\n itemRefs.current = {};\n } else if (document.activeElement !== inputRef.current) {\n var _inputRef$current;\n inputRef == null ? void 0 : (_inputRef$current = inputRef.current) == null ? void 0 : _inputRef$current.focus();\n }\n }, [isOpen]);\n\n /* Event handler functions */\n const inputKeyDownHandlers = useMemo(() => ({\n ArrowDown(event) {\n event.preventDefault();\n dispatch({\n type: InputKeyDownArrowDown,\n altKey: event.altKey,\n getItemNodeFromIndex\n });\n },\n ArrowUp(event) {\n event.preventDefault();\n dispatch({\n type: InputKeyDownArrowUp,\n altKey: event.altKey,\n getItemNodeFromIndex\n });\n },\n Home(event) {\n if (!latest.current.state.isOpen) {\n return;\n }\n event.preventDefault();\n dispatch({\n type: InputKeyDownHome,\n getItemNodeFromIndex\n });\n },\n End(event) {\n if (!latest.current.state.isOpen) {\n return;\n }\n event.preventDefault();\n dispatch({\n type: InputKeyDownEnd,\n getItemNodeFromIndex\n });\n },\n Escape(event) {\n const latestState = latest.current.state;\n if (latestState.isOpen || latestState.inputValue || latestState.selectedItem || latestState.highlightedIndex > -1) {\n event.preventDefault();\n dispatch({\n type: InputKeyDownEscape\n });\n }\n },\n Enter(event) {\n const latestState = latest.current.state;\n // if closed or no highlighted index, do nothing.\n if (!latestState.isOpen || event.which === 229 // if IME composing, wait for next Enter keydown event.\n ) {\n return;\n }\n event.preventDefault();\n dispatch({\n type: InputKeyDownEnter,\n getItemNodeFromIndex\n });\n },\n PageUp(event) {\n if (latest.current.state.isOpen) {\n event.preventDefault();\n dispatch({\n type: InputKeyDownPageUp,\n getItemNodeFromIndex\n });\n }\n },\n PageDown(event) {\n if (latest.current.state.isOpen) {\n event.preventDefault();\n dispatch({\n type: InputKeyDownPageDown,\n getItemNodeFromIndex\n });\n }\n }\n }), [dispatch, latest, getItemNodeFromIndex]);\n\n // Getter props.\n const getLabelProps = useCallback(labelProps => ({\n id: elementIds.labelId,\n htmlFor: elementIds.inputId,\n ...labelProps\n }), [elementIds]);\n const getMenuProps = useCallback(function (_temp, _temp2) {\n let {\n onMouseLeave,\n refKey = 'ref',\n ref,\n ...rest\n } = _temp === void 0 ? {} : _temp;\n let {\n suppressRefError = false\n } = _temp2 === void 0 ? {} : _temp2;\n setGetterPropCallInfo('getMenuProps', suppressRefError, refKey, menuRef);\n return {\n [refKey]: handleRefs(ref, menuNode => {\n menuRef.current = menuNode;\n }),\n id: elementIds.menuId,\n role: 'listbox',\n 'aria-labelledby': elementIds.labelId,\n onMouseLeave: callAllEventHandlers(onMouseLeave, () => {\n dispatch({\n type: MenuMouseLeave\n });\n }),\n ...rest\n };\n }, [dispatch, setGetterPropCallInfo, elementIds]);\n const getItemProps = useCallback(function (_temp3) {\n let {\n item,\n index,\n refKey = 'ref',\n ref,\n onMouseMove,\n onMouseDown,\n onClick,\n onPress,\n disabled,\n ...rest\n } = _temp3 === void 0 ? {} : _temp3;\n const {\n props: latestProps,\n state: latestState\n } = latest.current;\n const itemIndex = getItemIndex(index, item, latestProps.items);\n if (itemIndex < 0) {\n throw new Error('Pass either item or item index in getItemProps!');\n }\n const onSelectKey = 'onClick';\n const customClickHandler = onClick;\n const itemHandleMouseMove = () => {\n if (index === latestState.highlightedIndex) {\n return;\n }\n shouldScrollRef.current = false;\n dispatch({\n type: ItemMouseMove,\n index,\n disabled\n });\n };\n const itemHandleClick = () => {\n dispatch({\n type: ItemClick,\n index\n });\n };\n const itemHandleMouseDown = e => e.preventDefault();\n return {\n [refKey]: handleRefs(ref, itemNode => {\n if (itemNode) {\n itemRefs.current[elementIds.getItemId(itemIndex)] = itemNode;\n }\n }),\n disabled,\n role: 'option',\n 'aria-selected': `${itemIndex === latestState.highlightedIndex}`,\n id: elementIds.getItemId(itemIndex),\n ...(!disabled && {\n [onSelectKey]: callAllEventHandlers(customClickHandler, itemHandleClick)\n }),\n onMouseMove: callAllEventHandlers(onMouseMove, itemHandleMouseMove),\n onMouseDown: callAllEventHandlers(onMouseDown, itemHandleMouseDown),\n ...rest\n };\n }, [dispatch, latest, shouldScrollRef, elementIds]);\n const getToggleButtonProps = useCallback(function (_temp4) {\n let {\n onClick,\n onPress,\n refKey = 'ref',\n ref,\n ...rest\n } = _temp4 === void 0 ? {} : _temp4;\n const latestState = latest.current.state;\n const toggleButtonHandleClick = () => {\n dispatch({\n type: ToggleButtonClick\n });\n };\n return {\n [refKey]: handleRefs(ref, toggleButtonNode => {\n toggleButtonRef.current = toggleButtonNode;\n }),\n 'aria-controls': elementIds.menuId,\n 'aria-expanded': latestState.isOpen,\n id: elementIds.toggleButtonId,\n tabIndex: -1,\n ...(!rest.disabled && {\n ...({\n onClick: callAllEventHandlers(onClick, toggleButtonHandleClick)\n })\n }),\n ...rest\n };\n }, [dispatch, latest, elementIds]);\n const getInputProps = useCallback(function (_temp5, _temp6) {\n let {\n onKeyDown,\n onChange,\n onInput,\n onFocus,\n onBlur,\n onChangeText,\n refKey = 'ref',\n ref,\n ...rest\n } = _temp5 === void 0 ? {} : _temp5;\n let {\n suppressRefError = false\n } = _temp6 === void 0 ? {} : _temp6;\n setGetterPropCallInfo('getInputProps', suppressRefError, refKey, inputRef);\n const latestState = latest.current.state;\n const inputHandleKeyDown = event => {\n const key = normalizeArrowKey(event);\n if (key && inputKeyDownHandlers[key]) {\n inputKeyDownHandlers[key](event);\n }\n };\n const inputHandleChange = event => {\n dispatch({\n type: InputChange,\n inputValue: event.target.value\n });\n };\n const inputHandleBlur = () => {\n /* istanbul ignore else */\n if (latestState.isOpen && !mouseAndTouchTrackersRef.current.isMouseDown) {\n dispatch({\n type: InputBlur,\n selectItem: true\n });\n }\n };\n const inputHandleFocus = () => {\n if (!latestState.isOpen) {\n dispatch({\n type: InputFocus\n });\n }\n };\n\n /* istanbul ignore next (preact) */\n const onChangeKey = 'onChange';\n let eventHandlers = {};\n if (!rest.disabled) {\n eventHandlers = {\n [onChangeKey]: callAllEventHandlers(onChange, onInput, inputHandleChange),\n onKeyDown: callAllEventHandlers(onKeyDown, inputHandleKeyDown),\n onBlur: callAllEventHandlers(onBlur, inputHandleBlur),\n onFocus: callAllEventHandlers(onFocus, inputHandleFocus)\n };\n }\n return {\n [refKey]: handleRefs(ref, inputNode => {\n inputRef.current = inputNode;\n }),\n 'aria-activedescendant': latestState.isOpen && latestState.highlightedIndex > -1 ? elementIds.getItemId(latestState.highlightedIndex) : '',\n 'aria-autocomplete': 'list',\n 'aria-controls': elementIds.menuId,\n 'aria-expanded': latestState.isOpen,\n 'aria-labelledby': elementIds.labelId,\n // https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion\n // revert back since autocomplete=\"nope\" is ignored on latest Chrome and Opera\n autoComplete: 'off',\n id: elementIds.inputId,\n role: 'combobox',\n value: latestState.inputValue,\n ...eventHandlers,\n ...rest\n };\n }, [dispatch, inputKeyDownHandlers, latest, mouseAndTouchTrackersRef, setGetterPropCallInfo, elementIds]);\n\n // returns\n const toggleMenu = useCallback(() => {\n dispatch({\n type: FunctionToggleMenu\n });\n }, [dispatch]);\n const closeMenu = useCallback(() => {\n dispatch({\n type: FunctionCloseMenu\n });\n }, [dispatch]);\n const openMenu = useCallback(() => {\n dispatch({\n type: FunctionOpenMenu\n });\n }, [dispatch]);\n const setHighlightedIndex = useCallback(newHighlightedIndex => {\n dispatch({\n type: FunctionSetHighlightedIndex,\n highlightedIndex: newHighlightedIndex\n });\n }, [dispatch]);\n const selectItem = useCallback(newSelectedItem => {\n dispatch({\n type: FunctionSelectItem,\n selectedItem: newSelectedItem\n });\n }, [dispatch]);\n const setInputValue = useCallback(newInputValue => {\n dispatch({\n type: FunctionSetInputValue,\n inputValue: newInputValue\n });\n }, [dispatch]);\n const reset = useCallback(() => {\n dispatch({\n type: FunctionReset$1\n });\n }, [dispatch]);\n return {\n // prop getters.\n getItemProps,\n getLabelProps,\n getMenuProps,\n getInputProps,\n getToggleButtonProps,\n // actions.\n toggleMenu,\n openMenu,\n closeMenu,\n setHighlightedIndex,\n setInputValue,\n selectItem,\n reset,\n // state.\n highlightedIndex,\n isOpen,\n selectedItem,\n inputValue\n };\n}\n\nconst defaultStateValues = {\n activeIndex: -1,\n selectedItems: []\n};\n\n/**\n * Returns the initial value for a state key in the following order:\n * 1. controlled prop, 2. initial prop, 3. default prop, 4. default\n * value from Downshift.\n *\n * @param {Object} props Props passed to the hook.\n * @param {string} propKey Props key to generate the value for.\n * @returns {any} The initial value for that prop.\n */\nfunction getInitialValue(props, propKey) {\n return getInitialValue$1(props, propKey, defaultStateValues);\n}\n\n/**\n * Returns the default value for a state key in the following order:\n * 1. controlled prop, 2. default prop, 3. default value from Downshift.\n *\n * @param {Object} props Props passed to the hook.\n * @param {string} propKey Props key to generate the value for.\n * @returns {any} The initial value for that prop.\n */\nfunction getDefaultValue(props, propKey) {\n return getDefaultValue$1(props, propKey, defaultStateValues);\n}\n\n/**\n * Gets the initial state based on the provided props. It uses initial, default\n * and controlled props related to state in order to compute the initial value.\n *\n * @param {Object} props Props passed to the hook.\n * @returns {Object} The initial state.\n */\nfunction getInitialState(props) {\n const activeIndex = getInitialValue(props, 'activeIndex');\n const selectedItems = getInitialValue(props, 'selectedItems');\n return {\n activeIndex,\n selectedItems\n };\n}\n\n/**\n * Returns true if dropdown keydown operation is permitted. Should not be\n * allowed on keydown with modifier keys (ctrl, alt, shift, meta), on\n * input element with text content that is either highlighted or selection\n * cursor is not at the starting position.\n *\n * @param {KeyboardEvent} event The event from keydown.\n * @returns {boolean} Whether the operation is allowed.\n */\nfunction isKeyDownOperationPermitted(event) {\n if (event.shiftKey || event.metaKey || event.ctrlKey || event.altKey) {\n return false;\n }\n const element = event.target;\n if (element instanceof HTMLInputElement &&\n // if element is a text input\n element.value !== '' && (\n // and we have text in it\n // and cursor is either not at the start or is currently highlighting text.\n element.selectionStart !== 0 || element.selectionEnd !== 0)) {\n return false;\n }\n return true;\n}\n\n/**\n * Returns a message to be added to aria-live region when item is removed.\n *\n * @param {Object} selectionParameters Parameters required to build the message.\n * @returns {string} The a11y message.\n */\nfunction getA11yRemovalMessage(selectionParameters) {\n const {\n removedSelectedItem,\n itemToString: itemToStringLocal\n } = selectionParameters;\n return `${itemToStringLocal(removedSelectedItem)} has been removed.`;\n}\nconst propTypes = {\n selectedItems: PropTypes.array,\n initialSelectedItems: PropTypes.array,\n defaultSelectedItems: PropTypes.array,\n itemToString: PropTypes.func,\n getA11yRemovalMessage: PropTypes.func,\n stateReducer: PropTypes.func,\n activeIndex: PropTypes.number,\n initialActiveIndex: PropTypes.number,\n defaultActiveIndex: PropTypes.number,\n onActiveIndexChange: PropTypes.func,\n onSelectedItemsChange: PropTypes.func,\n keyNavigationNext: PropTypes.string,\n keyNavigationPrevious: PropTypes.string,\n environment: PropTypes.shape({\n addEventListener: PropTypes.func,\n removeEventListener: PropTypes.func,\n document: PropTypes.shape({\n getElementById: PropTypes.func,\n activeElement: PropTypes.any,\n body: PropTypes.any\n })\n })\n};\nconst defaultProps = {\n itemToString: defaultProps$3.itemToString,\n stateReducer: defaultProps$3.stateReducer,\n environment: defaultProps$3.environment,\n getA11yRemovalMessage,\n keyNavigationNext: 'ArrowRight',\n keyNavigationPrevious: 'ArrowLeft'\n};\n\n// eslint-disable-next-line import/no-mutable-exports\nlet validatePropTypes = noop;\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n validatePropTypes = (options, caller) => {\n PropTypes.checkPropTypes(propTypes, options, 'prop', caller.name);\n };\n}\n\nconst SelectedItemClick = process.env.NODE_ENV !== \"production\" ? '__selected_item_click__' : 0;\nconst SelectedItemKeyDownDelete = process.env.NODE_ENV !== \"production\" ? '__selected_item_keydown_delete__' : 1;\nconst SelectedItemKeyDownBackspace = process.env.NODE_ENV !== \"production\" ? '__selected_item_keydown_backspace__' : 2;\nconst SelectedItemKeyDownNavigationNext = process.env.NODE_ENV !== \"production\" ? '__selected_item_keydown_navigation_next__' : 3;\nconst SelectedItemKeyDownNavigationPrevious = process.env.NODE_ENV !== \"production\" ? '__selected_item_keydown_navigation_previous__' : 4;\nconst DropdownKeyDownNavigationPrevious = process.env.NODE_ENV !== \"production\" ? '__dropdown_keydown_navigation_previous__' : 5;\nconst DropdownKeyDownBackspace = process.env.NODE_ENV !== \"production\" ? '__dropdown_keydown_backspace__' : 6;\nconst DropdownClick = process.env.NODE_ENV !== \"production\" ? '__dropdown_click__' : 7;\nconst FunctionAddSelectedItem = process.env.NODE_ENV !== \"production\" ? '__function_add_selected_item__' : 8;\nconst FunctionRemoveSelectedItem = process.env.NODE_ENV !== \"production\" ? '__function_remove_selected_item__' : 9;\nconst FunctionSetSelectedItems = process.env.NODE_ENV !== \"production\" ? '__function_set_selected_items__' : 10;\nconst FunctionSetActiveIndex = process.env.NODE_ENV !== \"production\" ? '__function_set_active_index__' : 11;\nconst FunctionReset = process.env.NODE_ENV !== \"production\" ? '__function_reset__' : 12;\n\nvar stateChangeTypes = /*#__PURE__*/Object.freeze({\n __proto__: null,\n SelectedItemClick: SelectedItemClick,\n SelectedItemKeyDownDelete: SelectedItemKeyDownDelete,\n SelectedItemKeyDownBackspace: SelectedItemKeyDownBackspace,\n SelectedItemKeyDownNavigationNext: SelectedItemKeyDownNavigationNext,\n SelectedItemKeyDownNavigationPrevious: SelectedItemKeyDownNavigationPrevious,\n DropdownKeyDownNavigationPrevious: DropdownKeyDownNavigationPrevious,\n DropdownKeyDownBackspace: DropdownKeyDownBackspace,\n DropdownClick: DropdownClick,\n FunctionAddSelectedItem: FunctionAddSelectedItem,\n FunctionRemoveSelectedItem: FunctionRemoveSelectedItem,\n FunctionSetSelectedItems: FunctionSetSelectedItems,\n FunctionSetActiveIndex: FunctionSetActiveIndex,\n FunctionReset: FunctionReset\n});\n\n/* eslint-disable complexity */\nfunction downshiftMultipleSelectionReducer(state, action) {\n const {\n type,\n index,\n props,\n selectedItem\n } = action;\n const {\n activeIndex,\n selectedItems\n } = state;\n let changes;\n switch (type) {\n case SelectedItemClick:\n changes = {\n activeIndex: index\n };\n break;\n case SelectedItemKeyDownNavigationPrevious:\n changes = {\n activeIndex: activeIndex - 1 < 0 ? 0 : activeIndex - 1\n };\n break;\n case SelectedItemKeyDownNavigationNext:\n changes = {\n activeIndex: activeIndex + 1 >= selectedItems.length ? -1 : activeIndex + 1\n };\n break;\n case SelectedItemKeyDownBackspace:\n case SelectedItemKeyDownDelete:\n {\n let newActiveIndex = activeIndex;\n if (selectedItems.length === 1) {\n newActiveIndex = -1;\n } else if (activeIndex === selectedItems.length - 1) {\n newActiveIndex = selectedItems.length - 2;\n }\n changes = {\n selectedItems: [...selectedItems.slice(0, activeIndex), ...selectedItems.slice(activeIndex + 1)],\n ...{\n activeIndex: newActiveIndex\n }\n };\n break;\n }\n case DropdownKeyDownNavigationPrevious:\n changes = {\n activeIndex: selectedItems.length - 1\n };\n break;\n case DropdownKeyDownBackspace:\n changes = {\n selectedItems: selectedItems.slice(0, selectedItems.length - 1)\n };\n break;\n case FunctionAddSelectedItem:\n changes = {\n selectedItems: [...selectedItems, selectedItem]\n };\n break;\n case DropdownClick:\n changes = {\n activeIndex: -1\n };\n break;\n case FunctionRemoveSelectedItem:\n {\n let newActiveIndex = activeIndex;\n const selectedItemIndex = selectedItems.indexOf(selectedItem);\n if (selectedItemIndex >= 0) {\n if (selectedItems.length === 1) {\n newActiveIndex = -1;\n } else if (selectedItemIndex === selectedItems.length - 1) {\n newActiveIndex = selectedItems.length - 2;\n }\n changes = {\n selectedItems: [...selectedItems.slice(0, selectedItemIndex), ...selectedItems.slice(selectedItemIndex + 1)],\n activeIndex: newActiveIndex\n };\n }\n break;\n }\n case FunctionSetSelectedItems:\n {\n const {\n selectedItems: newSelectedItems\n } = action;\n changes = {\n selectedItems: newSelectedItems\n };\n break;\n }\n case FunctionSetActiveIndex:\n {\n const {\n activeIndex: newActiveIndex\n } = action;\n changes = {\n activeIndex: newActiveIndex\n };\n break;\n }\n case FunctionReset:\n changes = {\n activeIndex: getDefaultValue(props, 'activeIndex'),\n selectedItems: getDefaultValue(props, 'selectedItems')\n };\n break;\n default:\n throw new Error('Reducer called without proper action type.');\n }\n return {\n ...state,\n ...changes\n };\n}\n\nuseMultipleSelection.stateChangeTypes = stateChangeTypes;\nfunction useMultipleSelection(userProps) {\n if (userProps === void 0) {\n userProps = {};\n }\n validatePropTypes(userProps, useMultipleSelection);\n // Props defaults and destructuring.\n const props = {\n ...defaultProps,\n ...userProps\n };\n const {\n getA11yRemovalMessage,\n itemToString,\n environment,\n keyNavigationNext,\n keyNavigationPrevious\n } = props;\n\n // Reducer init.\n const [state, dispatch] = useControlledReducer$1(downshiftMultipleSelectionReducer, getInitialState(props), props);\n const {\n activeIndex,\n selectedItems\n } = state;\n\n // Refs.\n const isInitialMountRef = useRef(true);\n const dropdownRef = useRef(null);\n const previousSelectedItemsRef = useRef(selectedItems);\n const selectedItemRefs = useRef();\n selectedItemRefs.current = [];\n const latest = useLatestRef({\n state,\n props\n });\n\n // Effects.\n /* Sets a11y status message on changes in selectedItem. */\n useEffect(() => {\n if (isInitialMountRef.current) {\n return;\n }\n if (selectedItems.length < previousSelectedItemsRef.current.length) {\n const removedSelectedItem = previousSelectedItemsRef.current.find(item => selectedItems.indexOf(item) < 0);\n setStatus(getA11yRemovalMessage({\n itemToString,\n resultCount: selectedItems.length,\n removedSelectedItem,\n activeIndex,\n activeSelectedItem: selectedItems[activeIndex]\n }), environment.document);\n }\n previousSelectedItemsRef.current = selectedItems;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedItems.length]);\n // Sets focus on active item.\n useEffect(() => {\n if (isInitialMountRef.current) {\n return;\n }\n if (activeIndex === -1 && dropdownRef.current) {\n dropdownRef.current.focus();\n } else if (selectedItemRefs.current[activeIndex]) {\n selectedItemRefs.current[activeIndex].focus();\n }\n }, [activeIndex]);\n useControlPropsValidator({\n isInitialMount: isInitialMountRef.current,\n props,\n state\n });\n const setGetterPropCallInfo = useGetterPropsCalledChecker('getDropdownProps');\n // Make initial ref false.\n useEffect(() => {\n isInitialMountRef.current = false;\n }, []);\n\n // Event handler functions.\n const selectedItemKeyDownHandlers = useMemo(() => ({\n [keyNavigationPrevious]() {\n dispatch({\n type: SelectedItemKeyDownNavigationPrevious\n });\n },\n [keyNavigationNext]() {\n dispatch({\n type: SelectedItemKeyDownNavigationNext\n });\n },\n Delete() {\n dispatch({\n type: SelectedItemKeyDownDelete\n });\n },\n Backspace() {\n dispatch({\n type: SelectedItemKeyDownBackspace\n });\n }\n }), [dispatch, keyNavigationNext, keyNavigationPrevious]);\n const dropdownKeyDownHandlers = useMemo(() => ({\n [keyNavigationPrevious](event) {\n if (isKeyDownOperationPermitted(event)) {\n dispatch({\n type: DropdownKeyDownNavigationPrevious\n });\n }\n },\n Backspace(event) {\n if (isKeyDownOperationPermitted(event)) {\n dispatch({\n type: DropdownKeyDownBackspace\n });\n }\n }\n }), [dispatch, keyNavigationPrevious]);\n\n // Getter props.\n const getSelectedItemProps = useCallback(function (_temp) {\n let {\n refKey = 'ref',\n ref,\n onClick,\n onKeyDown,\n selectedItem,\n index,\n ...rest\n } = _temp === void 0 ? {} : _temp;\n const {\n state: latestState\n } = latest.current;\n const itemIndex = getItemIndex(index, selectedItem, latestState.selectedItems);\n if (itemIndex < 0) {\n throw new Error('Pass either selectedItem or index in getSelectedItemProps!');\n }\n const selectedItemHandleClick = () => {\n dispatch({\n type: SelectedItemClick,\n index\n });\n };\n const selectedItemHandleKeyDown = event => {\n const key = normalizeArrowKey(event);\n if (key && selectedItemKeyDownHandlers[key]) {\n selectedItemKeyDownHandlers[key](event);\n }\n };\n return {\n [refKey]: handleRefs(ref, selectedItemNode => {\n if (selectedItemNode) {\n selectedItemRefs.current.push(selectedItemNode);\n }\n }),\n tabIndex: index === latestState.activeIndex ? 0 : -1,\n onClick: callAllEventHandlers(onClick, selectedItemHandleClick),\n onKeyDown: callAllEventHandlers(onKeyDown, selectedItemHandleKeyDown),\n ...rest\n };\n }, [dispatch, latest, selectedItemKeyDownHandlers]);\n const getDropdownProps = useCallback(function (_temp2, _temp3) {\n let {\n refKey = 'ref',\n ref,\n onKeyDown,\n onClick,\n preventKeyAction = false,\n ...rest\n } = _temp2 === void 0 ? {} : _temp2;\n let {\n suppressRefError = false\n } = _temp3 === void 0 ? {} : _temp3;\n setGetterPropCallInfo('getDropdownProps', suppressRefError, refKey, dropdownRef);\n const dropdownHandleKeyDown = event => {\n const key = normalizeArrowKey(event);\n if (key && dropdownKeyDownHandlers[key]) {\n dropdownKeyDownHandlers[key](event);\n }\n };\n const dropdownHandleClick = () => {\n dispatch({\n type: DropdownClick\n });\n };\n return {\n [refKey]: handleRefs(ref, dropdownNode => {\n if (dropdownNode) {\n dropdownRef.current = dropdownNode;\n }\n }),\n ...(!preventKeyAction && {\n onKeyDown: callAllEventHandlers(onKeyDown, dropdownHandleKeyDown),\n onClick: callAllEventHandlers(onClick, dropdownHandleClick)\n }),\n ...rest\n };\n }, [dispatch, dropdownKeyDownHandlers, setGetterPropCallInfo]);\n\n // returns\n const addSelectedItem = useCallback(selectedItem => {\n dispatch({\n type: FunctionAddSelectedItem,\n selectedItem\n });\n }, [dispatch]);\n const removeSelectedItem = useCallback(selectedItem => {\n dispatch({\n type: FunctionRemoveSelectedItem,\n selectedItem\n });\n }, [dispatch]);\n const setSelectedItems = useCallback(newSelectedItems => {\n dispatch({\n type: FunctionSetSelectedItems,\n selectedItems: newSelectedItems\n });\n }, [dispatch]);\n const setActiveIndex = useCallback(newActiveIndex => {\n dispatch({\n type: FunctionSetActiveIndex,\n activeIndex: newActiveIndex\n });\n }, [dispatch]);\n const reset = useCallback(() => {\n dispatch({\n type: FunctionReset\n });\n }, [dispatch]);\n return {\n getSelectedItemProps,\n getDropdownProps,\n addSelectedItem,\n removeSelectedItem,\n setSelectedItems,\n setActiveIndex,\n reset,\n selectedItems,\n activeIndex\n };\n}\n\nexport { Downshift$1 as default, resetIdCounter, useCombobox, useMultipleSelection, useSelect };\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/** @license React v17.0.2\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x(\"react.element\");c=x(\"react.portal\");d=x(\"react.fragment\");e=x(\"react.strict_mode\");f=x(\"react.profiler\");g=x(\"react.provider\");h=x(\"react.context\");k=x(\"react.forward_ref\");l=x(\"react.suspense\");m=x(\"react.suspense_list\");n=x(\"react.memo\");p=x(\"react.lazy\");q=x(\"react.block\");r=x(\"react.server.block\");u=x(\"react.fundamental\");v=x(\"react.debug_trace_mode\");w=x(\"react.legacy_hidden\")}\nfunction y(a){if(\"object\"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;\nexports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};\nexports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||\"object\"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};\nexports.typeOf=y;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","import * as require$$0 from 'react';\nimport require$$0__default, { createContext, useContext, memo, useState, useRef, useEffect, PureComponent, createRef, useMemo, Children, isValidElement, cloneElement } from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { createPortal } from 'react-dom';\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nvar jsxRuntime = {exports: {}};\n\nvar reactJsxRuntime_production_min = {};\n\n/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar hasRequiredReactJsxRuntime_production_min;\n\nfunction requireReactJsxRuntime_production_min () {\n\tif (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;\n\thasRequiredReactJsxRuntime_production_min = 1;\nvar f=require$$0__default,k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\n\tfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;\n\treturn reactJsxRuntime_production_min;\n}\n\nvar reactJsxRuntime_development = {};\n\n/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar hasRequiredReactJsxRuntime_development;\n\nfunction requireReactJsxRuntime_development () {\n\tif (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;\n\thasRequiredReactJsxRuntime_development = 1;\n\n\tif (process.env.NODE_ENV !== \"production\") {\n\t (function() {\n\n\tvar React = require$$0__default;\n\n\t// ATTENTION\n\t// When adding new symbols to this file,\n\t// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n\t// The Symbol used to tag the ReactElement-like types.\n\tvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\n\tvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\n\tvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\n\tvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\n\tvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\n\tvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\n\tvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\n\tvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\n\tvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\n\tvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\n\tvar REACT_MEMO_TYPE = Symbol.for('react.memo');\n\tvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\n\tvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\n\tvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\n\tvar FAUX_ITERATOR_SYMBOL = '@@iterator';\n\tfunction getIteratorFn(maybeIterable) {\n\t if (maybeIterable === null || typeof maybeIterable !== 'object') {\n\t return null;\n\t }\n\n\t var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n\t if (typeof maybeIterator === 'function') {\n\t return maybeIterator;\n\t }\n\n\t return null;\n\t}\n\n\tvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\n\tfunction error(format) {\n\t {\n\t {\n\t for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n\t args[_key2 - 1] = arguments[_key2];\n\t }\n\n\t printWarning('error', format, args);\n\t }\n\t }\n\t}\n\n\tfunction printWarning(level, format, args) {\n\t // When changing this logic, you might want to also\n\t // update consoleWithStackDev.www.js as well.\n\t {\n\t var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\t var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n\t if (stack !== '') {\n\t format += '%s';\n\t args = args.concat([stack]);\n\t } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n\t var argsWithFormat = args.map(function (item) {\n\t return String(item);\n\t }); // Careful: RN currently depends on this prefix\n\n\t argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n\t // breaks IE9: https://github.com/facebook/react/issues/13610\n\t // eslint-disable-next-line react-internal/no-production-logging\n\n\t Function.prototype.apply.call(console[level], console, argsWithFormat);\n\t }\n\t}\n\n\t// -----------------------------------------------------------------------------\n\n\tvar enableScopeAPI = false; // Experimental Create Event Handle API.\n\tvar enableCacheElement = false;\n\tvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\n\tvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n\t// stuff. Intended to enable React core members to more easily debug scheduling\n\t// issues in DEV builds.\n\n\tvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\n\tvar REACT_MODULE_REFERENCE;\n\n\t{\n\t REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n\t}\n\n\tfunction isValidElementType(type) {\n\t if (typeof type === 'string' || typeof type === 'function') {\n\t return true;\n\t } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n\t if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n\t return true;\n\t }\n\n\t if (typeof type === 'object' && type !== null) {\n\t if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n\t // types supported by any Flight configuration anywhere since\n\t // we don't know which Flight build this will end up being used\n\t // with.\n\t type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n\t return true;\n\t }\n\t }\n\n\t return false;\n\t}\n\n\tfunction getWrappedName(outerType, innerType, wrapperName) {\n\t var displayName = outerType.displayName;\n\n\t if (displayName) {\n\t return displayName;\n\t }\n\n\t var functionName = innerType.displayName || innerType.name || '';\n\t return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n\t} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\n\tfunction getContextName(type) {\n\t return type.displayName || 'Context';\n\t} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\n\tfunction getComponentNameFromType(type) {\n\t if (type == null) {\n\t // Host root, text node or just invalid type.\n\t return null;\n\t }\n\n\t {\n\t if (typeof type.tag === 'number') {\n\t error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n\t }\n\t }\n\n\t if (typeof type === 'function') {\n\t return type.displayName || type.name || null;\n\t }\n\n\t if (typeof type === 'string') {\n\t return type;\n\t }\n\n\t switch (type) {\n\t case REACT_FRAGMENT_TYPE:\n\t return 'Fragment';\n\n\t case REACT_PORTAL_TYPE:\n\t return 'Portal';\n\n\t case REACT_PROFILER_TYPE:\n\t return 'Profiler';\n\n\t case REACT_STRICT_MODE_TYPE:\n\t return 'StrictMode';\n\n\t case REACT_SUSPENSE_TYPE:\n\t return 'Suspense';\n\n\t case REACT_SUSPENSE_LIST_TYPE:\n\t return 'SuspenseList';\n\n\t }\n\n\t if (typeof type === 'object') {\n\t switch (type.$$typeof) {\n\t case REACT_CONTEXT_TYPE:\n\t var context = type;\n\t return getContextName(context) + '.Consumer';\n\n\t case REACT_PROVIDER_TYPE:\n\t var provider = type;\n\t return getContextName(provider._context) + '.Provider';\n\n\t case REACT_FORWARD_REF_TYPE:\n\t return getWrappedName(type, type.render, 'ForwardRef');\n\n\t case REACT_MEMO_TYPE:\n\t var outerName = type.displayName || null;\n\n\t if (outerName !== null) {\n\t return outerName;\n\t }\n\n\t return getComponentNameFromType(type.type) || 'Memo';\n\n\t case REACT_LAZY_TYPE:\n\t {\n\t var lazyComponent = type;\n\t var payload = lazyComponent._payload;\n\t var init = lazyComponent._init;\n\n\t try {\n\t return getComponentNameFromType(init(payload));\n\t } catch (x) {\n\t return null;\n\t }\n\t }\n\n\t // eslint-disable-next-line no-fallthrough\n\t }\n\t }\n\n\t return null;\n\t}\n\n\tvar assign = Object.assign;\n\n\t// Helpers to patch console.logs to avoid logging during side-effect free\n\t// replaying on render function. This currently only patches the object\n\t// lazily which won't cover if the log function was extracted eagerly.\n\t// We could also eagerly patch the method.\n\tvar disabledDepth = 0;\n\tvar prevLog;\n\tvar prevInfo;\n\tvar prevWarn;\n\tvar prevError;\n\tvar prevGroup;\n\tvar prevGroupCollapsed;\n\tvar prevGroupEnd;\n\n\tfunction disabledLog() {}\n\n\tdisabledLog.__reactDisabledLog = true;\n\tfunction disableLogs() {\n\t {\n\t if (disabledDepth === 0) {\n\t /* eslint-disable react-internal/no-production-logging */\n\t prevLog = console.log;\n\t prevInfo = console.info;\n\t prevWarn = console.warn;\n\t prevError = console.error;\n\t prevGroup = console.group;\n\t prevGroupCollapsed = console.groupCollapsed;\n\t prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n\t var props = {\n\t configurable: true,\n\t enumerable: true,\n\t value: disabledLog,\n\t writable: true\n\t }; // $FlowFixMe Flow thinks console is immutable.\n\n\t Object.defineProperties(console, {\n\t info: props,\n\t log: props,\n\t warn: props,\n\t error: props,\n\t group: props,\n\t groupCollapsed: props,\n\t groupEnd: props\n\t });\n\t /* eslint-enable react-internal/no-production-logging */\n\t }\n\n\t disabledDepth++;\n\t }\n\t}\n\tfunction reenableLogs() {\n\t {\n\t disabledDepth--;\n\n\t if (disabledDepth === 0) {\n\t /* eslint-disable react-internal/no-production-logging */\n\t var props = {\n\t configurable: true,\n\t enumerable: true,\n\t writable: true\n\t }; // $FlowFixMe Flow thinks console is immutable.\n\n\t Object.defineProperties(console, {\n\t log: assign({}, props, {\n\t value: prevLog\n\t }),\n\t info: assign({}, props, {\n\t value: prevInfo\n\t }),\n\t warn: assign({}, props, {\n\t value: prevWarn\n\t }),\n\t error: assign({}, props, {\n\t value: prevError\n\t }),\n\t group: assign({}, props, {\n\t value: prevGroup\n\t }),\n\t groupCollapsed: assign({}, props, {\n\t value: prevGroupCollapsed\n\t }),\n\t groupEnd: assign({}, props, {\n\t value: prevGroupEnd\n\t })\n\t });\n\t /* eslint-enable react-internal/no-production-logging */\n\t }\n\n\t if (disabledDepth < 0) {\n\t error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n\t }\n\t }\n\t}\n\n\tvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n\tvar prefix;\n\tfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n\t {\n\t if (prefix === undefined) {\n\t // Extract the VM specific prefix used by each line.\n\t try {\n\t throw Error();\n\t } catch (x) {\n\t var match = x.stack.trim().match(/\\n( *(at )?)/);\n\t prefix = match && match[1] || '';\n\t }\n\t } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n\t return '\\n' + prefix + name;\n\t }\n\t}\n\tvar reentry = false;\n\tvar componentFrameCache;\n\n\t{\n\t var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n\t componentFrameCache = new PossiblyWeakMap();\n\t}\n\n\tfunction describeNativeComponentFrame(fn, construct) {\n\t // If something asked for a stack inside a fake render, it should get ignored.\n\t if ( !fn || reentry) {\n\t return '';\n\t }\n\n\t {\n\t var frame = componentFrameCache.get(fn);\n\n\t if (frame !== undefined) {\n\t return frame;\n\t }\n\t }\n\n\t var control;\n\t reentry = true;\n\t var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n\t Error.prepareStackTrace = undefined;\n\t var previousDispatcher;\n\n\t {\n\t previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n\t // for warnings.\n\n\t ReactCurrentDispatcher.current = null;\n\t disableLogs();\n\t }\n\n\t try {\n\t // This should throw.\n\t if (construct) {\n\t // Something should be setting the props in the constructor.\n\t var Fake = function () {\n\t throw Error();\n\t }; // $FlowFixMe\n\n\n\t Object.defineProperty(Fake.prototype, 'props', {\n\t set: function () {\n\t // We use a throwing setter instead of frozen or non-writable props\n\t // because that won't throw in a non-strict mode function.\n\t throw Error();\n\t }\n\t });\n\n\t if (typeof Reflect === 'object' && Reflect.construct) {\n\t // We construct a different control for this case to include any extra\n\t // frames added by the construct call.\n\t try {\n\t Reflect.construct(Fake, []);\n\t } catch (x) {\n\t control = x;\n\t }\n\n\t Reflect.construct(fn, [], Fake);\n\t } else {\n\t try {\n\t Fake.call();\n\t } catch (x) {\n\t control = x;\n\t }\n\n\t fn.call(Fake.prototype);\n\t }\n\t } else {\n\t try {\n\t throw Error();\n\t } catch (x) {\n\t control = x;\n\t }\n\n\t fn();\n\t }\n\t } catch (sample) {\n\t // This is inlined manually because closure doesn't do it for us.\n\t if (sample && control && typeof sample.stack === 'string') {\n\t // This extracts the first frame from the sample that isn't also in the control.\n\t // Skipping one frame that we assume is the frame that calls the two.\n\t var sampleLines = sample.stack.split('\\n');\n\t var controlLines = control.stack.split('\\n');\n\t var s = sampleLines.length - 1;\n\t var c = controlLines.length - 1;\n\n\t while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n\t // We expect at least one stack frame to be shared.\n\t // Typically this will be the root most one. However, stack frames may be\n\t // cut off due to maximum stack limits. In this case, one maybe cut off\n\t // earlier than the other. We assume that the sample is longer or the same\n\t // and there for cut off earlier. So we should find the root most frame in\n\t // the sample somewhere in the control.\n\t c--;\n\t }\n\n\t for (; s >= 1 && c >= 0; s--, c--) {\n\t // Next we find the first one that isn't the same which should be the\n\t // frame that called our sample function and the control.\n\t if (sampleLines[s] !== controlLines[c]) {\n\t // In V8, the first line is describing the message but other VMs don't.\n\t // If we're about to return the first line, and the control is also on the same\n\t // line, that's a pretty good indicator that our sample threw at same line as\n\t // the control. I.e. before we entered the sample frame. So we ignore this result.\n\t // This can happen if you passed a class to function component, or non-function.\n\t if (s !== 1 || c !== 1) {\n\t do {\n\t s--;\n\t c--; // We may still have similar intermediate frames from the construct call.\n\t // The next one that isn't the same should be our match though.\n\n\t if (c < 0 || sampleLines[s] !== controlLines[c]) {\n\t // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n\t var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"\"\n\t // but we have a user-provided \"displayName\"\n\t // splice it in to make the stack more readable.\n\n\n\t if (fn.displayName && _frame.includes('')) {\n\t _frame = _frame.replace('', fn.displayName);\n\t }\n\n\t {\n\t if (typeof fn === 'function') {\n\t componentFrameCache.set(fn, _frame);\n\t }\n\t } // Return the line we found.\n\n\n\t return _frame;\n\t }\n\t } while (s >= 1 && c >= 0);\n\t }\n\n\t break;\n\t }\n\t }\n\t }\n\t } finally {\n\t reentry = false;\n\n\t {\n\t ReactCurrentDispatcher.current = previousDispatcher;\n\t reenableLogs();\n\t }\n\n\t Error.prepareStackTrace = previousPrepareStackTrace;\n\t } // Fallback to just using the name if we couldn't make it throw.\n\n\n\t var name = fn ? fn.displayName || fn.name : '';\n\t var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n\t {\n\t if (typeof fn === 'function') {\n\t componentFrameCache.set(fn, syntheticFrame);\n\t }\n\t }\n\n\t return syntheticFrame;\n\t}\n\tfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n\t {\n\t return describeNativeComponentFrame(fn, false);\n\t }\n\t}\n\n\tfunction shouldConstruct(Component) {\n\t var prototype = Component.prototype;\n\t return !!(prototype && prototype.isReactComponent);\n\t}\n\n\tfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n\t if (type == null) {\n\t return '';\n\t }\n\n\t if (typeof type === 'function') {\n\t {\n\t return describeNativeComponentFrame(type, shouldConstruct(type));\n\t }\n\t }\n\n\t if (typeof type === 'string') {\n\t return describeBuiltInComponentFrame(type);\n\t }\n\n\t switch (type) {\n\t case REACT_SUSPENSE_TYPE:\n\t return describeBuiltInComponentFrame('Suspense');\n\n\t case REACT_SUSPENSE_LIST_TYPE:\n\t return describeBuiltInComponentFrame('SuspenseList');\n\t }\n\n\t if (typeof type === 'object') {\n\t switch (type.$$typeof) {\n\t case REACT_FORWARD_REF_TYPE:\n\t return describeFunctionComponentFrame(type.render);\n\n\t case REACT_MEMO_TYPE:\n\t // Memo may contain any component type so we recursively resolve it.\n\t return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n\t case REACT_LAZY_TYPE:\n\t {\n\t var lazyComponent = type;\n\t var payload = lazyComponent._payload;\n\t var init = lazyComponent._init;\n\n\t try {\n\t // Lazy may contain any component type so we recursively resolve it.\n\t return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n\t } catch (x) {}\n\t }\n\t }\n\t }\n\n\t return '';\n\t}\n\n\tvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\tvar loggedTypeFailures = {};\n\tvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\n\tfunction setCurrentlyValidatingElement(element) {\n\t {\n\t if (element) {\n\t var owner = element._owner;\n\t var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n\t ReactDebugCurrentFrame.setExtraStackFrame(stack);\n\t } else {\n\t ReactDebugCurrentFrame.setExtraStackFrame(null);\n\t }\n\t }\n\t}\n\n\tfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n\t {\n\t // $FlowFixMe This is okay but Flow doesn't know it.\n\t var has = Function.call.bind(hasOwnProperty);\n\n\t for (var typeSpecName in typeSpecs) {\n\t if (has(typeSpecs, typeSpecName)) {\n\t var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n\t // fail the render phase where it didn't fail before. So we log it.\n\t // After these have been cleaned up, we'll let them throw.\n\n\t try {\n\t // This is intentionally an invariant that gets caught. It's the same\n\t // behavior as without this statement except with a better message.\n\t if (typeof typeSpecs[typeSpecName] !== 'function') {\n\t // eslint-disable-next-line react-internal/prod-error-codes\n\t var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n\t err.name = 'Invariant Violation';\n\t throw err;\n\t }\n\n\t error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n\t } catch (ex) {\n\t error$1 = ex;\n\t }\n\n\t if (error$1 && !(error$1 instanceof Error)) {\n\t setCurrentlyValidatingElement(element);\n\n\t error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n\t setCurrentlyValidatingElement(null);\n\t }\n\n\t if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n\t // Only monitor this failure once because there tends to be a lot of the\n\t // same error.\n\t loggedTypeFailures[error$1.message] = true;\n\t setCurrentlyValidatingElement(element);\n\n\t error('Failed %s type: %s', location, error$1.message);\n\n\t setCurrentlyValidatingElement(null);\n\t }\n\t }\n\t }\n\t }\n\t}\n\n\tvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\n\tfunction isArray(a) {\n\t return isArrayImpl(a);\n\t}\n\n\t/*\n\t * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n\t * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n\t *\n\t * The functions in this module will throw an easier-to-understand,\n\t * easier-to-debug exception with a clear errors message message explaining the\n\t * problem. (Instead of a confusing exception thrown inside the implementation\n\t * of the `value` object).\n\t */\n\t// $FlowFixMe only called in DEV, so void return is not possible.\n\tfunction typeName(value) {\n\t {\n\t // toStringTag is needed for namespaced types like Temporal.Instant\n\t var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n\t var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n\t return type;\n\t }\n\t} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\n\tfunction willCoercionThrow(value) {\n\t {\n\t try {\n\t testStringCoercion(value);\n\t return false;\n\t } catch (e) {\n\t return true;\n\t }\n\t }\n\t}\n\n\tfunction testStringCoercion(value) {\n\t // If you ended up here by following an exception call stack, here's what's\n\t // happened: you supplied an object or symbol value to React (as a prop, key,\n\t // DOM attribute, CSS property, string ref, etc.) and when React tried to\n\t // coerce it to a string using `'' + value`, an exception was thrown.\n\t //\n\t // The most common types that will cause this exception are `Symbol` instances\n\t // and Temporal objects like `Temporal.Instant`. But any object that has a\n\t // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n\t // exception. (Library authors do this to prevent users from using built-in\n\t // numeric operators like `+` or comparison operators like `>=` because custom\n\t // methods are needed to perform accurate arithmetic or comparison.)\n\t //\n\t // To fix the problem, coerce this object or symbol value to a string before\n\t // passing it to React. The most reliable way is usually `String(value)`.\n\t //\n\t // To find which value is throwing, check the browser or debugger console.\n\t // Before this exception was thrown, there should be `console.error` output\n\t // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n\t // problem and how that type was used: key, atrribute, input value prop, etc.\n\t // In most cases, this console output also shows the component and its\n\t // ancestor components where the exception happened.\n\t //\n\t // eslint-disable-next-line react-internal/safe-string-coercion\n\t return '' + value;\n\t}\n\tfunction checkKeyStringCoercion(value) {\n\t {\n\t if (willCoercionThrow(value)) {\n\t error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n\t return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n\t }\n\t }\n\t}\n\n\tvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\n\tvar RESERVED_PROPS = {\n\t key: true,\n\t ref: true,\n\t __self: true,\n\t __source: true\n\t};\n\tvar specialPropKeyWarningShown;\n\tvar specialPropRefWarningShown;\n\tvar didWarnAboutStringRefs;\n\n\t{\n\t didWarnAboutStringRefs = {};\n\t}\n\n\tfunction hasValidRef(config) {\n\t {\n\t if (hasOwnProperty.call(config, 'ref')) {\n\t var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n\t if (getter && getter.isReactWarning) {\n\t return false;\n\t }\n\t }\n\t }\n\n\t return config.ref !== undefined;\n\t}\n\n\tfunction hasValidKey(config) {\n\t {\n\t if (hasOwnProperty.call(config, 'key')) {\n\t var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n\t if (getter && getter.isReactWarning) {\n\t return false;\n\t }\n\t }\n\t }\n\n\t return config.key !== undefined;\n\t}\n\n\tfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n\t {\n\t if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n\t var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n\t if (!didWarnAboutStringRefs[componentName]) {\n\t error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n\t didWarnAboutStringRefs[componentName] = true;\n\t }\n\t }\n\t }\n\t}\n\n\tfunction defineKeyPropWarningGetter(props, displayName) {\n\t {\n\t var warnAboutAccessingKey = function () {\n\t if (!specialPropKeyWarningShown) {\n\t specialPropKeyWarningShown = true;\n\n\t error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n\t }\n\t };\n\n\t warnAboutAccessingKey.isReactWarning = true;\n\t Object.defineProperty(props, 'key', {\n\t get: warnAboutAccessingKey,\n\t configurable: true\n\t });\n\t }\n\t}\n\n\tfunction defineRefPropWarningGetter(props, displayName) {\n\t {\n\t var warnAboutAccessingRef = function () {\n\t if (!specialPropRefWarningShown) {\n\t specialPropRefWarningShown = true;\n\n\t error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n\t }\n\t };\n\n\t warnAboutAccessingRef.isReactWarning = true;\n\t Object.defineProperty(props, 'ref', {\n\t get: warnAboutAccessingRef,\n\t configurable: true\n\t });\n\t }\n\t}\n\t/**\n\t * Factory method to create a new React element. This no longer adheres to\n\t * the class pattern, so do not use new to call it. Also, instanceof check\n\t * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n\t * if something is a React Element.\n\t *\n\t * @param {*} type\n\t * @param {*} props\n\t * @param {*} key\n\t * @param {string|object} ref\n\t * @param {*} owner\n\t * @param {*} self A *temporary* helper to detect places where `this` is\n\t * different from the `owner` when React.createElement is called, so that we\n\t * can warn. We want to get rid of owner and replace string `ref`s with arrow\n\t * functions, and as long as `this` and owner are the same, there will be no\n\t * change in behavior.\n\t * @param {*} source An annotation object (added by a transpiler or otherwise)\n\t * indicating filename, line number, and/or other information.\n\t * @internal\n\t */\n\n\n\tvar ReactElement = function (type, key, ref, self, source, owner, props) {\n\t var element = {\n\t // This tag allows us to uniquely identify this as a React Element\n\t $$typeof: REACT_ELEMENT_TYPE,\n\t // Built-in properties that belong on the element\n\t type: type,\n\t key: key,\n\t ref: ref,\n\t props: props,\n\t // Record the component responsible for creating this element.\n\t _owner: owner\n\t };\n\n\t {\n\t // The validation flag is currently mutative. We put it on\n\t // an external backing store so that we can freeze the whole object.\n\t // This can be replaced with a WeakMap once they are implemented in\n\t // commonly used development environments.\n\t element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n\t // the validation flag non-enumerable (where possible, which should\n\t // include every environment we run tests in), so the test framework\n\t // ignores it.\n\n\t Object.defineProperty(element._store, 'validated', {\n\t configurable: false,\n\t enumerable: false,\n\t writable: true,\n\t value: false\n\t }); // self and source are DEV only properties.\n\n\t Object.defineProperty(element, '_self', {\n\t configurable: false,\n\t enumerable: false,\n\t writable: false,\n\t value: self\n\t }); // Two elements created in two different places should be considered\n\t // equal for testing purposes and therefore we hide it from enumeration.\n\n\t Object.defineProperty(element, '_source', {\n\t configurable: false,\n\t enumerable: false,\n\t writable: false,\n\t value: source\n\t });\n\n\t if (Object.freeze) {\n\t Object.freeze(element.props);\n\t Object.freeze(element);\n\t }\n\t }\n\n\t return element;\n\t};\n\t/**\n\t * https://github.com/reactjs/rfcs/pull/107\n\t * @param {*} type\n\t * @param {object} props\n\t * @param {string} key\n\t */\n\n\tfunction jsxDEV(type, config, maybeKey, source, self) {\n\t {\n\t var propName; // Reserved names are extracted\n\n\t var props = {};\n\t var key = null;\n\t var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n\t // issue if key is also explicitly declared (ie.
\n\t // or
). We want to deprecate key spread,\n\t // but as an intermediary step, we will use jsxDEV for everything except\n\t //
, because we aren't currently able to tell if\n\t // key is explicitly declared to be undefined or not.\n\n\t if (maybeKey !== undefined) {\n\t {\n\t checkKeyStringCoercion(maybeKey);\n\t }\n\n\t key = '' + maybeKey;\n\t }\n\n\t if (hasValidKey(config)) {\n\t {\n\t checkKeyStringCoercion(config.key);\n\t }\n\n\t key = '' + config.key;\n\t }\n\n\t if (hasValidRef(config)) {\n\t ref = config.ref;\n\t warnIfStringRefCannotBeAutoConverted(config, self);\n\t } // Remaining properties are added to a new props object\n\n\n\t for (propName in config) {\n\t if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n\t props[propName] = config[propName];\n\t }\n\t } // Resolve default props\n\n\n\t if (type && type.defaultProps) {\n\t var defaultProps = type.defaultProps;\n\n\t for (propName in defaultProps) {\n\t if (props[propName] === undefined) {\n\t props[propName] = defaultProps[propName];\n\t }\n\t }\n\t }\n\n\t if (key || ref) {\n\t var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n\t if (key) {\n\t defineKeyPropWarningGetter(props, displayName);\n\t }\n\n\t if (ref) {\n\t defineRefPropWarningGetter(props, displayName);\n\t }\n\t }\n\n\t return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n\t }\n\t}\n\n\tvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\n\tvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\n\tfunction setCurrentlyValidatingElement$1(element) {\n\t {\n\t if (element) {\n\t var owner = element._owner;\n\t var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n\t ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n\t } else {\n\t ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n\t }\n\t }\n\t}\n\n\tvar propTypesMisspellWarningShown;\n\n\t{\n\t propTypesMisspellWarningShown = false;\n\t}\n\t/**\n\t * Verifies the object is a ReactElement.\n\t * See https://reactjs.org/docs/react-api.html#isvalidelement\n\t * @param {?object} object\n\t * @return {boolean} True if `object` is a ReactElement.\n\t * @final\n\t */\n\n\n\tfunction isValidElement(object) {\n\t {\n\t return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n\t }\n\t}\n\n\tfunction getDeclarationErrorAddendum() {\n\t {\n\t if (ReactCurrentOwner$1.current) {\n\t var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n\t if (name) {\n\t return '\\n\\nCheck the render method of `' + name + '`.';\n\t }\n\t }\n\n\t return '';\n\t }\n\t}\n\n\tfunction getSourceInfoErrorAddendum(source) {\n\t {\n\t if (source !== undefined) {\n\t var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n\t var lineNumber = source.lineNumber;\n\t return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n\t }\n\n\t return '';\n\t }\n\t}\n\t/**\n\t * Warn if there's no key explicitly set on dynamic arrays of children or\n\t * object keys are not valid. This allows us to keep track of children between\n\t * updates.\n\t */\n\n\n\tvar ownerHasKeyUseWarning = {};\n\n\tfunction getCurrentComponentErrorInfo(parentType) {\n\t {\n\t var info = getDeclarationErrorAddendum();\n\n\t if (!info) {\n\t var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n\t if (parentName) {\n\t info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n\t }\n\t }\n\n\t return info;\n\t }\n\t}\n\t/**\n\t * Warn if the element doesn't have an explicit key assigned to it.\n\t * This element is in an array. The array could grow and shrink or be\n\t * reordered. All children that haven't already been validated are required to\n\t * have a \"key\" property assigned to it. Error statuses are cached so a warning\n\t * will only be shown once.\n\t *\n\t * @internal\n\t * @param {ReactElement} element Element that requires a key.\n\t * @param {*} parentType element's parent's type.\n\t */\n\n\n\tfunction validateExplicitKey(element, parentType) {\n\t {\n\t if (!element._store || element._store.validated || element.key != null) {\n\t return;\n\t }\n\n\t element._store.validated = true;\n\t var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n\t if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n\t return;\n\t }\n\n\t ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n\t // property, it may be the creator of the child that's responsible for\n\t // assigning it a key.\n\n\t var childOwner = '';\n\n\t if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n\t // Give the component that originally created this child.\n\t childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n\t }\n\n\t setCurrentlyValidatingElement$1(element);\n\n\t error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n\t setCurrentlyValidatingElement$1(null);\n\t }\n\t}\n\t/**\n\t * Ensure that every element either is passed in a static location, in an\n\t * array with an explicit keys property defined, or in an object literal\n\t * with valid key property.\n\t *\n\t * @internal\n\t * @param {ReactNode} node Statically passed child of any type.\n\t * @param {*} parentType node's parent's type.\n\t */\n\n\n\tfunction validateChildKeys(node, parentType) {\n\t {\n\t if (typeof node !== 'object') {\n\t return;\n\t }\n\n\t if (isArray(node)) {\n\t for (var i = 0; i < node.length; i++) {\n\t var child = node[i];\n\n\t if (isValidElement(child)) {\n\t validateExplicitKey(child, parentType);\n\t }\n\t }\n\t } else if (isValidElement(node)) {\n\t // This element was passed in a valid location.\n\t if (node._store) {\n\t node._store.validated = true;\n\t }\n\t } else if (node) {\n\t var iteratorFn = getIteratorFn(node);\n\n\t if (typeof iteratorFn === 'function') {\n\t // Entry iterators used to provide implicit keys,\n\t // but now we print a separate warning for them later.\n\t if (iteratorFn !== node.entries) {\n\t var iterator = iteratorFn.call(node);\n\t var step;\n\n\t while (!(step = iterator.next()).done) {\n\t if (isValidElement(step.value)) {\n\t validateExplicitKey(step.value, parentType);\n\t }\n\t }\n\t }\n\t }\n\t }\n\t }\n\t}\n\t/**\n\t * Given an element, validate that its props follow the propTypes definition,\n\t * provided by the type.\n\t *\n\t * @param {ReactElement} element\n\t */\n\n\n\tfunction validatePropTypes(element) {\n\t {\n\t var type = element.type;\n\n\t if (type === null || type === undefined || typeof type === 'string') {\n\t return;\n\t }\n\n\t var propTypes;\n\n\t if (typeof type === 'function') {\n\t propTypes = type.propTypes;\n\t } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n\t // Inner props are checked in the reconciler.\n\t type.$$typeof === REACT_MEMO_TYPE)) {\n\t propTypes = type.propTypes;\n\t } else {\n\t return;\n\t }\n\n\t if (propTypes) {\n\t // Intentionally inside to avoid triggering lazy initializers:\n\t var name = getComponentNameFromType(type);\n\t checkPropTypes(propTypes, element.props, 'prop', name, element);\n\t } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n\t propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n\t var _name = getComponentNameFromType(type);\n\n\t error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n\t }\n\n\t if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n\t error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n\t }\n\t }\n\t}\n\t/**\n\t * Given a fragment, validate that it can only be provided with fragment props\n\t * @param {ReactElement} fragment\n\t */\n\n\n\tfunction validateFragmentProps(fragment) {\n\t {\n\t var keys = Object.keys(fragment.props);\n\n\t for (var i = 0; i < keys.length; i++) {\n\t var key = keys[i];\n\n\t if (key !== 'children' && key !== 'key') {\n\t setCurrentlyValidatingElement$1(fragment);\n\n\t error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n\t setCurrentlyValidatingElement$1(null);\n\t break;\n\t }\n\t }\n\n\t if (fragment.ref !== null) {\n\t setCurrentlyValidatingElement$1(fragment);\n\n\t error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n\t setCurrentlyValidatingElement$1(null);\n\t }\n\t }\n\t}\n\n\tfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n\t {\n\t var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n\t // succeed and there will likely be errors in render.\n\n\t if (!validType) {\n\t var info = '';\n\n\t if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n\t info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n\t }\n\n\t var sourceInfo = getSourceInfoErrorAddendum(source);\n\n\t if (sourceInfo) {\n\t info += sourceInfo;\n\t } else {\n\t info += getDeclarationErrorAddendum();\n\t }\n\n\t var typeString;\n\n\t if (type === null) {\n\t typeString = 'null';\n\t } else if (isArray(type)) {\n\t typeString = 'array';\n\t } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n\t typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n\t info = ' Did you accidentally export a JSX literal instead of a component?';\n\t } else {\n\t typeString = typeof type;\n\t }\n\n\t error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n\t }\n\n\t var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n\t // TODO: Drop this when these are no longer allowed as the type argument.\n\n\t if (element == null) {\n\t return element;\n\t } // Skip key warning if the type isn't valid since our key validation logic\n\t // doesn't expect a non-string/function type and can throw confusing errors.\n\t // We don't want exception behavior to differ between dev and prod.\n\t // (Rendering will throw with a helpful message and as soon as the type is\n\t // fixed, the key warnings will appear.)\n\n\n\t if (validType) {\n\t var children = props.children;\n\n\t if (children !== undefined) {\n\t if (isStaticChildren) {\n\t if (isArray(children)) {\n\t for (var i = 0; i < children.length; i++) {\n\t validateChildKeys(children[i], type);\n\t }\n\n\t if (Object.freeze) {\n\t Object.freeze(children);\n\t }\n\t } else {\n\t error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n\t }\n\t } else {\n\t validateChildKeys(children, type);\n\t }\n\t }\n\t }\n\n\t if (type === REACT_FRAGMENT_TYPE) {\n\t validateFragmentProps(element);\n\t } else {\n\t validatePropTypes(element);\n\t }\n\n\t return element;\n\t }\n\t} // These two functions exist to still get child warnings in dev\n\t// even with the prod transform. This means that jsxDEV is purely\n\t// opt-in behavior for better messages but that we won't stop\n\t// giving you warnings if you use production apis.\n\n\tfunction jsxWithValidationStatic(type, props, key) {\n\t {\n\t return jsxWithValidation(type, props, key, true);\n\t }\n\t}\n\tfunction jsxWithValidationDynamic(type, props, key) {\n\t {\n\t return jsxWithValidation(type, props, key, false);\n\t }\n\t}\n\n\tvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n\t// for now we can ship identical prod functions\n\n\tvar jsxs = jsxWithValidationStatic ;\n\n\treactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;\n\treactJsxRuntime_development.jsx = jsx;\n\treactJsxRuntime_development.jsxs = jsxs;\n\t })();\n\t}\n\treturn reactJsxRuntime_development;\n}\n\n(function (module) {\n\n\tif (process.env.NODE_ENV === 'production') {\n\t module.exports = requireReactJsxRuntime_production_min();\n\t} else {\n\t module.exports = requireReactJsxRuntime_development();\n\t}\n} (jsxRuntime));\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar NODE_ENV = process.env.NODE_ENV;\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nvar invariant_1 = invariant;\n\nconst MapContext = createContext(null);\nfunction useGoogleMap() {\n invariant_1(!!useContext, 'useGoogleMap is React hook and requires React version 16.8+');\n const map = useContext(MapContext);\n invariant_1(!!map, 'useGoogleMap needs a GoogleMap available up in the tree');\n return map;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction reduce(obj, fn, acc) {\n return Object.keys(obj).reduce(function reducer(newAcc, key) {\n return fn(newAcc, obj[key], key);\n }, acc);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction forEach(obj, fn) {\n Object.keys(obj).forEach((key) => {\n return fn(obj[key], key);\n });\n}\n\n/* global google */\nfunction applyUpdaterToNextProps(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nupdaterMap, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nprevProps, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nnextProps, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ninstance\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const map = {};\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const iter = (fn, key) => {\n const nextValue = nextProps[key];\n if (nextValue !== prevProps[key]) {\n map[key] = nextValue;\n fn(instance, nextValue);\n }\n };\n forEach(updaterMap, iter);\n return map;\n}\nfunction registerEvents(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nprops, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ninstance, eventMap) {\n const registeredList = reduce(eventMap, function reducer(acc, googleEventName, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onEventName) {\n if (typeof props[onEventName] === 'function') {\n acc.push(google.maps.event.addListener(instance, googleEventName, props[onEventName]));\n }\n return acc;\n }, []);\n return registeredList;\n}\nfunction unregisterEvent(registered) {\n google.maps.event.removeListener(registered);\n}\nfunction unregisterEvents(events = []) {\n events.forEach(unregisterEvent);\n}\nfunction applyUpdatersToPropsAndRegisterEvents({ updaterMap, eventMap, prevProps, nextProps, instance, }) {\n const registeredEvents = registerEvents(nextProps, instance, eventMap);\n applyUpdaterToNextProps(updaterMap, prevProps, nextProps, instance);\n return registeredEvents;\n}\n\nconst eventMap$i = {\n onDblClick: 'dblclick',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMapTypeIdChanged: 'maptypeid_changed',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n onTilesLoaded: 'tilesloaded',\n onBoundsChanged: 'bounds_changed',\n onCenterChanged: 'center_changed',\n onClick: 'click',\n onDrag: 'drag',\n onHeadingChanged: 'heading_changed',\n onIdle: 'idle',\n onProjectionChanged: 'projection_changed',\n onResize: 'resize',\n onTiltChanged: 'tilt_changed',\n onZoomChanged: 'zoom_changed',\n};\nconst updaterMap$i = {\n extraMapTypes(map, extra) {\n extra.forEach(function forEachExtra(it, i) {\n map.mapTypes.set(String(i), it);\n });\n },\n center(map, center) {\n map.setCenter(center);\n },\n clickableIcons(map, clickable) {\n map.setClickableIcons(clickable);\n },\n heading(map, heading) {\n map.setHeading(heading);\n },\n mapTypeId(map, mapTypeId) {\n map.setMapTypeId(mapTypeId);\n },\n options(map, options) {\n map.setOptions(options);\n },\n streetView(map, streetView) {\n map.setStreetView(streetView);\n },\n tilt(map, tilt) {\n map.setTilt(tilt);\n },\n zoom(map, zoom) {\n map.setZoom(zoom);\n },\n};\n// TODO: unfinished!\nfunction GoogleMapFunctional({ children, options, id, mapContainerStyle, mapContainerClassName, center, \n// clickableIcons,\n// extraMapTypes,\n// heading,\n// mapTypeId,\nonClick, onDblClick, onDrag, onDragEnd, onDragStart, onMouseMove, onMouseOut, onMouseOver, onMouseDown, onMouseUp, onRightClick, \n// onMapTypeIdChanged,\n// onTilesLoaded,\n// onBoundsChanged,\nonCenterChanged, \n// onHeadingChanged,\n// onIdle,\n// onProjectionChanged,\n// onResize,\n// onTiltChanged,\n// onZoomChanged,\nonLoad, onUnmount, }) {\n const [map, setMap] = useState(null);\n const ref = useRef(null);\n // const [extraMapTypesListener, setExtraMapTypesListener] = useState(null)\n const [centerChangedListener, setCenterChangedListener] = useState(null);\n const [dblclickListener, setDblclickListener] = useState(null);\n const [dragendListener, setDragendListener] = useState(null);\n const [dragstartListener, setDragstartListener] = useState(null);\n const [mousedownListener, setMousedownListener] = useState(null);\n const [mousemoveListener, setMousemoveListener] = useState(null);\n const [mouseoutListener, setMouseoutListener] = useState(null);\n const [mouseoverListener, setMouseoverListener] = useState(null);\n const [mouseupListener, setMouseupListener] = useState(null);\n const [rightclickListener, setRightclickListener] = useState(null);\n const [clickListener, setClickListener] = useState(null);\n const [dragListener, setDragListener] = useState(null);\n // Order does matter\n useEffect(() => {\n if (options && map !== null) {\n map.setOptions(options);\n }\n }, [map, options]);\n useEffect(() => {\n if (map !== null && typeof center !== 'undefined') {\n map.setCenter(center);\n }\n }, [map, center]);\n useEffect(() => {\n if (map && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(map, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(() => {\n if (map && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(map, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(() => {\n if (map && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(map, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(() => {\n if (map && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(map, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(() => {\n if (map && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(map, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(() => {\n if (map && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(map, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(() => {\n if (map && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(map, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(() => {\n if (map && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(map, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(() => {\n if (map && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(map, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(() => {\n if (map && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(map, 'click', onClick));\n }\n }, [onClick]);\n useEffect(() => {\n if (map && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(map, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(() => {\n if (map && onCenterChanged) {\n if (centerChangedListener !== null) {\n google.maps.event.removeListener(centerChangedListener);\n }\n setCenterChangedListener(google.maps.event.addListener(map, 'center_changed', onCenterChanged));\n }\n }, [onClick]);\n useEffect(() => {\n const map = ref.current === null\n ? null\n : new google.maps.Map(ref.current, options);\n setMap(map);\n if (map !== null && onLoad) {\n onLoad(map);\n }\n return () => {\n if (map !== null) {\n if (onUnmount) {\n onUnmount(map);\n }\n }\n };\n }, []);\n return (jsxRuntime.exports.jsx(\"div\", Object.assign({ id: id, ref: ref, style: mapContainerStyle, className: mapContainerClassName }, { children: jsxRuntime.exports.jsx(MapContext.Provider, Object.assign({ value: map }, { children: map !== null ? children : jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment, {}) })) })));\n}\nmemo(GoogleMapFunctional);\nclass GoogleMap extends PureComponent {\n constructor() {\n super(...arguments);\n this.state = {\n map: null,\n };\n this.registeredEvents = [];\n this.mapRef = null;\n this.getInstance = () => {\n if (this.mapRef === null) {\n return null;\n }\n return new google.maps.Map(this.mapRef, this.props.options);\n };\n this.panTo = (latLng) => {\n const map = this.getInstance();\n if (map) {\n map.panTo(latLng);\n }\n };\n this.setMapCallback = () => {\n if (this.state.map !== null) {\n if (this.props.onLoad) {\n this.props.onLoad(this.state.map);\n }\n }\n };\n this.getRef = (ref) => {\n this.mapRef = ref;\n };\n }\n componentDidMount() {\n const map = this.getInstance();\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$i,\n eventMap: eventMap$i,\n prevProps: {},\n nextProps: this.props,\n instance: map,\n });\n this.setState(function setMap() {\n return {\n map,\n };\n }, this.setMapCallback);\n }\n componentDidUpdate(prevProps) {\n if (this.state.map !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$i,\n eventMap: eventMap$i,\n prevProps,\n nextProps: this.props,\n instance: this.state.map,\n });\n }\n }\n componentWillUnmount() {\n if (this.state.map !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.map);\n }\n unregisterEvents(this.registeredEvents);\n }\n }\n render() {\n return (jsxRuntime.exports.jsx(\"div\", Object.assign({ id: this.props.id, ref: this.getRef, style: this.props.mapContainerStyle, className: this.props.mapContainerClassName }, { children: jsxRuntime.exports.jsx(MapContext.Provider, Object.assign({ value: this.state.map }, { children: this.state.map !== null ? this.props.children : jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment, {}) })) })));\n }\n}\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest$1(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\nconst isBrowser = typeof document !== 'undefined';\n\nfunction injectScript({ url, id, nonce }) {\n if (!isBrowser) {\n return Promise.reject(new Error('document is undefined'));\n }\n return new Promise(function injectScriptCallback(resolve, reject) {\n const existingScript = document.getElementById(id);\n const windowWithGoogleMap = window;\n if (existingScript) {\n // Same script id/url: keep same script\n const dataStateAttribute = existingScript.getAttribute('data-state');\n if (existingScript.src === url && dataStateAttribute !== 'error') {\n if (dataStateAttribute === 'ready') {\n return resolve(id);\n }\n else {\n const originalInitMap = windowWithGoogleMap.initMap;\n const originalErrorCallback = existingScript.onerror;\n windowWithGoogleMap.initMap = function initMap() {\n if (originalInitMap) {\n originalInitMap();\n }\n resolve(id);\n };\n existingScript.onerror = function (err) {\n if (originalErrorCallback) {\n originalErrorCallback(err);\n }\n reject(err);\n };\n return;\n }\n }\n // Same script id, but either\n // 1. requested URL is different\n // 2. script failed to load\n else {\n existingScript.remove();\n }\n }\n const script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = url;\n script.id = id;\n script.async = true;\n script.nonce = nonce;\n script.onerror = function onerror(err) {\n script.setAttribute('data-state', 'error');\n reject(err);\n };\n windowWithGoogleMap.initMap = function onload() {\n script.setAttribute('data-state', 'ready');\n resolve(id);\n };\n document.head.appendChild(script);\n }).catch(err => {\n console.error('injectScript error: ', err);\n throw err;\n });\n}\n\nfunction isGoogleFontStyle(element) {\n // 'Roboto' or 'Google Sans Text' font download\n const href = element.href;\n if (href && (href.indexOf('https://fonts.googleapis.com/css?family=Roboto') === 0 ||\n href.indexOf('https://fonts.googleapis.com/css?family=Google+Sans+Text') === 0)) {\n return true;\n }\n // font style elements\n if (element.tagName.toLowerCase() === 'style' &&\n // @ts-ignore\n element.styleSheet &&\n // @ts-ignore\n element.styleSheet.cssText &&\n // @ts-ignore\n element.styleSheet.cssText.replace('\\r\\n', '').indexOf('.gm-style') === 0) {\n // @ts-ignore\n element.styleSheet.cssText = '';\n return true;\n }\n // font style elements for other browsers\n if (element.tagName.toLowerCase() === 'style' &&\n element.innerHTML &&\n element.innerHTML.replace('\\r\\n', '').indexOf('.gm-style') === 0) {\n element.innerHTML = '';\n return true;\n }\n // when google tries to add empty style\n if (element.tagName.toLowerCase() === 'style' &&\n // @ts-ignore\n !element.styleSheet &&\n !element.innerHTML) {\n return true;\n }\n return false;\n}\n// Preventing the Google Maps library from downloading an extra font\nfunction preventGoogleFonts() {\n // we override these methods only for one particular head element\n // default methods for other elements are not affected\n const head = document.getElementsByTagName('head')[0];\n const trueInsertBefore = head.insertBefore.bind(head);\n // TODO: adding return before reflect solves the TS issue\n // @ts-ignore\n head.insertBefore = function insertBefore(newElement, referenceElement) {\n if (!isGoogleFontStyle(newElement)) {\n Reflect.apply(trueInsertBefore, head, [newElement, referenceElement]);\n }\n };\n const trueAppend = head.appendChild.bind(head);\n // TODO: adding return before reflect solves the TS issue\n // @ts-ignore\n head.appendChild = function appendChild(textNode) {\n if (!isGoogleFontStyle(textNode)) {\n Reflect.apply(trueAppend, head, [textNode]);\n }\n };\n}\n\nfunction makeLoadScriptUrl({ googleMapsApiKey, googleMapsClientId, version = 'weekly', language, region, libraries, channel, mapIds, authReferrerPolicy }) {\n const params = [];\n invariant_1((googleMapsApiKey && googleMapsClientId) || !(googleMapsApiKey && googleMapsClientId), 'You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time.');\n if (googleMapsApiKey) {\n params.push(`key=${googleMapsApiKey}`);\n }\n else if (googleMapsClientId) {\n params.push(`client=${googleMapsClientId}`);\n }\n if (version) {\n params.push(`v=${version}`);\n }\n if (language) {\n params.push(`language=${language}`);\n }\n if (region) {\n params.push(`region=${region}`);\n }\n if (libraries && libraries.length) {\n params.push(`libraries=${libraries.sort().join(',')}`);\n }\n if (channel) {\n params.push(`channel=${channel}`);\n }\n if (mapIds && mapIds.length) {\n params.push(`map_ids=${mapIds.join(',')}`);\n }\n if (authReferrerPolicy) {\n params.push(`auth_referrer_policy=${authReferrerPolicy}`);\n }\n params.push('callback=initMap');\n return `https://maps.googleapis.com/maps/api/js?${params.join('&')}`;\n}\n\nlet cleaningUp = false;\nfunction DefaultLoadingElement() {\n return jsxRuntime.exports.jsx(\"div\", { children: `Loading...` });\n}\nconst defaultLoadScriptProps = {\n id: 'script-loader',\n version: 'weekly',\n};\nclass LoadScript extends PureComponent {\n constructor() {\n super(...arguments);\n this.check = createRef();\n this.state = {\n loaded: false,\n };\n this.cleanupCallback = () => {\n // @ts-ignore\n delete window.google.maps;\n this.injectScript();\n };\n this.isCleaningUp = () => __awaiter(this, void 0, void 0, function* () {\n function promiseCallback(resolve) {\n if (!cleaningUp) {\n resolve();\n }\n else {\n if (isBrowser) {\n const timer = window.setInterval(function interval() {\n if (!cleaningUp) {\n window.clearInterval(timer);\n resolve();\n }\n }, 1);\n }\n }\n return;\n }\n return new Promise(promiseCallback);\n });\n this.cleanup = () => {\n cleaningUp = true;\n const script = document.getElementById(this.props.id);\n if (script && script.parentNode) {\n script.parentNode.removeChild(script);\n }\n Array.prototype.slice\n .call(document.getElementsByTagName('script'))\n .filter(function filter(script) {\n return typeof script.src === 'string' && script.src.includes('maps.googleapis');\n })\n .forEach(function forEach(script) {\n if (script.parentNode) {\n script.parentNode.removeChild(script);\n }\n });\n Array.prototype.slice\n .call(document.getElementsByTagName('link'))\n .filter(function filter(link) {\n return (link.href === 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans');\n })\n .forEach(function forEach(link) {\n if (link.parentNode) {\n link.parentNode.removeChild(link);\n }\n });\n Array.prototype.slice\n .call(document.getElementsByTagName('style'))\n .filter(function filter(style) {\n return (style.innerText !== undefined &&\n style.innerText.length > 0 &&\n style.innerText.includes('.gm-'));\n })\n .forEach(function forEach(style) {\n if (style.parentNode) {\n style.parentNode.removeChild(style);\n }\n });\n };\n this.injectScript = () => {\n if (this.props.preventGoogleFontsLoading) {\n preventGoogleFonts();\n }\n invariant_1(!!this.props.id, 'LoadScript requires \"id\" prop to be a string: %s', this.props.id);\n const injectScriptOptions = {\n id: this.props.id,\n nonce: this.props.nonce,\n url: makeLoadScriptUrl(this.props),\n };\n injectScript(injectScriptOptions)\n .then(() => {\n if (this.props.onLoad) {\n this.props.onLoad();\n }\n this.setState(function setLoaded() {\n return {\n loaded: true,\n };\n });\n return;\n })\n .catch(err => {\n if (this.props.onError) {\n this.props.onError(err);\n }\n console.error(`\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (${this\n .props.googleMapsApiKey || '-'}) or Client ID (${this.props.googleMapsClientId ||\n '-'}) to \n Otherwise it is a Network issue.\n `);\n });\n };\n }\n componentDidMount() {\n if (isBrowser) {\n if (window.google && window.google.maps && !cleaningUp) {\n console.error('google api is already presented');\n return;\n }\n this.isCleaningUp()\n .then(this.injectScript)\n .catch(function error(err) {\n console.error('Error at injecting script after cleaning up: ', err);\n });\n }\n }\n componentDidUpdate(prevProps) {\n if (this.props.libraries !== prevProps.libraries) {\n 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');\n }\n if (isBrowser && prevProps.language !== this.props.language) {\n this.cleanup();\n // TODO: refactor to use gDSFP maybe... wait for hooks refactoring.\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState(function setLoaded() {\n return {\n loaded: false,\n };\n }, this.cleanupCallback);\n }\n }\n componentWillUnmount() {\n if (isBrowser) {\n this.cleanup();\n const timeoutCallback = () => {\n if (!this.check.current) {\n // @ts-ignore\n delete window.google;\n cleaningUp = false;\n }\n };\n window.setTimeout(timeoutCallback, 1);\n if (this.props.onUnmount) {\n this.props.onUnmount();\n }\n }\n }\n render() {\n return (jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment, { children: [jsxRuntime.exports.jsx(\"div\", { ref: this.check }), this.state.loaded\n ? this.props.children\n : this.props.loadingElement || jsxRuntime.exports.jsx(DefaultLoadingElement, {})] }));\n }\n}\nLoadScript.defaultProps = defaultLoadScriptProps;\n\n/* eslint-disable filenames/match-regex */\nlet previouslyLoadedUrl;\nfunction useLoadScript({ id = defaultLoadScriptProps.id, version = defaultLoadScriptProps.version, nonce, googleMapsApiKey, googleMapsClientId, language, region, libraries, preventGoogleFontsLoading, channel, mapIds, authReferrerPolicy, }) {\n const isMounted = useRef(false);\n const [isLoaded, setLoaded] = useState(false);\n const [loadError, setLoadError] = useState(undefined);\n useEffect(function trackMountedState() {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n useEffect(function applyPreventGoogleFonts() {\n if (isBrowser && preventGoogleFontsLoading) {\n preventGoogleFonts();\n }\n }, [preventGoogleFontsLoading]);\n useEffect(function validateLoadedState() {\n if (isLoaded) {\n invariant_1(!!window.google, 'useLoadScript was marked as loaded, but window.google is not present. Something went wrong.');\n }\n }, [isLoaded]);\n const url = makeLoadScriptUrl({\n version,\n googleMapsApiKey,\n googleMapsClientId,\n language,\n region,\n libraries,\n channel,\n mapIds,\n authReferrerPolicy\n });\n useEffect(function loadScriptAndModifyLoadedState() {\n if (!isBrowser) {\n return;\n }\n function setLoadedIfMounted() {\n if (isMounted.current) {\n setLoaded(true);\n previouslyLoadedUrl = url;\n }\n }\n if (window.google && window.google.maps && previouslyLoadedUrl === url) {\n setLoadedIfMounted();\n return;\n }\n injectScript({ id, url, nonce })\n .then(setLoadedIfMounted)\n .catch(function handleInjectError(err) {\n if (isMounted.current) {\n setLoadError(err);\n }\n console.warn(`\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (${googleMapsApiKey ||\n '-'}) or Client ID (${googleMapsClientId || '-'})\n Otherwise it is a Network issue.\n `);\n console.error(err);\n });\n }, [id, url, nonce]);\n const prevLibraries = useRef();\n useEffect(function checkPerformance() {\n if (prevLibraries.current && libraries !== prevLibraries.current) {\n 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');\n }\n prevLibraries.current = libraries;\n }, [libraries]);\n return { isLoaded, loadError, url };\n}\n\nconst defaultLoadingElement = jsxRuntime.exports.jsx(DefaultLoadingElement, {});\nfunction LoadScriptNext(_a) {\n var { loadingElement, onLoad, onError, onUnmount, children } = _a, hookOptions = __rest$1(_a, [\"loadingElement\", \"onLoad\", \"onError\", \"onUnmount\", \"children\"]);\n const { isLoaded, loadError } = useLoadScript(hookOptions);\n useEffect(function handleOnLoad() {\n if (isLoaded && typeof onLoad === 'function') {\n onLoad();\n }\n }, [isLoaded, onLoad]);\n useEffect(function handleOnError() {\n if (loadError && typeof onError === 'function') {\n onError(loadError);\n }\n }, [loadError, onError]);\n useEffect(function handleOnUnmount() {\n return () => {\n if (onUnmount) {\n onUnmount();\n }\n };\n }, [onUnmount]);\n return isLoaded ? children : loadingElement || defaultLoadingElement;\n}\nvar LoadScriptNext$1 = memo(LoadScriptNext);\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nvar fastDeepEqual$1 = 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/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at.\n *\n * Http://www.apache.org/licenses/LICENSE-2.0.\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst DEFAULT_ID = \"__googleMapsScriptId\";\n/**\n * The status of the [[Loader]].\n */\nvar LoaderStatus;\n(function (LoaderStatus) {\n LoaderStatus[LoaderStatus[\"INITIALIZED\"] = 0] = \"INITIALIZED\";\n LoaderStatus[LoaderStatus[\"LOADING\"] = 1] = \"LOADING\";\n LoaderStatus[LoaderStatus[\"SUCCESS\"] = 2] = \"SUCCESS\";\n LoaderStatus[LoaderStatus[\"FAILURE\"] = 3] = \"FAILURE\";\n})(LoaderStatus || (LoaderStatus = {}));\n/**\n * [[Loader]] makes it easier to add Google Maps JavaScript API to your application\n * dynamically using\n * [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n * It works by dynamically creating and appending a script node to the the\n * document head and wrapping the callback function so as to return a promise.\n *\n * ```\n * const loader = new Loader({\n * apiKey: \"\",\n * version: \"weekly\",\n * libraries: [\"places\"]\n * });\n *\n * loader.load().then((google) => {\n * const map = new google.maps.Map(...)\n * })\n * ```\n */\nclass Loader {\n /**\n * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set\n * using this library, instead the defaults are set by the Google Maps\n * JavaScript API server.\n *\n * ```\n * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});\n * ```\n */\n constructor({ apiKey, authReferrerPolicy, channel, client, id = DEFAULT_ID, language, libraries = [], mapIds, nonce, region, retries = 3, url = \"https://maps.googleapis.com/maps/api/js\", version, }) {\n this.CALLBACK = \"__googleMapsCallback\";\n this.callbacks = [];\n this.done = false;\n this.loading = false;\n this.errors = [];\n this.apiKey = apiKey;\n this.authReferrerPolicy = authReferrerPolicy;\n this.channel = channel;\n this.client = client;\n this.id = id || DEFAULT_ID; // Do not allow empty string\n this.language = language;\n this.libraries = libraries;\n this.mapIds = mapIds;\n this.nonce = nonce;\n this.region = region;\n this.retries = retries;\n this.url = url;\n this.version = version;\n if (Loader.instance) {\n if (!fastDeepEqual$1(this.options, Loader.instance.options)) {\n throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Loader.instance.options)}`);\n }\n return Loader.instance;\n }\n Loader.instance = this;\n }\n get options() {\n return {\n version: this.version,\n apiKey: this.apiKey,\n channel: this.channel,\n client: this.client,\n id: this.id,\n libraries: this.libraries,\n language: this.language,\n region: this.region,\n mapIds: this.mapIds,\n nonce: this.nonce,\n url: this.url,\n authReferrerPolicy: this.authReferrerPolicy,\n };\n }\n get status() {\n if (this.errors.length) {\n return LoaderStatus.FAILURE;\n }\n if (this.done) {\n return LoaderStatus.SUCCESS;\n }\n if (this.loading) {\n return LoaderStatus.LOADING;\n }\n return LoaderStatus.INITIALIZED;\n }\n get failed() {\n return this.done && !this.loading && this.errors.length >= this.retries + 1;\n }\n /**\n * CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]].\n *\n * @ignore\n */\n createUrl() {\n let url = this.url;\n url += `?callback=${this.CALLBACK}`;\n if (this.apiKey) {\n url += `&key=${this.apiKey}`;\n }\n if (this.channel) {\n url += `&channel=${this.channel}`;\n }\n if (this.client) {\n url += `&client=${this.client}`;\n }\n if (this.libraries.length > 0) {\n url += `&libraries=${this.libraries.join(\",\")}`;\n }\n if (this.language) {\n url += `&language=${this.language}`;\n }\n if (this.region) {\n url += `®ion=${this.region}`;\n }\n if (this.version) {\n url += `&v=${this.version}`;\n }\n if (this.mapIds) {\n url += `&map_ids=${this.mapIds.join(\",\")}`;\n }\n if (this.authReferrerPolicy) {\n url += `&auth_referrer_policy=${this.authReferrerPolicy}`;\n }\n return url;\n }\n deleteScript() {\n const script = document.getElementById(this.id);\n if (script) {\n script.remove();\n }\n }\n /**\n * Load the Google Maps JavaScript API script and return a Promise.\n */\n load() {\n return this.loadPromise();\n }\n /**\n * Load the Google Maps JavaScript API script and return a Promise.\n *\n * @ignore\n */\n loadPromise() {\n return new Promise((resolve, reject) => {\n this.loadCallback((err) => {\n if (!err) {\n resolve(window.google);\n }\n else {\n reject(err.error);\n }\n });\n });\n }\n /**\n * Load the Google Maps JavaScript API script with a callback.\n */\n loadCallback(fn) {\n this.callbacks.push(fn);\n this.execute();\n }\n /**\n * Set the script on document.\n */\n setScript() {\n if (document.getElementById(this.id)) {\n // TODO wrap onerror callback for cases where the script was loaded elsewhere\n this.callback();\n return;\n }\n const url = this.createUrl();\n const script = document.createElement(\"script\");\n script.id = this.id;\n script.type = \"text/javascript\";\n script.src = url;\n script.onerror = this.loadErrorCallback.bind(this);\n script.defer = true;\n script.async = true;\n if (this.nonce) {\n script.nonce = this.nonce;\n }\n document.head.appendChild(script);\n }\n /**\n * Reset the loader state.\n */\n reset() {\n this.deleteScript();\n this.done = false;\n this.loading = false;\n this.errors = [];\n this.onerrorEvent = null;\n }\n resetIfRetryingFailed() {\n if (this.failed) {\n this.reset();\n }\n }\n loadErrorCallback(e) {\n this.errors.push(e);\n if (this.errors.length <= this.retries) {\n const delay = this.errors.length * Math.pow(2, this.errors.length);\n console.log(`Failed to load Google Maps script, retrying in ${delay} ms.`);\n setTimeout(() => {\n this.deleteScript();\n this.setScript();\n }, delay);\n }\n else {\n this.onerrorEvent = e;\n this.callback();\n }\n }\n setCallback() {\n window.__googleMapsCallback = this.callback.bind(this);\n }\n callback() {\n this.done = true;\n this.loading = false;\n this.callbacks.forEach((cb) => {\n cb(this.onerrorEvent);\n });\n this.callbacks = [];\n }\n execute() {\n this.resetIfRetryingFailed();\n if (this.done) {\n this.callback();\n }\n else {\n // short circuit and warn if google.maps is already loaded\n if (window.google && window.google.maps && window.google.maps.version) {\n console.warn(\"Google Maps already loaded outside @googlemaps/js-api-loader.\" +\n \"This may result in undesirable behavior as options and script parameters may not match.\");\n this.callback();\n return;\n }\n if (this.loading) ;\n else {\n this.loading = true;\n this.setCallback();\n this.setScript();\n }\n }\n }\n}\n\nfunction useJsApiLoader({ id = defaultLoadScriptProps.id, version = defaultLoadScriptProps.version, nonce, googleMapsApiKey, \n// googleMapsClientId,\nlanguage, region, libraries, preventGoogleFontsLoading, \n// channel,\nmapIds, authReferrerPolicy, }) {\n const isMounted = useRef(false);\n const [isLoaded, setLoaded] = useState(false);\n const [loadError, setLoadError] = useState(undefined);\n useEffect(function trackMountedState() {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n const loader = useMemo(function memo() {\n return new Loader({\n id,\n apiKey: googleMapsApiKey,\n version,\n libraries,\n language,\n region,\n mapIds,\n nonce,\n authReferrerPolicy,\n });\n }, [id, googleMapsApiKey, version, libraries, language, region, mapIds, nonce, authReferrerPolicy]);\n useEffect(function effect() {\n if (isLoaded) {\n return;\n }\n else {\n loader.load().then(function then() {\n if (isMounted.current)\n setLoaded(true);\n })\n .catch(function onrejected(error) {\n setLoadError(error);\n });\n }\n }, []);\n useEffect(function applyPreventGoogleFonts() {\n if (isBrowser && preventGoogleFontsLoading) {\n preventGoogleFonts();\n }\n }, [preventGoogleFontsLoading]);\n const prevLibraries = useRef();\n useEffect(function effect() {\n if (prevLibraries.current && libraries !== prevLibraries.current) {\n 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');\n }\n prevLibraries.current = libraries;\n }, [libraries]);\n return { isLoaded, loadError };\n}\n\nconst eventMap$h = {};\nconst updaterMap$h = {\n options(instance, options) {\n instance.setOptions(options);\n },\n};\nfunction TrafficLayerFunctional({ options, onLoad, onUnmount }) {\n const map = useContext(MapContext);\n const [instance, setInstance] = useState(null);\n // Order does matter\n useEffect(() => {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(() => {\n if (options && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(() => {\n const trafficLayer = new google.maps.TrafficLayer(Object.assign(Object.assign({}, (options || {})), { map }));\n setInstance(trafficLayer);\n if (onLoad) {\n onLoad(trafficLayer);\n }\n return () => {\n if (instance !== null) {\n if (onUnmount) {\n onUnmount(instance);\n }\n instance.setMap(null);\n }\n };\n }, []);\n return null;\n}\nconst TrafficLayerF = memo(TrafficLayerFunctional);\nclass TrafficLayer extends PureComponent {\n constructor() {\n super(...arguments);\n this.state = {\n trafficLayer: null,\n };\n this.setTrafficLayerCallback = () => {\n if (this.state.trafficLayer !== null && this.props.onLoad) {\n this.props.onLoad(this.state.trafficLayer);\n }\n };\n this.registeredEvents = [];\n }\n componentDidMount() {\n const trafficLayer = new google.maps.TrafficLayer(Object.assign(Object.assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$h,\n eventMap: eventMap$h,\n prevProps: {},\n nextProps: this.props,\n instance: trafficLayer,\n });\n this.setState(function setTrafficLayer() {\n return {\n trafficLayer,\n };\n }, this.setTrafficLayerCallback);\n }\n componentDidUpdate(prevProps) {\n if (this.state.trafficLayer !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$h,\n eventMap: eventMap$h,\n prevProps,\n nextProps: this.props,\n instance: this.state.trafficLayer,\n });\n }\n }\n componentWillUnmount() {\n if (this.state.trafficLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.trafficLayer);\n }\n unregisterEvents(this.registeredEvents);\n // @ts-ignore\n this.state.trafficLayer.setMap(null);\n }\n }\n render() {\n return null;\n }\n}\nTrafficLayer.contextType = MapContext;\n\nfunction BicyclingLayerFunctional({ onLoad, onUnmount }) {\n const map = useContext(MapContext);\n const [instance, setInstance] = useState(null);\n // Order does matter\n useEffect(() => {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(() => {\n const bicyclingLayer = new google.maps.BicyclingLayer();\n setInstance(bicyclingLayer);\n bicyclingLayer.setMap(map);\n if (onLoad) {\n onLoad(bicyclingLayer);\n }\n return () => {\n if (bicyclingLayer !== null) {\n if (onUnmount) {\n onUnmount(bicyclingLayer);\n }\n bicyclingLayer.setMap(null);\n }\n };\n }, []);\n return null;\n}\nconst BicyclingLayerF = memo(BicyclingLayerFunctional);\nclass BicyclingLayer extends PureComponent {\n constructor() {\n super(...arguments);\n this.state = {\n bicyclingLayer: null,\n };\n this.setBicyclingLayerCallback = () => {\n if (this.state.bicyclingLayer !== null) {\n this.state.bicyclingLayer.setMap(this.context);\n if (this.props.onLoad) {\n this.props.onLoad(this.state.bicyclingLayer);\n }\n }\n };\n }\n componentDidMount() {\n const bicyclingLayer = new google.maps.BicyclingLayer();\n this.setState(() => {\n return {\n bicyclingLayer,\n };\n }, this.setBicyclingLayerCallback);\n }\n componentWillUnmount() {\n if (this.state.bicyclingLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.bicyclingLayer);\n }\n this.state.bicyclingLayer.setMap(null);\n }\n }\n render() {\n return null;\n }\n}\nBicyclingLayer.contextType = MapContext;\n\nfunction TransitLayerFunctional({ onLoad, onUnmount }) {\n const map = useContext(MapContext);\n const [instance, setInstance] = useState(null);\n // Order does matter\n useEffect(() => {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(() => {\n const transitLayer = new google.maps.TransitLayer();\n setInstance(transitLayer);\n transitLayer.setMap(map);\n if (onLoad) {\n onLoad(transitLayer);\n }\n return () => {\n if (instance !== null) {\n if (onUnmount) {\n onUnmount(instance);\n }\n // @ts-ignore\n this.state.transitLayer.setMap(null);\n }\n };\n }, []);\n return null;\n}\nconst TransitLayerF = memo(TransitLayerFunctional);\nclass TransitLayer extends PureComponent {\n constructor() {\n super(...arguments);\n this.state = {\n transitLayer: null,\n };\n this.setTransitLayerCallback = () => {\n if (this.state.transitLayer !== null) {\n // @ts-ignore\n this.state.transitLayer.setMap(this.context);\n if (this.props.onLoad) {\n // @ts-ignore\n this.props.onLoad(this.state.transitLayer);\n }\n }\n };\n }\n componentDidMount() {\n const transitLayer = new google.maps.TransitLayer();\n this.setState(function setTransitLayer() {\n return {\n transitLayer,\n };\n }, this.setTransitLayerCallback);\n }\n componentWillUnmount() {\n if (this.state.transitLayer !== null) {\n if (this.props.onUnmount) {\n // @ts-ignore\n this.props.onUnmount(this.state.transitLayer);\n }\n // @ts-ignore\n this.state.transitLayer.setMap(null);\n }\n }\n render() {\n return null;\n }\n}\nTransitLayer.contextType = MapContext;\n\n/* globals google */\nconst eventMap$g = {\n onCircleComplete: 'circlecomplete',\n onMarkerComplete: 'markercomplete',\n onOverlayComplete: 'overlaycomplete',\n onPolygonComplete: 'polygoncomplete',\n onPolylineComplete: 'polylinecomplete',\n onRectangleComplete: 'rectanglecomplete',\n};\nconst updaterMap$g = {\n drawingMode(instance, drawingMode) {\n instance.setDrawingMode(drawingMode);\n },\n options(instance, options) {\n instance.setOptions(options);\n },\n};\nfunction DrawingManagerFunctional({ options, drawingMode, onCircleComplete, onMarkerComplete, onOverlayComplete, onPolygonComplete, onPolylineComplete, onRectangleComplete, onLoad, onUnmount }) {\n const map = useContext(MapContext);\n const [instance, setInstance] = useState(null);\n const [circlecompleteListener, setCircleCompleteListener] = useState(null);\n const [markercompleteListener, setMarkerCompleteListener] = useState(null);\n const [overlaycompleteListener, setOverlayCompleteListener] = useState(null);\n const [polygoncompleteListener, setPolygonCompleteListener] = useState(null);\n const [polylinecompleteListener, setPolylineCompleteListener] = useState(null);\n const [rectanglecompleteListener, setRectangleCompleteListener] = useState(null);\n // Order does matter\n useEffect(() => {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(() => {\n if (options && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(() => {\n if (drawingMode && instance !== null) {\n instance.setDrawingMode(drawingMode);\n }\n }, [instance, drawingMode]);\n useEffect(() => {\n if (instance && onCircleComplete) {\n if (circlecompleteListener !== null) {\n google.maps.event.removeListener(circlecompleteListener);\n }\n setCircleCompleteListener(google.maps.event.addListener(instance, 'circlecomplete', onCircleComplete));\n }\n }, [instance, onCircleComplete]);\n useEffect(() => {\n if (instance && onMarkerComplete) {\n if (markercompleteListener !== null) {\n google.maps.event.removeListener(markercompleteListener);\n }\n setMarkerCompleteListener(google.maps.event.addListener(instance, 'markercomplete', onMarkerComplete));\n }\n }, [instance, onMarkerComplete]);\n useEffect(() => {\n if (instance && onOverlayComplete) {\n if (overlaycompleteListener !== null) {\n google.maps.event.removeListener(overlaycompleteListener);\n }\n setOverlayCompleteListener(google.maps.event.addListener(instance, 'overlaycomplete', onOverlayComplete));\n }\n }, [instance, onOverlayComplete]);\n useEffect(() => {\n if (instance && onPolygonComplete) {\n if (polygoncompleteListener !== null) {\n google.maps.event.removeListener(polygoncompleteListener);\n }\n setPolygonCompleteListener(google.maps.event.addListener(instance, 'polygoncomplete', onPolygonComplete));\n }\n }, [instance, onPolygonComplete]);\n useEffect(() => {\n if (instance && onPolylineComplete) {\n if (polylinecompleteListener !== null) {\n google.maps.event.removeListener(polylinecompleteListener);\n }\n setPolylineCompleteListener(google.maps.event.addListener(instance, 'polylinecomplete', onPolylineComplete));\n }\n }, [instance, onPolylineComplete]);\n useEffect(() => {\n if (instance && onRectangleComplete) {\n if (rectanglecompleteListener !== null) {\n google.maps.event.removeListener(rectanglecompleteListener);\n }\n setRectangleCompleteListener(google.maps.event.addListener(instance, 'rectanglecomplete', onRectangleComplete));\n }\n }, [instance, onRectangleComplete]);\n useEffect(() => {\n invariant_1(!!google.maps.drawing, `Did you include prop libraries={['drawing']} in the URL? %s`, google.maps.drawing);\n const drawingManager = new google.maps.drawing.DrawingManager(Object.assign(Object.assign({}, (options || {})), { map }));\n if (drawingMode) {\n drawingManager.setDrawingMode(drawingMode);\n }\n if (onCircleComplete) {\n setCircleCompleteListener(google.maps.event.addListener(drawingManager, 'circlecomplete', onCircleComplete));\n }\n if (onMarkerComplete) {\n setMarkerCompleteListener(google.maps.event.addListener(drawingManager, 'markercomplete', onMarkerComplete));\n }\n if (onOverlayComplete) {\n setOverlayCompleteListener(google.maps.event.addListener(drawingManager, 'overlaycomplete', onOverlayComplete));\n }\n if (onPolygonComplete) {\n setPolygonCompleteListener(google.maps.event.addListener(drawingManager, 'polygoncomplete', onPolygonComplete));\n }\n if (onPolylineComplete) {\n setPolylineCompleteListener(google.maps.event.addListener(drawingManager, 'polylinecomplete', onPolylineComplete));\n }\n if (onRectangleComplete) {\n setRectangleCompleteListener(google.maps.event.addListener(drawingManager, 'rectanglecomplete', onRectangleComplete));\n }\n setInstance(drawingManager);\n if (onLoad) {\n onLoad(drawingManager);\n }\n return () => {\n if (instance !== null) {\n if (circlecompleteListener) {\n google.maps.event.removeListener(circlecompleteListener);\n }\n if (markercompleteListener) {\n google.maps.event.removeListener(markercompleteListener);\n }\n if (overlaycompleteListener) {\n google.maps.event.removeListener(overlaycompleteListener);\n }\n if (polygoncompleteListener) {\n google.maps.event.removeListener(polygoncompleteListener);\n }\n if (polylinecompleteListener) {\n google.maps.event.removeListener(polylinecompleteListener);\n }\n if (rectanglecompleteListener) {\n google.maps.event.removeListener(rectanglecompleteListener);\n }\n if (onUnmount) {\n onUnmount(instance);\n }\n instance.setMap(null);\n }\n };\n }, []);\n return null;\n}\nconst DrawingManagerF = memo(DrawingManagerFunctional);\nclass DrawingManager extends PureComponent {\n constructor(props) {\n super(props);\n this.registeredEvents = [];\n this.state = {\n drawingManager: null,\n };\n this.setDrawingManagerCallback = () => {\n if (this.state.drawingManager !== null && this.props.onLoad) {\n this.props.onLoad(this.state.drawingManager);\n }\n };\n invariant_1(!!google.maps.drawing, `Did you include prop libraries={['drawing']} in the URL? %s`, google.maps.drawing);\n }\n componentDidMount() {\n const drawingManager = new google.maps.drawing.DrawingManager(Object.assign(Object.assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$g,\n eventMap: eventMap$g,\n prevProps: {},\n nextProps: this.props,\n instance: drawingManager,\n });\n this.setState(function setDrawingManager() {\n return {\n drawingManager,\n };\n }, this.setDrawingManagerCallback);\n }\n componentDidUpdate(prevProps) {\n if (this.state.drawingManager !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$g,\n eventMap: eventMap$g,\n prevProps,\n nextProps: this.props,\n instance: this.state.drawingManager,\n });\n }\n }\n componentWillUnmount() {\n if (this.state.drawingManager !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.drawingManager);\n }\n unregisterEvents(this.registeredEvents);\n this.state.drawingManager.setMap(null);\n }\n }\n render() {\n return null;\n }\n}\nDrawingManager.contextType = MapContext;\n\nconst eventMap$f = {\n onAnimationChanged: 'animation_changed',\n onClick: 'click',\n onClickableChanged: 'clickable_changed',\n onCursorChanged: 'cursor_changed',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDraggableChanged: 'draggable_changed',\n onDragStart: 'dragstart',\n onFlatChanged: 'flat_changed',\n onIconChanged: 'icon_changed',\n onMouseDown: 'mousedown',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onPositionChanged: 'position_changed',\n onRightClick: 'rightclick',\n onShapeChanged: 'shape_changed',\n onTitleChanged: 'title_changed',\n onVisibleChanged: 'visible_changed',\n onZindexChanged: 'zindex_changed',\n};\nconst updaterMap$f = {\n animation(instance, animation) {\n instance.setAnimation(animation);\n },\n clickable(instance, clickable) {\n instance.setClickable(clickable);\n },\n cursor(instance, cursor) {\n instance.setCursor(cursor);\n },\n draggable(instance, draggable) {\n instance.setDraggable(draggable);\n },\n icon(instance, icon) {\n instance.setIcon(icon);\n },\n label(instance, label) {\n instance.setLabel(label);\n },\n map(instance, map) {\n instance.setMap(map);\n },\n opacity(instance, opacity) {\n instance.setOpacity(opacity);\n },\n options(instance, options) {\n instance.setOptions(options);\n },\n position(instance, position) {\n instance.setPosition(position);\n },\n shape(instance, shape) {\n instance.setShape(shape);\n },\n title(instance, title) {\n instance.setTitle(title);\n },\n visible(instance, visible) {\n instance.setVisible(visible);\n },\n zIndex(instance, zIndex) {\n instance.setZIndex(zIndex);\n },\n};\nconst defaultOptions$4 = {};\nfunction MarkerFunctional({ position, options, clusterer, noClustererRedraw, children, draggable, visible, animation, clickable, cursor, icon, label, opacity, shape, title, zIndex, onClick, onDblClick, onDrag, onDragEnd, onDragStart, onMouseOut, onMouseOver, onMouseUp, onMouseDown, onRightClick, onClickableChanged, onCursorChanged, onAnimationChanged, onDraggableChanged, onFlatChanged, onIconChanged, onPositionChanged, onShapeChanged, onTitleChanged, onVisibleChanged, onZindexChanged, onLoad, onUnmount }) {\n const map = useContext(MapContext);\n const [instance, setInstance] = useState(null);\n const [dblclickListener, setDblclickListener] = useState(null);\n const [dragendListener, setDragendListener] = useState(null);\n const [dragstartListener, setDragstartListener] = useState(null);\n const [mousedownListener, setMousedownListener] = useState(null);\n const [mouseoutListener, setMouseoutListener] = useState(null);\n const [mouseoverListener, setMouseoverListener] = useState(null);\n const [mouseupListener, setMouseupListener] = useState(null);\n const [rightclickListener, setRightclickListener] = useState(null);\n const [clickListener, setClickListener] = useState(null);\n const [dragListener, setDragListener] = useState(null);\n const [clickableChangedListener, setClickableChangedListener] = useState(null);\n const [cursorChangedListener, setCursorChangedListener] = useState(null);\n const [animationChangedListener, setAnimationChangedListener] = useState(null);\n const [draggableChangedListener, setDraggableChangedListener] = useState(null);\n const [flatChangedListener, setFlatChangedListener] = useState(null);\n const [iconChangedListener, setIconChangedListener] = useState(null);\n const [positionChangedListener, setPositionChangedListener] = useState(null);\n const [shapeChangedListener, setShapeChangedListener] = useState(null);\n const [titleChangedListener, setTitleChangedListener] = useState(null);\n const [visibleChangedListener, setVisibleChangedListener] = useState(null);\n const [zIndexChangedListener, setZindexChangedListener] = useState(null);\n // Order does matter\n useEffect(() => {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(() => {\n if (typeof options !== 'undefined' && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(() => {\n if (typeof draggable !== 'undefined' && instance !== null) {\n instance.setDraggable(draggable);\n }\n }, [instance, draggable]);\n useEffect(() => {\n if (position && instance !== null) {\n instance.setPosition(position);\n }\n }, [instance, position]);\n useEffect(() => {\n if (typeof visible !== 'undefined' && instance !== null) {\n instance.setVisible(visible);\n }\n }, [instance, visible]);\n useEffect(() => {\n if (animation && instance !== null) {\n instance.setAnimation(animation);\n }\n }, [instance, animation]);\n useEffect(() => {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(() => {\n if (instance && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(instance, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(() => {\n if (instance && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(instance, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(() => {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(() => {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(() => {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(() => {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(() => {\n if (instance && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(() => {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(() => {\n if (instance && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(instance, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(() => {\n if (instance && onClickableChanged) {\n if (clickableChangedListener !== null) {\n google.maps.event.removeListener(clickableChangedListener);\n }\n setClickableChangedListener(google.maps.event.addListener(instance, 'clickable_changed', onClickableChanged));\n }\n }, [onClickableChanged]);\n useEffect(() => {\n if (instance && onCursorChanged) {\n if (cursorChangedListener !== null) {\n google.maps.event.removeListener(cursorChangedListener);\n }\n setCursorChangedListener(google.maps.event.addListener(instance, 'cursor_changed', onCursorChanged));\n }\n }, [onCursorChanged]);\n useEffect(() => {\n if (instance && onAnimationChanged) {\n if (animationChangedListener !== null) {\n google.maps.event.removeListener(animationChangedListener);\n }\n setAnimationChangedListener(google.maps.event.addListener(instance, 'animation_changed', onAnimationChanged));\n }\n }, [onAnimationChanged]);\n useEffect(() => {\n if (instance && onDraggableChanged) {\n if (draggableChangedListener !== null) {\n google.maps.event.removeListener(draggableChangedListener);\n }\n setDraggableChangedListener(google.maps.event.addListener(instance, 'draggable_changed', onDraggableChanged));\n }\n }, [onDraggableChanged]);\n useEffect(() => {\n if (instance && onFlatChanged) {\n if (flatChangedListener !== null) {\n google.maps.event.removeListener(flatChangedListener);\n }\n setFlatChangedListener(google.maps.event.addListener(instance, 'flat_changed', onFlatChanged));\n }\n }, [onFlatChanged]);\n useEffect(() => {\n if (instance && onIconChanged) {\n if (iconChangedListener !== null) {\n google.maps.event.removeListener(iconChangedListener);\n }\n setIconChangedListener(google.maps.event.addListener(instance, 'icon_changed', onIconChanged));\n }\n }, [onIconChanged]);\n useEffect(() => {\n if (instance && onPositionChanged) {\n if (positionChangedListener !== null) {\n google.maps.event.removeListener(positionChangedListener);\n }\n setPositionChangedListener(google.maps.event.addListener(instance, 'position_changed', onPositionChanged));\n }\n }, [onPositionChanged]);\n useEffect(() => {\n if (instance && onShapeChanged) {\n if (shapeChangedListener !== null) {\n google.maps.event.removeListener(shapeChangedListener);\n }\n setShapeChangedListener(google.maps.event.addListener(instance, 'shape_changed', onShapeChanged));\n }\n }, [onShapeChanged]);\n useEffect(() => {\n if (instance && onTitleChanged) {\n if (titleChangedListener !== null) {\n google.maps.event.removeListener(titleChangedListener);\n }\n setTitleChangedListener(google.maps.event.addListener(instance, 'title_changed', onTitleChanged));\n }\n }, [onTitleChanged]);\n useEffect(() => {\n if (instance && onVisibleChanged) {\n if (visibleChangedListener !== null) {\n google.maps.event.removeListener(visibleChangedListener);\n }\n setVisibleChangedListener(google.maps.event.addListener(instance, 'visible_changed', onVisibleChanged));\n }\n }, [onVisibleChanged]);\n useEffect(() => {\n if (instance && onZindexChanged) {\n if (zIndexChangedListener !== null) {\n google.maps.event.removeListener(zIndexChangedListener);\n }\n setZindexChangedListener(google.maps.event.addListener(instance, 'zindex_changed', onZindexChanged));\n }\n }, [onZindexChanged]);\n useEffect(() => {\n const markerOptions = Object.assign(Object.assign(Object.assign({}, (options || defaultOptions$4)), (clusterer ? defaultOptions$4 : { map })), { position: position });\n const marker = new google.maps.Marker(markerOptions);\n if (clusterer) {\n clusterer.addMarker(marker, !!noClustererRedraw);\n }\n else {\n marker.setMap(map);\n }\n if (position) {\n marker.setPosition(position);\n }\n if (typeof visible !== 'undefined') {\n marker.setVisible(visible);\n }\n if (typeof draggable !== 'undefined') {\n marker.setDraggable(draggable);\n }\n if (typeof clickable !== 'undefined') {\n marker.setClickable(clickable);\n }\n if (typeof cursor === 'string') {\n marker.setCursor(cursor);\n }\n if (icon) {\n marker.setIcon(icon);\n }\n if (typeof label !== 'undefined') {\n marker.setLabel(label);\n }\n if (typeof opacity !== 'undefined') {\n marker.setOpacity(opacity);\n }\n if (shape) {\n marker.setShape(shape);\n }\n if (typeof title === 'string') {\n marker.setTitle(title);\n }\n if (typeof zIndex === 'number') {\n marker.setZIndex(zIndex);\n }\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(marker, 'dblclick', onDblClick));\n }\n if (onDragEnd) {\n setDragendListener(google.maps.event.addListener(marker, 'dragend', onDragEnd));\n }\n if (onDragStart) {\n setDragstartListener(google.maps.event.addListener(marker, 'dragstart', onDragStart));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(marker, 'mousedown', onMouseDown));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(marker, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(marker, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(marker, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightclickListener(google.maps.event.addListener(marker, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(marker, 'click', onClick));\n }\n if (onDrag) {\n setDragListener(google.maps.event.addListener(marker, 'drag', onDrag));\n }\n if (onClickableChanged) {\n setClickableChangedListener(google.maps.event.addListener(marker, 'clickable_changed', onClickableChanged));\n }\n if (onCursorChanged) {\n setCursorChangedListener(google.maps.event.addListener(marker, 'cursor_changed', onCursorChanged));\n }\n if (onAnimationChanged) {\n setAnimationChangedListener(google.maps.event.addListener(marker, 'animation_changed', onAnimationChanged));\n }\n if (onDraggableChanged) {\n setDraggableChangedListener(google.maps.event.addListener(marker, 'draggable_changed', onDraggableChanged));\n }\n if (onFlatChanged) {\n setFlatChangedListener(google.maps.event.addListener(marker, 'flat_changed', onFlatChanged));\n }\n if (onIconChanged) {\n setIconChangedListener(google.maps.event.addListener(marker, 'icon_changed', onIconChanged));\n }\n if (onPositionChanged) {\n setPositionChangedListener(google.maps.event.addListener(marker, 'position_changed', onPositionChanged));\n }\n if (onShapeChanged) {\n setShapeChangedListener(google.maps.event.addListener(marker, 'shape_changed', onShapeChanged));\n }\n if (onTitleChanged) {\n setTitleChangedListener(google.maps.event.addListener(marker, 'title_changed', onTitleChanged));\n }\n if (onVisibleChanged) {\n setVisibleChangedListener(google.maps.event.addListener(marker, 'visible_changed', onVisibleChanged));\n }\n if (onZindexChanged) {\n setZindexChangedListener(google.maps.event.addListener(marker, 'zindex_changed', onZindexChanged));\n }\n setInstance(marker);\n if (onLoad) {\n onLoad(marker);\n }\n return () => {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (clickableChangedListener !== null) {\n google.maps.event.removeListener(clickableChangedListener);\n }\n if (cursorChangedListener !== null) {\n google.maps.event.removeListener(cursorChangedListener);\n }\n if (animationChangedListener !== null) {\n google.maps.event.removeListener(animationChangedListener);\n }\n if (draggableChangedListener !== null) {\n google.maps.event.removeListener(draggableChangedListener);\n }\n if (flatChangedListener !== null) {\n google.maps.event.removeListener(flatChangedListener);\n }\n if (iconChangedListener !== null) {\n google.maps.event.removeListener(iconChangedListener);\n }\n if (positionChangedListener !== null) {\n google.maps.event.removeListener(positionChangedListener);\n }\n if (titleChangedListener !== null) {\n google.maps.event.removeListener(titleChangedListener);\n }\n if (visibleChangedListener !== null) {\n google.maps.event.removeListener(visibleChangedListener);\n }\n if (zIndexChangedListener !== null) {\n google.maps.event.removeListener(zIndexChangedListener);\n }\n if (onUnmount) {\n onUnmount(marker);\n }\n if (clusterer) {\n clusterer.removeMarker(marker, !!noClustererRedraw);\n }\n else if (marker) {\n marker.setMap(null);\n }\n };\n }, []);\n const chx = useMemo(() => {\n return children\n ? Children.map(children, child => {\n if (!isValidElement(child)) {\n return child;\n }\n const elementChild = child;\n return cloneElement(elementChild, { anchor: instance });\n })\n : null;\n }, [children, instance]);\n return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment, { children: chx }) || null;\n}\nconst MarkerF = memo(MarkerFunctional);\nclass Marker extends PureComponent {\n constructor() {\n super(...arguments);\n this.registeredEvents = [];\n }\n componentDidMount() {\n const markerOptions = Object.assign(Object.assign(Object.assign({}, (this.props.options || defaultOptions$4)), (this.props.clusterer ? defaultOptions$4 : { map: this.context })), { position: this.props.position });\n // Unfortunately we can't just do this in the contstructor, because the\n // `MapContext` might not be filled in yet.\n this.marker = new google.maps.Marker(markerOptions);\n if (this.props.clusterer) {\n this.props.clusterer.addMarker(this.marker, !!this.props.noClustererRedraw);\n }\n else {\n this.marker.setMap(this.context);\n }\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$f,\n eventMap: eventMap$f,\n prevProps: {},\n nextProps: this.props,\n instance: this.marker,\n });\n if (this.props.onLoad) {\n this.props.onLoad(this.marker);\n }\n }\n componentDidUpdate(prevProps) {\n if (this.marker) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$f,\n eventMap: eventMap$f,\n prevProps,\n nextProps: this.props,\n instance: this.marker,\n });\n }\n }\n componentWillUnmount() {\n if (this.marker) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.marker);\n }\n unregisterEvents(this.registeredEvents);\n if (this.props.clusterer) {\n this.props.clusterer.removeMarker(this.marker, !!this.props.noClustererRedraw);\n }\n else {\n this.marker && this.marker.setMap(null);\n }\n }\n }\n render() {\n let children = null;\n if (this.props.children) {\n children = Children.map(this.props.children, child => {\n if (!isValidElement(child)) {\n return child;\n }\n let elementChild = child;\n return cloneElement(elementChild, { anchor: this.marker });\n });\n }\n return children || null;\n }\n}\nMarker.contextType = MapContext;\n\nvar ClusterIcon = /** @class */ (function () {\n function ClusterIcon(cluster, styles) {\n cluster.getClusterer().extend(ClusterIcon, google.maps.OverlayView);\n this.cluster = cluster;\n this.clusterClassName = this.cluster.getClusterer().getClusterClass();\n this.className = this.clusterClassName;\n this.styles = styles;\n this.center = undefined;\n this.div = null;\n this.sums = null;\n this.visible = false;\n this.boundsChangedListener = null;\n this.url = '';\n this.height = 0;\n this.width = 0;\n this.anchorText = [0, 0];\n this.anchorIcon = [0, 0];\n this.textColor = 'black';\n this.textSize = 11;\n this.textDecoration = 'none';\n this.fontWeight = 'bold';\n this.fontStyle = 'normal';\n this.fontFamily = 'Arial,sans-serif';\n this.backgroundPosition = '0 0';\n this.cMouseDownInCluster = null;\n this.cDraggingMapByCluster = null;\n this.timeOut = null;\n this.setMap(cluster.getMap()); // Note: this causes onAdd to be called\n this.onBoundsChanged = this.onBoundsChanged.bind(this);\n this.onMouseDown = this.onMouseDown.bind(this);\n this.onClick = this.onClick.bind(this);\n this.onMouseOver = this.onMouseOver.bind(this);\n this.onMouseOut = this.onMouseOut.bind(this);\n this.onAdd = this.onAdd.bind(this);\n this.onRemove = this.onRemove.bind(this);\n this.draw = this.draw.bind(this);\n this.hide = this.hide.bind(this);\n this.show = this.show.bind(this);\n this.useStyle = this.useStyle.bind(this);\n this.setCenter = this.setCenter.bind(this);\n this.getPosFromLatLng = this.getPosFromLatLng.bind(this);\n }\n ClusterIcon.prototype.onBoundsChanged = function () {\n this.cDraggingMapByCluster = this.cMouseDownInCluster;\n };\n ClusterIcon.prototype.onMouseDown = function () {\n this.cMouseDownInCluster = true;\n this.cDraggingMapByCluster = false;\n };\n ClusterIcon.prototype.onClick = function (event) {\n this.cMouseDownInCluster = false;\n if (!this.cDraggingMapByCluster) {\n var markerClusterer_1 = this.cluster.getClusterer();\n /**\n * This event is fired when a cluster marker is clicked.\n * @name MarkerClusterer#click\n * @param {Cluster} c The cluster that was clicked.\n * @event\n */\n google.maps.event.trigger(markerClusterer_1, 'click', this.cluster);\n google.maps.event.trigger(markerClusterer_1, 'clusterclick', this.cluster); // deprecated name\n // The default click handler follows. Disable it by setting\n // the zoomOnClick property to false.\n if (markerClusterer_1.getZoomOnClick()) {\n // Zoom into the cluster.\n var maxZoom_1 = markerClusterer_1.getMaxZoom();\n var bounds_1 = this.cluster.getBounds();\n var map = markerClusterer_1.getMap();\n if (map !== null && 'fitBounds' in map) {\n map.fitBounds(bounds_1);\n }\n // There is a fix for Issue 170 here:\n this.timeOut = window.setTimeout(function () {\n var map = markerClusterer_1.getMap();\n if (map !== null) {\n if ('fitBounds' in map) {\n map.fitBounds(bounds_1);\n }\n var zoom = map.getZoom() || 0;\n // Don't zoom beyond the max zoom level\n if (maxZoom_1 !== null &&\n zoom > maxZoom_1) {\n map.setZoom(maxZoom_1 + 1);\n }\n }\n }, 100);\n }\n // Prevent event propagation to the map:\n event.cancelBubble = true;\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n }\n };\n ClusterIcon.prototype.onMouseOver = function () {\n /**\n * This event is fired when the mouse moves over a cluster marker.\n * @name MarkerClusterer#mouseover\n * @param {Cluster} c The cluster that the mouse moved over.\n * @event\n */\n google.maps.event.trigger(this.cluster.getClusterer(), 'mouseover', this.cluster);\n };\n ClusterIcon.prototype.onMouseOut = function () {\n /**\n * This event is fired when the mouse moves out of a cluster marker.\n * @name MarkerClusterer#mouseout\n * @param {Cluster} c The cluster that the mouse moved out of.\n * @event\n */\n google.maps.event.trigger(this.cluster.getClusterer(), 'mouseout', this.cluster);\n };\n ClusterIcon.prototype.onAdd = function () {\n var _a;\n this.div = document.createElement('div');\n this.div.className = this.className;\n if (this.visible) {\n this.show();\n }\n (_a = this.getPanes()) === null || _a === void 0 ? void 0 : _a.overlayMouseTarget.appendChild(this.div);\n var map = this.getMap();\n if (map !== null) {\n // Fix for Issue 157\n this.boundsChangedListener = google.maps.event.addListener(map, 'bounds_changed', this.onBoundsChanged);\n this.div.addEventListener('mousedown', this.onMouseDown);\n this.div.addEventListener('click', this.onClick);\n this.div.addEventListener('mouseover', this.onMouseOver);\n this.div.addEventListener('mouseout', this.onMouseOut);\n }\n };\n ClusterIcon.prototype.onRemove = function () {\n if (this.div && this.div.parentNode) {\n this.hide();\n if (this.boundsChangedListener !== null) {\n google.maps.event.removeListener(this.boundsChangedListener);\n }\n this.div.removeEventListener('mousedown', this.onMouseDown);\n this.div.removeEventListener('click', this.onClick);\n this.div.removeEventListener('mouseover', this.onMouseOver);\n this.div.removeEventListener('mouseout', this.onMouseOut);\n this.div.parentNode.removeChild(this.div);\n if (this.timeOut !== null) {\n window.clearTimeout(this.timeOut);\n this.timeOut = null;\n }\n this.div = null;\n }\n };\n ClusterIcon.prototype.draw = function () {\n if (this.visible && this.div !== null && this.center) {\n var pos = this.getPosFromLatLng(this.center);\n this.div.style.top = pos !== null ? \"\".concat(pos.y, \"px\") : '0';\n this.div.style.left = pos !== null ? \"\".concat(pos.x, \"px\") : '0';\n }\n };\n ClusterIcon.prototype.hide = function () {\n if (this.div) {\n this.div.style.display = 'none';\n }\n this.visible = false;\n };\n ClusterIcon.prototype.show = function () {\n var _a, _b, _c, _d;\n if (this.div && this.center) {\n var divTitle = this.sums === null ||\n typeof this.sums.title === 'undefined' ||\n this.sums.title === '' ? this.cluster.getClusterer().getTitle() : this.sums.title;\n // NOTE: values must be specified in px units\n var bp = this.backgroundPosition.split(' ');\n var spriteH = parseInt(bp[0].replace(/^\\s+|\\s+$/g, ''), 10);\n var spriteV = parseInt(bp[1].replace(/^\\s+|\\s+$/g, ''), 10);\n var pos = this.getPosFromLatLng(this.center);\n this.div.className = this.className;\n this.div.setAttribute('style', \"cursor: 'pointer'; position: 'absolute'; top: \".concat(pos !== null ? \"\".concat(pos.y, \"px\") : '0', \"; left: \").concat(pos !== null ? \"\".concat(pos.x, \"px\") : '0', \"; width: \").concat(this.width, \"px; height: \").concat(this.height, \"px; \"));\n var img = document.createElement('img');\n img.alt = divTitle;\n img.src = this.url;\n img.width = this.width;\n img.height = this.height;\n img.setAttribute('style', \"position: absolute; top: \".concat(spriteV, \"px; left: \").concat(spriteH, \"px\"));\n if (!this.cluster.getClusterer().enableRetinaIcons) {\n img.style.clip = \"rect(-\".concat(spriteV, \"px, -\").concat(spriteH + this.width, \"px, -\").concat(spriteV + this.height, \", -\").concat(spriteH, \")\");\n }\n var textElm = document.createElement('div');\n textElm.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\"));\n if ((_a = this.sums) === null || _a === void 0 ? void 0 : _a.text)\n textElm.innerText = \"\".concat((_b = this.sums) === null || _b === void 0 ? void 0 : _b.text);\n if ((_c = this.sums) === null || _c === void 0 ? void 0 : _c.html)\n textElm.innerHTML = \"\".concat((_d = this.sums) === null || _d === void 0 ? void 0 : _d.html);\n this.div.innerHTML = '';\n this.div.appendChild(img);\n this.div.appendChild(textElm);\n this.div.title = divTitle;\n this.div.style.display = '';\n }\n this.visible = true;\n };\n ClusterIcon.prototype.useStyle = function (sums) {\n this.sums = sums;\n var styles = this.cluster.getClusterer().getStyles();\n var style = styles[Math.min(styles.length - 1, Math.max(0, sums.index - 1))];\n this.url = style.url;\n this.height = style.height;\n this.width = style.width;\n if (style.className)\n this.className = \"\".concat(this.clusterClassName, \" \").concat(style.className);\n this.anchorText = style.anchorText || [0, 0];\n this.anchorIcon = style.anchorIcon || [this.height / 2, this.width / 2];\n this.textColor = style.textColor || 'black';\n this.textSize = style.textSize || 11;\n this.textDecoration = style.textDecoration || 'none';\n this.fontWeight = style.fontWeight || 'bold';\n this.fontStyle = style.fontStyle || 'normal';\n this.fontFamily = style.fontFamily || 'Arial,sans-serif';\n this.backgroundPosition = style.backgroundPosition || '0 0';\n };\n ClusterIcon.prototype.setCenter = function (center) {\n this.center = center;\n };\n ClusterIcon.prototype.getPosFromLatLng = function (latlng) {\n var pos = this.getProjection().fromLatLngToDivPixel(latlng);\n if (pos !== null) {\n pos.x -= this.anchorIcon[1];\n pos.y -= this.anchorIcon[0];\n }\n return pos;\n };\n return ClusterIcon;\n}());\n\nvar Cluster$1 = /** @class */ (function () {\n function Cluster(markerClusterer) {\n this.markerClusterer = markerClusterer;\n this.map = this.markerClusterer.getMap();\n this.gridSize = this.markerClusterer.getGridSize();\n this.minClusterSize = this.markerClusterer.getMinimumClusterSize();\n this.averageCenter = this.markerClusterer.getAverageCenter();\n this.markers = [];\n this.center = undefined;\n this.bounds = null;\n this.clusterIcon = new ClusterIcon(this, this.markerClusterer.getStyles());\n this.getSize = this.getSize.bind(this);\n this.getMarkers = this.getMarkers.bind(this);\n this.getCenter = this.getCenter.bind(this);\n this.getMap = this.getMap.bind(this);\n this.getClusterer = this.getClusterer.bind(this);\n this.getBounds = this.getBounds.bind(this);\n this.remove = this.remove.bind(this);\n this.addMarker = this.addMarker.bind(this);\n this.isMarkerInClusterBounds = this.isMarkerInClusterBounds.bind(this);\n this.calculateBounds = this.calculateBounds.bind(this);\n this.updateIcon = this.updateIcon.bind(this);\n this.isMarkerAlreadyAdded = this.isMarkerAlreadyAdded.bind(this);\n }\n Cluster.prototype.getSize = function () {\n return this.markers.length;\n };\n Cluster.prototype.getMarkers = function () {\n return this.markers;\n };\n Cluster.prototype.getCenter = function () {\n return this.center;\n };\n Cluster.prototype.getMap = function () {\n return this.map;\n };\n Cluster.prototype.getClusterer = function () {\n return this.markerClusterer;\n };\n Cluster.prototype.getBounds = function () {\n var bounds = new google.maps.LatLngBounds(this.center, this.center);\n var markers = this.getMarkers();\n for (var i = 0; i < markers.length; i++) {\n var position = markers[i].getPosition();\n if (position) {\n bounds.extend(position);\n }\n }\n return bounds;\n };\n Cluster.prototype.remove = function () {\n this.clusterIcon.setMap(null);\n this.markers = [];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n delete this.markers;\n };\n Cluster.prototype.addMarker = function (marker) {\n var _a;\n if (this.isMarkerAlreadyAdded(marker)) {\n return false;\n }\n if (!this.center) {\n var position = marker.getPosition();\n if (position) {\n this.center = position;\n this.calculateBounds();\n }\n }\n else {\n if (this.averageCenter) {\n var position = marker.getPosition();\n if (position) {\n var length_1 = this.markers.length + 1;\n this.center = new google.maps.LatLng((this.center.lat() * (length_1 - 1) + position.lat()) / length_1, (this.center.lng() * (length_1 - 1) + position.lng()) / length_1);\n this.calculateBounds();\n }\n }\n }\n marker.isAdded = true;\n this.markers.push(marker);\n var mCount = this.markers.length;\n var maxZoom = this.markerClusterer.getMaxZoom();\n var zoom = (_a = this.map) === null || _a === void 0 ? void 0 : _a.getZoom();\n if (maxZoom !== null && typeof zoom !== 'undefined' && zoom > maxZoom) {\n // Zoomed in past max zoom, so show the marker.\n if (marker.getMap() !== this.map) {\n marker.setMap(this.map);\n }\n }\n else if (mCount < this.minClusterSize) {\n // Min cluster size not reached so show the marker.\n if (marker.getMap() !== this.map) {\n marker.setMap(this.map);\n }\n }\n else if (mCount === this.minClusterSize) {\n // Hide the markers that were showing.\n for (var i = 0; i < mCount; i++) {\n this.markers[i].setMap(null);\n }\n }\n else {\n marker.setMap(null);\n }\n return true;\n };\n Cluster.prototype.isMarkerInClusterBounds = function (marker) {\n if (this.bounds !== null) {\n var position = marker.getPosition();\n if (position) {\n return this.bounds.contains(position);\n }\n }\n return false;\n };\n Cluster.prototype.calculateBounds = function () {\n this.bounds = this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center, this.center));\n };\n Cluster.prototype.updateIcon = function () {\n var _a;\n var mCount = this.markers.length;\n var maxZoom = this.markerClusterer.getMaxZoom();\n var zoom = (_a = this.map) === null || _a === void 0 ? void 0 : _a.getZoom();\n if (maxZoom !== null && typeof zoom !== 'undefined' && zoom > maxZoom) {\n this.clusterIcon.hide();\n return;\n }\n if (mCount < this.minClusterSize) {\n // Min cluster size not yet reached.\n this.clusterIcon.hide();\n return;\n }\n if (this.center) {\n this.clusterIcon.setCenter(this.center);\n }\n this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers, this.markerClusterer.getStyles().length));\n this.clusterIcon.show();\n };\n Cluster.prototype.isMarkerAlreadyAdded = function (marker) {\n if (this.markers.includes) {\n return this.markers.includes(marker);\n }\n for (var i = 0; i < this.markers.length; i++) {\n if (marker === this.markers[i]) {\n return true;\n }\n }\n return false;\n };\n return Cluster;\n}());\n\n/* global google */\n/**\n * Supports up to 9007199254740991 (Number.MAX_SAFE_INTEGER) markers\n * which is not a problem as max array length is 4294967296 (2**32)\n */\nfunction CALCULATOR(markers, numStyles) {\n var count = markers.length;\n var numberOfDigits = count.toString().length;\n var index = Math.min(numberOfDigits, numStyles);\n return {\n text: count.toString(),\n index: index,\n title: '',\n };\n}\nvar BATCH_SIZE = 2000;\nvar BATCH_SIZE_IE = 500;\nvar IMAGE_PATH = 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m';\nvar IMAGE_EXTENSION = 'png';\nvar IMAGE_SIZES = [53, 56, 66, 78, 90];\nvar CLUSTERER_CLASS = 'cluster';\nvar Clusterer = /** @class */ (function () {\n function Clusterer(map, optMarkers, optOptions) {\n if (optMarkers === void 0) { optMarkers = []; }\n if (optOptions === void 0) { optOptions = {}; }\n this.getMinimumClusterSize = this.getMinimumClusterSize.bind(this);\n this.setMinimumClusterSize = this.setMinimumClusterSize.bind(this);\n this.getEnableRetinaIcons = this.getEnableRetinaIcons.bind(this);\n this.setEnableRetinaIcons = this.setEnableRetinaIcons.bind(this);\n this.addToClosestCluster = this.addToClosestCluster.bind(this);\n this.getImageExtension = this.getImageExtension.bind(this);\n this.setImageExtension = this.setImageExtension.bind(this);\n this.getExtendedBounds = this.getExtendedBounds.bind(this);\n this.getAverageCenter = this.getAverageCenter.bind(this);\n this.setAverageCenter = this.setAverageCenter.bind(this);\n this.getTotalClusters = this.getTotalClusters.bind(this);\n this.fitMapToMarkers = this.fitMapToMarkers.bind(this);\n this.getIgnoreHidden = this.getIgnoreHidden.bind(this);\n this.setIgnoreHidden = this.setIgnoreHidden.bind(this);\n this.getClusterClass = this.getClusterClass.bind(this);\n this.setClusterClass = this.setClusterClass.bind(this);\n this.getTotalMarkers = this.getTotalMarkers.bind(this);\n this.getZoomOnClick = this.getZoomOnClick.bind(this);\n this.setZoomOnClick = this.setZoomOnClick.bind(this);\n this.getBatchSizeIE = this.getBatchSizeIE.bind(this);\n this.setBatchSizeIE = this.setBatchSizeIE.bind(this);\n this.createClusters = this.createClusters.bind(this);\n this.onZoomChanged = this.onZoomChanged.bind(this);\n this.getImageSizes = this.getImageSizes.bind(this);\n this.setImageSizes = this.setImageSizes.bind(this);\n this.getCalculator = this.getCalculator.bind(this);\n this.setCalculator = this.setCalculator.bind(this);\n this.removeMarkers = this.removeMarkers.bind(this);\n this.resetViewport = this.resetViewport.bind(this);\n this.getImagePath = this.getImagePath.bind(this);\n this.setImagePath = this.setImagePath.bind(this);\n this.pushMarkerTo = this.pushMarkerTo.bind(this);\n this.removeMarker = this.removeMarker.bind(this);\n this.clearMarkers = this.clearMarkers.bind(this);\n this.setupStyles = this.setupStyles.bind(this);\n this.getGridSize = this.getGridSize.bind(this);\n this.setGridSize = this.setGridSize.bind(this);\n this.getClusters = this.getClusters.bind(this);\n this.getMaxZoom = this.getMaxZoom.bind(this);\n this.setMaxZoom = this.setMaxZoom.bind(this);\n this.getMarkers = this.getMarkers.bind(this);\n this.addMarkers = this.addMarkers.bind(this);\n this.getStyles = this.getStyles.bind(this);\n this.setStyles = this.setStyles.bind(this);\n this.addMarker = this.addMarker.bind(this);\n this.onRemove = this.onRemove.bind(this);\n this.getTitle = this.getTitle.bind(this);\n this.setTitle = this.setTitle.bind(this);\n this.repaint = this.repaint.bind(this);\n this.onIdle = this.onIdle.bind(this);\n this.redraw = this.redraw.bind(this);\n this.extend = this.extend.bind(this);\n this.onAdd = this.onAdd.bind(this);\n this.draw = this.draw.bind(this);\n this.extend(Clusterer, google.maps.OverlayView);\n this.markers = [];\n this.clusters = [];\n this.listeners = [];\n this.activeMap = null;\n this.ready = false;\n this.gridSize = optOptions.gridSize || 60;\n this.minClusterSize = optOptions.minimumClusterSize || 2;\n this.maxZoom = optOptions.maxZoom || null;\n this.styles = optOptions.styles || [];\n this.title = optOptions.title || '';\n this.zoomOnClick = true;\n if (optOptions.zoomOnClick !== undefined) {\n this.zoomOnClick = optOptions.zoomOnClick;\n }\n this.averageCenter = false;\n if (optOptions.averageCenter !== undefined) {\n this.averageCenter = optOptions.averageCenter;\n }\n this.ignoreHidden = false;\n if (optOptions.ignoreHidden !== undefined) {\n this.ignoreHidden = optOptions.ignoreHidden;\n }\n this.enableRetinaIcons = false;\n if (optOptions.enableRetinaIcons !== undefined) {\n this.enableRetinaIcons = optOptions.enableRetinaIcons;\n }\n this.imagePath = optOptions.imagePath || IMAGE_PATH;\n this.imageExtension = optOptions.imageExtension || IMAGE_EXTENSION;\n this.imageSizes = optOptions.imageSizes || IMAGE_SIZES;\n this.calculator = optOptions.calculator || CALCULATOR;\n this.batchSize = optOptions.batchSize || BATCH_SIZE;\n this.batchSizeIE = optOptions.batchSizeIE || BATCH_SIZE_IE;\n this.clusterClass = optOptions.clusterClass || CLUSTERER_CLASS;\n if (navigator.userAgent.toLowerCase().indexOf('msie') !== -1) {\n // Try to avoid IE timeout when processing a huge number of markers:\n this.batchSize = this.batchSizeIE;\n }\n this.timerRefStatic = null;\n this.setupStyles();\n this.addMarkers(optMarkers, true);\n this.setMap(map); // Note: this causes onAdd to be called\n }\n Clusterer.prototype.onZoomChanged = function () {\n var _a, _b;\n this.resetViewport(false);\n // Workaround for this Google bug: when map is at level 0 and \"-\" of\n // zoom slider is clicked, a \"zoom_changed\" event is fired even though\n // the map doesn't zoom out any further. In this situation, no \"idle\"\n // event is triggered so the cluster markers that have been removed\n // do not get redrawn. Same goes for a zoom in at maxZoom.\n if (((_a = this.getMap()) === null || _a === void 0 ? void 0 : _a.getZoom()) === (this.get('minZoom') || 0) ||\n ((_b = this.getMap()) === null || _b === void 0 ? void 0 : _b.getZoom()) === this.get('maxZoom')) {\n google.maps.event.trigger(this, 'idle');\n }\n };\n Clusterer.prototype.onIdle = function () {\n this.redraw();\n };\n Clusterer.prototype.onAdd = function () {\n var map = this.getMap();\n this.activeMap = map;\n this.ready = true;\n this.repaint();\n if (map !== null) {\n // Add the map event listeners\n this.listeners = [\n google.maps.event.addListener(map, 'zoom_changed', this.onZoomChanged),\n google.maps.event.addListener(map, 'idle', this.onIdle),\n ];\n }\n };\n Clusterer.prototype.onRemove = function () {\n // Put all the managed markers back on the map:\n for (var i = 0; i < this.markers.length; i++) {\n if (this.markers[i].getMap() !== this.activeMap) {\n this.markers[i].setMap(this.activeMap);\n }\n }\n // Remove all clusters:\n for (var i = 0; i < this.clusters.length; i++) {\n this.clusters[i].remove();\n }\n this.clusters = [];\n // Remove map event listeners:\n for (var i = 0; i < this.listeners.length; i++) {\n google.maps.event.removeListener(this.listeners[i]);\n }\n this.listeners = [];\n this.activeMap = null;\n this.ready = false;\n };\n Clusterer.prototype.draw = function () { return; };\n Clusterer.prototype.setupStyles = function () {\n if (this.styles.length > 0) {\n return;\n }\n for (var i = 0; i < this.imageSizes.length; i++) {\n this.styles.push({\n url: \"\".concat(this.imagePath + (i + 1), \".\").concat(this.imageExtension),\n height: this.imageSizes[i],\n width: this.imageSizes[i],\n });\n }\n };\n Clusterer.prototype.fitMapToMarkers = function () {\n var markers = this.getMarkers();\n var bounds = new google.maps.LatLngBounds();\n for (var i = 0; i < markers.length; i++) {\n var position = markers[i].getPosition();\n if (position) {\n bounds.extend(position);\n }\n }\n var map = this.getMap();\n if (map !== null && 'fitBounds' in map) {\n map.fitBounds(bounds);\n }\n };\n Clusterer.prototype.getGridSize = function () {\n return this.gridSize;\n };\n Clusterer.prototype.setGridSize = function (gridSize) {\n this.gridSize = gridSize;\n };\n Clusterer.prototype.getMinimumClusterSize = function () {\n return this.minClusterSize;\n };\n Clusterer.prototype.setMinimumClusterSize = function (minimumClusterSize) {\n this.minClusterSize = minimumClusterSize;\n };\n Clusterer.prototype.getMaxZoom = function () {\n return this.maxZoom;\n };\n Clusterer.prototype.setMaxZoom = function (maxZoom) {\n this.maxZoom = maxZoom;\n };\n Clusterer.prototype.getStyles = function () {\n return this.styles;\n };\n Clusterer.prototype.setStyles = function (styles) {\n this.styles = styles;\n };\n Clusterer.prototype.getTitle = function () {\n return this.title;\n };\n Clusterer.prototype.setTitle = function (title) {\n this.title = title;\n };\n Clusterer.prototype.getZoomOnClick = function () {\n return this.zoomOnClick;\n };\n Clusterer.prototype.setZoomOnClick = function (zoomOnClick) {\n this.zoomOnClick = zoomOnClick;\n };\n Clusterer.prototype.getAverageCenter = function () {\n return this.averageCenter;\n };\n Clusterer.prototype.setAverageCenter = function (averageCenter) {\n this.averageCenter = averageCenter;\n };\n Clusterer.prototype.getIgnoreHidden = function () {\n return this.ignoreHidden;\n };\n Clusterer.prototype.setIgnoreHidden = function (ignoreHidden) {\n this.ignoreHidden = ignoreHidden;\n };\n Clusterer.prototype.getEnableRetinaIcons = function () {\n return this.enableRetinaIcons;\n };\n Clusterer.prototype.setEnableRetinaIcons = function (enableRetinaIcons) {\n this.enableRetinaIcons = enableRetinaIcons;\n };\n Clusterer.prototype.getImageExtension = function () {\n return this.imageExtension;\n };\n Clusterer.prototype.setImageExtension = function (imageExtension) {\n this.imageExtension = imageExtension;\n };\n Clusterer.prototype.getImagePath = function () {\n return this.imagePath;\n };\n Clusterer.prototype.setImagePath = function (imagePath) {\n this.imagePath = imagePath;\n };\n Clusterer.prototype.getImageSizes = function () {\n return this.imageSizes;\n };\n Clusterer.prototype.setImageSizes = function (imageSizes) {\n this.imageSizes = imageSizes;\n };\n Clusterer.prototype.getCalculator = function () {\n return this.calculator;\n };\n Clusterer.prototype.setCalculator = function (calculator) {\n this.calculator = calculator;\n };\n Clusterer.prototype.getBatchSizeIE = function () {\n return this.batchSizeIE;\n };\n Clusterer.prototype.setBatchSizeIE = function (batchSizeIE) {\n this.batchSizeIE = batchSizeIE;\n };\n Clusterer.prototype.getClusterClass = function () {\n return this.clusterClass;\n };\n Clusterer.prototype.setClusterClass = function (clusterClass) {\n this.clusterClass = clusterClass;\n };\n Clusterer.prototype.getMarkers = function () {\n return this.markers;\n };\n Clusterer.prototype.getTotalMarkers = function () {\n return this.markers.length;\n };\n Clusterer.prototype.getClusters = function () {\n return this.clusters;\n };\n Clusterer.prototype.getTotalClusters = function () {\n return this.clusters.length;\n };\n Clusterer.prototype.addMarker = function (marker, optNoDraw) {\n this.pushMarkerTo(marker);\n if (!optNoDraw) {\n this.redraw();\n }\n };\n Clusterer.prototype.addMarkers = function (markers, optNoDraw) {\n for (var key in markers) {\n if (Object.prototype.hasOwnProperty.call(markers, key)) {\n this.pushMarkerTo(markers[key]);\n }\n }\n if (!optNoDraw) {\n this.redraw();\n }\n };\n Clusterer.prototype.pushMarkerTo = function (marker) {\n var _this = this;\n // If the marker is draggable add a listener so we can update the clusters on the dragend:\n if (marker.getDraggable()) {\n google.maps.event.addListener(marker, 'dragend', function () {\n if (_this.ready) {\n marker.isAdded = false;\n _this.repaint();\n }\n });\n }\n marker.isAdded = false;\n this.markers.push(marker);\n };\n Clusterer.prototype.removeMarker_ = function (marker) {\n var index = -1;\n if (this.markers.indexOf) {\n index = this.markers.indexOf(marker);\n }\n else {\n for (var i = 0; i < this.markers.length; i++) {\n if (marker === this.markers[i]) {\n index = i;\n break;\n }\n }\n }\n if (index === -1) {\n // Marker is not in our list of markers, so do nothing:\n return false;\n }\n marker.setMap(null);\n this.markers.splice(index, 1); // Remove the marker from the list of managed markers\n return true;\n };\n Clusterer.prototype.removeMarker = function (marker, optNoDraw) {\n var removed = this.removeMarker_(marker);\n if (!optNoDraw && removed) {\n this.repaint();\n }\n return removed;\n };\n Clusterer.prototype.removeMarkers = function (markers, optNoDraw) {\n var removed = false;\n for (var i = 0; i < markers.length; i++) {\n removed = removed || this.removeMarker_(markers[i]);\n }\n if (!optNoDraw && removed) {\n this.repaint();\n }\n return removed;\n };\n Clusterer.prototype.clearMarkers = function () {\n this.resetViewport(true);\n this.markers = [];\n };\n Clusterer.prototype.repaint = function () {\n var oldClusters = this.clusters.slice();\n this.clusters = [];\n this.resetViewport(false);\n this.redraw();\n // Remove the old clusters.\n // Do it in a timeout to prevent blinking effect.\n setTimeout(function timeout() {\n for (var i = 0; i < oldClusters.length; i++) {\n oldClusters[i].remove();\n }\n }, 0);\n };\n Clusterer.prototype.getExtendedBounds = function (bounds) {\n var projection = this.getProjection();\n // Convert the points to pixels and the extend out by the grid size.\n var trPix = projection.fromLatLngToDivPixel(\n // Turn the bounds into latlng.\n new google.maps.LatLng(bounds.getNorthEast().lat(), bounds.getNorthEast().lng()));\n if (trPix !== null) {\n trPix.x += this.gridSize;\n trPix.y -= this.gridSize;\n }\n var blPix = projection.fromLatLngToDivPixel(\n // Turn the bounds into latlng.\n new google.maps.LatLng(bounds.getSouthWest().lat(), bounds.getSouthWest().lng()));\n if (blPix !== null) {\n blPix.x -= this.gridSize;\n blPix.y += this.gridSize;\n }\n // Extend the bounds to contain the new bounds.\n if (trPix !== null) {\n // Convert the pixel points back to LatLng nw\n var point1 = projection.fromDivPixelToLatLng(trPix);\n if (point1 !== null) {\n bounds.extend(point1);\n }\n }\n if (blPix !== null) {\n // Convert the pixel points back to LatLng sw\n var point2 = projection.fromDivPixelToLatLng(blPix);\n if (point2 !== null) {\n bounds.extend(point2);\n }\n }\n return bounds;\n };\n Clusterer.prototype.redraw = function () {\n // Redraws all the clusters.\n this.createClusters(0);\n };\n Clusterer.prototype.resetViewport = function (optHide) {\n // Remove all the clusters\n for (var i = 0; i < this.clusters.length; i++) {\n this.clusters[i].remove();\n }\n this.clusters = [];\n // Reset the markers to not be added and to be removed from the map.\n for (var i = 0; i < this.markers.length; i++) {\n var marker = this.markers[i];\n marker.isAdded = false;\n if (optHide) {\n marker.setMap(null);\n }\n }\n };\n Clusterer.prototype.distanceBetweenPoints = function (p1, p2) {\n var R = 6371; // Radius of the Earth in km\n var dLat = ((p2.lat() - p1.lat()) * Math.PI) / 180;\n var dLon = ((p2.lng() - p1.lng()) * Math.PI) / 180;\n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos((p1.lat() * Math.PI) / 180) *\n Math.cos((p2.lat() * Math.PI) / 180) *\n Math.sin(dLon / 2) *\n Math.sin(dLon / 2);\n return R * (2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)));\n };\n Clusterer.prototype.isMarkerInBounds = function (marker, bounds) {\n var position = marker.getPosition();\n if (position) {\n return bounds.contains(position);\n }\n return false;\n };\n Clusterer.prototype.addToClosestCluster = function (marker) {\n var cluster;\n var distance = 40000; // Some large number\n var clusterToAddTo = null;\n for (var i = 0; i < this.clusters.length; i++) {\n cluster = this.clusters[i];\n var center = cluster.getCenter();\n var position = marker.getPosition();\n if (center && position) {\n var d = this.distanceBetweenPoints(center, position);\n if (d < distance) {\n distance = d;\n clusterToAddTo = cluster;\n }\n }\n }\n if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\n clusterToAddTo.addMarker(marker);\n }\n else {\n cluster = new Cluster$1(this);\n cluster.addMarker(marker);\n this.clusters.push(cluster);\n }\n };\n Clusterer.prototype.createClusters = function (iFirst) {\n var _this = this;\n if (!this.ready) {\n return;\n }\n // Cancel previous batch processing if we're working on the first batch:\n if (iFirst === 0) {\n /**\n * This event is fired when the Clusterer begins\n * clustering markers.\n * @name Clusterer#clusteringbegin\n * @param {Clusterer} mc The Clusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringbegin', this);\n if (this.timerRefStatic !== null) {\n window.clearTimeout(this.timerRefStatic);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n delete this.timerRefStatic;\n }\n }\n var map = this.getMap();\n var bounds = map !== null && 'getBounds' in map ? map.getBounds() : null;\n var zoom = (map === null || map === void 0 ? void 0 : map.getZoom()) || 0;\n // Get our current map view bounds.\n // Create a new bounds object so we don't affect the map.\n //\n // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug:\n var mapBounds = zoom > 3\n ? new google.maps.LatLngBounds(bounds === null || bounds === void 0 ? void 0 : bounds.getSouthWest(), bounds === null || bounds === void 0 ? void 0 : bounds.getNorthEast())\n : new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));\n var extendedMapBounds = this.getExtendedBounds(mapBounds);\n var iLast = Math.min(iFirst + this.batchSize, this.markers.length);\n for (var i = iFirst; i < iLast; i++) {\n var marker = this.markers[i];\n if (!marker.isAdded && this.isMarkerInBounds(marker, extendedMapBounds) && (!this.ignoreHidden || (this.ignoreHidden && marker.getVisible()))) {\n this.addToClosestCluster(marker);\n }\n }\n if (iLast < this.markers.length) {\n this.timerRefStatic = window.setTimeout(function () {\n _this.createClusters(iLast);\n }, 0);\n }\n else {\n this.timerRefStatic = null;\n /**\n * This event is fired when the Clusterer stops\n * clustering markers.\n * @name Clusterer#clusteringend\n * @param {Clusterer} mc The Clusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringend', this);\n for (var i = 0; i < this.clusters.length; i++) {\n this.clusters[i].updateIcon();\n }\n }\n };\n Clusterer.prototype.extend = function (obj1, obj2) {\n return function applyExtend(object) {\n for (var property in object.prototype) {\n // @ts-ignore\n this.prototype[property] = object.prototype[property];\n }\n return this;\n }.apply(obj1, [obj2]);\n };\n return Clusterer;\n}());\n\nconst eventMap$e = {\n onClick: 'click',\n onClusteringBegin: 'clusteringbegin',\n onClusteringEnd: 'clusteringend',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n};\nconst updaterMap$e = {\n averageCenter(instance, averageCenter) {\n instance.setAverageCenter(averageCenter);\n },\n batchSizeIE(instance, batchSizeIE) {\n instance.setBatchSizeIE(batchSizeIE);\n },\n calculator(instance, calculator) {\n instance.setCalculator(calculator);\n },\n clusterClass(instance, clusterClass) {\n instance.setClusterClass(clusterClass);\n },\n enableRetinaIcons(instance, enableRetinaIcons) {\n instance.setEnableRetinaIcons(enableRetinaIcons);\n },\n gridSize(instance, gridSize) {\n instance.setGridSize(gridSize);\n },\n ignoreHidden(instance, ignoreHidden) {\n instance.setIgnoreHidden(ignoreHidden);\n },\n imageExtension(instance, imageExtension) {\n instance.setImageExtension(imageExtension);\n },\n imagePath(instance, imagePath) {\n instance.setImagePath(imagePath);\n },\n imageSizes(instance, imageSizes) {\n instance.setImageSizes(imageSizes);\n },\n maxZoom(instance, maxZoom) {\n instance.setMaxZoom(maxZoom);\n },\n minimumClusterSize(instance, minimumClusterSize) {\n instance.setMinimumClusterSize(minimumClusterSize);\n },\n styles(instance, styles) {\n instance.setStyles(styles);\n },\n title(instance, title) {\n instance.setTitle(title);\n },\n zoomOnClick(instance, zoomOnClick) {\n instance.setZoomOnClick(zoomOnClick);\n },\n};\nfunction MarkerClustererFunctional({ children,\n// options,\n// averageCenter,\n// batchSizeIE,\n// calculator,\n// clusterClass,\n// enableRetinaIcons,\n// gridSize,\n// ignoreHidden,\n// imageExtension,\n// imagePath,\n// imageSizes,\n// maxZoom,\n// minimumClusterSize,\n// styles,\n// title,\n// zoomOnClick,\n// onClick,\n// onClusteringBegin,\n// onClusteringEnd,\n// onMouseOver,\n// onMouseOut,\n// onLoad,\n// onUnmount,\n }) {\n const [instance, /* setInstance */] = useState(null);\n // TODO!\n return instance !== null\n ? children(instance) || null\n : null;\n}\nmemo(MarkerClustererFunctional);\nclass ClustererComponent extends PureComponent {\n constructor() {\n super(...arguments);\n this.registeredEvents = [];\n this.state = {\n markerClusterer: null,\n };\n this.setClustererCallback = () => {\n if (this.state.markerClusterer !== null && this.props.onLoad) {\n this.props.onLoad(this.state.markerClusterer);\n }\n };\n }\n componentDidMount() {\n if (this.context) {\n const markerClusterer = new Clusterer(this.context, [], this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$e,\n eventMap: eventMap$e,\n prevProps: {},\n nextProps: this.props,\n instance: markerClusterer,\n });\n this.setState(() => {\n return {\n markerClusterer,\n };\n }, this.setClustererCallback);\n }\n }\n componentDidUpdate(prevProps) {\n if (this.state.markerClusterer) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$e,\n eventMap: eventMap$e,\n prevProps,\n nextProps: this.props,\n instance: this.state.markerClusterer,\n });\n }\n }\n componentWillUnmount() {\n if (this.state.markerClusterer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.markerClusterer);\n }\n unregisterEvents(this.registeredEvents);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.state.markerClusterer.setMap(null);\n }\n }\n render() {\n return this.state.markerClusterer !== null\n ? this.props.children(this.state.markerClusterer)\n : null;\n }\n}\nClustererComponent.contextType = MapContext;\n\n// This handler prevents an event in the InfoBox from being passed on to the map.\nfunction cancelHandler(event) {\n event.cancelBubble = true;\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n}\nvar InfoBox = /** @class */ (function () {\n function InfoBox(options) {\n if (options === void 0) { options = {}; }\n this.getCloseClickHandler = this.getCloseClickHandler.bind(this);\n this.closeClickHandler = this.closeClickHandler.bind(this);\n this.createInfoBoxDiv = this.createInfoBoxDiv.bind(this);\n this.addClickHandler = this.addClickHandler.bind(this);\n this.getCloseBoxImg = this.getCloseBoxImg.bind(this);\n this.getBoxWidths = this.getBoxWidths.bind(this);\n this.setBoxStyle = this.setBoxStyle.bind(this);\n this.setPosition = this.setPosition.bind(this);\n this.getPosition = this.getPosition.bind(this);\n this.setOptions = this.setOptions.bind(this);\n this.setContent = this.setContent.bind(this);\n this.setVisible = this.setVisible.bind(this);\n this.getContent = this.getContent.bind(this);\n this.getVisible = this.getVisible.bind(this);\n this.setZIndex = this.setZIndex.bind(this);\n this.getZIndex = this.getZIndex.bind(this);\n this.onRemove = this.onRemove.bind(this);\n this.panBox = this.panBox.bind(this);\n this.extend = this.extend.bind(this);\n this.close = this.close.bind(this);\n this.draw = this.draw.bind(this);\n this.show = this.show.bind(this);\n this.hide = this.hide.bind(this);\n this.open = this.open.bind(this);\n this.extend(InfoBox, google.maps.OverlayView);\n // Standard options (in common with google.maps.InfoWindow):\n this.content = options.content || '';\n this.disableAutoPan = options.disableAutoPan || false;\n this.maxWidth = options.maxWidth || 0;\n this.pixelOffset = options.pixelOffset || new google.maps.Size(0, 0);\n this.position = options.position || new google.maps.LatLng(0, 0);\n this.zIndex = options.zIndex || null;\n // Additional options (unique to InfoBox):\n this.boxClass = options.boxClass || 'infoBox';\n this.boxStyle = options.boxStyle || {};\n this.closeBoxMargin = options.closeBoxMargin || '2px';\n this.closeBoxURL = options.closeBoxURL || 'http://www.google.com/intl/en_us/mapfiles/close.gif';\n if (options.closeBoxURL === '') {\n this.closeBoxURL = '';\n }\n this.infoBoxClearance = options.infoBoxClearance || new google.maps.Size(1, 1);\n if (typeof options.visible === 'undefined') {\n if (typeof options.isHidden === 'undefined') {\n options.visible = true;\n }\n else {\n options.visible = !options.isHidden;\n }\n }\n this.isHidden = !options.visible;\n this.alignBottom = options.alignBottom || false;\n this.pane = options.pane || 'floatPane';\n this.enableEventPropagation = options.enableEventPropagation || false;\n this.div = null;\n this.closeListener = null;\n this.moveListener = null;\n this.mapListener = null;\n this.contextListener = null;\n this.eventListeners = null;\n this.fixedWidthSet = null;\n }\n InfoBox.prototype.createInfoBoxDiv = function () {\n var _this = this;\n // This handler ignores the current event in the InfoBox and conditionally prevents\n // the event from being passed on to the map. It is used for the contextmenu event.\n var ignoreHandler = function (event) {\n event.returnValue = false;\n if (event.preventDefault) {\n event.preventDefault();\n }\n if (!_this.enableEventPropagation) {\n cancelHandler(event);\n }\n };\n if (!this.div) {\n this.div = document.createElement('div');\n this.setBoxStyle();\n if (typeof this.content === 'string') {\n this.div.innerHTML = this.getCloseBoxImg() + this.content;\n }\n else {\n this.div.innerHTML = this.getCloseBoxImg();\n this.div.appendChild(this.content);\n }\n var panes = this.getPanes();\n if (panes !== null) {\n panes[this.pane].appendChild(this.div); // Add the InfoBox div to the DOM\n }\n this.addClickHandler();\n if (this.div.style.width) {\n this.fixedWidthSet = true;\n }\n else {\n if (this.maxWidth !== 0 && this.div.offsetWidth > this.maxWidth) {\n this.div.style.width = this.maxWidth + 'px';\n this.fixedWidthSet = true;\n }\n else {\n // The following code is needed to overcome problems with MSIE\n var bw = this.getBoxWidths();\n this.div.style.width = this.div.offsetWidth - bw.left - bw.right + 'px';\n this.fixedWidthSet = false;\n }\n }\n this.panBox(this.disableAutoPan);\n if (!this.enableEventPropagation) {\n this.eventListeners = [];\n // Cancel event propagation.\n // Note: mousemove not included (to resolve Issue 152)\n var events = [\n 'mousedown',\n 'mouseover',\n 'mouseout',\n 'mouseup',\n 'click',\n 'dblclick',\n 'touchstart',\n 'touchend',\n 'touchmove',\n ];\n for (var i = 0; i < events.length; i++) {\n this.eventListeners.push(google.maps.event.addListener(this.div, events[i], cancelHandler));\n }\n // Workaround for Google bug that causes the cursor to change to a pointer\n // when the mouse moves over a marker underneath InfoBox.\n this.eventListeners.push(google.maps.event.addListener(this.div, 'mouseover', function () {\n if (_this.div) {\n _this.div.style.cursor = 'default';\n }\n }));\n }\n this.contextListener = google.maps.event.addListener(this.div, 'contextmenu', ignoreHandler);\n /**\n * This event is fired when the DIV containing the InfoBox's content is attached to the DOM.\n * @name InfoBox#domready\n * @event\n */\n google.maps.event.trigger(this, 'domready');\n }\n };\n InfoBox.prototype.getCloseBoxImg = function () {\n var img = '';\n if (this.closeBoxURL !== '') {\n img = '\"\"';\n\";\n }\n return img;\n };\n InfoBox.prototype.addClickHandler = function () {\n this.closeListener = this.div && this.div.firstChild && this.closeBoxURL !== ''\n ? google.maps.event.addListener(this.div.firstChild, 'click', this.getCloseClickHandler())\n : null;\n };\n InfoBox.prototype.closeClickHandler = function (event) {\n // 1.0.3 fix: Always prevent propagation of a close box click to the map:\n event.cancelBubble = true;\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n /**\n * This event is fired when the InfoBox's close box is clicked.\n * @name InfoBox#closeclick\n * @event\n */\n google.maps.event.trigger(this, 'closeclick');\n this.close();\n };\n InfoBox.prototype.getCloseClickHandler = function () {\n return this.closeClickHandler;\n };\n InfoBox.prototype.panBox = function (disablePan) {\n if (this.div && !disablePan) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var map = this.getMap();\n // Only pan if attached to map, not panorama\n if (map instanceof google.maps.Map) {\n var xOffset = 0;\n var yOffset = 0;\n var bounds = map.getBounds();\n if (bounds && !bounds.contains(this.position)) {\n // Marker not in visible area of map, so set center\n // of map to the marker position first.\n map.setCenter(this.position);\n }\n var mapDiv = map.getDiv();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var mapWidth = mapDiv.offsetWidth;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var mapHeight = mapDiv.offsetHeight;\n var iwOffsetX = this.pixelOffset.width;\n var iwOffsetY = this.pixelOffset.height;\n var iwWidth = this.div.offsetWidth;\n var iwHeight = this.div.offsetHeight;\n var padX = this.infoBoxClearance.width;\n var padY = this.infoBoxClearance.height;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var projection = this.getProjection();\n var pixPosition = projection.fromLatLngToContainerPixel(this.position);\n if (pixPosition !== null) {\n if (pixPosition.x < -iwOffsetX + padX) {\n xOffset = pixPosition.x + iwOffsetX - padX;\n }\n else if (pixPosition.x + iwWidth + iwOffsetX + padX > mapWidth) {\n xOffset = pixPosition.x + iwWidth + iwOffsetX + padX - mapWidth;\n }\n if (this.alignBottom) {\n if (pixPosition.y < -iwOffsetY + padY + iwHeight) {\n yOffset = pixPosition.y + iwOffsetY - padY - iwHeight;\n }\n else if (pixPosition.y + iwOffsetY + padY > mapHeight) {\n yOffset = pixPosition.y + iwOffsetY + padY - mapHeight;\n }\n }\n else {\n if (pixPosition.y < -iwOffsetY + padY) {\n yOffset = pixPosition.y + iwOffsetY - padY;\n }\n else if (pixPosition.y + iwHeight + iwOffsetY + padY > mapHeight) {\n yOffset = pixPosition.y + iwHeight + iwOffsetY + padY - mapHeight;\n }\n }\n }\n if (!(xOffset === 0 && yOffset === 0)) {\n // Move the map to the shifted center.\n map.panBy(xOffset, yOffset);\n }\n }\n }\n };\n InfoBox.prototype.setBoxStyle = function () {\n if (this.div) {\n // Apply style values from the style sheet defined in the boxClass parameter:\n this.div.className = this.boxClass;\n // Clear existing inline style values:\n this.div.style.cssText = '';\n // Apply style values defined in the boxStyle parameter:\n var boxStyle = this.boxStyle;\n for (var i in boxStyle) {\n if (Object.prototype.hasOwnProperty.call(boxStyle, i)) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.div.style[i] = boxStyle[i];\n }\n }\n // Fix for iOS disappearing InfoBox problem\n // See http://stackoverflow.com/questions/9229535/google-maps-markers-disappear-at-certain-zoom-level-only-on-iphone-ipad\n this.div.style.webkitTransform = 'translateZ(0)';\n // Fix up opacity style for benefit of MSIE\n if (typeof this.div.style.opacity !== 'undefined' && this.div.style.opacity !== '') {\n // See http://www.quirksmode.org/css/opacity.html\n var opacity = parseFloat(this.div.style.opacity || '');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.div.style.msFilter =\n '\"progid:DXImageTransform.Microsoft.Alpha(Opacity=' + opacity * 100 + ')\"';\n this.div.style.filter = 'alpha(opacity=' + opacity * 100 + ')';\n }\n // Apply required styles\n this.div.style.position = 'absolute';\n this.div.style.visibility = 'hidden';\n if (this.zIndex !== null) {\n this.div.style.zIndex = this.zIndex + '';\n }\n if (!this.div.style.overflow) {\n this.div.style.overflow = 'auto';\n }\n }\n };\n InfoBox.prototype.getBoxWidths = function () {\n var bw = { top: 0, bottom: 0, left: 0, right: 0 };\n if (!this.div) {\n return bw;\n }\n if (document.defaultView) {\n var ownerDocument = this.div.ownerDocument;\n var computedStyle = ownerDocument && ownerDocument.defaultView\n ? ownerDocument.defaultView.getComputedStyle(this.div, '')\n : null;\n if (computedStyle) {\n // The computed styles are always in pixel units (good!)\n bw.top = parseInt(computedStyle.borderTopWidth || '', 10) || 0;\n bw.bottom = parseInt(computedStyle.borderBottomWidth || '', 10) || 0;\n bw.left = parseInt(computedStyle.borderLeftWidth || '', 10) || 0;\n bw.right = parseInt(computedStyle.borderRightWidth || '', 10) || 0;\n }\n }\n else if (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n document.documentElement.currentStyle // MSIE\n ) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var currentStyle = this.div.currentStyle;\n if (currentStyle) {\n // The current styles may not be in pixel units, but assume they are (bad!)\n bw.top = parseInt(currentStyle.borderTopWidth || '', 10) || 0;\n bw.bottom = parseInt(currentStyle.borderBottomWidth || '', 10) || 0;\n bw.left = parseInt(currentStyle.borderLeftWidth || '', 10) || 0;\n bw.right = parseInt(currentStyle.borderRightWidth || '', 10) || 0;\n }\n }\n return bw;\n };\n InfoBox.prototype.onRemove = function () {\n if (this.div && this.div.parentNode) {\n this.div.parentNode.removeChild(this.div);\n this.div = null;\n }\n };\n InfoBox.prototype.draw = function () {\n this.createInfoBoxDiv();\n if (this.div) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var projection = this.getProjection();\n var pixPosition = projection.fromLatLngToDivPixel(this.position);\n if (pixPosition !== null) {\n this.div.style.left = pixPosition.x + this.pixelOffset.width + 'px';\n if (this.alignBottom) {\n this.div.style.bottom = -(pixPosition.y + this.pixelOffset.height) + 'px';\n }\n else {\n this.div.style.top = pixPosition.y + this.pixelOffset.height + 'px';\n }\n }\n if (this.isHidden) {\n this.div.style.visibility = 'hidden';\n }\n else {\n this.div.style.visibility = 'visible';\n }\n }\n };\n InfoBox.prototype.setOptions = function (options) {\n if (options === void 0) { options = {}; }\n if (typeof options.boxClass !== 'undefined') {\n // Must be first\n this.boxClass = options.boxClass;\n this.setBoxStyle();\n }\n if (typeof options.boxStyle !== 'undefined') {\n // Must be second\n this.boxStyle = options.boxStyle;\n this.setBoxStyle();\n }\n if (typeof options.content !== 'undefined') {\n this.setContent(options.content);\n }\n if (typeof options.disableAutoPan !== 'undefined') {\n this.disableAutoPan = options.disableAutoPan;\n }\n if (typeof options.maxWidth !== 'undefined') {\n this.maxWidth = options.maxWidth;\n }\n if (typeof options.pixelOffset !== 'undefined') {\n this.pixelOffset = options.pixelOffset;\n }\n if (typeof options.alignBottom !== 'undefined') {\n this.alignBottom = options.alignBottom;\n }\n if (typeof options.position !== 'undefined') {\n this.setPosition(options.position);\n }\n if (typeof options.zIndex !== 'undefined') {\n this.setZIndex(options.zIndex);\n }\n if (typeof options.closeBoxMargin !== 'undefined') {\n this.closeBoxMargin = options.closeBoxMargin;\n }\n if (typeof options.closeBoxURL !== 'undefined') {\n this.closeBoxURL = options.closeBoxURL;\n }\n if (typeof options.infoBoxClearance !== 'undefined') {\n this.infoBoxClearance = options.infoBoxClearance;\n }\n if (typeof options.isHidden !== 'undefined') {\n this.isHidden = options.isHidden;\n }\n if (typeof options.visible !== 'undefined') {\n this.isHidden = !options.visible;\n }\n if (typeof options.enableEventPropagation !== 'undefined') {\n this.enableEventPropagation = options.enableEventPropagation;\n }\n if (this.div) {\n this.draw();\n }\n };\n InfoBox.prototype.setContent = function (content) {\n this.content = content;\n if (this.div) {\n if (this.closeListener) {\n google.maps.event.removeListener(this.closeListener);\n this.closeListener = null;\n }\n // Odd code required to make things work with MSIE.\n if (!this.fixedWidthSet) {\n this.div.style.width = '';\n }\n if (typeof content === 'string') {\n this.div.innerHTML = this.getCloseBoxImg() + content;\n }\n else {\n this.div.innerHTML = this.getCloseBoxImg();\n this.div.appendChild(content);\n }\n // Perverse code required to make things work with MSIE.\n // (Ensures the close box does, in fact, float to the right.)\n if (!this.fixedWidthSet) {\n this.div.style.width = this.div.offsetWidth + 'px';\n if (typeof content === 'string') {\n this.div.innerHTML = this.getCloseBoxImg() + content;\n }\n else {\n this.div.innerHTML = this.getCloseBoxImg();\n this.div.appendChild(content);\n }\n }\n this.addClickHandler();\n }\n /**\n * This event is fired when the content of the InfoBox changes.\n * @name InfoBox#content_changed\n * @event\n */\n google.maps.event.trigger(this, 'content_changed');\n };\n InfoBox.prototype.setPosition = function (latLng) {\n this.position = latLng;\n if (this.div) {\n this.draw();\n }\n /**\n * This event is fired when the position of the InfoBox changes.\n * @name InfoBox#position_changed\n * @event\n */\n google.maps.event.trigger(this, 'position_changed');\n };\n InfoBox.prototype.setVisible = function (isVisible) {\n this.isHidden = !isVisible;\n if (this.div) {\n this.div.style.visibility = this.isHidden ? 'hidden' : 'visible';\n }\n };\n InfoBox.prototype.setZIndex = function (index) {\n this.zIndex = index;\n if (this.div) {\n this.div.style.zIndex = index + '';\n }\n /**\n * This event is fired when the zIndex of the InfoBox changes.\n * @name InfoBox#zindex_changed\n * @event\n */\n google.maps.event.trigger(this, 'zindex_changed');\n };\n InfoBox.prototype.getContent = function () {\n return this.content;\n };\n InfoBox.prototype.getPosition = function () {\n return this.position;\n };\n InfoBox.prototype.getZIndex = function () {\n return this.zIndex;\n };\n InfoBox.prototype.getVisible = function () {\n var map = this.getMap();\n return typeof map === 'undefined' || map === null ? false : !this.isHidden;\n };\n InfoBox.prototype.show = function () {\n this.isHidden = false;\n if (this.div) {\n this.div.style.visibility = 'visible';\n }\n };\n InfoBox.prototype.hide = function () {\n this.isHidden = true;\n if (this.div) {\n this.div.style.visibility = 'hidden';\n }\n };\n InfoBox.prototype.open = function (map, anchor) {\n var _this = this;\n if (anchor) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.position = anchor.getPosition();\n this.moveListener = google.maps.event.addListener(anchor, 'position_changed', function () {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var position = anchor.getPosition();\n _this.setPosition(position);\n });\n this.mapListener = google.maps.event.addListener(anchor, 'map_changed', function () {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n _this.setMap(anchor.map);\n });\n }\n this.setMap(map);\n if (this.div) {\n this.panBox();\n }\n };\n InfoBox.prototype.close = function () {\n if (this.closeListener) {\n google.maps.event.removeListener(this.closeListener);\n this.closeListener = null;\n }\n if (this.eventListeners) {\n for (var i = 0; i < this.eventListeners.length; i++) {\n google.maps.event.removeListener(this.eventListeners[i]);\n }\n this.eventListeners = null;\n }\n if (this.moveListener) {\n google.maps.event.removeListener(this.moveListener);\n this.moveListener = null;\n }\n if (this.mapListener) {\n google.maps.event.removeListener(this.mapListener);\n this.mapListener = null;\n }\n if (this.contextListener) {\n google.maps.event.removeListener(this.contextListener);\n this.contextListener = null;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.setMap(null);\n };\n InfoBox.prototype.extend = function (obj1, obj2) {\n return function applyExtend(object) {\n for (var property in object.prototype) {\n if (!Object.prototype.hasOwnProperty.call(this, property)) {\n // @ts-ignore\n this.prototype[property] = object.prototype[property];\n }\n }\n return this;\n }.apply(obj1, [obj2]);\n };\n return InfoBox;\n}());\n\nconst eventMap$d = {\n onCloseClick: 'closeclick',\n onContentChanged: 'content_changed',\n onDomReady: 'domready',\n onPositionChanged: 'position_changed',\n onZindexChanged: 'zindex_changed',\n};\nconst updaterMap$d = {\n options(instance, options) {\n instance.setOptions(options);\n },\n position(instance, position) {\n if (position instanceof google.maps.LatLng) {\n instance.setPosition(position);\n }\n else {\n instance.setPosition(new google.maps.LatLng(position.lat, position.lng));\n }\n },\n visible(instance, visible) {\n instance.setVisible(visible);\n },\n zIndex(instance, zIndex) {\n instance.setZIndex(zIndex);\n },\n};\nconst defaultOptions$3 = {};\nfunction InfoBoxFunctional({ children, anchor, options, position, zIndex, onCloseClick, onDomReady, onContentChanged, onPositionChanged, onZindexChanged, onLoad, onUnmount }) {\n const map = useContext(MapContext);\n const [instance, setInstance] = useState(null);\n const [closeclickListener, setCloseClickListener] = useState(null);\n const [domreadyclickListener, setDomReadyClickListener] = useState(null);\n const [contentchangedclickListener, setContentChangedClickListener] = useState(null);\n const [positionchangedclickListener, setPositionChangedClickListener] = useState(null);\n const [zindexchangedclickListener, setZindexChangedClickListener] = useState(null);\n const containerElementRef = useRef(null);\n // Order does matter\n useEffect(() => {\n if (map && instance !== null) {\n instance.close();\n if (anchor) {\n instance.open(map, anchor);\n }\n else if (instance.getPosition()) {\n instance.open(map);\n }\n }\n }, [map, instance, anchor]);\n useEffect(() => {\n if (options && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(() => {\n if (position && instance !== null) {\n const positionLatLng = position instanceof google.maps.LatLng\n ? position\n // @ts-ignore\n : new google.maps.LatLng(position.lat, position.lng);\n instance.setPosition(positionLatLng);\n }\n }, [position]);\n useEffect(() => {\n if (typeof zIndex === 'number' && instance !== null) {\n instance.setZIndex(zIndex);\n }\n }, [zIndex]);\n useEffect(() => {\n if (instance && onCloseClick) {\n if (closeclickListener !== null) {\n google.maps.event.removeListener(closeclickListener);\n }\n setCloseClickListener(google.maps.event.addListener(instance, 'closeclick', onCloseClick));\n }\n }, [onCloseClick]);\n useEffect(() => {\n if (instance && onDomReady) {\n if (domreadyclickListener !== null) {\n google.maps.event.removeListener(domreadyclickListener);\n }\n setDomReadyClickListener(google.maps.event.addListener(instance, 'domready', onDomReady));\n }\n }, [onDomReady]);\n useEffect(() => {\n if (instance && onContentChanged) {\n if (contentchangedclickListener !== null) {\n google.maps.event.removeListener(contentchangedclickListener);\n }\n setContentChangedClickListener(google.maps.event.addListener(instance, 'content_changed', onContentChanged));\n }\n }, [onContentChanged]);\n useEffect(() => {\n if (instance && onPositionChanged) {\n if (positionchangedclickListener !== null) {\n google.maps.event.removeListener(positionchangedclickListener);\n }\n setPositionChangedClickListener(google.maps.event.addListener(instance, 'position_changed', onPositionChanged));\n }\n }, [onPositionChanged]);\n useEffect(() => {\n if (instance && onZindexChanged) {\n if (zindexchangedclickListener !== null) {\n google.maps.event.removeListener(zindexchangedclickListener);\n }\n setZindexChangedClickListener(google.maps.event.addListener(instance, 'zindex_changed', onZindexChanged));\n }\n }, [onZindexChanged]);\n useEffect(() => {\n if (map) {\n const _a = options || defaultOptions$3, { position } = _a, infoBoxOptions = __rest$1(_a, [\"position\"]);\n let positionLatLng;\n if (position && !(position instanceof google.maps.LatLng)) {\n // @ts-ignore\n positionLatLng = new google.maps.LatLng(position.lat, position.lng);\n }\n const infoBox = new InfoBox(Object.assign(Object.assign({}, infoBoxOptions), (positionLatLng ? { position: positionLatLng } : {})));\n containerElementRef.current = document.createElement('div');\n setInstance(infoBox);\n if (onCloseClick) {\n setCloseClickListener(google.maps.event.addListener(infoBox, 'closeclick', onCloseClick));\n }\n if (onDomReady) {\n setDomReadyClickListener(google.maps.event.addListener(infoBox, 'domready', onDomReady));\n }\n if (onContentChanged) {\n setContentChangedClickListener(google.maps.event.addListener(infoBox, 'content_changed', onContentChanged));\n }\n if (onPositionChanged) {\n setPositionChangedClickListener(google.maps.event.addListener(infoBox, 'position_changed', onPositionChanged));\n }\n if (onZindexChanged) {\n setZindexChangedClickListener(google.maps.event.addListener(infoBox, 'zindex_changed', onZindexChanged));\n }\n infoBox.setContent(containerElementRef.current);\n if (anchor) {\n infoBox.open(map, anchor);\n }\n else if (infoBox.getPosition()) {\n infoBox.open(map);\n }\n else {\n invariant_1(false, 'You must provide either an anchor or a position prop for .');\n }\n if (onLoad) {\n onLoad(infoBox);\n }\n }\n return () => {\n if (instance !== null) {\n if (closeclickListener) {\n google.maps.event.removeListener(closeclickListener);\n }\n if (contentchangedclickListener) {\n google.maps.event.removeListener(contentchangedclickListener);\n }\n if (domreadyclickListener) {\n google.maps.event.removeListener(domreadyclickListener);\n }\n if (positionchangedclickListener) {\n google.maps.event.removeListener(positionchangedclickListener);\n }\n if (zindexchangedclickListener) {\n google.maps.event.removeListener(zindexchangedclickListener);\n }\n if (onUnmount) {\n onUnmount(instance);\n }\n instance.close();\n }\n };\n }, []);\n return containerElementRef.current ? createPortal(Children.only(children), containerElementRef.current) : null;\n}\nconst InfoBoxF = memo(InfoBoxFunctional);\nclass InfoBoxComponent extends PureComponent {\n constructor() {\n super(...arguments);\n this.registeredEvents = [];\n this.containerElement = null;\n this.state = {\n infoBox: null,\n };\n this.open = (infoBox, anchor) => {\n if (anchor) {\n // @ts-ignore\n infoBox.open(this.context, anchor);\n }\n else if (infoBox.getPosition()) {\n // @ts-ignore\n infoBox.open(this.context);\n }\n else {\n invariant_1(false, 'You must provide either an anchor or a position prop for .');\n }\n };\n this.setInfoBoxCallback = () => {\n if (this.state.infoBox !== null && this.containerElement !== null) {\n this.state.infoBox.setContent(this.containerElement);\n this.open(this.state.infoBox, this.props.anchor);\n if (this.props.onLoad) {\n this.props.onLoad(this.state.infoBox);\n }\n }\n };\n }\n componentDidMount() {\n const _a = this.props.options || {}, { position } = _a, infoBoxOptions = __rest$1(_a, [\"position\"]);\n let positionLatLng;\n if (position && !(position instanceof google.maps.LatLng)) {\n // @ts-ignore\n positionLatLng = new google.maps.LatLng(position.lat, position.lng);\n }\n const infoBox = new InfoBox(Object.assign(Object.assign({}, infoBoxOptions), (positionLatLng ? { position: positionLatLng } : {})));\n this.containerElement = document.createElement('div');\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$d,\n eventMap: eventMap$d,\n prevProps: {},\n nextProps: this.props,\n instance: infoBox,\n });\n this.setState({ infoBox }, this.setInfoBoxCallback);\n }\n componentDidUpdate(prevProps) {\n const { infoBox } = this.state;\n if (infoBox !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$d,\n eventMap: eventMap$d,\n prevProps,\n nextProps: this.props,\n instance: infoBox,\n });\n }\n }\n componentWillUnmount() {\n const { onUnmount } = this.props;\n const { infoBox } = this.state;\n if (infoBox !== null) {\n if (onUnmount) {\n onUnmount(infoBox);\n }\n unregisterEvents(this.registeredEvents);\n infoBox.close();\n }\n }\n render() {\n return this.containerElement ? createPortal(Children.only(this.props.children), this.containerElement) : null;\n }\n}\nInfoBoxComponent.contextType = MapContext;\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nvar fastDeepEqual = 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\nvar kdbush = {exports: {}};\n\n(function (module, exports) {\n\t(function (global, factory) {\n\tmodule.exports = factory() ;\n\t}(commonjsGlobal, (function () {\n\tfunction sortKD(ids, coords, nodeSize, left, right, depth) {\n\t if (right - left <= nodeSize) { return; }\n\n\t var m = (left + right) >> 1;\n\n\t select(ids, coords, m, left, right, depth % 2);\n\n\t sortKD(ids, coords, nodeSize, left, m - 1, depth + 1);\n\t sortKD(ids, coords, nodeSize, m + 1, right, depth + 1);\n\t}\n\n\tfunction select(ids, coords, k, left, right, inc) {\n\n\t while (right > left) {\n\t if (right - left > 600) {\n\t var n = right - left + 1;\n\t var m = k - left + 1;\n\t var z = Math.log(n);\n\t var s = 0.5 * Math.exp(2 * z / 3);\n\t var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n\t var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n\t var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n\t select(ids, coords, k, newLeft, newRight, inc);\n\t }\n\n\t var t = coords[2 * k + inc];\n\t var i = left;\n\t var j = right;\n\n\t swapItem(ids, coords, left, k);\n\t if (coords[2 * right + inc] > t) { swapItem(ids, coords, left, right); }\n\n\t while (i < j) {\n\t swapItem(ids, coords, i, j);\n\t i++;\n\t j--;\n\t while (coords[2 * i + inc] < t) { i++; }\n\t while (coords[2 * j + inc] > t) { j--; }\n\t }\n\n\t if (coords[2 * left + inc] === t) { swapItem(ids, coords, left, j); }\n\t else {\n\t j++;\n\t swapItem(ids, coords, j, right);\n\t }\n\n\t if (j <= k) { left = j + 1; }\n\t if (k <= j) { right = j - 1; }\n\t }\n\t}\n\n\tfunction swapItem(ids, coords, i, j) {\n\t swap(ids, i, j);\n\t swap(coords, 2 * i, 2 * j);\n\t swap(coords, 2 * i + 1, 2 * j + 1);\n\t}\n\n\tfunction swap(arr, i, j) {\n\t var tmp = arr[i];\n\t arr[i] = arr[j];\n\t arr[j] = tmp;\n\t}\n\n\tfunction range(ids, coords, minX, minY, maxX, maxY, nodeSize) {\n\t var stack = [0, ids.length - 1, 0];\n\t var result = [];\n\t var x, y;\n\n\t while (stack.length) {\n\t var axis = stack.pop();\n\t var right = stack.pop();\n\t var left = stack.pop();\n\n\t if (right - left <= nodeSize) {\n\t for (var i = left; i <= right; i++) {\n\t x = coords[2 * i];\n\t y = coords[2 * i + 1];\n\t if (x >= minX && x <= maxX && y >= minY && y <= maxY) { result.push(ids[i]); }\n\t }\n\t continue;\n\t }\n\n\t var m = Math.floor((left + right) / 2);\n\n\t x = coords[2 * m];\n\t y = coords[2 * m + 1];\n\n\t if (x >= minX && x <= maxX && y >= minY && y <= maxY) { result.push(ids[m]); }\n\n\t var nextAxis = (axis + 1) % 2;\n\n\t if (axis === 0 ? minX <= x : minY <= y) {\n\t stack.push(left);\n\t stack.push(m - 1);\n\t stack.push(nextAxis);\n\t }\n\t if (axis === 0 ? maxX >= x : maxY >= y) {\n\t stack.push(m + 1);\n\t stack.push(right);\n\t stack.push(nextAxis);\n\t }\n\t }\n\n\t return result;\n\t}\n\n\tfunction within(ids, coords, qx, qy, r, nodeSize) {\n\t var stack = [0, ids.length - 1, 0];\n\t var result = [];\n\t var r2 = r * r;\n\n\t while (stack.length) {\n\t var axis = stack.pop();\n\t var right = stack.pop();\n\t var left = stack.pop();\n\n\t if (right - left <= nodeSize) {\n\t for (var i = left; i <= right; i++) {\n\t if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) { result.push(ids[i]); }\n\t }\n\t continue;\n\t }\n\n\t var m = Math.floor((left + right) / 2);\n\n\t var x = coords[2 * m];\n\t var y = coords[2 * m + 1];\n\n\t if (sqDist(x, y, qx, qy) <= r2) { result.push(ids[m]); }\n\n\t var nextAxis = (axis + 1) % 2;\n\n\t if (axis === 0 ? qx - r <= x : qy - r <= y) {\n\t stack.push(left);\n\t stack.push(m - 1);\n\t stack.push(nextAxis);\n\t }\n\t if (axis === 0 ? qx + r >= x : qy + r >= y) {\n\t stack.push(m + 1);\n\t stack.push(right);\n\t stack.push(nextAxis);\n\t }\n\t }\n\n\t return result;\n\t}\n\n\tfunction sqDist(ax, ay, bx, by) {\n\t var dx = ax - bx;\n\t var dy = ay - by;\n\t return dx * dx + dy * dy;\n\t}\n\n\tvar defaultGetX = function (p) { return p[0]; };\n\tvar defaultGetY = function (p) { return p[1]; };\n\n\tvar KDBush = function KDBush(points, getX, getY, nodeSize, ArrayType) {\n\t if ( getX === void 0 ) getX = defaultGetX;\n\t if ( getY === void 0 ) getY = defaultGetY;\n\t if ( nodeSize === void 0 ) nodeSize = 64;\n\t if ( ArrayType === void 0 ) ArrayType = Float64Array;\n\n\t this.nodeSize = nodeSize;\n\t this.points = points;\n\n\t var IndexArrayType = points.length < 65536 ? Uint16Array : Uint32Array;\n\n\t var ids = this.ids = new IndexArrayType(points.length);\n\t var coords = this.coords = new ArrayType(points.length * 2);\n\n\t for (var i = 0; i < points.length; i++) {\n\t ids[i] = i;\n\t coords[2 * i] = getX(points[i]);\n\t coords[2 * i + 1] = getY(points[i]);\n\t }\n\n\t sortKD(ids, coords, nodeSize, 0, ids.length - 1, 0);\n\t};\n\n\tKDBush.prototype.range = function range$1 (minX, minY, maxX, maxY) {\n\t return range(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize);\n\t};\n\n\tKDBush.prototype.within = function within$1 (x, y, r) {\n\t return within(this.ids, this.coords, x, y, r, this.nodeSize);\n\t};\n\n\treturn KDBush;\n\n\t})));\n} (kdbush));\n\nvar KDBush = kdbush.exports;\n\nconst defaultOptions$2 = {\n minZoom: 0, // min zoom to generate clusters on\n maxZoom: 16, // max zoom level to cluster the points on\n minPoints: 2, // minimum points to form a cluster\n radius: 40, // cluster radius in pixels\n extent: 512, // tile extent (radius is calculated relative to it)\n nodeSize: 64, // size of the KD-tree leaf node, affects performance\n log: false, // whether to log timing info\n\n // whether to generate numeric ids for input features (in vector tiles)\n generateId: false,\n\n // a reduce function for calculating custom cluster properties\n reduce: null, // (accumulated, props) => { accumulated.sum += props.sum; }\n\n // properties to use for individual points when running the reducer\n map: props => props // props => ({sum: props.my_value})\n};\n\nconst fround = Math.fround || (tmp => ((x) => { tmp[0] = +x; return tmp[0]; }))(new Float32Array(1));\n\nclass Supercluster {\n constructor(options) {\n this.options = extend$1(Object.create(defaultOptions$2), options);\n this.trees = new Array(this.options.maxZoom + 1);\n }\n\n load(points) {\n const {log, minZoom, maxZoom, nodeSize} = this.options;\n\n if (log) console.time('total time');\n\n const timerId = `prepare ${ points.length } points`;\n if (log) console.time(timerId);\n\n this.points = points;\n\n // generate a cluster object for each point and index input points into a KD-tree\n let clusters = [];\n for (let i = 0; i < points.length; i++) {\n if (!points[i].geometry) continue;\n clusters.push(createPointCluster(points[i], i));\n }\n this.trees[maxZoom + 1] = new KDBush(clusters, getX, getY, nodeSize, Float32Array);\n\n if (log) console.timeEnd(timerId);\n\n // cluster points on max zoom, then cluster the results on previous zoom, etc.;\n // results in a cluster hierarchy across zoom levels\n for (let z = maxZoom; z >= minZoom; z--) {\n const now = +Date.now();\n\n // create a new set of clusters for the zoom and index them with a KD-tree\n clusters = this._cluster(clusters, z);\n this.trees[z] = new KDBush(clusters, getX, getY, nodeSize, Float32Array);\n\n if (log) console.log('z%d: %d clusters in %dms', z, clusters.length, +Date.now() - now);\n }\n\n if (log) console.timeEnd('total time');\n\n return this;\n }\n\n getClusters(bbox, zoom) {\n let minLng = ((bbox[0] + 180) % 360 + 360) % 360 - 180;\n const minLat = Math.max(-90, Math.min(90, bbox[1]));\n let maxLng = bbox[2] === 180 ? 180 : ((bbox[2] + 180) % 360 + 360) % 360 - 180;\n const maxLat = Math.max(-90, Math.min(90, bbox[3]));\n\n if (bbox[2] - bbox[0] >= 360) {\n minLng = -180;\n maxLng = 180;\n } else if (minLng > maxLng) {\n const easternHem = this.getClusters([minLng, minLat, 180, maxLat], zoom);\n const westernHem = this.getClusters([-180, minLat, maxLng, maxLat], zoom);\n return easternHem.concat(westernHem);\n }\n\n const tree = this.trees[this._limitZoom(zoom)];\n const ids = tree.range(lngX(minLng), latY(maxLat), lngX(maxLng), latY(minLat));\n const clusters = [];\n for (const id of ids) {\n const c = tree.points[id];\n clusters.push(c.numPoints ? getClusterJSON(c) : this.points[c.index]);\n }\n return clusters;\n }\n\n getChildren(clusterId) {\n const originId = this._getOriginId(clusterId);\n const originZoom = this._getOriginZoom(clusterId);\n const errorMsg = 'No cluster with the specified id.';\n\n const index = this.trees[originZoom];\n if (!index) throw new Error(errorMsg);\n\n const origin = index.points[originId];\n if (!origin) throw new Error(errorMsg);\n\n const r = this.options.radius / (this.options.extent * Math.pow(2, originZoom - 1));\n const ids = index.within(origin.x, origin.y, r);\n const children = [];\n for (const id of ids) {\n const c = index.points[id];\n if (c.parentId === clusterId) {\n children.push(c.numPoints ? getClusterJSON(c) : this.points[c.index]);\n }\n }\n\n if (children.length === 0) throw new Error(errorMsg);\n\n return children;\n }\n\n getLeaves(clusterId, limit, offset) {\n limit = limit || 10;\n offset = offset || 0;\n\n const leaves = [];\n this._appendLeaves(leaves, clusterId, limit, offset, 0);\n\n return leaves;\n }\n\n getTile(z, x, y) {\n const tree = this.trees[this._limitZoom(z)];\n const z2 = Math.pow(2, z);\n const {extent, radius} = this.options;\n const p = radius / extent;\n const top = (y - p) / z2;\n const bottom = (y + 1 + p) / z2;\n\n const tile = {\n features: []\n };\n\n this._addTileFeatures(\n tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom),\n tree.points, x, y, z2, tile);\n\n if (x === 0) {\n this._addTileFeatures(\n tree.range(1 - p / z2, top, 1, bottom),\n tree.points, z2, y, z2, tile);\n }\n if (x === z2 - 1) {\n this._addTileFeatures(\n tree.range(0, top, p / z2, bottom),\n tree.points, -1, y, z2, tile);\n }\n\n return tile.features.length ? tile : null;\n }\n\n getClusterExpansionZoom(clusterId) {\n let expansionZoom = this._getOriginZoom(clusterId) - 1;\n while (expansionZoom <= this.options.maxZoom) {\n const children = this.getChildren(clusterId);\n expansionZoom++;\n if (children.length !== 1) break;\n clusterId = children[0].properties.cluster_id;\n }\n return expansionZoom;\n }\n\n _appendLeaves(result, clusterId, limit, offset, skipped) {\n const children = this.getChildren(clusterId);\n\n for (const child of children) {\n const props = child.properties;\n\n if (props && props.cluster) {\n if (skipped + props.point_count <= offset) {\n // skip the whole cluster\n skipped += props.point_count;\n } else {\n // enter the cluster\n skipped = this._appendLeaves(result, props.cluster_id, limit, offset, skipped);\n // exit the cluster\n }\n } else if (skipped < offset) {\n // skip a single point\n skipped++;\n } else {\n // add a single point\n result.push(child);\n }\n if (result.length === limit) break;\n }\n\n return skipped;\n }\n\n _addTileFeatures(ids, points, x, y, z2, tile) {\n for (const i of ids) {\n const c = points[i];\n const isCluster = c.numPoints;\n\n let tags, px, py;\n if (isCluster) {\n tags = getClusterProperties(c);\n px = c.x;\n py = c.y;\n } else {\n const p = this.points[c.index];\n tags = p.properties;\n px = lngX(p.geometry.coordinates[0]);\n py = latY(p.geometry.coordinates[1]);\n }\n\n const f = {\n type: 1,\n geometry: [[\n Math.round(this.options.extent * (px * z2 - x)),\n Math.round(this.options.extent * (py * z2 - y))\n ]],\n tags\n };\n\n // assign id\n let id;\n if (isCluster) {\n id = c.id;\n } else if (this.options.generateId) {\n // optionally generate id\n id = c.index;\n } else if (this.points[c.index].id) {\n // keep id if already assigned\n id = this.points[c.index].id;\n }\n\n if (id !== undefined) f.id = id;\n\n tile.features.push(f);\n }\n }\n\n _limitZoom(z) {\n return Math.max(this.options.minZoom, Math.min(+z, this.options.maxZoom + 1));\n }\n\n _cluster(points, zoom) {\n const clusters = [];\n const {radius, extent, reduce, minPoints} = this.options;\n const r = radius / (extent * Math.pow(2, zoom));\n\n // loop through each point\n for (let i = 0; i < points.length; i++) {\n const p = points[i];\n // if we've already visited the point at this zoom level, skip it\n if (p.zoom <= zoom) continue;\n p.zoom = zoom;\n\n // find all nearby points\n const tree = this.trees[zoom + 1];\n const neighborIds = tree.within(p.x, p.y, r);\n\n const numPointsOrigin = p.numPoints || 1;\n let numPoints = numPointsOrigin;\n\n // count the number of points in a potential cluster\n for (const neighborId of neighborIds) {\n const b = tree.points[neighborId];\n // filter out neighbors that are already processed\n if (b.zoom > zoom) numPoints += b.numPoints || 1;\n }\n\n // if there were neighbors to merge, and there are enough points to form a cluster\n if (numPoints > numPointsOrigin && numPoints >= minPoints) {\n let wx = p.x * numPointsOrigin;\n let wy = p.y * numPointsOrigin;\n\n let clusterProperties = reduce && numPointsOrigin > 1 ? this._map(p, true) : null;\n\n // encode both zoom and point index on which the cluster originated -- offset by total length of features\n const id = (i << 5) + (zoom + 1) + this.points.length;\n\n for (const neighborId of neighborIds) {\n const b = tree.points[neighborId];\n\n if (b.zoom <= zoom) continue;\n b.zoom = zoom; // save the zoom (so it doesn't get processed twice)\n\n const numPoints2 = b.numPoints || 1;\n wx += b.x * numPoints2; // accumulate coordinates for calculating weighted center\n wy += b.y * numPoints2;\n\n b.parentId = id;\n\n if (reduce) {\n if (!clusterProperties) clusterProperties = this._map(p, true);\n reduce(clusterProperties, this._map(b));\n }\n }\n\n p.parentId = id;\n clusters.push(createCluster(wx / numPoints, wy / numPoints, id, numPoints, clusterProperties));\n\n } else { // left points as unclustered\n clusters.push(p);\n\n if (numPoints > 1) {\n for (const neighborId of neighborIds) {\n const b = tree.points[neighborId];\n if (b.zoom <= zoom) continue;\n b.zoom = zoom;\n clusters.push(b);\n }\n }\n }\n }\n\n return clusters;\n }\n\n // get index of the point from which the cluster originated\n _getOriginId(clusterId) {\n return (clusterId - this.points.length) >> 5;\n }\n\n // get zoom of the point from which the cluster originated\n _getOriginZoom(clusterId) {\n return (clusterId - this.points.length) % 32;\n }\n\n _map(point, clone) {\n if (point.numPoints) {\n return clone ? extend$1({}, point.properties) : point.properties;\n }\n const original = this.points[point.index].properties;\n const result = this.options.map(original);\n return clone && result === original ? extend$1({}, result) : result;\n }\n}\n\nfunction createCluster(x, y, id, numPoints, properties) {\n return {\n x: fround(x), // weighted cluster center; round for consistency with Float32Array index\n y: fround(y),\n zoom: Infinity, // the last zoom the cluster was processed at\n id, // encodes index of the first child of the cluster and its zoom level\n parentId: -1, // parent cluster id\n numPoints,\n properties\n };\n}\n\nfunction createPointCluster(p, id) {\n const [x, y] = p.geometry.coordinates;\n return {\n x: fround(lngX(x)), // projected point coordinates\n y: fround(latY(y)),\n zoom: Infinity, // the last zoom the point was processed at\n index: id, // index of the source feature in the original input array,\n parentId: -1 // parent cluster id\n };\n}\n\nfunction getClusterJSON(cluster) {\n return {\n type: 'Feature',\n id: cluster.id,\n properties: getClusterProperties(cluster),\n geometry: {\n type: 'Point',\n coordinates: [xLng(cluster.x), yLat(cluster.y)]\n }\n };\n}\n\nfunction getClusterProperties(cluster) {\n const count = cluster.numPoints;\n const abbrev =\n count >= 10000 ? `${Math.round(count / 1000) }k` :\n count >= 1000 ? `${Math.round(count / 100) / 10 }k` : count;\n return extend$1(extend$1({}, cluster.properties), {\n cluster: true,\n cluster_id: cluster.id,\n point_count: count,\n point_count_abbreviated: abbrev\n });\n}\n\n// longitude/latitude to spherical mercator in [0..1] range\nfunction lngX(lng) {\n return lng / 360 + 0.5;\n}\nfunction latY(lat) {\n const sin = Math.sin(lat * Math.PI / 180);\n const y = (0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI);\n return y < 0 ? 0 : y > 1 ? 1 : y;\n}\n\n// spherical mercator to longitude/latitude\nfunction xLng(x) {\n return (x - 0.5) * 360;\n}\nfunction yLat(y) {\n const y2 = (180 - y * 360) * Math.PI / 180;\n return 360 * Math.atan(Math.exp(y2)) / Math.PI - 90;\n}\n\nfunction extend$1(dest, src) {\n for (const id in src) dest[id] = src[id];\n return dest;\n}\n\nfunction getX(p) {\n return p.x;\n}\nfunction getY(p) {\n return p.y;\n}\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass Cluster {\n constructor({ markers, position }) {\n this.markers = markers;\n if (position) {\n if (position instanceof google.maps.LatLng) {\n this._position = position;\n }\n else {\n this._position = new google.maps.LatLng(position);\n }\n }\n }\n get bounds() {\n if (this.markers.length === 0 && !this._position) {\n return undefined;\n }\n return this.markers.reduce((bounds, marker) => {\n return bounds.extend(marker.getPosition());\n }, new google.maps.LatLngBounds(this._position, this._position));\n }\n get position() {\n return this._position || this.bounds.getCenter();\n }\n /**\n * Get the count of **visible** markers.\n */\n get count() {\n return this.markers.filter((m) => m.getVisible())\n .length;\n }\n /**\n * Add a marker to the cluster.\n */\n push(marker) {\n this.markers.push(marker);\n }\n /**\n * Cleanup references and remove marker from map.\n */\n delete() {\n if (this.marker) {\n this.marker.setMap(null);\n delete this.marker;\n }\n this.markers.length = 0;\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst filterMarkersToPaddedViewport = (map, mapCanvasProjection, markers, viewportPadding) => {\n const extendedMapBounds = extendBoundsToPaddedViewport(map.getBounds(), mapCanvasProjection, viewportPadding);\n return markers.filter((marker) => extendedMapBounds.contains(marker.getPosition()));\n};\n/**\n * Extends a bounds by a number of pixels in each direction.\n */\nconst extendBoundsToPaddedViewport = (bounds, projection, pixels) => {\n const { northEast, southWest } = latLngBoundsToPixelBounds(bounds, projection);\n const extendedPixelBounds = extendPixelBounds({ northEast, southWest }, pixels);\n return pixelBoundsToLatLngBounds(extendedPixelBounds, projection);\n};\n/**\n * @hidden\n */\nconst distanceBetweenPoints = (p1, p2) => {\n const R = 6371; // Radius of the Earth in km\n const dLat = ((p2.lat - p1.lat) * Math.PI) / 180;\n const dLon = ((p2.lng - p1.lng) * Math.PI) / 180;\n const a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos((p1.lat * Math.PI) / 180) *\n Math.cos((p2.lat * Math.PI) / 180) *\n Math.sin(dLon / 2) *\n Math.sin(dLon / 2);\n const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n return R * c;\n};\n/**\n * @hidden\n */\nconst latLngBoundsToPixelBounds = (bounds, projection) => {\n return {\n northEast: projection.fromLatLngToDivPixel(bounds.getNorthEast()),\n southWest: projection.fromLatLngToDivPixel(bounds.getSouthWest()),\n };\n};\n/**\n * @hidden\n */\nconst extendPixelBounds = ({ northEast, southWest }, pixels) => {\n northEast.x += pixels;\n northEast.y -= pixels;\n southWest.x -= pixels;\n southWest.y += pixels;\n return { northEast, southWest };\n};\n/**\n * @hidden\n */\nconst pixelBoundsToLatLngBounds = ({ northEast, southWest }, projection) => {\n const bounds = new google.maps.LatLngBounds();\n bounds.extend(projection.fromDivPixelToLatLng(northEast));\n bounds.extend(projection.fromDivPixelToLatLng(southWest));\n return bounds;\n};\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @hidden\n */\nclass AbstractAlgorithm {\n constructor({ maxZoom = 16 }) {\n this.maxZoom = maxZoom;\n }\n /**\n * Helper function to bypass clustering based upon some map state such as\n * zoom, number of markers, etc.\n *\n * ```typescript\n * cluster({markers, map}: AlgorithmInput): Cluster[] {\n * if (shouldBypassClustering(map)) {\n * return this.noop({markers, map})\n * }\n * }\n * ```\n */\n noop({ markers }) {\n return noop$1(markers);\n }\n}\n/**\n * Abstract viewport algorithm proves a class to filter markers by a padded\n * viewport. This is a common optimization.\n *\n * @hidden\n */\nclass AbstractViewportAlgorithm extends AbstractAlgorithm {\n constructor(_a) {\n var { viewportPadding = 60 } = _a, options = __rest(_a, [\"viewportPadding\"]);\n super(options);\n this.viewportPadding = 60;\n this.viewportPadding = viewportPadding;\n }\n calculate({ markers, map, mapCanvasProjection, }) {\n if (map.getZoom() >= this.maxZoom) {\n return {\n clusters: this.noop({\n markers,\n map,\n mapCanvasProjection,\n }),\n changed: false,\n };\n }\n return {\n clusters: this.cluster({\n markers: filterMarkersToPaddedViewport(map, mapCanvasProjection, markers, this.viewportPadding),\n map,\n mapCanvasProjection,\n }),\n };\n }\n}\n/**\n * @hidden\n */\nconst noop$1 = (markers) => {\n const clusters = markers.map((marker) => new Cluster({\n position: marker.getPosition(),\n markers: [marker],\n }));\n return clusters;\n};\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The default Grid algorithm historically used in Google Maps marker\n * clustering.\n *\n * The Grid algorithm does not implement caching and markers may flash as the\n * viewport changes. Instead use {@link SuperClusterAlgorithm}.\n */\nclass GridAlgorithm extends AbstractViewportAlgorithm {\n constructor(_a) {\n var { maxDistance = 40000, gridSize = 40 } = _a, options = __rest(_a, [\"maxDistance\", \"gridSize\"]);\n super(options);\n this.clusters = [];\n this.maxDistance = maxDistance;\n this.gridSize = gridSize;\n this.state = { zoom: null };\n }\n calculate({ markers, map, mapCanvasProjection, }) {\n const state = { zoom: map.getZoom() };\n let changed = false;\n if (this.state.zoom > this.maxZoom && state.zoom > this.maxZoom) ;\n else {\n changed = !fastDeepEqual(this.state, state);\n }\n this.state = state;\n if (map.getZoom() >= this.maxZoom) {\n return {\n clusters: this.noop({\n markers,\n map,\n mapCanvasProjection,\n }),\n changed: changed,\n };\n }\n return {\n clusters: this.cluster({\n markers: filterMarkersToPaddedViewport(map, mapCanvasProjection, markers, this.viewportPadding),\n map,\n mapCanvasProjection,\n }),\n };\n }\n cluster({ markers, map, mapCanvasProjection, }) {\n this.clusters = [];\n markers.forEach((marker) => {\n this.addToClosestCluster(marker, map, mapCanvasProjection);\n });\n return this.clusters;\n }\n addToClosestCluster(marker, map, projection) {\n let maxDistance = this.maxDistance; // Some large number\n let cluster = null;\n for (let i = 0; i < this.clusters.length; i++) {\n const candidate = this.clusters[i];\n const distance = distanceBetweenPoints(candidate.bounds.getCenter().toJSON(), marker.getPosition().toJSON());\n if (distance < maxDistance) {\n maxDistance = distance;\n cluster = candidate;\n }\n }\n if (cluster &&\n extendBoundsToPaddedViewport(cluster.bounds, projection, this.gridSize).contains(marker.getPosition())) {\n cluster.push(marker);\n }\n else {\n const cluster = new Cluster({ markers: [marker] });\n this.clusters.push(cluster);\n }\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Noop algorithm does not generate any clusters or filter markers by the an extended viewport.\n */\nclass NoopAlgorithm extends AbstractAlgorithm {\n constructor(_a) {\n var options = __rest(_a, []);\n super(options);\n }\n calculate({ markers, map, mapCanvasProjection, }) {\n return {\n clusters: this.cluster({ markers, map, mapCanvasProjection }),\n changed: false,\n };\n }\n cluster(input) {\n return this.noop(input);\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A very fast JavaScript algorithm for geospatial point clustering using KD trees.\n *\n * @see https://www.npmjs.com/package/supercluster for more information on options.\n */\nclass SuperClusterAlgorithm extends AbstractAlgorithm {\n constructor(_a) {\n var { maxZoom, radius = 60 } = _a, options = __rest(_a, [\"maxZoom\", \"radius\"]);\n super({ maxZoom });\n this.superCluster = new Supercluster(Object.assign({ maxZoom: this.maxZoom, radius }, options));\n this.state = { zoom: null };\n }\n calculate(input) {\n let changed = false;\n if (!fastDeepEqual(input.markers, this.markers)) {\n changed = true;\n // TODO use proxy to avoid copy?\n this.markers = [...input.markers];\n const points = this.markers.map((marker) => {\n return {\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates: [\n marker.getPosition().lng(),\n marker.getPosition().lat(),\n ],\n },\n properties: { marker },\n };\n });\n this.superCluster.load(points);\n }\n const state = { zoom: input.map.getZoom() };\n if (!changed) {\n if (this.state.zoom > this.maxZoom && state.zoom > this.maxZoom) ;\n else {\n changed = changed || !fastDeepEqual(this.state, state);\n }\n }\n this.state = state;\n if (changed) {\n this.clusters = this.cluster(input);\n }\n return { clusters: this.clusters, changed };\n }\n cluster({ map }) {\n return this.superCluster\n .getClusters([-180, -90, 180, 90], Math.round(map.getZoom()))\n .map(this.transformCluster.bind(this));\n }\n transformCluster({ geometry: { coordinates: [lng, lat], }, properties, }) {\n if (properties.cluster) {\n return new Cluster({\n markers: this.superCluster\n .getLeaves(properties.cluster_id, Infinity)\n .map((leaf) => leaf.properties.marker),\n position: new google.maps.LatLng({ lat, lng }),\n });\n }\n else {\n const marker = properties.marker;\n return new Cluster({\n markers: [marker],\n position: marker.getPosition(),\n });\n }\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Provides statistics on all clusters in the current render cycle for use in {@link Renderer.render}.\n */\nclass ClusterStats {\n constructor(markers, clusters) {\n this.markers = { sum: markers.length };\n const clusterMarkerCounts = clusters.map((a) => a.count);\n const clusterMarkerSum = clusterMarkerCounts.reduce((a, b) => a + b, 0);\n this.clusters = {\n count: clusters.length,\n markers: {\n mean: clusterMarkerSum / clusters.length,\n sum: clusterMarkerSum,\n min: Math.min(...clusterMarkerCounts),\n max: Math.max(...clusterMarkerCounts),\n },\n };\n }\n}\nclass DefaultRenderer {\n /**\n * The default render function for the library used by {@link MarkerClusterer}.\n *\n * Currently set to use the following:\n *\n * ```typescript\n * // change color if this cluster has more markers than the mean cluster\n * const color =\n * count > Math.max(10, stats.clusters.markers.mean)\n * ? \"#ff0000\"\n * : \"#0000ff\";\n *\n * // create svg url with fill color\n * const svg = window.btoa(`\n * \n * \n * \n * \n * \n * `);\n *\n * // create marker using svg icon\n * return new google.maps.Marker({\n * position,\n * icon: {\n * url: `data:image/svg+xml;base64,${svg}`,\n * scaledSize: new google.maps.Size(45, 45),\n * },\n * label: {\n * text: String(count),\n * color: \"rgba(255,255,255,0.9)\",\n * fontSize: \"12px\",\n * },\n * // adjust zIndex to be above other markers\n * zIndex: 1000 + count,\n * });\n * ```\n */\n render({ count, position }, stats) {\n // change color if this cluster has more markers than the mean cluster\n const color = count > Math.max(10, stats.clusters.markers.mean) ? \"#ff0000\" : \"#0000ff\";\n // create svg url with fill color\n const svg = window.btoa(`\n \n \n \n \n `);\n // create marker using svg icon\n return new google.maps.Marker({\n position,\n icon: {\n url: `data:image/svg+xml;base64,${svg}`,\n scaledSize: new google.maps.Size(45, 45),\n },\n label: {\n text: String(count),\n color: \"rgba(255,255,255,0.9)\",\n fontSize: \"12px\",\n },\n title: `Cluster of ${count} markers`,\n // adjust zIndex to be above other markers\n zIndex: Number(google.maps.Marker.MAX_ZINDEX) + count,\n });\n }\n}\n\n/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Extends an object's prototype by another's.\n *\n * @param type1 The Type to be extended.\n * @param type2 The Type to extend with.\n * @ignore\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction extend(type1, type2) {\n /* istanbul ignore next */\n // eslint-disable-next-line prefer-const\n for (let property in type2.prototype) {\n type1.prototype[property] = type2.prototype[property];\n }\n}\n/**\n * @ignore\n */\nclass OverlayViewSafe {\n constructor() {\n // MarkerClusterer implements google.maps.OverlayView interface. We use the\n // extend function to extend MarkerClusterer with google.maps.OverlayView\n // because it might not always be available when the code is defined so we\n // look for it at the last possible moment. If it doesn't exist now then\n // there is no point going ahead :)\n extend(OverlayViewSafe, google.maps.OverlayView);\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar MarkerClustererEvents;\n(function (MarkerClustererEvents) {\n MarkerClustererEvents[\"CLUSTERING_BEGIN\"] = \"clusteringbegin\";\n MarkerClustererEvents[\"CLUSTERING_END\"] = \"clusteringend\";\n MarkerClustererEvents[\"CLUSTER_CLICK\"] = \"click\";\n})(MarkerClustererEvents || (MarkerClustererEvents = {}));\nconst defaultOnClusterClickHandler = (_, cluster, map) => {\n map.fitBounds(cluster.bounds);\n};\n/**\n * MarkerClusterer creates and manages per-zoom-level clusters for large amounts\n * of markers. See {@link MarkerClustererOptions} for more details.\n *\n */\nclass MarkerClusterer extends OverlayViewSafe {\n constructor({ map, markers = [], algorithm = new SuperClusterAlgorithm({}), renderer = new DefaultRenderer(), onClusterClick = defaultOnClusterClickHandler, }) {\n super();\n this.markers = [...markers];\n this.clusters = [];\n this.algorithm = algorithm;\n this.renderer = renderer;\n this.onClusterClick = onClusterClick;\n if (map) {\n this.setMap(map);\n }\n }\n addMarker(marker, noDraw) {\n if (this.markers.includes(marker)) {\n return;\n }\n this.markers.push(marker);\n if (!noDraw) {\n this.render();\n }\n }\n addMarkers(markers, noDraw) {\n markers.forEach((marker) => {\n this.addMarker(marker, true);\n });\n if (!noDraw) {\n this.render();\n }\n }\n removeMarker(marker, noDraw) {\n const index = this.markers.indexOf(marker);\n if (index === -1) {\n // Marker is not in our list of markers, so do nothing:\n return false;\n }\n marker.setMap(null);\n this.markers.splice(index, 1); // Remove the marker from the list of managed markers\n if (!noDraw) {\n this.render();\n }\n return true;\n }\n removeMarkers(markers, noDraw) {\n let removed = false;\n markers.forEach((marker) => {\n removed = this.removeMarker(marker, true) || removed;\n });\n if (removed && !noDraw) {\n this.render();\n }\n return removed;\n }\n clearMarkers(noDraw) {\n this.markers.length = 0;\n if (!noDraw) {\n this.render();\n }\n }\n /**\n * Recalculates and draws all the marker clusters.\n */\n render() {\n const map = this.getMap();\n if (map instanceof google.maps.Map && this.getProjection()) {\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_BEGIN, this);\n const { clusters, changed } = this.algorithm.calculate({\n markers: this.markers,\n map,\n mapCanvasProjection: this.getProjection(),\n });\n // allow algorithms to return flag on whether the clusters/markers have changed\n if (changed || changed == undefined) {\n // reset visibility of markers and clusters\n this.reset();\n // store new clusters\n this.clusters = clusters;\n this.renderClusters();\n }\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_END, this);\n }\n }\n onAdd() {\n this.idleListener = this.getMap().addListener(\"idle\", this.render.bind(this));\n this.render();\n }\n onRemove() {\n google.maps.event.removeListener(this.idleListener);\n this.reset();\n }\n reset() {\n this.markers.forEach((marker) => marker.setMap(null));\n this.clusters.forEach((cluster) => cluster.delete());\n this.clusters = [];\n }\n renderClusters() {\n // generate stats to pass to renderers\n const stats = new ClusterStats(this.markers, this.clusters);\n const map = this.getMap();\n this.clusters.forEach((cluster) => {\n if (cluster.markers.length === 1) {\n cluster.marker = cluster.markers[0];\n }\n else {\n cluster.marker = this.renderer.render(cluster, stats);\n if (this.onClusterClick) {\n cluster.marker.addListener(\"click\", \n /* istanbul ignore next */\n (event) => {\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTER_CLICK, cluster);\n this.onClusterClick(event, cluster, map);\n });\n }\n }\n cluster.marker.setMap(map);\n });\n }\n}\n\nvar index_esm = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tAbstractAlgorithm: AbstractAlgorithm,\n\tAbstractViewportAlgorithm: AbstractViewportAlgorithm,\n\tCluster: Cluster,\n\tClusterStats: ClusterStats,\n\tDefaultRenderer: DefaultRenderer,\n\tGridAlgorithm: GridAlgorithm,\n\tMarkerClusterer: MarkerClusterer,\n\tget MarkerClustererEvents () { return MarkerClustererEvents; },\n\tNoopAlgorithm: NoopAlgorithm,\n\tSuperClusterAlgorithm: SuperClusterAlgorithm,\n\tdefaultOnClusterClickHandler: defaultOnClusterClickHandler,\n\tdistanceBetweenPoints: distanceBetweenPoints,\n\textendBoundsToPaddedViewport: extendBoundsToPaddedViewport,\n\textendPixelBounds: extendPixelBounds,\n\tfilterMarkersToPaddedViewport: filterMarkersToPaddedViewport,\n\tnoop: noop$1,\n\tpixelBoundsToLatLngBounds: pixelBoundsToLatLngBounds\n});\n\nfunction useGoogleMarkerClusterer(options) {\n const map = useGoogleMap();\n const [markerClusterer, setMarkerClusterer] = useState(null);\n useEffect(() => {\n if (map && markerClusterer === null) {\n const markerCluster = new MarkerClusterer(Object.assign(Object.assign({}, options), { map }));\n setMarkerClusterer(markerCluster);\n }\n }, [map]);\n return markerClusterer;\n}\n/** Wrapper around [@googlemaps/markerclusterer](https://github.com/googlemaps/js-markerclusterer)\n *\n * Accepts {@link MarkerClustererOptionsSubset} which is a subset of {@link MarkerClustererOptions}\n */\nfunction GoogleMarkerClusterer({ children, options }) {\n const markerClusterer = useGoogleMarkerClusterer(options);\n return markerClusterer !== null ? children(markerClusterer) : null;\n}\nvar GoogleMarkerClusterer$1 = memo(GoogleMarkerClusterer);\n\n/* global google */\nconst eventMap$c = {\n onCloseClick: 'closeclick',\n onContentChanged: 'content_changed',\n onDomReady: 'domready',\n onPositionChanged: 'position_changed',\n onZindexChanged: 'zindex_changed',\n};\nconst updaterMap$c = {\n options(instance, options) {\n instance.setOptions(options);\n },\n position(instance, position) {\n instance.setPosition(position);\n },\n zIndex(instance, zIndex) {\n instance.setZIndex(zIndex);\n },\n};\nfunction InfoWindowFunctional({ children, anchor, options, position, zIndex, onCloseClick, onDomReady, onContentChanged, onPositionChanged, onZindexChanged, onLoad, onUnmount }) {\n const map = useContext(MapContext);\n const [instance, setInstance] = useState(null);\n const [closeclickListener, setCloseClickListener] = useState(null);\n const [domreadyclickListener, setDomReadyClickListener] = useState(null);\n const [contentchangedclickListener, setContentChangedClickListener] = useState(null);\n const [positionchangedclickListener, setPositionChangedClickListener] = useState(null);\n const [zindexchangedclickListener, setZindexChangedClickListener] = useState(null);\n const containerElementRef = useRef(null);\n // Order does matter\n useEffect(() => {\n if (instance !== null) {\n instance.close();\n if (anchor) {\n instance.open(map, anchor);\n }\n else if (instance.getPosition()) {\n instance.open(map);\n }\n }\n }, [map, instance, anchor]);\n useEffect(() => {\n if (options && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(() => {\n if (position && instance !== null) {\n instance.setPosition(position);\n }\n }, [position]);\n useEffect(() => {\n if (typeof zIndex === 'number' && instance !== null) {\n instance.setZIndex(zIndex);\n }\n }, [zIndex]);\n useEffect(() => {\n if (instance && onCloseClick) {\n if (closeclickListener !== null) {\n google.maps.event.removeListener(closeclickListener);\n }\n setCloseClickListener(google.maps.event.addListener(instance, 'closeclick', onCloseClick));\n }\n }, [onCloseClick]);\n useEffect(() => {\n if (instance && onDomReady) {\n if (domreadyclickListener !== null) {\n google.maps.event.removeListener(domreadyclickListener);\n }\n setDomReadyClickListener(google.maps.event.addListener(instance, 'domready', onDomReady));\n }\n }, [onDomReady]);\n useEffect(() => {\n if (instance && onContentChanged) {\n if (contentchangedclickListener !== null) {\n google.maps.event.removeListener(contentchangedclickListener);\n }\n setContentChangedClickListener(google.maps.event.addListener(instance, 'content_changed', onContentChanged));\n }\n }, [onContentChanged]);\n useEffect(() => {\n if (instance && onPositionChanged) {\n if (positionchangedclickListener !== null) {\n google.maps.event.removeListener(positionchangedclickListener);\n }\n setPositionChangedClickListener(google.maps.event.addListener(instance, 'position_changed', onPositionChanged));\n }\n }, [onPositionChanged]);\n useEffect(() => {\n if (instance && onZindexChanged) {\n if (zindexchangedclickListener !== null) {\n google.maps.event.removeListener(zindexchangedclickListener);\n }\n setZindexChangedClickListener(google.maps.event.addListener(instance, 'zindex_changed', onZindexChanged));\n }\n }, [onZindexChanged]);\n useEffect(() => {\n const infoWindow = new google.maps.InfoWindow(Object.assign({}, (options || {})));\n setInstance(infoWindow);\n containerElementRef.current = document.createElement('div');\n if (onCloseClick) {\n setCloseClickListener(google.maps.event.addListener(infoWindow, 'closeclick', onCloseClick));\n }\n if (onDomReady) {\n setDomReadyClickListener(google.maps.event.addListener(infoWindow, 'domready', onDomReady));\n }\n if (onContentChanged) {\n setContentChangedClickListener(google.maps.event.addListener(infoWindow, 'content_changed', onContentChanged));\n }\n if (onPositionChanged) {\n setPositionChangedClickListener(google.maps.event.addListener(infoWindow, 'position_changed', onPositionChanged));\n }\n if (onZindexChanged) {\n setZindexChangedClickListener(google.maps.event.addListener(infoWindow, 'zindex_changed', onZindexChanged));\n }\n infoWindow.setContent(containerElementRef.current);\n if (position) {\n infoWindow.setPosition(position);\n }\n if (zIndex) {\n infoWindow.setZIndex(zIndex);\n }\n if (anchor) {\n infoWindow.open(map, anchor);\n }\n else if (infoWindow.getPosition()) {\n infoWindow.open(map);\n }\n else {\n invariant_1(false, `You must provide either an anchor (typically render it inside a ) or a position props for .`);\n }\n if (onLoad) {\n onLoad(infoWindow);\n }\n return () => {\n if (closeclickListener) {\n google.maps.event.removeListener(closeclickListener);\n }\n if (contentchangedclickListener) {\n google.maps.event.removeListener(contentchangedclickListener);\n }\n if (domreadyclickListener) {\n google.maps.event.removeListener(domreadyclickListener);\n }\n if (positionchangedclickListener) {\n google.maps.event.removeListener(positionchangedclickListener);\n }\n if (zindexchangedclickListener) {\n google.maps.event.removeListener(zindexchangedclickListener);\n }\n if (onUnmount) {\n onUnmount(infoWindow);\n }\n infoWindow.close();\n };\n }, []);\n return containerElementRef.current ? (createPortal(Children.only(children), containerElementRef.current)) : (null);\n}\nconst InfoWindowF = memo(InfoWindowFunctional);\nclass InfoWindow extends PureComponent {\n constructor() {\n super(...arguments);\n this.registeredEvents = [];\n this.containerElement = null;\n this.state = {\n infoWindow: null,\n };\n this.open = (infoWindow, anchor) => {\n if (anchor) {\n infoWindow.open(this.context, anchor);\n }\n else if (infoWindow.getPosition()) {\n // @ts-ignore\n infoWindow.open(this.context);\n }\n else {\n invariant_1(false, `You must provide either an anchor (typically render it inside a ) or a position props for .`);\n }\n };\n this.setInfoWindowCallback = () => {\n if (this.state.infoWindow !== null && this.containerElement !== null) {\n this.state.infoWindow.setContent(this.containerElement);\n this.open(this.state.infoWindow, this.props.anchor);\n if (this.props.onLoad) {\n this.props.onLoad(this.state.infoWindow);\n }\n }\n };\n }\n componentDidMount() {\n const infoWindow = new google.maps.InfoWindow(Object.assign({}, (this.props.options || {})));\n this.containerElement = document.createElement('div');\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$c,\n eventMap: eventMap$c,\n prevProps: {},\n nextProps: this.props,\n instance: infoWindow,\n });\n this.setState(() => {\n return {\n infoWindow,\n };\n }, this.setInfoWindowCallback);\n }\n componentDidUpdate(prevProps) {\n if (this.state.infoWindow !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$c,\n eventMap: eventMap$c,\n prevProps,\n nextProps: this.props,\n instance: this.state.infoWindow,\n });\n }\n }\n componentWillUnmount() {\n if (this.state.infoWindow !== null) {\n unregisterEvents(this.registeredEvents);\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.infoWindow);\n }\n this.state.infoWindow.close();\n }\n }\n render() {\n return this.containerElement ? (createPortal(Children.only(this.props.children), this.containerElement)) : (null);\n }\n}\nInfoWindow.contextType = MapContext;\n\nconst eventMap$b = {\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n};\nconst updaterMap$b = {\n draggable(instance, draggable) {\n instance.setDraggable(draggable);\n },\n editable(instance, editable) {\n instance.setEditable(editable);\n },\n map(instance, map) {\n instance.setMap(map);\n },\n options(instance, options) {\n instance.setOptions(options);\n },\n path(instance, path) {\n instance.setPath(path);\n },\n visible(instance, visible) {\n instance.setVisible(visible);\n },\n};\nconst defaultOptions$1 = {};\nfunction PolylineFunctional({ options, draggable, editable, visible, path, onDblClick, onDragEnd, onDragStart, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onRightClick, onClick, onDrag, onLoad, onUnmount, }) {\n const map = useContext(MapContext);\n const [instance, setInstance] = useState(null);\n const [dblclickListener, setDblclickListener] = useState(null);\n const [dragendListener, setDragendListener] = useState(null);\n const [dragstartListener, setDragstartListener] = useState(null);\n const [mousedownListener, setMousedownListener] = useState(null);\n const [mousemoveListener, setMousemoveListener] = useState(null);\n const [mouseoutListener, setMouseoutListener] = useState(null);\n const [mouseoverListener, setMouseoverListener] = useState(null);\n const [mouseupListener, setMouseupListener] = useState(null);\n const [rightclickListener, setRightclickListener] = useState(null);\n const [clickListener, setClickListener] = useState(null);\n const [dragListener, setDragListener] = useState(null);\n // Order does matter\n useEffect(() => {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(() => {\n if (typeof options !== 'undefined' && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(() => {\n if (typeof draggable !== 'undefined' && instance !== null) {\n instance.setDraggable(draggable);\n }\n }, [instance, draggable]);\n useEffect(() => {\n if (typeof editable !== 'undefined' && instance !== null) {\n instance.setEditable(editable);\n }\n }, [instance, editable]);\n useEffect(() => {\n if (typeof visible !== 'undefined' && instance !== null) {\n instance.setVisible(visible);\n }\n }, [instance, visible]);\n useEffect(() => {\n if (typeof path !== 'undefined' && instance !== null) {\n instance.setPath(path);\n }\n }, [instance, path]);\n useEffect(() => {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(() => {\n if (instance && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(instance, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(() => {\n if (instance && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(instance, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(() => {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(() => {\n if (instance && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(instance, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(() => {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(() => {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(() => {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(() => {\n if (instance && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(() => {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(() => {\n if (instance && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(instance, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(() => {\n const polyline = new google.maps.Polyline(Object.assign(Object.assign({}, (options || defaultOptions$1)), { map }));\n if (path) {\n polyline.setPath(path);\n }\n if (typeof visible !== 'undefined') {\n polyline.setVisible(visible);\n }\n if (typeof editable !== 'undefined') {\n polyline.setEditable(editable);\n }\n if (typeof draggable !== 'undefined') {\n polyline.setDraggable(draggable);\n }\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(polyline, 'dblclick', onDblClick));\n }\n if (onDragEnd) {\n setDragendListener(google.maps.event.addListener(polyline, 'dragend', onDragEnd));\n }\n if (onDragStart) {\n setDragstartListener(google.maps.event.addListener(polyline, 'dragstart', onDragStart));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(polyline, 'mousedown', onMouseDown));\n }\n if (onMouseMove) {\n setMousemoveListener(google.maps.event.addListener(polyline, 'mousemove', onMouseMove));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(polyline, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(polyline, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(polyline, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightclickListener(google.maps.event.addListener(polyline, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(polyline, 'click', onClick));\n }\n if (onDrag) {\n setDragListener(google.maps.event.addListener(polyline, 'drag', onDrag));\n }\n setInstance(polyline);\n if (onLoad) {\n onLoad(polyline);\n }\n return () => {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (onUnmount) {\n onUnmount(polyline);\n }\n polyline.setMap(null);\n };\n }, []);\n return null;\n}\nconst PolylineF = memo(PolylineFunctional);\nclass Polyline extends PureComponent {\n constructor() {\n super(...arguments);\n this.registeredEvents = [];\n this.state = {\n polyline: null,\n };\n this.setPolylineCallback = () => {\n if (this.state.polyline !== null && this.props.onLoad) {\n this.props.onLoad(this.state.polyline);\n }\n };\n }\n componentDidMount() {\n const polyline = new google.maps.Polyline(Object.assign(Object.assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$b,\n eventMap: eventMap$b,\n prevProps: {},\n nextProps: this.props,\n instance: polyline,\n });\n this.setState(function setPolyline() {\n return {\n polyline,\n };\n }, this.setPolylineCallback);\n }\n componentDidUpdate(prevProps) {\n if (this.state.polyline !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$b,\n eventMap: eventMap$b,\n prevProps,\n nextProps: this.props,\n instance: this.state.polyline,\n });\n }\n }\n componentWillUnmount() {\n if (this.state.polyline !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.polyline);\n }\n unregisterEvents(this.registeredEvents);\n this.state.polyline.setMap(null);\n }\n }\n render() {\n return null;\n }\n}\nPolyline.contextType = MapContext;\n\n/* global google */\nconst eventMap$a = {\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n};\nconst updaterMap$a = {\n draggable(instance, draggable) {\n instance.setDraggable(draggable);\n },\n editable(instance, editable) {\n instance.setEditable(editable);\n },\n map(instance, map) {\n instance.setMap(map);\n },\n options(instance, options) {\n instance.setOptions(options);\n },\n path(instance, path) {\n instance.setPath(path);\n },\n paths(instance, paths) {\n instance.setPaths(paths);\n },\n visible(instance, visible) {\n instance.setVisible(visible);\n },\n};\nfunction PolygonFunctional({ options, draggable, editable, visible, path, paths, onDblClick, onDragEnd, onDragStart, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onRightClick, onClick, onDrag, onLoad, onUnmount, }) {\n const map = useContext(MapContext);\n const [instance, setInstance] = useState(null);\n const [dblclickListener, setDblclickListener] = useState(null);\n const [dragendListener, setDragendListener] = useState(null);\n const [dragstartListener, setDragstartListener] = useState(null);\n const [mousedownListener, setMousedownListener] = useState(null);\n const [mousemoveListener, setMousemoveListener] = useState(null);\n const [mouseoutListener, setMouseoutListener] = useState(null);\n const [mouseoverListener, setMouseoverListener] = useState(null);\n const [mouseupListener, setMouseupListener] = useState(null);\n const [rightclickListener, setRightclickListener] = useState(null);\n const [clickListener, setClickListener] = useState(null);\n const [dragListener, setDragListener] = useState(null);\n // Order does matter\n useEffect(() => {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(() => {\n if (typeof options !== 'undefined' && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(() => {\n if (typeof draggable !== 'undefined' && instance !== null) {\n instance.setDraggable(draggable);\n }\n }, [instance, draggable]);\n useEffect(() => {\n if (typeof editable !== 'undefined' && instance !== null) {\n instance.setEditable(editable);\n }\n }, [instance, editable]);\n useEffect(() => {\n if (typeof visible !== 'undefined' && instance !== null) {\n instance.setVisible(visible);\n }\n }, [instance, visible]);\n useEffect(() => {\n if (typeof path !== 'undefined' && instance !== null) {\n instance.setPath(path);\n }\n }, [instance, path]);\n useEffect(() => {\n if (typeof paths !== 'undefined' && instance !== null) {\n instance.setPaths(paths);\n }\n }, [instance, paths]);\n useEffect(() => {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(() => {\n if (instance && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(instance, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(() => {\n if (instance && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(instance, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(() => {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(() => {\n if (instance && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(instance, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(() => {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(() => {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(() => {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(() => {\n if (instance && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(() => {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(() => {\n if (instance && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(instance, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(() => {\n const polygon = new google.maps.Polygon(Object.assign(Object.assign({}, (options || {})), { map }));\n if (path) {\n polygon.setPath(path);\n }\n if (paths) {\n polygon.setPaths(paths);\n }\n if (typeof visible !== 'undefined') {\n polygon.setVisible(visible);\n }\n if (typeof editable !== 'undefined') {\n polygon.setEditable(editable);\n }\n if (typeof draggable !== 'undefined') {\n polygon.setDraggable(draggable);\n }\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(polygon, 'dblclick', onDblClick));\n }\n if (onDragEnd) {\n setDragendListener(google.maps.event.addListener(polygon, 'dragend', onDragEnd));\n }\n if (onDragStart) {\n setDragstartListener(google.maps.event.addListener(polygon, 'dragstart', onDragStart));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(polygon, 'mousedown', onMouseDown));\n }\n if (onMouseMove) {\n setMousemoveListener(google.maps.event.addListener(polygon, 'mousemove', onMouseMove));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(polygon, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(polygon, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(polygon, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightclickListener(google.maps.event.addListener(polygon, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(polygon, 'click', onClick));\n }\n if (onDrag) {\n setDragListener(google.maps.event.addListener(polygon, 'drag', onDrag));\n }\n setInstance(polygon);\n if (onLoad) {\n onLoad(polygon);\n }\n return () => {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (onUnmount) {\n onUnmount(polygon);\n }\n polygon.setMap(null);\n };\n }, []);\n return null;\n}\nconst PolygonF = memo(PolygonFunctional);\nclass Polygon extends PureComponent {\n constructor() {\n super(...arguments);\n this.registeredEvents = [];\n this.state = {\n polygon: null,\n };\n this.setPolygonCallback = () => {\n if (this.state.polygon !== null && this.props.onLoad) {\n this.props.onLoad(this.state.polygon);\n }\n };\n }\n componentDidMount() {\n const polygon = new google.maps.Polygon(Object.assign(Object.assign({}, (this.props.options || {})), { \n // @ts-ignore\n map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$a,\n eventMap: eventMap$a,\n prevProps: {},\n nextProps: this.props,\n instance: polygon,\n });\n this.setState(function setPolygon() {\n return {\n polygon,\n };\n }, this.setPolygonCallback);\n }\n componentDidUpdate(prevProps) {\n if (this.state.polygon !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$a,\n eventMap: eventMap$a,\n prevProps,\n nextProps: this.props,\n instance: this.state.polygon,\n });\n }\n }\n componentWillUnmount() {\n if (this.state.polygon !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.polygon);\n }\n unregisterEvents(this.registeredEvents);\n this.state.polygon && this.state.polygon.setMap(null);\n }\n }\n render() {\n return null;\n }\n}\nPolygon.contextType = MapContext;\n\nconst eventMap$9 = {\n onBoundsChanged: 'bounds_changed',\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n};\nconst updaterMap$9 = {\n bounds(instance, bounds) {\n instance.setBounds(bounds);\n },\n draggable(instance, draggable) {\n instance.setDraggable(draggable);\n },\n editable(instance, editable) {\n instance.setEditable(editable);\n },\n map(instance, map) {\n instance.setMap(map);\n },\n options(instance, options) {\n instance.setOptions(options);\n },\n visible(instance, visible) {\n instance.setVisible(visible);\n },\n};\nfunction RectangleFunctional({ options, bounds, draggable, editable, visible, onDblClick, onDragEnd, onDragStart, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onRightClick, onClick, onDrag, onBoundsChanged, onLoad, onUnmount, }) {\n const map = useContext(MapContext);\n const [instance, setInstance] = useState(null);\n const [dblclickListener, setDblclickListener] = useState(null);\n const [dragendListener, setDragendListener] = useState(null);\n const [dragstartListener, setDragstartListener] = useState(null);\n const [mousedownListener, setMousedownListener] = useState(null);\n const [mousemoveListener, setMousemoveListener] = useState(null);\n const [mouseoutListener, setMouseoutListener] = useState(null);\n const [mouseoverListener, setMouseoverListener] = useState(null);\n const [mouseupListener, setMouseupListener] = useState(null);\n const [rightclickListener, setRightclickListener] = useState(null);\n const [clickListener, setClickListener] = useState(null);\n const [dragListener, setDragListener] = useState(null);\n const [boundsChangedListener, setBoundsChangedListener] = useState(null);\n // Order does matter\n useEffect(() => {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(() => {\n if (typeof options !== 'undefined' && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(() => {\n if (typeof draggable !== 'undefined' && instance !== null) {\n instance.setDraggable(draggable);\n }\n }, [instance, draggable]);\n useEffect(() => {\n if (typeof editable !== 'undefined' && instance !== null) {\n instance.setEditable(editable);\n }\n }, [instance, editable]);\n useEffect(() => {\n if (typeof visible !== 'undefined' && instance !== null) {\n instance.setVisible(visible);\n }\n }, [instance, visible]);\n useEffect(() => {\n if (typeof bounds !== 'undefined' && instance !== null) {\n instance.setBounds(bounds);\n }\n }, [instance, bounds]);\n useEffect(() => {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(() => {\n if (instance && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(instance, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(() => {\n if (instance && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(instance, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(() => {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(() => {\n if (instance && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(instance, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(() => {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(() => {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(() => {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(() => {\n if (instance && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(() => {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(() => {\n if (instance && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(instance, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(() => {\n if (instance && onBoundsChanged) {\n if (boundsChangedListener !== null) {\n google.maps.event.removeListener(boundsChangedListener);\n }\n setBoundsChangedListener(google.maps.event.addListener(instance, 'bounds_changed', onBoundsChanged));\n }\n }, [onBoundsChanged]);\n useEffect(() => {\n const rectangle = new google.maps.Rectangle(Object.assign(Object.assign({}, (options || {})), { map }));\n if (typeof visible !== 'undefined') {\n rectangle.setVisible(visible);\n }\n if (typeof editable !== 'undefined') {\n rectangle.setEditable(editable);\n }\n if (typeof draggable !== 'undefined') {\n rectangle.setDraggable(draggable);\n }\n if (typeof bounds !== 'undefined') {\n rectangle.setBounds(bounds);\n }\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(rectangle, 'dblclick', onDblClick));\n }\n if (onDragEnd) {\n setDragendListener(google.maps.event.addListener(rectangle, 'dragend', onDragEnd));\n }\n if (onDragStart) {\n setDragstartListener(google.maps.event.addListener(rectangle, 'dragstart', onDragStart));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(rectangle, 'mousedown', onMouseDown));\n }\n if (onMouseMove) {\n setMousemoveListener(google.maps.event.addListener(rectangle, 'mousemove', onMouseMove));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(rectangle, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(rectangle, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(rectangle, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightclickListener(google.maps.event.addListener(rectangle, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(rectangle, 'click', onClick));\n }\n if (onDrag) {\n setDragListener(google.maps.event.addListener(rectangle, 'drag', onDrag));\n }\n if (onBoundsChanged) {\n setBoundsChangedListener(google.maps.event.addListener(rectangle, 'bounds_changed', onBoundsChanged));\n }\n setInstance(rectangle);\n if (onLoad) {\n onLoad(rectangle);\n }\n return () => {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n if (boundsChangedListener !== null) {\n google.maps.event.removeListener(boundsChangedListener);\n }\n if (onUnmount) {\n onUnmount(rectangle);\n }\n rectangle.setMap(null);\n };\n }, []);\n return null;\n}\nconst RectangleF = memo(RectangleFunctional);\nclass Rectangle extends PureComponent {\n constructor() {\n super(...arguments);\n this.registeredEvents = [];\n this.state = {\n rectangle: null,\n };\n this.setRectangleCallback = () => {\n if (this.state.rectangle !== null && this.props.onLoad) {\n this.props.onLoad(this.state.rectangle);\n }\n };\n }\n componentDidMount() {\n const rectangle = new google.maps.Rectangle(Object.assign(Object.assign({}, (this.props.options || {})), { \n // @ts-ignore\n map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$9,\n eventMap: eventMap$9,\n prevProps: {},\n nextProps: this.props,\n instance: rectangle,\n });\n this.setState(function setRectangle() {\n return {\n rectangle,\n };\n }, this.setRectangleCallback);\n }\n componentDidUpdate(prevProps) {\n if (this.state.rectangle !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$9,\n eventMap: eventMap$9,\n prevProps,\n nextProps: this.props,\n instance: this.state.rectangle,\n });\n }\n }\n componentWillUnmount() {\n if (this.state.rectangle !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.rectangle);\n }\n unregisterEvents(this.registeredEvents);\n this.state.rectangle.setMap(null);\n }\n }\n render() {\n return null;\n }\n}\nRectangle.contextType = MapContext;\n\nconst eventMap$8 = {\n onCenterChanged: 'center_changed',\n onRadiusChanged: 'radius_changed',\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n};\nconst updaterMap$8 = {\n center(instance, center) {\n instance.setCenter(center);\n },\n draggable(instance, draggable) {\n instance.setDraggable(draggable);\n },\n editable(instance, editable) {\n instance.setEditable(editable);\n },\n map(instance, map) {\n instance.setMap(map);\n },\n options(instance, options) {\n instance.setOptions(options);\n },\n radius(instance, radius) {\n instance.setRadius(radius);\n },\n visible(instance, visible) {\n instance.setVisible(visible);\n },\n};\nconst defaultOptions = {};\nfunction CircleFunctional({ options, center, radius, draggable, editable, visible, onDblClick, onDragEnd, onDragStart, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onRightClick, onClick, onDrag, onCenterChanged, onRadiusChanged, onLoad, onUnmount, }) {\n const map = useContext(MapContext);\n const [instance, setInstance] = useState(null);\n const [dblclickListener, setDblclickListener] = useState(null);\n const [dragendListener, setDragendListener] = useState(null);\n const [dragstartListener, setDragstartListener] = useState(null);\n const [mousedownListener, setMousedownListener] = useState(null);\n const [mousemoveListener, setMousemoveListener] = useState(null);\n const [mouseoutListener, setMouseoutListener] = useState(null);\n const [mouseoverListener, setMouseoverListener] = useState(null);\n const [mouseupListener, setMouseupListener] = useState(null);\n const [rightclickListener, setRightclickListener] = useState(null);\n const [clickListener, setClickListener] = useState(null);\n const [dragListener, setDragListener] = useState(null);\n const [centerChangedListener, setCenterChangedListener] = useState(null);\n const [radiusChangedListener, setRadiusChangedListener] = useState(null);\n // Order does matter\n useEffect(() => {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(() => {\n if (typeof options !== 'undefined' && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(() => {\n if (typeof draggable !== 'undefined' && instance !== null) {\n instance.setDraggable(draggable);\n }\n }, [instance, draggable]);\n useEffect(() => {\n if (typeof editable !== 'undefined' && instance !== null) {\n instance.setEditable(editable);\n }\n }, [instance, editable]);\n useEffect(() => {\n if (typeof visible !== 'undefined' && instance !== null) {\n instance.setVisible(visible);\n }\n }, [instance, visible]);\n useEffect(() => {\n if (typeof radius === 'number' && instance !== null) {\n instance.setRadius(radius);\n }\n }, [instance, radius]);\n useEffect(() => {\n if (typeof center !== 'undefined' && instance !== null) {\n instance.setCenter(center);\n }\n }, [instance, center]);\n useEffect(() => {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(() => {\n if (instance && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(instance, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(() => {\n if (instance && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(instance, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(() => {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(() => {\n if (instance && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(instance, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(() => {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(() => {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(() => {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(() => {\n if (instance && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(() => {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(() => {\n if (instance && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(instance, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(() => {\n if (instance && onCenterChanged) {\n if (centerChangedListener !== null) {\n google.maps.event.removeListener(centerChangedListener);\n }\n setCenterChangedListener(google.maps.event.addListener(instance, 'center_changed', onCenterChanged));\n }\n }, [onClick]);\n useEffect(() => {\n if (instance && onRadiusChanged) {\n if (radiusChangedListener !== null) {\n google.maps.event.removeListener(radiusChangedListener);\n }\n setRadiusChangedListener(google.maps.event.addListener(instance, 'radius_changed', onRadiusChanged));\n }\n }, [onRadiusChanged]);\n useEffect(() => {\n const circle = new google.maps.Circle(Object.assign(Object.assign({}, (options || defaultOptions)), { map }));\n if (typeof radius === 'number') {\n circle.setRadius(radius);\n }\n if (typeof center !== 'undefined') {\n circle.setCenter(center);\n }\n if (typeof radius === 'number') {\n circle.setRadius(radius);\n }\n if (typeof visible !== 'undefined') {\n circle.setVisible(visible);\n }\n if (typeof editable !== 'undefined') {\n circle.setEditable(editable);\n }\n if (typeof draggable !== 'undefined') {\n circle.setDraggable(draggable);\n }\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(circle, 'dblclick', onDblClick));\n }\n if (onDragEnd) {\n setDragendListener(google.maps.event.addListener(circle, 'dragend', onDragEnd));\n }\n if (onDragStart) {\n setDragstartListener(google.maps.event.addListener(circle, 'dragstart', onDragStart));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(circle, 'mousedown', onMouseDown));\n }\n if (onMouseMove) {\n setMousemoveListener(google.maps.event.addListener(circle, 'mousemove', onMouseMove));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(circle, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(circle, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(circle, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightclickListener(google.maps.event.addListener(circle, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(circle, 'click', onClick));\n }\n if (onDrag) {\n setDragListener(google.maps.event.addListener(circle, 'drag', onDrag));\n }\n if (onCenterChanged) {\n setCenterChangedListener(google.maps.event.addListener(circle, 'center_changed', onCenterChanged));\n }\n if (onRadiusChanged) {\n setRadiusChangedListener(google.maps.event.addListener(circle, 'radius_changed', onRadiusChanged));\n }\n setInstance(circle);\n if (onLoad) {\n onLoad(circle);\n }\n return () => {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (centerChangedListener !== null) {\n google.maps.event.removeListener(centerChangedListener);\n }\n if (radiusChangedListener !== null) {\n google.maps.event.removeListener(radiusChangedListener);\n }\n if (onUnmount) {\n onUnmount(circle);\n }\n circle.setMap(null);\n };\n }, []);\n return null;\n}\nconst CircleF = memo(CircleFunctional);\nclass Circle extends PureComponent {\n constructor() {\n super(...arguments);\n this.registeredEvents = [];\n this.state = {\n circle: null,\n };\n this.setCircleCallback = () => {\n if (this.state.circle !== null && this.props.onLoad) {\n this.props.onLoad(this.state.circle);\n }\n };\n }\n componentDidMount() {\n const circle = new google.maps.Circle(Object.assign(Object.assign({}, (this.props.options || {})), { \n // @ts-ignore\n map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$8,\n eventMap: eventMap$8,\n prevProps: {},\n nextProps: this.props,\n instance: circle,\n });\n this.setState(function setCircle() {\n return {\n circle,\n };\n }, this.setCircleCallback);\n }\n componentDidUpdate(prevProps) {\n if (this.state.circle !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$8,\n eventMap: eventMap$8,\n prevProps,\n nextProps: this.props,\n instance: this.state.circle,\n });\n }\n }\n componentWillUnmount() {\n if (this.state.circle !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.circle);\n }\n unregisterEvents(this.registeredEvents);\n this.state.circle && this.state.circle.setMap(null);\n }\n }\n render() {\n return null;\n }\n}\nCircle.contextType = MapContext;\n\nconst eventMap$7 = {\n onClick: 'click',\n onDblClick: 'dblclick',\n onMouseDown: 'mousedown',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n onAddFeature: 'addfeature',\n onRemoveFeature: 'removefeature',\n onRemoveProperty: 'removeproperty',\n onSetGeometry: 'setgeometry',\n onSetProperty: 'setproperty',\n};\nconst updaterMap$7 = {\n add(instance, feature) {\n instance.add(feature);\n },\n addgeojson(instance, geojson, options) {\n instance.addGeoJson(geojson, options);\n },\n contains(instance, feature) {\n instance.contains(feature);\n },\n foreach(instance, callback) {\n instance.forEach(callback);\n },\n loadgeojson(instance, url, options, callback) {\n instance.loadGeoJson(url, options, callback);\n },\n overridestyle(instance, feature, style) {\n instance.overrideStyle(feature, style);\n },\n remove(instance, feature) {\n instance.remove(feature);\n },\n revertstyle(instance, feature) {\n instance.revertStyle(feature);\n },\n controlposition(instance, controlPosition) {\n instance.setControlPosition(controlPosition);\n },\n controls(instance, controls) {\n instance.setControls(controls);\n },\n drawingmode(instance, mode) {\n instance.setDrawingMode(mode);\n },\n map(instance, map) {\n instance.setMap(map);\n },\n style(instance, style) {\n instance.setStyle(style);\n },\n togeojson(instance, callback) {\n instance.toGeoJson(callback);\n },\n};\nfunction DataFunctional({ options, onClick, onDblClick, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onRightClick, onAddFeature, onRemoveFeature, onRemoveProperty, onSetGeometry, onSetProperty, onLoad, onUnmount, }) {\n const map = useContext(MapContext);\n const [instance, setInstance] = useState(null);\n const [dblclickListener, setDblclickListener] = useState(null);\n const [mousedownListener, setMousedownListener] = useState(null);\n const [mousemoveListener, setMousemoveListener] = useState(null);\n const [mouseoutListener, setMouseoutListener] = useState(null);\n const [mouseoverListener, setMouseoverListener] = useState(null);\n const [mouseupListener, setMouseupListener] = useState(null);\n const [rightclickListener, setRightclickListener] = useState(null);\n const [clickListener, setClickListener] = useState(null);\n const [addFeatureListener, setAddFeatureListener] = useState(null);\n const [removeFeatureListener, setRemoveFeatureListener] = useState(null);\n const [removePropertyListener, setRemovePropertyListener] = useState(null);\n const [setGeometryListener, setSetGeometryListener] = useState(null);\n const [setPropertyListener, setSetPropertyListener] = useState(null);\n // Order does matter\n useEffect(() => {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(() => {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(() => {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(() => {\n if (instance && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(instance, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(() => {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(() => {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(() => {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(() => {\n if (instance && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(() => {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(() => {\n if (instance && onAddFeature) {\n if (addFeatureListener !== null) {\n google.maps.event.removeListener(addFeatureListener);\n }\n setAddFeatureListener(google.maps.event.addListener(instance, 'addfeature', onAddFeature));\n }\n }, [onAddFeature]);\n useEffect(() => {\n if (instance && onRemoveFeature) {\n if (removeFeatureListener !== null) {\n google.maps.event.removeListener(removeFeatureListener);\n }\n setRemoveFeatureListener(google.maps.event.addListener(instance, 'removefeature', onRemoveFeature));\n }\n }, [onRemoveFeature]);\n useEffect(() => {\n if (instance && onRemoveProperty) {\n if (removePropertyListener !== null) {\n google.maps.event.removeListener(removePropertyListener);\n }\n setRemovePropertyListener(google.maps.event.addListener(instance, 'removeproperty', onRemoveProperty));\n }\n }, [onRemoveProperty]);\n useEffect(() => {\n if (instance && onSetGeometry) {\n if (setGeometryListener !== null) {\n google.maps.event.removeListener(setGeometryListener);\n }\n setSetGeometryListener(google.maps.event.addListener(instance, 'setgeometry', onSetGeometry));\n }\n }, [onSetGeometry]);\n useEffect(() => {\n if (instance && onSetProperty) {\n if (setPropertyListener !== null) {\n google.maps.event.removeListener(setPropertyListener);\n }\n setSetPropertyListener(google.maps.event.addListener(instance, 'setproperty', onSetProperty));\n }\n }, [onSetProperty]);\n useEffect(() => {\n if (map !== null) {\n const data = new google.maps.Data(Object.assign(Object.assign({}, (options || {})), { map }));\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(data, 'dblclick', onDblClick));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(data, 'mousedown', onMouseDown));\n }\n if (onMouseMove) {\n setMousemoveListener(google.maps.event.addListener(data, 'mousemove', onMouseMove));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(data, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(data, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(data, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightclickListener(google.maps.event.addListener(data, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(data, 'click', onClick));\n }\n if (onAddFeature) {\n setAddFeatureListener(google.maps.event.addListener(data, 'addfeature', onAddFeature));\n }\n if (onRemoveFeature) {\n setRemoveFeatureListener(google.maps.event.addListener(data, 'removefeature', onRemoveFeature));\n }\n if (onRemoveProperty) {\n setRemovePropertyListener(google.maps.event.addListener(data, 'removeproperty', onRemoveProperty));\n }\n if (onSetGeometry) {\n setSetGeometryListener(google.maps.event.addListener(data, 'setgeometry', onSetGeometry));\n }\n if (onSetProperty) {\n setSetPropertyListener(google.maps.event.addListener(data, 'setproperty', onSetProperty));\n }\n setInstance(data);\n if (onLoad) {\n onLoad(data);\n }\n }\n return () => {\n if (instance) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (addFeatureListener !== null) {\n google.maps.event.removeListener(addFeatureListener);\n }\n if (removeFeatureListener !== null) {\n google.maps.event.removeListener(removeFeatureListener);\n }\n if (removePropertyListener !== null) {\n google.maps.event.removeListener(removePropertyListener);\n }\n if (setGeometryListener !== null) {\n google.maps.event.removeListener(setGeometryListener);\n }\n if (setPropertyListener !== null) {\n google.maps.event.removeListener(setPropertyListener);\n }\n if (onUnmount) {\n onUnmount(instance);\n }\n instance.setMap(null);\n }\n };\n }, []);\n return null;\n}\nconst DataF = memo(DataFunctional);\nclass Data extends PureComponent {\n constructor() {\n super(...arguments);\n this.registeredEvents = [];\n this.state = {\n data: null,\n };\n this.setDataCallback = () => {\n if (this.state.data !== null && this.props.onLoad) {\n this.props.onLoad(this.state.data);\n }\n };\n }\n componentDidMount() {\n if (this.context !== null) {\n const data = new google.maps.Data(Object.assign(Object.assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$7,\n eventMap: eventMap$7,\n prevProps: {},\n nextProps: this.props,\n instance: data,\n });\n this.setState(() => {\n return {\n data,\n };\n }, this.setDataCallback);\n }\n }\n componentDidUpdate(prevProps) {\n if (this.state.data !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$7,\n eventMap: eventMap$7,\n prevProps,\n nextProps: this.props,\n instance: this.state.data,\n });\n }\n }\n componentWillUnmount() {\n if (this.state.data !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.data);\n }\n unregisterEvents(this.registeredEvents);\n if (this.state.data) {\n this.state.data.setMap(null);\n }\n }\n }\n render() {\n return null;\n }\n}\nData.contextType = MapContext;\n\nconst eventMap$6 = {\n onClick: 'click',\n onDefaultViewportChanged: 'defaultviewport_changed',\n onStatusChanged: 'status_changed',\n};\nconst updaterMap$6 = {\n options(instance, options) {\n instance.setOptions(options);\n },\n url(instance, url) {\n instance.setUrl(url);\n },\n zIndex(instance, zIndex) {\n instance.setZIndex(zIndex);\n },\n};\nclass KmlLayer extends PureComponent {\n constructor() {\n super(...arguments);\n this.registeredEvents = [];\n this.state = {\n kmlLayer: null,\n };\n this.setKmlLayerCallback = () => {\n if (this.state.kmlLayer !== null && this.props.onLoad) {\n this.props.onLoad(this.state.kmlLayer);\n }\n };\n }\n componentDidMount() {\n const kmlLayer = new google.maps.KmlLayer(Object.assign(Object.assign({}, this.props.options), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$6,\n eventMap: eventMap$6,\n prevProps: {},\n nextProps: this.props,\n instance: kmlLayer,\n });\n this.setState(function setLmlLayer() {\n return {\n kmlLayer,\n };\n }, this.setKmlLayerCallback);\n }\n componentDidUpdate(prevProps) {\n if (this.state.kmlLayer !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$6,\n eventMap: eventMap$6,\n prevProps,\n nextProps: this.props,\n instance: this.state.kmlLayer,\n });\n }\n }\n componentWillUnmount() {\n if (this.state.kmlLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.kmlLayer);\n }\n unregisterEvents(this.registeredEvents);\n this.state.kmlLayer.setMap(null);\n }\n }\n render() {\n return null;\n }\n}\nKmlLayer.contextType = MapContext;\n\nfunction getOffsetOverride(containerElement, getPixelPositionOffset) {\n return typeof getPixelPositionOffset === 'function'\n ? getPixelPositionOffset(containerElement.offsetWidth, containerElement.offsetHeight)\n : {\n x: 0,\n y: 0,\n };\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction createLatLng(inst, Type) { return new Type(inst.lat, inst.lng); }\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction createLatLngBounds(inst, Type) {\n return new Type(new google.maps.LatLng(inst.ne.lat, inst.ne.lng), new google.maps.LatLng(inst.sw.lat, inst.sw.lng));\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction ensureOfType(inst, type, factory) {\n return inst instanceof type ? inst : factory(inst, type);\n}\nfunction ensureOfTypeBounds(inst, type, factory) {\n return inst instanceof type ? inst : factory(inst, type);\n}\nfunction getLayoutStylesByBounds(mapCanvasProjection, offset, bounds) {\n const ne = mapCanvasProjection && mapCanvasProjection.fromLatLngToDivPixel(bounds.getNorthEast());\n const sw = mapCanvasProjection && mapCanvasProjection.fromLatLngToDivPixel(bounds.getSouthWest());\n if (ne && sw) {\n return {\n left: `${sw.x + offset.x}px`,\n top: `${ne.y + offset.y}px`,\n width: `${ne.x - sw.x - offset.x}px`,\n height: `${sw.y - ne.y - offset.y}px`,\n };\n }\n return {\n left: '-9999px',\n top: '-9999px',\n };\n}\nfunction getLayoutStylesByPosition(mapCanvasProjection, offset, position) {\n const point = mapCanvasProjection && mapCanvasProjection.fromLatLngToDivPixel(position);\n if (point) {\n const { x, y } = point;\n return {\n left: `${x + offset.x}px`,\n top: `${y + offset.y}px`,\n };\n }\n return {\n left: '-9999px',\n top: '-9999px',\n };\n}\nfunction getLayoutStyles(mapCanvasProjection, offset, bounds, position) {\n return bounds !== undefined\n ? getLayoutStylesByBounds(mapCanvasProjection, offset, ensureOfTypeBounds(bounds, google.maps.LatLngBounds, createLatLngBounds))\n : getLayoutStylesByPosition(mapCanvasProjection, offset, ensureOfType(position, google.maps.LatLng, createLatLng));\n}\nfunction arePositionsEqual(currentPosition, previousPosition) {\n return currentPosition.left === previousPosition.left\n && currentPosition.top === previousPosition.top\n && currentPosition.width === previousPosition.height\n && currentPosition.height === previousPosition.height;\n}\n\nfunction createOverlay(container, pane, position, getPixelPositionOffset) {\n class Overlay extends google.maps.OverlayView {\n constructor(container, pane, position) {\n super();\n this.container = container;\n this.pane = pane;\n this.position = position;\n }\n onAdd() {\n var _a;\n const pane = (_a = this.getPanes()) === null || _a === void 0 ? void 0 : _a[this.pane];\n pane === null || pane === void 0 ? void 0 : pane.appendChild(this.container);\n }\n draw() {\n const projection = this.getProjection();\n const point = projection.fromLatLngToDivPixel(this.position);\n const offset = Object.assign({}, (this.container\n ? getOffsetOverride(this.container, getPixelPositionOffset)\n : {\n x: 0,\n y: 0,\n }));\n if (point === null) {\n return;\n }\n this.container.style.transform = `translate(${point.x + offset.x}px, ${point.y + offset.y}px)`;\n }\n onRemove() {\n if (this.container.parentNode !== null) {\n this.container.parentNode.removeChild(this.container);\n }\n }\n }\n return new Overlay(container, pane, position);\n}\n\nfunction convertToLatLngString(latLngLike) {\n if (!latLngLike) {\n return '';\n }\n const latLng = latLngLike instanceof google.maps.LatLng\n ? latLngLike\n : new google.maps.LatLng(latLngLike.lat, latLngLike.lng);\n return latLng + '';\n}\nfunction convertToLatLngBoundsString(latLngBoundsLike) {\n if (!latLngBoundsLike) {\n return '';\n }\n const latLngBounds = latLngBoundsLike instanceof google.maps.LatLngBounds\n ? latLngBoundsLike\n : new google.maps.LatLngBounds(new google.maps.LatLng(latLngBoundsLike.south, latLngBoundsLike.east), new google.maps.LatLng(latLngBoundsLike.north, latLngBoundsLike.west));\n return latLngBounds + '';\n}\nconst FLOAT_PANE = `floatPane`;\nconst MAP_PANE = `mapPane`;\nconst MARKER_LAYER = `markerLayer`;\nconst OVERLAY_LAYER = `overlayLayer`;\nconst OVERLAY_MOUSE_TARGET = `overlayMouseTarget`;\nfunction OverlayViewFunctional({ position, mapPaneName, zIndex, onLoad, onUnmount, getPixelPositionOffset, children, }) {\n const map = useContext(MapContext);\n const container = useMemo(() => {\n const div = document.createElement('div');\n div.style.position = 'absolute';\n return div;\n }, []);\n const overlay = useMemo(() => {\n return createOverlay(container, mapPaneName, position, getPixelPositionOffset);\n }, [container, mapPaneName, position]);\n useEffect(() => {\n onLoad === null || onLoad === void 0 ? void 0 : onLoad(overlay);\n overlay === null || overlay === void 0 ? void 0 : overlay.setMap(map);\n return () => {\n onUnmount === null || onUnmount === void 0 ? void 0 : onUnmount(overlay);\n overlay === null || overlay === void 0 ? void 0 : overlay.setMap(null);\n };\n }, [map, overlay]);\n // to move the container to the foreground and background\n useEffect(() => {\n container.style.zIndex = `${zIndex}`;\n }, [zIndex, container]);\n return ReactDOM.createPortal(children, container);\n}\nconst OverlayViewF = memo(OverlayViewFunctional);\nclass OverlayView extends PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n paneEl: null,\n containerStyle: {\n // set initial position\n position: 'absolute',\n },\n };\n this.updatePane = () => {\n const mapPaneName = this.props.mapPaneName;\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#MapPanes\n const mapPanes = this.overlayView.getPanes();\n invariant_1(!!mapPaneName, `OverlayView requires props.mapPaneName but got %s`, mapPaneName);\n if (mapPanes) {\n this.setState({\n paneEl: mapPanes[mapPaneName],\n });\n }\n else {\n this.setState({\n paneEl: null,\n });\n }\n };\n this.onAdd = () => {\n var _a, _b;\n this.updatePane();\n (_b = (_a = this.props).onLoad) === null || _b === void 0 ? void 0 : _b.call(_a, this.overlayView);\n };\n this.onPositionElement = () => {\n const mapCanvasProjection = this.overlayView.getProjection();\n const offset = Object.assign({ x: 0, y: 0 }, (this.containerRef.current\n ? getOffsetOverride(this.containerRef.current, this.props.getPixelPositionOffset)\n : {}));\n const layoutStyles = getLayoutStyles(mapCanvasProjection, offset, this.props.bounds, this.props.position);\n const { left, top, width, height } = this.state.containerStyle;\n if (!arePositionsEqual(layoutStyles, { left, top, width, height })) {\n this.setState({\n containerStyle: Object.assign(Object.assign({}, layoutStyles), { position: 'absolute' }),\n });\n }\n };\n this.draw = () => {\n this.onPositionElement();\n };\n this.onRemove = () => {\n var _a, _b;\n this.setState(() => ({\n paneEl: null,\n }));\n // this.mapPaneEl = null\n (_b = (_a = this.props).onUnmount) === null || _b === void 0 ? void 0 : _b.call(_a, this.overlayView);\n };\n this.containerRef = createRef();\n // You must implement three methods: onAdd(), draw(), and onRemove().\n const overlayView = new google.maps.OverlayView();\n overlayView.onAdd = this.onAdd;\n overlayView.draw = this.draw;\n overlayView.onRemove = this.onRemove;\n this.overlayView = overlayView;\n }\n componentDidMount() {\n // You must call setMap() with a valid Map object to trigger the call to\n // the onAdd() method and setMap(null) in order to trigger the onRemove() method.\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.overlayView.setMap(this.context);\n }\n componentDidUpdate(prevProps) {\n const prevPositionString = convertToLatLngString(prevProps.position);\n const positionString = convertToLatLngString(this.props.position);\n const prevBoundsString = convertToLatLngBoundsString(prevProps.bounds);\n const boundsString = convertToLatLngBoundsString(this.props.bounds);\n if (prevPositionString !== positionString ||\n prevBoundsString !== boundsString) {\n this.overlayView.draw();\n }\n if (prevProps.mapPaneName !== this.props.mapPaneName) {\n this.updatePane();\n }\n }\n componentWillUnmount() {\n this.overlayView.setMap(null);\n }\n render() {\n const paneEl = this.state.paneEl;\n if (paneEl) {\n return ReactDOM.createPortal(jsxRuntime.exports.jsx(\"div\", Object.assign({ ref: this.containerRef, style: this.state.containerStyle }, { children: Children.only(this.props.children) })), paneEl);\n }\n else {\n return null;\n }\n }\n}\nOverlayView.FLOAT_PANE = `floatPane`;\nOverlayView.MAP_PANE = `mapPane`;\nOverlayView.MARKER_LAYER = `markerLayer`;\nOverlayView.OVERLAY_LAYER = `overlayLayer`;\nOverlayView.OVERLAY_MOUSE_TARGET = `overlayMouseTarget`;\nOverlayView.contextType = MapContext;\n\nfunction noop() { return; }\n\nconst eventMap$5 = {\n onDblClick: 'dblclick',\n onClick: 'click',\n};\nconst updaterMap$5 = {\n opacity(instance, opacity) {\n instance.setOpacity(opacity);\n },\n};\nclass GroundOverlay extends PureComponent {\n constructor() {\n super(...arguments);\n this.registeredEvents = [];\n this.state = {\n groundOverlay: null,\n };\n this.setGroundOverlayCallback = () => {\n if (this.state.groundOverlay !== null && this.props.onLoad) {\n this.props.onLoad(this.state.groundOverlay);\n }\n };\n }\n componentDidMount() {\n invariant_1(!!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`);\n const groundOverlay = new google.maps.GroundOverlay(this.props.url, this.props.bounds, Object.assign(Object.assign({}, this.props.options), { \n // @ts-ignore\n map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$5,\n eventMap: eventMap$5,\n prevProps: {},\n nextProps: this.props,\n instance: groundOverlay,\n });\n this.setState(function setGroundOverlay() {\n return {\n groundOverlay,\n };\n }, this.setGroundOverlayCallback);\n }\n componentDidUpdate(prevProps) {\n if (this.state.groundOverlay !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$5,\n eventMap: eventMap$5,\n prevProps,\n nextProps: this.props,\n instance: this.state.groundOverlay,\n });\n }\n }\n componentWillUnmount() {\n if (this.state.groundOverlay) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.groundOverlay);\n }\n this.state.groundOverlay.setMap(null);\n }\n }\n render() {\n return null;\n }\n}\nGroundOverlay.defaultProps = {\n onLoad: noop,\n};\nGroundOverlay.contextType = MapContext;\n\nconst eventMap$4 = {};\nconst updaterMap$4 = {\n data(instance, data) {\n instance.setData(data);\n },\n map(instance, map) {\n instance.setMap(map);\n },\n options(instance, options) {\n instance.setOptions(options);\n },\n};\nclass HeatmapLayer extends PureComponent {\n constructor() {\n super(...arguments);\n this.registeredEvents = [];\n this.state = {\n heatmapLayer: null,\n };\n this.setHeatmapLayerCallback = () => {\n if (this.state.heatmapLayer !== null && this.props.onLoad) {\n this.props.onLoad(this.state.heatmapLayer);\n }\n };\n }\n componentDidMount() {\n invariant_1(!!google.maps.visualization, 'Did you include prop libraries={[\"visualization\"]} to ? %s', google.maps.visualization);\n invariant_1(!!this.props.data, 'data property is required in HeatmapLayer %s', this.props.data);\n const heatmapLayer = new google.maps.visualization.HeatmapLayer(Object.assign(Object.assign({}, (this.props.options || {})), { data: this.props.data, \n // @ts-ignore\n map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$4,\n eventMap: eventMap$4,\n prevProps: {},\n nextProps: this.props,\n instance: heatmapLayer,\n });\n this.setState(function setHeatmapLayer() {\n return {\n heatmapLayer,\n };\n }, this.setHeatmapLayerCallback);\n }\n componentDidUpdate(prevProps) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$4,\n eventMap: eventMap$4,\n prevProps,\n nextProps: this.props,\n instance: this.state.heatmapLayer,\n });\n }\n componentWillUnmount() {\n if (this.state.heatmapLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.heatmapLayer);\n }\n unregisterEvents(this.registeredEvents);\n this.state.heatmapLayer.setMap(null);\n }\n }\n render() {\n return null;\n }\n}\nHeatmapLayer.contextType = MapContext;\n\nconst eventMap$3 = {\n onCloseClick: 'closeclick',\n onPanoChanged: 'pano_changed',\n onPositionChanged: 'position_changed',\n onPovChanged: 'pov_changed',\n onResize: 'resize',\n onStatusChanged: 'status_changed',\n onVisibleChanged: 'visible_changed',\n onZoomChanged: 'zoom_changed',\n};\nconst updaterMap$3 = {\n register(instance, provider, options) {\n instance.registerPanoProvider(provider, options);\n },\n links(instance, links) {\n instance.setLinks(links);\n },\n motionTracking(instance, motionTracking) {\n instance.setMotionTracking(motionTracking);\n },\n options(instance, options) {\n instance.setOptions(options);\n },\n pano(instance, pano) {\n instance.setPano(pano);\n },\n position(instance, position) {\n instance.setPosition(position);\n },\n pov(instance, pov) {\n instance.setPov(pov);\n },\n visible(instance, visible) {\n instance.setVisible(visible);\n },\n zoom(instance, zoom) {\n instance.setZoom(zoom);\n },\n};\nclass StreetViewPanorama extends PureComponent {\n constructor() {\n super(...arguments);\n this.registeredEvents = [];\n this.state = {\n streetViewPanorama: null,\n };\n this.setStreetViewPanoramaCallback = () => {\n if (this.state.streetViewPanorama !== null && this.props.onLoad) {\n this.props.onLoad(this.state.streetViewPanorama);\n }\n };\n }\n componentDidMount() {\n // @ts-ignore\n const streetViewPanorama = this.context.getStreetView();\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$3,\n eventMap: eventMap$3,\n prevProps: {},\n nextProps: this.props,\n instance: streetViewPanorama,\n });\n this.setState(() => {\n return {\n streetViewPanorama,\n };\n }, this.setStreetViewPanoramaCallback);\n }\n componentDidUpdate(prevProps) {\n if (this.state.streetViewPanorama !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$3,\n eventMap: eventMap$3,\n prevProps,\n nextProps: this.props,\n instance: this.state.streetViewPanorama,\n });\n }\n }\n componentWillUnmount() {\n if (this.state.streetViewPanorama !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.streetViewPanorama);\n }\n unregisterEvents(this.registeredEvents);\n this.state.streetViewPanorama.setVisible(false);\n }\n }\n render() {\n return null;\n }\n}\nStreetViewPanorama.contextType = MapContext;\n\nclass StreetViewService extends PureComponent {\n constructor() {\n super(...arguments);\n this.state = {\n streetViewService: null,\n };\n this.setStreetViewServiceCallback = () => {\n if (this.state.streetViewService !== null && this.props.onLoad) {\n this.props.onLoad(this.state.streetViewService);\n }\n };\n }\n componentDidMount() {\n const streetViewService = new google.maps.StreetViewService();\n this.setState(function setStreetViewService() {\n return {\n streetViewService,\n };\n }, this.setStreetViewServiceCallback);\n }\n componentWillUnmount() {\n if (this.state.streetViewService !== null && this.props.onUnmount) {\n this.props.onUnmount(this.state.streetViewService);\n }\n }\n render() {\n return null;\n }\n}\nStreetViewService.contextType = MapContext;\n\nclass DirectionsService extends require$$0.PureComponent {\n constructor() {\n super(...arguments);\n this.state = {\n directionsService: null,\n };\n this.setDirectionsServiceCallback = () => {\n if (this.state.directionsService !== null && this.props.onLoad) {\n this.props.onLoad(this.state.directionsService);\n }\n };\n }\n componentDidMount() {\n invariant_1(!!this.props.options, 'DirectionsService expected options object as parameter, but got %s', this.props.options);\n const directionsService = new google.maps.DirectionsService();\n this.setState(function setDirectionsService() {\n return {\n directionsService,\n };\n }, this.setDirectionsServiceCallback);\n }\n componentDidUpdate() {\n if (this.state.directionsService !== null) {\n this.state.directionsService.route(this.props.options, this.props.callback);\n }\n }\n componentWillUnmount() {\n if (this.state.directionsService !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.directionsService);\n }\n }\n }\n render() {\n return null;\n }\n}\n\nconst eventMap$2 = {\n onDirectionsChanged: 'directions_changed',\n};\nconst updaterMap$2 = {\n directions(instance, directions) {\n instance.setDirections(directions);\n },\n map(instance, map) {\n instance.setMap(map);\n },\n options(instance, options) {\n instance.setOptions(options);\n },\n panel(instance, panel) {\n instance.setPanel(panel);\n },\n routeIndex(instance, routeIndex) {\n instance.setRouteIndex(routeIndex);\n },\n};\nclass DirectionsRenderer extends PureComponent {\n constructor() {\n super(...arguments);\n this.registeredEvents = [];\n this.state = {\n directionsRenderer: null,\n };\n this.setDirectionsRendererCallback = () => {\n if (this.state.directionsRenderer !== null) {\n // @ts-ignore\n this.state.directionsRenderer.setMap(this.context);\n if (this.props.onLoad) {\n this.props.onLoad(this.state.directionsRenderer);\n }\n }\n };\n }\n componentDidMount() {\n const directionsRenderer = new google.maps.DirectionsRenderer(this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$2,\n eventMap: eventMap$2,\n prevProps: {},\n nextProps: this.props,\n instance: directionsRenderer,\n });\n this.setState(function setDirectionsRenderer() {\n return {\n directionsRenderer,\n };\n }, this.setDirectionsRendererCallback);\n }\n componentDidUpdate(prevProps) {\n if (this.state.directionsRenderer !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$2,\n eventMap: eventMap$2,\n prevProps,\n nextProps: this.props,\n instance: this.state.directionsRenderer,\n });\n }\n }\n componentWillUnmount() {\n if (this.state.directionsRenderer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.directionsRenderer);\n }\n unregisterEvents(this.registeredEvents);\n if (this.state.directionsRenderer) {\n this.state.directionsRenderer.setMap(null);\n }\n }\n }\n render() {\n return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment, {});\n }\n}\nDirectionsRenderer.contextType = MapContext;\n\nclass DistanceMatrixService extends require$$0.PureComponent {\n constructor() {\n super(...arguments);\n this.state = {\n distanceMatrixService: null,\n };\n this.setDistanceMatrixServiceCallback = () => {\n if (this.state.distanceMatrixService !== null && this.props.onLoad) {\n this.props.onLoad(this.state.distanceMatrixService);\n }\n };\n }\n componentDidMount() {\n invariant_1(!!this.props.options, 'DistanceMatrixService expected options object as parameter, but go %s', this.props.options);\n const distanceMatrixService = new google.maps.DistanceMatrixService();\n this.setState(function setDistanceMatrixService() {\n return {\n distanceMatrixService,\n };\n }, this.setDistanceMatrixServiceCallback);\n }\n componentDidUpdate() {\n if (this.state.distanceMatrixService !== null) {\n this.state.distanceMatrixService.getDistanceMatrix(this.props.options, this.props.callback);\n }\n }\n componentWillUnmount() {\n if (this.state.distanceMatrixService !== null && this.props.onUnmount) {\n this.props.onUnmount(this.state.distanceMatrixService);\n }\n }\n render() {\n return null;\n }\n}\n\nconst eventMap$1 = {\n onPlacesChanged: 'places_changed',\n};\nconst updaterMap$1 = {\n bounds(instance, bounds) {\n instance.setBounds(bounds);\n },\n};\nclass StandaloneSearchBox extends PureComponent {\n constructor() {\n super(...arguments);\n this.registeredEvents = [];\n this.containerElement = createRef();\n this.state = {\n searchBox: null,\n };\n this.setSearchBoxCallback = () => {\n if (this.state.searchBox !== null && this.props.onLoad) {\n this.props.onLoad(this.state.searchBox);\n }\n };\n }\n componentDidMount() {\n invariant_1(!!google.maps.places, 'You need to provide libraries={[\"places\"]} prop to component %s', google.maps.places);\n if (this.containerElement !== null && this.containerElement.current !== null) {\n const input = this.containerElement.current.querySelector('input');\n if (input !== null) {\n const searchBox = new google.maps.places.SearchBox(input, this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$1,\n eventMap: eventMap$1,\n prevProps: {},\n nextProps: this.props,\n instance: searchBox,\n });\n this.setState(function setSearchBox() {\n return {\n searchBox,\n };\n }, this.setSearchBoxCallback);\n }\n }\n }\n componentDidUpdate(prevProps) {\n if (this.state.searchBox !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$1,\n eventMap: eventMap$1,\n prevProps,\n nextProps: this.props,\n instance: this.state.searchBox,\n });\n }\n }\n componentWillUnmount() {\n if (this.state.searchBox !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.searchBox);\n }\n unregisterEvents(this.registeredEvents);\n }\n }\n render() {\n return jsxRuntime.exports.jsx(\"div\", Object.assign({ ref: this.containerElement }, { children: Children.only(this.props.children) }));\n }\n}\nStandaloneSearchBox.contextType = MapContext;\n\nconst eventMap = {\n onPlaceChanged: 'place_changed',\n};\nconst updaterMap = {\n bounds(instance, bounds) {\n instance.setBounds(bounds);\n },\n restrictions(instance, restrictions) {\n instance.setComponentRestrictions(restrictions);\n },\n fields(instance, fields) {\n instance.setFields(fields);\n },\n options(instance, options) {\n instance.setOptions(options);\n },\n types(instance, types) {\n instance.setTypes(types);\n },\n};\nclass Autocomplete extends PureComponent {\n constructor() {\n super(...arguments);\n this.registeredEvents = [];\n this.containerElement = createRef();\n this.state = {\n autocomplete: null,\n };\n this.setAutocompleteCallback = () => {\n if (this.state.autocomplete !== null && this.props.onLoad) {\n this.props.onLoad(this.state.autocomplete);\n }\n };\n }\n componentDidMount() {\n invariant_1(!!google.maps.places, 'You need to provide libraries={[\"places\"]} prop to component %s', google.maps.places);\n // TODO: why current could be equal null?\n // @ts-ignore\n const input = this.containerElement.current.querySelector('input');\n if (input) {\n const autocomplete = new google.maps.places.Autocomplete(input, this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: autocomplete,\n });\n this.setState(() => {\n return {\n autocomplete,\n };\n }, this.setAutocompleteCallback);\n }\n }\n componentDidUpdate(prevProps) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap,\n eventMap,\n prevProps,\n nextProps: this.props,\n instance: this.state.autocomplete,\n });\n }\n componentWillUnmount() {\n if (this.state.autocomplete !== null) {\n unregisterEvents(this.registeredEvents);\n }\n }\n render() {\n return jsxRuntime.exports.jsx(\"div\", Object.assign({ ref: this.containerElement, className: this.props.className }, { children: Children.only(this.props.children) }));\n }\n}\nAutocomplete.defaultProps = {\n className: ''\n};\nAutocomplete.contextType = MapContext;\n\nexport { Autocomplete, BicyclingLayer, BicyclingLayerF, Circle, CircleF, Data, DataF, DirectionsRenderer, DirectionsService, DistanceMatrixService, DrawingManager, DrawingManagerF, FLOAT_PANE, GoogleMap, index_esm as GoogleMapsMarkerClusterer, GoogleMarkerClusterer$1 as GoogleMarkerClusterer, GroundOverlay, HeatmapLayer, InfoBoxComponent as InfoBox, InfoBoxF, InfoWindow, InfoWindowF, KmlLayer, LoadScript, LoadScriptNext$1 as LoadScriptNext, MAP_PANE, MARKER_LAYER, MapContext, Marker, ClustererComponent as MarkerClusterer, MarkerF, OVERLAY_LAYER, OVERLAY_MOUSE_TARGET, OverlayView, OverlayViewF, Polygon, PolygonF, Polyline, PolylineF, Rectangle, RectangleF, StandaloneSearchBox, StreetViewPanorama, StreetViewService, TrafficLayer, TrafficLayerF, TransitLayer, TransitLayerF, useGoogleMap, useJsApiLoader, useLoadScript };\n//# sourceMappingURL=esm.js.map\n","/*! js-cookie v3.0.1 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (key, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n key = encodeURIComponent(key)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n key + '=' + converter.write(value, key) + stringifiedAttributes)\n }\n\n function get (key) {\n if (typeof document === 'undefined' || (arguments.length && !key)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var foundKey = decodeURIComponent(parts[0]);\n jar[foundKey] = converter.read(value, foundKey);\n\n if (key === foundKey) {\n break\n }\n } catch (e) {}\n }\n\n return key ? jar[key] : jar\n }\n\n return Object.create(\n {\n set: set,\n get: get,\n remove: function (key, attributes) {\n set(\n key,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport default api;\n"],"names":["t","nodeType","e","n","clientHeight","scrollHeight","clientWidth","scrollWidth","r","getComputedStyle","overflowY","overflowX","ownerDocument","defaultView","frameElement","i","o","l","d","__assign","Object","assign","s","arguments","length","p","prototype","hasOwnProperty","call","apply","this","create","idCounter","cbToCb","cb","noop","scrollIntoView","node","menuNode","actions","window","scrollMode","block","u","inline","h","boundary","a","skipOverflowHiddenElements","c","TypeError","f","document","scrollingElement","documentElement","parentElement","push","body","m","visualViewport","width","innerWidth","g","height","innerHeight","w","scrollX","pageXOffset","v","scrollY","pageYOffset","W","getBoundingClientRect","b","H","y","top","E","right","M","bottom","V","left","x","I","C","T","k","B","D","O","R","X","Y","L","S","j","parseInt","borderLeftWidth","q","borderTopWidth","z","borderRightWidth","A","borderBottomWidth","F","G","J","offsetWidth","K","offsetHeight","Math","max","N","scrollLeft","P","scrollTop","min","el","forEach","_ref","isOrContainsNode","parent","child","environment","Node","contains","debounce","fn","time","timeoutId","cancel","clearTimeout","wrapper","_len","args","Array","_key","setTimeout","callAllEventHandlers","_len2","fns","_key2","event","_len3","_key3","some","preventDownshiftDefault","nativeEvent","handleRefs","_len4","refs","_key4","ref","current","getA11yStatusMessage$1","_ref2","isOpen","resultCount","previousResultCount","unwrapArray","arg","defaultValue","isArray","stateKeys","pickState","state","result","isControlledProp","props","key","undefined","normalizeArrowKey","keyCode","indexOf","getNextWrappingIndex","moveAmount","baseIndex","itemCount","getItemNodeFromIndex","circular","itemsLastIndex","newIndex","nonDisabledNewIndex","getNextNonDisabledIndex","currentElementNode","hasAttribute","index","targetWithinDownshift","target","downshiftElements","checkActiveElement","contextNode","activeElement","cleanupStatus","documentProp","getStatusDiv","textContent","setStatus","status","div","statusDiv","getElementById","createElement","setAttribute","style","border","clip","margin","overflow","padding","position","appendChild","stateChangeTypes$3","freeze","__proto__","unknown","mouseUp","itemMouseEnter","keyDownArrowUp","keyDownArrowDown","keyDownEscape","keyDownEnter","keyDownHome","keyDownEnd","clickItem","blurInput","changeInput","keyDownSpaceButton","clickButton","blurButton","controlledPropUpdatedSelectedItem","touchEnd","Downshift$1","Downshift","Component","constructor","_props","_this","super","id","String","menuId","labelId","inputId","getItemId","input","items","timeoutIds","internalSetTimeout","filter","setItemCount","count","unsetItemCount","setHighlightedIndex","highlightedIndex","otherStateToSet","defaultHighlightedIndex","internalSetState","clearSelection","selectedItem","inputValue","defaultIsOpen","selectItem","item","itemToString","selectItemAtIndex","itemIndex","selectHighlightedItem","getState","stateToSet","isItemSelected","onChangeArg","onStateChangeArg","isStateToSetFunction","onInputValueChange","getStateAndHelpers","setState","newStateToSet","stateReducer","nextState","type","keys","onStateChange","onSelect","onChange","onUserAction","rootRef","_rootNode","getRootProps","_temp","_temp2","refKey","rest","suppressRefError","called","role","keyDownHandlers","ArrowDown","preventDefault","amount","shiftKey","moveHighlightedIndex","getItemCount","nextHighlightedIndex","ArrowUp","Enter","which","itemNode","Escape","reset","buttonKeyDownHandlers","toggleMenu","inputKeyDownHandlers","Home","newHighlightedIndex","End","getToggleButtonProps","_temp3","onClick","onPress","onKeyDown","onKeyUp","onBlur","enabledEventHandlers","buttonHandleClick","buttonHandleKeyDown","buttonHandleKeyUp","buttonHandleBlur","disabled","focus","blurTarget","isMouseDown","getLabelProps","htmlFor","getInputProps","_temp4","onChangeKey","onInput","onChangeText","eventHandlers","inputHandleChange","inputHandleKeyDown","inputHandleBlur","autoComplete","value","downshiftButtonIsActive","dataset","toggle","menuRef","_menuNode","getMenuProps","_temp5","_temp6","getItemProps","_temp7","onMouseMove","onMouseDown","customClickHandler","avoidScrolling","clearItems","openMenu","closeMenu","updateStatus","getA11yStatusMessage","highlightedItem","initialHighlightedIndex","_highlightedIndex","initialIsOpen","_isOpen","initialInputValue","_inputValue","initialSelectedItem","_selectedItem","_state","internalClearTimeouts","stateToMerge","reduce","prevState","scrollHighlightedItemIntoView","componentDidMount","onMouseUp","onOuterClick","onTouchStart","isTouchMove","onTouchMove","onTouchEnd","contextWithinDownshift","addEventListener","cleanup","removeEventListener","shouldScroll","prevProps","currentHighlightedIndex","prevHighlightedIndex","componentDidUpdate","selectedItemChanged","componentWillUnmount","render","children","element","isDOMElement","cloneElement","getElementProps","defaultProps","prevItem","stateChangeTypes","getA11yMessage","useLayoutEffect","useEffect","defaultProps$3","changes","getA11ySelectionMessage","selectionParameters","itemToStringLocal","_a","concat","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","module","exports","shim","propName","componentName","location","propFullName","secret","err","Error","name","getShim","isRequired","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","elementType","instanceOf","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","Symbol","for","hasRequiredReactJsxRuntime_production_min","jsxRuntime","globalThis","global","self","reactJsxRuntime_production_min","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","__self","__source","$$typeof","_owner","Fragment","jsx","jsxs","requireReactJsxRuntime_production_min","invariant_1","condition","format","error","argIndex","replace","framesToPop","MapContext","createContext","unregisterEvent","registered","google","maps","removeListener","unregisterEvents","events","applyUpdatersToPropsAndRegisterEvents","updaterMap","eventMap","nextProps","instance","registeredEvents","registeredList","obj","acc","googleEventName","onEventName","addListener","newAcc","registerEvents","map","nextValue","applyUpdaterToNextProps","eventMap$i","onDblClick","onDragEnd","onDragStart","onMapTypeIdChanged","onMouseOut","onMouseOver","onRightClick","onTilesLoaded","onBoundsChanged","onCenterChanged","onDrag","onHeadingChanged","onIdle","onProjectionChanged","onResize","onTiltChanged","onZoomChanged","updaterMap$i","extraMapTypes","extra","it","mapTypes","set","center","setCenter","clickableIcons","clickable","setClickableIcons","heading","setHeading","mapTypeId","setMapTypeId","options","setOptions","streetView","setStreetView","tilt","setTilt","zoom","setZoom","memo","mapContainerStyle","mapContainerClassName","onLoad","onUnmount","setMap","useState","useRef","centerChangedListener","setCenterChangedListener","dblclickListener","setDblclickListener","dragendListener","setDragendListener","dragstartListener","setDragstartListener","mousedownListener","setMousedownListener","mousemoveListener","setMousemoveListener","mouseoutListener","setMouseoutListener","mouseoverListener","setMouseoverListener","mouseupListener","setMouseupListener","rightclickListener","setRightclickListener","clickListener","setClickListener","dragListener","setDragListener","Map","className","Provider","GoogleMap","PureComponent","mapRef","getInstance","panTo","latLng","setMapCallback","getRef","__rest$1","getOwnPropertySymbols","propertyIsEnumerable","isBrowser","injectScript","url","nonce","Promise","resolve","reject","existingScript","windowWithGoogleMap","dataStateAttribute","getAttribute","src","originalInitMap","initMap","originalErrorCallback","onerror","remove","script","async","head","catch","console","isGoogleFontStyle","href","tagName","toLowerCase","styleSheet","cssText","innerHTML","preventGoogleFonts","getElementsByTagName","trueInsertBefore","insertBefore","bind","newElement","referenceElement","Reflect","trueAppend","textNode","makeLoadScriptUrl","googleMapsApiKey","googleMapsClientId","version","language","region","libraries","channel","mapIds","authReferrerPolicy","params","sort","join","cleaningUp","DefaultLoadingElement","defaultLoadScriptProps","LoadScript","check","createRef","loaded","cleanupCallback","isCleaningUp","__awaiter","thisArg","_arguments","generator","timer","setInterval","clearInterval","fulfilled","step","next","rejected","done","then","parentNode","removeChild","slice","includes","link","innerText","preventGoogleFontsLoading","onError","warn","timeoutCallback","loadingElement","previouslyLoadedUrl","defaultLoadingElement","hookOptions","isLoaded","loadError","isMounted","setLoaded","setLoadError","setLoadedIfMounted","prevLibraries","useLoadScript","fastDeepEqual$1","equal","RegExp","source","flags","valueOf","toString","DEFAULT_ID","LoaderStatus","Loader","apiKey","client","retries","CALLBACK","callbacks","loading","errors","JSON","stringify","FAILURE","SUCCESS","LOADING","INITIALIZED","failed","createUrl","deleteScript","load","loadPromise","loadCallback","execute","setScript","callback","loadErrorCallback","defer","onerrorEvent","resetIfRetryingFailed","delay","pow","log","setCallback","__googleMapsCallback","useJsApiLoader","loader","useMemo","eventMap$h","updaterMap$h","useContext","setInstance","trafficLayer","TrafficLayer","setTrafficLayerCallback","context","contextType","bicyclingLayer","BicyclingLayer","setBicyclingLayerCallback","transitLayer","TransitLayer","setTransitLayerCallback","eventMap$g","onCircleComplete","onMarkerComplete","onOverlayComplete","onPolygonComplete","onPolylineComplete","onRectangleComplete","updaterMap$g","drawingMode","setDrawingMode","circlecompleteListener","setCircleCompleteListener","markercompleteListener","setMarkerCompleteListener","overlaycompleteListener","setOverlayCompleteListener","polygoncompleteListener","setPolygonCompleteListener","polylinecompleteListener","setPolylineCompleteListener","rectanglecompleteListener","setRectangleCompleteListener","drawing","drawingManager","DrawingManager","setDrawingManagerCallback","eventMap$f","onAnimationChanged","onClickableChanged","onCursorChanged","onDraggableChanged","onFlatChanged","onIconChanged","onPositionChanged","onShapeChanged","onTitleChanged","onVisibleChanged","onZindexChanged","updaterMap$f","animation","setAnimation","setClickable","cursor","setCursor","draggable","setDraggable","icon","setIcon","label","setLabel","opacity","setOpacity","setPosition","setShape","title","setTitle","visible","setVisible","zIndex","setZIndex","defaultOptions$4","clusterer","noClustererRedraw","clickableChangedListener","setClickableChangedListener","cursorChangedListener","setCursorChangedListener","animationChangedListener","setAnimationChangedListener","draggableChangedListener","setDraggableChangedListener","flatChangedListener","setFlatChangedListener","iconChangedListener","setIconChangedListener","positionChangedListener","setPositionChangedListener","shapeChangedListener","setShapeChangedListener","titleChangedListener","setTitleChangedListener","visibleChangedListener","setVisibleChangedListener","zIndexChangedListener","setZindexChangedListener","markerOptions","marker","Marker","addMarker","removeMarker","chx","Children","isValidElement","elementChild","anchor","ClusterIcon","cluster","styles","getClusterer","extend","OverlayView","clusterClassName","getClusterClass","sums","boundsChangedListener","anchorText","anchorIcon","textColor","textSize","textDecoration","fontWeight","fontStyle","fontFamily","backgroundPosition","cMouseDownInCluster","cDraggingMapByCluster","timeOut","getMap","onAdd","onRemove","draw","hide","show","useStyle","getPosFromLatLng","markerClusterer_1","trigger","getZoomOnClick","maxZoom_1","getMaxZoom","bounds_1","getBounds","fitBounds","getZoom","cancelBubble","stopPropagation","getPanes","overlayMouseTarget","pos","display","_b","_c","_d","divTitle","getTitle","bp","split","spriteH","spriteV","img","alt","enableRetinaIcons","textElm","text","html","getStyles","latlng","getProjection","fromLatLngToDivPixel","Cluster$1","Cluster","markerClusterer","gridSize","getGridSize","minClusterSize","getMinimumClusterSize","averageCenter","getAverageCenter","markers","bounds","clusterIcon","getSize","getMarkers","getCenter","isMarkerInClusterBounds","calculateBounds","updateIcon","isMarkerAlreadyAdded","LatLngBounds","getPosition","length_1","LatLng","lat","lng","isAdded","mCount","maxZoom","getExtendedBounds","getCalculator","CALCULATOR","numStyles","numberOfDigits","IMAGE_SIZES","Clusterer","optMarkers","optOptions","setMinimumClusterSize","getEnableRetinaIcons","setEnableRetinaIcons","addToClosestCluster","getImageExtension","setImageExtension","setAverageCenter","getTotalClusters","fitMapToMarkers","getIgnoreHidden","setIgnoreHidden","setClusterClass","getTotalMarkers","setZoomOnClick","getBatchSizeIE","setBatchSizeIE","createClusters","getImageSizes","setImageSizes","setCalculator","removeMarkers","resetViewport","getImagePath","setImagePath","pushMarkerTo","clearMarkers","setupStyles","setGridSize","getClusters","setMaxZoom","addMarkers","setStyles","repaint","redraw","clusters","listeners","activeMap","ready","minimumClusterSize","zoomOnClick","ignoreHidden","imagePath","imageExtension","imageSizes","calculator","batchSize","batchSizeIE","clusterClass","navigator","userAgent","timerRefStatic","get","optNoDraw","getDraggable","removeMarker_","splice","removed","oldClusters","projection","trPix","getNorthEast","blPix","getSouthWest","point1","fromDivPixelToLatLng","point2","optHide","distanceBetweenPoints","p1","p2","dLat","PI","dLon","sin","cos","atan2","sqrt","isMarkerInBounds","distance","clusterToAddTo","iFirst","mapBounds","extendedMapBounds","iLast","getVisible","obj1","obj2","property","eventMap$e","onClusteringBegin","onClusteringEnd","updaterMap$e","ClustererComponent","setClustererCallback","cancelHandler","InfoBox","getCloseClickHandler","closeClickHandler","createInfoBoxDiv","addClickHandler","getCloseBoxImg","getBoxWidths","setBoxStyle","setContent","getContent","getZIndex","panBox","close","open","content","disableAutoPan","maxWidth","pixelOffset","Size","boxClass","boxStyle","closeBoxMargin","closeBoxURL","infoBoxClearance","isHidden","alignBottom","pane","enableEventPropagation","closeListener","moveListener","mapListener","contextListener","eventListeners","fixedWidthSet","panes","bw","returnValue","firstChild","disablePan","xOffset","yOffset","mapDiv","getDiv","mapWidth","mapHeight","iwOffsetX","iwOffsetY","iwWidth","iwHeight","padX","padY","pixPosition","fromLatLngToContainerPixel","panBy","webkitTransform","parseFloat","msFilter","visibility","computedStyle","currentStyle","isVisible","eventMap$d","onCloseClick","onContentChanged","onDomReady","updaterMap$d","defaultOptions$3","closeclickListener","setCloseClickListener","domreadyclickListener","setDomReadyClickListener","contentchangedclickListener","setContentChangedClickListener","positionchangedclickListener","setPositionChangedClickListener","zindexchangedclickListener","setZindexChangedClickListener","containerElementRef","positionLatLng","infoBoxOptions","infoBox","createPortal","InfoBoxComponent","containerElement","setInfoBoxCallback","fastDeepEqual","kdbush","sortKD","ids","coords","nodeSize","depth","select","inc","exp","sd","floor","swapItem","swap","arr","tmp","sqDist","ax","ay","bx","by","dx","dy","defaultGetX","defaultGetY","KDBush","points","getX","getY","ArrayType","Float64Array","IndexArrayType","Uint16Array","Uint32Array","range","minX","minY","maxX","maxY","stack","axis","pop","nextAxis","within","qx","qy","r2","factory","defaultOptions$2","minZoom","minPoints","radius","extent","generateId","fround","Float32Array","Supercluster","extend$1","trees","timerId","geometry","createPointCluster","timeEnd","now","Date","_cluster","bbox","minLng","minLat","maxLng","maxLat","easternHem","westernHem","tree","_limitZoom","lngX","latY","numPoints","getClusterJSON","getChildren","clusterId","originId","_getOriginId","originZoom","_getOriginZoom","errorMsg","origin","parentId","getLeaves","limit","offset","leaves","_appendLeaves","getTile","z2","tile","features","_addTileFeatures","getClusterExpansionZoom","expansionZoom","properties","cluster_id","skipped","point_count","isCluster","tags","px","py","getClusterProperties","coordinates","round","neighborIds","numPointsOrigin","neighborId","wx","wy","clusterProperties","_map","numPoints2","createCluster","point","clone","original","Infinity","yLat","abbrev","point_count_abbreviated","y2","atan","dest","_position","delete","noop$1","SuperClusterAlgorithm","__rest","superCluster","calculate","changed","transformCluster","leaf","ClusterStats","sum","clusterMarkerCounts","clusterMarkerSum","mean","DefaultRenderer","stats","color","svg","btoa","scaledSize","fontSize","Number","MAX_ZINDEX","OverlayViewSafe","type1","type2","MarkerClustererEvents","defaultOnClusterClickHandler","_","MarkerClusterer","algorithm","renderer","onClusterClick","noDraw","CLUSTERING_BEGIN","mapCanvasProjection","renderClusters","CLUSTERING_END","idleListener","CLUSTER_CLICK","useGoogleMap","setMarkerClusterer","markerCluster","useGoogleMarkerClusterer","eventMap$c","updaterMap$c","infoWindow","InfoWindow","setInfoWindowCallback","eventMap$b","updaterMap$b","editable","setEditable","path","setPath","defaultOptions$1","polyline","Polyline","setPolylineCallback","eventMap$a","updaterMap$a","paths","setPaths","polygon","Polygon","setPolygonCallback","eventMap$9","updaterMap$9","setBounds","setBoundsChangedListener","rectangle","Rectangle","setRectangleCallback","eventMap$8","onRadiusChanged","updaterMap$8","setRadius","defaultOptions","radiusChangedListener","setRadiusChangedListener","circle","Circle","setCircleCallback","eventMap$7","onAddFeature","onRemoveFeature","onRemoveProperty","onSetGeometry","onSetProperty","updaterMap$7","add","feature","addgeojson","geojson","addGeoJson","foreach","loadgeojson","loadGeoJson","overridestyle","overrideStyle","revertstyle","revertStyle","controlposition","controlPosition","setControlPosition","controls","setControls","drawingmode","mode","setStyle","togeojson","toGeoJson","addFeatureListener","setAddFeatureListener","removeFeatureListener","setRemoveFeatureListener","removePropertyListener","setRemovePropertyListener","setGeometryListener","setSetGeometryListener","setPropertyListener","setSetPropertyListener","data","Data","setDataCallback","eventMap$6","onDefaultViewportChanged","onStatusChanged","updaterMap$6","setUrl","KmlLayer","kmlLayer","setKmlLayerCallback","getOffsetOverride","getPixelPositionOffset","createLatLng","inst","Type","createLatLngBounds","ne","sw","convertToLatLngString","latLngLike","convertToLatLngBoundsString","latLngBoundsLike","south","east","north","west","mapPaneName","container","overlay","Overlay","transform","createOverlay","paneEl","containerStyle","updatePane","mapPanes","overlayView","onPositionElement","layoutStyles","containerRef","getLayoutStylesByBounds","getLayoutStylesByPosition","ensureOfType","currentPosition","previousPosition","prevPositionString","positionString","prevBoundsString","boundsString","FLOAT_PANE","MAP_PANE","MARKER_LAYER","OVERLAY_LAYER","OVERLAY_MOUSE_TARGET","eventMap$5","updaterMap$5","GroundOverlay","groundOverlay","setGroundOverlayCallback","eventMap$4","updaterMap$4","setData","HeatmapLayer","heatmapLayer","setHeatmapLayerCallback","visualization","eventMap$3","onPanoChanged","onPovChanged","updaterMap$3","register","provider","registerPanoProvider","links","setLinks","motionTracking","setMotionTracking","pano","setPano","pov","setPov","StreetViewPanorama","streetViewPanorama","setStreetViewPanoramaCallback","getStreetView","StreetViewService","streetViewService","setStreetViewServiceCallback","eventMap$2","onDirectionsChanged","updaterMap$2","directions","setDirections","panel","setPanel","routeIndex","setRouteIndex","DirectionsRenderer","directionsRenderer","setDirectionsRendererCallback","eventMap$1","onPlacesChanged","updaterMap$1","StandaloneSearchBox","searchBox","setSearchBoxCallback","places","querySelector","SearchBox","onPlaceChanged","restrictions","setComponentRestrictions","fields","setFields","types","setTypes","Autocomplete","autocomplete","setAutocompleteCallback","init","converter","defaultAttributes","attributes","expires","toUTCString","encodeURIComponent","decodeURIComponent","escape","stringifiedAttributes","attributeName","cookie","write","cookies","jar","parts","foundKey","read","withAttributes","withConverter"],"sourceRoot":""}