diff --git a/classes/MarkerManager.html b/classes/MarkerManager.html index d25377ff..ec1bf5ba 100644 --- a/classes/MarkerManager.html +++ b/classes/MarkerManager.html @@ -10,10 +10,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

-

Hierarchy

Index

Constructors

constructor

Hierarchy

Index

Constructors

constructor

Properties

shown

shown: boolean

shownMarkers

shownMarkers: number

Methods

addMarker

  • addMarker(marker: Marker, minZoom: number, maxZoom: number): void

Returns MarkerManager

Properties

shown

shown: boolean

shownMarkers

shownMarkers: number

Methods

addMarker

  • addMarker(marker: Marker, minZoom: number, maxZoom: number): void
  • Add a single marker to the map.

    Parameters

    • marker: Marker

      The marker to add.

      @@ -21,7 +21,7 @@

      The minimum zoom level to display the marker.

    • maxZoom: number

      The maximum zoom level to display the marker.

      -

    Returns void

addMarkers

  • addMarkers(markers: Marker[], minZoom: number, maxZoom: number): void

Returns void

addMarkers

  • addMarkers(markers: Marker[], minZoom: number, maxZoom: number): void
  • Add many markers at once. Does not actually update the map, just the internal grid.

    Parameters

    • markers: Marker[]
      @@ -30,10 +30,10 @@

      The minimum zoom level to display the markers.

    • maxZoom: number

      The maximum zoom level to display the markers.

      -

    Returns void

clearMarkers

  • clearMarkers(): void

Returns void

clearMarkers

  • clearMarkers(): void
  • Removes all markers in the manager, and removes any visible markers from the map.

    -

    Returns void

getMarker

  • getMarker(lat: number, lng: number, zoom: number): Marker

getMarker

  • getMarker(lat: number, lng: number, zoom: number): Marker
  • Returns a marker given latitude, longitude and zoom. If the marker does not exist, the method will return a new marker. If a new marker is created, it will NOT be added to the manager.

    @@ -44,35 +44,35 @@
  • zoom: number

    the zoom level

Returns Marker

marker - the marker found at lat and lng

-

getMarkerCount

  • getMarkerCount(zoom: number): number

getMarkerCount

  • getMarkerCount(zoom: number): number
  • Calculates the total number of markers potentially visible at a given zoom level.

    Parameters

    • zoom: number

      The zoom level to check.

      -

    Returns number

hide

  • hide(): void

Returns number

hide

  • hide(): void

isHidden

  • isHidden(): boolean

isHidden

  • isHidden(): boolean
  • Returns true if the manager is hidden. Otherwise returns false.

    Returns boolean

    Hidden

    -

refresh

  • refresh(): void

refresh

  • refresh(): void
  • Refresh forces the marker-manager into a good state.

    1. If never before initialized, shows all the markers.
    2. If previously initialized, removes and re-adds all markers.
    3. -

    Returns void

removeMarker

  • removeMarker(marker: Marker): void

