loading.c9286a4b.js 38 KB

1234567891011121314151617181920212223242526272829303132
  1. import{d as P,r as y,p as E,o as ke,a_ as B,a$ as N,ag as x,s as X,au as V,b0 as I,b1 as we,e as Ae,f as Te,g as je,G as qe,b2 as Re,b3 as Ze,b4 as Be}from"./index.0308b213.js";(function(){try{if(typeof document<"u"){var s=document.createElement("style");s.appendChild(document.createTextNode(".mapdiv[data-v-dbf82c40]{width:100%;height:100%}.custom-control-wrapper[data-v-d099a3a6]{display:none}.mapdiv .custom-control-wrapper[data-v-d099a3a6]{display:inline-block}.info-window-wrapper[data-v-cbe1707b]{display:none}.mapdiv .info-window-wrapper[data-v-cbe1707b]{display:inline-block}.custom-marker-wrapper[data-v-2d2d343a]{display:none}.mapdiv .custom-marker-wrapper[data-v-2d2d343a]{display:inline-block}")),document.head.appendChild(s)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();var Ne=Object.defineProperty,ze=(s,e,t)=>e in s?Ne(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ne=(s,e,t)=>(ze(s,typeof e!="symbol"?e+"":e,t),t);const z=Symbol("map"),U=Symbol("api"),xe=Symbol("marker"),Ce=Symbol("markerCluster"),Y=Symbol("CustomMarker"),_e=Symbol("mapTilesLoaded"),Z=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];/*! *****************************************************************************
  2. Copyright (c) Microsoft Corporation.
  3. Permission to use, copy, modify, and/or distribute this software for any
  4. purpose with or without fee is hereby granted.
  5. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  6. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  7. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  8. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  9. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  10. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  11. PERFORMANCE OF THIS SOFTWARE.
  12. ***************************************************************************** */function Ue(s,e,t,r){function o(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function c(u){try{h(r.next(u))}catch(l){n(l)}}function a(u){try{h(r.throw(u))}catch(l){n(l)}}function h(u){u.done?i(u.value):o(u.value).then(c,a)}h((r=r.apply(s,e||[])).next())})}var $e=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 r,o,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(o=r;o--!==0;)if(!s(e[o],t[o]))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(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=r;o--!==0;){var n=i[o];if(!s(e[n],t[n]))return!1}return!0}return e!==e&&t!==t};const ae="__googleMapsScriptId";var q;(function(s){s[s.INITIALIZED=0]="INITIALIZED",s[s.LOADING=1]="LOADING",s[s.SUCCESS=2]="SUCCESS",s[s.FAILURE=3]="FAILURE"})(q||(q={}));class T{constructor({apiKey:e,authReferrerPolicy:t,channel:r,client:o,id:i=ae,language:n,libraries:c=[],mapIds:a,nonce:h,region:u,retries:l=3,url:d="https://maps.googleapis.com/maps/api/js",version:m}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=t,this.channel=r,this.client=o,this.id=i||ae,this.language=n,this.libraries=c,this.mapIds=a,this.nonce=h,this.region=u,this.retries=l,this.url=d,this.version=m,T.instance){if(!$e(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?q.FAILURE:this.done?q.SUCCESS:this.loading?q.LOADING:q.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(r=>{r?t(r.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 r={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(r).forEach(i=>!r[i]&&delete r[i]),!((t=(e=window==null?void 0:window.google)===null||e===void 0?void 0:e.maps)===null||t===void 0)&&t.importLibrary||(i=>{let n,c,a,h="The Google Maps JavaScript API",u="google",l="importLibrary",d="__ib__",m=document,p=window;p=p[u]||(p[u]={});const g=p.maps||(p.maps={}),f=new Set,v=new URLSearchParams,b=()=>n||(n=new Promise((k,C)=>Ue(this,void 0,void 0,function*(){var _;yield c=m.createElement("script"),c.id=this.id,v.set("libraries",[...f]+"");for(a in i)v.set(a.replace(/[A-Z]/g,S=>"_"+S[0].toLowerCase()),i[a]);v.set("callback",u+".maps."+d),c.src=this.url+"?"+v,g[d]=k,c.onerror=()=>n=C(Error(h+" could not load.")),c.nonce=this.nonce||((_=m.querySelector("script[nonce]"))===null||_===void 0?void 0:_.nonce)||"",m.head.append(c)})));g[l]?console.warn(h+" only loads once. Ignoring:",i):g[l]=(k,...C)=>f.add(k)&&b().then(()=>g[l](k,...C))})(r);const o=this.libraries.map(i=>this.importLibrary(i));o.length||o.push(this.importLibrary("core")),Promise.all(o).then(()=>this.callback(),i=>{const n=new ErrorEvent("error",{error:i});this.loadErrorCallback(n)})}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 De(s){return class extends s.OverlayView{constructor(e){super(),ne(this,"element"),ne(this,"opts");const{element:t,...r}=e;this.element=t,this.opts=r,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 e=this.element;return e.style.display!=="none"&&e.style.visibility!=="hidden"&&(e.style.opacity===""||Number(e.style.opacity)>.01)}onAdd(){if(!this.element)return;const e=this.getPanes();e&&e.overlayMouseTarget.appendChild(this.element)}draw(){if(!this.element)return;const e=this.getProjection(),t=e==null?void 0:e.fromLatLngToDivPixel(this.getPosition());if(t){this.element.style.position="absolute";const r=this.element.offsetHeight,o=this.element.offsetWidth;let i,n;switch(this.opts.anchorPoint){case"TOP_CENTER":i=t.x-o/2,n=t.y;break;case"BOTTOM_CENTER":i=t.x-o/2,n=t.y-r;break;case"LEFT_CENTER":i=t.x,n=t.y-r/2;break;case"RIGHT_CENTER":i=t.x-o,n=t.y-r/2;break;case"TOP_LEFT":i=t.x,n=t.y;break;case"TOP_RIGHT":i=t.x-o,n=t.y;break;case"BOTTOM_LEFT":i=t.x,n=t.y-r;break;case"BOTTOM_RIGHT":i=t.x-o,n=t.y-r;break;default:i=t.x-o/2,n=t.y-r/2}this.element.style.left=i+"px",this.element.style.top=n+"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(e){const{element:t,...r}=e;this.element=t,this.opts=r,this.draw()}}}let le;const ce=["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"],Fe=P({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:ce,setup(s,{emit:e}){const t=y(),r=y(!1),o=y(),i=y(),n=y(!1);V(z,o),V(U,i),V(_e,n);const c=()=>{const l={...s};Object.keys(l).forEach(p=>{l[p]===void 0&&delete l[p]});const d=p=>{var g;return p?{position:(g=i.value)==null?void 0:g.ControlPosition[p]}:{}},m={scaleControlOptions:s.scaleControlStyle?{style:s.scaleControlStyle}:{},panControlOptions:d(s.panControlPosition),zoomControlOptions:d(s.zoomControlPosition),rotateControlOptions:d(s.rotateControlPosition),streetViewControlOptions:d(s.streetViewControlPosition),fullscreenControlOptions:d(s.fullscreenControlPosition),disableDefaultUI:s.disableDefaultUi};return{...l,...m}},a=E([i,o],([l,d])=>{const m=l,p=d;m&&p&&(m.event.addListenerOnce(p,"tilesloaded",()=>{n.value=!0}),setTimeout(a,0))},{immediate:!0}),h=()=>{try{const{apiKey:l,region:d,version:m,language:p,libraries:g,nonce:f}=s;le=new T({apiKey:l,region:d,version:m,language:p,libraries:g,nonce:f})}catch(l){console.error(l)}},u=l=>{i.value=I(l.maps),o.value=I(new l.maps.Map(t.value,c()));const d=De(i.value);i.value[Y]=d,ce.forEach(p=>{var g;(g=o.value)==null||g.addListener(p,f=>e(p,f))}),r.value=!0;const m=Object.keys(s).filter(p=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom","nonce"].includes(p)).map(p=>N(s,p));E([()=>s.center,()=>s.zoom,...m],([p,g],[f,v])=>{var b,k,C;const{center:_,zoom:S,...M}=c();(b=o.value)==null||b.setOptions(M),g!==void 0&&g!==v&&((k=o.value)==null||k.setZoom(g));const W=!f||p.lng!==f.lng||p.lat!==f.lat;p&&W&&((C=o.value)==null||C.panTo(p))})};return ke(()=>{s.apiPromise&&s.apiPromise instanceof Promise?s.apiPromise.then(u):(h(),le.load().then(u))}),B(()=>{var l;n.value=!1,o.value&&((l=i.value)==null||l.event.clearInstanceListeners(o.value))}),{mapRef:t,ready:r,map:o,api:i,mapTilesLoaded:n}}}),Ve=(s,e)=>{const t=s.__vccOpts||s;for(const[r,o]of e)t[r]=o;return t},Ge={ref:"mapRef",class:"mapdiv"};function Ke(s,e,t,r,o,i){return Ae(),Te("div",null,[je("div",Ge,null,512),qe(s.$slots,"default",Re(Ze({ready:s.ready,map:s.map,api:s.api,mapTilesLoaded:s.mapTilesLoaded})),void 0,!0)])}const gt=Ve(Fe,[["render",Ke],["__scopeId","data-v-dbf82c40"]]);function We(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var He=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 r,o,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(o=r;o--!==0;)if(!s(e[o],t[o]))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(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=r;o--!==0;){var n=i[o];if(!s(e[n],t[n]))return!1}return!0}return e!==e&&t!==t};const j=We(He),Je=s=>s==="Marker",Xe=s=>s===Y,$=(s,e,t,r)=>{const o=y(),i=x(z,y()),n=x(U,y()),c=x(Ce,y()),a=X(()=>!!(c.value&&n.value&&(o.value instanceof n.value.Marker||o.value instanceof n.value[Y])));return E([i,t],(h,[u,l])=>{var d,m,p;const g=!j(t.value,l)||i.value!==u;!i.value||!n.value||!g||(o.value?(o.value.setOptions(t.value),a.value&&((d=c.value)==null||d.removeMarker(o.value),(m=c.value)==null||m.addMarker(o.value))):(Je(s)?o.value=I(new n.value[s](t.value)):Xe(s)?o.value=I(new n.value[s](t.value)):o.value=I(new n.value[s]({...t.value,map:i.value})),a.value?(p=c.value)==null||p.addMarker(o.value):o.value.setMap(i.value),e.forEach(f=>{var v;(v=o.value)==null||v.addListener(f,b=>r(f,b))})))},{immediate:!0}),B(()=>{var h,u;o.value&&((h=n.value)==null||h.event.clearInstanceListeners(o.value),a.value?(u=c.value)==null||u.removeMarker(o.value):o.value.setMap(null))}),o},ue=["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"],ft=P({name:"Marker",props:{options:{type:Object,required:!0}},emits:ue,setup(s,{emit:e,expose:t,slots:r}){const o=N(s,"options"),i=$("Marker",ue,o,e);return V(xe,i),t({marker:i}),()=>{var n;return(n=r.default)==null?void 0:n.call(r)}}});P({name:"Polyline",props:{options:{type:Object,required:!0}},emits:Z,setup(s,{emit:e}){const t=N(s,"options");return{polyline:$("Polyline",Z,t,e)}},render:()=>null});const vt=P({name:"Polygon",props:{options:{type:Object,required:!0}},emits:Z,setup(s,{emit:e}){const t=N(s,"options");return{polygon:$("Polygon",Z,t,e)}},render:()=>null}),he=Z.concat(["bounds_changed"]);P({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:he,setup(s,{emit:e}){const t=N(s,"options");return{rectangle:$("Rectangle",he,t,e)}},render:()=>null});const de=Z.concat(["center_changed","radius_changed"]);P({name:"Circle",props:{options:{type:Object,required:!0}},emits:de,setup(s,{emit:e}){const t=N(s,"options");return{circle:$("Circle",de,t,e)}},render:()=>null});P({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(s,{emit:e}){const t=y(null),r=x(z,y()),o=x(U,y()),i=x(_e,y(!1)),n=E([i,o,t],([h,u,l])=>{u&&h&&l&&(c(s.position),e("content:loaded"),setTimeout(n,0))},{immediate:!0}),c=h=>{if(r.value&&o.value&&t.value){const u=o.value.ControlPosition[h];r.value.controls[u].push(t.value)}},a=h=>{if(r.value&&o.value){let u=null;const l=o.value.ControlPosition[h];r.value.controls[l].forEach((d,m)=>{d===t.value&&(u=m)}),u!==null&&r.value.controls[l].removeAt(u)}};return B(()=>a(s.position)),E(()=>s.position,(h,u)=>{a(u),c(h)}),E(()=>s.index,h=>{h&&t.value&&(t.value.index=s.index)}),{controlRef:t}}});const pe=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"];P({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[...pe,"update:modelValue"],setup(s,{slots:e,emit:t,expose:r}){const o=y(),i=y(),n=x(z,y()),c=x(U,y()),a=x(xe,y());let h,u=s.modelValue;const l=X(()=>{var g;return(g=e.default)==null?void 0:g.call(e).some(f=>f.type!==we)}),d=g=>{u=g,t("update:modelValue",g)},m=g=>{o.value&&(o.value.open({map:n.value,anchor:a.value,...g}),d(!0))},p=()=>{o.value&&(o.value.close(),d(!1))};return ke(()=>{E([n,()=>s.options],([g,f],[v,b])=>{var k;const C=!j(f,b)||n.value!==v;n.value&&c.value&&C&&(o.value?(o.value.setOptions({...f,content:l.value?i.value:f.content}),a.value||m()):(o.value=I(new c.value.InfoWindow({...f,content:l.value?i.value:f.content})),a.value&&(h=a.value.addListener("click",()=>{m()})),(!a.value||u)&&m(),pe.forEach(_=>{var S;(S=o.value)==null||S.addListener(_,M=>t(_,M))}),(k=o.value)==null||k.addListener("closeclick",()=>d(!1))))},{immediate:!0}),E(()=>s.modelValue,g=>{g!==u&&(g?m():p())})}),B(()=>{var g;h&&h.remove(),o.value&&((g=c.value)==null||g.event.clearInstanceListeners(o.value),p())}),r({infoWindow:o,open:m,close:p}),{infoWindow:o,infoWindowRef:i,hasSlotContent:l,open:m,close:p}}});const me=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Q=1,D=8;class oe{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[t,r]=new Uint8Array(e,0,2);if(t!==219)throw new Error("Data does not appear to be in a KDBush format.");const o=r>>4;if(o!==Q)throw new Error(`Got v${o} data when expected v${Q}.`);const i=me[r&15];if(!i)throw new Error("Unrecognized array type.");const[n]=new Uint16Array(e,2,1),[c]=new Uint32Array(e,4,1);return new oe(c,n,i,e)}constructor(e,t=64,r=Float64Array,o){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=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const i=me.indexOf(this.ArrayType),n=e*2*this.ArrayType.BYTES_PER_ELEMENT,c=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-c%8)%8;if(i<0)throw new Error(`Unexpected typed array class: ${r}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,D,e),this.coords=new this.ArrayType(this.data,D+c+a,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(D+n+c+a),this.ids=new this.IndexArrayType(this.data,D,e),this.coords=new this.ArrayType(this.data,D+c+a,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Q<<4)+i]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=t,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return re(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:n,nodeSize:c}=this,a=[0,i.length-1,0],h=[];for(;a.length;){const u=a.pop()||0,l=a.pop()||0,d=a.pop()||0;if(l-d<=c){for(let f=d;f<=l;f++){const v=n[2*f],b=n[2*f+1];v>=e&&v<=r&&b>=t&&b<=o&&h.push(i[f])}continue}const m=d+l>>1,p=n[2*m],g=n[2*m+1];p>=e&&p<=r&&g>=t&&g<=o&&h.push(i[m]),(u===0?e<=p:t<=g)&&(a.push(d),a.push(m-1),a.push(1-u)),(u===0?r>=p:o>=g)&&(a.push(m+1),a.push(l),a.push(1-u))}return h}within(e,t,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:i,nodeSize:n}=this,c=[0,o.length-1,0],a=[],h=r*r;for(;c.length;){const u=c.pop()||0,l=c.pop()||0,d=c.pop()||0;if(l-d<=n){for(let f=d;f<=l;f++)ge(i[2*f],i[2*f+1],e,t)<=h&&a.push(o[f]);continue}const m=d+l>>1,p=i[2*m],g=i[2*m+1];ge(p,g,e,t)<=h&&a.push(o[m]),(u===0?e-r<=p:t-r<=g)&&(c.push(d),c.push(m-1),c.push(1-u)),(u===0?e+r>=p:t+r>=g)&&(c.push(m+1),c.push(l),c.push(1-u))}return a}}function re(s,e,t,r,o,i){if(o-r<=t)return;const n=r+o>>1;Me(s,e,n,r,o,i),re(s,e,t,r,n-1,1-i),re(s,e,t,n+1,o,1-i)}function Me(s,e,t,r,o,i){for(;o>r;){if(o-r>600){const h=o-r+1,u=t-r+1,l=Math.log(h),d=.5*Math.exp(2*l/3),m=.5*Math.sqrt(l*d*(h-d)/h)*(u-h/2<0?-1:1),p=Math.max(r,Math.floor(t-u*d/h+m)),g=Math.min(o,Math.floor(t+(h-u)*d/h+m));Me(s,e,t,p,g,i)}const n=e[2*t+i];let c=r,a=o;for(F(s,e,r,t),e[2*o+i]>n&&F(s,e,r,o);c<a;){for(F(s,e,c,a),c++,a--;e[2*c+i]<n;)c++;for(;e[2*a+i]>n;)a--}e[2*r+i]===n?F(s,e,r,a):(a++,F(s,e,a,o)),a<=t&&(r=a+1),t<=a&&(o=a-1)}}function F(s,e,t,r){ee(s,t,r),ee(e,2*t,2*r),ee(e,2*t+1,2*r+1)}function ee(s,e,t){const r=s[e];s[e]=s[t],s[t]=r}function ge(s,e,t,r){const o=s-t,i=e-r;return o*o+i*i}const Ye={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)),A=2,O=3,te=4,L=5,Pe=6;class Ee{constructor(e){this.options=Object.assign(Object.create(Ye),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:r,maxZoom:o}=this.options;t&&console.time("total time");const i=`prepare ${e.length} points`;t&&console.time(i),this.points=e;const n=[];for(let a=0;a<e.length;a++){const h=e[a];if(!h.geometry)continue;const[u,l]=h.geometry.coordinates,d=fe(H(u)),m=fe(J(l));n.push(d,m,1/0,a,-1,1),this.options.reduce&&n.push(0)}let c=this.trees[o+1]=this._createTree(n);t&&console.timeEnd(i);for(let a=o;a>=r;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 r=((e[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[1]));let i=e[2]===180?180:((e[2]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,i=180;else if(r>i){const l=this.getClusters([r,o,180,n],t),d=this.getClusters([-180,o,i,n],t);return l.concat(d)}const c=this.trees[this._limitZoom(t)],a=c.range(H(r),J(n),H(i),J(o)),h=c.data,u=[];for(const l of a){const d=this.stride*l;u.push(h[d+L]>1?ve(h,d,this.clusterProps):this.points[h[d+O]])}return u}getChildren(e){const t=this._getOriginId(e),r=this._getOriginZoom(e),o="No cluster with the specified id.",i=this.trees[r];if(!i)throw new Error(o);const n=i.data;if(t*this.stride>=n.length)throw new Error(o);const c=this.options.radius/(this.options.extent*Math.pow(2,r-1)),a=n[t*this.stride],h=n[t*this.stride+1],u=i.within(a,h,c),l=[];for(const d of u){const m=d*this.stride;n[m+te]===e&&l.push(n[m+L]>1?ve(n,m,this.clusterProps):this.points[n[m+O]])}if(l.length===0)throw new Error(o);return l}getLeaves(e,t,r){t=t||10,r=r||0;const o=[];return this._appendLeaves(o,e,t,r,0),o}getTile(e,t,r){const o=this.trees[this._limitZoom(e)],i=Math.pow(2,e),{extent:n,radius:c}=this.options,a=c/n,h=(r-a)/i,u=(r+1+a)/i,l={features:[]};return this._addTileFeatures(o.range((t-a)/i,h,(t+1+a)/i,u),o.data,t,r,i,l),t===0&&this._addTileFeatures(o.range(1-a/i,h,1,u),o.data,i,r,i,l),t===i-1&&this._addTileFeatures(o.range(0,h,a/i,u),o.data,-1,r,i,l),l.features.length?l:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const r=this.getChildren(e);if(t++,r.length!==1)break;e=r[0].properties.cluster_id}return t}_appendLeaves(e,t,r,o,i){const n=this.getChildren(t);for(const c of n){const a=c.properties;if(a&&a.cluster?i+a.point_count<=o?i+=a.point_count:i=this._appendLeaves(e,a.cluster_id,r,o,i):i<o?i++:e.push(c),e.length===r)break}return i}_createTree(e){const t=new oe(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)t.add(e[r],e[r+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,r,o,i,n){for(const c of e){const a=c*this.stride,h=t[a+L]>1;let u,l,d;if(h)u=Le(t,a,this.clusterProps),l=t[a],d=t[a+1];else{const g=this.points[t[a+O]];u=g.properties;const[f,v]=g.geometry.coordinates;l=H(f),d=J(v)}const m={type:1,geometry:[[Math.round(this.options.extent*(l*i-r)),Math.round(this.options.extent*(d*i-o))]],tags:u};let p;h||this.options.generateId?p=t[a+O]:p=this.points[t[a+O]].id,p!==void 0&&(m.id=p),n.features.push(m)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:r,extent:o,reduce:i,minPoints:n}=this.options,c=r/(o*Math.pow(2,t)),a=e.data,h=[],u=this.stride;for(let l=0;l<a.length;l+=u){if(a[l+A]<=t)continue;a[l+A]=t;const d=a[l],m=a[l+1],p=e.within(a[l],a[l+1],c),g=a[l+L];let f=g;for(const v of p){const b=v*u;a[b+A]>t&&(f+=a[b+L])}if(f>g&&f>=n){let v=d*g,b=m*g,k,C=-1;const _=((l/u|0)<<5)+(t+1)+this.points.length;for(const S of p){const M=S*u;if(a[M+A]<=t)continue;a[M+A]=t;const W=a[M+L];v+=a[M]*W,b+=a[M+1]*W,a[M+te]=_,i&&(k||(k=this._map(a,l,!0),C=this.clusterProps.length,this.clusterProps.push(k)),i(k,this._map(a,M)))}a[l+te]=_,h.push(v/f,b/f,1/0,_,-1,f),i&&h.push(C)}else{for(let v=0;v<u;v++)h.push(a[l+v]);if(f>1)for(const v of p){const b=v*u;if(!(a[b+A]<=t)){a[b+A]=t;for(let k=0;k<u;k++)h.push(a[b+k])}}}}return h}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,r){if(e[t+L]>1){const n=this.clusterProps[e[t+Pe]];return r?Object.assign({},n):n}const o=this.points[e[t+O]].properties,i=this.options.map(o);return r&&i===o?Object.assign({},i):i}}function ve(s,e,t){return{type:"Feature",id:s[e+O],properties:Le(s,e,t),geometry:{type:"Point",coordinates:[Qe(s[e]),et(s[e+1])]}}}function Le(s,e,t){const r=s[e+L],o=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,i=s[e+Pe],n=i===-1?{}:Object.assign({},t[i]);return Object.assign(n,{cluster:!0,cluster_id:s[e+O],point_count:r,point_count_abbreviated:o})}function H(s){return s/360+.5}function J(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 Qe(s){return(s-.5)*360}function et(s){const e=(180-s*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
  13. Copyright (c) Microsoft Corporation.
  14. Permission to use, copy, modify, and/or distribute this software for any
  15. purpose with or without fee is hereby granted.
  16. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  17. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  18. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  19. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  20. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  21. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  22. PERFORMANCE OF THIS SOFTWARE.
  23. ***************************************************************************** */function se(s,e){var t={};for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(s);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(s,r[o])&&(t[r[o]]=s[r[o]]);return t}class w{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 K{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(w.getPosition(t));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>w.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(w.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}const tt=(s,e,t,r)=>{const o=Oe(s.getBounds(),e,r);return t.filter(i=>o.contains(w.getPosition(i)))},Oe=(s,e,t)=>{const{northEast:r,southWest:o}=rt(s,e),i=ot({northEast:r,southWest:o},t);return st(i,e)},ye=(s,e,t)=>{const r=Oe(s,e,t),o=r.getNorthEast(),i=r.getSouthWest();return[i.lng(),i.lat(),o.lng(),o.lat()]},rt=(s,e)=>({northEast:e.fromLatLngToDivPixel(s.getNorthEast()),southWest:e.fromLatLngToDivPixel(s.getSouthWest())}),ot=({northEast:s,southWest:e},t)=>(s.x+=t,s.y-=t,e.x-=t,e.y+=t,{northEast:s,southWest:e}),st=({northEast:s,southWest:e},t)=>{const r=t.fromDivPixelToLatLng(e),o=t.fromDivPixelToLatLng(s);return new google.maps.LatLngBounds(r,o)};class Ie{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return nt(e)}}class it extends Ie{constructor(e){var{viewportPadding:t=60}=e,r=se(e,["viewportPadding"]);super(r),this.viewportPadding=60,this.viewportPadding=t}calculate({markers:e,map:t,mapCanvasProjection:r}){return t.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:tt(t,r,e,this.viewportPadding),map:t,mapCanvasProjection:r})}}}const nt=s=>s.map(e=>new K({position:w.getPosition(e),markers:[e]}));class at extends Ie{constructor(e){var{maxZoom:t,radius:r=60}=e,o=se(e,["maxZoom","radius"]);super({maxZoom:t}),this.state={zoom:-1},this.superCluster=new Ee(Object.assign({maxZoom:this.maxZoom,radius:r},o))}calculate(e){let t=!1;const r={zoom:e.map.getZoom()};if(!j(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const o=this.markers.map(i=>{const n=w.getPosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[n.lng(),n.lat()]},properties:{marker:i}}});this.superCluster.load(o)}return t||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(t=!j(this.state,r)),this.state=r,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:r}){if(r.cluster)return new K({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(i=>i.properties.marker),position:{lat:t,lng:e}});const o=r.marker;return new K({markers:[o],position:w.getPosition(o)})}}class lt extends it{constructor(e){var{maxZoom:t,radius:r=60,viewportPadding:o=60}=e,i=se(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:t,viewportPadding:o}),this.superCluster=new Ee(Object.assign({maxZoom:this.maxZoom,radius:r},i)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const t={zoom:Math.round(e.map.getZoom()),view:ye(e.map.getBounds(),e.mapCanvasProjection,this.viewportPadding)};let r=!j(this.state,t);if(!j(e.markers,this.markers)){r=!0,this.markers=[...e.markers];const o=this.markers.map(i=>{const n=w.getPosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[n.lng(),n.lat()]},properties:{marker:i}}});this.superCluster.load(o)}return r&&(this.clusters=this.cluster(e),this.state=t),{clusters:this.clusters,changed:r}}cluster({map:e,mapCanvasProjection:t}){const r={zoom:Math.round(e.getZoom()),view:ye(e.getBounds(),t,this.viewportPadding)};return this.superCluster.getClusters(r.view,r.zoom).map(o=>this.transformCluster(o))}transformCluster({geometry:{coordinates:[e,t]},properties:r}){if(r.cluster)return new K({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(i=>i.properties.marker),position:{lat:t,lng:e}});const o=r.marker;return new K({markers:[o],position:w.getPosition(o)})}}class ct{constructor(e,t){this.markers={sum:e.length};const r=t.map(i=>i.count),o=r.reduce((i,n)=>i+n,0);this.clusters={count:t.length,markers:{mean:o/t.length,sum:o,min:Math.min(...r),max:Math.max(...r)}}}}class ut{render({count:e,position:t},r,o){const i=`<svg fill="${e>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
  24. <circle cx="120" cy="120" opacity=".6" r="70" />
  25. <circle cx="120" cy="120" opacity=".3" r="90" />
  26. <circle cx="120" cy="120" opacity=".2" r="110" />
  27. <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>
  28. </svg>`,n=`Cluster of ${e} markers`,c=Number(google.maps.Marker.MAX_ZINDEX)+e;if(w.isAdvancedMarkerAvailable(o)){const h=document.createElement("div");h.innerHTML=i;const u=h.firstElementChild;u.setAttribute("transform","translate(0 25)");const l={map:o,position:t,zIndex:c,title:n,content:u};return new google.maps.marker.AdvancedMarkerElement(l)}const a={position:t,zIndex:c,title:n,icon:{url:`data:image/svg+xml;base64,${btoa(i)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(a)}}function ht(s,e){for(let t in e.prototype)s.prototype[t]=e.prototype[t]}class ie{constructor(){ht(ie,google.maps.OverlayView)}}var R;(function(s){s.CLUSTERING_BEGIN="clusteringbegin",s.CLUSTERING_END="clusteringend",s.CLUSTER_CLICK="click"})(R||(R={}));const dt=(s,e,t)=>{t.fitBounds(e.bounds)};class pt extends ie{constructor({map:e,markers:t=[],algorithmOptions:r={},algorithm:o=new at(r),renderer:i=new ut,onClusterClick:n=dt}){super(),this.markers=[...t],this.clusters=[],this.algorithm=o,this.renderer=i,this.onClusterClick=n,e&&this.setMap(e)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach(r=>{this.addMarker(r,!0)}),t||this.render()}removeMarker(e,t){const r=this.markers.indexOf(e);return r===-1?!1:(w.setMap(e,null),this.markers.splice(r,1),t||this.render(),!0)}removeMarkers(e,t){let r=!1;return e.forEach(o=>{r=this.removeMarker(o,!0)||r}),r&&!t&&this.render(),r}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,R.CLUSTERING_BEGIN,this);const{clusters:t,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const o=new Set;for(const n of t)n.markers.length==1&&o.add(n.markers[0]);const i=[];for(const n of this.clusters)n.marker!=null&&(n.markers.length==1?o.has(n.marker)||w.setMap(n.marker,null):i.push(n.marker));this.clusters=t,this.renderClusters(),requestAnimationFrame(()=>i.forEach(n=>w.setMap(n,null)))}google.maps.event.trigger(this,R.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=>w.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new ct(this.markers,this.clusters),t=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,t),r.markers.forEach(o=>w.setMap(o,null)),this.onClusterClick&&r.marker.addListener("click",o=>{google.maps.event.trigger(this,R.CLUSTER_CLICK,r),this.onClusterClick(o,r,t)})),w.setMap(r.marker,t)})}}const be=Object.values(R);P({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})}},emits:be,setup(s,{emit:e,expose:t,slots:r}){const o=y(),i=x(z,y()),n=x(U,y());return V(Ce,o),E(i,()=>{var c;i.value&&(o.value=I(new pt({map:i.value,algorithm:new lt((c=s.options.algorithmOptions)!=null?c:{}),...s.options})),be.forEach(a=>{var h;(h=o.value)==null||h.addListener(a,u=>e(a,u))}))},{immediate:!0}),B(()=>{var c;o.value&&((c=n.value)==null||c.event.clearInstanceListeners(o.value),o.value.clearMarkers(),o.value.setMap(null))}),t({markerCluster:o}),()=>{var c;return(c=r.default)==null?void 0:c.call(r)}}});P({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(s,{slots:e,emit:t,expose:r}){const o=y(),i=X(()=>{var a;return(a=e.default)==null?void 0:a.call(e).some(h=>h.type!==we)}),n=X(()=>({...s.options,element:o.value})),c=$(Y,[],n,t);return r({customMarker:c}),{customMarkerRef:o,customMarker:c,hasSlotContent:i}}});P({name:"HeatmapLayer",props:{options:{type:Object,default:()=>({})}},setup(s){const e=y(),t=x(z,y()),r=x(U,y());return E([t,()=>s.options],([o,i],[n,c])=>{var a;const h=!j(i,c)||t.value!==n;if(t.value&&r.value&&h){const u=structuredClone(i);if(u.data&&!(u.data instanceof r.value.MVCArray)){const l=r.value.LatLng;u.data=(a=u.data)==null?void 0:a.map(d=>d instanceof l||"location"in d&&(d.location instanceof l||d.location===null)?d:"location"in d?{...d,location:new l(d.location)}:new l(d))}e.value?e.value.setOptions(u):e.value=I(new r.value.visualization.HeatmapLayer({...u,map:t.value}))}},{immediate:!0}),B(()=>{e.value&&e.value.setMap(null)}),{heatmapLayer:e}},render:()=>null});let G=0,Se;const yt=s=>{G===0&&(Se=Be.service(s)),G++},bt=()=>{G<=0||(G--,G===0&&Se.close())};export{gt as E,ft as P,bt as h,yt as s,vt as x};