vue3-google-map 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-76180f00]{width:100%;height:100%}.custom-control-wrapper[data-v-268ef28d]{display:none}.mapdiv .custom-control-wrapper[data-v-268ef28d]{display:inline-block}.info-window-wrapper[data-v-f929b615]{display:none}.mapdiv .info-window-wrapper[data-v-f929b615]{display:inline-block}.custom-marker-wrapper[data-v-4b2eafc1]{display:none}.mapdiv .custom-marker-wrapper[data-v-4b2eafc1]{display:inline-block}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- (function(v,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(v=typeof globalThis<"u"?globalThis:v||self,l(v.Vue3GoogleMap={},v.Vue))})(this,function(v,l){"use strict";var ft=Object.defineProperty;var mt=(v,l,b)=>l in v?ft(v,l,{enumerable:!0,configurable:!0,writable:!0,value:b}):v[l]=b;var Q=(v,l,b)=>(mt(v,typeof l!="symbol"?l+"":l,b),b);const b=Symbol("map"),T=Symbol("api"),ee=Symbol("marker"),te=Symbol("markerCluster"),D=Symbol("CustomMarker"),se=Symbol("mapTilesLoaded"),R=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];/*! *****************************************************************************
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-104539fc]{width:100%;height:100%}.custom-control-wrapper[data-v-268ef28d]{display:none}.mapdiv .custom-control-wrapper[data-v-268ef28d]{display:inline-block}.info-window-wrapper[data-v-f929b615]{display:none}.mapdiv .info-window-wrapper[data-v-f929b615]{display:inline-block}.custom-marker-wrapper[data-v-4b2eafc1]{display:none}.mapdiv .custom-marker-wrapper[data-v-4b2eafc1]{display:inline-block}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ (function(w,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(w=typeof globalThis<"u"?globalThis:w||self,l(w.Vue3GoogleMap={},w.Vue))})(this,function(w,l){"use strict";var gt=Object.defineProperty;var yt=(w,l,O)=>l in w?gt(w,l,{enumerable:!0,configurable:!0,writable:!0,value:O}):w[l]=O;var te=(w,l,O)=>(yt(w,typeof l!="symbol"?l+"":l,O),O);const O=Symbol("map"),I=Symbol("api"),G=Symbol("marker"),H=Symbol("markerCluster"),D=Symbol("CustomMarker"),ne=Symbol("mapTilesLoaded"),j=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];/*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
5
5
  Permission to use, copy, modify, and/or distribute this software for any
@@ -12,7 +12,7 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */function Ce(r,e,t,s){function n(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function c(d){try{h(s.next(d))}catch(u){a(u)}}function i(d){try{h(s.throw(d))}catch(u){a(u)}}function h(d){d.done?o(d.value):n(d.value).then(c,i)}h((s=s.apply(r,e||[])).next())})}var be=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var s,n,o;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(n=s;n--!==0;)if(!r(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),s=o.length,s!==Object.keys(t).length)return!1;for(n=s;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=s;n--!==0;){var a=o[n];if(!r(e[a],t[a]))return!1}return!0}return e!==e&&t!==t};const ne="__googleMapsScriptId";var j;(function(r){r[r.INITIALIZED=0]="INITIALIZED",r[r.LOADING=1]="LOADING",r[r.SUCCESS=2]="SUCCESS",r[r.FAILURE=3]="FAILURE"})(j||(j={}));class x{constructor({apiKey:e,authReferrerPolicy:t,channel:s,client:n,id:o=ne,language:a,libraries:c=[],mapIds:i,nonce:h,region:d,retries:u=3,url:p="https://maps.googleapis.com/maps/api/js",version:f}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=t,this.channel=s,this.client=n,this.id=o||ne,this.language=a,this.libraries=c,this.mapIds=i,this.nonce=h,this.region=d,this.retries=u,this.url=p,this.version=f,x.instance){if(!be(this.options,x.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(x.instance.options)}`);return x.instance}x.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?j.FAILURE:this.done?j.SUCCESS:this.loading?j.LOADING:j.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`&region=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,t)=>{this.loadCallback(s=>{s?t(s.error):e(window.google)})})}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id)){this.callback();return}const s={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(s).forEach(o=>!s[o]&&delete s[o]),!((t=(e=window==null?void 0:window.google)===null||e===void 0?void 0:e.maps)===null||t===void 0)&&t.importLibrary||(o=>{let a,c,i,h="The Google Maps JavaScript API",d="google",u="importLibrary",p="__ib__",f=document,g=window;g=g[d]||(g[d]={});const m=g.maps||(g.maps={}),y=new Set,w=new URLSearchParams,_=()=>a||(a=new Promise((C,P)=>Ce(this,void 0,void 0,function*(){var M;yield c=f.createElement("script"),c.id=this.id,w.set("libraries",[...y]+"");for(i in o)w.set(i.replace(/[A-Z]/g,O=>"_"+O[0].toLowerCase()),o[i]);w.set("callback",d+".maps."+p),c.src=this.url+"?"+w,m[p]=C,c.onerror=()=>a=P(Error(h+" could not load.")),c.nonce=this.nonce||((M=f.querySelector("script[nonce]"))===null||M===void 0?void 0:M.nonce)||"",f.head.append(c)})));m[u]?console.warn(h+" only loads once. Ignoring:",o):m[u]=(C,...P)=>y.add(C)&&_().then(()=>m[u](C,...P))})(s);const n=this.libraries.map(o=>this.importLibrary(o));n.length||n.push(this.importLibrary("core")),Promise.all(n).then(()=>this.callback(),o=>{const a=new ErrorEvent("error",{error:o});this.loadErrorCallback(a)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const t=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${t} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},t)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setScript())}}}function Me(r){return class extends r.OverlayView{constructor(s){super();Q(this,"element");Q(this,"opts");const{element:n,...o}=s;this.element=n,this.opts=o,this.opts.map&&this.setMap(this.opts.map)}getPosition(){return this.opts.position?this.opts.position instanceof r.LatLng?this.opts.position:new r.LatLng(this.opts.position):null}getVisible(){if(!this.element)return!1;const s=this.element;return s.style.display!=="none"&&s.style.visibility!=="hidden"&&(s.style.opacity===""||Number(s.style.opacity)>.01)}onAdd(){if(!this.element)return;const s=this.getPanes();s&&s.overlayMouseTarget.appendChild(this.element)}draw(){if(!this.element)return;const s=this.getProjection(),n=s==null?void 0:s.fromLatLngToDivPixel(this.getPosition());if(n){this.element.style.position="absolute";const o=this.element.offsetHeight,a=this.element.offsetWidth;let c,i;switch(this.opts.anchorPoint){case"TOP_CENTER":c=n.x-a/2,i=n.y;break;case"BOTTOM_CENTER":c=n.x-a/2,i=n.y-o;break;case"LEFT_CENTER":c=n.x,i=n.y-o/2;break;case"RIGHT_CENTER":c=n.x-a,i=n.y-o/2;break;case"TOP_LEFT":c=n.x,i=n.y;break;case"TOP_RIGHT":c=n.x-a,i=n.y;break;case"BOTTOM_LEFT":c=n.x,i=n.y-o;break;case"BOTTOM_RIGHT":c=n.x-a,i=n.y-o;break;default:c=n.x-a/2,i=n.y-o/2}this.element.style.left=c+"px",this.element.style.top=i+"px",this.element.style.transform=`translateX(${this.opts.offsetX||0}px) translateY(${this.opts.offsetY||0}px)`,this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}onRemove(){this.element&&this.element.remove()}setOptions(s){const{element:n,...o}=s;this.element=n,this.opts=o,this.draw()}}}let re;const oe=["bounds_changed","center_changed","click","contextmenu","dblclick","drag","dragend","dragstart","heading_changed","idle","isfractionalzoomenabled_changed","mapcapabilities_changed","maptypeid_changed","mousemove","mouseout","mouseover","projection_changed","renderingtype_changed","rightclick","tilesloaded","tilt_changed","zoom_changed"],Ee=l.defineComponent({props:{apiPromise:{type:Promise},apiKey:{type:String,default:""},version:{type:String,default:"weekly"},libraries:{type:Array,default:()=>["places"]},region:{type:String,required:!1},language:{type:String,required:!1},backgroundColor:{type:String,required:!1},center:{type:Object,default:()=>({lat:0,lng:0})},clickableIcons:{type:Boolean,required:!1,default:void 0},controlSize:{type:Number,required:!1},disableDefaultUi:{type:Boolean,required:!1,default:void 0},disableDoubleClickZoom:{type:Boolean,required:!1,default:void 0},draggable:{type:Boolean,required:!1,default:void 0},draggableCursor:{type:String,required:!1},draggingCursor:{type:String,required:!1},fullscreenControl:{type:Boolean,required:!1,default:void 0},fullscreenControlPosition:{type:String,required:!1},gestureHandling:{type:String,required:!1},heading:{type:Number,required:!1},isFractionalZoomEnabled:{type:Boolean,required:!1,default:void 0},keyboardShortcuts:{type:Boolean,required:!1,default:void 0},mapTypeControl:{type:Boolean,required:!1,default:void 0},mapTypeControlOptions:{type:Object,required:!1},mapTypeId:{type:[Number,String],required:!1},mapId:{type:String,required:!1},maxZoom:{type:Number,required:!1},minZoom:{type:Number,required:!1},noClear:{type:Boolean,required:!1,default:void 0},panControl:{type:Boolean,required:!1,default:void 0},panControlPosition:{type:String,required:!1},restriction:{type:Object,required:!1},rotateControl:{type:Boolean,required:!1,default:void 0},rotateControlPosition:{type:String,required:!1},scaleControl:{type:Boolean,required:!1,default:void 0},scaleControlStyle:{type:Number,required:!1},scrollwheel:{type:Boolean,required:!1,default:void 0},streetView:{type:Object,required:!1},streetViewControl:{type:Boolean,required:!1,default:void 0},streetViewControlPosition:{type:String,required:!1},styles:{type:Array,required:!1},tilt:{type:Number,required:!1},zoom:{type:Number,required:!1},zoomControl:{type:Boolean,required:!1,default:void 0},zoomControlPosition:{type:String,required:!1},nonce:{type:String,default:""}},emits:oe,setup(r,{emit:e}){const t=l.ref(),s=l.ref(!1),n=l.ref(),o=l.ref(),a=l.ref(!1);l.provide(b,n),l.provide(T,o),l.provide(se,a);const c=()=>{const u={...r};Object.keys(u).forEach(m=>{u[m]===void 0&&delete u[m]});const f=m=>{var y;return m?{position:(y=o.value)==null?void 0:y.ControlPosition[m]}:{}},g={scaleControlOptions:r.scaleControlStyle?{style:r.scaleControlStyle}:{},panControlOptions:f(r.panControlPosition),zoomControlOptions:f(r.zoomControlPosition),rotateControlOptions:f(r.rotateControlPosition),streetViewControlOptions:f(r.streetViewControlPosition),fullscreenControlOptions:f(r.fullscreenControlPosition),disableDefaultUI:r.disableDefaultUi};return{...u,...g}},i=l.watch([o,n],([u,p])=>{const f=u,g=p;f&&g&&(f.event.addListenerOnce(g,"tilesloaded",()=>{a.value=!0}),setTimeout(i,0))},{immediate:!0}),h=()=>{try{const{apiKey:u,region:p,version:f,language:g,libraries:m,nonce:y}=r;re=new x({apiKey:u,region:p,version:f,language:g,libraries:m,nonce:y})}catch(u){console.error(u)}},d=u=>{o.value=l.markRaw(u.maps),n.value=l.markRaw(new u.maps.Map(t.value,c()));const p=Me(o.value);o.value[D]=p,oe.forEach(g=>{var m;(m=n.value)==null||m.addListener(g,y=>e(g,y))}),s.value=!0;const f=Object.keys(r).filter(g=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom","nonce"].includes(g)).map(g=>l.toRef(r,g));l.watch([()=>r.center,()=>r.zoom,...f],([g,m],[y,w])=>{var O,E,U;const{center:_,zoom:C,...P}=c();(O=n.value)==null||O.setOptions(P),m!==void 0&&m!==w&&((E=n.value)==null||E.setZoom(m));const M=!y||g.lng!==y.lng||g.lat!==y.lat;g&&M&&((U=n.value)==null||U.panTo(g))})};return l.onMounted(()=>{r.apiPromise&&r.apiPromise instanceof Promise?r.apiPromise.then(d):(h(),re.load().then(d))}),l.onBeforeUnmount(()=>{var u;a.value=!1,n.value&&((u=o.value)==null||u.event.clearInstanceListeners(n.value))}),{mapRef:t,ready:s,map:n,api:o,mapTilesLoaded:a}}}),gt="",F=(r,e)=>{const t=r.__vccOpts||r;for(const[s,n]of e)t[s]=n;return t},Pe={ref:"mapRef",class:"mapdiv"};function Oe(r,e,t,s,n,o){return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",Pe,null,512),l.renderSlot(r.$slots,"default",l.normalizeProps(l.guardReactiveProps({ready:r.ready,map:r.map,api:r.api,mapTilesLoaded:r.mapTilesLoaded})),void 0,!0)])}const Se=F(Ee,[["render",Oe],["__scopeId","data-v-76180f00"]]);function Le(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var xe=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var s,n,o;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(n=s;n--!==0;)if(!r(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),s=o.length,s!==Object.keys(t).length)return!1;for(n=s;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=s;n--!==0;){var a=o[n];if(!r(e[a],t[a]))return!1}return!0}return e!==e&&t!==t};const I=Le(xe),Ie=r=>r==="Marker",Ae=r=>r===D,B=(r,e,t,s)=>{const n=l.ref(),o=l.inject(b,l.ref()),a=l.inject(T,l.ref()),c=l.inject(te,l.ref()),i=l.computed(()=>!!(c.value&&a.value&&(n.value instanceof a.value.Marker||n.value instanceof a.value[D])));return l.watch([o,t],(h,[d,u])=>{var f,g,m;const p=!I(t.value,u)||o.value!==d;!o.value||!a.value||!p||(n.value?(n.value.setOptions(t.value),i.value&&((f=c.value)==null||f.removeMarker(n.value),(g=c.value)==null||g.addMarker(n.value))):(Ie(r)?n.value=l.markRaw(new a.value[r](t.value)):Ae(r)?n.value=l.markRaw(new a.value[r](t.value)):n.value=l.markRaw(new a.value[r]({...t.value,map:o.value})),i.value?(m=c.value)==null||m.addMarker(n.value):n.value.setMap(o.value),e.forEach(y=>{var w;(w=n.value)==null||w.addListener(y,_=>s(y,_))})))},{immediate:!0}),l.onBeforeUnmount(()=>{var h,d;n.value&&((h=a.value)==null||h.event.clearInstanceListeners(n.value),i.value?(d=c.value)==null||d.removeMarker(n.value):n.value.setMap(null))}),n},ie=["animation_changed","click","dblclick","rightclick","dragstart","dragend","drag","mouseover","mousedown","mouseout","mouseup","draggable_changed","clickable_changed","contextmenu","cursor_changed","flat_changed","rightclick","zindex_changed","icon_changed","position_changed","shape_changed","title_changed","visible_changed"],Te=l.defineComponent({name:"Marker",props:{options:{type:Object,required:!0}},emits:ie,setup(r,{emit:e,expose:t,slots:s}){const n=l.toRef(r,"options"),o=B("Marker",ie,n,e);return l.provide(ee,o),t({marker:o}),()=>{var a;return(a=s.default)==null?void 0:a.call(s)}}}),Re=l.defineComponent({name:"Polyline",props:{options:{type:Object,required:!0}},emits:R,setup(r,{emit:e}){const t=l.toRef(r,"options");return{polyline:B("Polyline",R,t,e)}},render:()=>null}),je=l.defineComponent({name:"Polygon",props:{options:{type:Object,required:!0}},emits:R,setup(r,{emit:e}){const t=l.toRef(r,"options");return{polygon:B("Polygon",R,t,e)}},render:()=>null}),ae=R.concat(["bounds_changed"]),Be=l.defineComponent({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:ae,setup(r,{emit:e}){const t=l.toRef(r,"options");return{rectangle:B("Rectangle",ae,t,e)}},render:()=>null}),le=R.concat(["center_changed","radius_changed"]),$e=l.defineComponent({name:"Circle",props:{options:{type:Object,required:!0}},emits:le,setup(r,{emit:e}){const t=l.toRef(r,"options");return{circle:B("Circle",le,t,e)}},render:()=>null}),qe=l.defineComponent({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(r,{emit:e}){const t=l.ref(null),s=l.inject(b,l.ref()),n=l.inject(T,l.ref()),o=l.inject(se,l.ref(!1)),a=l.watch([o,n,t],([h,d,u])=>{d&&h&&u&&(c(r.position),e("content:loaded"),setTimeout(a,0))},{immediate:!0}),c=h=>{if(s.value&&n.value&&t.value){const d=n.value.ControlPosition[h];s.value.controls[d].push(t.value)}},i=h=>{if(s.value&&n.value){let d=null;const u=n.value.ControlPosition[h];s.value.controls[u].forEach((p,f)=>{p===t.value&&(d=f)}),d!==null&&s.value.controls[u].removeAt(d)}};return l.onBeforeUnmount(()=>i(r.position)),l.watch(()=>r.position,(h,d)=>{i(d),c(h)}),l.watch(()=>r.index,h=>{h&&t.value&&(t.value.index=r.index)}),{controlRef:t}}}),yt="",Ne={ref:"controlRef",class:"custom-control-wrapper"};function Ze(r,e,t,s,n,o){return l.openBlock(),l.createElementBlock("div",Ne,[l.renderSlot(r.$slots,"default",{},void 0,!0)],512)}const Ue=F(qe,[["render",Ze],["__scopeId","data-v-268ef28d"]]),ce=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"],De=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[...ce,"update:modelValue"],setup(r,{slots:e,emit:t,expose:s}){const n=l.ref(),o=l.ref(),a=l.inject(b,l.ref()),c=l.inject(T,l.ref()),i=l.inject(ee,l.ref());let h,d=r.modelValue;const u=l.computed(()=>{var m;return(m=e.default)==null?void 0:m.call(e).some(y=>y.type!==l.Comment)}),p=m=>{d=m,t("update:modelValue",m)},f=m=>{n.value&&(n.value.open({map:a.value,anchor:i.value,...m}),p(!0))},g=()=>{n.value&&(n.value.close(),p(!1))};return l.onMounted(()=>{l.watch([a,()=>r.options],([m,y],[w,_])=>{var P;const C=!I(y,_)||a.value!==w;a.value&&c.value&&C&&(n.value?(n.value.setOptions({...y,content:u.value?o.value:y.content}),i.value||f()):(n.value=l.markRaw(new c.value.InfoWindow({...y,content:u.value?o.value:y.content})),i.value&&(h=i.value.addListener("click",()=>{f()})),(!i.value||d)&&f(),ce.forEach(M=>{var O;(O=n.value)==null||O.addListener(M,E=>t(M,E))}),(P=n.value)==null||P.addListener("closeclick",()=>p(!1))))},{immediate:!0}),l.watch(()=>r.modelValue,m=>{m!==d&&(m?f():g())})}),l.onBeforeUnmount(()=>{var m;h&&h.remove(),n.value&&((m=c.value)==null||m.event.clearInstanceListeners(n.value),g())}),s({infoWindow:n,open:f,close:g}),{infoWindow:n,infoWindowRef:o,hasSlotContent:u,open:f,close:g}}}),wt="",Fe={key:0,class:"info-window-wrapper"};function Ve(r,e,t,s,n,o){return r.hasSlotContent?(l.openBlock(),l.createElementBlock("div",Fe,[l.createElementVNode("div",l.mergeProps({ref:"infoWindowRef"},r.$attrs),[l.renderSlot(r.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("",!0)}const ze=F(De,[["render",Ve],["__scopeId","data-v-f929b615"]]),ue=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],G=1,q=8;class H{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[t,s]=new Uint8Array(e,0,2);if(t!==219)throw new Error("Data does not appear to be in a KDBush format.");const n=s>>4;if(n!==G)throw new Error(`Got v${n} data when expected v${G}.`);const o=ue[s&15];if(!o)throw new Error("Unrecognized array type.");const[a]=new Uint16Array(e,2,1),[c]=new Uint32Array(e,4,1);return new H(c,a,o,e)}constructor(e,t=64,s=Float64Array,n){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=s,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const o=ue.indexOf(this.ArrayType),a=e*2*this.ArrayType.BYTES_PER_ELEMENT,c=e*this.IndexArrayType.BYTES_PER_ELEMENT,i=(8-c%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${s}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,q,e),this.coords=new this.ArrayType(this.data,q+c+i,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(q+a+c+i),this.ids=new this.IndexArrayType(this.data,q,e),this.coords=new this.ArrayType(this.data,q+c+i,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(G<<4)+o]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){const s=this._pos>>1;return this.ids[s]=s,this.coords[this._pos++]=e,this.coords[this._pos++]=t,s}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return W(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,s,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:a,nodeSize:c}=this,i=[0,o.length-1,0],h=[];for(;i.length;){const d=i.pop()||0,u=i.pop()||0,p=i.pop()||0;if(u-p<=c){for(let y=p;y<=u;y++){const w=a[2*y],_=a[2*y+1];w>=e&&w<=s&&_>=t&&_<=n&&h.push(o[y])}continue}const f=p+u>>1,g=a[2*f],m=a[2*f+1];g>=e&&g<=s&&m>=t&&m<=n&&h.push(o[f]),(d===0?e<=g:t<=m)&&(i.push(p),i.push(f-1),i.push(1-d)),(d===0?s>=g:n>=m)&&(i.push(f+1),i.push(u),i.push(1-d))}return h}within(e,t,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:o,nodeSize:a}=this,c=[0,n.length-1,0],i=[],h=s*s;for(;c.length;){const d=c.pop()||0,u=c.pop()||0,p=c.pop()||0;if(u-p<=a){for(let y=p;y<=u;y++)he(o[2*y],o[2*y+1],e,t)<=h&&i.push(n[y]);continue}const f=p+u>>1,g=o[2*f],m=o[2*f+1];he(g,m,e,t)<=h&&i.push(n[f]),(d===0?e-s<=g:t-s<=m)&&(c.push(p),c.push(f-1),c.push(1-d)),(d===0?e+s>=g:t+s>=m)&&(c.push(f+1),c.push(u),c.push(1-d))}return i}}function W(r,e,t,s,n,o){if(n-s<=t)return;const a=s+n>>1;de(r,e,a,s,n,o),W(r,e,t,s,a-1,1-o),W(r,e,t,a+1,n,1-o)}function de(r,e,t,s,n,o){for(;n>s;){if(n-s>600){const h=n-s+1,d=t-s+1,u=Math.log(h),p=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*p*(h-p)/h)*(d-h/2<0?-1:1),g=Math.max(s,Math.floor(t-d*p/h+f)),m=Math.min(n,Math.floor(t+(h-d)*p/h+f));de(r,e,t,g,m,o)}const a=e[2*t+o];let c=s,i=n;for(N(r,e,s,t),e[2*n+o]>a&&N(r,e,s,n);c<i;){for(N(r,e,c,i),c++,i--;e[2*c+o]<a;)c++;for(;e[2*i+o]>a;)i--}e[2*s+o]===a?N(r,e,s,i):(i++,N(r,e,i,n)),i<=t&&(s=i+1),t<=i&&(n=i-1)}}function N(r,e,t,s){K(r,t,s),K(e,2*t,2*s),K(e,2*t+1,2*s+1)}function K(r,e,t){const s=r[e];r[e]=r[t],r[t]=s}function he(r,e,t,s){const n=r-t,o=e-s;return n*n+o*o}const Ge={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:r=>r},pe=Math.fround||(r=>e=>(r[0]=+e,r[0]))(new Float32Array(1)),A=2,S=3,J=4,L=5,fe=6;class me{constructor(e){this.options=Object.assign(Object.create(Ge),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:s,maxZoom:n}=this.options;t&&console.time("total time");const o=`prepare ${e.length} points`;t&&console.time(o),this.points=e;const a=[];for(let i=0;i<e.length;i++){const h=e[i];if(!h.geometry)continue;const[d,u]=h.geometry.coordinates,p=pe(V(d)),f=pe(z(u));a.push(p,f,1/0,i,-1,1),this.options.reduce&&a.push(0)}let c=this.trees[n+1]=this._createTree(a);t&&console.timeEnd(o);for(let i=n;i>=s;i--){const h=+Date.now();c=this.trees[i]=this._createTree(this._cluster(c,i)),t&&console.log("z%d: %d clusters in %dms",i,c.numItems,+Date.now()-h)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let s=((e[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,e[1]));let o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)s=-180,o=180;else if(s>o){const u=this.getClusters([s,n,180,a],t),p=this.getClusters([-180,n,o,a],t);return u.concat(p)}const c=this.trees[this._limitZoom(t)],i=c.range(V(s),z(a),V(o),z(n)),h=c.data,d=[];for(const u of i){const p=this.stride*u;d.push(h[p+L]>1?ge(h,p,this.clusterProps):this.points[h[p+S]])}return d}getChildren(e){const t=this._getOriginId(e),s=this._getOriginZoom(e),n="No cluster with the specified id.",o=this.trees[s];if(!o)throw new Error(n);const a=o.data;if(t*this.stride>=a.length)throw new Error(n);const c=this.options.radius/(this.options.extent*Math.pow(2,s-1)),i=a[t*this.stride],h=a[t*this.stride+1],d=o.within(i,h,c),u=[];for(const p of d){const f=p*this.stride;a[f+J]===e&&u.push(a[f+L]>1?ge(a,f,this.clusterProps):this.points[a[f+S]])}if(u.length===0)throw new Error(n);return u}getLeaves(e,t,s){t=t||10,s=s||0;const n=[];return this._appendLeaves(n,e,t,s,0),n}getTile(e,t,s){const n=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:a,radius:c}=this.options,i=c/a,h=(s-i)/o,d=(s+1+i)/o,u={features:[]};return this._addTileFeatures(n.range((t-i)/o,h,(t+1+i)/o,d),n.data,t,s,o,u),t===0&&this._addTileFeatures(n.range(1-i/o,h,1,d),n.data,o,s,o,u),t===o-1&&this._addTileFeatures(n.range(0,h,i/o,d),n.data,-1,s,o,u),u.features.length?u:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const s=this.getChildren(e);if(t++,s.length!==1)break;e=s[0].properties.cluster_id}return t}_appendLeaves(e,t,s,n,o){const a=this.getChildren(t);for(const c of a){const i=c.properties;if(i&&i.cluster?o+i.point_count<=n?o+=i.point_count:o=this._appendLeaves(e,i.cluster_id,s,n,o):o<n?o++:e.push(c),e.length===s)break}return o}_createTree(e){const t=new H(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let s=0;s<e.length;s+=this.stride)t.add(e[s],e[s+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,s,n,o,a){for(const c of e){const i=c*this.stride,h=t[i+L]>1;let d,u,p;if(h)d=ye(t,i,this.clusterProps),u=t[i],p=t[i+1];else{const m=this.points[t[i+S]];d=m.properties;const[y,w]=m.geometry.coordinates;u=V(y),p=z(w)}const f={type:1,geometry:[[Math.round(this.options.extent*(u*o-s)),Math.round(this.options.extent*(p*o-n))]],tags:d};let g;h||this.options.generateId?g=t[i+S]:g=this.points[t[i+S]].id,g!==void 0&&(f.id=g),a.features.push(f)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:s,extent:n,reduce:o,minPoints:a}=this.options,c=s/(n*Math.pow(2,t)),i=e.data,h=[],d=this.stride;for(let u=0;u<i.length;u+=d){if(i[u+A]<=t)continue;i[u+A]=t;const p=i[u],f=i[u+1],g=e.within(i[u],i[u+1],c),m=i[u+L];let y=m;for(const w of g){const _=w*d;i[_+A]>t&&(y+=i[_+L])}if(y>m&&y>=a){let w=p*m,_=f*m,C,P=-1;const M=((u/d|0)<<5)+(t+1)+this.points.length;for(const O of g){const E=O*d;if(i[E+A]<=t)continue;i[E+A]=t;const U=i[E+L];w+=i[E]*U,_+=i[E+1]*U,i[E+J]=M,o&&(C||(C=this._map(i,u,!0),P=this.clusterProps.length,this.clusterProps.push(C)),o(C,this._map(i,E)))}i[u+J]=M,h.push(w/y,_/y,1/0,M,-1,y),o&&h.push(P)}else{for(let w=0;w<d;w++)h.push(i[u+w]);if(y>1)for(const w of g){const _=w*d;if(!(i[_+A]<=t)){i[_+A]=t;for(let C=0;C<d;C++)h.push(i[_+C])}}}}return h}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,s){if(e[t+L]>1){const a=this.clusterProps[e[t+fe]];return s?Object.assign({},a):a}const n=this.points[e[t+S]].properties,o=this.options.map(n);return s&&o===n?Object.assign({},o):o}}function ge(r,e,t){return{type:"Feature",id:r[e+S],properties:ye(r,e,t),geometry:{type:"Point",coordinates:[He(r[e]),We(r[e+1])]}}}function ye(r,e,t){const s=r[e+L],n=s>=1e4?`${Math.round(s/1e3)}k`:s>=1e3?`${Math.round(s/100)/10}k`:s,o=r[e+fe],a=o===-1?{}:Object.assign({},t[o]);return Object.assign(a,{cluster:!0,cluster_id:r[e+S],point_count:s,point_count_abbreviated:n})}function V(r){return r/360+.5}function z(r){const e=Math.sin(r*Math.PI/180),t=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return t<0?0:t>1?1:t}function He(r){return(r-.5)*360}function We(r){const e=(180-r*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
15
+ ***************************************************************************** */function Me(s,e,t,n){function r(o){return o instanceof t?o:new t(function(i){i(o)})}return new(t||(t=Promise))(function(o,i){function c(d){try{h(n.next(d))}catch(u){i(u)}}function a(d){try{h(n.throw(d))}catch(u){i(u)}}function h(d){d.done?o(d.value):r(d.value).then(c,a)}h((n=n.apply(s,e||[])).next())})}var be=function s(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!s(e[r],t[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){var i=o[r];if(!s(e[i],t[i]))return!1}return!0}return e!==e&&t!==t};const re="__googleMapsScriptId";var B;(function(s){s[s.INITIALIZED=0]="INITIALIZED",s[s.LOADING=1]="LOADING",s[s.SUCCESS=2]="SUCCESS",s[s.FAILURE=3]="FAILURE"})(B||(B={}));class T{constructor({apiKey:e,authReferrerPolicy:t,channel:n,client:r,id:o=re,language:i,libraries:c=[],mapIds:a,nonce:h,region:d,retries:u=3,url:p="https://maps.googleapis.com/maps/api/js",version:f}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=t,this.channel=n,this.client=r,this.id=o||re,this.language=i,this.libraries=c,this.mapIds=a,this.nonce=h,this.region=d,this.retries=u,this.url=p,this.version=f,T.instance){if(!be(this.options,T.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(T.instance.options)}`);return T.instance}T.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?B.FAILURE:this.done?B.SUCCESS:this.loading?B.LOADING:B.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`&region=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,t)=>{this.loadCallback(n=>{n?t(n.error):e(window.google)})})}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id)){this.callback();return}const n={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(n).forEach(o=>!n[o]&&delete n[o]),!((t=(e=window==null?void 0:window.google)===null||e===void 0?void 0:e.maps)===null||t===void 0)&&t.importLibrary||(o=>{let i,c,a,h="The Google Maps JavaScript API",d="google",u="importLibrary",p="__ib__",f=document,g=window;g=g[d]||(g[d]={});const m=g.maps||(g.maps={}),y=new Set,v=new URLSearchParams,k=()=>i||(i=new Promise((_,E)=>Me(this,void 0,void 0,function*(){var b;yield c=f.createElement("script"),c.id=this.id,v.set("libraries",[...y]+"");for(a in o)v.set(a.replace(/[A-Z]/g,P=>"_"+P[0].toLowerCase()),o[a]);v.set("callback",d+".maps."+p),c.src=this.url+"?"+v,m[p]=_,c.onerror=()=>i=E(Error(h+" could not load.")),c.nonce=this.nonce||((b=f.querySelector("script[nonce]"))===null||b===void 0?void 0:b.nonce)||"",f.head.append(c)})));m[u]?console.warn(h+" only loads once. Ignoring:",o):m[u]=(_,...E)=>y.add(_)&&k().then(()=>m[u](_,...E))})(n);const r=this.libraries.map(o=>this.importLibrary(o));r.length||r.push(this.importLibrary("core")),Promise.all(r).then(()=>this.callback(),o=>{const i=new ErrorEvent("error",{error:o});this.loadErrorCallback(i)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const t=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${t} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},t)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setScript())}}}function Ee(s){return class extends s.OverlayView{constructor(n){super();te(this,"element");te(this,"opts");const{element:r,...o}=n;this.element=r,this.opts=o,this.opts.map&&this.setMap(this.opts.map)}getPosition(){return this.opts.position?this.opts.position instanceof s.LatLng?this.opts.position:new s.LatLng(this.opts.position):null}getVisible(){if(!this.element)return!1;const n=this.element;return n.style.display!=="none"&&n.style.visibility!=="hidden"&&(n.style.opacity===""||Number(n.style.opacity)>.01)}onAdd(){if(!this.element)return;const n=this.getPanes();n&&n.overlayMouseTarget.appendChild(this.element)}draw(){if(!this.element)return;const n=this.getProjection(),r=n==null?void 0:n.fromLatLngToDivPixel(this.getPosition());if(r){this.element.style.position="absolute";const o=this.element.offsetHeight,i=this.element.offsetWidth;let c,a;switch(this.opts.anchorPoint){case"TOP_CENTER":c=r.x-i/2,a=r.y;break;case"BOTTOM_CENTER":c=r.x-i/2,a=r.y-o;break;case"LEFT_CENTER":c=r.x,a=r.y-o/2;break;case"RIGHT_CENTER":c=r.x-i,a=r.y-o/2;break;case"TOP_LEFT":c=r.x,a=r.y;break;case"TOP_RIGHT":c=r.x-i,a=r.y;break;case"BOTTOM_LEFT":c=r.x,a=r.y-o;break;case"BOTTOM_RIGHT":c=r.x-i,a=r.y-o;break;default:c=r.x-i/2,a=r.y-o/2}this.element.style.left=c+"px",this.element.style.top=a+"px",this.element.style.transform=`translateX(${this.opts.offsetX||0}px) translateY(${this.opts.offsetY||0}px)`,this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}onRemove(){this.element&&this.element.remove()}setOptions(n){const{element:r,...o}=n;this.element=r,this.opts=o,this.draw()}}}let se;const oe=["bounds_changed","center_changed","click","contextmenu","dblclick","drag","dragend","dragstart","heading_changed","idle","isfractionalzoomenabled_changed","mapcapabilities_changed","maptypeid_changed","mousemove","mouseout","mouseover","projection_changed","renderingtype_changed","rightclick","tilesloaded","tilt_changed","zoom_changed"],Oe=l.defineComponent({props:{apiPromise:{type:Promise},apiKey:{type:String,default:""},version:{type:String,default:"weekly"},libraries:{type:Array,default:()=>["places","marker"]},region:{type:String,required:!1},language:{type:String,required:!1},backgroundColor:{type:String,required:!1},center:{type:Object,default:()=>({lat:0,lng:0})},clickableIcons:{type:Boolean,required:!1,default:void 0},controlSize:{type:Number,required:!1},disableDefaultUi:{type:Boolean,required:!1,default:void 0},disableDoubleClickZoom:{type:Boolean,required:!1,default:void 0},draggable:{type:Boolean,required:!1,default:void 0},draggableCursor:{type:String,required:!1},draggingCursor:{type:String,required:!1},fullscreenControl:{type:Boolean,required:!1,default:void 0},fullscreenControlPosition:{type:String,required:!1},gestureHandling:{type:String,required:!1},heading:{type:Number,required:!1},isFractionalZoomEnabled:{type:Boolean,required:!1,default:void 0},keyboardShortcuts:{type:Boolean,required:!1,default:void 0},mapTypeControl:{type:Boolean,required:!1,default:void 0},mapTypeControlOptions:{type:Object,required:!1},mapTypeId:{type:[Number,String],required:!1},mapId:{type:String,required:!1},maxZoom:{type:Number,required:!1},minZoom:{type:Number,required:!1},noClear:{type:Boolean,required:!1,default:void 0},panControl:{type:Boolean,required:!1,default:void 0},panControlPosition:{type:String,required:!1},restriction:{type:Object,required:!1},rotateControl:{type:Boolean,required:!1,default:void 0},rotateControlPosition:{type:String,required:!1},scaleControl:{type:Boolean,required:!1,default:void 0},scaleControlStyle:{type:Number,required:!1},scrollwheel:{type:Boolean,required:!1,default:void 0},streetView:{type:Object,required:!1},streetViewControl:{type:Boolean,required:!1,default:void 0},streetViewControlPosition:{type:String,required:!1},styles:{type:Array,required:!1},tilt:{type:Number,required:!1},zoom:{type:Number,required:!1},zoomControl:{type:Boolean,required:!1,default:void 0},zoomControlPosition:{type:String,required:!1},nonce:{type:String,default:""}},emits:oe,setup(s,{emit:e}){const t=l.ref(),n=l.ref(!1),r=l.ref(),o=l.ref(),i=l.ref(!1);l.provide(O,r),l.provide(I,o),l.provide(ne,i);const c=()=>{const u={...s};Object.keys(u).forEach(m=>{u[m]===void 0&&delete u[m]});const f=m=>{var y;return m?{position:(y=o.value)==null?void 0:y.ControlPosition[m]}:{}},g={scaleControlOptions:s.scaleControlStyle?{style:s.scaleControlStyle}:{},panControlOptions:f(s.panControlPosition),zoomControlOptions:f(s.zoomControlPosition),rotateControlOptions:f(s.rotateControlPosition),streetViewControlOptions:f(s.streetViewControlPosition),fullscreenControlOptions:f(s.fullscreenControlPosition),disableDefaultUI:s.disableDefaultUi};return{...u,...g}},a=l.watch([o,r],([u,p])=>{const f=u,g=p;f&&g&&(f.event.addListenerOnce(g,"tilesloaded",()=>{i.value=!0}),setTimeout(a,0))},{immediate:!0}),h=()=>{try{const{apiKey:u,region:p,version:f,language:g,libraries:m,nonce:y}=s;se=new T({apiKey:u,region:p,version:f,language:g,libraries:m,nonce:y})}catch(u){console.error(u)}},d=u=>{o.value=l.markRaw(u.maps),r.value=l.markRaw(new u.maps.Map(t.value,c()));const p=Ee(o.value);o.value[D]=p,oe.forEach(g=>{var m;(m=r.value)==null||m.addListener(g,y=>e(g,y))}),n.value=!0;const f=Object.keys(s).filter(g=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom","nonce"].includes(g)).map(g=>l.toRef(s,g));l.watch([()=>s.center,()=>s.zoom,...f],([g,m],[y,v])=>{var P,C,L;const{center:k,zoom:_,...E}=c();(P=r.value)==null||P.setOptions(E),m!==void 0&&m!==v&&((C=r.value)==null||C.setZoom(m));const b=!y||g.lng!==y.lng||g.lat!==y.lat;g&&b&&((L=r.value)==null||L.panTo(g))})};return l.onMounted(()=>{s.apiPromise&&s.apiPromise instanceof Promise?s.apiPromise.then(d):(h(),se.load().then(d))}),l.onBeforeUnmount(()=>{var u;i.value=!1,r.value&&((u=o.value)==null||u.event.clearInstanceListeners(r.value))}),{mapRef:t,ready:n,map:r,api:o,mapTilesLoaded:i}}}),vt="",F=(s,e)=>{const t=s.__vccOpts||s;for(const[n,r]of e)t[n]=r;return t},Pe={ref:"mapRef",class:"mapdiv"};function Se(s,e,t,n,r,o){return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",Pe,null,512),l.renderSlot(s.$slots,"default",l.normalizeProps(l.guardReactiveProps({ready:s.ready,map:s.map,api:s.api,mapTilesLoaded:s.mapTilesLoaded})),void 0,!0)])}const Le=F(Oe,[["render",Se],["__scopeId","data-v-104539fc"]]);function xe(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ae=function s(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!s(e[r],t[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){var i=o[r];if(!s(e[i],t[i]))return!1}return!0}return e!==e&&t!==t};const S=xe(Ae),ie=["click","drag","dragend","dragstart","gmp-click"],Ie=l.defineComponent({name:"AdvancedMarker",props:{options:{type:Object,required:!0},pinOptions:{type:Object,required:!1}},emits:ie,setup(s,{emit:e,expose:t,slots:n}){const r=l.toRef(s,"options"),o=l.toRef(s,"pinOptions"),i=l.ref(),c=l.inject(O,l.ref()),a=l.inject(I,l.ref()),h=l.inject(H,l.ref()),d=l.computed(()=>!!(h.value&&a.value&&i.value instanceof google.maps.marker.AdvancedMarkerElement));return l.watch([c,r,o],async(u,[p,f,g])=>{var _,E,b;const y=!S(r.value,f)||!S(o.value,g)||c.value!==p;if(!c.value||!a.value||!y)return;const{AdvancedMarkerElement:v,PinElement:k}=a.value.marker;if(i.value){const{map:P,content:C,...L}=r.value;Object.assign(i.value,{content:o.value?new k(o.value).element:C,...L}),d.value&&((_=h.value)==null||_.removeMarker(i.value),(E=h.value)==null||E.addMarker(i.value))}else o.value&&(r.value.content=new k(o.value).element),i.value=l.markRaw(new v(r.value)),d.value?(b=h.value)==null||b.addMarker(i.value):i.value.map=c.value,ie.forEach(P=>{var C;(C=i.value)==null||C.addListener(P,L=>e(P,L))})},{immediate:!0}),l.onBeforeUnmount(()=>{var u,p;i.value&&((u=a.value)==null||u.event.clearInstanceListeners(i.value),d.value?(p=h.value)==null||p.removeMarker(i.value):i.value.map=null)}),l.provide(G,i),t({marker:i}),()=>{var u;return(u=n.default)==null?void 0:u.call(n)}}}),Te=s=>s==="Marker",Re=s=>s===D,$=(s,e,t,n)=>{const r=l.ref(),o=l.inject(O,l.ref()),i=l.inject(I,l.ref()),c=l.inject(H,l.ref()),a=l.computed(()=>!!(c.value&&i.value&&(r.value instanceof i.value.Marker||r.value instanceof i.value[D])));return l.watch([o,t],(h,[d,u])=>{var f,g,m;const p=!S(t.value,u)||o.value!==d;!o.value||!i.value||!p||(r.value?(r.value.setOptions(t.value),a.value&&((f=c.value)==null||f.removeMarker(r.value),(g=c.value)==null||g.addMarker(r.value))):(Te(s)?r.value=l.markRaw(new i.value[s](t.value)):Re(s)?r.value=l.markRaw(new i.value[s](t.value)):r.value=l.markRaw(new i.value[s]({...t.value,map:o.value})),a.value?(m=c.value)==null||m.addMarker(r.value):r.value.setMap(o.value),e.forEach(y=>{var v;(v=r.value)==null||v.addListener(y,k=>n(y,k))})))},{immediate:!0}),l.onBeforeUnmount(()=>{var h,d;r.value&&((h=i.value)==null||h.event.clearInstanceListeners(r.value),a.value?(d=c.value)==null||d.removeMarker(r.value):r.value.setMap(null))}),r},ae=["animation_changed","click","dblclick","rightclick","dragstart","dragend","drag","mouseover","mousedown","mouseout","mouseup","draggable_changed","clickable_changed","contextmenu","cursor_changed","flat_changed","rightclick","zindex_changed","icon_changed","position_changed","shape_changed","title_changed","visible_changed"],je=l.defineComponent({name:"Marker",props:{options:{type:Object,required:!0}},emits:ae,setup(s,{emit:e,expose:t,slots:n}){const r=l.toRef(s,"options"),o=$("Marker",ae,r,e);return l.provide(G,o),t({marker:o}),()=>{var i;return(i=n.default)==null?void 0:i.call(n)}}}),Be=l.defineComponent({name:"Polyline",props:{options:{type:Object,required:!0}},emits:j,setup(s,{emit:e}){const t=l.toRef(s,"options");return{polyline:$("Polyline",j,t,e)}},render:()=>null}),$e=l.defineComponent({name:"Polygon",props:{options:{type:Object,required:!0}},emits:j,setup(s,{emit:e}){const t=l.toRef(s,"options");return{polygon:$("Polygon",j,t,e)}},render:()=>null}),le=j.concat(["bounds_changed"]),qe=l.defineComponent({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:le,setup(s,{emit:e}){const t=l.toRef(s,"options");return{rectangle:$("Rectangle",le,t,e)}},render:()=>null}),ce=j.concat(["center_changed","radius_changed"]),Ne=l.defineComponent({name:"Circle",props:{options:{type:Object,required:!0}},emits:ce,setup(s,{emit:e}){const t=l.toRef(s,"options");return{circle:$("Circle",ce,t,e)}},render:()=>null}),Ze=l.defineComponent({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(s,{emit:e}){const t=l.ref(null),n=l.inject(O,l.ref()),r=l.inject(I,l.ref()),o=l.inject(ne,l.ref(!1)),i=l.watch([o,r,t],([h,d,u])=>{d&&h&&u&&(c(s.position),e("content:loaded"),setTimeout(i,0))},{immediate:!0}),c=h=>{if(n.value&&r.value&&t.value){const d=r.value.ControlPosition[h];n.value.controls[d].push(t.value)}},a=h=>{if(n.value&&r.value){let d=null;const u=r.value.ControlPosition[h];n.value.controls[u].forEach((p,f)=>{p===t.value&&(d=f)}),d!==null&&n.value.controls[u].removeAt(d)}};return l.onBeforeUnmount(()=>a(s.position)),l.watch(()=>s.position,(h,d)=>{a(d),c(h)}),l.watch(()=>s.index,h=>{h&&t.value&&(t.value.index=s.index)}),{controlRef:t}}}),wt="",Ue={ref:"controlRef",class:"custom-control-wrapper"};function De(s,e,t,n,r,o){return l.openBlock(),l.createElementBlock("div",Ue,[l.renderSlot(s.$slots,"default",{},void 0,!0)],512)}const Fe=F(Ze,[["render",De],["__scopeId","data-v-268ef28d"]]),ue=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"],Ve=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[...ue,"update:modelValue"],setup(s,{slots:e,emit:t,expose:n}){const r=l.ref(),o=l.ref(),i=l.inject(O,l.ref()),c=l.inject(I,l.ref()),a=l.inject(G,l.ref());let h,d=s.modelValue;const u=l.computed(()=>{var m;return(m=e.default)==null?void 0:m.call(e).some(y=>y.type!==l.Comment)}),p=m=>{d=m,t("update:modelValue",m)},f=m=>{r.value&&(r.value.open({map:i.value,anchor:a.value,...m}),p(!0))},g=()=>{r.value&&(r.value.close(),p(!1))};return l.onMounted(()=>{l.watch([i,()=>s.options],([m,y],[v,k])=>{var E;const _=!S(y,k)||i.value!==v;i.value&&c.value&&_&&(r.value?(r.value.setOptions({...y,content:u.value?o.value:y.content}),a.value||f()):(r.value=l.markRaw(new c.value.InfoWindow({...y,content:u.value?o.value:y.content})),a.value&&(h=a.value.addListener("click",()=>{f()})),(!a.value||d)&&f(),ue.forEach(b=>{var P;(P=r.value)==null||P.addListener(b,C=>t(b,C))}),(E=r.value)==null||E.addListener("closeclick",()=>p(!1))))},{immediate:!0}),l.watch(()=>s.modelValue,m=>{m!==d&&(m?f():g())})}),l.onBeforeUnmount(()=>{var m;h&&h.remove(),r.value&&((m=c.value)==null||m.event.clearInstanceListeners(r.value),g())}),n({infoWindow:r,open:f,close:g}),{infoWindow:r,infoWindowRef:o,hasSlotContent:u,open:f,close:g}}}),kt="",ze={key:0,class:"info-window-wrapper"};function Ge(s,e,t,n,r,o){return s.hasSlotContent?(l.openBlock(),l.createElementBlock("div",ze,[l.createElementVNode("div",l.mergeProps({ref:"infoWindowRef"},s.$attrs),[l.renderSlot(s.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("",!0)}const He=F(Ve,[["render",Ge],["__scopeId","data-v-f929b615"]]),de=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],W=1,N=8;class K{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[t,n]=new Uint8Array(e,0,2);if(t!==219)throw new Error("Data does not appear to be in a KDBush format.");const r=n>>4;if(r!==W)throw new Error(`Got v${r} data when expected v${W}.`);const o=de[n&15];if(!o)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(e,2,1),[c]=new Uint32Array(e,4,1);return new K(c,i,o,e)}constructor(e,t=64,n=Float64Array,r){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const o=de.indexOf(this.ArrayType),i=e*2*this.ArrayType.BYTES_PER_ELEMENT,c=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-c%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${n}.`);r&&r instanceof ArrayBuffer?(this.data=r,this.ids=new this.IndexArrayType(this.data,N,e),this.coords=new this.ArrayType(this.data,N+c+a,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(N+i+c+a),this.ids=new this.IndexArrayType(this.data,N,e),this.coords=new this.ArrayType(this.data,N+c+a,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(W<<4)+o]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=t,n}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return J(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:i,nodeSize:c}=this,a=[0,o.length-1,0],h=[];for(;a.length;){const d=a.pop()||0,u=a.pop()||0,p=a.pop()||0;if(u-p<=c){for(let y=p;y<=u;y++){const v=i[2*y],k=i[2*y+1];v>=e&&v<=n&&k>=t&&k<=r&&h.push(o[y])}continue}const f=p+u>>1,g=i[2*f],m=i[2*f+1];g>=e&&g<=n&&m>=t&&m<=r&&h.push(o[f]),(d===0?e<=g:t<=m)&&(a.push(p),a.push(f-1),a.push(1-d)),(d===0?n>=g:r>=m)&&(a.push(f+1),a.push(u),a.push(1-d))}return h}within(e,t,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:r,coords:o,nodeSize:i}=this,c=[0,r.length-1,0],a=[],h=n*n;for(;c.length;){const d=c.pop()||0,u=c.pop()||0,p=c.pop()||0;if(u-p<=i){for(let y=p;y<=u;y++)pe(o[2*y],o[2*y+1],e,t)<=h&&a.push(r[y]);continue}const f=p+u>>1,g=o[2*f],m=o[2*f+1];pe(g,m,e,t)<=h&&a.push(r[f]),(d===0?e-n<=g:t-n<=m)&&(c.push(p),c.push(f-1),c.push(1-d)),(d===0?e+n>=g:t+n>=m)&&(c.push(f+1),c.push(u),c.push(1-d))}return a}}function J(s,e,t,n,r,o){if(r-n<=t)return;const i=n+r>>1;he(s,e,i,n,r,o),J(s,e,t,n,i-1,1-o),J(s,e,t,i+1,r,1-o)}function he(s,e,t,n,r,o){for(;r>n;){if(r-n>600){const h=r-n+1,d=t-n+1,u=Math.log(h),p=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*p*(h-p)/h)*(d-h/2<0?-1:1),g=Math.max(n,Math.floor(t-d*p/h+f)),m=Math.min(r,Math.floor(t+(h-d)*p/h+f));he(s,e,t,g,m,o)}const i=e[2*t+o];let c=n,a=r;for(Z(s,e,n,t),e[2*r+o]>i&&Z(s,e,n,r);c<a;){for(Z(s,e,c,a),c++,a--;e[2*c+o]<i;)c++;for(;e[2*a+o]>i;)a--}e[2*n+o]===i?Z(s,e,n,a):(a++,Z(s,e,a,r)),a<=t&&(n=a+1),t<=a&&(r=a-1)}}function Z(s,e,t,n){Y(s,t,n),Y(e,2*t,2*n),Y(e,2*t+1,2*n+1)}function Y(s,e,t){const n=s[e];s[e]=s[t],s[t]=n}function pe(s,e,t,n){const r=s-t,o=e-n;return r*r+o*o}const We={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:s=>s},fe=Math.fround||(s=>e=>(s[0]=+e,s[0]))(new Float32Array(1)),R=2,x=3,X=4,A=5,me=6;class ge{constructor(e){this.options=Object.assign(Object.create(We),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:n,maxZoom:r}=this.options;t&&console.time("total time");const o=`prepare ${e.length} points`;t&&console.time(o),this.points=e;const i=[];for(let a=0;a<e.length;a++){const h=e[a];if(!h.geometry)continue;const[d,u]=h.geometry.coordinates,p=fe(V(d)),f=fe(z(u));i.push(p,f,1/0,a,-1,1),this.options.reduce&&i.push(0)}let c=this.trees[r+1]=this._createTree(i);t&&console.timeEnd(o);for(let a=r;a>=n;a--){const h=+Date.now();c=this.trees[a]=this._createTree(this._cluster(c,a)),t&&console.log("z%d: %d clusters in %dms",a,c.numItems,+Date.now()-h)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let n=((e[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,e[1]));let o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,o=180;else if(n>o){const u=this.getClusters([n,r,180,i],t),p=this.getClusters([-180,r,o,i],t);return u.concat(p)}const c=this.trees[this._limitZoom(t)],a=c.range(V(n),z(i),V(o),z(r)),h=c.data,d=[];for(const u of a){const p=this.stride*u;d.push(h[p+A]>1?ye(h,p,this.clusterProps):this.points[h[p+x]])}return d}getChildren(e){const t=this._getOriginId(e),n=this._getOriginZoom(e),r="No cluster with the specified id.",o=this.trees[n];if(!o)throw new Error(r);const i=o.data;if(t*this.stride>=i.length)throw new Error(r);const c=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=i[t*this.stride],h=i[t*this.stride+1],d=o.within(a,h,c),u=[];for(const p of d){const f=p*this.stride;i[f+X]===e&&u.push(i[f+A]>1?ye(i,f,this.clusterProps):this.points[i[f+x]])}if(u.length===0)throw new Error(r);return u}getLeaves(e,t,n){t=t||10,n=n||0;const r=[];return this._appendLeaves(r,e,t,n,0),r}getTile(e,t,n){const r=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:i,radius:c}=this.options,a=c/i,h=(n-a)/o,d=(n+1+a)/o,u={features:[]};return this._addTileFeatures(r.range((t-a)/o,h,(t+1+a)/o,d),r.data,t,n,o,u),t===0&&this._addTileFeatures(r.range(1-a/o,h,1,d),r.data,o,n,o,u),t===o-1&&this._addTileFeatures(r.range(0,h,a/o,d),r.data,-1,n,o,u),u.features.length?u:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const n=this.getChildren(e);if(t++,n.length!==1)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,r,o){const i=this.getChildren(t);for(const c of i){const a=c.properties;if(a&&a.cluster?o+a.point_count<=r?o+=a.point_count:o=this._appendLeaves(e,a.cluster_id,n,r,o):o<r?o++:e.push(c),e.length===n)break}return o}_createTree(e){const t=new K(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let n=0;n<e.length;n+=this.stride)t.add(e[n],e[n+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,n,r,o,i){for(const c of e){const a=c*this.stride,h=t[a+A]>1;let d,u,p;if(h)d=ve(t,a,this.clusterProps),u=t[a],p=t[a+1];else{const m=this.points[t[a+x]];d=m.properties;const[y,v]=m.geometry.coordinates;u=V(y),p=z(v)}const f={type:1,geometry:[[Math.round(this.options.extent*(u*o-n)),Math.round(this.options.extent*(p*o-r))]],tags:d};let g;h||this.options.generateId?g=t[a+x]:g=this.points[t[a+x]].id,g!==void 0&&(f.id=g),i.features.push(f)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:n,extent:r,reduce:o,minPoints:i}=this.options,c=n/(r*Math.pow(2,t)),a=e.data,h=[],d=this.stride;for(let u=0;u<a.length;u+=d){if(a[u+R]<=t)continue;a[u+R]=t;const p=a[u],f=a[u+1],g=e.within(a[u],a[u+1],c),m=a[u+A];let y=m;for(const v of g){const k=v*d;a[k+R]>t&&(y+=a[k+A])}if(y>m&&y>=i){let v=p*m,k=f*m,_,E=-1;const b=((u/d|0)<<5)+(t+1)+this.points.length;for(const P of g){const C=P*d;if(a[C+R]<=t)continue;a[C+R]=t;const L=a[C+A];v+=a[C]*L,k+=a[C+1]*L,a[C+X]=b,o&&(_||(_=this._map(a,u,!0),E=this.clusterProps.length,this.clusterProps.push(_)),o(_,this._map(a,C)))}a[u+X]=b,h.push(v/y,k/y,1/0,b,-1,y),o&&h.push(E)}else{for(let v=0;v<d;v++)h.push(a[u+v]);if(y>1)for(const v of g){const k=v*d;if(!(a[k+R]<=t)){a[k+R]=t;for(let _=0;_<d;_++)h.push(a[k+_])}}}}return h}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,n){if(e[t+A]>1){const i=this.clusterProps[e[t+me]];return n?Object.assign({},i):i}const r=this.points[e[t+x]].properties,o=this.options.map(r);return n&&o===r?Object.assign({},o):o}}function ye(s,e,t){return{type:"Feature",id:s[e+x],properties:ve(s,e,t),geometry:{type:"Point",coordinates:[Ke(s[e]),Je(s[e+1])]}}}function ve(s,e,t){const n=s[e+A],r=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?`${Math.round(n/100)/10}k`:n,o=s[e+me],i=o===-1?{}:Object.assign({},t[o]);return Object.assign(i,{cluster:!0,cluster_id:s[e+x],point_count:n,point_count_abbreviated:r})}function V(s){return s/360+.5}function z(s){const e=Math.sin(s*Math.PI/180),t=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return t<0?0:t>1?1:t}function Ke(s){return(s-.5)*360}function Je(s){const e=(180-s*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
16
16
  Copyright (c) Microsoft Corporation.
17
17
 
18
18
  Permission to use, copy, modify, and/or distribute this software for any
@@ -25,9 +25,9 @@
25
25
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
26
26
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
27
27
  PERFORMANCE OF THIS SOFTWARE.
28
- ***************************************************************************** */function Y(r,e){var t={};for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&e.indexOf(s)<0&&(t[s]=r[s]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,s=Object.getOwnPropertySymbols(r);n<s.length;n++)e.indexOf(s[n])<0&&Object.prototype.propertyIsEnumerable.call(r,s[n])&&(t[s[n]]=r[s[n]]);return t}class k{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,t){this.isAdvancedMarker(e)?e.map=t:e.setMap(t)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class Z{constructor({markers:e,position:t}){this.markers=e,t&&(t instanceof google.maps.LatLng?this._position=t:this._position=new google.maps.LatLng(t))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const t of this.markers)e.extend(k.getPosition(t));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>k.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(k.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}const Ke=(r,e,t,s)=>{const n=we(r.getBounds(),e,s);return t.filter(o=>n.contains(k.getPosition(o)))},we=(r,e,t)=>{const{northEast:s,southWest:n}=Je(r,e),o=Ye({northEast:s,southWest:n},t);return Xe(o,e)},ve=(r,e,t)=>{const s=we(r,e,t),n=s.getNorthEast(),o=s.getSouthWest();return[o.lng(),o.lat(),n.lng(),n.lat()]},Je=(r,e)=>({northEast:e.fromLatLngToDivPixel(r.getNorthEast()),southWest:e.fromLatLngToDivPixel(r.getSouthWest())}),Ye=({northEast:r,southWest:e},t)=>(r.x+=t,r.y-=t,e.x-=t,e.y+=t,{northEast:r,southWest:e}),Xe=({northEast:r,southWest:e},t)=>{const s=t.fromDivPixelToLatLng(e),n=t.fromDivPixelToLatLng(r);return new google.maps.LatLngBounds(s,n)};class _e{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return et(e)}}class Qe extends _e{constructor(e){var{viewportPadding:t=60}=e,s=Y(e,["viewportPadding"]);super(s),this.viewportPadding=60,this.viewportPadding=t}calculate({markers:e,map:t,mapCanvasProjection:s}){return t.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:Ke(t,s,e,this.viewportPadding),map:t,mapCanvasProjection:s})}}}const et=r=>r.map(t=>new Z({position:k.getPosition(t),markers:[t]}));class tt extends _e{constructor(e){var{maxZoom:t,radius:s=60}=e,n=Y(e,["maxZoom","radius"]);super({maxZoom:t}),this.state={zoom:-1},this.superCluster=new me(Object.assign({maxZoom:this.maxZoom,radius:s},n))}calculate(e){let t=!1;const s={zoom:e.map.getZoom()};if(!I(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const n=this.markers.map(o=>{const a=k.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[a.lng(),a.lat()]},properties:{marker:o}}});this.superCluster.load(n)}return t||(this.state.zoom<=this.maxZoom||s.zoom<=this.maxZoom)&&(t=!I(this.state,s)),this.state=s,t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(t=>this.transformCluster(t))}transformCluster({geometry:{coordinates:[e,t]},properties:s}){if(s.cluster)return new Z({markers:this.superCluster.getLeaves(s.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:t,lng:e}});const n=s.marker;return new Z({markers:[n],position:k.getPosition(n)})}}class st extends Qe{constructor(e){var{maxZoom:t,radius:s=60,viewportPadding:n=60}=e,o=Y(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:t,viewportPadding:n}),this.superCluster=new me(Object.assign({maxZoom:this.maxZoom,radius:s},o)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const t={zoom:Math.round(e.map.getZoom()),view:ve(e.map.getBounds(),e.mapCanvasProjection,this.viewportPadding)};let s=!I(this.state,t);if(!I(e.markers,this.markers)){s=!0,this.markers=[...e.markers];const n=this.markers.map(o=>{const a=k.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[a.lng(),a.lat()]},properties:{marker:o}}});this.superCluster.load(n)}return s&&(this.clusters=this.cluster(e),this.state=t),{clusters:this.clusters,changed:s}}cluster({map:e,mapCanvasProjection:t}){const s={zoom:Math.round(e.getZoom()),view:ve(e.getBounds(),t,this.viewportPadding)};return this.superCluster.getClusters(s.view,s.zoom).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,t]},properties:s}){if(s.cluster)return new Z({markers:this.superCluster.getLeaves(s.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:t,lng:e}});const n=s.marker;return new Z({markers:[n],position:k.getPosition(n)})}}class nt{constructor(e,t){this.markers={sum:e.length};const s=t.map(o=>o.count),n=s.reduce((o,a)=>o+a,0);this.clusters={count:t.length,markers:{mean:n/t.length,sum:n,min:Math.min(...s),max:Math.max(...s)}}}}class rt{render({count:e,position:t},s,n){const a=`<svg fill="${e>Math.max(10,s.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
28
+ ***************************************************************************** */function Q(s,e){var t={};for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&e.indexOf(n)<0&&(t[n]=s[n]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(s);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(s,n[r])&&(t[n[r]]=s[n[r]]);return t}class M{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,t){this.isAdvancedMarker(e)?e.map=t:e.setMap(t)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class U{constructor({markers:e,position:t}){this.markers=e,t&&(t instanceof google.maps.LatLng?this._position=t:this._position=new google.maps.LatLng(t))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const t of this.markers)e.extend(M.getPosition(t));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>M.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(M.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}const Ye=(s,e,t,n)=>{const r=we(s.getBounds(),e,n);return t.filter(o=>r.contains(M.getPosition(o)))},we=(s,e,t)=>{const{northEast:n,southWest:r}=Xe(s,e),o=Qe({northEast:n,southWest:r},t);return et(o,e)},ke=(s,e,t)=>{const n=we(s,e,t),r=n.getNorthEast(),o=n.getSouthWest();return[o.lng(),o.lat(),r.lng(),r.lat()]},Xe=(s,e)=>({northEast:e.fromLatLngToDivPixel(s.getNorthEast()),southWest:e.fromLatLngToDivPixel(s.getSouthWest())}),Qe=({northEast:s,southWest:e},t)=>(s.x+=t,s.y-=t,e.x-=t,e.y+=t,{northEast:s,southWest:e}),et=({northEast:s,southWest:e},t)=>{const n=t.fromDivPixelToLatLng(e),r=t.fromDivPixelToLatLng(s);return new google.maps.LatLngBounds(n,r)};class _e{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return nt(e)}}class tt extends _e{constructor(e){var{viewportPadding:t=60}=e,n=Q(e,["viewportPadding"]);super(n),this.viewportPadding=60,this.viewportPadding=t}calculate({markers:e,map:t,mapCanvasProjection:n}){return t.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:Ye(t,n,e,this.viewportPadding),map:t,mapCanvasProjection:n})}}}const nt=s=>s.map(t=>new U({position:M.getPosition(t),markers:[t]}));class rt extends _e{constructor(e){var{maxZoom:t,radius:n=60}=e,r=Q(e,["maxZoom","radius"]);super({maxZoom:t}),this.state={zoom:-1},this.superCluster=new ge(Object.assign({maxZoom:this.maxZoom,radius:n},r))}calculate(e){let t=!1;const n={zoom:e.map.getZoom()};if(!S(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const r=this.markers.map(o=>{const i=M.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[i.lng(),i.lat()]},properties:{marker:o}}});this.superCluster.load(r)}return t||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(t=!S(this.state,n)),this.state=n,t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(t=>this.transformCluster(t))}transformCluster({geometry:{coordinates:[e,t]},properties:n}){if(n.cluster)return new U({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:t,lng:e}});const r=n.marker;return new U({markers:[r],position:M.getPosition(r)})}}class st extends tt{constructor(e){var{maxZoom:t,radius:n=60,viewportPadding:r=60}=e,o=Q(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:t,viewportPadding:r}),this.superCluster=new ge(Object.assign({maxZoom:this.maxZoom,radius:n},o)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const t={zoom:Math.round(e.map.getZoom()),view:ke(e.map.getBounds(),e.mapCanvasProjection,this.viewportPadding)};let n=!S(this.state,t);if(!S(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const r=this.markers.map(o=>{const i=M.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[i.lng(),i.lat()]},properties:{marker:o}}});this.superCluster.load(r)}return n&&(this.clusters=this.cluster(e),this.state=t),{clusters:this.clusters,changed:n}}cluster({map:e,mapCanvasProjection:t}){const n={zoom:Math.round(e.getZoom()),view:ke(e.getBounds(),t,this.viewportPadding)};return this.superCluster.getClusters(n.view,n.zoom).map(r=>this.transformCluster(r))}transformCluster({geometry:{coordinates:[e,t]},properties:n}){if(n.cluster)return new U({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:t,lng:e}});const r=n.marker;return new U({markers:[r],position:M.getPosition(r)})}}class ot{constructor(e,t){this.markers={sum:e.length};const n=t.map(o=>o.count),r=n.reduce((o,i)=>o+i,0);this.clusters={count:t.length,markers:{mean:r/t.length,sum:r,min:Math.min(...n),max:Math.max(...n)}}}}class it{render({count:e,position:t},n,r){const i=`<svg fill="${e>Math.max(10,n.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
29
29
  <circle cx="120" cy="120" opacity=".6" r="70" />
30
30
  <circle cx="120" cy="120" opacity=".3" r="90" />
31
31
  <circle cx="120" cy="120" opacity=".2" r="110" />
32
32
  <text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
33
- </svg>`,c=`Cluster of ${e} markers`,i=Number(google.maps.Marker.MAX_ZINDEX)+e;if(k.isAdvancedMarkerAvailable(n)){const d=document.createElement("div");d.innerHTML=a;const u=d.firstElementChild;u.setAttribute("transform","translate(0 25)");const p={map:n,position:t,zIndex:i,title:c,content:u};return new google.maps.marker.AdvancedMarkerElement(p)}const h={position:t,zIndex:i,title:c,icon:{url:`data:image/svg+xml;base64,${btoa(a)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(h)}}function ot(r,e){for(let t in e.prototype)r.prototype[t]=e.prototype[t]}class X{constructor(){ot(X,google.maps.OverlayView)}}var $;(function(r){r.CLUSTERING_BEGIN="clusteringbegin",r.CLUSTERING_END="clusteringend",r.CLUSTER_CLICK="click"})($||($={}));const it=(r,e,t)=>{t.fitBounds(e.bounds)};class at extends X{constructor({map:e,markers:t=[],algorithmOptions:s={},algorithm:n=new tt(s),renderer:o=new rt,onClusterClick:a=it}){super(),this.markers=[...t],this.clusters=[],this.algorithm=n,this.renderer=o,this.onClusterClick=a,e&&this.setMap(e)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach(s=>{this.addMarker(s,!0)}),t||this.render()}removeMarker(e,t){const s=this.markers.indexOf(e);return s===-1?!1:(k.setMap(e,null),this.markers.splice(s,1),t||this.render(),!0)}removeMarkers(e,t){let s=!1;return e.forEach(n=>{s=this.removeMarker(n,!0)||s}),s&&!t&&this.render(),s}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,$.CLUSTERING_BEGIN,this);const{clusters:t,changed:s}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(s||s==null){const n=new Set;for(const a of t)a.markers.length==1&&n.add(a.markers[0]);const o=[];for(const a of this.clusters)a.marker!=null&&(a.markers.length==1?n.has(a.marker)||k.setMap(a.marker,null):o.push(a.marker));this.clusters=t,this.renderClusters(),requestAnimationFrame(()=>o.forEach(a=>k.setMap(a,null)))}google.maps.event.trigger(this,$.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>k.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new nt(this.markers,this.clusters),t=this.getMap();this.clusters.forEach(s=>{s.markers.length===1?s.marker=s.markers[0]:(s.marker=this.renderer.render(s,e,t),s.markers.forEach(n=>k.setMap(n,null)),this.onClusterClick&&s.marker.addListener("click",n=>{google.maps.event.trigger(this,$.CLUSTER_CLICK,s),this.onClusterClick(n,s,t)})),k.setMap(s.marker,t)})}}const ke=Object.values($),lt=l.defineComponent({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})}},emits:ke,setup(r,{emit:e,expose:t,slots:s}){const n=l.ref(),o=l.inject(b,l.ref()),a=l.inject(T,l.ref());return l.provide(te,n),l.watch(o,()=>{o.value&&(n.value=l.markRaw(new at({map:o.value,algorithm:new st(r.options.algorithmOptions??{}),...r.options})),ke.forEach(c=>{var i;(i=n.value)==null||i.addListener(c,h=>e(c,h))}))},{immediate:!0}),l.onBeforeUnmount(()=>{var c;n.value&&((c=a.value)==null||c.event.clearInstanceListeners(n.value),n.value.clearMarkers(),n.value.setMap(null))}),t({markerCluster:n}),()=>{var c;return(c=s.default)==null?void 0:c.call(s)}}}),ct=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(r,{slots:e,emit:t,expose:s}){const n=l.ref(),o=l.computed(()=>{var i;return(i=e.default)==null?void 0:i.call(e).some(h=>h.type!==l.Comment)}),a=l.computed(()=>({...r.options,element:n.value})),c=B(D,[],a,t);return s({customMarker:c}),{customMarkerRef:n,customMarker:c,hasSlotContent:o}}}),vt="",ut={key:0,class:"custom-marker-wrapper"};function dt(r,e,t,s,n,o){return r.hasSlotContent?(l.openBlock(),l.createElementBlock("div",ut,[l.createElementVNode("div",l.mergeProps({ref:"customMarkerRef",style:{cursor:r.$attrs.onClick?"pointer":void 0}},r.$attrs),[l.renderSlot(r.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("",!0)}const ht=F(ct,[["render",dt],["__scopeId","data-v-4b2eafc1"]]),pt=l.defineComponent({name:"HeatmapLayer",props:{options:{type:Object,default:()=>({})}},setup(r){const e=l.ref(),t=l.inject(b,l.ref()),s=l.inject(T,l.ref());return l.watch([t,()=>r.options],([n,o],[a,c])=>{var h;const i=!I(o,c)||t.value!==a;if(t.value&&s.value&&i){const d=structuredClone(o);if(d.data&&!(d.data instanceof s.value.MVCArray)){const u=s.value.LatLng;d.data=(h=d.data)==null?void 0:h.map(p=>p instanceof u||"location"in p&&(p.location instanceof u||p.location===null)?p:"location"in p?{...p,location:new u(p.location)}:new u(p))}e.value?e.value.setOptions(d):e.value=l.markRaw(new s.value.visualization.HeatmapLayer({...d,map:t.value}))}},{immediate:!0}),l.onBeforeUnmount(()=>{e.value&&e.value.setMap(null)}),{heatmapLayer:e}},render:()=>null});v.Circle=$e,v.CustomControl=Ue,v.CustomMarker=ht,v.GoogleMap=Se,v.HeatmapLayer=pt,v.InfoWindow=ze,v.Marker=Te,v.MarkerCluster=lt,v.Polygon=je,v.Polyline=Re,v.Rectangle=Be,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
33
+ </svg>`,c=`Cluster of ${e} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+e;if(M.isAdvancedMarkerAvailable(r)){const d=document.createElement("div");d.innerHTML=i;const u=d.firstElementChild;u.setAttribute("transform","translate(0 25)");const p={map:r,position:t,zIndex:a,title:c,content:u};return new google.maps.marker.AdvancedMarkerElement(p)}const h={position:t,zIndex:a,title:c,icon:{url:`data:image/svg+xml;base64,${btoa(i)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(h)}}function at(s,e){for(let t in e.prototype)s.prototype[t]=e.prototype[t]}class ee{constructor(){at(ee,google.maps.OverlayView)}}var q;(function(s){s.CLUSTERING_BEGIN="clusteringbegin",s.CLUSTERING_END="clusteringend",s.CLUSTER_CLICK="click"})(q||(q={}));const lt=(s,e,t)=>{t.fitBounds(e.bounds)};class ct extends ee{constructor({map:e,markers:t=[],algorithmOptions:n={},algorithm:r=new rt(n),renderer:o=new it,onClusterClick:i=lt}){super(),this.markers=[...t],this.clusters=[],this.algorithm=r,this.renderer=o,this.onClusterClick=i,e&&this.setMap(e)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach(n=>{this.addMarker(n,!0)}),t||this.render()}removeMarker(e,t){const n=this.markers.indexOf(e);return n===-1?!1:(M.setMap(e,null),this.markers.splice(n,1),t||this.render(),!0)}removeMarkers(e,t){let n=!1;return e.forEach(r=>{n=this.removeMarker(r,!0)||n}),n&&!t&&this.render(),n}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,q.CLUSTERING_BEGIN,this);const{clusters:t,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||n==null){const r=new Set;for(const i of t)i.markers.length==1&&r.add(i.markers[0]);const o=[];for(const i of this.clusters)i.marker!=null&&(i.markers.length==1?r.has(i.marker)||M.setMap(i.marker,null):o.push(i.marker));this.clusters=t,this.renderClusters(),requestAnimationFrame(()=>o.forEach(i=>M.setMap(i,null)))}google.maps.event.trigger(this,q.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>M.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new ot(this.markers,this.clusters),t=this.getMap();this.clusters.forEach(n=>{n.markers.length===1?n.marker=n.markers[0]:(n.marker=this.renderer.render(n,e,t),n.markers.forEach(r=>M.setMap(r,null)),this.onClusterClick&&n.marker.addListener("click",r=>{google.maps.event.trigger(this,q.CLUSTER_CLICK,n),this.onClusterClick(r,n,t)})),M.setMap(n.marker,t)})}}const Ce=Object.values(q),ut=l.defineComponent({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})}},emits:Ce,setup(s,{emit:e,expose:t,slots:n}){const r=l.ref(),o=l.inject(O,l.ref()),i=l.inject(I,l.ref());return l.provide(H,r),l.watch(o,()=>{o.value&&(r.value=l.markRaw(new ct({map:o.value,algorithm:new st(s.options.algorithmOptions??{}),...s.options})),Ce.forEach(c=>{var a;(a=r.value)==null||a.addListener(c,h=>e(c,h))}))},{immediate:!0}),l.onBeforeUnmount(()=>{var c;r.value&&((c=i.value)==null||c.event.clearInstanceListeners(r.value),r.value.clearMarkers(),r.value.setMap(null))}),t({markerCluster:r}),()=>{var c;return(c=n.default)==null?void 0:c.call(n)}}}),dt=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(s,{slots:e,emit:t,expose:n}){const r=l.ref(),o=l.computed(()=>{var a;return(a=e.default)==null?void 0:a.call(e).some(h=>h.type!==l.Comment)}),i=l.computed(()=>({...s.options,element:r.value})),c=$(D,[],i,t);return n({customMarker:c}),{customMarkerRef:r,customMarker:c,hasSlotContent:o}}}),_t="",ht={key:0,class:"custom-marker-wrapper"};function pt(s,e,t,n,r,o){return s.hasSlotContent?(l.openBlock(),l.createElementBlock("div",ht,[l.createElementVNode("div",l.mergeProps({ref:"customMarkerRef",style:{cursor:s.$attrs.onClick?"pointer":void 0}},s.$attrs),[l.renderSlot(s.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("",!0)}const ft=F(dt,[["render",pt],["__scopeId","data-v-4b2eafc1"]]),mt=l.defineComponent({name:"HeatmapLayer",props:{options:{type:Object,default:()=>({})}},setup(s){const e=l.ref(),t=l.inject(O,l.ref()),n=l.inject(I,l.ref());return l.watch([t,()=>s.options],([r,o],[i,c])=>{var h;const a=!S(o,c)||t.value!==i;if(t.value&&n.value&&a){const d=structuredClone(o);if(d.data&&!(d.data instanceof n.value.MVCArray)){const u=n.value.LatLng;d.data=(h=d.data)==null?void 0:h.map(p=>p instanceof u||"location"in p&&(p.location instanceof u||p.location===null)?p:"location"in p?{...p,location:new u(p.location)}:new u(p))}e.value?e.value.setOptions(d):e.value=l.markRaw(new n.value.visualization.HeatmapLayer({...d,map:t.value}))}},{immediate:!0}),l.onBeforeUnmount(()=>{e.value&&e.value.setMap(null)}),{heatmapLayer:e}},render:()=>null});w.AdvancedMarker=Ie,w.Circle=Ne,w.CustomControl=Fe,w.CustomMarker=ft,w.GoogleMap=Le,w.HeatmapLayer=mt,w.InfoWindow=He,w.Marker=je,w.MarkerCluster=ut,w.Polygon=$e,w.Polyline=Be,w.Rectangle=qe,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,26 @@
1
+ /// <reference types="google.maps" />
2
+ import { PropType } from "vue";
3
+ declare const _default: import("vue").DefineComponent<{
4
+ options: {
5
+ type: PropType<google.maps.marker.AdvancedMarkerElementOptions>;
6
+ required: true;
7
+ };
8
+ pinOptions: {
9
+ type: PropType<google.maps.marker.PinElementOptions>;
10
+ required: false;
11
+ };
12
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
13
+ [key: string]: any;
14
+ }>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
+ options: {
16
+ type: PropType<google.maps.marker.AdvancedMarkerElementOptions>;
17
+ required: true;
18
+ };
19
+ pinOptions: {
20
+ type: PropType<google.maps.marker.PinElementOptions>;
21
+ required: false;
22
+ };
23
+ }>> & {
24
+ [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
25
+ }, {}, {}>;
26
+ export default _default;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="google.maps" />
2
2
  import { PropType } from "vue";
3
+ import { Library } from "@googlemaps/js-api-loader";
3
4
  declare const _default: import("vue").DefineComponent<{
4
5
  apiPromise: {
5
6
  type: PropType<Promise<typeof google>>;
@@ -13,7 +14,7 @@ declare const _default: import("vue").DefineComponent<{
13
14
  default: string;
14
15
  };
15
16
  libraries: {
16
- type: PropType<("geometry" | "drawing" | "localContext" | "places" | "visualization")[]>;
17
+ type: PropType<Library[]>;
17
18
  default: () => string[];
18
19
  };
19
20
  region: {
@@ -217,7 +218,7 @@ declare const _default: import("vue").DefineComponent<{
217
218
  default: string;
218
219
  };
219
220
  libraries: {
220
- type: PropType<("geometry" | "drawing" | "localContext" | "places" | "visualization")[]>;
221
+ type: PropType<Library[]>;
221
222
  default: () => string[];
222
223
  };
223
224
  region: {
@@ -408,7 +409,7 @@ declare const _default: import("vue").DefineComponent<{
408
409
  draggable: boolean;
409
410
  version: string;
410
411
  apiKey: string;
411
- libraries: ("geometry" | "drawing" | "localContext" | "places" | "visualization")[];
412
+ libraries: Library[];
412
413
  center: google.maps.LatLng | google.maps.LatLngLiteral;
413
414
  clickableIcons: boolean;
414
415
  disableDefaultUi: boolean;
@@ -1,4 +1,5 @@
1
1
  export { default as GoogleMap } from "./GoogleMap.vue";
2
+ export { default as AdvancedMarker } from "./AdvancedMarker";
2
3
  export { default as Marker } from "./Marker";
3
4
  export { default as Polyline } from "./Polyline";
4
5
  export { default as Polygon } from "./Polygon";
@@ -3,7 +3,7 @@ import type { MarkerClusterer } from "@googlemaps/markerclusterer";
3
3
  import { InjectionKey, Ref } from "vue";
4
4
  export declare const mapSymbol: InjectionKey<Ref<google.maps.Map | undefined>>;
5
5
  export declare const apiSymbol: InjectionKey<Ref<typeof google.maps | undefined>>;
6
- export declare const markerSymbol: InjectionKey<Ref<google.maps.Marker | undefined>>;
6
+ export declare const markerSymbol: InjectionKey<Ref<google.maps.Marker | google.maps.marker.AdvancedMarkerElement | undefined>>;
7
7
  export declare const markerClusterSymbol: InjectionKey<Ref<MarkerClusterer | undefined>>;
8
8
  export declare const customMarkerClassSymbol: "CustomMarker";
9
9
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue3-google-map",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",