removeMarker

  • removeMarker(marker: Marker): void
  • Removes marker from the manager and from the map (if it's currently visible).

    Parameters

    • marker: Marker

      The marker to delete.

      -

    Returns void

resetManager

  • resetManager(): void

Returns void

resetManager

  • resetManager(): void
  • Initializes MarkerManager arrays for all zoom levels Called by constructor and by clearAllMarkers

    -

    Returns void

show

  • show(): void

show

  • show(): void

toggle

  • toggle(): void

toggle

  • toggle(): void

visible

  • visible(): boolean

visible

  • visible(): boolean
  • Is this layer visible?

    Returns visibility setting

    Returns boolean

    Visible

    diff --git a/dist/index.dev.js b/dist/index.dev.js index 95fe71c9..3daa1fa1 100644 --- a/dist/index.dev.js +++ b/dist/index.dev.js @@ -1,2 +1,2 @@ -this.google=this.google||{},this.google.maps=this.google.maps||{},this.google.maps.plugins=this.google.maps.plugins||{},this.google.maps.plugins.markermanager=function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;n=74)&&(s=S.match(/Chrome\/(\d+)/))&&(a=s[1]);var z=a&&+a,B=!!Object.getOwnPropertySymbols&&!l((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&z&&z<41})),E=B&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,G=E?function(t){return"symbol"==typeof t}:function(t){var e=O("Symbol");return M(e)&&Object(t)instanceof e},Z=function(t){if(M(t))return t;throw TypeError(function(t){try{return String(t)}catch(t){return"Object"}}(t)+" is not a function")},A=function(t,e){try{Object.defineProperty(h,t,{value:e,configurable:!0,writable:!0})}catch(n){h[t]=e}return e},L="__core-js_shared__",X=h[L]||A(L,{}),Y=o((function(t){(t.exports=function(t,e){return X[t]||(X[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),F=function(t){return Object(b(t))},N={}.hasOwnProperty,I=Object.hasOwn||function(t,e){return N.call(F(t),e)},D=0,W=Math.random(),V=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++D+W).toString(36)},R=Y("wks"),q=h.Symbol,U=E?q:q&&q.withoutSetter||V,H=function(t){return I(R,t)&&(B||"string"==typeof R[t])||(B&&I(q,t)?R[t]=q[t]:R[t]=U("Symbol."+t)),R[t]},K=H("toPrimitive"),$=function(t,e){if(!k(t)||G(t))return t;var n,r,i=null==(n=t[K])?void 0:Z(n);if(i){if(void 0===e&&(e="default"),r=i.call(t,e),!k(r)||G(r))return r;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&M(n=t.toString)&&!k(r=n.call(t)))return r;if(M(n=t.valueOf)&&!k(r=n.call(t)))return r;if("string"!==e&&M(n=t.toString)&&!k(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}(t,e)},J=function(t){var e=$(t,"string");return G(e)?e:String(e)},Q=h.document,tt=k(Q)&&k(Q.createElement),et=!c&&!l((function(){return 7!=Object.defineProperty((t="div",tt?Q.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),nt=Object.getOwnPropertyDescriptor,rt={f:c?nt:function(t,e){if(t=w(t),e=J(e),et)try{return nt(t,e)}catch(t){}if(I(t,e))return m(!d.f.call(t,e),t[e])}},it=function(t){if(k(t))return t;throw TypeError(String(t)+" is not an object")},ot=Object.defineProperty,st={f:c?ot:function(t,e,n){if(it(t),e=J(e),it(n),et)try{return ot(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},at=c?function(t,e,n){return st.f(t,e,m(1,n))}:function(t,e,n){return t[e]=n,t},ut=Function.toString;M(X.inspectSource)||(X.inspectSource=function(t){return ut.call(t)});var ht,lt,ct,ft,gt=X.inspectSource,dt=h.WeakMap,mt=M(dt)&&/native code/.test(gt(dt)),vt=Y("keys"),_t={},pt="Object already initialized",yt=h.WeakMap;if(mt||X.state){var bt=X.state||(X.state=new yt),wt=bt.get,Mt=bt.has,kt=bt.set;ht=function(t,e){if(Mt.call(bt,t))throw new TypeError(pt);return e.facade=t,kt.call(bt,t,e),e},lt=function(t){return wt.call(bt,t)||{}},ct=function(t){return Mt.call(bt,t)}}else{var xt=vt[ft="state"]||(vt[ft]=V(ft));_t[xt]=!0,ht=function(t,e){if(I(t,xt))throw new TypeError(pt);return e.facade=t,at(t,xt,e),e},lt=function(t){return I(t,xt)?t[xt]:{}},ct=function(t){return I(t,xt)}}var Ot={set:ht,get:lt,has:ct,enforce:function(t){return ct(t)?lt(t):ht(t,{})},getterFor:function(t){return function(e){var n;if(!k(e)||(n=lt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},St=Function.prototype,Pt=c&&Object.getOwnPropertyDescriptor,Ct=I(St,"name"),jt={EXISTS:Ct,PROPER:Ct&&"something"===function(){}.name,CONFIGURABLE:Ct&&(!c||c&&Pt(St,"name").configurable)},Tt=o((function(t){var e=jt.CONFIGURABLE,n=Ot.get,r=Ot.enforce,i=String(String).split("String");(t.exports=function(t,n,o,s){var a,u=!!s&&!!s.unsafe,l=!!s&&!!s.enumerable,c=!!s&&!!s.noTargetGet,f=s&&void 0!==s.name?s.name:n;M(o)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!I(o,"name")||e&&o.name!==f)&&at(o,"name",f),(a=r(o)).source||(a.source=i.join("string"==typeof f?f:""))),t!==h?(u?!c&&t[n]&&(l=!0):delete t[n],l?t[n]=o:at(t,n,o)):l?t[n]=o:A(n,o)})(Function.prototype,"toString",(function(){return M(this)&&n(this).source||gt(this)}))})),zt=Math.ceil,Bt=Math.floor,Et=function(t){var e=+t;return e!=e||0===e?0:(e>0?Bt:zt)(e)},Gt=Math.max,Zt=Math.min,At=function(t,e){var n=Et(t);return n<0?Gt(n+e,0):Zt(n,e)},Lt=Math.min,Xt=function(t){return(e=t.length)>0?Lt(Et(e),9007199254740991):0;var e},Yt=function(t){return function(e,n,r){var i,o=w(e),s=Xt(o),a=At(r,s);if(t&&n!=n){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===n)return t||a||0;return!t&&-1}},Ft={includes:Yt(!0),indexOf:Yt(!1)}.indexOf,Nt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),It={f:Object.getOwnPropertyNames||function(t){return function(t,e){var n,r=w(t),i=0,o=[];for(n in r)!I(_t,n)&&I(r,n)&&o.push(n);for(;e.length>i;)I(r,n=e[i++])&&(~Ft(o,n)||o.push(n));return o}(t,Nt)}},Dt={f:Object.getOwnPropertySymbols},Wt=O("Reflect","ownKeys")||function(t){var e=It.f(it(t)),n=Dt.f;return n?e.concat(n(t)):e},Vt=function(t,e){for(var n=Wt(e),r=st.f,i=rt.f,o=0;o=51||!l((function(){var t=[];return(t.constructor={})[_e]=function(){return{foo:1}},1!==t[ne](Boolean).foo}))),ye=Math.max,be=Math.min,we=9007199254740991,Me="Maximum allowed length exceeded";function ke(t,e){return new google.maps.Point(~~(.5+(i=t.lng(),(1+i/180)*(2<we)throw TypeError(Me);for(i=me(u,r),o=0;oh-r+n;o--)delete u[o-1]}else if(n>r)for(o=h-r;o>l;o--)a=o+n-1,(s=o+r-1)in u?u[a]=u[s]:delete u[a];for(o=0;o=t.x&&this.minY<=t.y&&this.maxY>=t.y}}]),t}(),Oe=function(){function t(n,r){var i=this,o=r.maxZoom,s=void 0===o?19:o,a=r.trackMarkers,u=r.shown,h=void 0===u||u,l=r.borderPadding,c=void 0===l?100:l;e(this,t),this._tileSize=1024,this._map=n,this._mapZoom=n.getZoom(),this._maxZoom=s,this._trackMarkers=a,this._swPadding=new google.maps.Size(-c,c),this._nePadding=new google.maps.Size(c,-c),this._gridWidth={},this._grid=[],this._grid[this._maxZoom]=[],this._numMarkers={},this._numMarkers[this._maxZoom]=0,this.shownMarkers=0,this.shown=h,google.maps.event.addListenerOnce(n,"idle",(function(){i._initialize()}))}return r(t,[{key:"_initialize",value:function(){var t=this._map.mapTypes;for(var e in t)e in t&&t.get(e)&&"number"===t.get(e).maxZoom&&this._map.mapTypes.get(e).maxZoom;google.maps.event.addListener(this._map,"dragend",this._onMapMoveEnd.bind(this)),google.maps.event.addListener(this._map,"idle",this._onMapMoveEnd.bind(this)),google.maps.event.addListener(this._map,"zoom_changed",this._onMapMoveEnd.bind(this)),this.resetManager(),this._shownBounds=this._getMapGridBounds(),google.maps.event.trigger(this,"loaded")}},{key:"_removeOverlay",value:function(t){t.setMap(null),this.shownMarkers--}},{key:"_addOverlay",value:function(t){this.shown&&(t.setMap(this._map),this.shownMarkers++)}},{key:"resetManager",value:function(){for(var t=256,e=0;e<=this._maxZoom;++e)this._grid[e]=[],this._numMarkers[e]=0,this._gridWidth[e]=Math.ceil(t/this._tileSize),t<<=1}},{key:"clearMarkers",value:function(){this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.resetManager()}},{key:"_getTilePoint",value:function(t,e,n){var r=ke(t,e);return new google.maps.Point(Math.floor((r.x+n.width)/this._tileSize),Math.floor((r.y+n.height)/this._tileSize))}},{key:"_addMarkerBatch",value:function(t,e,n){var r=this,i=t.getPosition();t.set("__minZoom",e),this._trackMarkers&&google.maps.event.addListener(t,"changed",(function(t,e,n){r._onMarkerMoved(t,e,n)}));for(var o=this._getTilePoint(i,n,new google.maps.Size(0,0)),s=n;s>=e;s--){this._getGridCellCreate(o.x,o.y,s).push(t),o.x=o.x>>1,o.y=o.y>>1}}},{key:"_isGridPointVisible",value:function(t){var e=this._shownBounds.minY<=t.y&&t.y<=this._shownBounds.maxY,n=this._shownBounds.minX,r=n<=t.x&&t.x<=this._shownBounds.maxX;if(!r&&n<0){var i=this._gridWidth[this._shownBounds.z];r=n+i<=t.x&&t.x<=i-1}return e&&r}},{key:"_onMarkerMoved",value:function(t,e,n){for(var r=this._maxZoom,i=!1,o=this._getTilePoint(e,r,new google.maps.Size(0,0)),s=this._getTilePoint(n,r,new google.maps.Size(0,0));r>=0&&(o.x!==s.x||o.y!==s.y);){var a=this._getGridCellNoCreate(o.x,o.y,r);a&&this._removeMarkerFromCell(a,t)&&this._getGridCellCreate(s.x,s.y,r).push(t),r===this._mapZoom&&(this._isGridPointVisible(o)?this._isGridPointVisible(s)||(this._removeOverlay(t),i=!0):this._isGridPointVisible(s)&&(this._addOverlay(t),i=!0)),o.x=o.x>>1,o.y=o.y>>1,s.x=s.x>>1,s.y=s.y>>1,--r}i&&this._notifyListeners()}},{key:"removeMarker",value:function(t){for(var e=this._maxZoom,n=!1,r=t.getPosition(),i=this._getTilePoint(r,e,new google.maps.Size(0,0));e>=0;){var o=this._getGridCellNoCreate(i.x,i.y,e);o&&this._removeMarkerFromCell(o,t),e===this._mapZoom&&this._isGridPointVisible(i)&&(this._removeOverlay(t),n=!0),i.x=i.x>>1,i.y=i.y>>1,--e}n&&this._notifyListeners(),this._numMarkers[t.get("__minZoom")]--}},{key:"addMarkers",value:function(t,e,n){n=this._getOptmaxZoom(n);for(var r=t.length-1;r>=0;r--)this._addMarkerBatch(t[r],e,n);this._numMarkers[e]+=t.length}},{key:"_getOptmaxZoom",value:function(t){return t||this._maxZoom}},{key:"getMarkerCount",value:function(t){for(var e=0,n=0;n<=t;n++)e+=this._numMarkers[n];return e}},{key:"getMarker",value:function(t,e,n){var r=new google.maps.LatLng(t,e),i=this._getTilePoint(r,n,new google.maps.Size(0,0)),o=new google.maps.Marker({position:r}),s=this._getGridCellNoCreate(i.x,i.y,n);if(void 0!==s)for(var a=0;a=u&&(s.x=0,a.x=u-1);var h=new xe([s,a],e);return h.z=e,h}},{key:"_getMapGridBounds",value:function(){return this._getGridBounds(this._map.getBounds(),this._mapZoom,this._swPadding,this._nePadding)}},{key:"_onMapMoveEnd",value:function(){window.setTimeout(this._updateMarkers.bind(this),0)}},{key:"visible",value:function(){return!!this.shown}},{key:"isHidden",value:function(){return!this.shown}},{key:"show",value:function(){this.shown=!0,this.refresh()}},{key:"hide",value:function(){this.shown=!1,this.refresh()}},{key:"toggle",value:function(){this.shown=!this.shown,this.refresh()}},{key:"refresh",value:function(){this.shownMarkers>0&&this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.show&&this._processAll(this._shownBounds,this._addOverlay.bind(this)),this._notifyListeners()}},{key:"_updateMarkers",value:function(){this._mapZoom=this._map.getZoom();var t=this._getMapGridBounds();t.equals(this._shownBounds)&&t.z===this._shownBounds.z||(t.z!==this._shownBounds.z?(this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.show&&this._processAll(t,this._addOverlay.bind(this))):(this._rectangleDiff(this._shownBounds,t,this._removeCellMarkers.bind(this)),this.show&&this._rectangleDiff(t,this._shownBounds,this._addCellMarkers.bind(this))),this._shownBounds=t,this._notifyListeners())}},{key:"_notifyListeners",value:function(){google.maps.event.trigger(this,"changed",this._shownBounds,this.shownMarkers)}},{key:"_processAll",value:function(t,e){for(var n=t.minX;n<=t.maxX;n++)for(var r=t.minY;r<=t.maxY;r++)this._processCellMarkers(n,r,t.z,e)}},{key:"_processCellMarkers",value:function(t,e,n,r){var i=this._getGridCellNoCreate(t,e,n);if(i)for(var o=i.length-1;o>=0;o--)r(i[o])}},{key:"_removeCellMarkers",value:function(t,e,n){this._processCellMarkers(t,e,n,this._removeOverlay.bind(this))}},{key:"_addCellMarkers",value:function(t,e,n){this._processCellMarkers(t,e,n,this._addOverlay.bind(this))}},{key:"_rectangleDiff",value:function(t,e,n){this._rectangleDiffCoords(t,e,(function(e,r){n(e,r,t.z)}))}},{key:"_rectangleDiffCoords",value:function(t,e,n){var r,i,o=t.minX,s=t.minY,a=t.maxX,u=t.maxY,h=e.minX,l=e.minY,c=e.maxX,f=e.maxY;for(r=o;r<=a;r++){for(i=s;i<=u&&i=o;r--)n(r,i);for(r=Math.max(o,c+1);r<=a;r++)n(r,i)}}},{key:"_removeMarkerFromCell",value:function(t,e){for(var n=0,r=0;r0&&s[0]<4?1:+(s[0]+s[1])),!a&&L&&(!(s=L.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=L.match(/Chrome\/(\d+)/))&&(a=+s[1]);var I=a,D=!!Object.getOwnPropertySymbols&&!l((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&I&&I<41})),W=D&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,V=h.Object,R=W?function(t){return"symbol"==typeof t}:function(t){var e=Z("Symbol");return T(e)&&A(e.prototype,V(t))},q=h.String,U=h.TypeError,H=function(t){if(T(t))return t;throw U(function(t){try{return q(t)}catch(t){return"Object"}}(t)+" is not a function")},K=h.TypeError,$=Object.defineProperty,J=function(t,e){try{$(h,t,{value:e,configurable:!0,writable:!0})}catch(n){h[t]=e}return e},Q="__core-js_shared__",tt=h[Q]||J(Q,{}),et=o((function(t){(t.exports=function(t,e){return tt[t]||(tt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.0",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),nt=h.Object,rt=function(t){return nt(z(t))},it=M({}.hasOwnProperty),ot=Object.hasOwn||function(t,e){return it(rt(t),e)},st=0,at=Math.random(),ut=M(1..toString),ht=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ut(++st+at,36)},lt=et("wks"),ct=h.Symbol,ft=ct&&ct.for,gt=W?ct:ct&&ct.withoutSetter||ht,dt=function(t){if(!ot(lt,t)||!D&&"string"!=typeof lt[t]){var e="Symbol."+t;D&&ot(ct,t)?lt[t]=ct[t]:lt[t]=W&&ft?ft(e):gt(e)}return lt[t]},mt=h.TypeError,vt=dt("toPrimitive"),pt=function(t,e){if(!E(t)||R(t))return t;var n,r,i=null==(n=t[vt])?void 0:H(n);if(i){if(void 0===e&&(e="default"),r=g(i,t,e),!E(r)||R(r))return r;throw mt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&T(n=t.toString)&&!E(r=g(n,t)))return r;if(T(n=t.valueOf)&&!E(r=g(n,t)))return r;if("string"!==e&&T(n=t.toString)&&!E(r=g(n,t)))return r;throw K("Can't convert object to primitive value")}(t,e)},_t=function(t){var e=pt(t,"string");return R(e)?e:e+""},yt=h.document,bt=E(yt)&&E(yt.createElement),wt=!c&&!l((function(){return 7!=Object.defineProperty((t="div",bt?yt.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),Mt=Object.getOwnPropertyDescriptor,kt={f:c?Mt:function(t,e){if(t=B(t),e=_t(e),wt)try{return Mt(t,e)}catch(t){}if(ot(t,e))return p(!g(v.f,t,e),t[e])}},xt=h.String,Ot=h.TypeError,St=function(t){if(E(t))return t;throw Ot(xt(t)+" is not an object")},Pt=h.TypeError,Ct=Object.defineProperty,jt={f:c?Ct:function(t,e,n){if(St(t),e=_t(e),St(n),wt)try{return Ct(t,e,n)}catch(t){}if("get"in n||"set"in n)throw Pt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},zt=c?function(t,e,n){return jt.f(t,e,p(1,n))}:function(t,e,n){return t[e]=n,t},Bt=M(Function.toString);T(tt.inspectSource)||(tt.inspectSource=function(t){return Bt(t)});var Tt,Et,Gt,Zt,At=tt.inspectSource,Lt=h.WeakMap,Xt=T(Lt)&&/native code/.test(At(Lt)),Yt=et("keys"),Ft={},Nt="Object already initialized",It=h.TypeError,Dt=h.WeakMap;if(Xt||tt.state){var Wt=tt.state||(tt.state=new Dt),Vt=M(Wt.get),Rt=M(Wt.has),qt=M(Wt.set);Tt=function(t,e){if(Rt(Wt,t))throw new It(Nt);return e.facade=t,qt(Wt,t,e),e},Et=function(t){return Vt(Wt,t)||{}},Gt=function(t){return Rt(Wt,t)}}else{var Ut=Yt[Zt="state"]||(Yt[Zt]=ht(Zt));Ft[Ut]=!0,Tt=function(t,e){if(ot(t,Ut))throw new It(Nt);return e.facade=t,zt(t,Ut,e),e},Et=function(t){return ot(t,Ut)?t[Ut]:{}},Gt=function(t){return ot(t,Ut)}}var Ht={set:Tt,get:Et,has:Gt,enforce:function(t){return Gt(t)?Et(t):Tt(t,{})},getterFor:function(t){return function(e){var n;if(!E(e)||(n=Et(e)).type!==t)throw It("Incompatible receiver, "+t+" required");return n}}},Kt=Function.prototype,$t=c&&Object.getOwnPropertyDescriptor,Jt=ot(Kt,"name"),Qt={EXISTS:Jt,PROPER:Jt&&"something"===function(){}.name,CONFIGURABLE:Jt&&(!c||c&&$t(Kt,"name").configurable)},te=o((function(t){var e=Qt.CONFIGURABLE,n=Ht.get,r=Ht.enforce,i=String(String).split("String");(t.exports=function(t,n,o,s){var a,u=!!s&&!!s.unsafe,l=!!s&&!!s.enumerable,c=!!s&&!!s.noTargetGet,f=s&&void 0!==s.name?s.name:n;T(o)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!ot(o,"name")||e&&o.name!==f)&&zt(o,"name",f),(a=r(o)).source||(a.source=i.join("string"==typeof f?f:""))),t!==h?(u?!c&&t[n]&&(l=!0):delete t[n],l?t[n]=o:zt(t,n,o)):l?t[n]=o:J(n,o)})(Function.prototype,"toString",(function(){return T(this)&&n(this).source||At(this)}))})),ee=Math.ceil,ne=Math.floor,re=function(t){var e=+t;return e!=e||0===e?0:(e>0?ne:ee)(e)},ie=Math.max,oe=Math.min,se=function(t,e){var n=re(t);return n<0?ie(n+e,0):oe(n,e)},ae=Math.min,ue=function(t){return(e=t.length)>0?ae(re(e),9007199254740991):0;var e},he=function(t){return function(e,n,r){var i,o=B(e),s=ue(o),a=se(r,s);if(t&&n!=n){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===n)return t||a||0;return!t&&-1}},le={includes:he(!0),indexOf:he(!1)}.indexOf,ce=M([].push),fe=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),ge={f:Object.getOwnPropertyNames||function(t){return function(t,e){var n,r=B(t),i=0,o=[];for(n in r)!ot(Ft,n)&&ot(r,n)&&ce(o,n);for(;e.length>i;)ot(r,n=e[i++])&&(~le(o,n)||ce(o,n));return o}(t,fe)}},de={f:Object.getOwnPropertySymbols},me=M([].concat),ve=Z("Reflect","ownKeys")||function(t){var e=ge.f(St(t)),n=de.f;return n?me(e,n(t)):e},pe=function(t,e){for(var n=ve(e),r=jt.f,i=kt.f,o=0;o=51||!l((function(){var t=[];return(t.constructor={})[Re]=function(){return{foo:1}},1!==t[Ce](Boolean).foo}))),Ue=h.TypeError,He=Math.max,Ke=Math.min,$e=9007199254740991,Je="Maximum allowed length exceeded";function Qe(t,e){return new google.maps.Point(~~(.5+(i=t.lng(),(1+i/180)*(2<$e)throw Ue(Je);for(i=We(u,r),o=0;oh-r+n;o--)delete u[o-1]}else if(n>r)for(o=h-r;o>l;o--)a=o+n-1,(s=o+r-1)in u?u[a]=u[s]:delete u[a];for(o=0;o=t.x&&this.minY<=t.y&&this.maxY>=t.y}}]),t}(),en=function(){function t(n,r){var i=this,o=r.maxZoom,s=void 0===o?19:o,a=r.trackMarkers,u=r.shown,h=void 0===u||u,l=r.borderPadding,c=void 0===l?100:l;e(this,t),this._tileSize=1024,this._map=n,this._mapZoom=n.getZoom(),this._maxZoom=s,this._trackMarkers=a,this._swPadding=new google.maps.Size(-c,c),this._nePadding=new google.maps.Size(c,-c),this._gridWidth={},this._grid=[],this._grid[this._maxZoom]=[],this._numMarkers={},this._numMarkers[this._maxZoom]=0,this.shownMarkers=0,this.shown=h,google.maps.event.addListenerOnce(n,"idle",(function(){i._initialize()}))}return r(t,[{key:"_initialize",value:function(){var t=this._map.mapTypes;for(var e in t)e in t&&t.get(e)&&"number"===t.get(e).maxZoom&&this._map.mapTypes.get(e).maxZoom;google.maps.event.addListener(this._map,"dragend",this._onMapMoveEnd.bind(this)),google.maps.event.addListener(this._map,"idle",this._onMapMoveEnd.bind(this)),google.maps.event.addListener(this._map,"zoom_changed",this._onMapMoveEnd.bind(this)),this.resetManager(),this._shownBounds=this._getMapGridBounds(),google.maps.event.trigger(this,"loaded")}},{key:"_removeOverlay",value:function(t){t.setMap(null),this.shownMarkers--}},{key:"_addOverlay",value:function(t){this.shown&&(t.setMap(this._map),this.shownMarkers++)}},{key:"resetManager",value:function(){for(var t=256,e=0;e<=this._maxZoom;++e)this._grid[e]=[],this._numMarkers[e]=0,this._gridWidth[e]=Math.ceil(t/this._tileSize),t<<=1}},{key:"clearMarkers",value:function(){this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.resetManager()}},{key:"_getTilePoint",value:function(t,e,n){var r=Qe(t,e);return new google.maps.Point(Math.floor((r.x+n.width)/this._tileSize),Math.floor((r.y+n.height)/this._tileSize))}},{key:"_addMarkerBatch",value:function(t,e,n){var r=this,i=t.getPosition();t.set("__minZoom",e),this._trackMarkers&&google.maps.event.addListener(t,"changed",(function(t,e,n){r._onMarkerMoved(t,e,n)}));for(var o=this._getTilePoint(i,n,new google.maps.Size(0,0)),s=n;s>=e;s--){this._getGridCellCreate(o.x,o.y,s).push(t),o.x=o.x>>1,o.y=o.y>>1}}},{key:"_isGridPointVisible",value:function(t){var e=this._shownBounds.minY<=t.y&&t.y<=this._shownBounds.maxY,n=this._shownBounds.minX,r=n<=t.x&&t.x<=this._shownBounds.maxX;if(!r&&n<0){var i=this._gridWidth[this._shownBounds.z];r=n+i<=t.x&&t.x<=i-1}return e&&r}},{key:"_onMarkerMoved",value:function(t,e,n){for(var r=this._maxZoom,i=!1,o=this._getTilePoint(e,r,new google.maps.Size(0,0)),s=this._getTilePoint(n,r,new google.maps.Size(0,0));r>=0&&(o.x!==s.x||o.y!==s.y);){var a=this._getGridCellNoCreate(o.x,o.y,r);a&&this._removeMarkerFromCell(a,t)&&this._getGridCellCreate(s.x,s.y,r).push(t),r===this._mapZoom&&(this._isGridPointVisible(o)?this._isGridPointVisible(s)||(this._removeOverlay(t),i=!0):this._isGridPointVisible(s)&&(this._addOverlay(t),i=!0)),o.x=o.x>>1,o.y=o.y>>1,s.x=s.x>>1,s.y=s.y>>1,--r}i&&this._notifyListeners()}},{key:"removeMarker",value:function(t){for(var e=this._maxZoom,n=!1,r=t.getPosition(),i=this._getTilePoint(r,e,new google.maps.Size(0,0));e>=0;){var o=this._getGridCellNoCreate(i.x,i.y,e);o&&this._removeMarkerFromCell(o,t),e===this._mapZoom&&this._isGridPointVisible(i)&&(this._removeOverlay(t),n=!0),i.x=i.x>>1,i.y=i.y>>1,--e}n&&this._notifyListeners(),this._numMarkers[t.get("__minZoom")]--}},{key:"addMarkers",value:function(t,e,n){n=this._getOptmaxZoom(n);for(var r=t.length-1;r>=0;r--)this._addMarkerBatch(t[r],e,n);this._numMarkers[e]+=t.length}},{key:"_getOptmaxZoom",value:function(t){return t||this._maxZoom}},{key:"getMarkerCount",value:function(t){for(var e=0,n=0;n<=t;n++)e+=this._numMarkers[n];return e}},{key:"getMarker",value:function(t,e,n){var r=new google.maps.LatLng(t,e),i=this._getTilePoint(r,n,new google.maps.Size(0,0)),o=new google.maps.Marker({position:r}),s=this._getGridCellNoCreate(i.x,i.y,n);if(void 0!==s)for(var a=0;a=u&&(s.x=0,a.x=u-1);var h=new tn([s,a],e);return h.z=e,h}},{key:"_getMapGridBounds",value:function(){return this._getGridBounds(this._map.getBounds(),this._mapZoom,this._swPadding,this._nePadding)}},{key:"_onMapMoveEnd",value:function(){window.setTimeout(this._updateMarkers.bind(this),0)}},{key:"visible",value:function(){return!!this.shown}},{key:"isHidden",value:function(){return!this.shown}},{key:"show",value:function(){this.shown=!0,this.refresh()}},{key:"hide",value:function(){this.shown=!1,this.refresh()}},{key:"toggle",value:function(){this.shown=!this.shown,this.refresh()}},{key:"refresh",value:function(){this.shownMarkers>0&&this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.show&&this._processAll(this._shownBounds,this._addOverlay.bind(this)),this._notifyListeners()}},{key:"_updateMarkers",value:function(){this._mapZoom=this._map.getZoom();var t=this._getMapGridBounds();t.equals(this._shownBounds)&&t.z===this._shownBounds.z||(t.z!==this._shownBounds.z?(this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.show&&this._processAll(t,this._addOverlay.bind(this))):(this._rectangleDiff(this._shownBounds,t,this._removeCellMarkers.bind(this)),this.show&&this._rectangleDiff(t,this._shownBounds,this._addCellMarkers.bind(this))),this._shownBounds=t,this._notifyListeners())}},{key:"_notifyListeners",value:function(){google.maps.event.trigger(this,"changed",this._shownBounds,this.shownMarkers)}},{key:"_processAll",value:function(t,e){for(var n=t.minX;n<=t.maxX;n++)for(var r=t.minY;r<=t.maxY;r++)this._processCellMarkers(n,r,t.z,e)}},{key:"_processCellMarkers",value:function(t,e,n,r){var i=this._getGridCellNoCreate(t,e,n);if(i)for(var o=i.length-1;o>=0;o--)r(i[o])}},{key:"_removeCellMarkers",value:function(t,e,n){this._processCellMarkers(t,e,n,this._removeOverlay.bind(this))}},{key:"_addCellMarkers",value:function(t,e,n){this._processCellMarkers(t,e,n,this._addOverlay.bind(this))}},{key:"_rectangleDiff",value:function(t,e,n){this._rectangleDiffCoords(t,e,(function(e,r){n(e,r,t.z)}))}},{key:"_rectangleDiffCoords",value:function(t,e,n){var r,i,o=t.minX,s=t.minY,a=t.maxX,u=t.maxY,h=e.minX,l=e.minY,c=e.maxX,f=e.maxY;for(r=o;r<=a;r++){for(i=s;i<=u&&i=o;r--)n(r,i);for(r=Math.max(o,c+1);r<=a;r++)n(r,i)}}},{key:"_removeMarkerFromCell",value:function(t,e){for(var n=0,r=0;r= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = function (argument) {\n return typeof argument === 'function';\n};\n","var isCallable = require('../internals/is-callable');\n\nmodule.exports = function (it) {\n return typeof it === 'object' ? it !== null : isCallable(it);\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol();\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n return !String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n","/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n","var isCallable = require('../internals/is-callable');\nvar getBuiltIn = require('../internals/get-built-in');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && Object(it) instanceof $Symbol;\n};\n","var isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw TypeError(tryToString(argument) + ' is not a function');\n};\n","module.exports = function (argument) {\n try {\n return String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n","var global = require('../internals/global');\n\nmodule.exports = function (key, value) {\n try {\n // eslint-disable-next-line es/no-object-defineproperty -- safe\n Object.defineProperty(global, key, { value: value, configurable: true, writable: true });\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.18.3',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2021 Denis Pushkarev (zloirock.ru)'\n});\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var toObject = require('../internals/to-object');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty.call(toObject(it), key);\n};\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar hasOwn = require('../internals/has-own-property');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n }\n } return WellKnownSymbolsStore[name];\n};\n","var isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = exoticToPrim.call(input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n","var aCallable = require('../internals/a-callable');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return func == null ? undefined : aCallable(func);\n};\n","var isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = fn.call(input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : String(key);\n};\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- requied for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (hasOwn(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","var isObject = require('../internals/is-object');\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw TypeError(String(argument) + ' is not an object');\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var isCallable = require('../internals/is-callable');\nvar store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return hasOwn(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return hasOwn(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));\n","module.exports = {};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar hasOwn = require('../internals/has-own-property');\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var name = options && options.name !== undefined ? options.name : key;\n var state;\n if (isCallable(value)) {\n if (String(name).slice(0, 7) === 'Symbol(') {\n name = '[' + String(name).replace(/^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n createNonEnumerableProperty(value, 'name', name);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof name == 'string' ? name : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n});\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToIntegerOrInfinity` abstract operation\n// https://tc39.es/ecma262/#sec-tointegerorinfinity\nmodule.exports = function (argument) {\n var number = +argument;\n // eslint-disable-next-line no-self-compare -- safe\n return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toIntegerOrInfinity(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var toLength = require('../internals/to-length');\n\n// `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\nmodule.exports = function (obj) {\n return toLength(obj.length);\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = lengthOfArrayLike(O);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var hasOwn = require('../internals/has-own-property');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (hasOwn(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","var hasOwn = require('../internals/has-own-property');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!hasOwn(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : isCallable(detection) ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","var classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(argument) {\n return classof(argument) == 'Array';\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar isCallable = require('../internals/is-callable');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof');\nvar getBuiltIn = require('../internals/get-built-in');\nvar inspectSource = require('../internals/inspect-source');\n\nvar empty = [];\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = constructorRegExp.exec;\nvar INCORRECT_TO_STRING = !constructorRegExp.exec(function () { /* empty */ });\n\nvar isConstructorModern = function (argument) {\n if (!isCallable(argument)) return false;\n try {\n construct(Object, empty, argument);\n return true;\n } catch (error) {\n return false;\n }\n};\n\nvar isConstructorLegacy = function (argument) {\n if (!isCallable(argument)) return false;\n switch (classof(argument)) {\n case 'AsyncFunction':\n case 'GeneratorFunction':\n case 'AsyncGeneratorFunction': return false;\n // we can't check .prototype since constructors produced by .bind haven't it\n } return INCORRECT_TO_STRING || !!exec.call(constructorRegExp, inspectSource(argument));\n};\n\n// `IsConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-isconstructor\nmodule.exports = !construct || fails(function () {\n var called;\n return isConstructorModern(isConstructorModern.call)\n || !isConstructorModern(Object)\n || !isConstructorModern(function () { called = true; })\n || called;\n}) ? isConstructorLegacy : isConstructorModern;\n","var isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// a part of `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (isConstructor(C) && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","var arraySpeciesConstructor = require('../internals/array-species-constructor');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n};\n","'use strict';\nvar toPropertyKey = require('../internals/to-property-key');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPropertyKey(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toObject = require('../internals/to-object');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\n\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.es/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = lengthOfArrayLike(O);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);\n }\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n});\n","/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @ignore\n *\n * @param lng\n */\nfunction lngToX(lng: number): number {\n return 1 + lng / 180;\n}\n/**\n * @ignore\n *\n * @param {number} lat\n * @returns {number}\n */\nfunction latToY(lat: number): number {\n const sinofphi = Math.sin((lat * Math.PI) / 180);\n return 1 - (0.5 / Math.PI) * Math.log((1 + sinofphi) / (1 - sinofphi));\n}\n\n/**\n * @ignore\n *\n * @param latlng\n * @param zoom\n */\nexport function latLngToPixel(\n latlng: google.maps.LatLng,\n zoom: number\n): google.maps.Point {\n return new google.maps.Point(\n ~~(0.5 + lngToX(latlng.lng()) * (2 << (zoom + 6))),\n ~~(0.5 + latToY(latlng.lat()) * (2 << (zoom + 6)))\n );\n}\n","/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Helper class to create a bounds of INT ranges.\n * @ignore\n */\nexport class GridBounds {\n public z: number;\n public minX: number;\n public maxX: number;\n public minY: number;\n public maxY: number;\n\n /**\n *\n * @param bounds\n * @param z\n */\n constructor(bounds: google.maps.Point[], z: number) {\n // [sw, ne]\n this.z = z;\n this.minX = Math.min(bounds[0].x, bounds[1].x);\n this.maxX = Math.max(bounds[0].x, bounds[1].x);\n this.minY = Math.min(bounds[0].y, bounds[1].y);\n this.maxY = Math.max(bounds[0].y, bounds[1].y);\n }\n\n /**\n * Returns true if this bounds equal the given bounds.\n * @param {GridBounds} gridBounds GridBounds The bounds to test.\n * @return {Boolean} This Bounds equals the given GridBounds.\n */\n equals(gridBounds: GridBounds): boolean {\n if (\n this.maxX === gridBounds.maxX &&\n this.maxY === gridBounds.maxY &&\n this.minX === gridBounds.minX &&\n this.minY === gridBounds.minY\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Returns true if this bounds (inclusively) contains the given point.\n * @param {Point} point The point to test.\n * @return {Boolean} This Bounds contains the given Point.\n */\n containsPoint(point: google.maps.Point): boolean {\n return (\n this.minX <= point.x &&\n this.maxX >= point.x &&\n this.minY <= point.y &&\n this.maxY >= point.y\n );\n }\n}\n","/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/// \n\nimport { latLngToPixel } from \"./utils\";\nimport { GridBounds } from \"./gridbounds\";\n\ninterface Options {\n maxZoom?: number;\n shown?: boolean;\n trackMarkers?: boolean;\n borderPadding?: number;\n}\n\n/**\n * Creates a new MarkerManager that will show/hide markers on a map.\n */\nclass MarkerManager {\n public shown: boolean;\n public shownMarkers: number;\n\n private _map: google.maps.Map;\n private _mapZoom: number;\n private _maxZoom: number;\n private _tileSize = 1024;\n private _trackMarkers: boolean;\n private _swPadding: google.maps.Size;\n private _nePadding: google.maps.Size;\n private _gridWidth: { [k: string]: number };\n private _grid: google.maps.Marker[][][][];\n private _numMarkers: { [k: string]: number };\n private _shownBounds: GridBounds;\n\n /**\n * @constructor\n * @param map The map to manage.\n * @param {Options} options\n */\n constructor(\n map: google.maps.Map,\n { maxZoom = 19, trackMarkers, shown = true, borderPadding = 100 }: Options\n ) {\n this._map = map;\n this._mapZoom = map.getZoom();\n this._maxZoom = maxZoom;\n this._trackMarkers = trackMarkers;\n\n // The padding in pixels beyond the viewport, where we will pre-load markers.\n this._swPadding = new google.maps.Size(-borderPadding, borderPadding);\n this._nePadding = new google.maps.Size(borderPadding, -borderPadding);\n\n this._gridWidth = {};\n this._grid = [];\n this._grid[this._maxZoom] = [];\n this._numMarkers = {};\n this._numMarkers[this._maxZoom] = 0;\n\n this.shownMarkers = 0;\n this.shown = shown;\n\n google.maps.event.addListenerOnce(map, \"idle\", () => {\n this._initialize();\n });\n }\n\n private _initialize(): void {\n const mapTypes = this._map.mapTypes;\n\n // Find max zoom level\n let mapMaxZoom = 1;\n for (const sType in mapTypes) {\n if (\n sType in mapTypes &&\n mapTypes.get(sType) &&\n mapTypes.get(sType).maxZoom === \"number\"\n ) {\n const mapTypeMaxZoom = this._map.mapTypes.get(sType).maxZoom;\n if (mapTypeMaxZoom > mapMaxZoom) {\n mapMaxZoom = mapTypeMaxZoom;\n }\n }\n }\n\n google.maps.event.addListener(\n this._map,\n \"dragend\",\n this._onMapMoveEnd.bind(this)\n );\n\n google.maps.event.addListener(\n this._map,\n \"idle\",\n this._onMapMoveEnd.bind(this)\n );\n\n google.maps.event.addListener(\n this._map,\n \"zoom_changed\",\n this._onMapMoveEnd.bind(this)\n );\n\n this.resetManager();\n\n this._shownBounds = this._getMapGridBounds();\n\n google.maps.event.trigger(this, \"loaded\");\n }\n /**\n * This closure provide easy access to the map.\n * They are used as callbacks, not as methods.\n * @param marker Marker to be removed from the map\n */\n private _removeOverlay(marker: google.maps.Marker): void {\n marker.setMap(null);\n this.shownMarkers--;\n }\n\n /**\n * This closure provide easy access to the map.\n * They are used as callbacks, not as methods.\n * @param marker Marker to be added to the map\n */\n private _addOverlay(marker: google.maps.Marker): void {\n if (this.shown) {\n marker.setMap(this._map);\n this.shownMarkers++;\n }\n }\n\n /**\n * Initializes MarkerManager arrays for all zoom levels\n * Called by constructor and by clearAllMarkers\n */\n public resetManager(): void {\n let mapWidth = 256;\n for (let zoom = 0; zoom <= this._maxZoom; ++zoom) {\n this._grid[zoom] = [];\n this._numMarkers[zoom] = 0;\n this._gridWidth[zoom] = Math.ceil(mapWidth / this._tileSize);\n mapWidth <<= 1;\n }\n }\n\n /**\n * Removes all markers in the manager, and\n * removes any visible markers from the map.\n */\n public clearMarkers(): void {\n this._processAll(this._shownBounds, this._removeOverlay.bind(this));\n this.resetManager();\n }\n\n /**\n * Gets the tile coordinate for a given latlng point.\n *\n * @param {LatLng} latlng The geographical point.\n * @param {Number} zoom The zoom level.\n * @param {google.maps.Size} padding The padding used to shift the pixel coordinate.\n * Used for expanding a bounds to include an extra padding\n * of pixels surrounding the bounds.\n * @return {GPoint} The point in tile coordinates.\n *\n */\n private _getTilePoint(\n latlng: google.maps.LatLng,\n zoom: number,\n padding: google.maps.Size\n ): google.maps.Point {\n const pixelPoint = latLngToPixel(latlng, zoom);\n\n const point = new google.maps.Point(\n Math.floor((pixelPoint.x + padding.width) / this._tileSize),\n Math.floor((pixelPoint.y + padding.height) / this._tileSize)\n );\n\n return point;\n }\n\n /**\n * Finds the appropriate place to add the marker to the grid.\n * Optimized for speed; does not actually add the marker to the map.\n * Designed for batch-_processing thousands of markers.\n *\n * @param {Marker} marker The marker to add.\n * @param {Number} minZoom The minimum zoom for displaying the marker.\n * @param {Number} maxZoom The maximum zoom for displaying the marker.\n */\n private _addMarkerBatch(\n marker: google.maps.Marker,\n minZoom: number,\n maxZoom: number\n ): void {\n const mPoint = marker.getPosition();\n marker.set(\"__minZoom\", minZoom);\n\n // Tracking markers is expensive, so we do this only if the\n // user explicitly requested it when creating marker manager.\n if (this._trackMarkers) {\n google.maps.event.addListener(\n marker,\n \"changed\",\n (\n marker: google.maps.Marker,\n oldPoint: google.maps.LatLng,\n newPoint: google.maps.LatLng\n ) => {\n this._onMarkerMoved(marker, oldPoint, newPoint);\n }\n );\n }\n\n const gridPoint = this._getTilePoint(\n mPoint,\n maxZoom,\n new google.maps.Size(0, 0)\n );\n\n for (let zoom = maxZoom; zoom >= minZoom; zoom--) {\n const cell = this._getGridCellCreate(gridPoint.x, gridPoint.y, zoom);\n cell.push(marker);\n\n gridPoint.x = gridPoint.x >> 1;\n gridPoint.y = gridPoint.y >> 1;\n }\n }\n\n /**\n * Returns whether or not the given point is visible in the shown bounds. This\n * is a helper method that takes care of the corner case, when shownBounds have\n * negative minX value.\n *\n * @param {Point} point a point on a grid.\n * @return {Boolean} Whether or not the given point is visible in the currently\n * shown bounds.\n */\n private _isGridPointVisible(point: google.maps.Point): boolean {\n const vertical =\n this._shownBounds.minY <= point.y && point.y <= this._shownBounds.maxY;\n const minX = this._shownBounds.minX;\n let horizontal = minX <= point.x && point.x <= this._shownBounds.maxX;\n if (!horizontal && minX < 0) {\n // Shifts the negative part of the rectangle. As point.x is always less\n // than grid width, only test shifted minX .. 0 part of the shown bounds.\n const width = this._gridWidth[this._shownBounds.z];\n horizontal = minX + width <= point.x && point.x <= width - 1;\n }\n return vertical && horizontal;\n }\n\n /**\n * Reacts to a notification from a marker that it has moved to a new location.\n * It scans the grid all all zoom levels and moves the marker from the old grid\n * location to a new grid location.\n *\n * @param {Marker} marker The marker that moved.\n * @param {LatLng} oldPoint The old position of the marker.\n * @param {LatLng} newPoint The new position of the marker.\n */\n private _onMarkerMoved(\n marker: google.maps.Marker,\n oldPoint: google.maps.LatLng,\n newPoint: google.maps.LatLng\n ): void {\n // NOTE: We do not know the minimum or maximum zoom the marker was\n // added at, so we start at the absolute maximum. Whenever we successfully\n // remove a marker at a given zoom, we add it at the new grid coordinates.\n let zoom = this._maxZoom;\n let changed = false;\n const oldGrid = this._getTilePoint(\n oldPoint,\n zoom,\n new google.maps.Size(0, 0)\n );\n const newGrid = this._getTilePoint(\n newPoint,\n zoom,\n new google.maps.Size(0, 0)\n );\n while (zoom >= 0 && (oldGrid.x !== newGrid.x || oldGrid.y !== newGrid.y)) {\n const cell = this._getGridCellNoCreate(oldGrid.x, oldGrid.y, zoom);\n if (cell) {\n if (this._removeMarkerFromCell(cell, marker)) {\n this._getGridCellCreate(newGrid.x, newGrid.y, zoom).push(marker);\n }\n }\n // For the current zoom we also need to update the map. Markers that no\n // longer are visible are removed from the map. Markers that moved into\n // the shown bounds are added to the map. This also lets us keep the count\n // of visible markers up to date.\n if (zoom === this._mapZoom) {\n if (this._isGridPointVisible(oldGrid)) {\n if (!this._isGridPointVisible(newGrid)) {\n this._removeOverlay(marker);\n changed = true;\n }\n } else {\n if (this._isGridPointVisible(newGrid)) {\n this._addOverlay(marker);\n changed = true;\n }\n }\n }\n oldGrid.x = oldGrid.x >> 1;\n oldGrid.y = oldGrid.y >> 1;\n newGrid.x = newGrid.x >> 1;\n newGrid.y = newGrid.y >> 1;\n --zoom;\n }\n if (changed) {\n this._notifyListeners();\n }\n }\n\n /**\n * Removes marker from the manager and from the map\n * (if it's currently visible).\n * @param {GMarker} marker The marker to delete.\n */\n public removeMarker(marker: google.maps.Marker): void {\n let zoom = this._maxZoom;\n let changed = false;\n const point = marker.getPosition();\n const grid = this._getTilePoint(point, zoom, new google.maps.Size(0, 0));\n while (zoom >= 0) {\n const cell = this._getGridCellNoCreate(grid.x, grid.y, zoom);\n\n if (cell) {\n this._removeMarkerFromCell(cell, marker);\n }\n // For the current zoom we also need to update the map. Markers that no\n // longer are visible are removed from the map. This also lets us keep the count\n // of visible markers up to date.\n if (zoom === this._mapZoom) {\n if (this._isGridPointVisible(grid)) {\n this._removeOverlay(marker);\n changed = true;\n }\n }\n grid.x = grid.x >> 1;\n grid.y = grid.y >> 1;\n --zoom;\n }\n if (changed) {\n this._notifyListeners();\n }\n this._numMarkers[marker.get(\"__minZoom\")]--;\n }\n\n /**\n * Add many markers at once.\n * Does not actually update the map, just the internal grid.\n *\n * @param {Array of Marker} markers The markers to add.\n * @param {Number} minZoom The minimum zoom level to display the markers.\n * @param {Number} maxZoom The maximum zoom level to display the markers.\n */\n public addMarkers(\n markers: google.maps.Marker[],\n minZoom: number,\n maxZoom: number\n ): void {\n maxZoom = this._getOptmaxZoom(maxZoom);\n for (let i = markers.length - 1; i >= 0; i--) {\n this._addMarkerBatch(markers[i], minZoom, maxZoom);\n }\n\n this._numMarkers[minZoom] += markers.length;\n }\n\n /**\n * Returns the value of the optional maximum zoom. This method is defined so\n * that we have just one place where optional maximum zoom is calculated.\n *\n * @param {Number} maxZoom The optinal maximum zoom.\n * @return The maximum zoom.\n */\n private _getOptmaxZoom(maxZoom: number): number {\n return maxZoom || this._maxZoom;\n }\n\n /**\n * Calculates the total number of markers potentially visible at a given\n * zoom level.\n *\n * @param {Number} zoom The zoom level to check.\n */\n public getMarkerCount(zoom: number): number {\n let total = 0;\n for (let z = 0; z <= zoom; z++) {\n total += this._numMarkers[z];\n }\n return total;\n }\n\n /**\n * Returns a marker given latitude, longitude and zoom. If the marker does not\n * exist, the method will return a new marker. If a new marker is created,\n * it will NOT be added to the manager.\n *\n * @param {Number} lat - the latitude of a marker.\n * @param {Number} lng - the longitude of a marker.\n * @param {Number} zoom - the zoom level\n * @return {GMarker} marker - the marker found at lat and lng\n */\n public getMarker(lat: number, lng: number, zoom: number): google.maps.Marker {\n const mPoint = new google.maps.LatLng(lat, lng);\n const gridPoint = this._getTilePoint(\n mPoint,\n zoom,\n new google.maps.Size(0, 0)\n );\n\n let marker = new google.maps.Marker({ position: mPoint });\n\n const cell = this._getGridCellNoCreate(gridPoint.x, gridPoint.y, zoom);\n if (cell !== undefined) {\n for (let i = 0; i < cell.length; i++) {\n if (\n lat === cell[i].getPosition().lat() &&\n lng === cell[i].getPosition().lng()\n ) {\n marker = cell[i];\n }\n }\n }\n return marker;\n }\n\n /**\n * Add a single marker to the map.\n *\n * @param {Marker} marker The marker to add.\n * @param {Number} minZoom The minimum zoom level to display the marker.\n * @param {Number} maxZoom The maximum zoom level to display the marker.\n */\n public addMarker(\n marker: google.maps.Marker,\n minZoom: number,\n maxZoom: number\n ): void {\n maxZoom = this._getOptmaxZoom(maxZoom);\n this._addMarkerBatch(marker, minZoom, maxZoom);\n const gridPoint = this._getTilePoint(\n marker.getPosition(),\n this._mapZoom,\n new google.maps.Size(0, 0)\n );\n if (\n this._isGridPointVisible(gridPoint) &&\n minZoom <= this._shownBounds.z &&\n this._shownBounds.z <= maxZoom\n ) {\n this._addOverlay(marker);\n this._notifyListeners();\n }\n this._numMarkers[minZoom]++;\n }\n\n /**\n * Get a cell in the grid, creating it first if necessary.\n *\n * Optimization candidate\n *\n * @param {Number} x The x coordinate of the cell.\n * @param {Number} y The y coordinate of the cell.\n * @param {Number} z The z coordinate of the cell.\n * @return {Array} The cell in the array.\n */\n private _getGridCellCreate(\n x: number,\n y: number,\n z: number\n ): google.maps.Marker[] {\n // TODO(jpoehnelt) document this\n if (x < 0) {\n x += this._gridWidth[z];\n }\n\n if (!this._grid[z]) {\n this._grid[z] = [];\n }\n if (!this._grid[z][x]) {\n this._grid[z][x] = [];\n }\n if (!this._grid[z][x][y]) {\n this._grid[z][x][y] = [];\n }\n return this._grid[z][x][y];\n }\n\n /**\n * Get a cell in the grid, returning undefined if it does not exist.\n *\n * NOTE: Optimized for speed -- otherwise could combine with _getGridCellCreate.\n *\n * @param {Number} x The x coordinate of the cell.\n * @param {Number} y The y coordinate of the cell.\n * @param {Number} z The z coordinate of the cell.\n * @return {Array} The cell in the array.\n */\n private _getGridCellNoCreate(\n x: number,\n y: number,\n z: number\n ): google.maps.Marker[] | null {\n if (x < 0) {\n x += this._gridWidth[z];\n }\n\n if (!this._grid[z]) {\n return null;\n }\n if (!this._grid[z][x]) {\n return null;\n }\n if (!this._grid[z][x][y]) {\n return null;\n }\n return this._grid[z][x][y];\n }\n\n /**\n * Turns at geographical bounds into a grid-space bounds.\n *\n * @param {LatLngBounds} bounds The geographical bounds.\n * @param {Number} zoom The zoom level of the bounds.\n * @param {google.maps.Size} swPadding The padding in pixels to extend beyond the\n * given bounds.\n * @param {google.maps.Size} nePadding The padding in pixels to extend beyond the\n * given bounds.\n * @return {GridBounds} The bounds in grid space.\n */\n private _getGridBounds(\n bounds: google.maps.LatLngBounds,\n zoom: number,\n swPadding: google.maps.Size,\n nePadding: google.maps.Size\n ): GridBounds {\n zoom = Math.min(zoom, this._maxZoom);\n\n const bl = bounds.getSouthWest();\n const tr = bounds.getNorthEast();\n const sw = this._getTilePoint(bl, zoom, swPadding);\n\n const ne = this._getTilePoint(tr, zoom, nePadding);\n const gw = this._gridWidth[zoom];\n\n // Crossing the prime meridian requires correction of bounds.\n if (tr.lng() < bl.lng() || ne.x < sw.x) {\n sw.x -= gw;\n }\n if (ne.x - sw.x + 1 >= gw) {\n // Computed grid bounds are larger than the world; truncate.\n sw.x = 0;\n ne.x = gw - 1;\n }\n\n const gridBounds = new GridBounds([sw, ne], zoom);\n gridBounds.z = zoom;\n\n return gridBounds;\n }\n\n /**\n * Gets the grid-space bounds for the current map viewport.\n *\n * @return {Bounds} The bounds in grid space.\n */\n private _getMapGridBounds(): GridBounds {\n return this._getGridBounds(\n this._map.getBounds(),\n this._mapZoom,\n this._swPadding,\n this._nePadding\n );\n }\n\n /**\n * Event listener for map:movend.\n * NOTE: Use a timeout so that the user is not blocked\n * from moving the map.\n *\n * Removed this because a a lack of a scopy override/callback function on events.\n */\n private _onMapMoveEnd(): void {\n window.setTimeout(this._updateMarkers.bind(this), 0);\n }\n\n /**\n * Is this layer visible?\n *\n * Returns visibility setting\n *\n * @return {Boolean} Visible\n */\n public visible(): boolean {\n return this.shown ? true : false;\n }\n\n /**\n * Returns true if the manager is hidden.\n * Otherwise returns false.\n * @return {Boolean} Hidden\n */\n public isHidden(): boolean {\n return !this.shown;\n }\n\n /**\n * Shows the manager if it's currently hidden.\n */\n public show(): void {\n this.shown = true;\n this.refresh();\n }\n\n /**\n * Hides the manager if it's currently visible\n */\n public hide(): void {\n this.shown = false;\n this.refresh();\n }\n\n /**\n * Toggles the visibility of the manager.\n */\n public toggle(): void {\n this.shown = !this.shown;\n this.refresh();\n }\n\n /**\n * Refresh forces the marker-manager into a good state.\n *
      \n *
    1. If never before initialized, shows all the markers.
    2. \n *
    3. If previously initialized, removes and re-adds all markers.
    4. \n *
    \n */\n public refresh(): void {\n if (this.shownMarkers > 0) {\n this._processAll(this._shownBounds, this._removeOverlay.bind(this));\n }\n // An extra check on this.show to increase performance (no need to _processAll_)\n if (this.show) {\n this._processAll(this._shownBounds, this._addOverlay.bind(this));\n }\n this._notifyListeners();\n }\n\n /**\n * After the viewport may have changed, add or remove markers as needed.\n */\n private _updateMarkers(): void {\n this._mapZoom = this._map.getZoom();\n const newBounds = this._getMapGridBounds();\n\n // If the move does not include new grid sections,\n // we have no work to do:\n if (\n newBounds.equals(this._shownBounds) &&\n newBounds.z === this._shownBounds.z\n ) {\n return;\n }\n\n if (newBounds.z !== this._shownBounds.z) {\n this._processAll(this._shownBounds, this._removeOverlay.bind(this));\n if (this.show) {\n // performance\n this._processAll(newBounds, this._addOverlay.bind(this));\n }\n } else {\n // Remove markers:\n this._rectangleDiff(\n this._shownBounds,\n newBounds,\n this._removeCellMarkers.bind(this)\n );\n\n // Add markers:\n if (this.show) {\n // performance\n this._rectangleDiff(\n newBounds,\n this._shownBounds,\n this._addCellMarkers.bind(this)\n );\n }\n }\n this._shownBounds = newBounds;\n\n this._notifyListeners();\n }\n\n /**\n * Notify listeners when the state of what is displayed changes.\n */\n private _notifyListeners(): void {\n google.maps.event.trigger(\n this,\n \"changed\",\n this._shownBounds,\n this.shownMarkers\n );\n }\n\n /**\n * Process all markers in the bounds provided, using a callback.\n *\n * @param {Bounds} bounds The bounds in grid space.\n * @param {Function} callback The function to call for each marker.\n */\n private _processAll(\n bounds: GridBounds,\n callback: (marker: google.maps.Marker) => void\n ): void {\n for (let x = bounds.minX; x <= bounds.maxX; x++) {\n for (let y = bounds.minY; y <= bounds.maxY; y++) {\n this._processCellMarkers(x, y, bounds.z, callback);\n }\n }\n }\n\n /**\n * Process all markers in the grid cell, using a callback.\n *\n * @param {Number} x The x coordinate of the cell.\n * @param {Number} y The y coordinate of the cell.\n * @param {Number} z The z coordinate of the cell.\n * @param {Function} callback The function to call for each marker.\n */\n private _processCellMarkers(\n x: number,\n y: number,\n z: number,\n callback: (marker: google.maps.Marker) => void\n ): void {\n const cell = this._getGridCellNoCreate(x, y, z);\n if (cell) {\n for (let i = cell.length - 1; i >= 0; i--) {\n callback(cell[i]);\n }\n }\n }\n\n /**\n * Remove all markers in a grid cell.\n *\n * @param {Number} x The x coordinate of the cell.\n * @param {Number} y The y coordinate of the cell.\n * @param {Number} z The z coordinate of the cell.\n */\n private _removeCellMarkers(x: number, y: number, z: number): void {\n this._processCellMarkers(x, y, z, this._removeOverlay.bind(this));\n }\n\n /**\n * Add all markers in a grid cell.\n *\n * @param {Number} x The x coordinate of the cell.\n * @param {Number} y The y coordinate of the cell.\n * @param {Number} z The z coordinate of the cell.\n */\n private _addCellMarkers(x: number, y: number, z: number): void {\n this._processCellMarkers(x, y, z, this._addOverlay.bind(this));\n }\n\n /**\n * Use the _rectangleDiffCoords function to process all grid cells\n * that are in bounds1 but not bounds2, using a callback, and using\n * the current MarkerManager object as the instance.\n *\n * Pass the z parameter to the callback in addition to x and y.\n *\n * @param {Bounds} bounds1 The bounds of all points we may _process.\n * @param {Bounds} bounds2 The bounds of points to exclude.\n * @param {Function} callback The callback function to call\n * for each grid coordinate (x, y, z).\n */\n private _rectangleDiff(\n bounds1: GridBounds,\n bounds2: GridBounds,\n callback: (x: number, y: number, z: number) => void\n ): void {\n this._rectangleDiffCoords(bounds1, bounds2, (x, y) => {\n callback(x, y, bounds1.z);\n });\n }\n\n /**\n * Calls the function for all points in bounds1, not in bounds2\n *\n * @param {Bounds} bounds1 The bounds of all points we may process.\n * @param {Bounds} bounds2 The bounds of points to exclude.\n * @param {Function} callback The callback function to call\n * for each grid coordinate.\n */\n private _rectangleDiffCoords(\n bounds1: GridBounds,\n bounds2: GridBounds,\n callback: (x: number, y: number) => void\n ): void {\n const minX1 = bounds1.minX;\n const minY1 = bounds1.minY;\n const maxX1 = bounds1.maxX;\n const maxY1 = bounds1.maxY;\n const minX2 = bounds2.minX;\n const minY2 = bounds2.minY;\n const maxX2 = bounds2.maxX;\n const maxY2 = bounds2.maxY;\n\n let x, y;\n for (x = minX1; x <= maxX1; x++) {\n // All x in R1\n // All above:\n for (y = minY1; y <= maxY1 && y < minY2; y++) {\n // y in R1 above R2\n callback(x, y);\n }\n // All below:\n for (\n y = Math.max(maxY2 + 1, minY1); // y in R1 below R2\n y <= maxY1;\n y++\n ) {\n callback(x, y);\n }\n }\n\n for (y = Math.max(minY1, minY2); y <= Math.min(maxY1, maxY2); y++) {\n // All y in R2 and in R1\n // Strictly left:\n for (x = Math.min(maxX1 + 1, minX2) - 1; x >= minX1; x--) {\n // x in R1 left of R2\n callback(x, y);\n }\n // Strictly right:\n for (\n x = Math.max(minX1, maxX2 + 1); // x in R1 right of R2\n x <= maxX1;\n x++\n ) {\n callback(x, y);\n }\n }\n }\n\n /**\n * Removes marker from cell. O(N).\n */\n private _removeMarkerFromCell(\n cell: google.maps.Marker[],\n marker: google.maps.Marker\n ): number {\n let shift = 0;\n for (let i = 0; i < cell.length; ++i) {\n if (cell[i] === marker) {\n cell.splice(i--, 1);\n shift++;\n }\n }\n return shift;\n }\n}\n\nexport { MarkerManager };\n"],"names":["match","version","check","it","Math","globalThis","window","self","global","this","Function","exec","error","fails","Object","defineProperty","get","$propertyIsEnumerable","propertyIsEnumerable","getOwnPropertyDescriptor","call","V","descriptor","enumerable","bitmap","value","configurable","writable","toString","slice","split","classof","undefined","TypeError","IndexedObject","requireObjectCoercible","argument","isCallable","aFunction","namespace","method","arguments","length","getBuiltIn","process","Deno","versions","v8","userAgent","getOwnPropertySymbols","symbol","Symbol","String","sham","V8_VERSION","NATIVE_SYMBOL","iterator","USE_SYMBOL_AS_UID","$Symbol","tryToString","key","SHARED","setGlobal","module","store","push","mode","copyright","hasOwnProperty","hasOwn","toObject","id","postfix","random","WellKnownSymbolsStore","shared","createWellKnownSymbol","withoutSetter","uid","name","TO_PRIMITIVE","wellKnownSymbol","input","pref","isObject","isSymbol","func","result","exoticToPrim","aCallable","fn","val","valueOf","ordinaryToPrimitive","toPrimitive","document","EXISTS","createElement","DESCRIPTORS","a","$getOwnPropertyDescriptor","O","P","toIndexedObject","toPropertyKey","IE8_DOM_DEFINE","createPropertyDescriptor","propertyIsEnumerableModule","f","$defineProperty","Attributes","anObject","object","definePropertyModule","functionToString","inspectSource","set","has","WeakMap","test","keys","OBJECT_ALREADY_INITIALIZED","NATIVE_WEAK_MAP","state","wmget","wmhas","wmset","metadata","facade","STATE","hiddenKeys","createNonEnumerableProperty","enforce","getterFor","TYPE","type","FunctionPrototype","prototype","getDescriptor","PROPER","CONFIGURABLE","CONFIGURABLE_FUNCTION_NAME","require$$0","getInternalState","InternalStateModule","enforceInternalState","TEMPLATE","options","unsafe","simple","noTargetGet","replace","source","join","ceil","floor","number","max","min","index","integer","toIntegerOrInfinity","obj","createMethod","IS_INCLUDES","$this","el","fromIndex","lengthOfArrayLike","toAbsoluteIndex","indexOf","includes","concat","getOwnPropertyNames","names","i","internalObjectKeys","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","target","ownKeys","getOwnPropertyDescriptorModule","replacement","isForced","feature","detection","data","normalize","POLYFILL","NATIVE","string","toLowerCase","Array","isArray","METHOD_NAME","TO_STRING_TAG","CORRECT_ARGUMENTS","classofRaw","TO_STRING_TAG_SUPPORT","tag","tryGet","callee","empty","construct","constructorRegExp","INCORRECT_TO_STRING","isConstructorModern","called","SPECIES","originalArray","C","constructor","isConstructor","propertyKey","HAS_SPECIES_SUPPORT","array","foo","Boolean","MAX_SAFE_INTEGER","MAXIMUM_ALLOWED_LENGTH_EXCEEDED","latLngToPixel","latlng","zoom","google","maps","Point","lng","lat","sinofphi","sin","PI","log","targetProperty","sourceProperty","TARGET","GLOBAL","STATIC","stat","forced","copyConstructorProperties","redefine","proto","splice","start","deleteCount","insertCount","actualDeleteCount","A","k","from","to","len","actualStart","argumentsLength","arraySpeciesCreate","createProperty","GridBounds","bounds","z","minX","x","maxX","minY","y","maxY","gridBounds","point","MarkerManager","map","maxZoom","trackMarkers","shown","borderPadding","_map","_mapZoom","getZoom","_maxZoom","_trackMarkers","_swPadding","Size","_nePadding","_gridWidth","_grid","_numMarkers","shownMarkers","event","addListenerOnce","_this","_initialize","mapTypes","sType","addListener","_onMapMoveEnd","bind","resetManager","_shownBounds","_getMapGridBounds","trigger","marker","setMap","mapWidth","_tileSize","_processAll","_removeOverlay","padding","pixelPoint","width","height","minZoom","mPoint","getPosition","oldPoint","newPoint","_this2","_onMarkerMoved","gridPoint","_getTilePoint","_getGridCellCreate","vertical","horizontal","changed","oldGrid","newGrid","cell","_getGridCellNoCreate","_removeMarkerFromCell","_isGridPointVisible","_addOverlay","_notifyListeners","grid","markers","_getOptmaxZoom","_addMarkerBatch","total","LatLng","Marker","position","swPadding","nePadding","bl","getSouthWest","tr","getNorthEast","sw","ne","gw","_getGridBounds","getBounds","setTimeout","_updateMarkers","refresh","show","newBounds","equals","_rectangleDiff","_removeCellMarkers","_addCellMarkers","callback","_processCellMarkers","bounds1","bounds2","_rectangleDiffCoords","minX1","minY1","maxX1","maxY1","minX2","minY2","maxX2","maxY2","shift"],"mappings":"usBAAA,ICOIA,EAAOC,EDPPC,EAAQ,SAAUC,UACbA,GAAMA,EAAGC,MAAQA,MAAQD,KAMhCD,EAA2B,iBAAdG,YAA0BA,aACvCH,EAAuB,iBAAVI,QAAsBA,SAEnCJ,EAAqB,iBAARK,MAAoBA,OACjCL,EAAuB,iBAAVM,GAAsBA,IAElC,kBAAqBC,KAArB,IAAmCC,SAAS,cAATA,KEbrB,SAAUC,eAEdA,IACT,MAAOC,UACA,OCDOC,GAAM,kBAEwD,GAAvEC,OAAOC,eAAe,GAAI,EAAG,CAAEC,IAAK,kBAAqB,KAAQ,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jF,OAAOnE,IAAK,GACjBmM,YAGGA"} \ No newline at end of file +{"version":3,"file":"index.dev.js","sources":["../node_modules/core-js/internals/global.js","../node_modules/core-js/internals/engine-v8-version.js","../node_modules/core-js/internals/fails.js","../node_modules/core-js/internals/descriptors.js","../node_modules/core-js/internals/function-call.js","../node_modules/core-js/internals/object-property-is-enumerable.js","../node_modules/core-js/internals/create-property-descriptor.js","../node_modules/core-js/internals/function-uncurry-this.js","../node_modules/core-js/internals/classof-raw.js","../node_modules/core-js/internals/indexed-object.js","../node_modules/core-js/internals/require-object-coercible.js","../node_modules/core-js/internals/to-indexed-object.js","../node_modules/core-js/internals/is-callable.js","../node_modules/core-js/internals/is-object.js","../node_modules/core-js/internals/get-built-in.js","../node_modules/core-js/internals/object-is-prototype-of.js","../node_modules/core-js/internals/engine-user-agent.js","../node_modules/core-js/internals/native-symbol.js","../node_modules/core-js/internals/use-symbol-as-uid.js","../node_modules/core-js/internals/is-symbol.js","../node_modules/core-js/internals/try-to-string.js","../node_modules/core-js/internals/a-callable.js","../node_modules/core-js/internals/ordinary-to-primitive.js","../node_modules/core-js/internals/set-global.js","../node_modules/core-js/internals/shared-store.js","../node_modules/core-js/internals/shared.js","../node_modules/core-js/internals/to-object.js","../node_modules/core-js/internals/has-own-property.js","../node_modules/core-js/internals/uid.js","../node_modules/core-js/internals/well-known-symbol.js","../node_modules/core-js/internals/to-primitive.js","../node_modules/core-js/internals/get-method.js","../node_modules/core-js/internals/to-property-key.js","../node_modules/core-js/internals/document-create-element.js","../node_modules/core-js/internals/ie8-dom-define.js","../node_modules/core-js/internals/object-get-own-property-descriptor.js","../node_modules/core-js/internals/an-object.js","../node_modules/core-js/internals/object-define-property.js","../node_modules/core-js/internals/create-non-enumerable-property.js","../node_modules/core-js/internals/inspect-source.js","../node_modules/core-js/internals/internal-state.js","../node_modules/core-js/internals/shared-key.js","../node_modules/core-js/internals/native-weak-map.js","../node_modules/core-js/internals/hidden-keys.js","../node_modules/core-js/internals/function-name.js","../node_modules/core-js/internals/redefine.js","../node_modules/core-js/internals/to-integer-or-infinity.js","../node_modules/core-js/internals/to-absolute-index.js","../node_modules/core-js/internals/to-length.js","../node_modules/core-js/internals/length-of-array-like.js","../node_modules/core-js/internals/array-includes.js","../node_modules/core-js/internals/object-keys-internal.js","../node_modules/core-js/internals/object-get-own-property-names.js","../node_modules/core-js/internals/enum-bug-keys.js","../node_modules/core-js/internals/object-get-own-property-symbols.js","../node_modules/core-js/internals/own-keys.js","../node_modules/core-js/internals/copy-constructor-properties.js","../node_modules/core-js/internals/is-forced.js","../node_modules/core-js/internals/export.js","../node_modules/core-js/internals/is-array.js","../node_modules/core-js/internals/to-string-tag-support.js","../node_modules/core-js/internals/array-method-has-species-support.js","../node_modules/core-js/internals/classof.js","../node_modules/core-js/internals/is-constructor.js","../node_modules/core-js/internals/array-species-constructor.js","../node_modules/core-js/internals/array-species-create.js","../node_modules/core-js/internals/create-property.js","../node_modules/core-js/modules/es.array.splice.js","../src/utils.ts","../src/gridbounds.ts","../src/markermanager.ts"],"sourcesContent":["var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n // in old Chrome, versions of V8 isn't V8 = Chrome / 10\n // but their correct versions are not interesting for us\n version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);\n}\n\n// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`\n// so check `userAgent` even if `.v8` exists, but 0\nif (!version && userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = +match[1];\n }\n}\n\nmodule.exports = version;\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","var call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(call) : function () {\n return call.apply(call, arguments);\n};\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var FunctionPrototype = Function.prototype;\nvar bind = FunctionPrototype.bind;\nvar call = FunctionPrototype.call;\nvar callBind = bind && bind.bind(call);\n\nmodule.exports = bind ? function (fn) {\n return fn && callBind(call, fn);\n} : function (fn) {\n return fn && function () {\n return call.apply(fn, arguments);\n };\n};\n","var uncurryThis = require('../internals/function-uncurry-this');\n\nvar toString = uncurryThis({}.toString);\nvar stringSlice = uncurryThis(''.slice);\n\nmodule.exports = function (it) {\n return stringSlice(toString(it), 8, -1);\n};\n","var global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar Object = global.Object;\nvar split = uncurryThis(''.split);\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split(it, '') : Object(it);\n} : Object;\n","var global = require('../internals/global');\n\nvar TypeError = global.TypeError;\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = function (argument) {\n return typeof argument == 'function';\n};\n","var isCallable = require('../internals/is-callable');\n\nmodule.exports = function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it);\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n","var uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = uncurryThis({}.isPrototypeOf);\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol();\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n return !String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n","/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n","var global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar Object = global.Object;\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, Object(it));\n};\n","var global = require('../internals/global');\n\nvar String = global.String;\n\nmodule.exports = function (argument) {\n try {\n return String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\nvar TypeError = global.TypeError;\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw TypeError(tryToString(argument) + ' is not a function');\n};\n","var global = require('../internals/global');\nvar call = require('../internals/function-call');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\nvar TypeError = global.TypeError;\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var global = require('../internals/global');\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nmodule.exports = function (key, value) {\n try {\n defineProperty(global, key, { value: value, configurable: true, writable: true });\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.19.0',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2021 Denis Pushkarev (zloirock.ru)'\n});\n","var global = require('../internals/global');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar Object = global.Object;\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar toObject = require('../internals/to-object');\n\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty(toObject(it), key);\n};\n","var uncurryThis = require('../internals/function-uncurry-this');\n\nvar id = 0;\nvar postfix = Math.random();\nvar toString = uncurryThis(1.0.toString);\n\nmodule.exports = function (key) {\n return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);\n};\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar hasOwn = require('../internals/has-own-property');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar symbolFor = Symbol && Symbol['for'];\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n var description = 'Symbol.' + name;\n if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else if (USE_SYMBOL_AS_UID && symbolFor) {\n WellKnownSymbolsStore[name] = symbolFor(description);\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol(description);\n }\n } return WellKnownSymbolsStore[name];\n};\n","var global = require('../internals/global');\nvar call = require('../internals/function-call');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TypeError = global.TypeError;\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = call(exoticToPrim, input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n","var aCallable = require('../internals/a-callable');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return func == null ? undefined : aCallable(func);\n};\n","var toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : key + '';\n};\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- requied for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar call = require('../internals/function-call');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n};\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar String = global.String;\nvar TypeError = global.TypeError;\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw TypeError(String(argument) + ' is not an object');\n};\n","var global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\n\nvar TypeError = global.TypeError;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar isCallable = require('../internals/is-callable');\nvar store = require('../internals/shared-store');\n\nvar functionToString = uncurryThis(Function.toString);\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar TypeError = global.TypeError;\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = uncurryThis(store.get);\n var wmhas = uncurryThis(store.has);\n var wmset = uncurryThis(store.set);\n set = function (it, metadata) {\n if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget(store, it) || {};\n };\n has = function (it) {\n return wmhas(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return hasOwn(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return hasOwn(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));\n","module.exports = {};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar hasOwn = require('../internals/has-own-property');\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var name = options && options.name !== undefined ? options.name : key;\n var state;\n if (isCallable(value)) {\n if (String(name).slice(0, 7) === 'Symbol(') {\n name = '[' + String(name).replace(/^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n createNonEnumerableProperty(value, 'name', name);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof name == 'string' ? name : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n});\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToIntegerOrInfinity` abstract operation\n// https://tc39.es/ecma262/#sec-tointegerorinfinity\nmodule.exports = function (argument) {\n var number = +argument;\n // eslint-disable-next-line no-self-compare -- safe\n return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toIntegerOrInfinity(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var toLength = require('../internals/to-length');\n\n// `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\nmodule.exports = function (obj) {\n return toLength(obj.length);\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = lengthOfArrayLike(O);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar hasOwn = require('../internals/has-own-property');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar push = uncurryThis([].push);\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (hasOwn(O, key = names[i++])) {\n ~indexOf(result, key) || push(result, key);\n }\n return result;\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var getBuiltIn = require('../internals/get-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\nvar concat = uncurryThis([].concat);\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;\n};\n","var hasOwn = require('../internals/has-own-property');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!hasOwn(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : isCallable(detection) ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty == typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","var classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(argument) {\n return classof(argument) == 'Array';\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","var global = require('../internals/global');\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar isCallable = require('../internals/is-callable');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar Object = global.Object;\n\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof');\nvar getBuiltIn = require('../internals/get-built-in');\nvar inspectSource = require('../internals/inspect-source');\n\nvar noop = function () { /* empty */ };\nvar empty = [];\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = uncurryThis(constructorRegExp.exec);\nvar INCORRECT_TO_STRING = !constructorRegExp.exec(noop);\n\nvar isConstructorModern = function (argument) {\n if (!isCallable(argument)) return false;\n try {\n construct(noop, empty, argument);\n return true;\n } catch (error) {\n return false;\n }\n};\n\nvar isConstructorLegacy = function (argument) {\n if (!isCallable(argument)) return false;\n switch (classof(argument)) {\n case 'AsyncFunction':\n case 'GeneratorFunction':\n case 'AsyncGeneratorFunction': return false;\n // we can't check .prototype since constructors produced by .bind haven't it\n } return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));\n};\n\n// `IsConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-isconstructor\nmodule.exports = !construct || fails(function () {\n var called;\n return isConstructorModern(isConstructorModern.call)\n || !isConstructorModern(Object)\n || !isConstructorModern(function () { called = true; })\n || called;\n}) ? isConstructorLegacy : isConstructorModern;\n","var global = require('../internals/global');\nvar isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\nvar Array = global.Array;\n\n// a part of `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (isConstructor(C) && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","var arraySpeciesConstructor = require('../internals/array-species-constructor');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n};\n","'use strict';\nvar toPropertyKey = require('../internals/to-property-key');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPropertyKey(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toObject = require('../internals/to-object');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\n\nvar TypeError = global.TypeError;\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.es/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = lengthOfArrayLike(O);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);\n }\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n});\n","/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @ignore\n *\n * @param lng\n */\nfunction lngToX(lng: number): number {\n return 1 + lng / 180;\n}\n/**\n * @ignore\n *\n * @param {number} lat\n * @returns {number}\n */\nfunction latToY(lat: number): number {\n const sinofphi = Math.sin((lat * Math.PI) / 180);\n return 1 - (0.5 / Math.PI) * Math.log((1 + sinofphi) / (1 - sinofphi));\n}\n\n/**\n * @ignore\n *\n * @param latlng\n * @param zoom\n */\nexport function latLngToPixel(\n latlng: google.maps.LatLng,\n zoom: number\n): google.maps.Point {\n return new google.maps.Point(\n ~~(0.5 + lngToX(latlng.lng()) * (2 << (zoom + 6))),\n ~~(0.5 + latToY(latlng.lat()) * (2 << (zoom + 6)))\n );\n}\n","/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Helper class to create a bounds of INT ranges.\n * @ignore\n */\nexport class GridBounds {\n public z: number;\n public minX: number;\n public maxX: number;\n public minY: number;\n public maxY: number;\n\n /**\n *\n * @param bounds\n * @param z\n */\n constructor(bounds: google.maps.Point[], z: number) {\n // [sw, ne]\n this.z = z;\n this.minX = Math.min(bounds[0].x, bounds[1].x);\n this.maxX = Math.max(bounds[0].x, bounds[1].x);\n this.minY = Math.min(bounds[0].y, bounds[1].y);\n this.maxY = Math.max(bounds[0].y, bounds[1].y);\n }\n\n /**\n * Returns true if this bounds equal the given bounds.\n * @param {GridBounds} gridBounds GridBounds The bounds to test.\n * @return {Boolean} This Bounds equals the given GridBounds.\n */\n equals(gridBounds: GridBounds): boolean {\n if (\n this.maxX === gridBounds.maxX &&\n this.maxY === gridBounds.maxY &&\n this.minX === gridBounds.minX &&\n this.minY === gridBounds.minY\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Returns true if this bounds (inclusively) contains the given point.\n * @param {Point} point The point to test.\n * @return {Boolean} This Bounds contains the given Point.\n */\n containsPoint(point: google.maps.Point): boolean {\n return (\n this.minX <= point.x &&\n this.maxX >= point.x &&\n this.minY <= point.y &&\n this.maxY >= point.y\n );\n }\n}\n","/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/// \n\nimport { latLngToPixel } from \"./utils\";\nimport { GridBounds } from \"./gridbounds\";\n\ninterface Options {\n maxZoom?: number;\n shown?: boolean;\n trackMarkers?: boolean;\n borderPadding?: number;\n}\n\n/**\n * Creates a new MarkerManager that will show/hide markers on a map.\n */\nclass MarkerManager {\n public shown: boolean;\n public shownMarkers: number;\n\n private _map: google.maps.Map;\n private _mapZoom: number;\n private _maxZoom: number;\n private _tileSize = 1024;\n private _trackMarkers: boolean;\n private _swPadding: google.maps.Size;\n private _nePadding: google.maps.Size;\n private _gridWidth: { [k: string]: number };\n private _grid: google.maps.Marker[][][][];\n private _numMarkers: { [k: string]: number };\n private _shownBounds: GridBounds;\n\n /**\n * @constructor\n * @param map The map to manage.\n * @param {Options} options\n */\n constructor(\n map: google.maps.Map,\n { maxZoom = 19, trackMarkers, shown = true, borderPadding = 100 }: Options\n ) {\n this._map = map;\n this._mapZoom = map.getZoom();\n this._maxZoom = maxZoom;\n this._trackMarkers = trackMarkers;\n\n // The padding in pixels beyond the viewport, where we will pre-load markers.\n this._swPadding = new google.maps.Size(-borderPadding, borderPadding);\n this._nePadding = new google.maps.Size(borderPadding, -borderPadding);\n\n this._gridWidth = {};\n this._grid = [];\n this._grid[this._maxZoom] = [];\n this._numMarkers = {};\n this._numMarkers[this._maxZoom] = 0;\n\n this.shownMarkers = 0;\n this.shown = shown;\n\n google.maps.event.addListenerOnce(map, \"idle\", () => {\n this._initialize();\n });\n }\n\n private _initialize(): void {\n const mapTypes = this._map.mapTypes;\n\n // Find max zoom level\n let mapMaxZoom = 1;\n for (const sType in mapTypes) {\n if (\n sType in mapTypes &&\n mapTypes.get(sType) &&\n mapTypes.get(sType).maxZoom === \"number\"\n ) {\n const mapTypeMaxZoom = this._map.mapTypes.get(sType).maxZoom;\n if (mapTypeMaxZoom > mapMaxZoom) {\n mapMaxZoom = mapTypeMaxZoom;\n }\n }\n }\n\n google.maps.event.addListener(\n this._map,\n \"dragend\",\n this._onMapMoveEnd.bind(this)\n );\n\n google.maps.event.addListener(\n this._map,\n \"idle\",\n this._onMapMoveEnd.bind(this)\n );\n\n google.maps.event.addListener(\n this._map,\n \"zoom_changed\",\n this._onMapMoveEnd.bind(this)\n );\n\n this.resetManager();\n\n this._shownBounds = this._getMapGridBounds();\n\n google.maps.event.trigger(this, \"loaded\");\n }\n /**\n * This closure provide easy access to the map.\n * They are used as callbacks, not as methods.\n * @param marker Marker to be removed from the map\n */\n private _removeOverlay(marker: google.maps.Marker): void {\n marker.setMap(null);\n this.shownMarkers--;\n }\n\n /**\n * This closure provide easy access to the map.\n * They are used as callbacks, not as methods.\n * @param marker Marker to be added to the map\n */\n private _addOverlay(marker: google.maps.Marker): void {\n if (this.shown) {\n marker.setMap(this._map);\n this.shownMarkers++;\n }\n }\n\n /**\n * Initializes MarkerManager arrays for all zoom levels\n * Called by constructor and by clearAllMarkers\n */\n public resetManager(): void {\n let mapWidth = 256;\n for (let zoom = 0; zoom <= this._maxZoom; ++zoom) {\n this._grid[zoom] = [];\n this._numMarkers[zoom] = 0;\n this._gridWidth[zoom] = Math.ceil(mapWidth / this._tileSize);\n mapWidth <<= 1;\n }\n }\n\n /**\n * Removes all markers in the manager, and\n * removes any visible markers from the map.\n */\n public clearMarkers(): void {\n this._processAll(this._shownBounds, this._removeOverlay.bind(this));\n this.resetManager();\n }\n\n /**\n * Gets the tile coordinate for a given latlng point.\n *\n * @param {LatLng} latlng The geographical point.\n * @param {Number} zoom The zoom level.\n * @param {google.maps.Size} padding The padding used to shift the pixel coordinate.\n * Used for expanding a bounds to include an extra padding\n * of pixels surrounding the bounds.\n * @return {GPoint} The point in tile coordinates.\n *\n */\n private _getTilePoint(\n latlng: google.maps.LatLng,\n zoom: number,\n padding: google.maps.Size\n ): google.maps.Point {\n const pixelPoint = latLngToPixel(latlng, zoom);\n\n const point = new google.maps.Point(\n Math.floor((pixelPoint.x + padding.width) / this._tileSize),\n Math.floor((pixelPoint.y + padding.height) / this._tileSize)\n );\n\n return point;\n }\n\n /**\n * Finds the appropriate place to add the marker to the grid.\n * Optimized for speed; does not actually add the marker to the map.\n * Designed for batch-_processing thousands of markers.\n *\n * @param {Marker} marker The marker to add.\n * @param {Number} minZoom The minimum zoom for displaying the marker.\n * @param {Number} maxZoom The maximum zoom for displaying the marker.\n */\n private _addMarkerBatch(\n marker: google.maps.Marker,\n minZoom: number,\n maxZoom: number\n ): void {\n const mPoint = marker.getPosition();\n marker.set(\"__minZoom\", minZoom);\n\n // Tracking markers is expensive, so we do this only if the\n // user explicitly requested it when creating marker manager.\n if (this._trackMarkers) {\n google.maps.event.addListener(\n marker,\n \"changed\",\n (\n marker: google.maps.Marker,\n oldPoint: google.maps.LatLng,\n newPoint: google.maps.LatLng\n ) => {\n this._onMarkerMoved(marker, oldPoint, newPoint);\n }\n );\n }\n\n const gridPoint = this._getTilePoint(\n mPoint,\n maxZoom,\n new google.maps.Size(0, 0)\n );\n\n for (let zoom = maxZoom; zoom >= minZoom; zoom--) {\n const cell = this._getGridCellCreate(gridPoint.x, gridPoint.y, zoom);\n cell.push(marker);\n\n gridPoint.x = gridPoint.x >> 1;\n gridPoint.y = gridPoint.y >> 1;\n }\n }\n\n /**\n * Returns whether or not the given point is visible in the shown bounds. This\n * is a helper method that takes care of the corner case, when shownBounds have\n * negative minX value.\n *\n * @param {Point} point a point on a grid.\n * @return {Boolean} Whether or not the given point is visible in the currently\n * shown bounds.\n */\n private _isGridPointVisible(point: google.maps.Point): boolean {\n const vertical =\n this._shownBounds.minY <= point.y && point.y <= this._shownBounds.maxY;\n const minX = this._shownBounds.minX;\n let horizontal = minX <= point.x && point.x <= this._shownBounds.maxX;\n if (!horizontal && minX < 0) {\n // Shifts the negative part of the rectangle. As point.x is always less\n // than grid width, only test shifted minX .. 0 part of the shown bounds.\n const width = this._gridWidth[this._shownBounds.z];\n horizontal = minX + width <= point.x && point.x <= width - 1;\n }\n return vertical && horizontal;\n }\n\n /**\n * Reacts to a notification from a marker that it has moved to a new location.\n * It scans the grid all all zoom levels and moves the marker from the old grid\n * location to a new grid location.\n *\n * @param {Marker} marker The marker that moved.\n * @param {LatLng} oldPoint The old position of the marker.\n * @param {LatLng} newPoint The new position of the marker.\n */\n private _onMarkerMoved(\n marker: google.maps.Marker,\n oldPoint: google.maps.LatLng,\n newPoint: google.maps.LatLng\n ): void {\n // NOTE: We do not know the minimum or maximum zoom the marker was\n // added at, so we start at the absolute maximum. Whenever we successfully\n // remove a marker at a given zoom, we add it at the new grid coordinates.\n let zoom = this._maxZoom;\n let changed = false;\n const oldGrid = this._getTilePoint(\n oldPoint,\n zoom,\n new google.maps.Size(0, 0)\n );\n const newGrid = this._getTilePoint(\n newPoint,\n zoom,\n new google.maps.Size(0, 0)\n );\n while (zoom >= 0 && (oldGrid.x !== newGrid.x || oldGrid.y !== newGrid.y)) {\n const cell = this._getGridCellNoCreate(oldGrid.x, oldGrid.y, zoom);\n if (cell) {\n if (this._removeMarkerFromCell(cell, marker)) {\n this._getGridCellCreate(newGrid.x, newGrid.y, zoom).push(marker);\n }\n }\n // For the current zoom we also need to update the map. Markers that no\n // longer are visible are removed from the map. Markers that moved into\n // the shown bounds are added to the map. This also lets us keep the count\n // of visible markers up to date.\n if (zoom === this._mapZoom) {\n if (this._isGridPointVisible(oldGrid)) {\n if (!this._isGridPointVisible(newGrid)) {\n this._removeOverlay(marker);\n changed = true;\n }\n } else {\n if (this._isGridPointVisible(newGrid)) {\n this._addOverlay(marker);\n changed = true;\n }\n }\n }\n oldGrid.x = oldGrid.x >> 1;\n oldGrid.y = oldGrid.y >> 1;\n newGrid.x = newGrid.x >> 1;\n newGrid.y = newGrid.y >> 1;\n --zoom;\n }\n if (changed) {\n this._notifyListeners();\n }\n }\n\n /**\n * Removes marker from the manager and from the map\n * (if it's currently visible).\n * @param {GMarker} marker The marker to delete.\n */\n public removeMarker(marker: google.maps.Marker): void {\n let zoom = this._maxZoom;\n let changed = false;\n const point = marker.getPosition();\n const grid = this._getTilePoint(point, zoom, new google.maps.Size(0, 0));\n while (zoom >= 0) {\n const cell = this._getGridCellNoCreate(grid.x, grid.y, zoom);\n\n if (cell) {\n this._removeMarkerFromCell(cell, marker);\n }\n // For the current zoom we also need to update the map. Markers that no\n // longer are visible are removed from the map. This also lets us keep the count\n // of visible markers up to date.\n if (zoom === this._mapZoom) {\n if (this._isGridPointVisible(grid)) {\n this._removeOverlay(marker);\n changed = true;\n }\n }\n grid.x = grid.x >> 1;\n grid.y = grid.y >> 1;\n --zoom;\n }\n if (changed) {\n this._notifyListeners();\n }\n this._numMarkers[marker.get(\"__minZoom\")]--;\n }\n\n /**\n * Add many markers at once.\n * Does not actually update the map, just the internal grid.\n *\n * @param {Array of Marker} markers The markers to add.\n * @param {Number} minZoom The minimum zoom level to display the markers.\n * @param {Number} maxZoom The maximum zoom level to display the markers.\n */\n public addMarkers(\n markers: google.maps.Marker[],\n minZoom: number,\n maxZoom: number\n ): void {\n maxZoom = this._getOptmaxZoom(maxZoom);\n for (let i = markers.length - 1; i >= 0; i--) {\n this._addMarkerBatch(markers[i], minZoom, maxZoom);\n }\n\n this._numMarkers[minZoom] += markers.length;\n }\n\n /**\n * Returns the value of the optional maximum zoom. This method is defined so\n * that we have just one place where optional maximum zoom is calculated.\n *\n * @param {Number} maxZoom The optinal maximum zoom.\n * @return The maximum zoom.\n */\n private _getOptmaxZoom(maxZoom: number): number {\n return maxZoom || this._maxZoom;\n }\n\n /**\n * Calculates the total number of markers potentially visible at a given\n * zoom level.\n *\n * @param {Number} zoom The zoom level to check.\n */\n public getMarkerCount(zoom: number): number {\n let total = 0;\n for (let z = 0; z <= zoom; z++) {\n total += this._numMarkers[z];\n }\n return total;\n }\n\n /**\n * Returns a marker given latitude, longitude and zoom. If the marker does not\n * exist, the method will return a new marker. If a new marker is created,\n * it will NOT be added to the manager.\n *\n * @param {Number} lat - the latitude of a marker.\n * @param {Number} lng - the longitude of a marker.\n * @param {Number} zoom - the zoom level\n * @return {GMarker} marker - the marker found at lat and lng\n */\n public getMarker(lat: number, lng: number, zoom: number): google.maps.Marker {\n const mPoint = new google.maps.LatLng(lat, lng);\n const gridPoint = this._getTilePoint(\n mPoint,\n zoom,\n new google.maps.Size(0, 0)\n );\n\n let marker = new google.maps.Marker({ position: mPoint });\n\n const cell = this._getGridCellNoCreate(gridPoint.x, gridPoint.y, zoom);\n if (cell !== undefined) {\n for (let i = 0; i < cell.length; i++) {\n if (\n lat === cell[i].getPosition().lat() &&\n lng === cell[i].getPosition().lng()\n ) {\n marker = cell[i];\n }\n }\n }\n return marker;\n }\n\n /**\n * Add a single marker to the map.\n *\n * @param {Marker} marker The marker to add.\n * @param {Number} minZoom The minimum zoom level to display the marker.\n * @param {Number} maxZoom The maximum zoom level to display the marker.\n */\n public addMarker(\n marker: google.maps.Marker,\n minZoom: number,\n maxZoom: number\n ): void {\n maxZoom = this._getOptmaxZoom(maxZoom);\n this._addMarkerBatch(marker, minZoom, maxZoom);\n const gridPoint = this._getTilePoint(\n marker.getPosition(),\n this._mapZoom,\n new google.maps.Size(0, 0)\n );\n if (\n this._isGridPointVisible(gridPoint) &&\n minZoom <= this._shownBounds.z &&\n this._shownBounds.z <= maxZoom\n ) {\n this._addOverlay(marker);\n this._notifyListeners();\n }\n this._numMarkers[minZoom]++;\n }\n\n /**\n * Get a cell in the grid, creating it first if necessary.\n *\n * Optimization candidate\n *\n * @param {Number} x The x coordinate of the cell.\n * @param {Number} y The y coordinate of the cell.\n * @param {Number} z The z coordinate of the cell.\n * @return {Array} The cell in the array.\n */\n private _getGridCellCreate(\n x: number,\n y: number,\n z: number\n ): google.maps.Marker[] {\n // TODO(jpoehnelt) document this\n if (x < 0) {\n x += this._gridWidth[z];\n }\n\n if (!this._grid[z]) {\n this._grid[z] = [];\n }\n if (!this._grid[z][x]) {\n this._grid[z][x] = [];\n }\n if (!this._grid[z][x][y]) {\n this._grid[z][x][y] = [];\n }\n return this._grid[z][x][y];\n }\n\n /**\n * Get a cell in the grid, returning undefined if it does not exist.\n *\n * NOTE: Optimized for speed -- otherwise could combine with _getGridCellCreate.\n *\n * @param {Number} x The x coordinate of the cell.\n * @param {Number} y The y coordinate of the cell.\n * @param {Number} z The z coordinate of the cell.\n * @return {Array} The cell in the array.\n */\n private _getGridCellNoCreate(\n x: number,\n y: number,\n z: number\n ): google.maps.Marker[] | null {\n if (x < 0) {\n x += this._gridWidth[z];\n }\n\n if (!this._grid[z]) {\n return null;\n }\n if (!this._grid[z][x]) {\n return null;\n }\n if (!this._grid[z][x][y]) {\n return null;\n }\n return this._grid[z][x][y];\n }\n\n /**\n * Turns at geographical bounds into a grid-space bounds.\n *\n * @param {LatLngBounds} bounds The geographical bounds.\n * @param {Number} zoom The zoom level of the bounds.\n * @param {google.maps.Size} swPadding The padding in pixels to extend beyond the\n * given bounds.\n * @param {google.maps.Size} nePadding The padding in pixels to extend beyond the\n * given bounds.\n * @return {GridBounds} The bounds in grid space.\n */\n private _getGridBounds(\n bounds: google.maps.LatLngBounds,\n zoom: number,\n swPadding: google.maps.Size,\n nePadding: google.maps.Size\n ): GridBounds {\n zoom = Math.min(zoom, this._maxZoom);\n\n const bl = bounds.getSouthWest();\n const tr = bounds.getNorthEast();\n const sw = this._getTilePoint(bl, zoom, swPadding);\n\n const ne = this._getTilePoint(tr, zoom, nePadding);\n const gw = this._gridWidth[zoom];\n\n // Crossing the prime meridian requires correction of bounds.\n if (tr.lng() < bl.lng() || ne.x < sw.x) {\n sw.x -= gw;\n }\n if (ne.x - sw.x + 1 >= gw) {\n // Computed grid bounds are larger than the world; truncate.\n sw.x = 0;\n ne.x = gw - 1;\n }\n\n const gridBounds = new GridBounds([sw, ne], zoom);\n gridBounds.z = zoom;\n\n return gridBounds;\n }\n\n /**\n * Gets the grid-space bounds for the current map viewport.\n *\n * @return {Bounds} The bounds in grid space.\n */\n private _getMapGridBounds(): GridBounds {\n return this._getGridBounds(\n this._map.getBounds(),\n this._mapZoom,\n this._swPadding,\n this._nePadding\n );\n }\n\n /**\n * Event listener for map:movend.\n * NOTE: Use a timeout so that the user is not blocked\n * from moving the map.\n *\n * Removed this because a a lack of a scopy override/callback function on events.\n */\n private _onMapMoveEnd(): void {\n window.setTimeout(this._updateMarkers.bind(this), 0);\n }\n\n /**\n * Is this layer visible?\n *\n * Returns visibility setting\n *\n * @return {Boolean} Visible\n */\n public visible(): boolean {\n return this.shown ? true : false;\n }\n\n /**\n * Returns true if the manager is hidden.\n * Otherwise returns false.\n * @return {Boolean} Hidden\n */\n public isHidden(): boolean {\n return !this.shown;\n }\n\n /**\n * Shows the manager if it's currently hidden.\n */\n public show(): void {\n this.shown = true;\n this.refresh();\n }\n\n /**\n * Hides the manager if it's currently visible\n */\n public hide(): void {\n this.shown = false;\n this.refresh();\n }\n\n /**\n * Toggles the visibility of the manager.\n */\n public toggle(): void {\n this.shown = !this.shown;\n this.refresh();\n }\n\n /**\n * Refresh forces the marker-manager into a good state.\n *
      \n *
    1. If never before initialized, shows all the markers.
    2. \n *
    3. If previously initialized, removes and re-adds all markers.
    4. \n *
    \n */\n public refresh(): void {\n if (this.shownMarkers > 0) {\n this._processAll(this._shownBounds, this._removeOverlay.bind(this));\n }\n // An extra check on this.show to increase performance (no need to _processAll_)\n if (this.show) {\n this._processAll(this._shownBounds, this._addOverlay.bind(this));\n }\n this._notifyListeners();\n }\n\n /**\n * After the viewport may have changed, add or remove markers as needed.\n */\n private _updateMarkers(): void {\n this._mapZoom = this._map.getZoom();\n const newBounds = this._getMapGridBounds();\n\n // If the move does not include new grid sections,\n // we have no work to do:\n if (\n newBounds.equals(this._shownBounds) &&\n newBounds.z === this._shownBounds.z\n ) {\n return;\n }\n\n if (newBounds.z !== this._shownBounds.z) {\n this._processAll(this._shownBounds, this._removeOverlay.bind(this));\n if (this.show) {\n // performance\n this._processAll(newBounds, this._addOverlay.bind(this));\n }\n } else {\n // Remove markers:\n this._rectangleDiff(\n this._shownBounds,\n newBounds,\n this._removeCellMarkers.bind(this)\n );\n\n // Add markers:\n if (this.show) {\n // performance\n this._rectangleDiff(\n newBounds,\n this._shownBounds,\n this._addCellMarkers.bind(this)\n );\n }\n }\n this._shownBounds = newBounds;\n\n this._notifyListeners();\n }\n\n /**\n * Notify listeners when the state of what is displayed changes.\n */\n private _notifyListeners(): void {\n google.maps.event.trigger(\n this,\n \"changed\",\n this._shownBounds,\n this.shownMarkers\n );\n }\n\n /**\n * Process all markers in the bounds provided, using a callback.\n *\n * @param {Bounds} bounds The bounds in grid space.\n * @param {Function} callback The function to call for each marker.\n */\n private _processAll(\n bounds: GridBounds,\n callback: (marker: google.maps.Marker) => void\n ): void {\n for (let x = bounds.minX; x <= bounds.maxX; x++) {\n for (let y = bounds.minY; y <= bounds.maxY; y++) {\n this._processCellMarkers(x, y, bounds.z, callback);\n }\n }\n }\n\n /**\n * Process all markers in the grid cell, using a callback.\n *\n * @param {Number} x The x coordinate of the cell.\n * @param {Number} y The y coordinate of the cell.\n * @param {Number} z The z coordinate of the cell.\n * @param {Function} callback The function to call for each marker.\n */\n private _processCellMarkers(\n x: number,\n y: number,\n z: number,\n callback: (marker: google.maps.Marker) => void\n ): void {\n const cell = this._getGridCellNoCreate(x, y, z);\n if (cell) {\n for (let i = cell.length - 1; i >= 0; i--) {\n callback(cell[i]);\n }\n }\n }\n\n /**\n * Remove all markers in a grid cell.\n *\n * @param {Number} x The x coordinate of the cell.\n * @param {Number} y The y coordinate of the cell.\n * @param {Number} z The z coordinate of the cell.\n */\n private _removeCellMarkers(x: number, y: number, z: number): void {\n this._processCellMarkers(x, y, z, this._removeOverlay.bind(this));\n }\n\n /**\n * Add all markers in a grid cell.\n *\n * @param {Number} x The x coordinate of the cell.\n * @param {Number} y The y coordinate of the cell.\n * @param {Number} z The z coordinate of the cell.\n */\n private _addCellMarkers(x: number, y: number, z: number): void {\n this._processCellMarkers(x, y, z, this._addOverlay.bind(this));\n }\n\n /**\n * Use the _rectangleDiffCoords function to process all grid cells\n * that are in bounds1 but not bounds2, using a callback, and using\n * the current MarkerManager object as the instance.\n *\n * Pass the z parameter to the callback in addition to x and y.\n *\n * @param {Bounds} bounds1 The bounds of all points we may _process.\n * @param {Bounds} bounds2 The bounds of points to exclude.\n * @param {Function} callback The callback function to call\n * for each grid coordinate (x, y, z).\n */\n private _rectangleDiff(\n bounds1: GridBounds,\n bounds2: GridBounds,\n callback: (x: number, y: number, z: number) => void\n ): void {\n this._rectangleDiffCoords(bounds1, bounds2, (x, y) => {\n callback(x, y, bounds1.z);\n });\n }\n\n /**\n * Calls the function for all points in bounds1, not in bounds2\n *\n * @param {Bounds} bounds1 The bounds of all points we may process.\n * @param {Bounds} bounds2 The bounds of points to exclude.\n * @param {Function} callback The callback function to call\n * for each grid coordinate.\n */\n private _rectangleDiffCoords(\n bounds1: GridBounds,\n bounds2: GridBounds,\n callback: (x: number, y: number) => void\n ): void {\n const minX1 = bounds1.minX;\n const minY1 = bounds1.minY;\n const maxX1 = bounds1.maxX;\n const maxY1 = bounds1.maxY;\n const minX2 = bounds2.minX;\n const minY2 = bounds2.minY;\n const maxX2 = bounds2.maxX;\n const maxY2 = bounds2.maxY;\n\n let x, y;\n for (x = minX1; x <= maxX1; x++) {\n // All x in R1\n // All above:\n for (y = minY1; y <= maxY1 && y < minY2; y++) {\n // y in R1 above R2\n callback(x, y);\n }\n // All below:\n for (\n y = Math.max(maxY2 + 1, minY1); // y in R1 below R2\n y <= maxY1;\n y++\n ) {\n callback(x, y);\n }\n }\n\n for (y = Math.max(minY1, minY2); y <= Math.min(maxY1, maxY2); y++) {\n // All y in R2 and in R1\n // Strictly left:\n for (x = Math.min(maxX1 + 1, minX2) - 1; x >= minX1; x--) {\n // x in R1 left of R2\n callback(x, y);\n }\n // Strictly right:\n for (\n x = Math.max(minX1, maxX2 + 1); // x in R1 right of R2\n x <= maxX1;\n x++\n ) {\n callback(x, y);\n }\n }\n }\n\n /**\n * Removes marker from cell. O(N).\n */\n private _removeMarkerFromCell(\n cell: google.maps.Marker[],\n marker: google.maps.Marker\n ): number {\n let shift = 0;\n for (let i = 0; i < cell.length; ++i) {\n if (cell[i] === marker) {\n cell.splice(i--, 1);\n shift++;\n }\n }\n return shift;\n }\n}\n\nexport { MarkerManager };\n"],"names":["match","version","check","it","Math","globalThis","window","self","global","this","Function","exec","error","fails","Object","defineProperty","get","call","prototype","bind","apply","arguments","$propertyIsEnumerable","propertyIsEnumerable","getOwnPropertyDescriptor","V","descriptor","enumerable","bitmap","value","configurable","writable","FunctionPrototype","callBind","fn","toString","uncurryThis","stringSlice","slice","split","classof","TypeError","undefined","IndexedObject","requireObjectCoercible","argument","isCallable","aFunction","namespace","method","length","isPrototypeOf","getBuiltIn","process","Deno","versions","v8","userAgent","getOwnPropertySymbols","symbol","Symbol","String","sham","V8_VERSION","NATIVE_SYMBOL","iterator","USE_SYMBOL_AS_UID","$Symbol","tryToString","key","SHARED","setGlobal","module","store","push","mode","copyright","hasOwnProperty","hasOwn","toObject","id","postfix","random","WellKnownSymbolsStore","shared","symbolFor","createWellKnownSymbol","withoutSetter","uid","name","description","TO_PRIMITIVE","wellKnownSymbol","input","pref","isObject","isSymbol","func","result","exoticToPrim","aCallable","val","valueOf","ordinaryToPrimitive","toPrimitive","document","EXISTS","createElement","DESCRIPTORS","a","$getOwnPropertyDescriptor","O","P","toIndexedObject","toPropertyKey","IE8_DOM_DEFINE","createPropertyDescriptor","propertyIsEnumerableModule","f","$defineProperty","Attributes","anObject","object","definePropertyModule","functionToString","inspectSource","set","has","WeakMap","test","keys","OBJECT_ALREADY_INITIALIZED","NATIVE_WEAK_MAP","state","wmget","wmhas","wmset","metadata","facade","STATE","hiddenKeys","createNonEnumerableProperty","enforce","getterFor","TYPE","type","getDescriptor","PROPER","CONFIGURABLE","CONFIGURABLE_FUNCTION_NAME","require$$0","getInternalState","InternalStateModule","enforceInternalState","TEMPLATE","options","unsafe","simple","noTargetGet","replace","source","join","ceil","floor","number","max","min","index","integer","toIntegerOrInfinity","obj","createMethod","IS_INCLUDES","$this","el","fromIndex","lengthOfArrayLike","toAbsoluteIndex","indexOf","includes","concat","getOwnPropertyNames","names","i","internalObjectKeys","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","target","ownKeys","getOwnPropertyDescriptorModule","replacement","isForced","feature","detection","data","normalize","POLYFILL","NATIVE","string","toLowerCase","Array","isArray","METHOD_NAME","TO_STRING_TAG","CORRECT_ARGUMENTS","classofRaw","TO_STRING_TAG_SUPPORT","tag","tryGet","callee","noop","empty","construct","constructorRegExp","INCORRECT_TO_STRING","isConstructorModern","called","SPECIES","originalArray","C","constructor","isConstructor","propertyKey","HAS_SPECIES_SUPPORT","array","foo","Boolean","MAX_SAFE_INTEGER","MAXIMUM_ALLOWED_LENGTH_EXCEEDED","latLngToPixel","latlng","zoom","google","maps","Point","lng","lat","sinofphi","sin","PI","log","targetProperty","sourceProperty","TARGET","GLOBAL","STATIC","stat","forced","copyConstructorProperties","redefine","proto","splice","start","deleteCount","insertCount","actualDeleteCount","A","k","from","to","len","actualStart","argumentsLength","arraySpeciesCreate","createProperty","GridBounds","bounds","z","minX","x","maxX","minY","y","maxY","gridBounds","point","MarkerManager","map","maxZoom","trackMarkers","shown","borderPadding","_map","_mapZoom","getZoom","_maxZoom","_trackMarkers","_swPadding","Size","_nePadding","_gridWidth","_grid","_numMarkers","shownMarkers","event","addListenerOnce","_this","_initialize","mapTypes","sType","addListener","_onMapMoveEnd","resetManager","_shownBounds","_getMapGridBounds","trigger","marker","setMap","mapWidth","_tileSize","_processAll","_removeOverlay","padding","pixelPoint","width","height","minZoom","mPoint","getPosition","oldPoint","newPoint","_this2","_onMarkerMoved","gridPoint","_getTilePoint","_getGridCellCreate","vertical","horizontal","changed","oldGrid","newGrid","cell","_getGridCellNoCreate","_removeMarkerFromCell","_isGridPointVisible","_addOverlay","_notifyListeners","grid","markers","_getOptmaxZoom","_addMarkerBatch","total","LatLng","Marker","position","swPadding","nePadding","bl","getSouthWest","tr","getNorthEast","sw","ne","gw","_getGridBounds","getBounds","setTimeout","_updateMarkers","refresh","show","newBounds","equals","_rectangleDiff","_removeCellMarkers","_addCellMarkers","callback","_processCellMarkers","bounds1","bounds2","_rectangleDiffCoords","minX1","minY1","maxX1","maxY1","minX2","minY2","maxX2","maxY2","shift"],"mappings":"usBAAA,ICOIA,EAAOC,EDPPC,EAAQ,SAAUC,UACbA,GAAMA,EAAGC,MAAQA,MAAQD,KAMhCD,EAA2B,iBAAdG,YAA0BA,aACvCH,EAAuB,iBAAVI,QAAsBA,SAEnCJ,EAAqB,iBAARK,MAAoBA,OACjCL,EAAuB,iBAAVM,GAAsBA,IAElC,kBAAqBC,KAArB,IAAmCC,SAAS,cAATA,KEbrB,SAAUC,eAEdA,IACT,MAAOC,UACA,OCDOC,GAAM,kBAEwD,GAAvEC,OAAOC,eAAe,GAAI,EAAG,CAAEC,IAAK,kBAAqB,KAAQ,MCLtEC,EAAOP,SAASQ,UAAUD,OAEbA,EAAKE,KAAOF,EAAKE,KAAKF,GAAQ,kBACtCA,EAAKG,MAAMH,EAAMI,YCFtBC,EAAwB,GAAGC,qBAE3BC,EAA2BV,OAAOU,8BAGpBA,IAA6BF,EAAsBL,KAAK,GAAK,GAAK,GAI1D,SAA8BQ,OAClDC,EAAaF,EAAyBf,KAAMgB,WACvCC,GAAcA,EAAWC,YAChCL,KCba,SAAUM,EAAQC,SAC1B,CACLF,aAAuB,EAATC,GACdE,eAAyB,EAATF,GAChBG,WAAqB,EAATH,GACZC,MAAOA,ICLPG,EAAoBtB,SAASQ,UAC7BC,EAAOa,EAAkBb,KACzBF,EAAOe,EAAkBf,KACzBgB,EAAWd,GAAQA,EAAKA,KAAKF,KAEhBE,EAAO,SAAUe,UACzBA,GAAMD,EAAShB,EAAMiB,IAC1B,SAAUA,UACLA,GAAM,kBACJjB,EAAKG,MAAMc,EAAIb,aCPtBc,EAAWC,EAAY,GAAGD,UAC1BE,EAAcD,EAAY,GAAGE,SAEhB,SAAUnC,UAClBk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KAAKkK,IAAI8M,EAAQ,EAAGE,GAAS,EAAGzG,GAAKqG,EAAOrG,IAEnDgG,EAAShG,EAAGG,OAIZH,EAAIzQ,KAAKiK,IAAI6M,EAAOM,EAAQ,GAC5B3G,GAAKuG,EACLvG,IAEAgG,EAAShG,EAAGG,yCAQV,SACN2D,EACAzB,WAEIwE,EAAQ,EACHnM,EAAI,EAAGA,EAAIoJ,EAAKzR,SAAUqI,EAC7BoJ,EAAKpJ,KAAO2H,IACdyB,EAAKhF,OAAOpE,IAAK,GACjBmM,YAGGA"} \ No newline at end of file diff --git a/dist/index.min.js b/dist/index.min.js index fa80d806..f6c405bc 100644 --- a/dist/index.min.js +++ b/dist/index.min.js @@ -1 +1 @@ -this.google=this.google||{},this.google.maps=this.google.maps||{},this.google.maps.plugins=this.google.maps.plugins||{},this.google.maps.plugins.markermanager=function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;n=74)&&(s=S.match(/Chrome\/(\d+)/))&&(a=s[1]);var z=a&&+a,B=!!Object.getOwnPropertySymbols&&!l((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&z&&z<41})),E=B&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,G=E?function(t){return"symbol"==typeof t}:function(t){var e=O("Symbol");return M(e)&&Object(t)instanceof e},Z=function(t){if(M(t))return t;throw TypeError(function(t){try{return String(t)}catch(t){return"Object"}}(t)+" is not a function")},A=function(t,e){try{Object.defineProperty(h,t,{value:e,configurable:!0,writable:!0})}catch(n){h[t]=e}return e},L="__core-js_shared__",X=h[L]||A(L,{}),Y=o((function(t){(t.exports=function(t,e){return X[t]||(X[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),F=function(t){return Object(b(t))},N={}.hasOwnProperty,I=Object.hasOwn||function(t,e){return N.call(F(t),e)},D=0,W=Math.random(),V=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++D+W).toString(36)},R=Y("wks"),q=h.Symbol,U=E?q:q&&q.withoutSetter||V,H=function(t){return I(R,t)&&(B||"string"==typeof R[t])||(B&&I(q,t)?R[t]=q[t]:R[t]=U("Symbol."+t)),R[t]},K=H("toPrimitive"),$=function(t,e){if(!k(t)||G(t))return t;var n,r,i=null==(n=t[K])?void 0:Z(n);if(i){if(void 0===e&&(e="default"),r=i.call(t,e),!k(r)||G(r))return r;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&M(n=t.toString)&&!k(r=n.call(t)))return r;if(M(n=t.valueOf)&&!k(r=n.call(t)))return r;if("string"!==e&&M(n=t.toString)&&!k(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}(t,e)},J=function(t){var e=$(t,"string");return G(e)?e:String(e)},Q=h.document,tt=k(Q)&&k(Q.createElement),et=!c&&!l((function(){return 7!=Object.defineProperty((t="div",tt?Q.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),nt=Object.getOwnPropertyDescriptor,rt={f:c?nt:function(t,e){if(t=w(t),e=J(e),et)try{return nt(t,e)}catch(t){}if(I(t,e))return m(!d.f.call(t,e),t[e])}},it=function(t){if(k(t))return t;throw TypeError(String(t)+" is not an object")},ot=Object.defineProperty,st={f:c?ot:function(t,e,n){if(it(t),e=J(e),it(n),et)try{return ot(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},at=c?function(t,e,n){return st.f(t,e,m(1,n))}:function(t,e,n){return t[e]=n,t},ut=Function.toString;M(X.inspectSource)||(X.inspectSource=function(t){return ut.call(t)});var ht,lt,ct,ft,gt=X.inspectSource,dt=h.WeakMap,mt=M(dt)&&/native code/.test(gt(dt)),vt=Y("keys"),_t={},pt="Object already initialized",yt=h.WeakMap;if(mt||X.state){var bt=X.state||(X.state=new yt),wt=bt.get,Mt=bt.has,kt=bt.set;ht=function(t,e){if(Mt.call(bt,t))throw new TypeError(pt);return e.facade=t,kt.call(bt,t,e),e},lt=function(t){return wt.call(bt,t)||{}},ct=function(t){return Mt.call(bt,t)}}else{var xt=vt[ft="state"]||(vt[ft]=V(ft));_t[xt]=!0,ht=function(t,e){if(I(t,xt))throw new TypeError(pt);return e.facade=t,at(t,xt,e),e},lt=function(t){return I(t,xt)?t[xt]:{}},ct=function(t){return I(t,xt)}}var Ot={set:ht,get:lt,has:ct,enforce:function(t){return ct(t)?lt(t):ht(t,{})},getterFor:function(t){return function(e){var n;if(!k(e)||(n=lt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},St=Function.prototype,Pt=c&&Object.getOwnPropertyDescriptor,Ct=I(St,"name"),jt={EXISTS:Ct,PROPER:Ct&&"something"===function(){}.name,CONFIGURABLE:Ct&&(!c||c&&Pt(St,"name").configurable)},Tt=o((function(t){var e=jt.CONFIGURABLE,n=Ot.get,r=Ot.enforce,i=String(String).split("String");(t.exports=function(t,n,o,s){var a,u=!!s&&!!s.unsafe,l=!!s&&!!s.enumerable,c=!!s&&!!s.noTargetGet,f=s&&void 0!==s.name?s.name:n;M(o)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!I(o,"name")||e&&o.name!==f)&&at(o,"name",f),(a=r(o)).source||(a.source=i.join("string"==typeof f?f:""))),t!==h?(u?!c&&t[n]&&(l=!0):delete t[n],l?t[n]=o:at(t,n,o)):l?t[n]=o:A(n,o)})(Function.prototype,"toString",(function(){return M(this)&&n(this).source||gt(this)}))})),zt=Math.ceil,Bt=Math.floor,Et=function(t){var e=+t;return e!=e||0===e?0:(e>0?Bt:zt)(e)},Gt=Math.max,Zt=Math.min,At=function(t,e){var n=Et(t);return n<0?Gt(n+e,0):Zt(n,e)},Lt=Math.min,Xt=function(t){return(e=t.length)>0?Lt(Et(e),9007199254740991):0;var e},Yt=function(t){return function(e,n,r){var i,o=w(e),s=Xt(o),a=At(r,s);if(t&&n!=n){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===n)return t||a||0;return!t&&-1}},Ft={includes:Yt(!0),indexOf:Yt(!1)}.indexOf,Nt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),It={f:Object.getOwnPropertyNames||function(t){return function(t,e){var n,r=w(t),i=0,o=[];for(n in r)!I(_t,n)&&I(r,n)&&o.push(n);for(;e.length>i;)I(r,n=e[i++])&&(~Ft(o,n)||o.push(n));return o}(t,Nt)}},Dt={f:Object.getOwnPropertySymbols},Wt=O("Reflect","ownKeys")||function(t){var e=It.f(it(t)),n=Dt.f;return n?e.concat(n(t)):e},Vt=function(t,e){for(var n=Wt(e),r=st.f,i=rt.f,o=0;o=51||!l((function(){var t=[];return(t.constructor={})[_e]=function(){return{foo:1}},1!==t[ne](Boolean).foo}))),ye=Math.max,be=Math.min,we=9007199254740991,Me="Maximum allowed length exceeded";function ke(t,e){return new google.maps.Point(~~(.5+(i=t.lng(),(1+i/180)*(2<we)throw TypeError(Me);for(i=me(u,r),o=0;oh-r+n;o--)delete u[o-1]}else if(n>r)for(o=h-r;o>l;o--)a=o+n-1,(s=o+r-1)in u?u[a]=u[s]:delete u[a];for(o=0;o=t.x&&this.minY<=t.y&&this.maxY>=t.y}}]),t}(),Oe=function(){function t(n,r){var i=this,o=r.maxZoom,s=void 0===o?19:o,a=r.trackMarkers,u=r.shown,h=void 0===u||u,l=r.borderPadding,c=void 0===l?100:l;e(this,t),this._tileSize=1024,this._map=n,this._mapZoom=n.getZoom(),this._maxZoom=s,this._trackMarkers=a,this._swPadding=new google.maps.Size(-c,c),this._nePadding=new google.maps.Size(c,-c),this._gridWidth={},this._grid=[],this._grid[this._maxZoom]=[],this._numMarkers={},this._numMarkers[this._maxZoom]=0,this.shownMarkers=0,this.shown=h,google.maps.event.addListenerOnce(n,"idle",(function(){i._initialize()}))}return r(t,[{key:"_initialize",value:function(){var t=this._map.mapTypes;for(var e in t)e in t&&t.get(e)&&"number"===t.get(e).maxZoom&&this._map.mapTypes.get(e).maxZoom;google.maps.event.addListener(this._map,"dragend",this._onMapMoveEnd.bind(this)),google.maps.event.addListener(this._map,"idle",this._onMapMoveEnd.bind(this)),google.maps.event.addListener(this._map,"zoom_changed",this._onMapMoveEnd.bind(this)),this.resetManager(),this._shownBounds=this._getMapGridBounds(),google.maps.event.trigger(this,"loaded")}},{key:"_removeOverlay",value:function(t){t.setMap(null),this.shownMarkers--}},{key:"_addOverlay",value:function(t){this.shown&&(t.setMap(this._map),this.shownMarkers++)}},{key:"resetManager",value:function(){for(var t=256,e=0;e<=this._maxZoom;++e)this._grid[e]=[],this._numMarkers[e]=0,this._gridWidth[e]=Math.ceil(t/this._tileSize),t<<=1}},{key:"clearMarkers",value:function(){this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.resetManager()}},{key:"_getTilePoint",value:function(t,e,n){var r=ke(t,e);return new google.maps.Point(Math.floor((r.x+n.width)/this._tileSize),Math.floor((r.y+n.height)/this._tileSize))}},{key:"_addMarkerBatch",value:function(t,e,n){var r=this,i=t.getPosition();t.set("__minZoom",e),this._trackMarkers&&google.maps.event.addListener(t,"changed",(function(t,e,n){r._onMarkerMoved(t,e,n)}));for(var o=this._getTilePoint(i,n,new google.maps.Size(0,0)),s=n;s>=e;s--){this._getGridCellCreate(o.x,o.y,s).push(t),o.x=o.x>>1,o.y=o.y>>1}}},{key:"_isGridPointVisible",value:function(t){var e=this._shownBounds.minY<=t.y&&t.y<=this._shownBounds.maxY,n=this._shownBounds.minX,r=n<=t.x&&t.x<=this._shownBounds.maxX;if(!r&&n<0){var i=this._gridWidth[this._shownBounds.z];r=n+i<=t.x&&t.x<=i-1}return e&&r}},{key:"_onMarkerMoved",value:function(t,e,n){for(var r=this._maxZoom,i=!1,o=this._getTilePoint(e,r,new google.maps.Size(0,0)),s=this._getTilePoint(n,r,new google.maps.Size(0,0));r>=0&&(o.x!==s.x||o.y!==s.y);){var a=this._getGridCellNoCreate(o.x,o.y,r);a&&this._removeMarkerFromCell(a,t)&&this._getGridCellCreate(s.x,s.y,r).push(t),r===this._mapZoom&&(this._isGridPointVisible(o)?this._isGridPointVisible(s)||(this._removeOverlay(t),i=!0):this._isGridPointVisible(s)&&(this._addOverlay(t),i=!0)),o.x=o.x>>1,o.y=o.y>>1,s.x=s.x>>1,s.y=s.y>>1,--r}i&&this._notifyListeners()}},{key:"removeMarker",value:function(t){for(var e=this._maxZoom,n=!1,r=t.getPosition(),i=this._getTilePoint(r,e,new google.maps.Size(0,0));e>=0;){var o=this._getGridCellNoCreate(i.x,i.y,e);o&&this._removeMarkerFromCell(o,t),e===this._mapZoom&&this._isGridPointVisible(i)&&(this._removeOverlay(t),n=!0),i.x=i.x>>1,i.y=i.y>>1,--e}n&&this._notifyListeners(),this._numMarkers[t.get("__minZoom")]--}},{key:"addMarkers",value:function(t,e,n){n=this._getOptmaxZoom(n);for(var r=t.length-1;r>=0;r--)this._addMarkerBatch(t[r],e,n);this._numMarkers[e]+=t.length}},{key:"_getOptmaxZoom",value:function(t){return t||this._maxZoom}},{key:"getMarkerCount",value:function(t){for(var e=0,n=0;n<=t;n++)e+=this._numMarkers[n];return e}},{key:"getMarker",value:function(t,e,n){var r=new google.maps.LatLng(t,e),i=this._getTilePoint(r,n,new google.maps.Size(0,0)),o=new google.maps.Marker({position:r}),s=this._getGridCellNoCreate(i.x,i.y,n);if(void 0!==s)for(var a=0;a=u&&(s.x=0,a.x=u-1);var h=new xe([s,a],e);return h.z=e,h}},{key:"_getMapGridBounds",value:function(){return this._getGridBounds(this._map.getBounds(),this._mapZoom,this._swPadding,this._nePadding)}},{key:"_onMapMoveEnd",value:function(){window.setTimeout(this._updateMarkers.bind(this),0)}},{key:"visible",value:function(){return!!this.shown}},{key:"isHidden",value:function(){return!this.shown}},{key:"show",value:function(){this.shown=!0,this.refresh()}},{key:"hide",value:function(){this.shown=!1,this.refresh()}},{key:"toggle",value:function(){this.shown=!this.shown,this.refresh()}},{key:"refresh",value:function(){this.shownMarkers>0&&this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.show&&this._processAll(this._shownBounds,this._addOverlay.bind(this)),this._notifyListeners()}},{key:"_updateMarkers",value:function(){this._mapZoom=this._map.getZoom();var t=this._getMapGridBounds();t.equals(this._shownBounds)&&t.z===this._shownBounds.z||(t.z!==this._shownBounds.z?(this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.show&&this._processAll(t,this._addOverlay.bind(this))):(this._rectangleDiff(this._shownBounds,t,this._removeCellMarkers.bind(this)),this.show&&this._rectangleDiff(t,this._shownBounds,this._addCellMarkers.bind(this))),this._shownBounds=t,this._notifyListeners())}},{key:"_notifyListeners",value:function(){google.maps.event.trigger(this,"changed",this._shownBounds,this.shownMarkers)}},{key:"_processAll",value:function(t,e){for(var n=t.minX;n<=t.maxX;n++)for(var r=t.minY;r<=t.maxY;r++)this._processCellMarkers(n,r,t.z,e)}},{key:"_processCellMarkers",value:function(t,e,n,r){var i=this._getGridCellNoCreate(t,e,n);if(i)for(var o=i.length-1;o>=0;o--)r(i[o])}},{key:"_removeCellMarkers",value:function(t,e,n){this._processCellMarkers(t,e,n,this._removeOverlay.bind(this))}},{key:"_addCellMarkers",value:function(t,e,n){this._processCellMarkers(t,e,n,this._addOverlay.bind(this))}},{key:"_rectangleDiff",value:function(t,e,n){this._rectangleDiffCoords(t,e,(function(e,r){n(e,r,t.z)}))}},{key:"_rectangleDiffCoords",value:function(t,e,n){var r,i,o=t.minX,s=t.minY,a=t.maxX,u=t.maxY,h=e.minX,l=e.minY,c=e.maxX,f=e.maxY;for(r=o;r<=a;r++){for(i=s;i<=u&&i=o;r--)n(r,i);for(r=Math.max(o,c+1);r<=a;r++)n(r,i)}}},{key:"_removeMarkerFromCell",value:function(t,e){for(var n=0,r=0;r0&&s[0]<4?1:+(s[0]+s[1])),!a&&L&&(!(s=L.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=L.match(/Chrome\/(\d+)/))&&(a=+s[1]);var I=a,D=!!Object.getOwnPropertySymbols&&!l((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&I&&I<41})),W=D&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,V=h.Object,R=W?function(t){return"symbol"==typeof t}:function(t){var e=Z("Symbol");return T(e)&&A(e.prototype,V(t))},q=h.String,U=h.TypeError,H=function(t){if(T(t))return t;throw U(function(t){try{return q(t)}catch(t){return"Object"}}(t)+" is not a function")},K=h.TypeError,$=Object.defineProperty,J=function(t,e){try{$(h,t,{value:e,configurable:!0,writable:!0})}catch(n){h[t]=e}return e},Q="__core-js_shared__",tt=h[Q]||J(Q,{}),et=o((function(t){(t.exports=function(t,e){return tt[t]||(tt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.0",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),nt=h.Object,rt=function(t){return nt(z(t))},it=M({}.hasOwnProperty),ot=Object.hasOwn||function(t,e){return it(rt(t),e)},st=0,at=Math.random(),ut=M(1..toString),ht=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ut(++st+at,36)},lt=et("wks"),ct=h.Symbol,ft=ct&&ct.for,gt=W?ct:ct&&ct.withoutSetter||ht,dt=function(t){if(!ot(lt,t)||!D&&"string"!=typeof lt[t]){var e="Symbol."+t;D&&ot(ct,t)?lt[t]=ct[t]:lt[t]=W&&ft?ft(e):gt(e)}return lt[t]},mt=h.TypeError,vt=dt("toPrimitive"),pt=function(t,e){if(!E(t)||R(t))return t;var n,r,i=null==(n=t[vt])?void 0:H(n);if(i){if(void 0===e&&(e="default"),r=g(i,t,e),!E(r)||R(r))return r;throw mt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&T(n=t.toString)&&!E(r=g(n,t)))return r;if(T(n=t.valueOf)&&!E(r=g(n,t)))return r;if("string"!==e&&T(n=t.toString)&&!E(r=g(n,t)))return r;throw K("Can't convert object to primitive value")}(t,e)},_t=function(t){var e=pt(t,"string");return R(e)?e:e+""},yt=h.document,bt=E(yt)&&E(yt.createElement),wt=!c&&!l((function(){return 7!=Object.defineProperty((t="div",bt?yt.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),Mt=Object.getOwnPropertyDescriptor,kt={f:c?Mt:function(t,e){if(t=B(t),e=_t(e),wt)try{return Mt(t,e)}catch(t){}if(ot(t,e))return p(!g(v.f,t,e),t[e])}},xt=h.String,Ot=h.TypeError,St=function(t){if(E(t))return t;throw Ot(xt(t)+" is not an object")},Pt=h.TypeError,Ct=Object.defineProperty,jt={f:c?Ct:function(t,e,n){if(St(t),e=_t(e),St(n),wt)try{return Ct(t,e,n)}catch(t){}if("get"in n||"set"in n)throw Pt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},zt=c?function(t,e,n){return jt.f(t,e,p(1,n))}:function(t,e,n){return t[e]=n,t},Bt=M(Function.toString);T(tt.inspectSource)||(tt.inspectSource=function(t){return Bt(t)});var Tt,Et,Gt,Zt,At=tt.inspectSource,Lt=h.WeakMap,Xt=T(Lt)&&/native code/.test(At(Lt)),Yt=et("keys"),Ft={},Nt="Object already initialized",It=h.TypeError,Dt=h.WeakMap;if(Xt||tt.state){var Wt=tt.state||(tt.state=new Dt),Vt=M(Wt.get),Rt=M(Wt.has),qt=M(Wt.set);Tt=function(t,e){if(Rt(Wt,t))throw new It(Nt);return e.facade=t,qt(Wt,t,e),e},Et=function(t){return Vt(Wt,t)||{}},Gt=function(t){return Rt(Wt,t)}}else{var Ut=Yt[Zt="state"]||(Yt[Zt]=ht(Zt));Ft[Ut]=!0,Tt=function(t,e){if(ot(t,Ut))throw new It(Nt);return e.facade=t,zt(t,Ut,e),e},Et=function(t){return ot(t,Ut)?t[Ut]:{}},Gt=function(t){return ot(t,Ut)}}var Ht={set:Tt,get:Et,has:Gt,enforce:function(t){return Gt(t)?Et(t):Tt(t,{})},getterFor:function(t){return function(e){var n;if(!E(e)||(n=Et(e)).type!==t)throw It("Incompatible receiver, "+t+" required");return n}}},Kt=Function.prototype,$t=c&&Object.getOwnPropertyDescriptor,Jt=ot(Kt,"name"),Qt={EXISTS:Jt,PROPER:Jt&&"something"===function(){}.name,CONFIGURABLE:Jt&&(!c||c&&$t(Kt,"name").configurable)},te=o((function(t){var e=Qt.CONFIGURABLE,n=Ht.get,r=Ht.enforce,i=String(String).split("String");(t.exports=function(t,n,o,s){var a,u=!!s&&!!s.unsafe,l=!!s&&!!s.enumerable,c=!!s&&!!s.noTargetGet,f=s&&void 0!==s.name?s.name:n;T(o)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!ot(o,"name")||e&&o.name!==f)&&zt(o,"name",f),(a=r(o)).source||(a.source=i.join("string"==typeof f?f:""))),t!==h?(u?!c&&t[n]&&(l=!0):delete t[n],l?t[n]=o:zt(t,n,o)):l?t[n]=o:J(n,o)})(Function.prototype,"toString",(function(){return T(this)&&n(this).source||At(this)}))})),ee=Math.ceil,ne=Math.floor,re=function(t){var e=+t;return e!=e||0===e?0:(e>0?ne:ee)(e)},ie=Math.max,oe=Math.min,se=function(t,e){var n=re(t);return n<0?ie(n+e,0):oe(n,e)},ae=Math.min,ue=function(t){return(e=t.length)>0?ae(re(e),9007199254740991):0;var e},he=function(t){return function(e,n,r){var i,o=B(e),s=ue(o),a=se(r,s);if(t&&n!=n){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===n)return t||a||0;return!t&&-1}},le={includes:he(!0),indexOf:he(!1)}.indexOf,ce=M([].push),fe=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),ge={f:Object.getOwnPropertyNames||function(t){return function(t,e){var n,r=B(t),i=0,o=[];for(n in r)!ot(Ft,n)&&ot(r,n)&&ce(o,n);for(;e.length>i;)ot(r,n=e[i++])&&(~le(o,n)||ce(o,n));return o}(t,fe)}},de={f:Object.getOwnPropertySymbols},me=M([].concat),ve=Z("Reflect","ownKeys")||function(t){var e=ge.f(St(t)),n=de.f;return n?me(e,n(t)):e},pe=function(t,e){for(var n=ve(e),r=jt.f,i=kt.f,o=0;o=51||!l((function(){var t=[];return(t.constructor={})[Re]=function(){return{foo:1}},1!==t[Ce](Boolean).foo}))),Ue=h.TypeError,He=Math.max,Ke=Math.min,$e=9007199254740991,Je="Maximum allowed length exceeded";function Qe(t,e){return new google.maps.Point(~~(.5+(i=t.lng(),(1+i/180)*(2<$e)throw Ue(Je);for(i=We(u,r),o=0;oh-r+n;o--)delete u[o-1]}else if(n>r)for(o=h-r;o>l;o--)a=o+n-1,(s=o+r-1)in u?u[a]=u[s]:delete u[a];for(o=0;o=t.x&&this.minY<=t.y&&this.maxY>=t.y}}]),t}(),en=function(){function t(n,r){var i=this,o=r.maxZoom,s=void 0===o?19:o,a=r.trackMarkers,u=r.shown,h=void 0===u||u,l=r.borderPadding,c=void 0===l?100:l;e(this,t),this._tileSize=1024,this._map=n,this._mapZoom=n.getZoom(),this._maxZoom=s,this._trackMarkers=a,this._swPadding=new google.maps.Size(-c,c),this._nePadding=new google.maps.Size(c,-c),this._gridWidth={},this._grid=[],this._grid[this._maxZoom]=[],this._numMarkers={},this._numMarkers[this._maxZoom]=0,this.shownMarkers=0,this.shown=h,google.maps.event.addListenerOnce(n,"idle",(function(){i._initialize()}))}return r(t,[{key:"_initialize",value:function(){var t=this._map.mapTypes;for(var e in t)e in t&&t.get(e)&&"number"===t.get(e).maxZoom&&this._map.mapTypes.get(e).maxZoom;google.maps.event.addListener(this._map,"dragend",this._onMapMoveEnd.bind(this)),google.maps.event.addListener(this._map,"idle",this._onMapMoveEnd.bind(this)),google.maps.event.addListener(this._map,"zoom_changed",this._onMapMoveEnd.bind(this)),this.resetManager(),this._shownBounds=this._getMapGridBounds(),google.maps.event.trigger(this,"loaded")}},{key:"_removeOverlay",value:function(t){t.setMap(null),this.shownMarkers--}},{key:"_addOverlay",value:function(t){this.shown&&(t.setMap(this._map),this.shownMarkers++)}},{key:"resetManager",value:function(){for(var t=256,e=0;e<=this._maxZoom;++e)this._grid[e]=[],this._numMarkers[e]=0,this._gridWidth[e]=Math.ceil(t/this._tileSize),t<<=1}},{key:"clearMarkers",value:function(){this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.resetManager()}},{key:"_getTilePoint",value:function(t,e,n){var r=Qe(t,e);return new google.maps.Point(Math.floor((r.x+n.width)/this._tileSize),Math.floor((r.y+n.height)/this._tileSize))}},{key:"_addMarkerBatch",value:function(t,e,n){var r=this,i=t.getPosition();t.set("__minZoom",e),this._trackMarkers&&google.maps.event.addListener(t,"changed",(function(t,e,n){r._onMarkerMoved(t,e,n)}));for(var o=this._getTilePoint(i,n,new google.maps.Size(0,0)),s=n;s>=e;s--){this._getGridCellCreate(o.x,o.y,s).push(t),o.x=o.x>>1,o.y=o.y>>1}}},{key:"_isGridPointVisible",value:function(t){var e=this._shownBounds.minY<=t.y&&t.y<=this._shownBounds.maxY,n=this._shownBounds.minX,r=n<=t.x&&t.x<=this._shownBounds.maxX;if(!r&&n<0){var i=this._gridWidth[this._shownBounds.z];r=n+i<=t.x&&t.x<=i-1}return e&&r}},{key:"_onMarkerMoved",value:function(t,e,n){for(var r=this._maxZoom,i=!1,o=this._getTilePoint(e,r,new google.maps.Size(0,0)),s=this._getTilePoint(n,r,new google.maps.Size(0,0));r>=0&&(o.x!==s.x||o.y!==s.y);){var a=this._getGridCellNoCreate(o.x,o.y,r);a&&this._removeMarkerFromCell(a,t)&&this._getGridCellCreate(s.x,s.y,r).push(t),r===this._mapZoom&&(this._isGridPointVisible(o)?this._isGridPointVisible(s)||(this._removeOverlay(t),i=!0):this._isGridPointVisible(s)&&(this._addOverlay(t),i=!0)),o.x=o.x>>1,o.y=o.y>>1,s.x=s.x>>1,s.y=s.y>>1,--r}i&&this._notifyListeners()}},{key:"removeMarker",value:function(t){for(var e=this._maxZoom,n=!1,r=t.getPosition(),i=this._getTilePoint(r,e,new google.maps.Size(0,0));e>=0;){var o=this._getGridCellNoCreate(i.x,i.y,e);o&&this._removeMarkerFromCell(o,t),e===this._mapZoom&&this._isGridPointVisible(i)&&(this._removeOverlay(t),n=!0),i.x=i.x>>1,i.y=i.y>>1,--e}n&&this._notifyListeners(),this._numMarkers[t.get("__minZoom")]--}},{key:"addMarkers",value:function(t,e,n){n=this._getOptmaxZoom(n);for(var r=t.length-1;r>=0;r--)this._addMarkerBatch(t[r],e,n);this._numMarkers[e]+=t.length}},{key:"_getOptmaxZoom",value:function(t){return t||this._maxZoom}},{key:"getMarkerCount",value:function(t){for(var e=0,n=0;n<=t;n++)e+=this._numMarkers[n];return e}},{key:"getMarker",value:function(t,e,n){var r=new google.maps.LatLng(t,e),i=this._getTilePoint(r,n,new google.maps.Size(0,0)),o=new google.maps.Marker({position:r}),s=this._getGridCellNoCreate(i.x,i.y,n);if(void 0!==s)for(var a=0;a=u&&(s.x=0,a.x=u-1);var h=new tn([s,a],e);return h.z=e,h}},{key:"_getMapGridBounds",value:function(){return this._getGridBounds(this._map.getBounds(),this._mapZoom,this._swPadding,this._nePadding)}},{key:"_onMapMoveEnd",value:function(){window.setTimeout(this._updateMarkers.bind(this),0)}},{key:"visible",value:function(){return!!this.shown}},{key:"isHidden",value:function(){return!this.shown}},{key:"show",value:function(){this.shown=!0,this.refresh()}},{key:"hide",value:function(){this.shown=!1,this.refresh()}},{key:"toggle",value:function(){this.shown=!this.shown,this.refresh()}},{key:"refresh",value:function(){this.shownMarkers>0&&this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.show&&this._processAll(this._shownBounds,this._addOverlay.bind(this)),this._notifyListeners()}},{key:"_updateMarkers",value:function(){this._mapZoom=this._map.getZoom();var t=this._getMapGridBounds();t.equals(this._shownBounds)&&t.z===this._shownBounds.z||(t.z!==this._shownBounds.z?(this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.show&&this._processAll(t,this._addOverlay.bind(this))):(this._rectangleDiff(this._shownBounds,t,this._removeCellMarkers.bind(this)),this.show&&this._rectangleDiff(t,this._shownBounds,this._addCellMarkers.bind(this))),this._shownBounds=t,this._notifyListeners())}},{key:"_notifyListeners",value:function(){google.maps.event.trigger(this,"changed",this._shownBounds,this.shownMarkers)}},{key:"_processAll",value:function(t,e){for(var n=t.minX;n<=t.maxX;n++)for(var r=t.minY;r<=t.maxY;r++)this._processCellMarkers(n,r,t.z,e)}},{key:"_processCellMarkers",value:function(t,e,n,r){var i=this._getGridCellNoCreate(t,e,n);if(i)for(var o=i.length-1;o>=0;o--)r(i[o])}},{key:"_removeCellMarkers",value:function(t,e,n){this._processCellMarkers(t,e,n,this._removeOverlay.bind(this))}},{key:"_addCellMarkers",value:function(t,e,n){this._processCellMarkers(t,e,n,this._addOverlay.bind(this))}},{key:"_rectangleDiff",value:function(t,e,n){this._rectangleDiffCoords(t,e,(function(e,r){n(e,r,t.z)}))}},{key:"_rectangleDiffCoords",value:function(t,e,n){var r,i,o=t.minX,s=t.minY,a=t.maxX,u=t.maxY,h=e.minX,l=e.minY,c=e.maxX,f=e.maxY;for(r=o;r<=a;r++){for(i=s;i<=u&&i=o;r--)n(r,i);for(r=Math.max(o,c+1);r<=a;r++)n(r,i)}}},{key:"_removeMarkerFromCell",value:function(t,e){for(var n=0,r=0;r=74)&&(s=S.match(/Chrome\/(\d+)/))&&(a=s[1]);var z=a&&+a,B=!!Object.getOwnPropertySymbols&&!l((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&z&&z<41})),E=B&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,G=E?function(t){return"symbol"==typeof t}:function(t){var e=O("Symbol");return M(e)&&Object(t)instanceof e},Z=function(t){if(M(t))return t;throw TypeError(function(t){try{return String(t)}catch(t){return"Object"}}(t)+" is not a function")},A=function(t,e){try{Object.defineProperty(h,t,{value:e,configurable:!0,writable:!0})}catch(n){h[t]=e}return e},L="__core-js_shared__",X=h[L]||A(L,{}),Y=o((function(t){(t.exports=function(t,e){return X[t]||(X[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),F=function(t){return Object(b(t))},N={}.hasOwnProperty,I=Object.hasOwn||function(t,e){return N.call(F(t),e)},D=0,W=Math.random(),V=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++D+W).toString(36)},R=Y("wks"),q=h.Symbol,U=E?q:q&&q.withoutSetter||V,H=function(t){return I(R,t)&&(B||"string"==typeof R[t])||(B&&I(q,t)?R[t]=q[t]:R[t]=U("Symbol."+t)),R[t]},K=H("toPrimitive"),$=function(t,e){if(!k(t)||G(t))return t;var n,r,i=null==(n=t[K])?void 0:Z(n);if(i){if(void 0===e&&(e="default"),r=i.call(t,e),!k(r)||G(r))return r;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&M(n=t.toString)&&!k(r=n.call(t)))return r;if(M(n=t.valueOf)&&!k(r=n.call(t)))return r;if("string"!==e&&M(n=t.toString)&&!k(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}(t,e)},J=function(t){var e=$(t,"string");return G(e)?e:String(e)},Q=h.document,tt=k(Q)&&k(Q.createElement),et=!c&&!l((function(){return 7!=Object.defineProperty((t="div",tt?Q.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),nt=Object.getOwnPropertyDescriptor,rt={f:c?nt:function(t,e){if(t=w(t),e=J(e),et)try{return nt(t,e)}catch(t){}if(I(t,e))return m(!d.f.call(t,e),t[e])}},it=function(t){if(k(t))return t;throw TypeError(String(t)+" is not an object")},ot=Object.defineProperty,st={f:c?ot:function(t,e,n){if(it(t),e=J(e),it(n),et)try{return ot(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},at=c?function(t,e,n){return st.f(t,e,m(1,n))}:function(t,e,n){return t[e]=n,t},ut=Function.toString;M(X.inspectSource)||(X.inspectSource=function(t){return ut.call(t)});var ht,lt,ct,ft,gt=X.inspectSource,dt=h.WeakMap,mt=M(dt)&&/native code/.test(gt(dt)),vt=Y("keys"),pt={},_t="Object already initialized",yt=h.WeakMap;if(mt||X.state){var bt=X.state||(X.state=new yt),wt=bt.get,Mt=bt.has,kt=bt.set;ht=function(t,e){if(Mt.call(bt,t))throw new TypeError(_t);return e.facade=t,kt.call(bt,t,e),e},lt=function(t){return wt.call(bt,t)||{}},ct=function(t){return Mt.call(bt,t)}}else{var xt=vt[ft="state"]||(vt[ft]=V(ft));pt[xt]=!0,ht=function(t,e){if(I(t,xt))throw new TypeError(_t);return e.facade=t,at(t,xt,e),e},lt=function(t){return I(t,xt)?t[xt]:{}},ct=function(t){return I(t,xt)}}var Ot={set:ht,get:lt,has:ct,enforce:function(t){return ct(t)?lt(t):ht(t,{})},getterFor:function(t){return function(e){var n;if(!k(e)||(n=lt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},St=Function.prototype,Pt=c&&Object.getOwnPropertyDescriptor,Ct=I(St,"name"),jt={EXISTS:Ct,PROPER:Ct&&"something"===function(){}.name,CONFIGURABLE:Ct&&(!c||c&&Pt(St,"name").configurable)},Tt=o((function(t){var e=jt.CONFIGURABLE,n=Ot.get,r=Ot.enforce,i=String(String).split("String");(t.exports=function(t,n,o,s){var a,u=!!s&&!!s.unsafe,l=!!s&&!!s.enumerable,c=!!s&&!!s.noTargetGet,f=s&&void 0!==s.name?s.name:n;M(o)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!I(o,"name")||e&&o.name!==f)&&at(o,"name",f),(a=r(o)).source||(a.source=i.join("string"==typeof f?f:""))),t!==h?(u?!c&&t[n]&&(l=!0):delete t[n],l?t[n]=o:at(t,n,o)):l?t[n]=o:A(n,o)})(Function.prototype,"toString",(function(){return M(this)&&n(this).source||gt(this)}))})),zt=Math.ceil,Bt=Math.floor,Et=function(t){var e=+t;return e!=e||0===e?0:(e>0?Bt:zt)(e)},Gt=Math.max,Zt=Math.min,At=function(t,e){var n=Et(t);return n<0?Gt(n+e,0):Zt(n,e)},Lt=Math.min,Xt=function(t){return(e=t.length)>0?Lt(Et(e),9007199254740991):0;var e},Yt=function(t){return function(e,n,r){var i,o=w(e),s=Xt(o),a=At(r,s);if(t&&n!=n){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===n)return t||a||0;return!t&&-1}},Ft={includes:Yt(!0),indexOf:Yt(!1)}.indexOf,Nt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),It={f:Object.getOwnPropertyNames||function(t){return function(t,e){var n,r=w(t),i=0,o=[];for(n in r)!I(pt,n)&&I(r,n)&&o.push(n);for(;e.length>i;)I(r,n=e[i++])&&(~Ft(o,n)||o.push(n));return o}(t,Nt)}},Dt={f:Object.getOwnPropertySymbols},Wt=O("Reflect","ownKeys")||function(t){var e=It.f(it(t)),n=Dt.f;return n?e.concat(n(t)):e},Vt=function(t,e){for(var n=Wt(e),r=st.f,i=rt.f,o=0;o=51||!l((function(){var t=[];return(t.constructor={})[pe]=function(){return{foo:1}},1!==t[ne](Boolean).foo}))),ye=Math.max,be=Math.min,we=9007199254740991,Me="Maximum allowed length exceeded";function ke(t,e){return new google.maps.Point(~~(.5+(i=t.lng(),(1+i/180)*(2<we)throw TypeError(Me);for(i=me(u,r),o=0;oh-r+n;o--)delete u[o-1]}else if(n>r)for(o=h-r;o>l;o--)a=o+n-1,(s=o+r-1)in u?u[a]=u[s]:delete u[a];for(o=0;o=t.x&&this.minY<=t.y&&this.maxY>=t.y}}]),t}(),Oe=function(){function t(n,r){var i=this,o=r.maxZoom,s=void 0===o?19:o,a=r.trackMarkers,u=r.shown,h=void 0===u||u,l=r.borderPadding,c=void 0===l?100:l;e(this,t),this._tileSize=1024,this._map=n,this._mapZoom=n.getZoom(),this._maxZoom=s,this._trackMarkers=a,this._swPadding=new google.maps.Size(-c,c),this._nePadding=new google.maps.Size(c,-c),this._gridWidth={},this._grid=[],this._grid[this._maxZoom]=[],this._numMarkers={},this._numMarkers[this._maxZoom]=0,this.shownMarkers=0,this.shown=h,google.maps.event.addListenerOnce(n,"idle",(function(){i._initialize()}))}return r(t,[{key:"_initialize",value:function(){var t=this._map.mapTypes;for(var e in t)e in t&&t.get(e)&&"number"===t.get(e).maxZoom&&this._map.mapTypes.get(e).maxZoom;google.maps.event.addListener(this._map,"dragend",this._onMapMoveEnd.bind(this)),google.maps.event.addListener(this._map,"idle",this._onMapMoveEnd.bind(this)),google.maps.event.addListener(this._map,"zoom_changed",this._onMapMoveEnd.bind(this)),this.resetManager(),this._shownBounds=this._getMapGridBounds(),google.maps.event.trigger(this,"loaded")}},{key:"_removeOverlay",value:function(t){t.setMap(null),this.shownMarkers--}},{key:"_addOverlay",value:function(t){this.shown&&(t.setMap(this._map),this.shownMarkers++)}},{key:"resetManager",value:function(){for(var t=256,e=0;e<=this._maxZoom;++e)this._grid[e]=[],this._numMarkers[e]=0,this._gridWidth[e]=Math.ceil(t/this._tileSize),t<<=1}},{key:"clearMarkers",value:function(){this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.resetManager()}},{key:"_getTilePoint",value:function(t,e,n){var r=ke(t,e);return new google.maps.Point(Math.floor((r.x+n.width)/this._tileSize),Math.floor((r.y+n.height)/this._tileSize))}},{key:"_addMarkerBatch",value:function(t,e,n){var r=this,i=t.getPosition();t.set("__minZoom",e),this._trackMarkers&&google.maps.event.addListener(t,"changed",(function(t,e,n){r._onMarkerMoved(t,e,n)}));for(var o=this._getTilePoint(i,n,new google.maps.Size(0,0)),s=n;s>=e;s--){this._getGridCellCreate(o.x,o.y,s).push(t),o.x=o.x>>1,o.y=o.y>>1}}},{key:"_isGridPointVisible",value:function(t){var e=this._shownBounds.minY<=t.y&&t.y<=this._shownBounds.maxY,n=this._shownBounds.minX,r=n<=t.x&&t.x<=this._shownBounds.maxX;if(!r&&n<0){var i=this._gridWidth[this._shownBounds.z];r=n+i<=t.x&&t.x<=i-1}return e&&r}},{key:"_onMarkerMoved",value:function(t,e,n){for(var r=this._maxZoom,i=!1,o=this._getTilePoint(e,r,new google.maps.Size(0,0)),s=this._getTilePoint(n,r,new google.maps.Size(0,0));r>=0&&(o.x!==s.x||o.y!==s.y);){var a=this._getGridCellNoCreate(o.x,o.y,r);a&&this._removeMarkerFromCell(a,t)&&this._getGridCellCreate(s.x,s.y,r).push(t),r===this._mapZoom&&(this._isGridPointVisible(o)?this._isGridPointVisible(s)||(this._removeOverlay(t),i=!0):this._isGridPointVisible(s)&&(this._addOverlay(t),i=!0)),o.x=o.x>>1,o.y=o.y>>1,s.x=s.x>>1,s.y=s.y>>1,--r}i&&this._notifyListeners()}},{key:"removeMarker",value:function(t){for(var e=this._maxZoom,n=!1,r=t.getPosition(),i=this._getTilePoint(r,e,new google.maps.Size(0,0));e>=0;){var o=this._getGridCellNoCreate(i.x,i.y,e);o&&this._removeMarkerFromCell(o,t),e===this._mapZoom&&this._isGridPointVisible(i)&&(this._removeOverlay(t),n=!0),i.x=i.x>>1,i.y=i.y>>1,--e}n&&this._notifyListeners(),this._numMarkers[t.get("__minZoom")]--}},{key:"addMarkers",value:function(t,e,n){n=this._getOptmaxZoom(n);for(var r=t.length-1;r>=0;r--)this._addMarkerBatch(t[r],e,n);this._numMarkers[e]+=t.length}},{key:"_getOptmaxZoom",value:function(t){return t||this._maxZoom}},{key:"getMarkerCount",value:function(t){for(var e=0,n=0;n<=t;n++)e+=this._numMarkers[n];return e}},{key:"getMarker",value:function(t,e,n){var r=new google.maps.LatLng(t,e),i=this._getTilePoint(r,n,new google.maps.Size(0,0)),o=new google.maps.Marker({position:r}),s=this._getGridCellNoCreate(i.x,i.y,n);if(void 0!==s)for(var a=0;a=u&&(s.x=0,a.x=u-1);var h=new xe([s,a],e);return h.z=e,h}},{key:"_getMapGridBounds",value:function(){return this._getGridBounds(this._map.getBounds(),this._mapZoom,this._swPadding,this._nePadding)}},{key:"_onMapMoveEnd",value:function(){window.setTimeout(this._updateMarkers.bind(this),0)}},{key:"visible",value:function(){return!!this.shown}},{key:"isHidden",value:function(){return!this.shown}},{key:"show",value:function(){this.shown=!0,this.refresh()}},{key:"hide",value:function(){this.shown=!1,this.refresh()}},{key:"toggle",value:function(){this.shown=!this.shown,this.refresh()}},{key:"refresh",value:function(){this.shownMarkers>0&&this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.show&&this._processAll(this._shownBounds,this._addOverlay.bind(this)),this._notifyListeners()}},{key:"_updateMarkers",value:function(){this._mapZoom=this._map.getZoom();var t=this._getMapGridBounds();t.equals(this._shownBounds)&&t.z===this._shownBounds.z||(t.z!==this._shownBounds.z?(this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.show&&this._processAll(t,this._addOverlay.bind(this))):(this._rectangleDiff(this._shownBounds,t,this._removeCellMarkers.bind(this)),this.show&&this._rectangleDiff(t,this._shownBounds,this._addCellMarkers.bind(this))),this._shownBounds=t,this._notifyListeners())}},{key:"_notifyListeners",value:function(){google.maps.event.trigger(this,"changed",this._shownBounds,this.shownMarkers)}},{key:"_processAll",value:function(t,e){for(var n=t.minX;n<=t.maxX;n++)for(var r=t.minY;r<=t.maxY;r++)this._processCellMarkers(n,r,t.z,e)}},{key:"_processCellMarkers",value:function(t,e,n,r){var i=this._getGridCellNoCreate(t,e,n);if(i)for(var o=i.length-1;o>=0;o--)r(i[o])}},{key:"_removeCellMarkers",value:function(t,e,n){this._processCellMarkers(t,e,n,this._removeOverlay.bind(this))}},{key:"_addCellMarkers",value:function(t,e,n){this._processCellMarkers(t,e,n,this._addOverlay.bind(this))}},{key:"_rectangleDiff",value:function(t,e,n){this._rectangleDiffCoords(t,e,(function(e,r){n(e,r,t.z)}))}},{key:"_rectangleDiffCoords",value:function(t,e,n){var r,i,o=t.minX,s=t.minY,a=t.maxX,u=t.maxY,h=e.minX,l=e.minY,c=e.maxX,f=e.maxY;for(r=o;r<=a;r++){for(i=s;i<=u&&i=o;r--)n(r,i);for(r=Math.max(o,c+1);r<=a;r++)n(r,i)}}},{key:"_removeMarkerFromCell",value:function(t,e){for(var n=0,r=0;r0&&s[0]<4?1:+(s[0]+s[1])),!a&&L&&(!(s=L.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=L.match(/Chrome\/(\d+)/))&&(a=+s[1]);var I=a,D=!!Object.getOwnPropertySymbols&&!l((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&I&&I<41})),W=D&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,V=h.Object,R=W?function(t){return"symbol"==typeof t}:function(t){var e=Z("Symbol");return B(e)&&A(e.prototype,V(t))},q=h.String,U=h.TypeError,H=function(t){if(B(t))return t;throw U(function(t){try{return q(t)}catch(t){return"Object"}}(t)+" is not a function")},K=h.TypeError,$=Object.defineProperty,J=function(t,e){try{$(h,t,{value:e,configurable:!0,writable:!0})}catch(n){h[t]=e}return e},Q="__core-js_shared__",tt=h[Q]||J(Q,{}),et=o((function(t){(t.exports=function(t,e){return tt[t]||(tt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.0",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),nt=h.Object,rt=function(t){return nt(T(t))},it=M({}.hasOwnProperty),ot=Object.hasOwn||function(t,e){return it(rt(t),e)},st=0,at=Math.random(),ut=M(1..toString),ht=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ut(++st+at,36)},lt=et("wks"),ct=h.Symbol,ft=ct&&ct.for,dt=W?ct:ct&&ct.withoutSetter||ht,gt=function(t){if(!ot(lt,t)||!D&&"string"!=typeof lt[t]){var e="Symbol."+t;D&&ot(ct,t)?lt[t]=ct[t]:lt[t]=W&&ft?ft(e):dt(e)}return lt[t]},mt=h.TypeError,pt=gt("toPrimitive"),vt=function(t,e){if(!E(t)||R(t))return t;var n,r,i=null==(n=t[pt])?void 0:H(n);if(i){if(void 0===e&&(e="default"),r=d(i,t,e),!E(r)||R(r))return r;throw mt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&B(n=t.toString)&&!E(r=d(n,t)))return r;if(B(n=t.valueOf)&&!E(r=d(n,t)))return r;if("string"!==e&&B(n=t.toString)&&!E(r=d(n,t)))return r;throw K("Can't convert object to primitive value")}(t,e)},yt=function(t){var e=vt(t,"string");return R(e)?e:e+""},_t=h.document,bt=E(_t)&&E(_t.createElement),wt=!c&&!l((function(){return 7!=Object.defineProperty((t="div",bt?_t.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),Mt=Object.getOwnPropertyDescriptor,kt={f:c?Mt:function(t,e){if(t=z(t),e=yt(e),wt)try{return Mt(t,e)}catch(t){}if(ot(t,e))return v(!d(p.f,t,e),t[e])}},xt=h.String,Ot=h.TypeError,St=function(t){if(E(t))return t;throw Ot(xt(t)+" is not an object")},Pt=h.TypeError,Ct=Object.defineProperty,jt={f:c?Ct:function(t,e,n){if(St(t),e=yt(e),St(n),wt)try{return Ct(t,e,n)}catch(t){}if("get"in n||"set"in n)throw Pt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Tt=c?function(t,e,n){return jt.f(t,e,v(1,n))}:function(t,e,n){return t[e]=n,t},zt=M(Function.toString);B(tt.inspectSource)||(tt.inspectSource=function(t){return zt(t)});var Bt,Et,Gt,Zt,At=tt.inspectSource,Lt=h.WeakMap,Xt=B(Lt)&&/native code/.test(At(Lt)),Yt=et("keys"),Ft={},Nt="Object already initialized",It=h.TypeError,Dt=h.WeakMap;if(Xt||tt.state){var Wt=tt.state||(tt.state=new Dt),Vt=M(Wt.get),Rt=M(Wt.has),qt=M(Wt.set);Bt=function(t,e){if(Rt(Wt,t))throw new It(Nt);return e.facade=t,qt(Wt,t,e),e},Et=function(t){return Vt(Wt,t)||{}},Gt=function(t){return Rt(Wt,t)}}else{var Ut=Yt[Zt="state"]||(Yt[Zt]=ht(Zt));Ft[Ut]=!0,Bt=function(t,e){if(ot(t,Ut))throw new It(Nt);return e.facade=t,Tt(t,Ut,e),e},Et=function(t){return ot(t,Ut)?t[Ut]:{}},Gt=function(t){return ot(t,Ut)}}var Ht={set:Bt,get:Et,has:Gt,enforce:function(t){return Gt(t)?Et(t):Bt(t,{})},getterFor:function(t){return function(e){var n;if(!E(e)||(n=Et(e)).type!==t)throw It("Incompatible receiver, "+t+" required");return n}}},Kt=Function.prototype,$t=c&&Object.getOwnPropertyDescriptor,Jt=ot(Kt,"name"),Qt={EXISTS:Jt,PROPER:Jt&&"something"===function(){}.name,CONFIGURABLE:Jt&&(!c||c&&$t(Kt,"name").configurable)},te=o((function(t){var e=Qt.CONFIGURABLE,n=Ht.get,r=Ht.enforce,i=String(String).split("String");(t.exports=function(t,n,o,s){var a,u=!!s&&!!s.unsafe,l=!!s&&!!s.enumerable,c=!!s&&!!s.noTargetGet,f=s&&void 0!==s.name?s.name:n;B(o)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!ot(o,"name")||e&&o.name!==f)&&Tt(o,"name",f),(a=r(o)).source||(a.source=i.join("string"==typeof f?f:""))),t!==h?(u?!c&&t[n]&&(l=!0):delete t[n],l?t[n]=o:Tt(t,n,o)):l?t[n]=o:J(n,o)})(Function.prototype,"toString",(function(){return B(this)&&n(this).source||At(this)}))})),ee=Math.ceil,ne=Math.floor,re=function(t){var e=+t;return e!=e||0===e?0:(e>0?ne:ee)(e)},ie=Math.max,oe=Math.min,se=function(t,e){var n=re(t);return n<0?ie(n+e,0):oe(n,e)},ae=Math.min,ue=function(t){return(e=t.length)>0?ae(re(e),9007199254740991):0;var e},he=function(t){return function(e,n,r){var i,o=z(e),s=ue(o),a=se(r,s);if(t&&n!=n){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===n)return t||a||0;return!t&&-1}},le={includes:he(!0),indexOf:he(!1)}.indexOf,ce=M([].push),fe=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),de={f:Object.getOwnPropertyNames||function(t){return function(t,e){var n,r=z(t),i=0,o=[];for(n in r)!ot(Ft,n)&&ot(r,n)&&ce(o,n);for(;e.length>i;)ot(r,n=e[i++])&&(~le(o,n)||ce(o,n));return o}(t,fe)}},ge={f:Object.getOwnPropertySymbols},me=M([].concat),pe=Z("Reflect","ownKeys")||function(t){var e=de.f(St(t)),n=ge.f;return n?me(e,n(t)):e},ve=function(t,e){for(var n=pe(e),r=jt.f,i=kt.f,o=0;o=51||!l((function(){var t=[];return(t.constructor={})[Re]=function(){return{foo:1}},1!==t[Ce](Boolean).foo}))),Ue=h.TypeError,He=Math.max,Ke=Math.min,$e=9007199254740991,Je="Maximum allowed length exceeded";function Qe(t,e){return new google.maps.Point(~~(.5+(i=t.lng(),(1+i/180)*(2<$e)throw Ue(Je);for(i=We(u,r),o=0;oh-r+n;o--)delete u[o-1]}else if(n>r)for(o=h-r;o>l;o--)a=o+n-1,(s=o+r-1)in u?u[a]=u[s]:delete u[a];for(o=0;o=t.x&&this.minY<=t.y&&this.maxY>=t.y}}]),t}(),en=function(){function t(n,r){var i=this,o=r.maxZoom,s=void 0===o?19:o,a=r.trackMarkers,u=r.shown,h=void 0===u||u,l=r.borderPadding,c=void 0===l?100:l;e(this,t),this._tileSize=1024,this._map=n,this._mapZoom=n.getZoom(),this._maxZoom=s,this._trackMarkers=a,this._swPadding=new google.maps.Size(-c,c),this._nePadding=new google.maps.Size(c,-c),this._gridWidth={},this._grid=[],this._grid[this._maxZoom]=[],this._numMarkers={},this._numMarkers[this._maxZoom]=0,this.shownMarkers=0,this.shown=h,google.maps.event.addListenerOnce(n,"idle",(function(){i._initialize()}))}return r(t,[{key:"_initialize",value:function(){var t=this._map.mapTypes;for(var e in t)e in t&&t.get(e)&&"number"===t.get(e).maxZoom&&this._map.mapTypes.get(e).maxZoom;google.maps.event.addListener(this._map,"dragend",this._onMapMoveEnd.bind(this)),google.maps.event.addListener(this._map,"idle",this._onMapMoveEnd.bind(this)),google.maps.event.addListener(this._map,"zoom_changed",this._onMapMoveEnd.bind(this)),this.resetManager(),this._shownBounds=this._getMapGridBounds(),google.maps.event.trigger(this,"loaded")}},{key:"_removeOverlay",value:function(t){t.setMap(null),this.shownMarkers--}},{key:"_addOverlay",value:function(t){this.shown&&(t.setMap(this._map),this.shownMarkers++)}},{key:"resetManager",value:function(){for(var t=256,e=0;e<=this._maxZoom;++e)this._grid[e]=[],this._numMarkers[e]=0,this._gridWidth[e]=Math.ceil(t/this._tileSize),t<<=1}},{key:"clearMarkers",value:function(){this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.resetManager()}},{key:"_getTilePoint",value:function(t,e,n){var r=Qe(t,e);return new google.maps.Point(Math.floor((r.x+n.width)/this._tileSize),Math.floor((r.y+n.height)/this._tileSize))}},{key:"_addMarkerBatch",value:function(t,e,n){var r=this,i=t.getPosition();t.set("__minZoom",e),this._trackMarkers&&google.maps.event.addListener(t,"changed",(function(t,e,n){r._onMarkerMoved(t,e,n)}));for(var o=this._getTilePoint(i,n,new google.maps.Size(0,0)),s=n;s>=e;s--){this._getGridCellCreate(o.x,o.y,s).push(t),o.x=o.x>>1,o.y=o.y>>1}}},{key:"_isGridPointVisible",value:function(t){var e=this._shownBounds.minY<=t.y&&t.y<=this._shownBounds.maxY,n=this._shownBounds.minX,r=n<=t.x&&t.x<=this._shownBounds.maxX;if(!r&&n<0){var i=this._gridWidth[this._shownBounds.z];r=n+i<=t.x&&t.x<=i-1}return e&&r}},{key:"_onMarkerMoved",value:function(t,e,n){for(var r=this._maxZoom,i=!1,o=this._getTilePoint(e,r,new google.maps.Size(0,0)),s=this._getTilePoint(n,r,new google.maps.Size(0,0));r>=0&&(o.x!==s.x||o.y!==s.y);){var a=this._getGridCellNoCreate(o.x,o.y,r);a&&this._removeMarkerFromCell(a,t)&&this._getGridCellCreate(s.x,s.y,r).push(t),r===this._mapZoom&&(this._isGridPointVisible(o)?this._isGridPointVisible(s)||(this._removeOverlay(t),i=!0):this._isGridPointVisible(s)&&(this._addOverlay(t),i=!0)),o.x=o.x>>1,o.y=o.y>>1,s.x=s.x>>1,s.y=s.y>>1,--r}i&&this._notifyListeners()}},{key:"removeMarker",value:function(t){for(var e=this._maxZoom,n=!1,r=t.getPosition(),i=this._getTilePoint(r,e,new google.maps.Size(0,0));e>=0;){var o=this._getGridCellNoCreate(i.x,i.y,e);o&&this._removeMarkerFromCell(o,t),e===this._mapZoom&&this._isGridPointVisible(i)&&(this._removeOverlay(t),n=!0),i.x=i.x>>1,i.y=i.y>>1,--e}n&&this._notifyListeners(),this._numMarkers[t.get("__minZoom")]--}},{key:"addMarkers",value:function(t,e,n){n=this._getOptmaxZoom(n);for(var r=t.length-1;r>=0;r--)this._addMarkerBatch(t[r],e,n);this._numMarkers[e]+=t.length}},{key:"_getOptmaxZoom",value:function(t){return t||this._maxZoom}},{key:"getMarkerCount",value:function(t){for(var e=0,n=0;n<=t;n++)e+=this._numMarkers[n];return e}},{key:"getMarker",value:function(t,e,n){var r=new google.maps.LatLng(t,e),i=this._getTilePoint(r,n,new google.maps.Size(0,0)),o=new google.maps.Marker({position:r}),s=this._getGridCellNoCreate(i.x,i.y,n);if(void 0!==s)for(var a=0;a=u&&(s.x=0,a.x=u-1);var h=new tn([s,a],e);return h.z=e,h}},{key:"_getMapGridBounds",value:function(){return this._getGridBounds(this._map.getBounds(),this._mapZoom,this._swPadding,this._nePadding)}},{key:"_onMapMoveEnd",value:function(){window.setTimeout(this._updateMarkers.bind(this),0)}},{key:"visible",value:function(){return!!this.shown}},{key:"isHidden",value:function(){return!this.shown}},{key:"show",value:function(){this.shown=!0,this.refresh()}},{key:"hide",value:function(){this.shown=!1,this.refresh()}},{key:"toggle",value:function(){this.shown=!this.shown,this.refresh()}},{key:"refresh",value:function(){this.shownMarkers>0&&this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.show&&this._processAll(this._shownBounds,this._addOverlay.bind(this)),this._notifyListeners()}},{key:"_updateMarkers",value:function(){this._mapZoom=this._map.getZoom();var t=this._getMapGridBounds();t.equals(this._shownBounds)&&t.z===this._shownBounds.z||(t.z!==this._shownBounds.z?(this._processAll(this._shownBounds,this._removeOverlay.bind(this)),this.show&&this._processAll(t,this._addOverlay.bind(this))):(this._rectangleDiff(this._shownBounds,t,this._removeCellMarkers.bind(this)),this.show&&this._rectangleDiff(t,this._shownBounds,this._addCellMarkers.bind(this))),this._shownBounds=t,this._notifyListeners())}},{key:"_notifyListeners",value:function(){google.maps.event.trigger(this,"changed",this._shownBounds,this.shownMarkers)}},{key:"_processAll",value:function(t,e){for(var n=t.minX;n<=t.maxX;n++)for(var r=t.minY;r<=t.maxY;r++)this._processCellMarkers(n,r,t.z,e)}},{key:"_processCellMarkers",value:function(t,e,n,r){var i=this._getGridCellNoCreate(t,e,n);if(i)for(var o=i.length-1;o>=0;o--)r(i[o])}},{key:"_removeCellMarkers",value:function(t,e,n){this._processCellMarkers(t,e,n,this._removeOverlay.bind(this))}},{key:"_addCellMarkers",value:function(t,e,n){this._processCellMarkers(t,e,n,this._addOverlay.bind(this))}},{key:"_rectangleDiff",value:function(t,e,n){this._rectangleDiffCoords(t,e,(function(e,r){n(e,r,t.z)}))}},{key:"_rectangleDiffCoords",value:function(t,e,n){var r,i,o=t.minX,s=t.minY,a=t.maxX,u=t.maxY,h=e.minX,l=e.minY,c=e.maxX,f=e.maxY;for(r=o;r<=a;r++){for(i=s;i<=u&&i=o;r--)n(r,i);for(r=Math.max(o,c+1);r<=a;r++)n(r,i)}}},{key:"_removeMarkerFromCell",value:function(t,e){for(var n=0,r=0;r