@googlemaps/markerclusterer
Advanced tools
Comparing version 2.1.3 to 2.1.4
@@ -18,2 +18,3 @@ /** | ||
import { Cluster } from "../cluster"; | ||
import { Marker } from "../marker-utils"; | ||
export interface AlgorithmInput { | ||
@@ -70,3 +71,3 @@ /** | ||
* if (shouldBypassClustering(map)) { | ||
* return this.noop({markers, map}) | ||
* return this.noop({markers}) | ||
* } | ||
@@ -76,3 +77,3 @@ * } | ||
*/ | ||
protected noop({ markers }: AlgorithmInput): Cluster[]; | ||
protected noop<T extends Pick<AlgorithmInput, "markers">>({ markers, }: T): Cluster[]; | ||
/** | ||
@@ -79,0 +80,0 @@ * Calculates an array of {@link Cluster}. Calculate is separate from |
@@ -19,2 +19,3 @@ /** | ||
import { Cluster } from "../cluster"; | ||
import { Marker } from "../marker-utils"; | ||
export interface GridOptions extends ViewportAlgorithmOptions { | ||
@@ -21,0 +22,0 @@ gridSize?: number; |
@@ -18,2 +18,3 @@ /** | ||
import SuperCluster, { ClusterFeature } from "supercluster"; | ||
import { Marker } from "../marker-utils"; | ||
import { Cluster } from "../cluster"; | ||
@@ -35,3 +36,3 @@ export type SuperClusterOptions = SuperCluster.Options<{ | ||
protected state: { | ||
zoom: number; | ||
zoom: number | null; | ||
}; | ||
@@ -38,0 +39,0 @@ constructor({ maxZoom, radius, ...options }: SuperClusterOptions); |
@@ -17,8 +17,20 @@ /** | ||
/// <reference types="google.maps" /> | ||
export declare const filterMarkersToPaddedViewport: (map: google.maps.Map, mapCanvasProjection: google.maps.MapCanvasProjection, markers: Marker[], viewportPadding: number) => Marker[]; | ||
import { Marker } from "../marker-utils"; | ||
/** | ||
* Extends a bounds by a number of pixels in each direction. | ||
* Returns the markers visible in a padded map viewport | ||
* | ||
* @param map | ||
* @param mapCanvasProjection | ||
* @param markers The list of marker to filter | ||
* @param viewportPaddingPixels The padding in pixel | ||
* @returns The list of markers in the padded viewport | ||
*/ | ||
export declare const extendBoundsToPaddedViewport: (bounds: google.maps.LatLngBounds, projection: google.maps.MapCanvasProjection, pixels: number) => google.maps.LatLngBounds; | ||
export declare const filterMarkersToPaddedViewport: (map: google.maps.Map, mapCanvasProjection: google.maps.MapCanvasProjection, markers: Marker[], viewportPaddingPixels: number) => Marker[]; | ||
/** | ||
* Extends a bounds by a number of pixels in each direction | ||
*/ | ||
export declare const extendBoundsToPaddedViewport: (bounds: google.maps.LatLngBounds, projection: google.maps.MapCanvasProjection, numPixels: number) => google.maps.LatLngBounds; | ||
/** | ||
* Returns the distance between 2 positions. | ||
* | ||
* @hidden | ||
@@ -32,5 +44,7 @@ */ | ||
/** | ||
* Extends a pixel bounds by numPixels in all directions. | ||
* | ||
* @hidden | ||
*/ | ||
export declare const extendPixelBounds: ({ northEast, southWest }: PixelBounds, pixels: number) => PixelBounds; | ||
export declare const extendPixelBounds: ({ northEast, southWest }: PixelBounds, numPixels: number) => PixelBounds; | ||
/** | ||
@@ -37,0 +51,0 @@ * @hidden |
@@ -17,2 +17,3 @@ /** | ||
/// <reference types="google.maps" /> | ||
import { Marker } from "./marker-utils"; | ||
export interface ClusterOptions { | ||
@@ -23,3 +24,3 @@ position?: google.maps.LatLng | google.maps.LatLngLiteral; | ||
export declare class Cluster { | ||
marker: Marker; | ||
marker?: Marker; | ||
readonly markers?: Marker[]; | ||
@@ -26,0 +27,0 @@ protected _position: google.maps.LatLng; |
@@ -46,13 +46,6 @@ import equal from 'fast-deep-equal'; | ||
*/ | ||
/** | ||
* util class that creates a common set of convenience functions to wrap | ||
* shared behavior of Advanced Markers and Markers. | ||
*/ | ||
class MarkerUtils { | ||
static isAdvancedMarker(marker) { | ||
if (google.maps.marker && | ||
marker instanceof google.maps.marker.AdvancedMarkerElement) { | ||
return true; | ||
} | ||
return false; | ||
return (google.maps.marker && | ||
marker instanceof google.maps.marker.AdvancedMarkerElement); | ||
} | ||
@@ -62,5 +55,6 @@ static setMap(marker, map) { | ||
marker.map = map; | ||
return; | ||
} | ||
marker.setMap(map); | ||
else { | ||
marker.setMap(map); | ||
} | ||
} | ||
@@ -70,3 +64,2 @@ static getPosition(marker) { | ||
if (this.isAdvancedMarker(marker)) { | ||
marker = marker; | ||
if (marker.position) { | ||
@@ -129,7 +122,9 @@ if (marker.position instanceof google.maps.LatLng) { | ||
if (this.markers.length === 0 && !this._position) { | ||
return undefined; | ||
return; | ||
} | ||
return this.markers.reduce((bounds, marker) => { | ||
return bounds.extend(MarkerUtils.getPosition(marker)); | ||
}, new google.maps.LatLngBounds(this._position, this._position)); | ||
const bounds = new google.maps.LatLngBounds(this._position, this._position); | ||
for (const marker of this.markers) { | ||
bounds.extend(MarkerUtils.getPosition(marker)); | ||
} | ||
return bounds; | ||
} | ||
@@ -157,3 +152,3 @@ get position() { | ||
MarkerUtils.setMap(this.marker, null); | ||
delete this.marker; | ||
this.marker = undefined; | ||
} | ||
@@ -179,15 +174,26 @@ this.markers.length = 0; | ||
*/ | ||
const filterMarkersToPaddedViewport = (map, mapCanvasProjection, markers, viewportPadding) => { | ||
const extendedMapBounds = extendBoundsToPaddedViewport(map.getBounds(), mapCanvasProjection, viewportPadding); | ||
/** | ||
* Returns the markers visible in a padded map viewport | ||
* | ||
* @param map | ||
* @param mapCanvasProjection | ||
* @param markers The list of marker to filter | ||
* @param viewportPaddingPixels The padding in pixel | ||
* @returns The list of markers in the padded viewport | ||
*/ | ||
const filterMarkersToPaddedViewport = (map, mapCanvasProjection, markers, viewportPaddingPixels) => { | ||
const extendedMapBounds = extendBoundsToPaddedViewport(map.getBounds(), mapCanvasProjection, viewportPaddingPixels); | ||
return markers.filter((marker) => extendedMapBounds.contains(MarkerUtils.getPosition(marker))); | ||
}; | ||
/** | ||
* Extends a bounds by a number of pixels in each direction. | ||
* Extends a bounds by a number of pixels in each direction | ||
*/ | ||
const extendBoundsToPaddedViewport = (bounds, projection, pixels) => { | ||
const extendBoundsToPaddedViewport = (bounds, projection, numPixels) => { | ||
const { northEast, southWest } = latLngBoundsToPixelBounds(bounds, projection); | ||
const extendedPixelBounds = extendPixelBounds({ northEast, southWest }, pixels); | ||
const extendedPixelBounds = extendPixelBounds({ northEast, southWest }, numPixels); | ||
return pixelBoundsToLatLngBounds(extendedPixelBounds, projection); | ||
}; | ||
/** | ||
* Returns the distance between 2 positions. | ||
* | ||
* @hidden | ||
@@ -208,2 +214,4 @@ */ | ||
/** | ||
* Converts a LatLng bound to pixels. | ||
* | ||
* @hidden | ||
@@ -218,9 +226,11 @@ */ | ||
/** | ||
* Extends a pixel bounds by numPixels in all directions. | ||
* | ||
* @hidden | ||
*/ | ||
const extendPixelBounds = ({ northEast, southWest }, pixels) => { | ||
northEast.x += pixels; | ||
northEast.y -= pixels; | ||
southWest.x -= pixels; | ||
southWest.y += pixels; | ||
const extendPixelBounds = ({ northEast, southWest }, numPixels) => { | ||
northEast.x += numPixels; | ||
northEast.y -= numPixels; | ||
southWest.x -= numPixels; | ||
southWest.y += numPixels; | ||
return { northEast, southWest }; | ||
@@ -232,6 +242,5 @@ }; | ||
const pixelBoundsToLatLngBounds = ({ northEast, southWest }, projection) => { | ||
const bounds = new google.maps.LatLngBounds(); | ||
bounds.extend(projection.fromDivPixelToLatLng(northEast)); | ||
bounds.extend(projection.fromDivPixelToLatLng(southWest)); | ||
return bounds; | ||
const sw = projection.fromDivPixelToLatLng(southWest); | ||
const ne = projection.fromDivPixelToLatLng(northEast); | ||
return new google.maps.LatLngBounds(sw, ne); | ||
}; | ||
@@ -268,3 +277,3 @@ | ||
* if (shouldBypassClustering(map)) { | ||
* return this.noop({markers, map}) | ||
* return this.noop({markers}) | ||
* } | ||
@@ -274,3 +283,3 @@ * } | ||
*/ | ||
noop({ markers }) { | ||
noop({ markers, }) { | ||
return noop(markers); | ||
@@ -297,4 +306,2 @@ } | ||
markers, | ||
map, | ||
mapCanvasProjection, | ||
}), | ||
@@ -367,6 +374,4 @@ changed: false, | ||
markers, | ||
map, | ||
mapCanvasProjection, | ||
}), | ||
changed: changed, | ||
changed, | ||
}; | ||
@@ -474,2 +479,3 @@ } | ||
let changed = false; | ||
const state = { zoom: input.map.getZoom() }; | ||
if (!equal(input.markers, this.markers)) { | ||
@@ -480,2 +486,4 @@ changed = true; | ||
const points = this.markers.map((marker) => { | ||
const position = MarkerUtils.getPosition(marker); | ||
const coordinates = [position.lng(), position.lat()]; | ||
return { | ||
@@ -485,6 +493,3 @@ type: "Feature", | ||
type: "Point", | ||
coordinates: [ | ||
MarkerUtils.getPosition(marker).lng(), | ||
MarkerUtils.getPosition(marker).lat(), | ||
], | ||
coordinates, | ||
}, | ||
@@ -496,7 +501,5 @@ properties: { marker }, | ||
} | ||
const state = { zoom: input.map.getZoom() }; | ||
if (!changed) { | ||
if (this.state.zoom > this.maxZoom && state.zoom > this.maxZoom) ; | ||
else { | ||
changed = changed || !equal(this.state, state); | ||
if (this.state.zoom <= this.maxZoom || state.zoom <= this.maxZoom) { | ||
changed = !equal(this.state, state); | ||
} | ||
@@ -513,3 +516,3 @@ } | ||
.getClusters([-180, -90, 180, 90], Math.round(map.getZoom())) | ||
.map(this.transformCluster.bind(this)); | ||
.map((feature) => this.transformCluster(feature)); | ||
} | ||
@@ -522,12 +525,10 @@ transformCluster({ geometry: { coordinates: [lng, lat], }, properties, }) { | ||
.map((leaf) => leaf.properties.marker), | ||
position: new google.maps.LatLng({ lat, lng }), | ||
position: { lat, lng }, | ||
}); | ||
} | ||
else { | ||
const marker = properties.marker; | ||
return new Cluster({ | ||
markers: [marker], | ||
position: MarkerUtils.getPosition(marker), | ||
}); | ||
} | ||
const marker = properties.marker; | ||
return new Cluster({ | ||
markers: [marker], | ||
position: MarkerUtils.getPosition(marker), | ||
}); | ||
} | ||
@@ -534,0 +535,0 @@ } |
@@ -1,2 +0,2 @@ | ||
var markerClusterer=function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=n.key,i=void 0,"symbol"==typeof(i=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"))?i:String(i)),n)}var o,i}function n(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function a(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=i(t);if(e){var o=i(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return a(this,r)}}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,s,a=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(t,e)||f(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||f(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){if(t){if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var m=function(t){return t&&t.Math==Math&&t},g=m("object"==typeof globalThis&&globalThis)||m("object"==typeof window&&window)||m("object"==typeof self&&self)||m("object"==typeof p&&p)||function(){return this}()||p||Function("return this")(),y={},v=function(t){try{return!!t()}catch(t){return!0}},b=!v((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),w=!v((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),k=w,O=Function.prototype.call,S=k?O.bind(O):function(){return O.apply(O,arguments)},E={},M={}.propertyIsEnumerable,x=Object.getOwnPropertyDescriptor,j=x&&!M.call({1:2},1);E.f=j?function(t){var e=x(this,t);return!!e&&e.enumerable}:M;var P,A,_=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},C=w,T=Function.prototype,L=T.call,I=C&&T.bind.bind(L,L),N=C?I:function(t){return function(){return L.apply(t,arguments)}},D=N,F=D({}.toString),R=D("".slice),z=function(t){return R(F(t),8,-1)},Z=v,U=z,B=Object,G=N("".split),V=Z((function(){return!B("z").propertyIsEnumerable(0)}))?function(t){return"String"==U(t)?G(t,""):B(t)}:B,W=function(t){return null==t},$=W,H=TypeError,q=function(t){if($(t))throw H("Can't call method on "+t);return t},X=V,Y=q,K=function(t){return X(Y(t))},J="object"==typeof document&&document.all,Q={all:J,IS_HTMLDDA:void 0===J&&void 0!==J},tt=Q.all,et=Q.IS_HTMLDDA?function(t){return"function"==typeof t||t===tt}:function(t){return"function"==typeof t},rt=et,nt=Q.all,ot=Q.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:rt(t)||t===nt}:function(t){return"object"==typeof t?null!==t:rt(t)},it=g,st=et,at=function(t,e){return arguments.length<2?(r=it[t],st(r)?r:void 0):it[t]&&it[t][e];var r},ut=N({}.isPrototypeOf),ct=g,lt="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ft=ct.process,ht=ct.Deno,pt=ft&&ft.versions||ht&&ht.version,dt=pt&&pt.v8;dt&&(A=(P=dt.split("."))[0]>0&&P[0]<4?1:+(P[0]+P[1])),!A&<&&(!(P=lt.match(/Edge\/(\d+)/))||P[1]>=74)&&(P=lt.match(/Chrome\/(\d+)/))&&(A=+P[1]);var mt=A,gt=mt,yt=v,vt=g.String,bt=!!Object.getOwnPropertySymbols&&!yt((function(){var t=Symbol();return!vt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&>&><41})),wt=bt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,kt=at,Ot=et,St=ut,Et=Object,Mt=wt?function(t){return"symbol"==typeof t}:function(t){var e=kt("Symbol");return Ot(e)&&St(e.prototype,Et(t))},xt=String,jt=function(t){try{return xt(t)}catch(t){return"Object"}},Pt=et,At=jt,_t=TypeError,Ct=function(t){if(Pt(t))return t;throw _t(At(t)+" is not a function")},Tt=Ct,Lt=W,It=S,Nt=et,Dt=ot,Ft=TypeError,Rt={exports:{}},zt=g,Zt=Object.defineProperty,Ut=function(t,e){try{Zt(zt,t,{value:e,configurable:!0,writable:!0})}catch(r){zt[t]=e}return e},Bt=Ut,Gt="__core-js_shared__",Vt=g[Gt]||Bt(Gt,{}),Wt=Vt;(Rt.exports=function(t,e){return Wt[t]||(Wt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var $t=Rt.exports,Ht=q,qt=Object,Xt=function(t){return qt(Ht(t))},Yt=Xt,Kt=N({}.hasOwnProperty),Jt=Object.hasOwn||function(t,e){return Kt(Yt(t),e)},Qt=N,te=0,ee=Math.random(),re=Qt(1..toString),ne=function(t){return"Symbol("+(void 0===t?"":t)+")_"+re(++te+ee,36)},oe=$t,ie=Jt,se=ne,ae=bt,ue=wt,ce=g.Symbol,le=oe("wks"),fe=ue?ce.for||ce:ce&&ce.withoutSetter||se,he=function(t){return ie(le,t)||(le[t]=ae&&ie(ce,t)?ce[t]:fe("Symbol."+t)),le[t]},pe=S,de=ot,me=Mt,ge=function(t,e){var r=t[e];return Lt(r)?void 0:Tt(r)},ye=function(t,e){var r,n;if("string"===e&&Nt(r=t.toString)&&!Dt(n=It(r,t)))return n;if(Nt(r=t.valueOf)&&!Dt(n=It(r,t)))return n;if("string"!==e&&Nt(r=t.toString)&&!Dt(n=It(r,t)))return n;throw Ft("Can't convert object to primitive value")},ve=TypeError,be=he("toPrimitive"),we=function(t,e){if(!de(t)||me(t))return t;var r,n=ge(t,be);if(n){if(void 0===e&&(e="default"),r=pe(n,t,e),!de(r)||me(r))return r;throw ve("Can't convert object to primitive value")}return void 0===e&&(e="number"),ye(t,e)},ke=we,Oe=Mt,Se=function(t){var e=ke(t,"string");return Oe(e)?e:e+""},Ee=ot,Me=g.document,xe=Ee(Me)&&Ee(Me.createElement),je=function(t){return xe?Me.createElement(t):{}},Pe=je,Ae=!b&&!v((function(){return 7!=Object.defineProperty(Pe("div"),"a",{get:function(){return 7}}).a})),_e=b,Ce=S,Te=E,Le=_,Ie=K,Ne=Se,De=Jt,Fe=Ae,Re=Object.getOwnPropertyDescriptor;y.f=_e?Re:function(t,e){if(t=Ie(t),e=Ne(e),Fe)try{return Re(t,e)}catch(t){}if(De(t,e))return Le(!Ce(Te.f,t,e),t[e])};var ze={},Ze=b&&v((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ue=ot,Be=String,Ge=TypeError,Ve=function(t){if(Ue(t))return t;throw Ge(Be(t)+" is not an object")},We=b,$e=Ae,He=Ze,qe=Ve,Xe=Se,Ye=TypeError,Ke=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,Qe="enumerable",tr="configurable",er="writable";ze.f=We?He?function(t,e,r){if(qe(t),e=Xe(e),qe(r),"function"==typeof t&&"prototype"===e&&"value"in r&&er in r&&!r[er]){var n=Je(t,e);n&&n[er]&&(t[e]=r.value,r={configurable:tr in r?r[tr]:n[tr],enumerable:Qe in r?r[Qe]:n[Qe],writable:!1})}return Ke(t,e,r)}:Ke:function(t,e,r){if(qe(t),e=Xe(e),qe(r),$e)try{return Ke(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Ye("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var rr=ze,nr=_,or=b?function(t,e,r){return rr.f(t,e,nr(1,r))}:function(t,e,r){return t[e]=r,t},ir={exports:{}},sr=b,ar=Jt,ur=Function.prototype,cr=sr&&Object.getOwnPropertyDescriptor,lr=ar(ur,"name"),fr={EXISTS:lr,PROPER:lr&&"something"===function(){}.name,CONFIGURABLE:lr&&(!sr||sr&&cr(ur,"name").configurable)},hr=et,pr=Vt,dr=N(Function.toString);hr(pr.inspectSource)||(pr.inspectSource=function(t){return dr(t)});var mr,gr,yr,vr=pr.inspectSource,br=et,wr=g.WeakMap,kr=br(wr)&&/native code/.test(String(wr)),Or=ne,Sr=$t("keys"),Er=function(t){return Sr[t]||(Sr[t]=Or(t))},Mr={},xr=kr,jr=g,Pr=ot,Ar=or,_r=Jt,Cr=Vt,Tr=Er,Lr=Mr,Ir="Object already initialized",Nr=jr.TypeError,Dr=jr.WeakMap;if(xr||Cr.state){var Fr=Cr.state||(Cr.state=new Dr);Fr.get=Fr.get,Fr.has=Fr.has,Fr.set=Fr.set,mr=function(t,e){if(Fr.has(t))throw Nr(Ir);return e.facade=t,Fr.set(t,e),e},gr=function(t){return Fr.get(t)||{}},yr=function(t){return Fr.has(t)}}else{var Rr=Tr("state");Lr[Rr]=!0,mr=function(t,e){if(_r(t,Rr))throw Nr(Ir);return e.facade=t,Ar(t,Rr,e),e},gr=function(t){return _r(t,Rr)?t[Rr]:{}},yr=function(t){return _r(t,Rr)}}var zr={set:mr,get:gr,has:yr,enforce:function(t){return yr(t)?gr(t):mr(t,{})},getterFor:function(t){return function(e){var r;if(!Pr(e)||(r=gr(e)).type!==t)throw Nr("Incompatible receiver, "+t+" required");return r}}},Zr=N,Ur=v,Br=et,Gr=Jt,Vr=b,Wr=fr.CONFIGURABLE,$r=vr,Hr=zr.enforce,qr=zr.get,Xr=String,Yr=Object.defineProperty,Kr=Zr("".slice),Jr=Zr("".replace),Qr=Zr([].join),tn=Vr&&!Ur((function(){return 8!==Yr((function(){}),"length",{value:8}).length})),en=String(String).split("String"),rn=ir.exports=function(t,e,r){"Symbol("===Kr(Xr(e),0,7)&&(e="["+Jr(Xr(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Gr(t,"name")||Wr&&t.name!==e)&&(Vr?Yr(t,"name",{value:e,configurable:!0}):t.name=e),tn&&r&&Gr(r,"arity")&&t.length!==r.arity&&Yr(t,"length",{value:r.arity});try{r&&Gr(r,"constructor")&&r.constructor?Vr&&Yr(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=Hr(t);return Gr(n,"source")||(n.source=Qr(en,"string"==typeof e?e:"")),t};Function.prototype.toString=rn((function(){return Br(this)&&qr(this).source||$r(this)}),"toString");var nn=ir.exports,on=et,sn=ze,an=nn,un=Ut,cn=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(on(r)&&an(r,i,n),n.global)o?t[e]=r:un(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:sn.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},ln={},fn=Math.ceil,hn=Math.floor,pn=Math.trunc||function(t){var e=+t;return(e>0?hn:fn)(e)},dn=function(t){var e=+t;return e!=e||0===e?0:pn(e)},mn=dn,gn=Math.max,yn=Math.min,vn=function(t,e){var r=mn(t);return r<0?gn(r+e,0):yn(r,e)},bn=dn,wn=Math.min,kn=function(t){return t>0?wn(bn(t),9007199254740991):0},On=function(t){return kn(t.length)},Sn=K,En=vn,Mn=On,xn=function(t){return function(e,r,n){var o,i=Sn(e),s=Mn(i),a=En(n,s);if(t&&r!=r){for(;s>a;)if((o=i[a++])!=o)return!0}else for(;s>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},jn={includes:xn(!0),indexOf:xn(!1)},Pn=Jt,An=K,_n=jn.indexOf,Cn=Mr,Tn=N([].push),Ln=function(t,e){var r,n=An(t),o=0,i=[];for(r in n)!Pn(Cn,r)&&Pn(n,r)&&Tn(i,r);for(;e.length>o;)Pn(n,r=e[o++])&&(~_n(i,r)||Tn(i,r));return i},In=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Nn=Ln,Dn=In.concat("length","prototype");ln.f=Object.getOwnPropertyNames||function(t){return Nn(t,Dn)};var Fn={};Fn.f=Object.getOwnPropertySymbols;var Rn=at,zn=ln,Zn=Fn,Un=Ve,Bn=N([].concat),Gn=Rn("Reflect","ownKeys")||function(t){var e=zn.f(Un(t)),r=Zn.f;return r?Bn(e,r(t)):e},Vn=Jt,Wn=Gn,$n=y,Hn=ze,qn=v,Xn=et,Yn=/#|\.prototype\./,Kn=function(t,e){var r=Qn[Jn(t)];return r==eo||r!=to&&(Xn(e)?qn(e):!!e)},Jn=Kn.normalize=function(t){return String(t).replace(Yn,".").toLowerCase()},Qn=Kn.data={},to=Kn.NATIVE="N",eo=Kn.POLYFILL="P",ro=Kn,no=g,oo=y.f,io=or,so=cn,ao=Ut,uo=function(t,e,r){for(var n=Wn(e),o=Hn.f,i=$n.f,s=0;s<n.length;s++){var a=n[s];Vn(t,a)||r&&Vn(r,a)||o(t,a,i(e,a))}},co=ro,lo=function(t,e){var r,n,o,i,s,a=t.target,u=t.global,c=t.stat;if(r=u?no:c?no[a]||ao(a,{}):(no[a]||{}).prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(s=oo(r,n))&&s.value:r[n],!co(u?n:a+(c?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;uo(i,o)}(t.sham||o&&o.sham)&&io(i,"sham",!0),so(r,n,i,t)}},fo=z,ho=N,po=function(t){if("Function"===fo(t))return ho(t)},mo=Ct,go=w,yo=po(po.bind),vo=z,bo=Array.isArray||function(t){return"Array"==vo(t)},wo={};wo[he("toStringTag")]="z";var ko="[object z]"===String(wo),Oo=ko,So=et,Eo=z,Mo=he("toStringTag"),xo=Object,jo="Arguments"==Eo(function(){return arguments}()),Po=Oo?Eo:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=xo(t),Mo))?r:jo?Eo(e):"Object"==(n=Eo(e))&&So(e.callee)?"Arguments":n},Ao=N,_o=v,Co=et,To=Po,Lo=vr,Io=function(){},No=[],Do=at("Reflect","construct"),Fo=/^\s*(?:class|function)\b/,Ro=Ao(Fo.exec),zo=!Fo.exec(Io),Zo=function(t){if(!Co(t))return!1;try{return Do(Io,No,t),!0}catch(t){return!1}},Uo=function(t){if(!Co(t))return!1;switch(To(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return zo||!!Ro(Fo,Lo(t))}catch(t){return!0}};Uo.sham=!0;var Bo=!Do||_o((function(){var t;return Zo(Zo.call)||!Zo(Object)||!Zo((function(){t=!0}))||t}))?Uo:Zo,Go=bo,Vo=Bo,Wo=ot,$o=he("species"),Ho=Array,qo=function(t){var e;return Go(t)&&(e=t.constructor,(Vo(e)&&(e===Ho||Go(e.prototype))||Wo(e)&&null===(e=e[$o]))&&(e=void 0)),void 0===e?Ho:e},Xo=function(t,e){return new(qo(t))(0===e?0:e)},Yo=function(t,e){return mo(t),void 0===e?t:go?yo(t,e):function(){return t.apply(e,arguments)}},Ko=V,Jo=Xt,Qo=On,ti=Xo,ei=N([].push),ri=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,s=7==t,a=5==t||i;return function(u,c,l,f){for(var h,p,d=Jo(u),m=Ko(d),g=Yo(c,l),y=Qo(m),v=0,b=f||ti,w=e?b(u,y):r||s?b(u,0):void 0;y>v;v++)if((a||v in m)&&(p=g(h=m[v],v,d),t))if(e)w[v]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return v;case 2:ei(w,h)}else switch(t){case 4:return!1;case 7:ei(w,h)}return i?-1:n||o?o:w}},ni={forEach:ri(0),map:ri(1),filter:ri(2),some:ri(3),every:ri(4),find:ri(5),findIndex:ri(6),filterReject:ri(7)},oi=v,ii=mt,si=he("species"),ai=function(t){return ii>=51||!oi((function(){var e=[];return(e.constructor={})[si]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},ui=ni.map;function ci(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}lo({target:"Array",proto:!0,forced:!ai("map")},{map:function(t){return ui(this,t,arguments.length>1?arguments[1]:void 0)}});var li=Ct,fi=Xt,hi=V,pi=On,di=TypeError,mi=function(t){return function(e,r,n,o){li(r);var i=fi(e),s=hi(i),a=pi(i),u=t?a-1:0,c=t?-1:1;if(n<2)for(;;){if(u in s){o=s[u],u+=c;break}if(u+=c,t?u<0:a<=u)throw di("Reduce of empty array with no initial value")}for(;t?u>=0:a>u;u+=c)u in s&&(o=r(o,s[u],u,i));return o}},gi={left:mi(!1),right:mi(!0)},yi=v,vi=function(t,e){var r=[][t];return!!r&&yi((function(){r.call(null,e||function(){return 1},1)}))},bi="undefined"!=typeof process&&"process"==z(process),wi=gi.left;lo({target:"Array",proto:!0,forced:!bi&&mt>79&&mt<83||!vi("reduce")},{reduce:function(t){var e=arguments.length;return wi(this,t,e,e>1?arguments[1]:void 0)}});var ki=Po,Oi=ko?{}.toString:function(){return"[object "+ki(this)+"]"};ko||cn(Object.prototype,"toString",Oi,{unsafe:!0});var Si=ni.filter;lo({target:"Array",proto:!0,forced:!ai("filter")},{filter:function(t){return Si(this,t,arguments.length>1?arguments[1]:void 0)}});var Ei=function(){function t(){e(this,t)}return n(t,null,[{key:"isAdvancedMarker",value:function(t){return!!(google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement)}},{key:"setMap",value:function(t,e){this.isAdvancedMarker(t)?t.map=e:t.setMap(e)}},{key:"getPosition",value:function(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(t.position.lat&&t.position.lng)return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}},{key:"getVisible",value:function(t){return!!this.isAdvancedMarker(t)||t.getVisible()}}]),t}(),Mi=function(){function t(r){var n=r.markers,o=r.position;e(this,t),this.markers=n,o&&(o instanceof google.maps.LatLng?this._position=o:this._position=new google.maps.LatLng(o))}return n(t,[{key:"bounds",get:function(){if(0!==this.markers.length||this._position)return this.markers.reduce((function(t,e){return t.extend(Ei.getPosition(e))}),new google.maps.LatLngBounds(this._position,this._position))}},{key:"position",get:function(){return this._position||this.bounds.getCenter()}},{key:"count",get:function(){return this.markers.filter((function(t){return Ei.getVisible(t)})).length}},{key:"push",value:function(t){this.markers.push(t)}},{key:"delete",value:function(){this.marker&&(Ei.setMap(this.marker,null),delete this.marker),this.markers.length=0}}]),t}(),xi=function(t,e,r,n){var o=ji(t.getBounds(),e,n);return r.filter((function(t){return o.contains(Ei.getPosition(t))}))},ji=function(t,e,r){var n=Ai(t,e),o=n.northEast,i=n.southWest,s=_i({northEast:o,southWest:i},r);return Ci(s,e)},Pi=function(t,e){var r=(e.lat-t.lat)*Math.PI/180,n=(e.lng-t.lng)*Math.PI/180,o=Math.sin(r/2)*Math.sin(r/2)+Math.cos(t.lat*Math.PI/180)*Math.cos(e.lat*Math.PI/180)*Math.sin(n/2)*Math.sin(n/2);return 6371*(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)))},Ai=function(t,e){return{northEast:e.fromLatLngToDivPixel(t.getNorthEast()),southWest:e.fromLatLngToDivPixel(t.getSouthWest())}},_i=function(t,e){var r=t.northEast,n=t.southWest;return r.x+=e,r.y-=e,n.x-=e,n.y+=e,{northEast:r,southWest:n}},Ci=function(t,e){var r=t.northEast,n=t.southWest,o=new google.maps.LatLngBounds;return o.extend(e.fromDivPixelToLatLng(r)),o.extend(e.fromDivPixelToLatLng(n)),o},Ti=function(){function t(r){var n=r.maxZoom,o=void 0===n?16:n;e(this,t),this.maxZoom=o}return n(t,[{key:"noop",value:function(t){var e=t.markers;return Ii(e)}}]),t}(),Li=function(t){o(i,t);var r=u(i);function i(t){var n;e(this,i);var o=t.viewportPadding,s=void 0===o?60:o,a=ci(t,["viewportPadding"]);return(n=r.call(this,a)).viewportPadding=60,n.viewportPadding=s,n}return n(i,[{key:"calculate",value:function(t){var e=t.markers,r=t.map,n=t.mapCanvasProjection;return r.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e,map:r,mapCanvasProjection:n}),changed:!1}:{clusters:this.cluster({markers:xi(r,n,e,this.viewportPadding),map:r,mapCanvasProjection:n})}}}]),i}(Ti),Ii=function(t){return t.map((function(t){return new Mi({position:Ei.getPosition(t),markers:[t]})}))},Ni=je("span").classList,Di=Ni&&Ni.constructor&&Ni.constructor.prototype,Fi=Di===Object.prototype?void 0:Di,Ri=ni.forEach,zi=vi("forEach")?[].forEach:function(t){return Ri(this,t,arguments.length>1?arguments[1]:void 0)},Zi=g,Ui={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Bi=Fi,Gi=zi,Vi=or,Wi=function(t){if(t&&t.forEach!==Gi)try{Vi(t,"forEach",Gi)}catch(e){t.forEach=Gi}};for(var $i in Ui)Ui[$i]&&Wi(Zi[$i]&&Zi[$i].prototype);Wi(Bi);var Hi=S;lo({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return Hi(URL.prototype.toString,this)}});var qi=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(e)){if((n=e.length)!=r.length)return!1;for(o=n;0!=o--;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((n=(i=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var s=i[o];if(!t(e[s],r[s]))return!1}return!0}return e!=e&&r!=r},Xi=d(qi),Yi=function(t){o(i,t);var r=u(i);function i(t){var n;e(this,i);var o=t.maxDistance,s=void 0===o?4e4:o,a=t.gridSize,u=void 0===a?40:a,c=ci(t,["maxDistance","gridSize"]);return(n=r.call(this,c)).clusters=[],n.maxDistance=s,n.gridSize=u,n.state={zoom:null},n}return n(i,[{key:"calculate",value:function(t){var e=t.markers,r=t.map,n=t.mapCanvasProjection,o={zoom:r.getZoom()},i=!1;return this.state.zoom>this.maxZoom&&o.zoom>this.maxZoom||(i=!Xi(this.state,o)),this.state=o,r.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e,map:r,mapCanvasProjection:n}),changed:i}:{clusters:this.cluster({markers:xi(r,n,e,this.viewportPadding),map:r,mapCanvasProjection:n})}}},{key:"cluster",value:function(t){var e=this,r=t.markers,n=t.map,o=t.mapCanvasProjection;return this.clusters=[],r.forEach((function(t){e.addToClosestCluster(t,n,o)})),this.clusters}},{key:"addToClosestCluster",value:function(t,e,r){for(var n=this.maxDistance,o=null,i=0;i<this.clusters.length;i++){var s=this.clusters[i],a=Pi(s.bounds.getCenter().toJSON(),Ei.getPosition(t).toJSON());a<n&&(n=a,o=s)}if(o&&ji(o.bounds,r,this.gridSize).contains(Ei.getPosition(t)))o.push(t);else{var u=new Mi({markers:[t]});this.clusters.push(u)}}}]),i}(Li),Ki=function(t){o(i,t);var r=u(i);function i(t){e(this,i);var n=ci(t,[]);return r.call(this,n)}return n(i,[{key:"calculate",value:function(t){var e=t.markers,r=t.map,n=t.mapCanvasProjection;return{clusters:this.cluster({markers:e,map:r,mapCanvasProjection:n}),changed:!1}}},{key:"cluster",value:function(t){return this.noop(t)}}]),i}(Ti),Ji=Ln,Qi=In,ts=Object.keys||function(t){return Ji(t,Qi)},es=b,rs=N,ns=S,os=v,is=ts,ss=Fn,as=E,us=Xt,cs=V,ls=Object.assign,fs=Object.defineProperty,hs=rs([].concat),ps=!ls||os((function(){if(es&&1!==ls({b:1},ls(fs({},"a",{enumerable:!0,get:function(){fs(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=ls({},t)[r]||is(ls({},e)).join("")!=n}))?function(t,e){for(var r=us(t),n=arguments.length,o=1,i=ss.f,s=as.f;n>o;)for(var a,u=cs(arguments[o++]),c=i?hs(is(u),i(u)):is(u),l=c.length,f=0;l>f;)a=c[f++],es&&!ns(s,u,a)||(r[a]=u[a]);return r}:ls,ds=ps;lo({target:"Object",stat:!0,arity:2,forced:Object.assign!==ds},{assign:ds});const ms=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class gs{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[e,r]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const n=r>>4;if(1!==n)throw new Error(`Got v${n} data when expected v1.`);const o=ms[15&r];if(!o)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1);return new gs(s,i,o,t)}constructor(t,e=64,r=Float64Array,n){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const o=ms.indexOf(this.ArrayType),i=2*t*this.ArrayType.BYTES_PER_ELEMENT,s=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-s%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+s+a,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+i+s+a),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+s+a,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+o]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return ys(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:i,nodeSize:s}=this,a=[0,o.length-1,0],u=[];for(;a.length;){const c=a.pop()||0,l=a.pop()||0,f=a.pop()||0;if(l-f<=s){for(let s=f;s<=l;s++){const a=i[2*s],c=i[2*s+1];a>=t&&a<=r&&c>=e&&c<=n&&u.push(o[s])}continue}const h=f+l>>1,p=i[2*h],d=i[2*h+1];p>=t&&p<=r&&d>=e&&d<=n&&u.push(o[h]),(0===c?t<=p:e<=d)&&(a.push(f),a.push(h-1),a.push(1-c)),(0===c?r>=p:n>=d)&&(a.push(h+1),a.push(l),a.push(1-c))}return u}within(t,e,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:o,nodeSize:i}=this,s=[0,n.length-1,0],a=[],u=r*r;for(;s.length;){const c=s.pop()||0,l=s.pop()||0,f=s.pop()||0;if(l-f<=i){for(let r=f;r<=l;r++)ks(o[2*r],o[2*r+1],t,e)<=u&&a.push(n[r]);continue}const h=f+l>>1,p=o[2*h],d=o[2*h+1];ks(p,d,t,e)<=u&&a.push(n[h]),(0===c?t-r<=p:e-r<=d)&&(s.push(f),s.push(h-1),s.push(1-c)),(0===c?t+r>=p:e+r>=d)&&(s.push(h+1),s.push(l),s.push(1-c))}return a}}function ys(t,e,r,n,o,i){if(o-n<=r)return;const s=n+o>>1;vs(t,e,s,n,o,i),ys(t,e,r,n,s-1,1-i),ys(t,e,r,s+1,o,1-i)}function vs(t,e,r,n,o,i){for(;o>n;){if(o-n>600){const s=o-n+1,a=r-n+1,u=Math.log(s),c=.5*Math.exp(2*u/3),l=.5*Math.sqrt(u*c*(s-c)/s)*(a-s/2<0?-1:1);vs(t,e,r,Math.max(n,Math.floor(r-a*c/s+l)),Math.min(o,Math.floor(r+(s-a)*c/s+l)),i)}const s=e[2*r+i];let a=n,u=o;for(bs(t,e,n,r),e[2*o+i]>s&&bs(t,e,n,o);a<u;){for(bs(t,e,a,u),a++,u--;e[2*a+i]<s;)a++;for(;e[2*u+i]>s;)u--}e[2*n+i]===s?bs(t,e,n,u):(u++,bs(t,e,u,o)),u<=r&&(n=u+1),r<=u&&(o=u-1)}}function bs(t,e,r,n){ws(t,r,n),ws(e,2*r,2*n),ws(e,2*r+1,2*n+1)}function ws(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function ks(t,e,r,n){const o=t-r,i=e-n;return o*o+i*i}const Os={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Ss=Math.fround||(Es=new Float32Array(1),t=>(Es[0]=+t,Es[0]));var Es;const Ms=3,xs=5,js=6;class Ps{constructor(t){this.options=Object.assign(Object.create(Os),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:r,maxZoom:n}=this.options;e&&console.time("total time");const o=`prepare ${t.length} points`;e&&console.time(o),this.points=t;const i=[];for(let e=0;e<t.length;e++){const r=t[e];if(!r.geometry)continue;const[n,o]=r.geometry.coordinates,s=Ss(Cs(n)),a=Ss(Ts(o));i.push(s,a,1/0,e,-1,1),this.options.reduce&&i.push(0)}let s=this.trees[n+1]=this._createTree(i);e&&console.timeEnd(o);for(let t=n;t>=r;t--){const r=+Date.now();s=this.trees[t]=this._createTree(this._cluster(s,t)),e&&console.log("z%d: %d clusters in %dms",t,s.numItems,+Date.now()-r)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let r=((t[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[1]));let o=180===t[2]?180:((t[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,o=180;else if(r>o){const t=this.getClusters([r,n,180,i],e),s=this.getClusters([-180,n,o,i],e);return t.concat(s)}const s=this.trees[this._limitZoom(e)],a=s.range(Cs(r),Ts(i),Cs(o),Ts(n)),u=s.data,c=[];for(const t of a){const e=this.stride*t;c.push(u[e+xs]>1?As(u,e,this.clusterProps):this.points[u[e+Ms]])}return c}getChildren(t){const e=this._getOriginId(t),r=this._getOriginZoom(t),n="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(n);const i=o.data;if(e*this.stride>=i.length)throw new Error(n);const s=this.options.radius/(this.options.extent*Math.pow(2,r-1)),a=i[e*this.stride],u=i[e*this.stride+1],c=o.within(a,u,s),l=[];for(const e of c){const r=e*this.stride;i[r+4]===t&&l.push(i[r+xs]>1?As(i,r,this.clusterProps):this.points[i[r+Ms]])}if(0===l.length)throw new Error(n);return l}getLeaves(t,e,r){e=e||10,r=r||0;const n=[];return this._appendLeaves(n,t,e,r,0),n}getTile(t,e,r){const n=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:i,radius:s}=this.options,a=s/i,u=(r-a)/o,c=(r+1+a)/o,l={features:[]};return this._addTileFeatures(n.range((e-a)/o,u,(e+1+a)/o,c),n.data,e,r,o,l),0===e&&this._addTileFeatures(n.range(1-a/o,u,1,c),n.data,o,r,o,l),e===o-1&&this._addTileFeatures(n.range(0,u,a/o,c),n.data,-1,r,o,l),l.features.length?l:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e}_appendLeaves(t,e,r,n,o){const i=this.getChildren(e);for(const e of i){const i=e.properties;if(i&&i.cluster?o+i.point_count<=n?o+=i.point_count:o=this._appendLeaves(t,i.cluster_id,r,n,o):o<n?o++:t.push(e),t.length===r)break}return o}_createTree(t){const e=new gs(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)e.add(t[r],t[r+1]);return e.finish(),e.data=t,e}_addTileFeatures(t,e,r,n,o,i){for(const s of t){const t=s*this.stride,a=e[t+xs]>1;let u,c,l;if(a)u=_s(e,t,this.clusterProps),c=e[t],l=e[t+1];else{const r=this.points[e[t+Ms]];u=r.properties;const[n,o]=r.geometry.coordinates;c=Cs(n),l=Ts(o)}const f={type:1,geometry:[[Math.round(this.options.extent*(c*o-r)),Math.round(this.options.extent*(l*o-n))]],tags:u};let h;h=a||this.options.generateId?e[t+Ms]:this.points[e[t+Ms]].id,void 0!==h&&(f.id=h),i.features.push(f)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:r,extent:n,reduce:o,minPoints:i}=this.options,s=r/(n*Math.pow(2,e)),a=t.data,u=[],c=this.stride;for(let r=0;r<a.length;r+=c){if(a[r+2]<=e)continue;a[r+2]=e;const n=a[r],l=a[r+1],f=t.within(a[r],a[r+1],s),h=a[r+xs];let p=h;for(const t of f){const r=t*c;a[r+2]>e&&(p+=a[r+xs])}if(p>h&&p>=i){let t,i=n*h,s=l*h,d=-1;const m=((r/c|0)<<5)+(e+1)+this.points.length;for(const n of f){const u=n*c;if(a[u+2]<=e)continue;a[u+2]=e;const l=a[u+xs];i+=a[u]*l,s+=a[u+1]*l,a[u+4]=m,o&&(t||(t=this._map(a,r,!0),d=this.clusterProps.length,this.clusterProps.push(t)),o(t,this._map(a,u)))}a[r+4]=m,u.push(i/p,s/p,1/0,m,-1,p),o&&u.push(d)}else{for(let t=0;t<c;t++)u.push(a[r+t]);if(p>1)for(const t of f){const r=t*c;if(!(a[r+2]<=e)){a[r+2]=e;for(let t=0;t<c;t++)u.push(a[r+t])}}}}return u}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,r){if(t[e+xs]>1){const n=this.clusterProps[t[e+js]];return r?Object.assign({},n):n}const n=this.points[t[e+Ms]].properties,o=this.options.map(n);return r&&o===n?Object.assign({},o):o}}function As(t,e,r){return{type:"Feature",id:t[e+Ms],properties:_s(t,e,r),geometry:{type:"Point",coordinates:[(n=t[e],360*(n-.5)),Ls(t[e+1])]}};var n}function _s(t,e,r){const n=t[e+xs],o=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,i=t[e+js],s=-1===i?{}:Object.assign({},r[i]);return Object.assign(s,{cluster:!0,cluster_id:t[e+Ms],point_count:n,point_count_abbreviated:o})}function Cs(t){return t/360+.5}function Ts(t){const e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Ls(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}var Is=function(t){o(i,t);var r=u(i);function i(t){var n;e(this,i);var o=t.maxZoom,s=t.radius,a=void 0===s?60:s,u=ci(t,["maxZoom","radius"]);return(n=r.call(this,{maxZoom:o})).superCluster=new Ps(Object.assign({maxZoom:n.maxZoom,radius:a},u)),n.state={zoom:null},n}return n(i,[{key:"calculate",value:function(t){var e=!1;if(!Xi(t.markers,this.markers)){e=!0,this.markers=l(t.markers);var r=this.markers.map((function(t){return{type:"Feature",geometry:{type:"Point",coordinates:[Ei.getPosition(t).lng(),Ei.getPosition(t).lat()]},properties:{marker:t}}}));this.superCluster.load(r)}var n={zoom:t.map.getZoom()};return e||this.state.zoom>this.maxZoom&&n.zoom>this.maxZoom||(e=e||!Xi(this.state,n)),this.state=n,e&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:e}}},{key:"cluster",value:function(t){var e=t.map;return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(this.transformCluster.bind(this))}},{key:"transformCluster",value:function(t){var e=c(t.geometry.coordinates,2),r=e[0],n=e[1],o=t.properties;if(o.cluster)return new Mi({markers:this.superCluster.getLeaves(o.cluster_id,1/0).map((function(t){return t.properties.marker})),position:new google.maps.LatLng({lat:n,lng:r})});var i=o.marker;return new Mi({markers:[i],position:Ei.getPosition(i)})}}]),i}(Ti),Ns={},Ds=b,Fs=Ze,Rs=ze,zs=Ve,Zs=K,Us=ts;Ns.f=Ds&&!Fs?Object.defineProperties:function(t,e){zs(t);for(var r,n=Zs(e),o=Us(e),i=o.length,s=0;i>s;)Rs.f(t,r=o[s++],n[r]);return t};var Bs,Gs=at("document","documentElement"),Vs=Ve,Ws=Ns,$s=In,Hs=Mr,qs=Gs,Xs=je,Ys="prototype",Ks="script",Js=Er("IE_PROTO"),Qs=function(){},ta=function(t){return"<"+Ks+">"+t+"</"+Ks+">"},ea=function(t){t.write(ta("")),t.close();var e=t.parentWindow.Object;return t=null,e},ra=function(){try{Bs=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;ra="undefined"!=typeof document?document.domain&&Bs?ea(Bs):(e=Xs("iframe"),r="java"+Ks+":",e.style.display="none",qs.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(ta("document.F=Object")),t.close(),t.F):ea(Bs);for(var n=$s.length;n--;)delete ra[Ys][$s[n]];return ra()};Hs[Js]=!0;var na=he,oa=Object.create||function(t,e){var r;return null!==t?(Qs[Ys]=Vs(t),r=new Qs,Qs[Ys]=null,r[Js]=t):r=ra(),void 0===e?r:Ws.f(r,e)},ia=ze.f,sa=na("unscopables"),aa=Array.prototype;null==aa[sa]&&ia(aa,sa,{configurable:!0,value:oa(null)});var ua=jn.includes,ca=function(t){aa[sa][t]=!0};lo({target:"Array",proto:!0,forced:v((function(){return!Array(1).includes()}))},{includes:function(t){return ua(this,t,arguments.length>1?arguments[1]:void 0)}}),ca("includes");var la=ot,fa=z,ha=he("match"),pa=function(t){var e;return la(t)&&(void 0!==(e=t[ha])?!!e:"RegExp"==fa(t))},da=TypeError,ma=Po,ga=String,ya=function(t){if("Symbol"===ma(t))throw TypeError("Cannot convert a Symbol value to a string");return ga(t)},va=he("match"),ba=lo,wa=function(t){if(pa(t))throw da("The method doesn't accept regular expressions");return t},ka=q,Oa=ya,Sa=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[va]=!1,"/./"[t](e)}catch(t){}}return!1},Ea=N("".indexOf);ba({target:"String",proto:!0,forced:!Sa("includes")},{includes:function(t){return!!~Ea(Oa(ka(this)),Oa(wa(t)),arguments.length>1?arguments[1]:void 0)}});var Ma=lo,xa=jn.indexOf,ja=vi,Pa=po([].indexOf),Aa=!!Pa&&1/Pa([1],1,-0)<0;Ma({target:"Array",proto:!0,forced:Aa||!ja("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Aa?Pa(this,t,e)||0:xa(this,t,e)}});var _a=b,Ca=bo,Ta=TypeError,La=Object.getOwnPropertyDescriptor,Ia=_a&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),Na=TypeError,Da=Se,Fa=ze,Ra=_,za=jt,Za=TypeError,Ua=lo,Ba=Xt,Ga=vn,Va=dn,Wa=On,$a=Ia?function(t,e){if(Ca(t)&&!La(t,"length").writable)throw Ta("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Ha=function(t){if(t>9007199254740991)throw Na("Maximum allowed index exceeded");return t},qa=Xo,Xa=function(t,e,r){var n=Da(e);n in t?Fa.f(t,n,Ra(0,r)):t[n]=r},Ya=function(t,e){if(!delete t[e])throw Za("Cannot delete property "+za(e)+" of "+za(t))},Ka=ai("splice"),Ja=Math.max,Qa=Math.min;Ua({target:"Array",proto:!0,forced:!Ka},{splice:function(t,e){var r,n,o,i,s,a,u=Ba(this),c=Wa(u),l=Ga(t,c),f=arguments.length;for(0===f?r=n=0:1===f?(r=0,n=c-l):(r=f-2,n=Qa(Ja(Va(e),0),c-l)),Ha(c+r-n),o=qa(u,n),i=0;i<n;i++)(s=l+i)in u&&Xa(o,i,u[s]);if(o.length=n,r<n){for(i=l;i<c-n;i++)a=i+r,(s=i+n)in u?u[a]=u[s]:Ya(u,a);for(i=c;i>c-n+r;i--)Ya(u,i-1)}else if(r>n)for(i=c-n;i>l;i--)a=i+r-1,(s=i+n-1)in u?u[a]=u[s]:Ya(u,a);for(i=0;i<r;i++)u[i+l]=arguments[i+2];return $a(u,c-n+r),o}});var tu=g,eu=N,ru=Ct,nu=et,ou=String,iu=TypeError,su=function(t,e,r){try{return eu(ru(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}},au=Ve,uu=function(t){if("object"==typeof t||nu(t))return t;throw iu("Can't set "+ou(t)+" as a prototype")},cu=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=su(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return au(r),uu(n),e?t(r,n):r.__proto__=n,r}}():void 0),lu=et,fu=ot,hu=cu,pu=N(1..valueOf),du=q,mu=ya,gu="\t\n\v\f\r \u2028\u2029\ufeff",yu=N("".replace),vu=RegExp("^["+gu+"]+"),bu=RegExp("(^|[^"+gu+"])["+gu+"]+$"),wu=function(t){return function(e){var r=mu(du(e));return 1&t&&(r=yu(r,vu,"")),2&t&&(r=yu(r,bu,"$1")),r}},ku={start:wu(1),end:wu(2),trim:wu(3)},Ou=lo,Su=b,Eu=g,Mu=tu,xu=N,ju=ro,Pu=Jt,Au=function(t,e,r){var n,o;return hu&&lu(n=e.constructor)&&n!==r&&fu(o=n.prototype)&&o!==r.prototype&&hu(t,o),t},_u=ut,Cu=Mt,Tu=we,Lu=v,Iu=ln.f,Nu=y.f,Du=ze.f,Fu=pu,Ru=ku.trim,zu="Number",Zu=Eu[zu];Mu[zu];var Uu=Zu.prototype,Bu=Eu.TypeError,Gu=xu("".slice),Vu=xu("".charCodeAt),Wu=function(t){var e,r,n,o,i,s,a,u,c=Tu(t,"number");if(Cu(c))throw Bu("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=Ru(c),43===(e=Vu(c,0))||45===e){if(88===(r=Vu(c,2))||120===r)return NaN}else if(48===e){switch(Vu(c,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(s=(i=Gu(c,2)).length,a=0;a<s;a++)if((u=Vu(i,a))<48||u>o)return NaN;return parseInt(i,n)}return+c},$u=ju(zu,!Zu(" 0o1")||!Zu("0b1")||Zu("+0x1")),Hu=function(t){var e,r=arguments.length<1?0:Zu(function(t){var e=Tu(t,"number");return"bigint"==typeof e?e:Wu(e)}(t));return _u(Uu,e=this)&&Lu((function(){Fu(e)}))?Au(Object(r),this,Hu):r};Hu.prototype=Uu,$u&&(Uu.constructor=Hu),Ou({global:!0,constructor:!0,wrap:!0,forced:$u},{Number:Hu});$u&&function(t,e){for(var r,n=Su?Iu(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;n.length>o;o++)Pu(e,r=n[o])&&!Pu(t,r)&&Du(t,r,Nu(e,r))}(Mu[zu],Zu);var qu=n((function t(r,n){e(this,t),this.markers={sum:r.length};var o=n.map((function(t){return t.count})),i=o.reduce((function(t,e){return t+e}),0);this.clusters={count:n.length,markers:{mean:i/n.length,sum:i,min:Math.min.apply(Math,l(o)),max:Math.max.apply(Math,l(o))}}})),Xu=function(){function t(){e(this,t)}return n(t,[{key:"render",value:function(t,e,r){var n=t.count,o=t.position,i=n>Math.max(10,e.clusters.markers.mean)?"#ff0000":"#0000ff",s='<svg fill="'.concat(i,'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240">\n <circle cx="120" cy="120" opacity=".6" r="70" />\n <circle cx="120" cy="120" opacity=".3" r="90" />\n <circle cx="120" cy="120" opacity=".2" r="110" />\n </svg>'),a="Cluster of ".concat(n," markers"),u=Number(google.maps.Marker.MAX_ZINDEX)+n;if(google.maps.marker&&r.getMapCapabilities().isAdvancedMarkersAvailable){var c=document.createElement("div");c.innerHTML=s;var l=c.firstElementChild;l.setAttribute("width","50"),l.setAttribute("height","50");var f=document.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("x","50%"),f.setAttribute("y","50%"),f.setAttribute("style","fill: #FFF"),f.setAttribute("text-anchor","middle"),f.setAttribute("font-size","50"),f.setAttribute("dominant-baseline","middle"),f.appendChild(document.createTextNode("".concat(n))),l.appendChild(f);var h={map:r,position:o,zIndex:u,title:a,content:c.firstElementChild};return new google.maps.marker.AdvancedMarkerElement(h)}var p={position:o,zIndex:u,title:a,icon:{url:"data:image/svg+xml;base64,".concat(window.btoa(s)),scaledSize:new google.maps.Size(45,45)},label:{text:String(n),color:"rgba(255,255,255,0.9)",fontSize:"12px"}};return new google.maps.Marker(p)}}]),t}();var Yu,Ku=n((function t(){e(this,t),function(t,e){for(var r in e.prototype)t.prototype[r]=e.prototype[r]}(t,google.maps.OverlayView)}));t.MarkerClustererEvents=void 0,(Yu=t.MarkerClustererEvents||(t.MarkerClustererEvents={})).CLUSTERING_BEGIN="clusteringbegin",Yu.CLUSTERING_END="clusteringend",Yu.CLUSTER_CLICK="click";var Ju=function(t,e,r){r.fitBounds(e.bounds)},Qu=function(r){o(s,r);var i=u(s);function s(t){var r,n=t.map,o=t.markers,a=void 0===o?[]:o,u=t.algorithmOptions,c=void 0===u?{}:u,f=t.algorithm,h=void 0===f?new Is(c):f,p=t.renderer,d=void 0===p?new Xu:p,m=t.onClusterClick,g=void 0===m?Ju:m;return e(this,s),(r=i.call(this)).markers=l(a),r.clusters=[],r.algorithm=h,r.renderer=d,r.onClusterClick=g,n&&r.setMap(n),r}return n(s,[{key:"addMarker",value:function(t,e){this.markers.includes(t)||(this.markers.push(t),e||this.render())}},{key:"addMarkers",value:function(t,e){var r=this;t.forEach((function(t){r.addMarker(t,!0)})),e||this.render()}},{key:"removeMarker",value:function(t,e){var r=this.markers.indexOf(t);return-1!==r&&(Ei.setMap(t,null),this.markers.splice(r,1),e||this.render(),!0)}},{key:"removeMarkers",value:function(t,e){var r=this,n=!1;return t.forEach((function(t){n=r.removeMarker(t,!0)||n})),n&&!e&&this.render(),n}},{key:"clearMarkers",value:function(t){this.markers.length=0,t||this.render()}},{key:"render",value:function(){var e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTERING_BEGIN,this);var r=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()}),n=r.clusters,o=r.changed;(o||null==o)&&(this.reset(),this.clusters=n,this.renderClusters()),google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTERING_END,this)}}},{key:"onAdd",value:function(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}},{key:"onRemove",value:function(){google.maps.event.removeListener(this.idleListener),this.reset()}},{key:"reset",value:function(){this.markers.forEach((function(t){return Ei.setMap(t,null)})),this.clusters.forEach((function(t){return t.delete()})),this.clusters=[]}},{key:"renderClusters",value:function(){var e=this,r=new qu(this.markers,this.clusters),n=this.getMap();this.clusters.forEach((function(o){1===o.markers.length?o.marker=o.markers[0]:(o.marker=e.renderer.render(o,r,n),e.onClusterClick&&o.marker.addListener("click",(function(r){google.maps.event.trigger(e,t.MarkerClustererEvents.CLUSTER_CLICK,o),e.onClusterClick(r,o,n)}))),Ei.setMap(o.marker,n)}))}}]),s}(Ku);return t.AbstractAlgorithm=Ti,t.AbstractViewportAlgorithm=Li,t.Cluster=Mi,t.ClusterStats=qu,t.DefaultRenderer=Xu,t.GridAlgorithm=Yi,t.MarkerClusterer=Qu,t.NoopAlgorithm=Ki,t.SuperClusterAlgorithm=Is,t.defaultOnClusterClickHandler=Ju,t.distanceBetweenPoints=Pi,t.extendBoundsToPaddedViewport=ji,t.extendPixelBounds=_i,t.filterMarkersToPaddedViewport=xi,t.noop=Ii,t.pixelBoundsToLatLngBounds=Ci,Object.defineProperty(t,"__esModule",{value:!0}),t}({}); | ||
var markerClusterer=function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=n.key,i=void 0,"symbol"==typeof(i=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"))?i:String(i)),n)}var o,i}function n(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function a(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=i(t);if(e){var o=i(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return a(this,r)}}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,s,a=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(t,e)||f(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||f(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){if(t){if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var m=function(t){return t&&t.Math==Math&&t},g=m("object"==typeof globalThis&&globalThis)||m("object"==typeof window&&window)||m("object"==typeof self&&self)||m("object"==typeof p&&p)||function(){return this}()||p||Function("return this")(),y={},v=function(t){try{return!!t()}catch(t){return!0}},b=!v((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),w=!v((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),k=w,O=Function.prototype.call,S=k?O.bind(O):function(){return O.apply(O,arguments)},E={},M={}.propertyIsEnumerable,x=Object.getOwnPropertyDescriptor,j=x&&!M.call({1:2},1);E.f=j?function(t){var e=x(this,t);return!!e&&e.enumerable}:M;var A,P,_=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},C=w,T=Function.prototype,L=T.call,I=C&&T.bind.bind(L,L),N=C?I:function(t){return function(){return L.apply(t,arguments)}},D=N,F=D({}.toString),R=D("".slice),z=function(t){return R(F(t),8,-1)},Z=v,U=z,B=Object,G=N("".split),V=Z((function(){return!B("z").propertyIsEnumerable(0)}))?function(t){return"String"==U(t)?G(t,""):B(t)}:B,W=function(t){return null==t},$=W,H=TypeError,q=function(t){if($(t))throw H("Can't call method on "+t);return t},X=V,Y=q,K=function(t){return X(Y(t))},J="object"==typeof document&&document.all,Q={all:J,IS_HTMLDDA:void 0===J&&void 0!==J},tt=Q.all,et=Q.IS_HTMLDDA?function(t){return"function"==typeof t||t===tt}:function(t){return"function"==typeof t},rt=et,nt=Q.all,ot=Q.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:rt(t)||t===nt}:function(t){return"object"==typeof t?null!==t:rt(t)},it=g,st=et,at=function(t,e){return arguments.length<2?(r=it[t],st(r)?r:void 0):it[t]&&it[t][e];var r},ut=N({}.isPrototypeOf),ct=g,lt="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ft=ct.process,ht=ct.Deno,pt=ft&&ft.versions||ht&&ht.version,dt=pt&&pt.v8;dt&&(P=(A=dt.split("."))[0]>0&&A[0]<4?1:+(A[0]+A[1])),!P&<&&(!(A=lt.match(/Edge\/(\d+)/))||A[1]>=74)&&(A=lt.match(/Chrome\/(\d+)/))&&(P=+A[1]);var mt=P,gt=mt,yt=v,vt=g.String,bt=!!Object.getOwnPropertySymbols&&!yt((function(){var t=Symbol();return!vt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&>&><41})),wt=bt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,kt=at,Ot=et,St=ut,Et=Object,Mt=wt?function(t){return"symbol"==typeof t}:function(t){var e=kt("Symbol");return Ot(e)&&St(e.prototype,Et(t))},xt=String,jt=function(t){try{return xt(t)}catch(t){return"Object"}},At=et,Pt=jt,_t=TypeError,Ct=function(t){if(At(t))return t;throw _t(Pt(t)+" is not a function")},Tt=Ct,Lt=W,It=S,Nt=et,Dt=ot,Ft=TypeError,Rt={exports:{}},zt=g,Zt=Object.defineProperty,Ut=function(t,e){try{Zt(zt,t,{value:e,configurable:!0,writable:!0})}catch(r){zt[t]=e}return e},Bt=Ut,Gt="__core-js_shared__",Vt=g[Gt]||Bt(Gt,{}),Wt=Vt;(Rt.exports=function(t,e){return Wt[t]||(Wt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var $t=Rt.exports,Ht=q,qt=Object,Xt=function(t){return qt(Ht(t))},Yt=Xt,Kt=N({}.hasOwnProperty),Jt=Object.hasOwn||function(t,e){return Kt(Yt(t),e)},Qt=N,te=0,ee=Math.random(),re=Qt(1..toString),ne=function(t){return"Symbol("+(void 0===t?"":t)+")_"+re(++te+ee,36)},oe=$t,ie=Jt,se=ne,ae=bt,ue=wt,ce=g.Symbol,le=oe("wks"),fe=ue?ce.for||ce:ce&&ce.withoutSetter||se,he=function(t){return ie(le,t)||(le[t]=ae&&ie(ce,t)?ce[t]:fe("Symbol."+t)),le[t]},pe=S,de=ot,me=Mt,ge=function(t,e){var r=t[e];return Lt(r)?void 0:Tt(r)},ye=function(t,e){var r,n;if("string"===e&&Nt(r=t.toString)&&!Dt(n=It(r,t)))return n;if(Nt(r=t.valueOf)&&!Dt(n=It(r,t)))return n;if("string"!==e&&Nt(r=t.toString)&&!Dt(n=It(r,t)))return n;throw Ft("Can't convert object to primitive value")},ve=TypeError,be=he("toPrimitive"),we=function(t,e){if(!de(t)||me(t))return t;var r,n=ge(t,be);if(n){if(void 0===e&&(e="default"),r=pe(n,t,e),!de(r)||me(r))return r;throw ve("Can't convert object to primitive value")}return void 0===e&&(e="number"),ye(t,e)},ke=we,Oe=Mt,Se=function(t){var e=ke(t,"string");return Oe(e)?e:e+""},Ee=ot,Me=g.document,xe=Ee(Me)&&Ee(Me.createElement),je=function(t){return xe?Me.createElement(t):{}},Ae=je,Pe=!b&&!v((function(){return 7!=Object.defineProperty(Ae("div"),"a",{get:function(){return 7}}).a})),_e=b,Ce=S,Te=E,Le=_,Ie=K,Ne=Se,De=Jt,Fe=Pe,Re=Object.getOwnPropertyDescriptor;y.f=_e?Re:function(t,e){if(t=Ie(t),e=Ne(e),Fe)try{return Re(t,e)}catch(t){}if(De(t,e))return Le(!Ce(Te.f,t,e),t[e])};var ze={},Ze=b&&v((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ue=ot,Be=String,Ge=TypeError,Ve=function(t){if(Ue(t))return t;throw Ge(Be(t)+" is not an object")},We=b,$e=Pe,He=Ze,qe=Ve,Xe=Se,Ye=TypeError,Ke=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,Qe="enumerable",tr="configurable",er="writable";ze.f=We?He?function(t,e,r){if(qe(t),e=Xe(e),qe(r),"function"==typeof t&&"prototype"===e&&"value"in r&&er in r&&!r[er]){var n=Je(t,e);n&&n[er]&&(t[e]=r.value,r={configurable:tr in r?r[tr]:n[tr],enumerable:Qe in r?r[Qe]:n[Qe],writable:!1})}return Ke(t,e,r)}:Ke:function(t,e,r){if(qe(t),e=Xe(e),qe(r),$e)try{return Ke(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Ye("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var rr=ze,nr=_,or=b?function(t,e,r){return rr.f(t,e,nr(1,r))}:function(t,e,r){return t[e]=r,t},ir={exports:{}},sr=b,ar=Jt,ur=Function.prototype,cr=sr&&Object.getOwnPropertyDescriptor,lr=ar(ur,"name"),fr={EXISTS:lr,PROPER:lr&&"something"===function(){}.name,CONFIGURABLE:lr&&(!sr||sr&&cr(ur,"name").configurable)},hr=et,pr=Vt,dr=N(Function.toString);hr(pr.inspectSource)||(pr.inspectSource=function(t){return dr(t)});var mr,gr,yr,vr=pr.inspectSource,br=et,wr=g.WeakMap,kr=br(wr)&&/native code/.test(String(wr)),Or=ne,Sr=$t("keys"),Er=function(t){return Sr[t]||(Sr[t]=Or(t))},Mr={},xr=kr,jr=g,Ar=ot,Pr=or,_r=Jt,Cr=Vt,Tr=Er,Lr=Mr,Ir="Object already initialized",Nr=jr.TypeError,Dr=jr.WeakMap;if(xr||Cr.state){var Fr=Cr.state||(Cr.state=new Dr);Fr.get=Fr.get,Fr.has=Fr.has,Fr.set=Fr.set,mr=function(t,e){if(Fr.has(t))throw Nr(Ir);return e.facade=t,Fr.set(t,e),e},gr=function(t){return Fr.get(t)||{}},yr=function(t){return Fr.has(t)}}else{var Rr=Tr("state");Lr[Rr]=!0,mr=function(t,e){if(_r(t,Rr))throw Nr(Ir);return e.facade=t,Pr(t,Rr,e),e},gr=function(t){return _r(t,Rr)?t[Rr]:{}},yr=function(t){return _r(t,Rr)}}var zr={set:mr,get:gr,has:yr,enforce:function(t){return yr(t)?gr(t):mr(t,{})},getterFor:function(t){return function(e){var r;if(!Ar(e)||(r=gr(e)).type!==t)throw Nr("Incompatible receiver, "+t+" required");return r}}},Zr=N,Ur=v,Br=et,Gr=Jt,Vr=b,Wr=fr.CONFIGURABLE,$r=vr,Hr=zr.enforce,qr=zr.get,Xr=String,Yr=Object.defineProperty,Kr=Zr("".slice),Jr=Zr("".replace),Qr=Zr([].join),tn=Vr&&!Ur((function(){return 8!==Yr((function(){}),"length",{value:8}).length})),en=String(String).split("String"),rn=ir.exports=function(t,e,r){"Symbol("===Kr(Xr(e),0,7)&&(e="["+Jr(Xr(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Gr(t,"name")||Wr&&t.name!==e)&&(Vr?Yr(t,"name",{value:e,configurable:!0}):t.name=e),tn&&r&&Gr(r,"arity")&&t.length!==r.arity&&Yr(t,"length",{value:r.arity});try{r&&Gr(r,"constructor")&&r.constructor?Vr&&Yr(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=Hr(t);return Gr(n,"source")||(n.source=Qr(en,"string"==typeof e?e:"")),t};Function.prototype.toString=rn((function(){return Br(this)&&qr(this).source||$r(this)}),"toString");var nn=ir.exports,on=et,sn=ze,an=nn,un=Ut,cn=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(on(r)&&an(r,i,n),n.global)o?t[e]=r:un(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:sn.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},ln={},fn=Math.ceil,hn=Math.floor,pn=Math.trunc||function(t){var e=+t;return(e>0?hn:fn)(e)},dn=function(t){var e=+t;return e!=e||0===e?0:pn(e)},mn=dn,gn=Math.max,yn=Math.min,vn=function(t,e){var r=mn(t);return r<0?gn(r+e,0):yn(r,e)},bn=dn,wn=Math.min,kn=function(t){return t>0?wn(bn(t),9007199254740991):0},On=function(t){return kn(t.length)},Sn=K,En=vn,Mn=On,xn=function(t){return function(e,r,n){var o,i=Sn(e),s=Mn(i),a=En(n,s);if(t&&r!=r){for(;s>a;)if((o=i[a++])!=o)return!0}else for(;s>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},jn={includes:xn(!0),indexOf:xn(!1)},An=Jt,Pn=K,_n=jn.indexOf,Cn=Mr,Tn=N([].push),Ln=function(t,e){var r,n=Pn(t),o=0,i=[];for(r in n)!An(Cn,r)&&An(n,r)&&Tn(i,r);for(;e.length>o;)An(n,r=e[o++])&&(~_n(i,r)||Tn(i,r));return i},In=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Nn=Ln,Dn=In.concat("length","prototype");ln.f=Object.getOwnPropertyNames||function(t){return Nn(t,Dn)};var Fn={};Fn.f=Object.getOwnPropertySymbols;var Rn=at,zn=ln,Zn=Fn,Un=Ve,Bn=N([].concat),Gn=Rn("Reflect","ownKeys")||function(t){var e=zn.f(Un(t)),r=Zn.f;return r?Bn(e,r(t)):e},Vn=Jt,Wn=Gn,$n=y,Hn=ze,qn=v,Xn=et,Yn=/#|\.prototype\./,Kn=function(t,e){var r=Qn[Jn(t)];return r==eo||r!=to&&(Xn(e)?qn(e):!!e)},Jn=Kn.normalize=function(t){return String(t).replace(Yn,".").toLowerCase()},Qn=Kn.data={},to=Kn.NATIVE="N",eo=Kn.POLYFILL="P",ro=Kn,no=g,oo=y.f,io=or,so=cn,ao=Ut,uo=function(t,e,r){for(var n=Wn(e),o=Hn.f,i=$n.f,s=0;s<n.length;s++){var a=n[s];Vn(t,a)||r&&Vn(r,a)||o(t,a,i(e,a))}},co=ro,lo=function(t,e){var r,n,o,i,s,a=t.target,u=t.global,c=t.stat;if(r=u?no:c?no[a]||ao(a,{}):(no[a]||{}).prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(s=oo(r,n))&&s.value:r[n],!co(u?n:a+(c?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;uo(i,o)}(t.sham||o&&o.sham)&&io(i,"sham",!0),so(r,n,i,t)}},fo=z,ho=N,po=function(t){if("Function"===fo(t))return ho(t)},mo=Ct,go=w,yo=po(po.bind),vo=z,bo=Array.isArray||function(t){return"Array"==vo(t)},wo={};wo[he("toStringTag")]="z";var ko="[object z]"===String(wo),Oo=ko,So=et,Eo=z,Mo=he("toStringTag"),xo=Object,jo="Arguments"==Eo(function(){return arguments}()),Ao=Oo?Eo:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=xo(t),Mo))?r:jo?Eo(e):"Object"==(n=Eo(e))&&So(e.callee)?"Arguments":n},Po=N,_o=v,Co=et,To=Ao,Lo=vr,Io=function(){},No=[],Do=at("Reflect","construct"),Fo=/^\s*(?:class|function)\b/,Ro=Po(Fo.exec),zo=!Fo.exec(Io),Zo=function(t){if(!Co(t))return!1;try{return Do(Io,No,t),!0}catch(t){return!1}},Uo=function(t){if(!Co(t))return!1;switch(To(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return zo||!!Ro(Fo,Lo(t))}catch(t){return!0}};Uo.sham=!0;var Bo=!Do||_o((function(){var t;return Zo(Zo.call)||!Zo(Object)||!Zo((function(){t=!0}))||t}))?Uo:Zo,Go=bo,Vo=Bo,Wo=ot,$o=he("species"),Ho=Array,qo=function(t){var e;return Go(t)&&(e=t.constructor,(Vo(e)&&(e===Ho||Go(e.prototype))||Wo(e)&&null===(e=e[$o]))&&(e=void 0)),void 0===e?Ho:e},Xo=function(t,e){return new(qo(t))(0===e?0:e)},Yo=function(t,e){return mo(t),void 0===e?t:go?yo(t,e):function(){return t.apply(e,arguments)}},Ko=V,Jo=Xt,Qo=On,ti=Xo,ei=N([].push),ri=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,s=7==t,a=5==t||i;return function(u,c,l,f){for(var h,p,d=Jo(u),m=Ko(d),g=Yo(c,l),y=Qo(m),v=0,b=f||ti,w=e?b(u,y):r||s?b(u,0):void 0;y>v;v++)if((a||v in m)&&(p=g(h=m[v],v,d),t))if(e)w[v]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return v;case 2:ei(w,h)}else switch(t){case 4:return!1;case 7:ei(w,h)}return i?-1:n||o?o:w}},ni={forEach:ri(0),map:ri(1),filter:ri(2),some:ri(3),every:ri(4),find:ri(5),findIndex:ri(6),filterReject:ri(7)},oi=v,ii=mt,si=he("species"),ai=function(t){return ii>=51||!oi((function(){var e=[];return(e.constructor={})[si]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},ui=ni.map;function ci(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}lo({target:"Array",proto:!0,forced:!ai("map")},{map:function(t){return ui(this,t,arguments.length>1?arguments[1]:void 0)}});var li=ni.filter;lo({target:"Array",proto:!0,forced:!ai("filter")},{filter:function(t){return li(this,t,arguments.length>1?arguments[1]:void 0)}});var fi=Ao,hi=ko?{}.toString:function(){return"[object "+fi(this)+"]"};ko||cn(Object.prototype,"toString",hi,{unsafe:!0});var pi=function(){function t(){e(this,t)}return n(t,null,[{key:"isAdvancedMarker",value:function(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}},{key:"setMap",value:function(t,e){this.isAdvancedMarker(t)?t.map=e:t.setMap(e)}},{key:"getPosition",value:function(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(t.position.lat&&t.position.lng)return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}},{key:"getVisible",value:function(t){return!!this.isAdvancedMarker(t)||t.getVisible()}}]),t}(),di=function(){function t(r){var n=r.markers,o=r.position;e(this,t),this.markers=n,o&&(o instanceof google.maps.LatLng?this._position=o:this._position=new google.maps.LatLng(o))}return n(t,[{key:"bounds",get:function(){if(0!==this.markers.length||this._position){var t,e=new google.maps.LatLngBounds(this._position,this._position),r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=f(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}(this.markers);try{for(r.s();!(t=r.n()).done;){var n=t.value;e.extend(pi.getPosition(n))}}catch(t){r.e(t)}finally{r.f()}return e}}},{key:"position",get:function(){return this._position||this.bounds.getCenter()}},{key:"count",get:function(){return this.markers.filter((function(t){return pi.getVisible(t)})).length}},{key:"push",value:function(t){this.markers.push(t)}},{key:"delete",value:function(){this.marker&&(pi.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}]),t}(),mi=function(t,e,r,n){var o=gi(t.getBounds(),e,n);return r.filter((function(t){return o.contains(pi.getPosition(t))}))},gi=function(t,e,r){var n=vi(t,e),o=n.northEast,i=n.southWest,s=bi({northEast:o,southWest:i},r);return wi(s,e)},yi=function(t,e){var r=(e.lat-t.lat)*Math.PI/180,n=(e.lng-t.lng)*Math.PI/180,o=Math.sin(r/2)*Math.sin(r/2)+Math.cos(t.lat*Math.PI/180)*Math.cos(e.lat*Math.PI/180)*Math.sin(n/2)*Math.sin(n/2);return 6371*(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)))},vi=function(t,e){return{northEast:e.fromLatLngToDivPixel(t.getNorthEast()),southWest:e.fromLatLngToDivPixel(t.getSouthWest())}},bi=function(t,e){var r=t.northEast,n=t.southWest;return r.x+=e,r.y-=e,n.x-=e,n.y+=e,{northEast:r,southWest:n}},wi=function(t,e){var r=t.northEast,n=t.southWest,o=e.fromDivPixelToLatLng(n),i=e.fromDivPixelToLatLng(r);return new google.maps.LatLngBounds(o,i)},ki=function(){function t(r){var n=r.maxZoom,o=void 0===n?16:n;e(this,t),this.maxZoom=o}return n(t,[{key:"noop",value:function(t){var e=t.markers;return Si(e)}}]),t}(),Oi=function(t){o(i,t);var r=u(i);function i(t){var n;e(this,i);var o=t.viewportPadding,s=void 0===o?60:o,a=ci(t,["viewportPadding"]);return(n=r.call(this,a)).viewportPadding=60,n.viewportPadding=s,n}return n(i,[{key:"calculate",value:function(t){var e=t.markers,r=t.map,n=t.mapCanvasProjection;return r.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:mi(r,n,e,this.viewportPadding),map:r,mapCanvasProjection:n})}}}]),i}(ki),Si=function(t){return t.map((function(t){return new di({position:pi.getPosition(t),markers:[t]})}))},Ei=je("span").classList,Mi=Ei&&Ei.constructor&&Ei.constructor.prototype,xi=Mi===Object.prototype?void 0:Mi,ji=v,Ai=function(t,e){var r=[][t];return!!r&&ji((function(){r.call(null,e||function(){return 1},1)}))},Pi=ni.forEach,_i=Ai("forEach")?[].forEach:function(t){return Pi(this,t,arguments.length>1?arguments[1]:void 0)},Ci=g,Ti={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Li=xi,Ii=_i,Ni=or,Di=function(t){if(t&&t.forEach!==Ii)try{Ni(t,"forEach",Ii)}catch(e){t.forEach=Ii}};for(var Fi in Ti)Ti[Fi]&&Di(Ci[Fi]&&Ci[Fi].prototype);Di(Li);var Ri=S;lo({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return Ri(URL.prototype.toString,this)}});var zi=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(e)){if((n=e.length)!=r.length)return!1;for(o=n;0!=o--;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((n=(i=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var s=i[o];if(!t(e[s],r[s]))return!1}return!0}return e!=e&&r!=r},Zi=d(zi),Ui=function(t){o(i,t);var r=u(i);function i(t){var n;e(this,i);var o=t.maxDistance,s=void 0===o?4e4:o,a=t.gridSize,u=void 0===a?40:a,c=ci(t,["maxDistance","gridSize"]);return(n=r.call(this,c)).clusters=[],n.maxDistance=s,n.gridSize=u,n.state={zoom:null},n}return n(i,[{key:"calculate",value:function(t){var e=t.markers,r=t.map,n=t.mapCanvasProjection,o={zoom:r.getZoom()},i=!1;return this.state.zoom>this.maxZoom&&o.zoom>this.maxZoom||(i=!Zi(this.state,o)),this.state=o,r.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:i}:{clusters:this.cluster({markers:mi(r,n,e,this.viewportPadding),map:r,mapCanvasProjection:n})}}},{key:"cluster",value:function(t){var e=this,r=t.markers,n=t.map,o=t.mapCanvasProjection;return this.clusters=[],r.forEach((function(t){e.addToClosestCluster(t,n,o)})),this.clusters}},{key:"addToClosestCluster",value:function(t,e,r){for(var n=this.maxDistance,o=null,i=0;i<this.clusters.length;i++){var s=this.clusters[i],a=yi(s.bounds.getCenter().toJSON(),pi.getPosition(t).toJSON());a<n&&(n=a,o=s)}if(o&&gi(o.bounds,r,this.gridSize).contains(pi.getPosition(t)))o.push(t);else{var u=new di({markers:[t]});this.clusters.push(u)}}}]),i}(Oi),Bi=function(t){o(i,t);var r=u(i);function i(t){e(this,i);var n=ci(t,[]);return r.call(this,n)}return n(i,[{key:"calculate",value:function(t){var e=t.markers,r=t.map,n=t.mapCanvasProjection;return{clusters:this.cluster({markers:e,map:r,mapCanvasProjection:n}),changed:!1}}},{key:"cluster",value:function(t){return this.noop(t)}}]),i}(ki),Gi=Ln,Vi=In,Wi=Object.keys||function(t){return Gi(t,Vi)},$i=b,Hi=N,qi=S,Xi=v,Yi=Wi,Ki=Fn,Ji=E,Qi=Xt,ts=V,es=Object.assign,rs=Object.defineProperty,ns=Hi([].concat),os=!es||Xi((function(){if($i&&1!==es({b:1},es(rs({},"a",{enumerable:!0,get:function(){rs(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=es({},t)[r]||Yi(es({},e)).join("")!=n}))?function(t,e){for(var r=Qi(t),n=arguments.length,o=1,i=Ki.f,s=Ji.f;n>o;)for(var a,u=ts(arguments[o++]),c=i?ns(Yi(u),i(u)):Yi(u),l=c.length,f=0;l>f;)a=c[f++],$i&&!qi(s,u,a)||(r[a]=u[a]);return r}:es,is=os;lo({target:"Object",stat:!0,arity:2,forced:Object.assign!==is},{assign:is});const ss=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class as{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[e,r]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const n=r>>4;if(1!==n)throw new Error(`Got v${n} data when expected v1.`);const o=ss[15&r];if(!o)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1);return new as(s,i,o,t)}constructor(t,e=64,r=Float64Array,n){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const o=ss.indexOf(this.ArrayType),i=2*t*this.ArrayType.BYTES_PER_ELEMENT,s=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-s%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+s+a,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+i+s+a),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+s+a,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+o]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return us(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:i,nodeSize:s}=this,a=[0,o.length-1,0],u=[];for(;a.length;){const c=a.pop()||0,l=a.pop()||0,f=a.pop()||0;if(l-f<=s){for(let s=f;s<=l;s++){const a=i[2*s],c=i[2*s+1];a>=t&&a<=r&&c>=e&&c<=n&&u.push(o[s])}continue}const h=f+l>>1,p=i[2*h],d=i[2*h+1];p>=t&&p<=r&&d>=e&&d<=n&&u.push(o[h]),(0===c?t<=p:e<=d)&&(a.push(f),a.push(h-1),a.push(1-c)),(0===c?r>=p:n>=d)&&(a.push(h+1),a.push(l),a.push(1-c))}return u}within(t,e,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:o,nodeSize:i}=this,s=[0,n.length-1,0],a=[],u=r*r;for(;s.length;){const c=s.pop()||0,l=s.pop()||0,f=s.pop()||0;if(l-f<=i){for(let r=f;r<=l;r++)hs(o[2*r],o[2*r+1],t,e)<=u&&a.push(n[r]);continue}const h=f+l>>1,p=o[2*h],d=o[2*h+1];hs(p,d,t,e)<=u&&a.push(n[h]),(0===c?t-r<=p:e-r<=d)&&(s.push(f),s.push(h-1),s.push(1-c)),(0===c?t+r>=p:e+r>=d)&&(s.push(h+1),s.push(l),s.push(1-c))}return a}}function us(t,e,r,n,o,i){if(o-n<=r)return;const s=n+o>>1;cs(t,e,s,n,o,i),us(t,e,r,n,s-1,1-i),us(t,e,r,s+1,o,1-i)}function cs(t,e,r,n,o,i){for(;o>n;){if(o-n>600){const s=o-n+1,a=r-n+1,u=Math.log(s),c=.5*Math.exp(2*u/3),l=.5*Math.sqrt(u*c*(s-c)/s)*(a-s/2<0?-1:1);cs(t,e,r,Math.max(n,Math.floor(r-a*c/s+l)),Math.min(o,Math.floor(r+(s-a)*c/s+l)),i)}const s=e[2*r+i];let a=n,u=o;for(ls(t,e,n,r),e[2*o+i]>s&&ls(t,e,n,o);a<u;){for(ls(t,e,a,u),a++,u--;e[2*a+i]<s;)a++;for(;e[2*u+i]>s;)u--}e[2*n+i]===s?ls(t,e,n,u):(u++,ls(t,e,u,o)),u<=r&&(n=u+1),r<=u&&(o=u-1)}}function ls(t,e,r,n){fs(t,r,n),fs(e,2*r,2*n),fs(e,2*r+1,2*n+1)}function fs(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function hs(t,e,r,n){const o=t-r,i=e-n;return o*o+i*i}const ps={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},ds=Math.fround||(ms=new Float32Array(1),t=>(ms[0]=+t,ms[0]));var ms;const gs=3,ys=5,vs=6;class bs{constructor(t){this.options=Object.assign(Object.create(ps),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:r,maxZoom:n}=this.options;e&&console.time("total time");const o=`prepare ${t.length} points`;e&&console.time(o),this.points=t;const i=[];for(let e=0;e<t.length;e++){const r=t[e];if(!r.geometry)continue;const[n,o]=r.geometry.coordinates,s=ds(Os(n)),a=ds(Ss(o));i.push(s,a,1/0,e,-1,1),this.options.reduce&&i.push(0)}let s=this.trees[n+1]=this._createTree(i);e&&console.timeEnd(o);for(let t=n;t>=r;t--){const r=+Date.now();s=this.trees[t]=this._createTree(this._cluster(s,t)),e&&console.log("z%d: %d clusters in %dms",t,s.numItems,+Date.now()-r)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let r=((t[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[1]));let o=180===t[2]?180:((t[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,o=180;else if(r>o){const t=this.getClusters([r,n,180,i],e),s=this.getClusters([-180,n,o,i],e);return t.concat(s)}const s=this.trees[this._limitZoom(e)],a=s.range(Os(r),Ss(i),Os(o),Ss(n)),u=s.data,c=[];for(const t of a){const e=this.stride*t;c.push(u[e+ys]>1?ws(u,e,this.clusterProps):this.points[u[e+gs]])}return c}getChildren(t){const e=this._getOriginId(t),r=this._getOriginZoom(t),n="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(n);const i=o.data;if(e*this.stride>=i.length)throw new Error(n);const s=this.options.radius/(this.options.extent*Math.pow(2,r-1)),a=i[e*this.stride],u=i[e*this.stride+1],c=o.within(a,u,s),l=[];for(const e of c){const r=e*this.stride;i[r+4]===t&&l.push(i[r+ys]>1?ws(i,r,this.clusterProps):this.points[i[r+gs]])}if(0===l.length)throw new Error(n);return l}getLeaves(t,e,r){e=e||10,r=r||0;const n=[];return this._appendLeaves(n,t,e,r,0),n}getTile(t,e,r){const n=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:i,radius:s}=this.options,a=s/i,u=(r-a)/o,c=(r+1+a)/o,l={features:[]};return this._addTileFeatures(n.range((e-a)/o,u,(e+1+a)/o,c),n.data,e,r,o,l),0===e&&this._addTileFeatures(n.range(1-a/o,u,1,c),n.data,o,r,o,l),e===o-1&&this._addTileFeatures(n.range(0,u,a/o,c),n.data,-1,r,o,l),l.features.length?l:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e}_appendLeaves(t,e,r,n,o){const i=this.getChildren(e);for(const e of i){const i=e.properties;if(i&&i.cluster?o+i.point_count<=n?o+=i.point_count:o=this._appendLeaves(t,i.cluster_id,r,n,o):o<n?o++:t.push(e),t.length===r)break}return o}_createTree(t){const e=new as(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)e.add(t[r],t[r+1]);return e.finish(),e.data=t,e}_addTileFeatures(t,e,r,n,o,i){for(const s of t){const t=s*this.stride,a=e[t+ys]>1;let u,c,l;if(a)u=ks(e,t,this.clusterProps),c=e[t],l=e[t+1];else{const r=this.points[e[t+gs]];u=r.properties;const[n,o]=r.geometry.coordinates;c=Os(n),l=Ss(o)}const f={type:1,geometry:[[Math.round(this.options.extent*(c*o-r)),Math.round(this.options.extent*(l*o-n))]],tags:u};let h;h=a||this.options.generateId?e[t+gs]:this.points[e[t+gs]].id,void 0!==h&&(f.id=h),i.features.push(f)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:r,extent:n,reduce:o,minPoints:i}=this.options,s=r/(n*Math.pow(2,e)),a=t.data,u=[],c=this.stride;for(let r=0;r<a.length;r+=c){if(a[r+2]<=e)continue;a[r+2]=e;const n=a[r],l=a[r+1],f=t.within(a[r],a[r+1],s),h=a[r+ys];let p=h;for(const t of f){const r=t*c;a[r+2]>e&&(p+=a[r+ys])}if(p>h&&p>=i){let t,i=n*h,s=l*h,d=-1;const m=((r/c|0)<<5)+(e+1)+this.points.length;for(const n of f){const u=n*c;if(a[u+2]<=e)continue;a[u+2]=e;const l=a[u+ys];i+=a[u]*l,s+=a[u+1]*l,a[u+4]=m,o&&(t||(t=this._map(a,r,!0),d=this.clusterProps.length,this.clusterProps.push(t)),o(t,this._map(a,u)))}a[r+4]=m,u.push(i/p,s/p,1/0,m,-1,p),o&&u.push(d)}else{for(let t=0;t<c;t++)u.push(a[r+t]);if(p>1)for(const t of f){const r=t*c;if(!(a[r+2]<=e)){a[r+2]=e;for(let t=0;t<c;t++)u.push(a[r+t])}}}}return u}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,r){if(t[e+ys]>1){const n=this.clusterProps[t[e+vs]];return r?Object.assign({},n):n}const n=this.points[t[e+gs]].properties,o=this.options.map(n);return r&&o===n?Object.assign({},o):o}}function ws(t,e,r){return{type:"Feature",id:t[e+gs],properties:ks(t,e,r),geometry:{type:"Point",coordinates:[(n=t[e],360*(n-.5)),Es(t[e+1])]}};var n}function ks(t,e,r){const n=t[e+ys],o=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,i=t[e+vs],s=-1===i?{}:Object.assign({},r[i]);return Object.assign(s,{cluster:!0,cluster_id:t[e+gs],point_count:n,point_count_abbreviated:o})}function Os(t){return t/360+.5}function Ss(t){const e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Es(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}var Ms=function(t){o(i,t);var r=u(i);function i(t){var n;e(this,i);var o=t.maxZoom,s=t.radius,a=void 0===s?60:s,u=ci(t,["maxZoom","radius"]);return(n=r.call(this,{maxZoom:o})).superCluster=new bs(Object.assign({maxZoom:n.maxZoom,radius:a},u)),n.state={zoom:null},n}return n(i,[{key:"calculate",value:function(t){var e=!1,r={zoom:t.map.getZoom()};if(!Zi(t.markers,this.markers)){e=!0,this.markers=l(t.markers);var n=this.markers.map((function(t){var e=pi.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}}));this.superCluster.load(n)}return e||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(e=!Zi(this.state,r)),this.state=r,e&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:e}}},{key:"cluster",value:function(t){var e=this,r=t.map;return this.superCluster.getClusters([-180,-90,180,90],Math.round(r.getZoom())).map((function(t){return e.transformCluster(t)}))}},{key:"transformCluster",value:function(t){var e=c(t.geometry.coordinates,2),r=e[0],n=e[1],o=t.properties;if(o.cluster)return new di({markers:this.superCluster.getLeaves(o.cluster_id,1/0).map((function(t){return t.properties.marker})),position:{lat:n,lng:r}});var i=o.marker;return new di({markers:[i],position:pi.getPosition(i)})}}]),i}(ki),xs={},js=b,As=Ze,Ps=ze,_s=Ve,Cs=K,Ts=Wi;xs.f=js&&!As?Object.defineProperties:function(t,e){_s(t);for(var r,n=Cs(e),o=Ts(e),i=o.length,s=0;i>s;)Ps.f(t,r=o[s++],n[r]);return t};var Ls,Is=at("document","documentElement"),Ns=Ve,Ds=xs,Fs=In,Rs=Mr,zs=Is,Zs=je,Us="prototype",Bs="script",Gs=Er("IE_PROTO"),Vs=function(){},Ws=function(t){return"<"+Bs+">"+t+"</"+Bs+">"},$s=function(t){t.write(Ws("")),t.close();var e=t.parentWindow.Object;return t=null,e},Hs=function(){try{Ls=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;Hs="undefined"!=typeof document?document.domain&&Ls?$s(Ls):(e=Zs("iframe"),r="java"+Bs+":",e.style.display="none",zs.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(Ws("document.F=Object")),t.close(),t.F):$s(Ls);for(var n=Fs.length;n--;)delete Hs[Us][Fs[n]];return Hs()};Rs[Gs]=!0;var qs=he,Xs=Object.create||function(t,e){var r;return null!==t?(Vs[Us]=Ns(t),r=new Vs,Vs[Us]=null,r[Gs]=t):r=Hs(),void 0===e?r:Ds.f(r,e)},Ys=ze.f,Ks=qs("unscopables"),Js=Array.prototype;null==Js[Ks]&&Ys(Js,Ks,{configurable:!0,value:Xs(null)});var Qs=jn.includes,ta=function(t){Js[Ks][t]=!0};lo({target:"Array",proto:!0,forced:v((function(){return!Array(1).includes()}))},{includes:function(t){return Qs(this,t,arguments.length>1?arguments[1]:void 0)}}),ta("includes");var ea=ot,ra=z,na=he("match"),oa=function(t){var e;return ea(t)&&(void 0!==(e=t[na])?!!e:"RegExp"==ra(t))},ia=TypeError,sa=Ao,aa=String,ua=function(t){if("Symbol"===sa(t))throw TypeError("Cannot convert a Symbol value to a string");return aa(t)},ca=he("match"),la=lo,fa=function(t){if(oa(t))throw ia("The method doesn't accept regular expressions");return t},ha=q,pa=ua,da=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[ca]=!1,"/./"[t](e)}catch(t){}}return!1},ma=N("".indexOf);la({target:"String",proto:!0,forced:!da("includes")},{includes:function(t){return!!~ma(pa(ha(this)),pa(fa(t)),arguments.length>1?arguments[1]:void 0)}});var ga=lo,ya=jn.indexOf,va=Ai,ba=po([].indexOf),wa=!!ba&&1/ba([1],1,-0)<0;ga({target:"Array",proto:!0,forced:wa||!va("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return wa?ba(this,t,e)||0:ya(this,t,e)}});var ka=b,Oa=bo,Sa=TypeError,Ea=Object.getOwnPropertyDescriptor,Ma=ka&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),xa=TypeError,ja=Se,Aa=ze,Pa=_,_a=jt,Ca=TypeError,Ta=lo,La=Xt,Ia=vn,Na=dn,Da=On,Fa=Ma?function(t,e){if(Oa(t)&&!Ea(t,"length").writable)throw Sa("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Ra=function(t){if(t>9007199254740991)throw xa("Maximum allowed index exceeded");return t},za=Xo,Za=function(t,e,r){var n=ja(e);n in t?Aa.f(t,n,Pa(0,r)):t[n]=r},Ua=function(t,e){if(!delete t[e])throw Ca("Cannot delete property "+_a(e)+" of "+_a(t))},Ba=ai("splice"),Ga=Math.max,Va=Math.min;Ta({target:"Array",proto:!0,forced:!Ba},{splice:function(t,e){var r,n,o,i,s,a,u=La(this),c=Da(u),l=Ia(t,c),f=arguments.length;for(0===f?r=n=0:1===f?(r=0,n=c-l):(r=f-2,n=Va(Ga(Na(e),0),c-l)),Ra(c+r-n),o=za(u,n),i=0;i<n;i++)(s=l+i)in u&&Za(o,i,u[s]);if(o.length=n,r<n){for(i=l;i<c-n;i++)a=i+r,(s=i+n)in u?u[a]=u[s]:Ua(u,a);for(i=c;i>c-n+r;i--)Ua(u,i-1)}else if(r>n)for(i=c-n;i>l;i--)a=i+r-1,(s=i+n-1)in u?u[a]=u[s]:Ua(u,a);for(i=0;i<r;i++)u[i+l]=arguments[i+2];return Fa(u,c-n+r),o}});var Wa=Ct,$a=Xt,Ha=V,qa=On,Xa=TypeError,Ya=function(t){return function(e,r,n,o){Wa(r);var i=$a(e),s=Ha(i),a=qa(i),u=t?a-1:0,c=t?-1:1;if(n<2)for(;;){if(u in s){o=s[u],u+=c;break}if(u+=c,t?u<0:a<=u)throw Xa("Reduce of empty array with no initial value")}for(;t?u>=0:a>u;u+=c)u in s&&(o=r(o,s[u],u,i));return o}},Ka={left:Ya(!1),right:Ya(!0)},Ja="undefined"!=typeof process&&"process"==z(process),Qa=Ka.left;lo({target:"Array",proto:!0,forced:!Ja&&mt>79&&mt<83||!Ai("reduce")},{reduce:function(t){var e=arguments.length;return Qa(this,t,e,e>1?arguments[1]:void 0)}});var tu=g,eu=N,ru=Ct,nu=et,ou=String,iu=TypeError,su=function(t,e,r){try{return eu(ru(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}},au=Ve,uu=function(t){if("object"==typeof t||nu(t))return t;throw iu("Can't set "+ou(t)+" as a prototype")},cu=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=su(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return au(r),uu(n),e?t(r,n):r.__proto__=n,r}}():void 0),lu=et,fu=ot,hu=cu,pu=N(1..valueOf),du=q,mu=ua,gu="\t\n\v\f\r \u2028\u2029\ufeff",yu=N("".replace),vu=RegExp("^["+gu+"]+"),bu=RegExp("(^|[^"+gu+"])["+gu+"]+$"),wu=function(t){return function(e){var r=mu(du(e));return 1&t&&(r=yu(r,vu,"")),2&t&&(r=yu(r,bu,"$1")),r}},ku={start:wu(1),end:wu(2),trim:wu(3)},Ou=lo,Su=b,Eu=g,Mu=tu,xu=N,ju=ro,Au=Jt,Pu=function(t,e,r){var n,o;return hu&&lu(n=e.constructor)&&n!==r&&fu(o=n.prototype)&&o!==r.prototype&&hu(t,o),t},_u=ut,Cu=Mt,Tu=we,Lu=v,Iu=ln.f,Nu=y.f,Du=ze.f,Fu=pu,Ru=ku.trim,zu="Number",Zu=Eu[zu];Mu[zu];var Uu=Zu.prototype,Bu=Eu.TypeError,Gu=xu("".slice),Vu=xu("".charCodeAt),Wu=function(t){var e,r,n,o,i,s,a,u,c=Tu(t,"number");if(Cu(c))throw Bu("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=Ru(c),43===(e=Vu(c,0))||45===e){if(88===(r=Vu(c,2))||120===r)return NaN}else if(48===e){switch(Vu(c,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(s=(i=Gu(c,2)).length,a=0;a<s;a++)if((u=Vu(i,a))<48||u>o)return NaN;return parseInt(i,n)}return+c},$u=ju(zu,!Zu(" 0o1")||!Zu("0b1")||Zu("+0x1")),Hu=function(t){var e,r=arguments.length<1?0:Zu(function(t){var e=Tu(t,"number");return"bigint"==typeof e?e:Wu(e)}(t));return _u(Uu,e=this)&&Lu((function(){Fu(e)}))?Pu(Object(r),this,Hu):r};Hu.prototype=Uu,$u&&(Uu.constructor=Hu),Ou({global:!0,constructor:!0,wrap:!0,forced:$u},{Number:Hu});$u&&function(t,e){for(var r,n=Su?Iu(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;n.length>o;o++)Au(e,r=n[o])&&!Au(t,r)&&Du(t,r,Nu(e,r))}(Mu[zu],Zu);var qu=n((function t(r,n){e(this,t),this.markers={sum:r.length};var o=n.map((function(t){return t.count})),i=o.reduce((function(t,e){return t+e}),0);this.clusters={count:n.length,markers:{mean:i/n.length,sum:i,min:Math.min.apply(Math,l(o)),max:Math.max.apply(Math,l(o))}}})),Xu=function(){function t(){e(this,t)}return n(t,[{key:"render",value:function(t,e,r){var n=t.count,o=t.position,i=n>Math.max(10,e.clusters.markers.mean)?"#ff0000":"#0000ff",s='<svg fill="'.concat(i,'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240">\n <circle cx="120" cy="120" opacity=".6" r="70" />\n <circle cx="120" cy="120" opacity=".3" r="90" />\n <circle cx="120" cy="120" opacity=".2" r="110" />\n </svg>'),a="Cluster of ".concat(n," markers"),u=Number(google.maps.Marker.MAX_ZINDEX)+n;if(google.maps.marker&&r.getMapCapabilities().isAdvancedMarkersAvailable){var c=document.createElement("div");c.innerHTML=s;var l=c.firstElementChild;l.setAttribute("width","50"),l.setAttribute("height","50");var f=document.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("x","50%"),f.setAttribute("y","50%"),f.setAttribute("style","fill: #FFF"),f.setAttribute("text-anchor","middle"),f.setAttribute("font-size","50"),f.setAttribute("dominant-baseline","middle"),f.appendChild(document.createTextNode("".concat(n))),l.appendChild(f);var h={map:r,position:o,zIndex:u,title:a,content:c.firstElementChild};return new google.maps.marker.AdvancedMarkerElement(h)}var p={position:o,zIndex:u,title:a,icon:{url:"data:image/svg+xml;base64,".concat(window.btoa(s)),scaledSize:new google.maps.Size(45,45)},label:{text:String(n),color:"rgba(255,255,255,0.9)",fontSize:"12px"}};return new google.maps.Marker(p)}}]),t}();var Yu,Ku=n((function t(){e(this,t),function(t,e){for(var r in e.prototype)t.prototype[r]=e.prototype[r]}(t,google.maps.OverlayView)}));t.MarkerClustererEvents=void 0,(Yu=t.MarkerClustererEvents||(t.MarkerClustererEvents={})).CLUSTERING_BEGIN="clusteringbegin",Yu.CLUSTERING_END="clusteringend",Yu.CLUSTER_CLICK="click";var Ju=function(t,e,r){r.fitBounds(e.bounds)},Qu=function(r){o(s,r);var i=u(s);function s(t){var r,n=t.map,o=t.markers,a=void 0===o?[]:o,u=t.algorithmOptions,c=void 0===u?{}:u,f=t.algorithm,h=void 0===f?new Ms(c):f,p=t.renderer,d=void 0===p?new Xu:p,m=t.onClusterClick,g=void 0===m?Ju:m;return e(this,s),(r=i.call(this)).markers=l(a),r.clusters=[],r.algorithm=h,r.renderer=d,r.onClusterClick=g,n&&r.setMap(n),r}return n(s,[{key:"addMarker",value:function(t,e){this.markers.includes(t)||(this.markers.push(t),e||this.render())}},{key:"addMarkers",value:function(t,e){var r=this;t.forEach((function(t){r.addMarker(t,!0)})),e||this.render()}},{key:"removeMarker",value:function(t,e){var r=this.markers.indexOf(t);return-1!==r&&(pi.setMap(t,null),this.markers.splice(r,1),e||this.render(),!0)}},{key:"removeMarkers",value:function(t,e){var r=this,n=!1;return t.forEach((function(t){n=r.removeMarker(t,!0)||n})),n&&!e&&this.render(),n}},{key:"clearMarkers",value:function(t){this.markers.length=0,t||this.render()}},{key:"render",value:function(){var e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTERING_BEGIN,this);var r=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()}),n=r.clusters,o=r.changed;(o||null==o)&&(this.reset(),this.clusters=n,this.renderClusters()),google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTERING_END,this)}}},{key:"onAdd",value:function(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}},{key:"onRemove",value:function(){google.maps.event.removeListener(this.idleListener),this.reset()}},{key:"reset",value:function(){this.markers.forEach((function(t){return pi.setMap(t,null)})),this.clusters.forEach((function(t){return t.delete()})),this.clusters=[]}},{key:"renderClusters",value:function(){var e=this,r=new qu(this.markers,this.clusters),n=this.getMap();this.clusters.forEach((function(o){1===o.markers.length?o.marker=o.markers[0]:(o.marker=e.renderer.render(o,r,n),e.onClusterClick&&o.marker.addListener("click",(function(r){google.maps.event.trigger(e,t.MarkerClustererEvents.CLUSTER_CLICK,o),e.onClusterClick(r,o,n)}))),pi.setMap(o.marker,n)}))}}]),s}(Ku);return t.AbstractAlgorithm=ki,t.AbstractViewportAlgorithm=Oi,t.Cluster=di,t.ClusterStats=qu,t.DefaultRenderer=Xu,t.GridAlgorithm=Ui,t.MarkerClusterer=Qu,t.NoopAlgorithm=Bi,t.SuperClusterAlgorithm=Ms,t.defaultOnClusterClickHandler=Ju,t.distanceBetweenPoints=yi,t.extendBoundsToPaddedViewport=gi,t.extendPixelBounds=bi,t.filterMarkersToPaddedViewport=mi,t.noop=Si,t.pixelBoundsToLatLngBounds=wi,Object.defineProperty(t,"__esModule",{value:!0}),t}({}); | ||
//# sourceMappingURL=index.min.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).markerClusterer={})}(this,(function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=n.key,i=void 0,"symbol"==typeof(i=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"))?i:String(i)),n)}var o,i}function n(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function a(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=i(t);if(e){var o=i(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return a(this,r)}}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,s,a=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(t,e)||f(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||f(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){if(t){if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var m=function(t){return t&&t.Math==Math&&t},g=m("object"==typeof globalThis&&globalThis)||m("object"==typeof window&&window)||m("object"==typeof self&&self)||m("object"==typeof p&&p)||function(){return this}()||p||Function("return this")(),y={},v=function(t){try{return!!t()}catch(t){return!0}},b=!v((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),w=!v((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),k=w,O=Function.prototype.call,S=k?O.bind(O):function(){return O.apply(O,arguments)},E={},M={}.propertyIsEnumerable,x=Object.getOwnPropertyDescriptor,j=x&&!M.call({1:2},1);E.f=j?function(t){var e=x(this,t);return!!e&&e.enumerable}:M;var P,A,_=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},C=w,T=Function.prototype,L=T.call,I=C&&T.bind.bind(L,L),N=C?I:function(t){return function(){return L.apply(t,arguments)}},D=N,F=D({}.toString),R=D("".slice),z=function(t){return R(F(t),8,-1)},Z=v,U=z,B=Object,G=N("".split),V=Z((function(){return!B("z").propertyIsEnumerable(0)}))?function(t){return"String"==U(t)?G(t,""):B(t)}:B,W=function(t){return null==t},$=W,H=TypeError,q=function(t){if($(t))throw H("Can't call method on "+t);return t},X=V,Y=q,K=function(t){return X(Y(t))},J="object"==typeof document&&document.all,Q={all:J,IS_HTMLDDA:void 0===J&&void 0!==J},tt=Q.all,et=Q.IS_HTMLDDA?function(t){return"function"==typeof t||t===tt}:function(t){return"function"==typeof t},rt=et,nt=Q.all,ot=Q.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:rt(t)||t===nt}:function(t){return"object"==typeof t?null!==t:rt(t)},it=g,st=et,at=function(t,e){return arguments.length<2?(r=it[t],st(r)?r:void 0):it[t]&&it[t][e];var r},ut=N({}.isPrototypeOf),ct=g,lt="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ft=ct.process,ht=ct.Deno,pt=ft&&ft.versions||ht&&ht.version,dt=pt&&pt.v8;dt&&(A=(P=dt.split("."))[0]>0&&P[0]<4?1:+(P[0]+P[1])),!A&<&&(!(P=lt.match(/Edge\/(\d+)/))||P[1]>=74)&&(P=lt.match(/Chrome\/(\d+)/))&&(A=+P[1]);var mt=A,gt=mt,yt=v,vt=g.String,bt=!!Object.getOwnPropertySymbols&&!yt((function(){var t=Symbol();return!vt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&>&><41})),wt=bt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,kt=at,Ot=et,St=ut,Et=Object,Mt=wt?function(t){return"symbol"==typeof t}:function(t){var e=kt("Symbol");return Ot(e)&&St(e.prototype,Et(t))},xt=String,jt=function(t){try{return xt(t)}catch(t){return"Object"}},Pt=et,At=jt,_t=TypeError,Ct=function(t){if(Pt(t))return t;throw _t(At(t)+" is not a function")},Tt=Ct,Lt=W,It=S,Nt=et,Dt=ot,Ft=TypeError,Rt={exports:{}},zt=g,Zt=Object.defineProperty,Ut=function(t,e){try{Zt(zt,t,{value:e,configurable:!0,writable:!0})}catch(r){zt[t]=e}return e},Bt=Ut,Gt="__core-js_shared__",Vt=g[Gt]||Bt(Gt,{}),Wt=Vt;(Rt.exports=function(t,e){return Wt[t]||(Wt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var $t=Rt.exports,Ht=q,qt=Object,Xt=function(t){return qt(Ht(t))},Yt=Xt,Kt=N({}.hasOwnProperty),Jt=Object.hasOwn||function(t,e){return Kt(Yt(t),e)},Qt=N,te=0,ee=Math.random(),re=Qt(1..toString),ne=function(t){return"Symbol("+(void 0===t?"":t)+")_"+re(++te+ee,36)},oe=$t,ie=Jt,se=ne,ae=bt,ue=wt,ce=g.Symbol,le=oe("wks"),fe=ue?ce.for||ce:ce&&ce.withoutSetter||se,he=function(t){return ie(le,t)||(le[t]=ae&&ie(ce,t)?ce[t]:fe("Symbol."+t)),le[t]},pe=S,de=ot,me=Mt,ge=function(t,e){var r=t[e];return Lt(r)?void 0:Tt(r)},ye=function(t,e){var r,n;if("string"===e&&Nt(r=t.toString)&&!Dt(n=It(r,t)))return n;if(Nt(r=t.valueOf)&&!Dt(n=It(r,t)))return n;if("string"!==e&&Nt(r=t.toString)&&!Dt(n=It(r,t)))return n;throw Ft("Can't convert object to primitive value")},ve=TypeError,be=he("toPrimitive"),we=function(t,e){if(!de(t)||me(t))return t;var r,n=ge(t,be);if(n){if(void 0===e&&(e="default"),r=pe(n,t,e),!de(r)||me(r))return r;throw ve("Can't convert object to primitive value")}return void 0===e&&(e="number"),ye(t,e)},ke=we,Oe=Mt,Se=function(t){var e=ke(t,"string");return Oe(e)?e:e+""},Ee=ot,Me=g.document,xe=Ee(Me)&&Ee(Me.createElement),je=function(t){return xe?Me.createElement(t):{}},Pe=je,Ae=!b&&!v((function(){return 7!=Object.defineProperty(Pe("div"),"a",{get:function(){return 7}}).a})),_e=b,Ce=S,Te=E,Le=_,Ie=K,Ne=Se,De=Jt,Fe=Ae,Re=Object.getOwnPropertyDescriptor;y.f=_e?Re:function(t,e){if(t=Ie(t),e=Ne(e),Fe)try{return Re(t,e)}catch(t){}if(De(t,e))return Le(!Ce(Te.f,t,e),t[e])};var ze={},Ze=b&&v((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ue=ot,Be=String,Ge=TypeError,Ve=function(t){if(Ue(t))return t;throw Ge(Be(t)+" is not an object")},We=b,$e=Ae,He=Ze,qe=Ve,Xe=Se,Ye=TypeError,Ke=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,Qe="enumerable",tr="configurable",er="writable";ze.f=We?He?function(t,e,r){if(qe(t),e=Xe(e),qe(r),"function"==typeof t&&"prototype"===e&&"value"in r&&er in r&&!r[er]){var n=Je(t,e);n&&n[er]&&(t[e]=r.value,r={configurable:tr in r?r[tr]:n[tr],enumerable:Qe in r?r[Qe]:n[Qe],writable:!1})}return Ke(t,e,r)}:Ke:function(t,e,r){if(qe(t),e=Xe(e),qe(r),$e)try{return Ke(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Ye("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var rr=ze,nr=_,or=b?function(t,e,r){return rr.f(t,e,nr(1,r))}:function(t,e,r){return t[e]=r,t},ir={exports:{}},sr=b,ar=Jt,ur=Function.prototype,cr=sr&&Object.getOwnPropertyDescriptor,lr=ar(ur,"name"),fr={EXISTS:lr,PROPER:lr&&"something"===function(){}.name,CONFIGURABLE:lr&&(!sr||sr&&cr(ur,"name").configurable)},hr=et,pr=Vt,dr=N(Function.toString);hr(pr.inspectSource)||(pr.inspectSource=function(t){return dr(t)});var mr,gr,yr,vr=pr.inspectSource,br=et,wr=g.WeakMap,kr=br(wr)&&/native code/.test(String(wr)),Or=ne,Sr=$t("keys"),Er=function(t){return Sr[t]||(Sr[t]=Or(t))},Mr={},xr=kr,jr=g,Pr=ot,Ar=or,_r=Jt,Cr=Vt,Tr=Er,Lr=Mr,Ir="Object already initialized",Nr=jr.TypeError,Dr=jr.WeakMap;if(xr||Cr.state){var Fr=Cr.state||(Cr.state=new Dr);Fr.get=Fr.get,Fr.has=Fr.has,Fr.set=Fr.set,mr=function(t,e){if(Fr.has(t))throw Nr(Ir);return e.facade=t,Fr.set(t,e),e},gr=function(t){return Fr.get(t)||{}},yr=function(t){return Fr.has(t)}}else{var Rr=Tr("state");Lr[Rr]=!0,mr=function(t,e){if(_r(t,Rr))throw Nr(Ir);return e.facade=t,Ar(t,Rr,e),e},gr=function(t){return _r(t,Rr)?t[Rr]:{}},yr=function(t){return _r(t,Rr)}}var zr={set:mr,get:gr,has:yr,enforce:function(t){return yr(t)?gr(t):mr(t,{})},getterFor:function(t){return function(e){var r;if(!Pr(e)||(r=gr(e)).type!==t)throw Nr("Incompatible receiver, "+t+" required");return r}}},Zr=N,Ur=v,Br=et,Gr=Jt,Vr=b,Wr=fr.CONFIGURABLE,$r=vr,Hr=zr.enforce,qr=zr.get,Xr=String,Yr=Object.defineProperty,Kr=Zr("".slice),Jr=Zr("".replace),Qr=Zr([].join),tn=Vr&&!Ur((function(){return 8!==Yr((function(){}),"length",{value:8}).length})),en=String(String).split("String"),rn=ir.exports=function(t,e,r){"Symbol("===Kr(Xr(e),0,7)&&(e="["+Jr(Xr(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Gr(t,"name")||Wr&&t.name!==e)&&(Vr?Yr(t,"name",{value:e,configurable:!0}):t.name=e),tn&&r&&Gr(r,"arity")&&t.length!==r.arity&&Yr(t,"length",{value:r.arity});try{r&&Gr(r,"constructor")&&r.constructor?Vr&&Yr(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=Hr(t);return Gr(n,"source")||(n.source=Qr(en,"string"==typeof e?e:"")),t};Function.prototype.toString=rn((function(){return Br(this)&&qr(this).source||$r(this)}),"toString");var nn=ir.exports,on=et,sn=ze,an=nn,un=Ut,cn=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(on(r)&&an(r,i,n),n.global)o?t[e]=r:un(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:sn.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},ln={},fn=Math.ceil,hn=Math.floor,pn=Math.trunc||function(t){var e=+t;return(e>0?hn:fn)(e)},dn=function(t){var e=+t;return e!=e||0===e?0:pn(e)},mn=dn,gn=Math.max,yn=Math.min,vn=function(t,e){var r=mn(t);return r<0?gn(r+e,0):yn(r,e)},bn=dn,wn=Math.min,kn=function(t){return t>0?wn(bn(t),9007199254740991):0},On=function(t){return kn(t.length)},Sn=K,En=vn,Mn=On,xn=function(t){return function(e,r,n){var o,i=Sn(e),s=Mn(i),a=En(n,s);if(t&&r!=r){for(;s>a;)if((o=i[a++])!=o)return!0}else for(;s>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},jn={includes:xn(!0),indexOf:xn(!1)},Pn=Jt,An=K,_n=jn.indexOf,Cn=Mr,Tn=N([].push),Ln=function(t,e){var r,n=An(t),o=0,i=[];for(r in n)!Pn(Cn,r)&&Pn(n,r)&&Tn(i,r);for(;e.length>o;)Pn(n,r=e[o++])&&(~_n(i,r)||Tn(i,r));return i},In=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Nn=Ln,Dn=In.concat("length","prototype");ln.f=Object.getOwnPropertyNames||function(t){return Nn(t,Dn)};var Fn={};Fn.f=Object.getOwnPropertySymbols;var Rn=at,zn=ln,Zn=Fn,Un=Ve,Bn=N([].concat),Gn=Rn("Reflect","ownKeys")||function(t){var e=zn.f(Un(t)),r=Zn.f;return r?Bn(e,r(t)):e},Vn=Jt,Wn=Gn,$n=y,Hn=ze,qn=v,Xn=et,Yn=/#|\.prototype\./,Kn=function(t,e){var r=Qn[Jn(t)];return r==eo||r!=to&&(Xn(e)?qn(e):!!e)},Jn=Kn.normalize=function(t){return String(t).replace(Yn,".").toLowerCase()},Qn=Kn.data={},to=Kn.NATIVE="N",eo=Kn.POLYFILL="P",ro=Kn,no=g,oo=y.f,io=or,so=cn,ao=Ut,uo=function(t,e,r){for(var n=Wn(e),o=Hn.f,i=$n.f,s=0;s<n.length;s++){var a=n[s];Vn(t,a)||r&&Vn(r,a)||o(t,a,i(e,a))}},co=ro,lo=function(t,e){var r,n,o,i,s,a=t.target,u=t.global,c=t.stat;if(r=u?no:c?no[a]||ao(a,{}):(no[a]||{}).prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(s=oo(r,n))&&s.value:r[n],!co(u?n:a+(c?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;uo(i,o)}(t.sham||o&&o.sham)&&io(i,"sham",!0),so(r,n,i,t)}},fo=z,ho=N,po=function(t){if("Function"===fo(t))return ho(t)},mo=Ct,go=w,yo=po(po.bind),vo=z,bo=Array.isArray||function(t){return"Array"==vo(t)},wo={};wo[he("toStringTag")]="z";var ko="[object z]"===String(wo),Oo=ko,So=et,Eo=z,Mo=he("toStringTag"),xo=Object,jo="Arguments"==Eo(function(){return arguments}()),Po=Oo?Eo:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=xo(t),Mo))?r:jo?Eo(e):"Object"==(n=Eo(e))&&So(e.callee)?"Arguments":n},Ao=N,_o=v,Co=et,To=Po,Lo=vr,Io=function(){},No=[],Do=at("Reflect","construct"),Fo=/^\s*(?:class|function)\b/,Ro=Ao(Fo.exec),zo=!Fo.exec(Io),Zo=function(t){if(!Co(t))return!1;try{return Do(Io,No,t),!0}catch(t){return!1}},Uo=function(t){if(!Co(t))return!1;switch(To(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return zo||!!Ro(Fo,Lo(t))}catch(t){return!0}};Uo.sham=!0;var Bo=!Do||_o((function(){var t;return Zo(Zo.call)||!Zo(Object)||!Zo((function(){t=!0}))||t}))?Uo:Zo,Go=bo,Vo=Bo,Wo=ot,$o=he("species"),Ho=Array,qo=function(t){var e;return Go(t)&&(e=t.constructor,(Vo(e)&&(e===Ho||Go(e.prototype))||Wo(e)&&null===(e=e[$o]))&&(e=void 0)),void 0===e?Ho:e},Xo=function(t,e){return new(qo(t))(0===e?0:e)},Yo=function(t,e){return mo(t),void 0===e?t:go?yo(t,e):function(){return t.apply(e,arguments)}},Ko=V,Jo=Xt,Qo=On,ti=Xo,ei=N([].push),ri=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,s=7==t,a=5==t||i;return function(u,c,l,f){for(var h,p,d=Jo(u),m=Ko(d),g=Yo(c,l),y=Qo(m),v=0,b=f||ti,w=e?b(u,y):r||s?b(u,0):void 0;y>v;v++)if((a||v in m)&&(p=g(h=m[v],v,d),t))if(e)w[v]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return v;case 2:ei(w,h)}else switch(t){case 4:return!1;case 7:ei(w,h)}return i?-1:n||o?o:w}},ni={forEach:ri(0),map:ri(1),filter:ri(2),some:ri(3),every:ri(4),find:ri(5),findIndex:ri(6),filterReject:ri(7)},oi=v,ii=mt,si=he("species"),ai=function(t){return ii>=51||!oi((function(){var e=[];return(e.constructor={})[si]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},ui=ni.map;function ci(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}lo({target:"Array",proto:!0,forced:!ai("map")},{map:function(t){return ui(this,t,arguments.length>1?arguments[1]:void 0)}});var li=Ct,fi=Xt,hi=V,pi=On,di=TypeError,mi=function(t){return function(e,r,n,o){li(r);var i=fi(e),s=hi(i),a=pi(i),u=t?a-1:0,c=t?-1:1;if(n<2)for(;;){if(u in s){o=s[u],u+=c;break}if(u+=c,t?u<0:a<=u)throw di("Reduce of empty array with no initial value")}for(;t?u>=0:a>u;u+=c)u in s&&(o=r(o,s[u],u,i));return o}},gi={left:mi(!1),right:mi(!0)},yi=v,vi=function(t,e){var r=[][t];return!!r&&yi((function(){r.call(null,e||function(){return 1},1)}))},bi="undefined"!=typeof process&&"process"==z(process),wi=gi.left;lo({target:"Array",proto:!0,forced:!bi&&mt>79&&mt<83||!vi("reduce")},{reduce:function(t){var e=arguments.length;return wi(this,t,e,e>1?arguments[1]:void 0)}});var ki=Po,Oi=ko?{}.toString:function(){return"[object "+ki(this)+"]"};ko||cn(Object.prototype,"toString",Oi,{unsafe:!0});var Si=ni.filter;lo({target:"Array",proto:!0,forced:!ai("filter")},{filter:function(t){return Si(this,t,arguments.length>1?arguments[1]:void 0)}});var Ei=function(){function t(){e(this,t)}return n(t,null,[{key:"isAdvancedMarker",value:function(t){return!!(google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement)}},{key:"setMap",value:function(t,e){this.isAdvancedMarker(t)?t.map=e:t.setMap(e)}},{key:"getPosition",value:function(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(t.position.lat&&t.position.lng)return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}},{key:"getVisible",value:function(t){return!!this.isAdvancedMarker(t)||t.getVisible()}}]),t}(),Mi=function(){function t(r){var n=r.markers,o=r.position;e(this,t),this.markers=n,o&&(o instanceof google.maps.LatLng?this._position=o:this._position=new google.maps.LatLng(o))}return n(t,[{key:"bounds",get:function(){if(0!==this.markers.length||this._position)return this.markers.reduce((function(t,e){return t.extend(Ei.getPosition(e))}),new google.maps.LatLngBounds(this._position,this._position))}},{key:"position",get:function(){return this._position||this.bounds.getCenter()}},{key:"count",get:function(){return this.markers.filter((function(t){return Ei.getVisible(t)})).length}},{key:"push",value:function(t){this.markers.push(t)}},{key:"delete",value:function(){this.marker&&(Ei.setMap(this.marker,null),delete this.marker),this.markers.length=0}}]),t}(),xi=function(t,e,r,n){var o=ji(t.getBounds(),e,n);return r.filter((function(t){return o.contains(Ei.getPosition(t))}))},ji=function(t,e,r){var n=Ai(t,e),o=n.northEast,i=n.southWest,s=_i({northEast:o,southWest:i},r);return Ci(s,e)},Pi=function(t,e){var r=(e.lat-t.lat)*Math.PI/180,n=(e.lng-t.lng)*Math.PI/180,o=Math.sin(r/2)*Math.sin(r/2)+Math.cos(t.lat*Math.PI/180)*Math.cos(e.lat*Math.PI/180)*Math.sin(n/2)*Math.sin(n/2);return 6371*(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)))},Ai=function(t,e){return{northEast:e.fromLatLngToDivPixel(t.getNorthEast()),southWest:e.fromLatLngToDivPixel(t.getSouthWest())}},_i=function(t,e){var r=t.northEast,n=t.southWest;return r.x+=e,r.y-=e,n.x-=e,n.y+=e,{northEast:r,southWest:n}},Ci=function(t,e){var r=t.northEast,n=t.southWest,o=new google.maps.LatLngBounds;return o.extend(e.fromDivPixelToLatLng(r)),o.extend(e.fromDivPixelToLatLng(n)),o},Ti=function(){function t(r){var n=r.maxZoom,o=void 0===n?16:n;e(this,t),this.maxZoom=o}return n(t,[{key:"noop",value:function(t){var e=t.markers;return Ii(e)}}]),t}(),Li=function(t){o(i,t);var r=u(i);function i(t){var n;e(this,i);var o=t.viewportPadding,s=void 0===o?60:o,a=ci(t,["viewportPadding"]);return(n=r.call(this,a)).viewportPadding=60,n.viewportPadding=s,n}return n(i,[{key:"calculate",value:function(t){var e=t.markers,r=t.map,n=t.mapCanvasProjection;return r.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e,map:r,mapCanvasProjection:n}),changed:!1}:{clusters:this.cluster({markers:xi(r,n,e,this.viewportPadding),map:r,mapCanvasProjection:n})}}}]),i}(Ti),Ii=function(t){return t.map((function(t){return new Mi({position:Ei.getPosition(t),markers:[t]})}))},Ni=je("span").classList,Di=Ni&&Ni.constructor&&Ni.constructor.prototype,Fi=Di===Object.prototype?void 0:Di,Ri=ni.forEach,zi=vi("forEach")?[].forEach:function(t){return Ri(this,t,arguments.length>1?arguments[1]:void 0)},Zi=g,Ui={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Bi=Fi,Gi=zi,Vi=or,Wi=function(t){if(t&&t.forEach!==Gi)try{Vi(t,"forEach",Gi)}catch(e){t.forEach=Gi}};for(var $i in Ui)Ui[$i]&&Wi(Zi[$i]&&Zi[$i].prototype);Wi(Bi);var Hi=S;lo({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return Hi(URL.prototype.toString,this)}});var qi=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(e)){if((n=e.length)!=r.length)return!1;for(o=n;0!=o--;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((n=(i=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var s=i[o];if(!t(e[s],r[s]))return!1}return!0}return e!=e&&r!=r},Xi=d(qi),Yi=function(t){o(i,t);var r=u(i);function i(t){var n;e(this,i);var o=t.maxDistance,s=void 0===o?4e4:o,a=t.gridSize,u=void 0===a?40:a,c=ci(t,["maxDistance","gridSize"]);return(n=r.call(this,c)).clusters=[],n.maxDistance=s,n.gridSize=u,n.state={zoom:null},n}return n(i,[{key:"calculate",value:function(t){var e=t.markers,r=t.map,n=t.mapCanvasProjection,o={zoom:r.getZoom()},i=!1;return this.state.zoom>this.maxZoom&&o.zoom>this.maxZoom||(i=!Xi(this.state,o)),this.state=o,r.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e,map:r,mapCanvasProjection:n}),changed:i}:{clusters:this.cluster({markers:xi(r,n,e,this.viewportPadding),map:r,mapCanvasProjection:n})}}},{key:"cluster",value:function(t){var e=this,r=t.markers,n=t.map,o=t.mapCanvasProjection;return this.clusters=[],r.forEach((function(t){e.addToClosestCluster(t,n,o)})),this.clusters}},{key:"addToClosestCluster",value:function(t,e,r){for(var n=this.maxDistance,o=null,i=0;i<this.clusters.length;i++){var s=this.clusters[i],a=Pi(s.bounds.getCenter().toJSON(),Ei.getPosition(t).toJSON());a<n&&(n=a,o=s)}if(o&&ji(o.bounds,r,this.gridSize).contains(Ei.getPosition(t)))o.push(t);else{var u=new Mi({markers:[t]});this.clusters.push(u)}}}]),i}(Li),Ki=function(t){o(i,t);var r=u(i);function i(t){e(this,i);var n=ci(t,[]);return r.call(this,n)}return n(i,[{key:"calculate",value:function(t){var e=t.markers,r=t.map,n=t.mapCanvasProjection;return{clusters:this.cluster({markers:e,map:r,mapCanvasProjection:n}),changed:!1}}},{key:"cluster",value:function(t){return this.noop(t)}}]),i}(Ti),Ji=Ln,Qi=In,ts=Object.keys||function(t){return Ji(t,Qi)},es=b,rs=N,ns=S,os=v,is=ts,ss=Fn,as=E,us=Xt,cs=V,ls=Object.assign,fs=Object.defineProperty,hs=rs([].concat),ps=!ls||os((function(){if(es&&1!==ls({b:1},ls(fs({},"a",{enumerable:!0,get:function(){fs(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=ls({},t)[r]||is(ls({},e)).join("")!=n}))?function(t,e){for(var r=us(t),n=arguments.length,o=1,i=ss.f,s=as.f;n>o;)for(var a,u=cs(arguments[o++]),c=i?hs(is(u),i(u)):is(u),l=c.length,f=0;l>f;)a=c[f++],es&&!ns(s,u,a)||(r[a]=u[a]);return r}:ls,ds=ps;lo({target:"Object",stat:!0,arity:2,forced:Object.assign!==ds},{assign:ds});const ms=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class gs{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[e,r]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const n=r>>4;if(1!==n)throw new Error(`Got v${n} data when expected v1.`);const o=ms[15&r];if(!o)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1);return new gs(s,i,o,t)}constructor(t,e=64,r=Float64Array,n){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const o=ms.indexOf(this.ArrayType),i=2*t*this.ArrayType.BYTES_PER_ELEMENT,s=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-s%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+s+a,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+i+s+a),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+s+a,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+o]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return ys(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:i,nodeSize:s}=this,a=[0,o.length-1,0],u=[];for(;a.length;){const c=a.pop()||0,l=a.pop()||0,f=a.pop()||0;if(l-f<=s){for(let s=f;s<=l;s++){const a=i[2*s],c=i[2*s+1];a>=t&&a<=r&&c>=e&&c<=n&&u.push(o[s])}continue}const h=f+l>>1,p=i[2*h],d=i[2*h+1];p>=t&&p<=r&&d>=e&&d<=n&&u.push(o[h]),(0===c?t<=p:e<=d)&&(a.push(f),a.push(h-1),a.push(1-c)),(0===c?r>=p:n>=d)&&(a.push(h+1),a.push(l),a.push(1-c))}return u}within(t,e,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:o,nodeSize:i}=this,s=[0,n.length-1,0],a=[],u=r*r;for(;s.length;){const c=s.pop()||0,l=s.pop()||0,f=s.pop()||0;if(l-f<=i){for(let r=f;r<=l;r++)ks(o[2*r],o[2*r+1],t,e)<=u&&a.push(n[r]);continue}const h=f+l>>1,p=o[2*h],d=o[2*h+1];ks(p,d,t,e)<=u&&a.push(n[h]),(0===c?t-r<=p:e-r<=d)&&(s.push(f),s.push(h-1),s.push(1-c)),(0===c?t+r>=p:e+r>=d)&&(s.push(h+1),s.push(l),s.push(1-c))}return a}}function ys(t,e,r,n,o,i){if(o-n<=r)return;const s=n+o>>1;vs(t,e,s,n,o,i),ys(t,e,r,n,s-1,1-i),ys(t,e,r,s+1,o,1-i)}function vs(t,e,r,n,o,i){for(;o>n;){if(o-n>600){const s=o-n+1,a=r-n+1,u=Math.log(s),c=.5*Math.exp(2*u/3),l=.5*Math.sqrt(u*c*(s-c)/s)*(a-s/2<0?-1:1);vs(t,e,r,Math.max(n,Math.floor(r-a*c/s+l)),Math.min(o,Math.floor(r+(s-a)*c/s+l)),i)}const s=e[2*r+i];let a=n,u=o;for(bs(t,e,n,r),e[2*o+i]>s&&bs(t,e,n,o);a<u;){for(bs(t,e,a,u),a++,u--;e[2*a+i]<s;)a++;for(;e[2*u+i]>s;)u--}e[2*n+i]===s?bs(t,e,n,u):(u++,bs(t,e,u,o)),u<=r&&(n=u+1),r<=u&&(o=u-1)}}function bs(t,e,r,n){ws(t,r,n),ws(e,2*r,2*n),ws(e,2*r+1,2*n+1)}function ws(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function ks(t,e,r,n){const o=t-r,i=e-n;return o*o+i*i}const Os={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Ss=Math.fround||(Es=new Float32Array(1),t=>(Es[0]=+t,Es[0]));var Es;const Ms=3,xs=5,js=6;class Ps{constructor(t){this.options=Object.assign(Object.create(Os),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:r,maxZoom:n}=this.options;e&&console.time("total time");const o=`prepare ${t.length} points`;e&&console.time(o),this.points=t;const i=[];for(let e=0;e<t.length;e++){const r=t[e];if(!r.geometry)continue;const[n,o]=r.geometry.coordinates,s=Ss(Cs(n)),a=Ss(Ts(o));i.push(s,a,1/0,e,-1,1),this.options.reduce&&i.push(0)}let s=this.trees[n+1]=this._createTree(i);e&&console.timeEnd(o);for(let t=n;t>=r;t--){const r=+Date.now();s=this.trees[t]=this._createTree(this._cluster(s,t)),e&&console.log("z%d: %d clusters in %dms",t,s.numItems,+Date.now()-r)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let r=((t[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[1]));let o=180===t[2]?180:((t[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,o=180;else if(r>o){const t=this.getClusters([r,n,180,i],e),s=this.getClusters([-180,n,o,i],e);return t.concat(s)}const s=this.trees[this._limitZoom(e)],a=s.range(Cs(r),Ts(i),Cs(o),Ts(n)),u=s.data,c=[];for(const t of a){const e=this.stride*t;c.push(u[e+xs]>1?As(u,e,this.clusterProps):this.points[u[e+Ms]])}return c}getChildren(t){const e=this._getOriginId(t),r=this._getOriginZoom(t),n="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(n);const i=o.data;if(e*this.stride>=i.length)throw new Error(n);const s=this.options.radius/(this.options.extent*Math.pow(2,r-1)),a=i[e*this.stride],u=i[e*this.stride+1],c=o.within(a,u,s),l=[];for(const e of c){const r=e*this.stride;i[r+4]===t&&l.push(i[r+xs]>1?As(i,r,this.clusterProps):this.points[i[r+Ms]])}if(0===l.length)throw new Error(n);return l}getLeaves(t,e,r){e=e||10,r=r||0;const n=[];return this._appendLeaves(n,t,e,r,0),n}getTile(t,e,r){const n=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:i,radius:s}=this.options,a=s/i,u=(r-a)/o,c=(r+1+a)/o,l={features:[]};return this._addTileFeatures(n.range((e-a)/o,u,(e+1+a)/o,c),n.data,e,r,o,l),0===e&&this._addTileFeatures(n.range(1-a/o,u,1,c),n.data,o,r,o,l),e===o-1&&this._addTileFeatures(n.range(0,u,a/o,c),n.data,-1,r,o,l),l.features.length?l:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e}_appendLeaves(t,e,r,n,o){const i=this.getChildren(e);for(const e of i){const i=e.properties;if(i&&i.cluster?o+i.point_count<=n?o+=i.point_count:o=this._appendLeaves(t,i.cluster_id,r,n,o):o<n?o++:t.push(e),t.length===r)break}return o}_createTree(t){const e=new gs(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)e.add(t[r],t[r+1]);return e.finish(),e.data=t,e}_addTileFeatures(t,e,r,n,o,i){for(const s of t){const t=s*this.stride,a=e[t+xs]>1;let u,c,l;if(a)u=_s(e,t,this.clusterProps),c=e[t],l=e[t+1];else{const r=this.points[e[t+Ms]];u=r.properties;const[n,o]=r.geometry.coordinates;c=Cs(n),l=Ts(o)}const f={type:1,geometry:[[Math.round(this.options.extent*(c*o-r)),Math.round(this.options.extent*(l*o-n))]],tags:u};let h;h=a||this.options.generateId?e[t+Ms]:this.points[e[t+Ms]].id,void 0!==h&&(f.id=h),i.features.push(f)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:r,extent:n,reduce:o,minPoints:i}=this.options,s=r/(n*Math.pow(2,e)),a=t.data,u=[],c=this.stride;for(let r=0;r<a.length;r+=c){if(a[r+2]<=e)continue;a[r+2]=e;const n=a[r],l=a[r+1],f=t.within(a[r],a[r+1],s),h=a[r+xs];let p=h;for(const t of f){const r=t*c;a[r+2]>e&&(p+=a[r+xs])}if(p>h&&p>=i){let t,i=n*h,s=l*h,d=-1;const m=((r/c|0)<<5)+(e+1)+this.points.length;for(const n of f){const u=n*c;if(a[u+2]<=e)continue;a[u+2]=e;const l=a[u+xs];i+=a[u]*l,s+=a[u+1]*l,a[u+4]=m,o&&(t||(t=this._map(a,r,!0),d=this.clusterProps.length,this.clusterProps.push(t)),o(t,this._map(a,u)))}a[r+4]=m,u.push(i/p,s/p,1/0,m,-1,p),o&&u.push(d)}else{for(let t=0;t<c;t++)u.push(a[r+t]);if(p>1)for(const t of f){const r=t*c;if(!(a[r+2]<=e)){a[r+2]=e;for(let t=0;t<c;t++)u.push(a[r+t])}}}}return u}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,r){if(t[e+xs]>1){const n=this.clusterProps[t[e+js]];return r?Object.assign({},n):n}const n=this.points[t[e+Ms]].properties,o=this.options.map(n);return r&&o===n?Object.assign({},o):o}}function As(t,e,r){return{type:"Feature",id:t[e+Ms],properties:_s(t,e,r),geometry:{type:"Point",coordinates:[(n=t[e],360*(n-.5)),Ls(t[e+1])]}};var n}function _s(t,e,r){const n=t[e+xs],o=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,i=t[e+js],s=-1===i?{}:Object.assign({},r[i]);return Object.assign(s,{cluster:!0,cluster_id:t[e+Ms],point_count:n,point_count_abbreviated:o})}function Cs(t){return t/360+.5}function Ts(t){const e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Ls(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}var Is=function(t){o(i,t);var r=u(i);function i(t){var n;e(this,i);var o=t.maxZoom,s=t.radius,a=void 0===s?60:s,u=ci(t,["maxZoom","radius"]);return(n=r.call(this,{maxZoom:o})).superCluster=new Ps(Object.assign({maxZoom:n.maxZoom,radius:a},u)),n.state={zoom:null},n}return n(i,[{key:"calculate",value:function(t){var e=!1;if(!Xi(t.markers,this.markers)){e=!0,this.markers=l(t.markers);var r=this.markers.map((function(t){return{type:"Feature",geometry:{type:"Point",coordinates:[Ei.getPosition(t).lng(),Ei.getPosition(t).lat()]},properties:{marker:t}}}));this.superCluster.load(r)}var n={zoom:t.map.getZoom()};return e||this.state.zoom>this.maxZoom&&n.zoom>this.maxZoom||(e=e||!Xi(this.state,n)),this.state=n,e&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:e}}},{key:"cluster",value:function(t){var e=t.map;return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(this.transformCluster.bind(this))}},{key:"transformCluster",value:function(t){var e=c(t.geometry.coordinates,2),r=e[0],n=e[1],o=t.properties;if(o.cluster)return new Mi({markers:this.superCluster.getLeaves(o.cluster_id,1/0).map((function(t){return t.properties.marker})),position:new google.maps.LatLng({lat:n,lng:r})});var i=o.marker;return new Mi({markers:[i],position:Ei.getPosition(i)})}}]),i}(Ti),Ns={},Ds=b,Fs=Ze,Rs=ze,zs=Ve,Zs=K,Us=ts;Ns.f=Ds&&!Fs?Object.defineProperties:function(t,e){zs(t);for(var r,n=Zs(e),o=Us(e),i=o.length,s=0;i>s;)Rs.f(t,r=o[s++],n[r]);return t};var Bs,Gs=at("document","documentElement"),Vs=Ve,Ws=Ns,$s=In,Hs=Mr,qs=Gs,Xs=je,Ys="prototype",Ks="script",Js=Er("IE_PROTO"),Qs=function(){},ta=function(t){return"<"+Ks+">"+t+"</"+Ks+">"},ea=function(t){t.write(ta("")),t.close();var e=t.parentWindow.Object;return t=null,e},ra=function(){try{Bs=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;ra="undefined"!=typeof document?document.domain&&Bs?ea(Bs):(e=Xs("iframe"),r="java"+Ks+":",e.style.display="none",qs.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(ta("document.F=Object")),t.close(),t.F):ea(Bs);for(var n=$s.length;n--;)delete ra[Ys][$s[n]];return ra()};Hs[Js]=!0;var na=he,oa=Object.create||function(t,e){var r;return null!==t?(Qs[Ys]=Vs(t),r=new Qs,Qs[Ys]=null,r[Js]=t):r=ra(),void 0===e?r:Ws.f(r,e)},ia=ze.f,sa=na("unscopables"),aa=Array.prototype;null==aa[sa]&&ia(aa,sa,{configurable:!0,value:oa(null)});var ua=jn.includes,ca=function(t){aa[sa][t]=!0};lo({target:"Array",proto:!0,forced:v((function(){return!Array(1).includes()}))},{includes:function(t){return ua(this,t,arguments.length>1?arguments[1]:void 0)}}),ca("includes");var la=ot,fa=z,ha=he("match"),pa=function(t){var e;return la(t)&&(void 0!==(e=t[ha])?!!e:"RegExp"==fa(t))},da=TypeError,ma=Po,ga=String,ya=function(t){if("Symbol"===ma(t))throw TypeError("Cannot convert a Symbol value to a string");return ga(t)},va=he("match"),ba=lo,wa=function(t){if(pa(t))throw da("The method doesn't accept regular expressions");return t},ka=q,Oa=ya,Sa=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[va]=!1,"/./"[t](e)}catch(t){}}return!1},Ea=N("".indexOf);ba({target:"String",proto:!0,forced:!Sa("includes")},{includes:function(t){return!!~Ea(Oa(ka(this)),Oa(wa(t)),arguments.length>1?arguments[1]:void 0)}});var Ma=lo,xa=jn.indexOf,ja=vi,Pa=po([].indexOf),Aa=!!Pa&&1/Pa([1],1,-0)<0;Ma({target:"Array",proto:!0,forced:Aa||!ja("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Aa?Pa(this,t,e)||0:xa(this,t,e)}});var _a=b,Ca=bo,Ta=TypeError,La=Object.getOwnPropertyDescriptor,Ia=_a&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),Na=TypeError,Da=Se,Fa=ze,Ra=_,za=jt,Za=TypeError,Ua=lo,Ba=Xt,Ga=vn,Va=dn,Wa=On,$a=Ia?function(t,e){if(Ca(t)&&!La(t,"length").writable)throw Ta("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Ha=function(t){if(t>9007199254740991)throw Na("Maximum allowed index exceeded");return t},qa=Xo,Xa=function(t,e,r){var n=Da(e);n in t?Fa.f(t,n,Ra(0,r)):t[n]=r},Ya=function(t,e){if(!delete t[e])throw Za("Cannot delete property "+za(e)+" of "+za(t))},Ka=ai("splice"),Ja=Math.max,Qa=Math.min;Ua({target:"Array",proto:!0,forced:!Ka},{splice:function(t,e){var r,n,o,i,s,a,u=Ba(this),c=Wa(u),l=Ga(t,c),f=arguments.length;for(0===f?r=n=0:1===f?(r=0,n=c-l):(r=f-2,n=Qa(Ja(Va(e),0),c-l)),Ha(c+r-n),o=qa(u,n),i=0;i<n;i++)(s=l+i)in u&&Xa(o,i,u[s]);if(o.length=n,r<n){for(i=l;i<c-n;i++)a=i+r,(s=i+n)in u?u[a]=u[s]:Ya(u,a);for(i=c;i>c-n+r;i--)Ya(u,i-1)}else if(r>n)for(i=c-n;i>l;i--)a=i+r-1,(s=i+n-1)in u?u[a]=u[s]:Ya(u,a);for(i=0;i<r;i++)u[i+l]=arguments[i+2];return $a(u,c-n+r),o}});var tu=g,eu=N,ru=Ct,nu=et,ou=String,iu=TypeError,su=function(t,e,r){try{return eu(ru(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}},au=Ve,uu=function(t){if("object"==typeof t||nu(t))return t;throw iu("Can't set "+ou(t)+" as a prototype")},cu=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=su(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return au(r),uu(n),e?t(r,n):r.__proto__=n,r}}():void 0),lu=et,fu=ot,hu=cu,pu=N(1..valueOf),du=q,mu=ya,gu="\t\n\v\f\r \u2028\u2029\ufeff",yu=N("".replace),vu=RegExp("^["+gu+"]+"),bu=RegExp("(^|[^"+gu+"])["+gu+"]+$"),wu=function(t){return function(e){var r=mu(du(e));return 1&t&&(r=yu(r,vu,"")),2&t&&(r=yu(r,bu,"$1")),r}},ku={start:wu(1),end:wu(2),trim:wu(3)},Ou=lo,Su=b,Eu=g,Mu=tu,xu=N,ju=ro,Pu=Jt,Au=function(t,e,r){var n,o;return hu&&lu(n=e.constructor)&&n!==r&&fu(o=n.prototype)&&o!==r.prototype&&hu(t,o),t},_u=ut,Cu=Mt,Tu=we,Lu=v,Iu=ln.f,Nu=y.f,Du=ze.f,Fu=pu,Ru=ku.trim,zu="Number",Zu=Eu[zu];Mu[zu];var Uu=Zu.prototype,Bu=Eu.TypeError,Gu=xu("".slice),Vu=xu("".charCodeAt),Wu=function(t){var e,r,n,o,i,s,a,u,c=Tu(t,"number");if(Cu(c))throw Bu("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=Ru(c),43===(e=Vu(c,0))||45===e){if(88===(r=Vu(c,2))||120===r)return NaN}else if(48===e){switch(Vu(c,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(s=(i=Gu(c,2)).length,a=0;a<s;a++)if((u=Vu(i,a))<48||u>o)return NaN;return parseInt(i,n)}return+c},$u=ju(zu,!Zu(" 0o1")||!Zu("0b1")||Zu("+0x1")),Hu=function(t){var e,r=arguments.length<1?0:Zu(function(t){var e=Tu(t,"number");return"bigint"==typeof e?e:Wu(e)}(t));return _u(Uu,e=this)&&Lu((function(){Fu(e)}))?Au(Object(r),this,Hu):r};Hu.prototype=Uu,$u&&(Uu.constructor=Hu),Ou({global:!0,constructor:!0,wrap:!0,forced:$u},{Number:Hu});$u&&function(t,e){for(var r,n=Su?Iu(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;n.length>o;o++)Pu(e,r=n[o])&&!Pu(t,r)&&Du(t,r,Nu(e,r))}(Mu[zu],Zu);var qu=n((function t(r,n){e(this,t),this.markers={sum:r.length};var o=n.map((function(t){return t.count})),i=o.reduce((function(t,e){return t+e}),0);this.clusters={count:n.length,markers:{mean:i/n.length,sum:i,min:Math.min.apply(Math,l(o)),max:Math.max.apply(Math,l(o))}}})),Xu=function(){function t(){e(this,t)}return n(t,[{key:"render",value:function(t,e,r){var n=t.count,o=t.position,i=n>Math.max(10,e.clusters.markers.mean)?"#ff0000":"#0000ff",s='<svg fill="'.concat(i,'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240">\n <circle cx="120" cy="120" opacity=".6" r="70" />\n <circle cx="120" cy="120" opacity=".3" r="90" />\n <circle cx="120" cy="120" opacity=".2" r="110" />\n </svg>'),a="Cluster of ".concat(n," markers"),u=Number(google.maps.Marker.MAX_ZINDEX)+n;if(google.maps.marker&&r.getMapCapabilities().isAdvancedMarkersAvailable){var c=document.createElement("div");c.innerHTML=s;var l=c.firstElementChild;l.setAttribute("width","50"),l.setAttribute("height","50");var f=document.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("x","50%"),f.setAttribute("y","50%"),f.setAttribute("style","fill: #FFF"),f.setAttribute("text-anchor","middle"),f.setAttribute("font-size","50"),f.setAttribute("dominant-baseline","middle"),f.appendChild(document.createTextNode("".concat(n))),l.appendChild(f);var h={map:r,position:o,zIndex:u,title:a,content:c.firstElementChild};return new google.maps.marker.AdvancedMarkerElement(h)}var p={position:o,zIndex:u,title:a,icon:{url:"data:image/svg+xml;base64,".concat(window.btoa(s)),scaledSize:new google.maps.Size(45,45)},label:{text:String(n),color:"rgba(255,255,255,0.9)",fontSize:"12px"}};return new google.maps.Marker(p)}}]),t}();var Yu,Ku=n((function t(){e(this,t),function(t,e){for(var r in e.prototype)t.prototype[r]=e.prototype[r]}(t,google.maps.OverlayView)}));t.MarkerClustererEvents=void 0,(Yu=t.MarkerClustererEvents||(t.MarkerClustererEvents={})).CLUSTERING_BEGIN="clusteringbegin",Yu.CLUSTERING_END="clusteringend",Yu.CLUSTER_CLICK="click";var Ju=function(t,e,r){r.fitBounds(e.bounds)},Qu=function(r){o(s,r);var i=u(s);function s(t){var r,n=t.map,o=t.markers,a=void 0===o?[]:o,u=t.algorithmOptions,c=void 0===u?{}:u,f=t.algorithm,h=void 0===f?new Is(c):f,p=t.renderer,d=void 0===p?new Xu:p,m=t.onClusterClick,g=void 0===m?Ju:m;return e(this,s),(r=i.call(this)).markers=l(a),r.clusters=[],r.algorithm=h,r.renderer=d,r.onClusterClick=g,n&&r.setMap(n),r}return n(s,[{key:"addMarker",value:function(t,e){this.markers.includes(t)||(this.markers.push(t),e||this.render())}},{key:"addMarkers",value:function(t,e){var r=this;t.forEach((function(t){r.addMarker(t,!0)})),e||this.render()}},{key:"removeMarker",value:function(t,e){var r=this.markers.indexOf(t);return-1!==r&&(Ei.setMap(t,null),this.markers.splice(r,1),e||this.render(),!0)}},{key:"removeMarkers",value:function(t,e){var r=this,n=!1;return t.forEach((function(t){n=r.removeMarker(t,!0)||n})),n&&!e&&this.render(),n}},{key:"clearMarkers",value:function(t){this.markers.length=0,t||this.render()}},{key:"render",value:function(){var e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTERING_BEGIN,this);var r=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()}),n=r.clusters,o=r.changed;(o||null==o)&&(this.reset(),this.clusters=n,this.renderClusters()),google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTERING_END,this)}}},{key:"onAdd",value:function(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}},{key:"onRemove",value:function(){google.maps.event.removeListener(this.idleListener),this.reset()}},{key:"reset",value:function(){this.markers.forEach((function(t){return Ei.setMap(t,null)})),this.clusters.forEach((function(t){return t.delete()})),this.clusters=[]}},{key:"renderClusters",value:function(){var e=this,r=new qu(this.markers,this.clusters),n=this.getMap();this.clusters.forEach((function(o){1===o.markers.length?o.marker=o.markers[0]:(o.marker=e.renderer.render(o,r,n),e.onClusterClick&&o.marker.addListener("click",(function(r){google.maps.event.trigger(e,t.MarkerClustererEvents.CLUSTER_CLICK,o),e.onClusterClick(r,o,n)}))),Ei.setMap(o.marker,n)}))}}]),s}(Ku);t.AbstractAlgorithm=Ti,t.AbstractViewportAlgorithm=Li,t.Cluster=Mi,t.ClusterStats=qu,t.DefaultRenderer=Xu,t.GridAlgorithm=Yi,t.MarkerClusterer=Qu,t.NoopAlgorithm=Ki,t.SuperClusterAlgorithm=Is,t.defaultOnClusterClickHandler=Ju,t.distanceBetweenPoints=Pi,t.extendBoundsToPaddedViewport=ji,t.extendPixelBounds=_i,t.filterMarkersToPaddedViewport=xi,t.noop=Ii,t.pixelBoundsToLatLngBounds=Ci,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).markerClusterer={})}(this,(function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(o=n.key,i=void 0,"symbol"==typeof(i=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"))?i:String(i)),n)}var o,i}function n(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function a(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=i(t);if(e){var o=i(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return a(this,r)}}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,s,a=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(t,e)||f(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||f(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){if(t){if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var m=function(t){return t&&t.Math==Math&&t},g=m("object"==typeof globalThis&&globalThis)||m("object"==typeof window&&window)||m("object"==typeof self&&self)||m("object"==typeof p&&p)||function(){return this}()||p||Function("return this")(),y={},v=function(t){try{return!!t()}catch(t){return!0}},b=!v((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),w=!v((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),k=w,O=Function.prototype.call,S=k?O.bind(O):function(){return O.apply(O,arguments)},E={},M={}.propertyIsEnumerable,x=Object.getOwnPropertyDescriptor,j=x&&!M.call({1:2},1);E.f=j?function(t){var e=x(this,t);return!!e&&e.enumerable}:M;var A,P,_=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},T=w,C=Function.prototype,L=C.call,I=T&&C.bind.bind(L,L),N=T?I:function(t){return function(){return L.apply(t,arguments)}},D=N,F=D({}.toString),R=D("".slice),z=function(t){return R(F(t),8,-1)},Z=v,U=z,B=Object,G=N("".split),V=Z((function(){return!B("z").propertyIsEnumerable(0)}))?function(t){return"String"==U(t)?G(t,""):B(t)}:B,W=function(t){return null==t},$=W,H=TypeError,q=function(t){if($(t))throw H("Can't call method on "+t);return t},X=V,Y=q,K=function(t){return X(Y(t))},J="object"==typeof document&&document.all,Q={all:J,IS_HTMLDDA:void 0===J&&void 0!==J},tt=Q.all,et=Q.IS_HTMLDDA?function(t){return"function"==typeof t||t===tt}:function(t){return"function"==typeof t},rt=et,nt=Q.all,ot=Q.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:rt(t)||t===nt}:function(t){return"object"==typeof t?null!==t:rt(t)},it=g,st=et,at=function(t,e){return arguments.length<2?(r=it[t],st(r)?r:void 0):it[t]&&it[t][e];var r},ut=N({}.isPrototypeOf),ct=g,lt="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ft=ct.process,ht=ct.Deno,pt=ft&&ft.versions||ht&&ht.version,dt=pt&&pt.v8;dt&&(P=(A=dt.split("."))[0]>0&&A[0]<4?1:+(A[0]+A[1])),!P&<&&(!(A=lt.match(/Edge\/(\d+)/))||A[1]>=74)&&(A=lt.match(/Chrome\/(\d+)/))&&(P=+A[1]);var mt=P,gt=mt,yt=v,vt=g.String,bt=!!Object.getOwnPropertySymbols&&!yt((function(){var t=Symbol();return!vt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&>&><41})),wt=bt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,kt=at,Ot=et,St=ut,Et=Object,Mt=wt?function(t){return"symbol"==typeof t}:function(t){var e=kt("Symbol");return Ot(e)&&St(e.prototype,Et(t))},xt=String,jt=function(t){try{return xt(t)}catch(t){return"Object"}},At=et,Pt=jt,_t=TypeError,Tt=function(t){if(At(t))return t;throw _t(Pt(t)+" is not a function")},Ct=Tt,Lt=W,It=S,Nt=et,Dt=ot,Ft=TypeError,Rt={exports:{}},zt=g,Zt=Object.defineProperty,Ut=function(t,e){try{Zt(zt,t,{value:e,configurable:!0,writable:!0})}catch(r){zt[t]=e}return e},Bt=Ut,Gt="__core-js_shared__",Vt=g[Gt]||Bt(Gt,{}),Wt=Vt;(Rt.exports=function(t,e){return Wt[t]||(Wt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var $t=Rt.exports,Ht=q,qt=Object,Xt=function(t){return qt(Ht(t))},Yt=Xt,Kt=N({}.hasOwnProperty),Jt=Object.hasOwn||function(t,e){return Kt(Yt(t),e)},Qt=N,te=0,ee=Math.random(),re=Qt(1..toString),ne=function(t){return"Symbol("+(void 0===t?"":t)+")_"+re(++te+ee,36)},oe=$t,ie=Jt,se=ne,ae=bt,ue=wt,ce=g.Symbol,le=oe("wks"),fe=ue?ce.for||ce:ce&&ce.withoutSetter||se,he=function(t){return ie(le,t)||(le[t]=ae&&ie(ce,t)?ce[t]:fe("Symbol."+t)),le[t]},pe=S,de=ot,me=Mt,ge=function(t,e){var r=t[e];return Lt(r)?void 0:Ct(r)},ye=function(t,e){var r,n;if("string"===e&&Nt(r=t.toString)&&!Dt(n=It(r,t)))return n;if(Nt(r=t.valueOf)&&!Dt(n=It(r,t)))return n;if("string"!==e&&Nt(r=t.toString)&&!Dt(n=It(r,t)))return n;throw Ft("Can't convert object to primitive value")},ve=TypeError,be=he("toPrimitive"),we=function(t,e){if(!de(t)||me(t))return t;var r,n=ge(t,be);if(n){if(void 0===e&&(e="default"),r=pe(n,t,e),!de(r)||me(r))return r;throw ve("Can't convert object to primitive value")}return void 0===e&&(e="number"),ye(t,e)},ke=we,Oe=Mt,Se=function(t){var e=ke(t,"string");return Oe(e)?e:e+""},Ee=ot,Me=g.document,xe=Ee(Me)&&Ee(Me.createElement),je=function(t){return xe?Me.createElement(t):{}},Ae=je,Pe=!b&&!v((function(){return 7!=Object.defineProperty(Ae("div"),"a",{get:function(){return 7}}).a})),_e=b,Te=S,Ce=E,Le=_,Ie=K,Ne=Se,De=Jt,Fe=Pe,Re=Object.getOwnPropertyDescriptor;y.f=_e?Re:function(t,e){if(t=Ie(t),e=Ne(e),Fe)try{return Re(t,e)}catch(t){}if(De(t,e))return Le(!Te(Ce.f,t,e),t[e])};var ze={},Ze=b&&v((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ue=ot,Be=String,Ge=TypeError,Ve=function(t){if(Ue(t))return t;throw Ge(Be(t)+" is not an object")},We=b,$e=Pe,He=Ze,qe=Ve,Xe=Se,Ye=TypeError,Ke=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,Qe="enumerable",tr="configurable",er="writable";ze.f=We?He?function(t,e,r){if(qe(t),e=Xe(e),qe(r),"function"==typeof t&&"prototype"===e&&"value"in r&&er in r&&!r[er]){var n=Je(t,e);n&&n[er]&&(t[e]=r.value,r={configurable:tr in r?r[tr]:n[tr],enumerable:Qe in r?r[Qe]:n[Qe],writable:!1})}return Ke(t,e,r)}:Ke:function(t,e,r){if(qe(t),e=Xe(e),qe(r),$e)try{return Ke(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Ye("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var rr=ze,nr=_,or=b?function(t,e,r){return rr.f(t,e,nr(1,r))}:function(t,e,r){return t[e]=r,t},ir={exports:{}},sr=b,ar=Jt,ur=Function.prototype,cr=sr&&Object.getOwnPropertyDescriptor,lr=ar(ur,"name"),fr={EXISTS:lr,PROPER:lr&&"something"===function(){}.name,CONFIGURABLE:lr&&(!sr||sr&&cr(ur,"name").configurable)},hr=et,pr=Vt,dr=N(Function.toString);hr(pr.inspectSource)||(pr.inspectSource=function(t){return dr(t)});var mr,gr,yr,vr=pr.inspectSource,br=et,wr=g.WeakMap,kr=br(wr)&&/native code/.test(String(wr)),Or=ne,Sr=$t("keys"),Er=function(t){return Sr[t]||(Sr[t]=Or(t))},Mr={},xr=kr,jr=g,Ar=ot,Pr=or,_r=Jt,Tr=Vt,Cr=Er,Lr=Mr,Ir="Object already initialized",Nr=jr.TypeError,Dr=jr.WeakMap;if(xr||Tr.state){var Fr=Tr.state||(Tr.state=new Dr);Fr.get=Fr.get,Fr.has=Fr.has,Fr.set=Fr.set,mr=function(t,e){if(Fr.has(t))throw Nr(Ir);return e.facade=t,Fr.set(t,e),e},gr=function(t){return Fr.get(t)||{}},yr=function(t){return Fr.has(t)}}else{var Rr=Cr("state");Lr[Rr]=!0,mr=function(t,e){if(_r(t,Rr))throw Nr(Ir);return e.facade=t,Pr(t,Rr,e),e},gr=function(t){return _r(t,Rr)?t[Rr]:{}},yr=function(t){return _r(t,Rr)}}var zr={set:mr,get:gr,has:yr,enforce:function(t){return yr(t)?gr(t):mr(t,{})},getterFor:function(t){return function(e){var r;if(!Ar(e)||(r=gr(e)).type!==t)throw Nr("Incompatible receiver, "+t+" required");return r}}},Zr=N,Ur=v,Br=et,Gr=Jt,Vr=b,Wr=fr.CONFIGURABLE,$r=vr,Hr=zr.enforce,qr=zr.get,Xr=String,Yr=Object.defineProperty,Kr=Zr("".slice),Jr=Zr("".replace),Qr=Zr([].join),tn=Vr&&!Ur((function(){return 8!==Yr((function(){}),"length",{value:8}).length})),en=String(String).split("String"),rn=ir.exports=function(t,e,r){"Symbol("===Kr(Xr(e),0,7)&&(e="["+Jr(Xr(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Gr(t,"name")||Wr&&t.name!==e)&&(Vr?Yr(t,"name",{value:e,configurable:!0}):t.name=e),tn&&r&&Gr(r,"arity")&&t.length!==r.arity&&Yr(t,"length",{value:r.arity});try{r&&Gr(r,"constructor")&&r.constructor?Vr&&Yr(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=Hr(t);return Gr(n,"source")||(n.source=Qr(en,"string"==typeof e?e:"")),t};Function.prototype.toString=rn((function(){return Br(this)&&qr(this).source||$r(this)}),"toString");var nn=ir.exports,on=et,sn=ze,an=nn,un=Ut,cn=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(on(r)&&an(r,i,n),n.global)o?t[e]=r:un(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:sn.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},ln={},fn=Math.ceil,hn=Math.floor,pn=Math.trunc||function(t){var e=+t;return(e>0?hn:fn)(e)},dn=function(t){var e=+t;return e!=e||0===e?0:pn(e)},mn=dn,gn=Math.max,yn=Math.min,vn=function(t,e){var r=mn(t);return r<0?gn(r+e,0):yn(r,e)},bn=dn,wn=Math.min,kn=function(t){return t>0?wn(bn(t),9007199254740991):0},On=function(t){return kn(t.length)},Sn=K,En=vn,Mn=On,xn=function(t){return function(e,r,n){var o,i=Sn(e),s=Mn(i),a=En(n,s);if(t&&r!=r){for(;s>a;)if((o=i[a++])!=o)return!0}else for(;s>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},jn={includes:xn(!0),indexOf:xn(!1)},An=Jt,Pn=K,_n=jn.indexOf,Tn=Mr,Cn=N([].push),Ln=function(t,e){var r,n=Pn(t),o=0,i=[];for(r in n)!An(Tn,r)&&An(n,r)&&Cn(i,r);for(;e.length>o;)An(n,r=e[o++])&&(~_n(i,r)||Cn(i,r));return i},In=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Nn=Ln,Dn=In.concat("length","prototype");ln.f=Object.getOwnPropertyNames||function(t){return Nn(t,Dn)};var Fn={};Fn.f=Object.getOwnPropertySymbols;var Rn=at,zn=ln,Zn=Fn,Un=Ve,Bn=N([].concat),Gn=Rn("Reflect","ownKeys")||function(t){var e=zn.f(Un(t)),r=Zn.f;return r?Bn(e,r(t)):e},Vn=Jt,Wn=Gn,$n=y,Hn=ze,qn=v,Xn=et,Yn=/#|\.prototype\./,Kn=function(t,e){var r=Qn[Jn(t)];return r==eo||r!=to&&(Xn(e)?qn(e):!!e)},Jn=Kn.normalize=function(t){return String(t).replace(Yn,".").toLowerCase()},Qn=Kn.data={},to=Kn.NATIVE="N",eo=Kn.POLYFILL="P",ro=Kn,no=g,oo=y.f,io=or,so=cn,ao=Ut,uo=function(t,e,r){for(var n=Wn(e),o=Hn.f,i=$n.f,s=0;s<n.length;s++){var a=n[s];Vn(t,a)||r&&Vn(r,a)||o(t,a,i(e,a))}},co=ro,lo=function(t,e){var r,n,o,i,s,a=t.target,u=t.global,c=t.stat;if(r=u?no:c?no[a]||ao(a,{}):(no[a]||{}).prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(s=oo(r,n))&&s.value:r[n],!co(u?n:a+(c?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;uo(i,o)}(t.sham||o&&o.sham)&&io(i,"sham",!0),so(r,n,i,t)}},fo=z,ho=N,po=function(t){if("Function"===fo(t))return ho(t)},mo=Tt,go=w,yo=po(po.bind),vo=z,bo=Array.isArray||function(t){return"Array"==vo(t)},wo={};wo[he("toStringTag")]="z";var ko="[object z]"===String(wo),Oo=ko,So=et,Eo=z,Mo=he("toStringTag"),xo=Object,jo="Arguments"==Eo(function(){return arguments}()),Ao=Oo?Eo:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=xo(t),Mo))?r:jo?Eo(e):"Object"==(n=Eo(e))&&So(e.callee)?"Arguments":n},Po=N,_o=v,To=et,Co=Ao,Lo=vr,Io=function(){},No=[],Do=at("Reflect","construct"),Fo=/^\s*(?:class|function)\b/,Ro=Po(Fo.exec),zo=!Fo.exec(Io),Zo=function(t){if(!To(t))return!1;try{return Do(Io,No,t),!0}catch(t){return!1}},Uo=function(t){if(!To(t))return!1;switch(Co(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return zo||!!Ro(Fo,Lo(t))}catch(t){return!0}};Uo.sham=!0;var Bo=!Do||_o((function(){var t;return Zo(Zo.call)||!Zo(Object)||!Zo((function(){t=!0}))||t}))?Uo:Zo,Go=bo,Vo=Bo,Wo=ot,$o=he("species"),Ho=Array,qo=function(t){var e;return Go(t)&&(e=t.constructor,(Vo(e)&&(e===Ho||Go(e.prototype))||Wo(e)&&null===(e=e[$o]))&&(e=void 0)),void 0===e?Ho:e},Xo=function(t,e){return new(qo(t))(0===e?0:e)},Yo=function(t,e){return mo(t),void 0===e?t:go?yo(t,e):function(){return t.apply(e,arguments)}},Ko=V,Jo=Xt,Qo=On,ti=Xo,ei=N([].push),ri=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,s=7==t,a=5==t||i;return function(u,c,l,f){for(var h,p,d=Jo(u),m=Ko(d),g=Yo(c,l),y=Qo(m),v=0,b=f||ti,w=e?b(u,y):r||s?b(u,0):void 0;y>v;v++)if((a||v in m)&&(p=g(h=m[v],v,d),t))if(e)w[v]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return v;case 2:ei(w,h)}else switch(t){case 4:return!1;case 7:ei(w,h)}return i?-1:n||o?o:w}},ni={forEach:ri(0),map:ri(1),filter:ri(2),some:ri(3),every:ri(4),find:ri(5),findIndex:ri(6),filterReject:ri(7)},oi=v,ii=mt,si=he("species"),ai=function(t){return ii>=51||!oi((function(){var e=[];return(e.constructor={})[si]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},ui=ni.map;function ci(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}lo({target:"Array",proto:!0,forced:!ai("map")},{map:function(t){return ui(this,t,arguments.length>1?arguments[1]:void 0)}});var li=ni.filter;lo({target:"Array",proto:!0,forced:!ai("filter")},{filter:function(t){return li(this,t,arguments.length>1?arguments[1]:void 0)}});var fi=Ao,hi=ko?{}.toString:function(){return"[object "+fi(this)+"]"};ko||cn(Object.prototype,"toString",hi,{unsafe:!0});var pi=function(){function t(){e(this,t)}return n(t,null,[{key:"isAdvancedMarker",value:function(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}},{key:"setMap",value:function(t,e){this.isAdvancedMarker(t)?t.map=e:t.setMap(e)}},{key:"getPosition",value:function(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(t.position.lat&&t.position.lng)return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}},{key:"getVisible",value:function(t){return!!this.isAdvancedMarker(t)||t.getVisible()}}]),t}(),di=function(){function t(r){var n=r.markers,o=r.position;e(this,t),this.markers=n,o&&(o instanceof google.maps.LatLng?this._position=o:this._position=new google.maps.LatLng(o))}return n(t,[{key:"bounds",get:function(){if(0!==this.markers.length||this._position){var t,e=new google.maps.LatLngBounds(this._position,this._position),r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=f(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}(this.markers);try{for(r.s();!(t=r.n()).done;){var n=t.value;e.extend(pi.getPosition(n))}}catch(t){r.e(t)}finally{r.f()}return e}}},{key:"position",get:function(){return this._position||this.bounds.getCenter()}},{key:"count",get:function(){return this.markers.filter((function(t){return pi.getVisible(t)})).length}},{key:"push",value:function(t){this.markers.push(t)}},{key:"delete",value:function(){this.marker&&(pi.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}]),t}(),mi=function(t,e,r,n){var o=gi(t.getBounds(),e,n);return r.filter((function(t){return o.contains(pi.getPosition(t))}))},gi=function(t,e,r){var n=vi(t,e),o=n.northEast,i=n.southWest,s=bi({northEast:o,southWest:i},r);return wi(s,e)},yi=function(t,e){var r=(e.lat-t.lat)*Math.PI/180,n=(e.lng-t.lng)*Math.PI/180,o=Math.sin(r/2)*Math.sin(r/2)+Math.cos(t.lat*Math.PI/180)*Math.cos(e.lat*Math.PI/180)*Math.sin(n/2)*Math.sin(n/2);return 6371*(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)))},vi=function(t,e){return{northEast:e.fromLatLngToDivPixel(t.getNorthEast()),southWest:e.fromLatLngToDivPixel(t.getSouthWest())}},bi=function(t,e){var r=t.northEast,n=t.southWest;return r.x+=e,r.y-=e,n.x-=e,n.y+=e,{northEast:r,southWest:n}},wi=function(t,e){var r=t.northEast,n=t.southWest,o=e.fromDivPixelToLatLng(n),i=e.fromDivPixelToLatLng(r);return new google.maps.LatLngBounds(o,i)},ki=function(){function t(r){var n=r.maxZoom,o=void 0===n?16:n;e(this,t),this.maxZoom=o}return n(t,[{key:"noop",value:function(t){var e=t.markers;return Si(e)}}]),t}(),Oi=function(t){o(i,t);var r=u(i);function i(t){var n;e(this,i);var o=t.viewportPadding,s=void 0===o?60:o,a=ci(t,["viewportPadding"]);return(n=r.call(this,a)).viewportPadding=60,n.viewportPadding=s,n}return n(i,[{key:"calculate",value:function(t){var e=t.markers,r=t.map,n=t.mapCanvasProjection;return r.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:mi(r,n,e,this.viewportPadding),map:r,mapCanvasProjection:n})}}}]),i}(ki),Si=function(t){return t.map((function(t){return new di({position:pi.getPosition(t),markers:[t]})}))},Ei=je("span").classList,Mi=Ei&&Ei.constructor&&Ei.constructor.prototype,xi=Mi===Object.prototype?void 0:Mi,ji=v,Ai=function(t,e){var r=[][t];return!!r&&ji((function(){r.call(null,e||function(){return 1},1)}))},Pi=ni.forEach,_i=Ai("forEach")?[].forEach:function(t){return Pi(this,t,arguments.length>1?arguments[1]:void 0)},Ti=g,Ci={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Li=xi,Ii=_i,Ni=or,Di=function(t){if(t&&t.forEach!==Ii)try{Ni(t,"forEach",Ii)}catch(e){t.forEach=Ii}};for(var Fi in Ci)Ci[Fi]&&Di(Ti[Fi]&&Ti[Fi].prototype);Di(Li);var Ri=S;lo({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return Ri(URL.prototype.toString,this)}});var zi=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(e)){if((n=e.length)!=r.length)return!1;for(o=n;0!=o--;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((n=(i=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var s=i[o];if(!t(e[s],r[s]))return!1}return!0}return e!=e&&r!=r},Zi=d(zi),Ui=function(t){o(i,t);var r=u(i);function i(t){var n;e(this,i);var o=t.maxDistance,s=void 0===o?4e4:o,a=t.gridSize,u=void 0===a?40:a,c=ci(t,["maxDistance","gridSize"]);return(n=r.call(this,c)).clusters=[],n.maxDistance=s,n.gridSize=u,n.state={zoom:null},n}return n(i,[{key:"calculate",value:function(t){var e=t.markers,r=t.map,n=t.mapCanvasProjection,o={zoom:r.getZoom()},i=!1;return this.state.zoom>this.maxZoom&&o.zoom>this.maxZoom||(i=!Zi(this.state,o)),this.state=o,r.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:i}:{clusters:this.cluster({markers:mi(r,n,e,this.viewportPadding),map:r,mapCanvasProjection:n})}}},{key:"cluster",value:function(t){var e=this,r=t.markers,n=t.map,o=t.mapCanvasProjection;return this.clusters=[],r.forEach((function(t){e.addToClosestCluster(t,n,o)})),this.clusters}},{key:"addToClosestCluster",value:function(t,e,r){for(var n=this.maxDistance,o=null,i=0;i<this.clusters.length;i++){var s=this.clusters[i],a=yi(s.bounds.getCenter().toJSON(),pi.getPosition(t).toJSON());a<n&&(n=a,o=s)}if(o&&gi(o.bounds,r,this.gridSize).contains(pi.getPosition(t)))o.push(t);else{var u=new di({markers:[t]});this.clusters.push(u)}}}]),i}(Oi),Bi=function(t){o(i,t);var r=u(i);function i(t){e(this,i);var n=ci(t,[]);return r.call(this,n)}return n(i,[{key:"calculate",value:function(t){var e=t.markers,r=t.map,n=t.mapCanvasProjection;return{clusters:this.cluster({markers:e,map:r,mapCanvasProjection:n}),changed:!1}}},{key:"cluster",value:function(t){return this.noop(t)}}]),i}(ki),Gi=Ln,Vi=In,Wi=Object.keys||function(t){return Gi(t,Vi)},$i=b,Hi=N,qi=S,Xi=v,Yi=Wi,Ki=Fn,Ji=E,Qi=Xt,ts=V,es=Object.assign,rs=Object.defineProperty,ns=Hi([].concat),os=!es||Xi((function(){if($i&&1!==es({b:1},es(rs({},"a",{enumerable:!0,get:function(){rs(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=es({},t)[r]||Yi(es({},e)).join("")!=n}))?function(t,e){for(var r=Qi(t),n=arguments.length,o=1,i=Ki.f,s=Ji.f;n>o;)for(var a,u=ts(arguments[o++]),c=i?ns(Yi(u),i(u)):Yi(u),l=c.length,f=0;l>f;)a=c[f++],$i&&!qi(s,u,a)||(r[a]=u[a]);return r}:es,is=os;lo({target:"Object",stat:!0,arity:2,forced:Object.assign!==is},{assign:is});const ss=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class as{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[e,r]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const n=r>>4;if(1!==n)throw new Error(`Got v${n} data when expected v1.`);const o=ss[15&r];if(!o)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1);return new as(s,i,o,t)}constructor(t,e=64,r=Float64Array,n){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const o=ss.indexOf(this.ArrayType),i=2*t*this.ArrayType.BYTES_PER_ELEMENT,s=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-s%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+s+a,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+i+s+a),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+s+a,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+o]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return us(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:i,nodeSize:s}=this,a=[0,o.length-1,0],u=[];for(;a.length;){const c=a.pop()||0,l=a.pop()||0,f=a.pop()||0;if(l-f<=s){for(let s=f;s<=l;s++){const a=i[2*s],c=i[2*s+1];a>=t&&a<=r&&c>=e&&c<=n&&u.push(o[s])}continue}const h=f+l>>1,p=i[2*h],d=i[2*h+1];p>=t&&p<=r&&d>=e&&d<=n&&u.push(o[h]),(0===c?t<=p:e<=d)&&(a.push(f),a.push(h-1),a.push(1-c)),(0===c?r>=p:n>=d)&&(a.push(h+1),a.push(l),a.push(1-c))}return u}within(t,e,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:o,nodeSize:i}=this,s=[0,n.length-1,0],a=[],u=r*r;for(;s.length;){const c=s.pop()||0,l=s.pop()||0,f=s.pop()||0;if(l-f<=i){for(let r=f;r<=l;r++)hs(o[2*r],o[2*r+1],t,e)<=u&&a.push(n[r]);continue}const h=f+l>>1,p=o[2*h],d=o[2*h+1];hs(p,d,t,e)<=u&&a.push(n[h]),(0===c?t-r<=p:e-r<=d)&&(s.push(f),s.push(h-1),s.push(1-c)),(0===c?t+r>=p:e+r>=d)&&(s.push(h+1),s.push(l),s.push(1-c))}return a}}function us(t,e,r,n,o,i){if(o-n<=r)return;const s=n+o>>1;cs(t,e,s,n,o,i),us(t,e,r,n,s-1,1-i),us(t,e,r,s+1,o,1-i)}function cs(t,e,r,n,o,i){for(;o>n;){if(o-n>600){const s=o-n+1,a=r-n+1,u=Math.log(s),c=.5*Math.exp(2*u/3),l=.5*Math.sqrt(u*c*(s-c)/s)*(a-s/2<0?-1:1);cs(t,e,r,Math.max(n,Math.floor(r-a*c/s+l)),Math.min(o,Math.floor(r+(s-a)*c/s+l)),i)}const s=e[2*r+i];let a=n,u=o;for(ls(t,e,n,r),e[2*o+i]>s&&ls(t,e,n,o);a<u;){for(ls(t,e,a,u),a++,u--;e[2*a+i]<s;)a++;for(;e[2*u+i]>s;)u--}e[2*n+i]===s?ls(t,e,n,u):(u++,ls(t,e,u,o)),u<=r&&(n=u+1),r<=u&&(o=u-1)}}function ls(t,e,r,n){fs(t,r,n),fs(e,2*r,2*n),fs(e,2*r+1,2*n+1)}function fs(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function hs(t,e,r,n){const o=t-r,i=e-n;return o*o+i*i}const ps={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},ds=Math.fround||(ms=new Float32Array(1),t=>(ms[0]=+t,ms[0]));var ms;const gs=3,ys=5,vs=6;class bs{constructor(t){this.options=Object.assign(Object.create(ps),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:r,maxZoom:n}=this.options;e&&console.time("total time");const o=`prepare ${t.length} points`;e&&console.time(o),this.points=t;const i=[];for(let e=0;e<t.length;e++){const r=t[e];if(!r.geometry)continue;const[n,o]=r.geometry.coordinates,s=ds(Os(n)),a=ds(Ss(o));i.push(s,a,1/0,e,-1,1),this.options.reduce&&i.push(0)}let s=this.trees[n+1]=this._createTree(i);e&&console.timeEnd(o);for(let t=n;t>=r;t--){const r=+Date.now();s=this.trees[t]=this._createTree(this._cluster(s,t)),e&&console.log("z%d: %d clusters in %dms",t,s.numItems,+Date.now()-r)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let r=((t[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[1]));let o=180===t[2]?180:((t[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,o=180;else if(r>o){const t=this.getClusters([r,n,180,i],e),s=this.getClusters([-180,n,o,i],e);return t.concat(s)}const s=this.trees[this._limitZoom(e)],a=s.range(Os(r),Ss(i),Os(o),Ss(n)),u=s.data,c=[];for(const t of a){const e=this.stride*t;c.push(u[e+ys]>1?ws(u,e,this.clusterProps):this.points[u[e+gs]])}return c}getChildren(t){const e=this._getOriginId(t),r=this._getOriginZoom(t),n="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(n);const i=o.data;if(e*this.stride>=i.length)throw new Error(n);const s=this.options.radius/(this.options.extent*Math.pow(2,r-1)),a=i[e*this.stride],u=i[e*this.stride+1],c=o.within(a,u,s),l=[];for(const e of c){const r=e*this.stride;i[r+4]===t&&l.push(i[r+ys]>1?ws(i,r,this.clusterProps):this.points[i[r+gs]])}if(0===l.length)throw new Error(n);return l}getLeaves(t,e,r){e=e||10,r=r||0;const n=[];return this._appendLeaves(n,t,e,r,0),n}getTile(t,e,r){const n=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:i,radius:s}=this.options,a=s/i,u=(r-a)/o,c=(r+1+a)/o,l={features:[]};return this._addTileFeatures(n.range((e-a)/o,u,(e+1+a)/o,c),n.data,e,r,o,l),0===e&&this._addTileFeatures(n.range(1-a/o,u,1,c),n.data,o,r,o,l),e===o-1&&this._addTileFeatures(n.range(0,u,a/o,c),n.data,-1,r,o,l),l.features.length?l:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e}_appendLeaves(t,e,r,n,o){const i=this.getChildren(e);for(const e of i){const i=e.properties;if(i&&i.cluster?o+i.point_count<=n?o+=i.point_count:o=this._appendLeaves(t,i.cluster_id,r,n,o):o<n?o++:t.push(e),t.length===r)break}return o}_createTree(t){const e=new as(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)e.add(t[r],t[r+1]);return e.finish(),e.data=t,e}_addTileFeatures(t,e,r,n,o,i){for(const s of t){const t=s*this.stride,a=e[t+ys]>1;let u,c,l;if(a)u=ks(e,t,this.clusterProps),c=e[t],l=e[t+1];else{const r=this.points[e[t+gs]];u=r.properties;const[n,o]=r.geometry.coordinates;c=Os(n),l=Ss(o)}const f={type:1,geometry:[[Math.round(this.options.extent*(c*o-r)),Math.round(this.options.extent*(l*o-n))]],tags:u};let h;h=a||this.options.generateId?e[t+gs]:this.points[e[t+gs]].id,void 0!==h&&(f.id=h),i.features.push(f)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:r,extent:n,reduce:o,minPoints:i}=this.options,s=r/(n*Math.pow(2,e)),a=t.data,u=[],c=this.stride;for(let r=0;r<a.length;r+=c){if(a[r+2]<=e)continue;a[r+2]=e;const n=a[r],l=a[r+1],f=t.within(a[r],a[r+1],s),h=a[r+ys];let p=h;for(const t of f){const r=t*c;a[r+2]>e&&(p+=a[r+ys])}if(p>h&&p>=i){let t,i=n*h,s=l*h,d=-1;const m=((r/c|0)<<5)+(e+1)+this.points.length;for(const n of f){const u=n*c;if(a[u+2]<=e)continue;a[u+2]=e;const l=a[u+ys];i+=a[u]*l,s+=a[u+1]*l,a[u+4]=m,o&&(t||(t=this._map(a,r,!0),d=this.clusterProps.length,this.clusterProps.push(t)),o(t,this._map(a,u)))}a[r+4]=m,u.push(i/p,s/p,1/0,m,-1,p),o&&u.push(d)}else{for(let t=0;t<c;t++)u.push(a[r+t]);if(p>1)for(const t of f){const r=t*c;if(!(a[r+2]<=e)){a[r+2]=e;for(let t=0;t<c;t++)u.push(a[r+t])}}}}return u}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,r){if(t[e+ys]>1){const n=this.clusterProps[t[e+vs]];return r?Object.assign({},n):n}const n=this.points[t[e+gs]].properties,o=this.options.map(n);return r&&o===n?Object.assign({},o):o}}function ws(t,e,r){return{type:"Feature",id:t[e+gs],properties:ks(t,e,r),geometry:{type:"Point",coordinates:[(n=t[e],360*(n-.5)),Es(t[e+1])]}};var n}function ks(t,e,r){const n=t[e+ys],o=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,i=t[e+vs],s=-1===i?{}:Object.assign({},r[i]);return Object.assign(s,{cluster:!0,cluster_id:t[e+gs],point_count:n,point_count_abbreviated:o})}function Os(t){return t/360+.5}function Ss(t){const e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Es(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}var Ms=function(t){o(i,t);var r=u(i);function i(t){var n;e(this,i);var o=t.maxZoom,s=t.radius,a=void 0===s?60:s,u=ci(t,["maxZoom","radius"]);return(n=r.call(this,{maxZoom:o})).superCluster=new bs(Object.assign({maxZoom:n.maxZoom,radius:a},u)),n.state={zoom:null},n}return n(i,[{key:"calculate",value:function(t){var e=!1,r={zoom:t.map.getZoom()};if(!Zi(t.markers,this.markers)){e=!0,this.markers=l(t.markers);var n=this.markers.map((function(t){var e=pi.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}}));this.superCluster.load(n)}return e||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(e=!Zi(this.state,r)),this.state=r,e&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:e}}},{key:"cluster",value:function(t){var e=this,r=t.map;return this.superCluster.getClusters([-180,-90,180,90],Math.round(r.getZoom())).map((function(t){return e.transformCluster(t)}))}},{key:"transformCluster",value:function(t){var e=c(t.geometry.coordinates,2),r=e[0],n=e[1],o=t.properties;if(o.cluster)return new di({markers:this.superCluster.getLeaves(o.cluster_id,1/0).map((function(t){return t.properties.marker})),position:{lat:n,lng:r}});var i=o.marker;return new di({markers:[i],position:pi.getPosition(i)})}}]),i}(ki),xs={},js=b,As=Ze,Ps=ze,_s=Ve,Ts=K,Cs=Wi;xs.f=js&&!As?Object.defineProperties:function(t,e){_s(t);for(var r,n=Ts(e),o=Cs(e),i=o.length,s=0;i>s;)Ps.f(t,r=o[s++],n[r]);return t};var Ls,Is=at("document","documentElement"),Ns=Ve,Ds=xs,Fs=In,Rs=Mr,zs=Is,Zs=je,Us="prototype",Bs="script",Gs=Er("IE_PROTO"),Vs=function(){},Ws=function(t){return"<"+Bs+">"+t+"</"+Bs+">"},$s=function(t){t.write(Ws("")),t.close();var e=t.parentWindow.Object;return t=null,e},Hs=function(){try{Ls=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;Hs="undefined"!=typeof document?document.domain&&Ls?$s(Ls):(e=Zs("iframe"),r="java"+Bs+":",e.style.display="none",zs.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(Ws("document.F=Object")),t.close(),t.F):$s(Ls);for(var n=Fs.length;n--;)delete Hs[Us][Fs[n]];return Hs()};Rs[Gs]=!0;var qs=he,Xs=Object.create||function(t,e){var r;return null!==t?(Vs[Us]=Ns(t),r=new Vs,Vs[Us]=null,r[Gs]=t):r=Hs(),void 0===e?r:Ds.f(r,e)},Ys=ze.f,Ks=qs("unscopables"),Js=Array.prototype;null==Js[Ks]&&Ys(Js,Ks,{configurable:!0,value:Xs(null)});var Qs=jn.includes,ta=function(t){Js[Ks][t]=!0};lo({target:"Array",proto:!0,forced:v((function(){return!Array(1).includes()}))},{includes:function(t){return Qs(this,t,arguments.length>1?arguments[1]:void 0)}}),ta("includes");var ea=ot,ra=z,na=he("match"),oa=function(t){var e;return ea(t)&&(void 0!==(e=t[na])?!!e:"RegExp"==ra(t))},ia=TypeError,sa=Ao,aa=String,ua=function(t){if("Symbol"===sa(t))throw TypeError("Cannot convert a Symbol value to a string");return aa(t)},ca=he("match"),la=lo,fa=function(t){if(oa(t))throw ia("The method doesn't accept regular expressions");return t},ha=q,pa=ua,da=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[ca]=!1,"/./"[t](e)}catch(t){}}return!1},ma=N("".indexOf);la({target:"String",proto:!0,forced:!da("includes")},{includes:function(t){return!!~ma(pa(ha(this)),pa(fa(t)),arguments.length>1?arguments[1]:void 0)}});var ga=lo,ya=jn.indexOf,va=Ai,ba=po([].indexOf),wa=!!ba&&1/ba([1],1,-0)<0;ga({target:"Array",proto:!0,forced:wa||!va("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return wa?ba(this,t,e)||0:ya(this,t,e)}});var ka=b,Oa=bo,Sa=TypeError,Ea=Object.getOwnPropertyDescriptor,Ma=ka&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),xa=TypeError,ja=Se,Aa=ze,Pa=_,_a=jt,Ta=TypeError,Ca=lo,La=Xt,Ia=vn,Na=dn,Da=On,Fa=Ma?function(t,e){if(Oa(t)&&!Ea(t,"length").writable)throw Sa("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Ra=function(t){if(t>9007199254740991)throw xa("Maximum allowed index exceeded");return t},za=Xo,Za=function(t,e,r){var n=ja(e);n in t?Aa.f(t,n,Pa(0,r)):t[n]=r},Ua=function(t,e){if(!delete t[e])throw Ta("Cannot delete property "+_a(e)+" of "+_a(t))},Ba=ai("splice"),Ga=Math.max,Va=Math.min;Ca({target:"Array",proto:!0,forced:!Ba},{splice:function(t,e){var r,n,o,i,s,a,u=La(this),c=Da(u),l=Ia(t,c),f=arguments.length;for(0===f?r=n=0:1===f?(r=0,n=c-l):(r=f-2,n=Va(Ga(Na(e),0),c-l)),Ra(c+r-n),o=za(u,n),i=0;i<n;i++)(s=l+i)in u&&Za(o,i,u[s]);if(o.length=n,r<n){for(i=l;i<c-n;i++)a=i+r,(s=i+n)in u?u[a]=u[s]:Ua(u,a);for(i=c;i>c-n+r;i--)Ua(u,i-1)}else if(r>n)for(i=c-n;i>l;i--)a=i+r-1,(s=i+n-1)in u?u[a]=u[s]:Ua(u,a);for(i=0;i<r;i++)u[i+l]=arguments[i+2];return Fa(u,c-n+r),o}});var Wa=Tt,$a=Xt,Ha=V,qa=On,Xa=TypeError,Ya=function(t){return function(e,r,n,o){Wa(r);var i=$a(e),s=Ha(i),a=qa(i),u=t?a-1:0,c=t?-1:1;if(n<2)for(;;){if(u in s){o=s[u],u+=c;break}if(u+=c,t?u<0:a<=u)throw Xa("Reduce of empty array with no initial value")}for(;t?u>=0:a>u;u+=c)u in s&&(o=r(o,s[u],u,i));return o}},Ka={left:Ya(!1),right:Ya(!0)},Ja="undefined"!=typeof process&&"process"==z(process),Qa=Ka.left;lo({target:"Array",proto:!0,forced:!Ja&&mt>79&&mt<83||!Ai("reduce")},{reduce:function(t){var e=arguments.length;return Qa(this,t,e,e>1?arguments[1]:void 0)}});var tu=g,eu=N,ru=Tt,nu=et,ou=String,iu=TypeError,su=function(t,e,r){try{return eu(ru(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}},au=Ve,uu=function(t){if("object"==typeof t||nu(t))return t;throw iu("Can't set "+ou(t)+" as a prototype")},cu=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=su(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return au(r),uu(n),e?t(r,n):r.__proto__=n,r}}():void 0),lu=et,fu=ot,hu=cu,pu=N(1..valueOf),du=q,mu=ua,gu="\t\n\v\f\r \u2028\u2029\ufeff",yu=N("".replace),vu=RegExp("^["+gu+"]+"),bu=RegExp("(^|[^"+gu+"])["+gu+"]+$"),wu=function(t){return function(e){var r=mu(du(e));return 1&t&&(r=yu(r,vu,"")),2&t&&(r=yu(r,bu,"$1")),r}},ku={start:wu(1),end:wu(2),trim:wu(3)},Ou=lo,Su=b,Eu=g,Mu=tu,xu=N,ju=ro,Au=Jt,Pu=function(t,e,r){var n,o;return hu&&lu(n=e.constructor)&&n!==r&&fu(o=n.prototype)&&o!==r.prototype&&hu(t,o),t},_u=ut,Tu=Mt,Cu=we,Lu=v,Iu=ln.f,Nu=y.f,Du=ze.f,Fu=pu,Ru=ku.trim,zu="Number",Zu=Eu[zu];Mu[zu];var Uu=Zu.prototype,Bu=Eu.TypeError,Gu=xu("".slice),Vu=xu("".charCodeAt),Wu=function(t){var e,r,n,o,i,s,a,u,c=Cu(t,"number");if(Tu(c))throw Bu("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=Ru(c),43===(e=Vu(c,0))||45===e){if(88===(r=Vu(c,2))||120===r)return NaN}else if(48===e){switch(Vu(c,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(s=(i=Gu(c,2)).length,a=0;a<s;a++)if((u=Vu(i,a))<48||u>o)return NaN;return parseInt(i,n)}return+c},$u=ju(zu,!Zu(" 0o1")||!Zu("0b1")||Zu("+0x1")),Hu=function(t){var e,r=arguments.length<1?0:Zu(function(t){var e=Cu(t,"number");return"bigint"==typeof e?e:Wu(e)}(t));return _u(Uu,e=this)&&Lu((function(){Fu(e)}))?Pu(Object(r),this,Hu):r};Hu.prototype=Uu,$u&&(Uu.constructor=Hu),Ou({global:!0,constructor:!0,wrap:!0,forced:$u},{Number:Hu});$u&&function(t,e){for(var r,n=Su?Iu(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;n.length>o;o++)Au(e,r=n[o])&&!Au(t,r)&&Du(t,r,Nu(e,r))}(Mu[zu],Zu);var qu=n((function t(r,n){e(this,t),this.markers={sum:r.length};var o=n.map((function(t){return t.count})),i=o.reduce((function(t,e){return t+e}),0);this.clusters={count:n.length,markers:{mean:i/n.length,sum:i,min:Math.min.apply(Math,l(o)),max:Math.max.apply(Math,l(o))}}})),Xu=function(){function t(){e(this,t)}return n(t,[{key:"render",value:function(t,e,r){var n=t.count,o=t.position,i=n>Math.max(10,e.clusters.markers.mean)?"#ff0000":"#0000ff",s='<svg fill="'.concat(i,'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240">\n <circle cx="120" cy="120" opacity=".6" r="70" />\n <circle cx="120" cy="120" opacity=".3" r="90" />\n <circle cx="120" cy="120" opacity=".2" r="110" />\n </svg>'),a="Cluster of ".concat(n," markers"),u=Number(google.maps.Marker.MAX_ZINDEX)+n;if(google.maps.marker&&r.getMapCapabilities().isAdvancedMarkersAvailable){var c=document.createElement("div");c.innerHTML=s;var l=c.firstElementChild;l.setAttribute("width","50"),l.setAttribute("height","50");var f=document.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("x","50%"),f.setAttribute("y","50%"),f.setAttribute("style","fill: #FFF"),f.setAttribute("text-anchor","middle"),f.setAttribute("font-size","50"),f.setAttribute("dominant-baseline","middle"),f.appendChild(document.createTextNode("".concat(n))),l.appendChild(f);var h={map:r,position:o,zIndex:u,title:a,content:c.firstElementChild};return new google.maps.marker.AdvancedMarkerElement(h)}var p={position:o,zIndex:u,title:a,icon:{url:"data:image/svg+xml;base64,".concat(window.btoa(s)),scaledSize:new google.maps.Size(45,45)},label:{text:String(n),color:"rgba(255,255,255,0.9)",fontSize:"12px"}};return new google.maps.Marker(p)}}]),t}();var Yu,Ku=n((function t(){e(this,t),function(t,e){for(var r in e.prototype)t.prototype[r]=e.prototype[r]}(t,google.maps.OverlayView)}));t.MarkerClustererEvents=void 0,(Yu=t.MarkerClustererEvents||(t.MarkerClustererEvents={})).CLUSTERING_BEGIN="clusteringbegin",Yu.CLUSTERING_END="clusteringend",Yu.CLUSTER_CLICK="click";var Ju=function(t,e,r){r.fitBounds(e.bounds)},Qu=function(r){o(s,r);var i=u(s);function s(t){var r,n=t.map,o=t.markers,a=void 0===o?[]:o,u=t.algorithmOptions,c=void 0===u?{}:u,f=t.algorithm,h=void 0===f?new Ms(c):f,p=t.renderer,d=void 0===p?new Xu:p,m=t.onClusterClick,g=void 0===m?Ju:m;return e(this,s),(r=i.call(this)).markers=l(a),r.clusters=[],r.algorithm=h,r.renderer=d,r.onClusterClick=g,n&&r.setMap(n),r}return n(s,[{key:"addMarker",value:function(t,e){this.markers.includes(t)||(this.markers.push(t),e||this.render())}},{key:"addMarkers",value:function(t,e){var r=this;t.forEach((function(t){r.addMarker(t,!0)})),e||this.render()}},{key:"removeMarker",value:function(t,e){var r=this.markers.indexOf(t);return-1!==r&&(pi.setMap(t,null),this.markers.splice(r,1),e||this.render(),!0)}},{key:"removeMarkers",value:function(t,e){var r=this,n=!1;return t.forEach((function(t){n=r.removeMarker(t,!0)||n})),n&&!e&&this.render(),n}},{key:"clearMarkers",value:function(t){this.markers.length=0,t||this.render()}},{key:"render",value:function(){var e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTERING_BEGIN,this);var r=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()}),n=r.clusters,o=r.changed;(o||null==o)&&(this.reset(),this.clusters=n,this.renderClusters()),google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTERING_END,this)}}},{key:"onAdd",value:function(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}},{key:"onRemove",value:function(){google.maps.event.removeListener(this.idleListener),this.reset()}},{key:"reset",value:function(){this.markers.forEach((function(t){return pi.setMap(t,null)})),this.clusters.forEach((function(t){return t.delete()})),this.clusters=[]}},{key:"renderClusters",value:function(){var e=this,r=new qu(this.markers,this.clusters),n=this.getMap();this.clusters.forEach((function(o){1===o.markers.length?o.marker=o.markers[0]:(o.marker=e.renderer.render(o,r,n),e.onClusterClick&&o.marker.addListener("click",(function(r){google.maps.event.trigger(e,t.MarkerClustererEvents.CLUSTER_CLICK,o),e.onClusterClick(r,o,n)}))),pi.setMap(o.marker,n)}))}}]),s}(Ku);t.AbstractAlgorithm=ki,t.AbstractViewportAlgorithm=Oi,t.Cluster=di,t.ClusterStats=qu,t.DefaultRenderer=Xu,t.GridAlgorithm=Ui,t.MarkerClusterer=Qu,t.NoopAlgorithm=Bi,t.SuperClusterAlgorithm=Ms,t.defaultOnClusterClickHandler=Ju,t.distanceBetweenPoints=yi,t.extendBoundsToPaddedViewport=gi,t.extendPixelBounds=bi,t.filterMarkersToPaddedViewport=mi,t.noop=Si,t.pixelBoundsToLatLngBounds=wi,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.umd.js.map |
@@ -21,4 +21,5 @@ /** | ||
*/ | ||
export type Marker = google.maps.Marker | google.maps.marker.AdvancedMarkerElement; | ||
export declare class MarkerUtils { | ||
static isAdvancedMarker(marker: Marker): boolean; | ||
static isAdvancedMarker(marker: Marker): marker is google.maps.marker.AdvancedMarkerElement; | ||
static setMap(marker: Marker, map: google.maps.Map | null): void; | ||
@@ -25,0 +26,0 @@ static getPosition(marker: Marker): google.maps.LatLng; |
@@ -21,2 +21,3 @@ /** | ||
import { OverlayViewSafe } from "./overlay-view-safe"; | ||
import { Marker } from "./marker-utils"; | ||
export type onClusterClickHandler = (event: google.maps.MapMouseEvent, cluster: Cluster, map: google.maps.Map) => void; | ||
@@ -23,0 +24,0 @@ export interface MarkerClustererOptions { |
@@ -18,2 +18,3 @@ /** | ||
import { Cluster } from "./cluster"; | ||
import { Marker } from "./marker-utils"; | ||
/** | ||
@@ -20,0 +21,0 @@ * Provides statistics on all clusters in the current render cycle for use in {@link Renderer.render}. |
{ | ||
"name": "@googlemaps/markerclusterer", | ||
"version": "2.1.3", | ||
"version": "2.1.4", | ||
"description": "Creates and manages per-zoom-level clusters for large amounts of markers.", | ||
@@ -48,3 +48,3 @@ "keywords": [ | ||
"@rollup/plugin-babel": "^6.0.0", | ||
"@rollup/plugin-commonjs": "^24.0.0", | ||
"@rollup/plugin-commonjs": "^25.0.0", | ||
"@rollup/plugin-html": "^1.0.0", | ||
@@ -61,10 +61,10 @@ "@rollup/plugin-json": "^6.0.0", | ||
"@typescript-eslint/parser": ">=4.1.0", | ||
"chromedriver": "^111.0.0", | ||
"chromedriver": "^113.0.0", | ||
"core-js": "^3.6.5", | ||
"d3-interpolate": "^3.0.1", | ||
"eslint": "^7.8.1", | ||
"eslint": "^8.41.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-jest": "^27.0.1", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"geckodriver": "^3.0.0", | ||
"geckodriver": "^4.0.0", | ||
"jest": "^26.4.2", | ||
@@ -76,3 +76,3 @@ "prettier": "^2.1.1", | ||
"ts-jest": "^26.3.0", | ||
"typedoc": "^0.23.1", | ||
"typedoc": "^0.24.7", | ||
"typescript": "^4.0.2" | ||
@@ -79,0 +79,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
839419
5579