1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[602],{40602:(t,e,r)=>{r.r(e),r.d(e,{AbstractAlgorithm:()=>tr,AbstractViewportAlgorithm:()=>ts,Cluster:()=>K,ClusterStats:()=>tu,DefaultRenderer:()=>th,GridAlgorithm:()=>ta,MarkerClusterer:()=>tm,MarkerClustererEvents:()=>s,MarkerUtils:()=>G,NoopAlgorithm:()=>tn,SuperClusterAlgorithm:()=>to,SuperClusterViewportAlgorithm:()=>tl,defaultOnClusterClickHandler:()=>tp,distanceBetweenPoints:()=>H,extendBoundsToPaddedViewport:()=>X,extendPixelBounds:()=>tt,filterMarkersToPaddedViewport:()=>J,getPaddedViewport:()=>Y,noop:()=>ti,pixelBoundsToLatLngBounds:()=>te});var s,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty;function o(t,e){return function(r,s,i){return t(r,s,i)&&e(r,s,i)}}function l(t){return function(e,r,s){if(!e||!r||"object"!=typeof e||"object"!=typeof r)return t(e,r,s);var i=s.cache,a=i.get(e),n=i.get(r);if(a&&n)return a===r&&n===e;i.set(e,r),i.set(r,e);var o=t(e,r,s);return i.delete(e),i.delete(r),o}}function u(t){return i(t).concat(a(t))}var h=Object.hasOwn||function(t,e){return n.call(t,e)};function c(t,e){return t===e||!t&&!e&&t!=t&&e!=e}var p=Object.getOwnPropertyDescriptor,m=Object.keys;function f(t,e,r){var s=t.length;if(e.length!==s)return!1;for(;s-- >0;)if(!r.equals(t[s],e[s],s,s,t,e,r))return!1;return!0}function d(t,e){return c(t.getTime(),e.getTime())}function g(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function y(t,e){return t===e}function v(t,e,r){var s,i,a=t.size;if(a!==e.size)return!1;if(!a)return!0;for(var n=Array(a),o=t.entries(),l=0;(s=o.next())&&!s.done;){for(var u=e.entries(),h=!1,c=0;(i=u.next())&&!i.done;){if(n[c]){c++;continue}var p=s.value,m=i.value;if(r.equals(p[0],m[0],l,c,t,e,r)&&r.equals(p[1],m[1],p[0],m[0],t,e,r)){h=n[c]=!0;break}c++}if(!h)return!1;l++}return!0}function k(t,e,r){var s=m(t),i=s.length;if(m(e).length!==i)return!1;for(;i-- >0;)if(!A(t,e,r,s[i]))return!1;return!0}function w(t,e,r){var s,i,a,n=u(t),o=n.length;if(u(e).length!==o)return!1;for(;o-- >0;)if(!A(t,e,r,s=n[o])||(i=p(t,s),a=p(e,s),(i||a)&&(!i||!a||i.configurable!==a.configurable||i.enumerable!==a.enumerable||i.writable!==a.writable)))return!1;return!0}function M(t,e){return c(t.valueOf(),e.valueOf())}function E(t,e){return t.source===e.source&&t.flags===e.flags}function b(t,e,r){var s,i,a=t.size;if(a!==e.size)return!1;if(!a)return!0;for(var n=Array(a),o=t.values();(s=o.next())&&!s.done;){for(var l=e.values(),u=!1,h=0;(i=l.next())&&!i.done;){if(!n[h]&&r.equals(s.value,i.value,s.value,i.value,t,e,r)){u=n[h]=!0;break}h++}if(!u)return!1}return!0}function x(t,e){var r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function C(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function A(t,e,r,s){return("_owner"===s||"__o"===s||"__v"===s)&&(!!t.$$typeof||!!e.$$typeof)||h(e,s)&&r.equals(t[s],e[s],s,s,t,e,r)}var _=Array.isArray,P="undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView:null,L=Object.assign,O=Object.prototype.toString.call.bind(Object.prototype.toString),S=q();function q(t){void 0===t&&(t={});var e,r,s,i,a,n,u,h,p,m,A,S,q,j,T=t.circular,I=t.createInternalComparator,Z=t.createState,N=t.strict,U=(r=(e=function(t){var e=t.circular,r=t.createCustomConfig,s=t.strict,i={areArraysEqual:s?w:f,areDatesEqual:d,areErrorsEqual:g,areFunctionsEqual:y,areMapsEqual:s?o(v,w):v,areNumbersEqual:c,areObjectsEqual:s?w:k,arePrimitiveWrappersEqual:M,areRegExpsEqual:E,areSetsEqual:s?o(b,w):b,areTypedArraysEqual:s?w:x,areUrlsEqual:C,unknownTagComparators:void 0};if(r&&(i=L({},i,r(i))),e){var a=l(i.areArraysEqual),n=l(i.areMapsEqual),u=l(i.areObjectsEqual),h=l(i.areSetsEqual);i=L({},i,{areArraysEqual:a,areMapsEqual:n,areObjectsEqual:u,areSetsEqual:h})}return i}(t)).areArraysEqual,s=e.areDatesEqual,i=e.areErrorsEqual,a=e.areFunctionsEqual,n=e.areMapsEqual,u=e.areNumbersEqual,h=e.areObjectsEqual,p=e.arePrimitiveWrappersEqual,m=e.areRegExpsEqual,A=e.areSetsEqual,S=e.areTypedArraysEqual,q=e.areUrlsEqual,j=e.unknownTagComparators,function(t,e,o){
1if(t===e)return!0;if(null==t||null==e)return!1;var l=typeof t;if(l!==typeof e)return!1;if("object"!==l)return"number"===l?u(t,e,o):"function"===l&&a(t,e,o);var c=t.constructor;if(c!==e.constructor)return!1;if(c===Object)return h(t,e,o);if(_(t))return r(t,e,o);if(null!=P&&P(t))return S(t,e,o);if(c===Date)return s(t,e,o);if(c===RegExp)return m(t,e,o);if(c===Map)return n(t,e,o);if(c===Set)return A(t,e,o);var f=O(t);if("[object Date]"===f)return s(t,e,o);if("[object RegExp]"===f)return m(t,e,o);if("[object Map]"===f)return n(t,e,o);if("[object Set]"===f)return A(t,e,o);if("[object Object]"===f)return"function"!=typeof t.then&&"function"!=typeof e.then&&h(t,e,o);if("[object URL]"===f)return q(t,e,o);if("[object Error]"===f)return i(t,e,o);if("[object Arguments]"===f)return h(t,e,o);if("[object Boolean]"===f||"[object Number]"===f||"[object String]"===f)return p(t,e,o);if(j){var d=j[f];if(!d){var g=null!=t?t[Symbol.toStringTag]:void 0;g&&(d=j[g])}if(d)return d(t,e,o)}return!1}),z=I?I(U):function(t,e,r,s,i,a,n){return U(t,e,n)};return function(t){var e=t.circular,r=t.comparator,s=t.createState,i=t.equals,a=t.strict;if(s)return function(t,n){var o=s(),l=o.cache;return r(t,n,{cache:void 0===l?e?new WeakMap:void 0:l,equals:i,meta:o.meta,strict:a})};if(e)return function(t,e){return r(t,e,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var n={cache:void 0,equals:i,meta:void 0,strict:a};return function(t,e){return r(t,e,n)}}({circular:void 0!==T&&T,comparator:U,createState:Z,equals:z,strict:void 0!==N&&N})}q({strict:!0}),q({circular:!0}),q({circular:!0,strict:!0}),q({createInternalComparator:function(){return c}}),q({strict:!0,createInternalComparator:function(){return c}}),q({circular:!0,createInternalComparator:function(){return c}}),q({circular:!0,createInternalComparator:function(){return c},strict:!0});let j=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class T{static from(t){if(!(t instanceof ArrayBuffer))throw Error("Data must be an instance of ArrayBuffer.");let[e,r]=new Uint8Array(t,0,2);if(219!==e)throw Error("Data does not appear to be in a KDBush format.");let s=r>>4;if(1!==s)throw Error(`Got v${s} data when expected v1.`);let i=j[15&r];if(!i)throw Error("Unrecognized array type.");let[a]=new Uint16Array(t,2,1),[n]=new Uint32Array(t,4,1);return new T(n,a,i,t)}constructor(t,e=64,r=Float64Array,s){if(isNaN(t)||t<0)throw Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let i=j.indexOf(this.ArrayType),a=2*t*this.ArrayType.BYTES_PER_ELEMENT,n=t*this.IndexArrayType.BYTES_PER_ELEMENT,o=(8-n%8)%8;if(i<0)throw Error(`Unexpected typed array class: ${r}.`);s&&s instanceof ArrayBuffer?(this.data=s,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+n+o,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+a+n+o),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+n+o,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+i]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){let r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){let t=this._pos>>1;if(t!==this.numItems)throw Error(`Added ${t} items when expected ${this.numItems}.`);return function t(e,r,s,i,a,n){if(a-i<=s)return;let o=i+a>>1;(function t(e,r,s,i,a,n){for(;a>i;){if(a-i>600){let o=a-i+1,l=s-i+1,u=Math.log(o),h=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*h*(o-h)/o)*(l-o/2<0?-1:1),p=Math.max(i,Math.floor(s-l*h/o+c)),m=Math.min(a,Math.floor(s+(o-l)*h/o+c));t(e,r,s,p,m,n)}let o=r[2*s+n],l=i,u=a;for(I(e,r,i,s),r[2*a+n]>o&&I(e,r,i,a);l<u;){for(I(e,r,l,u),l++,u--;r[2*l+n]<o;)l++;for(;r[2*u+n]>o;)u--}r[2*i+n]===o?I(e,r,i,u):I(e,r,++u,a),u<=s&&(i=u+1),s<=u&&(a=u-1)}})(e,r,o,i,a,n),t(e,r,s,i,o-1,1-n),t(e,r,s,o+1,a,1-n)}(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,s){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:i,coords:a,nodeSize:n}=this,o=[0,i.length-1,0],l=[];for(;o.length;){let u=o.pop()||0,h=o.pop()||0,c=o.pop()||0;if(h-c<=n){for(let n=c;n<=h;n++){let o=a[2*n],u=a[2*n+1];o>=t&&o<=r&&u>=e&&u<=s&&l.push(i[n])}continue}let p=c+h>>1,m=a[2*p],f=a[2*p+1];m>=t&&m<=r&&f>=e&&f<=s&&l.push(i[p]),(0===u?t<=m:e<=f)&&(o.push(c),o.push(p-1),o.push(1-u)),(0===u?r>=m:s>=f)&&(o.push(p+1),o.push(h),o.push(1-u))}return l}within(t,e,r){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:s,coords:i,nodeSize:a}=this,n=[0,s.length-1,0],o=[],l=r*r;for(;n.length;){let u=n.pop()||0,h=n.pop()||0,c=n.pop()||0;if(h-c<=a){for(let r=c;r<=h;r++)N(i[2*r],i[2*r+1],t,e)<=l&&o.push(s[r]);continue}let p=c+h>>
11,m=i[2*p],f=i[2*p+1];N(m,f,t,e)<=l&&o.push(s[p]),(0===u?t-r<=m:e-r<=f)&&(n.push(c),n.push(p-1),n.push(1-u)),(0===u?t+r>=m:e+r>=f)&&(n.push(p+1),n.push(h),n.push(1-u))}return o}}function I(t,e,r,s){Z(t,r,s),Z(e,2*r,2*s),Z(e,2*r+1,2*s+1)}function Z(t,e,r){let s=t[e];t[e]=t[r],t[r]=s}function N(t,e,r,s){let i=t-r,a=e-s;return i*i+a*a}let U={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},z=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1));class B{constructor(t){this.options=Object.assign(Object.create(U),t),this.trees=Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){let{log:e,minZoom:r,maxZoom:s}=this.options;e&&console.time("total time");let i=`prepare ${t.length} points`;e&&console.time(i),this.points=t;let a=[];for(let e=0;e<t.length;e++){let r=t[e];if(!r.geometry)continue;let[s,i]=r.geometry.coordinates,n=z(R(s)),o=z($(i));a.push(n,o,1/0,e,-1,1),this.options.reduce&&a.push(0)}let n=this.trees[s+1]=this._createTree(a);e&&console.timeEnd(i);for(let t=s;t>=r;t--){let r=+Date.now();n=this.trees[t]=this._createTree(this._cluster(n,t)),e&&console.log("z%d: %d clusters in %dms",t,n.numItems,Date.now()-r)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let r=((t[0]+180)%360+360)%360-180,s=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){let t=this.getClusters([r,s,180,a],e),n=this.getClusters([-180,s,i,a],e);return t.concat(n)}let n=this.trees[this._limitZoom(e)],o=n.range(R(r),$(a),R(i),$(s)),l=n.data,u=[];for(let t of o){let e=this.stride*t;u.push(l[e+5]>1?D(l,e,this.clusterProps):this.points[l[e+3]])}return u}getChildren(t){let e=this._getOriginId(t),r=this._getOriginZoom(t),s="No cluster with the specified id.",i=this.trees[r];if(!i)throw Error(s);let a=i.data;if(e*this.stride>=a.length)throw Error(s);let n=this.options.radius/(this.options.extent*Math.pow(2,r-1)),o=a[e*this.stride],l=a[e*this.stride+1],u=i.within(o,l,n),h=[];for(let e of u){let r=e*this.stride;a[r+4]===t&&h.push(a[r+5]>1?D(a,r,this.clusterProps):this.points[a[r+3]])}if(0===h.length)throw Error(s);return h}getLeaves(t,e,r){e=e||10,r=r||0;let s=[];return this._appendLeaves(s,t,e,r,0),s}getTile(t,e,r){let s=this.trees[this._limitZoom(t)],i=Math.pow(2,t),{extent:a,radius:n}=this.options,o=n/a,l=(r-o)/i,u=(r+1+o)/i,h={features:[]};return this._addTileFeatures(s.range((e-o)/i,l,(e+1+o)/i,u),s.data,e,r,i,h),0===e&&this._addTileFeatures(s.range(1-o/i,l,1,u),s.data,i,r,i,h),e===i-1&&this._addTileFeatures(s.range(0,l,o/i,u),s.data,-1,r,i,h),h.features.length?h:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){let r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e}_appendLeaves(t,e,r,s,i){for(let a of this.getChildren(e)){let e=a.properties;if(e&&e.cluster?i+e.point_count<=s?i+=e.point_count:i=this._appendLeaves(t,e.cluster_id,r,s,i):i<s?i++:t.push(a),t.length===r)break}return i}_createTree(t){let e=new T(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)e.add(t[r],t[r+1]);return e.finish(),e.data=t,e}_addTileFeatures(t,e,r,s,i,a){for(let n of t){let t,o,l,u,h=n*this.stride,c=e[h+5]>1;if(c)t=F(e,h,this.clusterProps),o=e[h],l=e[h+1];else{let r=this.points[e[h+3]];t=r.properties;let[s,i]=r.geometry.coordinates;o=R(s),l=$(i)}let p={type:1,geometry:[[Math.round(this.options.extent*(o*i-r)),Math.round(this.options.extent*(l*i-s))]],tags:t};void 0!==(u=c||this.options.generateId?e[h+3]:this.points[e[h+3]].id)&&(p.id=u),a.features.push(p)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){let{radius:r,extent:s,reduce:i,minPoints:a}=this.options,n=r/(s*Math.pow(2,e)),o=t.data,l=[],u=this.stride;for(let r=0;r<o.length;r+=u){if(o[r+2]<=e)continue;o[r+2]=e;let s=o[r],h=o[r+1],c=t.within(o[r],o[r+1],n),p=o[r+5],m=p;for(let t of c){let r=t*u;o[r+2]>e&&(m+=o[r+5])}if(m>p&&m>=a){let t,a=s*p,n=h*p,f=-1,d=((r/u|0)<<5)+(e+1)+this.points.length;for(let s of c){let l=s*u;if(o[l+2]<=e)continue;o[l+2]=e;let h=o[l+5];a+=o[l]*h,n+=o[l+1]*h,o[l+4]=d,i&&(t||(t=this._map(o,r,!0),f=this.clusterProps.length,this.clusterProps.push(t)),i(t,this._map(o,l)))}o[r+4]=d,l.push(a/m,n/m,1/0,d,-1,m),i&&l.push(f)}else{for(let t=0;t<u;t++)l.push(o[r+t]);if(m>1)for(let t of c){let r=t*u;if(!(o[r+2]<=e)){o[r+2]=e;for(let t=0;t<u;t++)l.push(o[r+t])}}}}return l}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,r){if(t[e+5]>1){let s=this.clusterProps[t[e+6]];return r?Object.assign({},s):s}let s=this.points[t[e+3]].properties,i=this.options.map(s);return r&&i===s?Object.assign({},i):i}}function D(t,e,r){return{type:"Feature",id:t[e+3],properties:F(t,e,r),geometry:{type:"Point",coordinates:[(t[e]-.5)*360,360*Math.atan(Math.exp((180-360*t[e+1])*Math.PI/180)
1)/Math.PI-90]}}}function F(t,e,r){let s=t[e+5],i=s>=1e4?`${Math.round(s/1e3)}k`:s>=1e3?`${Math.round(s/100)/10}k`:s,a=t[e+6];return Object.assign(-1===a?{}:Object.assign({},r[a]),{cluster:!0,cluster_id:t[e+3],point_count:s,point_count_abbreviated:i})}function R(t){return t/360+.5}function $(t){let e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function V(t,e){var r={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&0>e.indexOf(s)&&(r[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,s=Object.getOwnPropertySymbols(t);i<s.length;i++)0>e.indexOf(s[i])&&Object.prototype.propertyIsEnumerable.call(t,s[i])&&(r[s[i]]=t[s[i]]);return r}"function"==typeof SuppressedError&&SuppressedError;class G{static isAdvancedMarkerAvailable(t){return google.maps.marker&&!0===t.getMapCapabilities().isAdvancedMarkersAvailable}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,e){this.isAdvancedMarker(t)?t.map=e:t.setMap(e)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(Number.isFinite(t.position.lat)&&Number.isFinite(t.position.lng))return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return!!this.isAdvancedMarker(t)||t.getVisible()}}class K{constructor({markers:t,position:e}){this.markers=[],t&&(this.markers=t),e&&(e instanceof google.maps.LatLng?this._position=e:this._position=new google.maps.LatLng(e))}get bounds(){if(0===this.markers.length&&!this._position)return;let t=new google.maps.LatLngBounds(this._position,this._position);for(let e of this.markers)t.extend(G.getPosition(e));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(t=>G.getVisible(t)).length}push(t){this.markers.push(t)}delete(){this.marker&&(G.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function W(t,e="assertion failed"){if(null==t)throw Error(e)}let J=(t,e,r,s)=>{let i=t.getBounds();W(i);let a=X(i,e,s);return r.filter(t=>a.contains(G.getPosition(t)))},X=(t,e,r)=>{let{northEast:s,southWest:i}=Q(t,e);return te(tt({northEast:s,southWest:i},r),e)},Y=(t,e,r)=>
1{let s=X(t,e,r),i=s.getNorthEast(),a=s.getSouthWest();return[a.lng(),a.lat(),i.lng(),i.lat()]},H=(t,e)=>{let r=(e.lat-t.lat)*Math.PI/180,s=(e.lng-t.lng)*Math.PI/180,i=Math.sin(r/2),a=Math.sin(s/2),n=i*i+Math.cos(t.lat*Math.PI/180)*Math.cos(e.lat*Math.PI/180)*a*a;return 2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n))*6371},Q=(t,e)=>{let r=e.fromLatLngToDivPixel(t.getNorthEast()),s=e.fromLatLngToDivPixel(t.getSouthWest());return W(r),W(s),{northEast:r,southWest:s}},tt=({northEast:t,southWest:e},r)=>(t.x+=r,t.y-=r,e.x-=r,e.y+=r,{northEast:t,southWest:e}),te=({northEast:t,southWest:e},r)=>{let s=r.fromDivPixelToLatLng(e),i=r.fromDivPixelToLatLng(t);return new google.maps.LatLngBounds(s,i)};class tr{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return ti(t)}}class ts extends tr{constructor(t){var{viewportPadding:e=60}=t;super(V(t,["viewportPadding"])),this.viewportPadding=60,this.viewportPadding=e}calculate({markers:t,map:e,mapCanvasProjection:r}){let s=e.getZoom();return(W(s),s>=this.maxZoom)?{clusters:this.noop({markers:t}),changed:!1}:{clusters:this.cluster({markers:J(e,r,t,this.viewportPadding),map:e,mapCanvasProjection:r})}}}let ti=t=>t.map(t=>new K({position:G.getPosition(t),markers:[t]}));class ta extends ts{constructor(t){var{maxDistance:e=4e4,gridSize:r=40}=t;super(V(t,["maxDistance","gridSize"])),this.clusters=[],this.state={zoom:-1},this.maxDistance=e,this.gridSize=r}calculate({markers:t,map:e,mapCanvasProjection:r}){let s=e.getZoom();W(s);let i={zoom:s},a=!1;return(this.state.zoom>=this.maxZoom&&i.zoom>=this.maxZoom||(a=!S(this.state,i)),this.state=i,s>=this.maxZoom)?{clusters:this.noop({markers:t}),changed:a}:{clusters:this.cluster({markers:J(e,r,t,this.viewportPadding),map:e,mapCanvasProjection:r})}}cluster({markers:t,map:e,mapCanvasProjection:r}){return this.clusters=[],t.forEach(t=>{this.addToClosestCluster(t,e,r)}),this.clusters}addToClosestCluster(t,e,r){let s=this.maxDistance,i=null;for(let e=0;
1e<this.clusters.length;e++){let r=this.clusters[e];W(r.bounds);let a=H(r.bounds.getCenter().toJSON(),G.getPosition(t).toJSON());a<s&&(s=a,i=r)}if(i)if(W(i.bounds),X(i.bounds,r,this.gridSize).contains(G.getPosition(t)))i.push(t);else{let e=new K({markers:[t]});this.clusters.push(e)}else{let e=new K({markers:[t]});this.clusters.push(e)}}}class tn extends tr{constructor(t){super(V(t,[]))}calculate({markers:t,map:e,mapCanvasProjection:r}){return{clusters:this.cluster({markers:t,map:e,mapCanvasProjection:r}),changed:!1}}cluster(t){return this.noop(t)}}class to extends tr{constructor(t){var{maxZoom:e,radius:r=60}=t,s=V(t,["maxZoom","radius"]);super({maxZoom:e}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new B(Object.assign({maxZoom:this.maxZoom,radius:r},s))}calculate(t){let e=!1,r=t.map.getZoom();W(r);let s={zoom:r=Math.round(r)};if(!S(t.markers,this.markers)){e=!0,this.markers=[...t.markers];let r=this.markers.map(t=>{let e=G.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}});this.superCluster.load(r)}return(!e&&(this.state.zoom<=this.maxZoom||s.zoom<=this.maxZoom)&&(e=!S(this.state,s)),this.state=s,0===t.markers.length)?this.clusters=[]:e&&(this.cluster
1s=this.cluster(t)),{clusters:this.clusters,changed:e}}cluster({map:t}){let e=t.getZoom();return W(e),this.superCluster.getClusters([-180,-90,180,90],Math.round(e)).map(t=>this.transformCluster(t))}transformCluster({geometry:{coordinates:[t,e]},properties:r}){if(r.cluster)return new K({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(t=>t.properties.marker),position:{lat:e,lng:t}});let s=r.marker;return new K({markers:[s],position:G.getPosition(s)})}}class tl extends ts{constructor(t){var{maxZoom:e,radius:r=60,viewportPadding:s=60}=t,i=V(t,["maxZoom","radius","viewportPadding"]);super({maxZoom:e,viewportPadding:s}),this.markers=[],this.clusters=[],this.superCluster=new B(Object.assign({maxZoom:this.maxZoom,radius:r},i)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(t){let e=this.getViewportState(t),r=!S(this.state,e);if(!S(t.markers,this.markers)){r=!0,this.markers=[...t.markers];let e=this.markers.map(t=>{let e=G.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}});this.superCluster.load(e)}
1return r&&(this.clusters=this.cluster(t),this.state=e),{clusters:this.clusters,changed:r}}cluster(t){let e=this.getViewportState(t);return this.superCluster.getClusters(e.view,e.zoom).map(t=>this.transformCluster(t))}transformCluster({geometry:{coordinates:[t,e]},properties:r}){if(r.cluster)return new K({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(t=>t.properties.marker),position:{lat:e,lng:t}});let s=r.marker;return new K({markers:[s],position:G.getPosition(s)})}getViewportState(t){let e=t.map.getZoom(),r=t.map.getBounds();return W(e),W(r),{zoom:Math.round(e),view:Y(r,t.mapCanvasProjection,this.viewportPadding)}}}class tu{constructor(t,e){this.markers={sum:t.length};let r=e.map(t=>t.count),s=r.reduce((t,e)=>t+e,0);this.clusters={count:e.length,markers:{mean:s/e.length,sum:s,min:Math.min(...r),max:Math.max(...r)}}}}class th{render({count:t,position:e},r,s){let i=t>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff",a=`<svg fill="${i}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50"> 2<circle cx="120" cy="120" opacity=".6" r="70" /> 3<circle cx="120" cy="120" opacity=".3" r="90" /> 4<circle cx="120" cy="120" opacity=".2" r="110" /> 5<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${t}</text> 6</svg>`,n=`Cluster of ${t} markers`,o=Number(google.maps.Marker.MAX_ZINDEX)+t;if(G.isAdvancedMarkerAvailable(s)){let t=new DOMParser().parseFromString(a,"image/svg+xml").documentElement;return t.setAttribute("transform","translate(0 25)"),new google.maps.marker.AdvancedMarkerElement({map:s,position:e,zIndex:o,title:n,content:t})}let l={position:e,zIndex:o,title:n,icon:{url:`data:image/svg+xml;base64,${btoa(a)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(l)}}class tc{constructor(){!function(t,e){for(let r in e.prototype)t.prototype[r]=e.prototype[r]}(tc,google.maps.OverlayView)}}!function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"}(s||(s={}));let tp=(t,e,r)=>{e.bounds&&r.fitBounds(e.bounds)};class tm extends tc{constructor({map:t,markers:e=[],algorithmOptions:r={},algorithm:s=new to(r),renderer:i=new th,onClusterClick:a=tp}){super(),this.map=null,this.idleListener=null,this.markers=[...e],this.clusters=[],this.algorithm=s,this.renderer=i,this.onClusterClick=a,t&&this.setMap(t)}addMarker(t,e){!this.markers.includes(t)&&(this.markers.push(t),e||this.render())}addMarkers(t,e){t.forEach(t=>{this.addMarker(t,!0)}),e||this.render()}removeMarker(t,e){let r=this.markers.indexOf(t);return -1!==r&&(G.setMap(t,null),this.markers.splice(r,1),e||this.render(),!0)}removeMarkers(t,e){let r=!1;return t.forEach(t=>{r=this.removeMarker(t,!0)||r}),r&&!e&&this.render(),r}clearMarkers(t){this.markers.length=0,t||this.render()}render(){let t=this.getMap();if(t instanceof google.maps.Map&&t.getProjection()){google.maps.event.trigger(this,s.CLUSTERING_BEGIN,this);let{clusters:e,changed:r}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(r||void 0==r){let t=new Set;for(let r of e)1==r.markers.length&&t.add(r.markers[0]);let r=[];for(let e of this.clusters)null!=e.marker&&(1==e.markers.length?t.has(e.marker)||G.setMap(e.marker,null):r.push(e.marker));this.clusters=e,this.renderClusters(),requestAnimationFrame(()=>r.forEach(t=>G.setMap(t,null)))}google.maps.event.trigger(this,s.CLUSTERING_END,this)}}onAdd(){let t=this.getMap();W(t),this.idleListener=t.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(t=>G.setMap(t,null)),this.clusters.forEach(t=>t.delete()),this.clusters=[]}renderClusters(){let t=new tu(this.markers,this.clusters),e=this.getMap();this.clusters.forEach(r=>{if(1===r.markers.length)r.marker=r.markers[0];else if(r.marker=this.renderer.render(r,t,e),r.markers.forEach(t=>G.setMap(t,null)),this.onClusterClick){let t=G.isAdvancedMarker(r.marker)?s.GMP_CLICK:s.CLUSTER_CLICK;r.marker.addListener(t,t=>{google.maps.event.trigger(this,s.CLUSTER_CLICK,r),this.onClusterClick(t,r,e)}
6)}G.setMap(r.marker,e)})}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.