import{g as T,i as I,b7 as x,h as B,aH as re,aX as ne,F as le,an as D,b8 as S,b9 as N,U as R,W as $,o as E,aJ as p,a_ as O,aR as k,a$ as z,aS as P,ba as H,bb as g,b2 as _,bc as C,bd as W}from"./index-BLnapCnf.js";let j=Symbol("map"),L=Symbol("api"),Z=Symbol("marker"),se=Symbol("markerCluster"),q=Symbol("CustomMarker"),J=Symbol("mapTilesLoaded"),X="click dblclick drag dragend dragstart mousedown mousemove mouseout mouseover mouseup rightclick".split(" ");var ae=function o(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var i;if(Array.isArray(e)){var r=e.length;if(r!=t.length)return!1;for(i=r;i--!==0;)if(!o(e[i],t[i]))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();var s=Object.keys(e);if(r=s.length,r!==Object.keys(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[i]))return!1;for(i=r;i--!==0;)if(r=s[i],!o(e[r],t[r]))return!1;return!0}return e!==e&&t!==t};class b{constructor({apiKey:e,channel:t,client:i,id:r="__googleMapsScriptId",libraries:s=[],language:d,region:u,version:h,mapIds:v,nonce:n,retries:l=3,url:a="https://maps.googleapis.com/maps/api/js"}){if(this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.loading=this.done=!1,this.errors=[],this.version=h,this.apiKey=e,this.channel=t,this.client=i,this.id=r||"__googleMapsScriptId",this.libraries=s,this.language=d,this.region=u,this.mapIds=v,this.nonce=n,this.retries=l,this.url=a,b.instance){if(!ae(this.options,b.instance.options))throw Error("Loader must not be called again with different options. ".concat(JSON.stringify(this.options)," !== ").concat(JSON.stringify(b.instance.options)));return b.instance}b.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}}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=".concat(this.CALLBACK),this.apiKey&&(e+="&key=".concat(this.apiKey)),this.channel&&(e+="&channel=".concat(this.channel)),this.client&&(e+="&client=".concat(this.client)),0<this.libraries.length&&(e+="&libraries=".concat(this.libraries.join(","))),this.language&&(e+="&language=".concat(this.language)),this.region&&(e+="®ion=".concat(this.region)),this.version&&(e+="&v=".concat(this.version)),this.mapIds&&(e+="&map_ids=".concat(this.mapIds.join(","))),e}deleteScript(){let e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,t)=>{this.loadCallback(i=>{i?t(i.error):e(window.google)})})}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){if(document.getElementById(this.id))this.callback();else{var e=this.createUrl(),t=document.createElement("script");t.id=this.id,t.type="text/javascript",t.src=e,t.onerror=this.loadErrorCallback.bind(this),t.defer=!0,t.async=!0,this.nonce&&(t.nonce=this.nonce),document.head.appendChild(t)}}reset(){this.deleteScript(),this.loading=this.done=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){this.errors.push(e),this.errors.length<=this.retries?(e=this.errors.length*Math.pow(2,this.errors.length),console.log("Failed to load Google Maps script, retrying in ".concat(e," ms.")),setTimeout(()=>{this.deleteScript(),this.setScript()},e)):(this.onerrorEvent=e,this.callback())}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){this.resetIfRetryingFailed(),this.done?this.callback():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()):this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}function de(o){return class extends o.OverlayView{constructor(e){super();let{element:t,...i}=e;this.element=t,this.opts=i,this.opts.map&&this.setMap(this.opts.map)}getPosition(){return this.opts.position?this.opts.position instanceof o.LatLng?this.opts.position:new o.LatLng(this.opts.position):null}getVisible(){if(!this.element)return!1;let e=this.element;return e.style.display!=="none"&&e.style.visibility!=="hidden"&&(e.style.opacity===""||.01<Number(e.style.opacity))}onAdd(){if(this.element){var e=this.getPanes();e&&e.overlayMouseTarget.appendChild(this.element)}}draw(){if(this.element){var e=this.getProjection().fromLatLngToDivPixel(this.getPosition());if(e){this.element.style.position="absolute";let i=this.element.offsetHeight;var t=this.element.offsetWidth;switch(this.opts.anchorPoint){case"TOP_CENTER":t=e.x-t/2,e=e.y;break;case"BOTTOM_CENTER":t=e.x-t/2,e=e.y-i;break;case"LEFT_CENTER":t=e.x,e=e.y-i/2;break;case"RIGHT_CENTER":t=e.x-t,e=e.y-i/2;break;case"TOP_LEFT":t=e.x,e=e.y;break;case"TOP_RIGHT":t=e.x-t,e=e.y;break;case"BOTTOM_LEFT":t=e.x,e=e.y-i;break;case"BOTTOM_RIGHT":t=e.x-t,e=e.y-i;break;default:t=e.x-t/2,e=e.y-i/2}this.element.style.left=t+"px",this.element.style.top=e+"px",this.element.style.transform="translateX(".concat(this.opts.offsetX||0,"px) translateY(").concat(this.opts.offsetY||0,"px)"),this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}}onRemove(){this.element&&this.element.remove()}setOptions(e){this.opts=e,this.draw()}}}let U,F="bounds_changed center_changed click dblclick drag dragend dragstart heading_changed idle maptypeid_changed mousemove mouseout mouseover projection_changed resize rightclick tilesloaded tilt_changed zoom_changed".split(" ");var Y=S({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},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}},emits:F,setup(o,{emit:e}){let t=p(),i=p(!1),r=p(),s=p(),d=p(!1);O(j,r),O(L,s),O(J,d);let u=()=>{const n={...o};Object.keys(n).forEach(a=>{n[a]===void 0&&delete n[a]});var l=a=>{var c;return a?{position:(c=s.value)===null||c===void 0?void 0:c.ControlPosition[a]}:{}};return l={scaleControlOptions:o.scaleControlStyle?{style:o.scaleControlStyle}:{},panControlOptions:l(o.panControlPosition),zoomControlOptions:l(o.zoomControlPosition),rotateControlOptions:l(o.rotateControlPosition),streetViewControlOptions:l(o.streetViewControlPosition),fullscreenControlOptions:l(o.fullscreenControlPosition),disableDefaultUI:o.disableDefaultUi},{...n,...l}},h=k([s,r],([n,l])=>{n&&l&&(n.event.addListenerOnce(l,"tilesloaded",()=>{d.value=!0}),setTimeout(h,0))},{immediate:!0}),v=n=>{s.value=C(n.maps),r.value=C(new n.maps.Map(t.value,u())),n=de(s.value),s.value[q]=n,F.forEach(l=>{var a;(a=r.value)===null||a===void 0||a.addListener(l,c=>e(l,c))}),i.value=!0,n=Object.keys(o).filter(l=>!"apiPromise apiKey version libraries region language center zoom".split(" ").includes(l)).map(l=>H(o,l)),k([()=>o.center,()=>o.zoom,...n],([l,a],[c,m])=>{var f,y,w;const{center:Ce,zoom:we,...oe}=u();(f=r.value)===null||f===void 0||f.setOptions(oe),a!==void 0&&a!==m&&((y=r.value)===null||y===void 0||y.setZoom(a)),a=!c||l.lng!==c.lng||l.lat!==c.lat,l&&a&&((w=r.value)===null||w===void 0||w.panTo(l))})};return z(()=>{if(o.apiPromise&&o.apiPromise instanceof Promise)o.apiPromise.then(v);else{try{const{apiKey:n,region:l,version:a,language:c,libraries:m}=o;U=new b({apiKey:n,region:l,version:a,language:c,libraries:m})}catch(n){console.error(n)}U.load().then(v)}}),P(()=>{var n;d.value=!1,r.value&&((n=s.value)===null||n===void 0||n.event.clearInstanceListeners(r.value))}),{mapRef:t,ready:i,map:r,api:s,mapTilesLoaded:d}}});function A(o,e){if(e===void 0&&(e={}),e=e.insertAt,o&&typeof document<"u"){var t=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",e==="top"&&t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i),i.styleSheet?i.styleSheet.cssText=o:i.appendChild(document.createTextNode(o))}}A("\n.mapdiv[data-v-177d06e3] {\n width: 100%;\n height: 100%;\n}\n");let ue=N();R("data-v-177d06e3");let pe={ref:"mapRef",class:"mapdiv"};$();let ce=ue(o=>(E(),T("div",null,[I("div",pe,null,512),x(o.$slots,"default",{ready:o.ready,map:o.map,api:o.api,mapTilesLoaded:o.mapTilesLoaded},void 0,!0)])));Y.render=ce;Y.__scopeId="data-v-177d06e3";var Q=function o(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var i;if(Array.isArray(e)){var r=e.length;if(r!=t.length)return!1;for(i=r;i--!==0;)if(!o(e[i],t[i]))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();var s=Object.keys(e);if(r=s.length,r!==Object.keys(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[i]))return!1;for(i=r;i--!==0;)if(r=s[i],!o(e[r],t[r]))return!1;return!0}return e!==e&&t!==t};let ee=(o,e,t,i)=>{const r=p(),s=g(j,p()),d=g(L,p()),u=g(se,p()),h=_(()=>!!(u.value&&d.value&&(r.value instanceof d.value.Marker||r.value instanceof d.value[q])));return k([s,t],(v,[n,l])=>{var a,c,m;v=!Q(t.value,l)||s.value!==n,s.value&&d.value&&v&&(r.value?(r.value.setOptions(t.value),h.value&&((a=u.value)===null||a===void 0||a.removeMarker(r.value),(c=u.value)===null||c===void 0||c.addMarker(r.value))):(r.value=o==="Marker"?C(new d.value[o](t.value)):o===q?C(new d.value[o](t.value)):C(new d.value[o]({...t.value,map:s.value})),h.value?(m=u.value)===null||m===void 0||m.addMarker(r.value):r.value.setMap(s.value),e.forEach(f=>{var y;(y=r.value)===null||y===void 0||y.addListener(f,w=>i(f,w))})))},{immediate:!0}),P(()=>{var v,n;r.value&&((v=d.value)===null||v===void 0||v.event.clearInstanceListeners(r.value),h.value?(n=u.value)===null||n===void 0||n.removeMarker(r.value):r.value.setMap(null))}),r},G="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".split(" ");var Oe=S({name:"Marker",props:{options:{type:Object,required:!0}},emits:G,setup(o,{emit:e,expose:t,slots:i}){return o=H(o,"options"),e=ee("Marker",G,o,e),O(Z,e),t({marker:e}),()=>{var r;return(r=i.default)===null||r===void 0?void 0:r.call(i)}}});X.concat(["bounds_changed"]);X.concat(["center_changed","radius_changed"]);var ve=S({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(o,{emit:e}){let t=p(null),i=g(j,p()),r=g(L,p()),s=g(J,p(!1)),d=p(!1),u=k([s,r,t],([n,l,a])=>{l&&n&&a&&(h(o.position),d.value=!0,e("content:loaded"),setTimeout(u,0))},{immediate:!0}),h=n=>{i.value&&r.value&&t.value&&i.value.controls[r.value.ControlPosition[n]].push(t.value)},v=n=>{if(i.value&&r.value){let l=null;n=r.value.ControlPosition[n],i.value.controls[n].forEach((a,c)=>{a===t.value&&(l=c)}),l!==null&&i.value.controls[n].removeAt(l)}};return P(()=>v(o.position)),k(()=>o.position,(n,l)=>{v(l),h(n)}),k(()=>o.index,n=>{n&&t.value&&(t.value.index=o.index)}),{controlRef:t,showContent:d}}});let he={ref:"controlRef"};ve.render=function(o){return E(),T(le,null,[B("\n v-show must be used instead of v-if otherwise there\n would be no rendered content pushed to the map controls\n "),re(I("div",he,[x(o.$slots,"default")],512),[[ne,o.showContent]])],2112)};let V="closeclick content_changed domready position_changed visible zindex_changed".split(" ");var te=S({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})}},emits:V,setup(o,{slots:e,emit:t}){let i=p(),r=p(),s=g(j,p()),d=g(L,p()),u=g(Z,p()),h,v=_(()=>{var n;return(n=e.default)===null||n===void 0?void 0:n.call(e).some(l=>l.type!==W)});return z(()=>{k([s,()=>o.options],([,n],[l,a])=>{l=!Q(n,a)||s.value!==l,s.value&&d.value&&l&&(i.value?(i.value.setOptions({...n,content:v.value?r.value:n.content}),u.value||i.value.open({map:s.value})):(i.value=C(new d.value.InfoWindow({...n,content:v.value?r.value:n.content})),u.value?h=u.value.addListener("click",()=>{i.value&&i.value.open({map:s.value,anchor:u.value})}):i.value.open({map:s.value}),V.forEach(c=>{var m;(m=i.value)===null||m===void 0||m.addListener(c,f=>t(c,f))})))},{immediate:!0})}),P(()=>{var n;h&&h.remove(),i.value&&((n=d.value)===null||n===void 0||n.event.clearInstanceListeners(i.value),i.value.close())}),{infoWindow:i,infoWindowRef:r,hasSlotContent:v}}});A("\n.info-window-wrapper[data-v-5b373d6e] {\n display: none;\n}\n.mapdiv .info-window-wrapper[data-v-5b373d6e] {\n display: inline-block;\n}\n");let me=N();R("data-v-5b373d6e");let ge={key:0,class:"info-window-wrapper"};$();let fe=me(o=>o.hasSlotContent?(E(),T("div",ge,[I("div",D({ref:"infoWindowRef"},o.$attrs),[x(o.$slots,"default",{},void 0,!0)],16)])):B("v-if",!0));te.render=fe;te.__scopeId="data-v-5b373d6e";var M,K=M||(M={});K.CLUSTERING_BEGIN="clusteringbegin";K.CLUSTERING_END="clusteringend";K.CLUSTER_CLICK="click";Object.values(M);var ie=S({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(o,{slots:e,emit:t}){let i=p(),r=p(),s=_(()=>{var u;return(u=e.default)===null||u===void 0?void 0:u.call(e).some(h=>h.type!==W)}),d=_(()=>({...o.options,element:i.value}));return z(()=>{r=ee(q,[],d,t)}),{customMarkerRef:i,customMarker:r,hasSlotContent:s}}});A("\n.custom-marker-wrapper[data-v-b9d5ec8a] {\n display: none;\n}\n.mapdiv .custom-marker-wrapper[data-v-b9d5ec8a] {\n display: inline-block;\n}\n");let ye=N();R("data-v-b9d5ec8a");let be={key:0,class:"custom-marker-wrapper"};$();let ke=ye(o=>o.hasSlotContent?(E(),T("div",be,[I("div",D({ref:"customMarkerRef",style:{cursor:o.$attrs.onClick?"pointer":void 0}},o.$attrs),[x(o.$slots,"default",{},void 0,!0)],16)])):B("v-if",!0));ie.render=ke;ie.__scopeId="data-v-b9d5ec8a";export{Y as F,te as P,Oe as f}; //# sourceMappingURL=index-LSWPfP9L.js.map