/*! YOOtheme Pro v5.0.19 | https://yootheme.com */

const q=window.UIkit&&Object.prototype.hasOwnProperty.call(window.UIkit,"default")?window.UIkit.default:window.UIkit,{$:F,$$:Q,html:V,observeIntersection:ee}=window.UIkit.util;function te(e,i){e.src=i}const ne=e=>{var i,n,t,o="The Google Maps JavaScript API",w="google",g="importLibrary",v="__ib__",r=document,M=window,u=M[w]||(M[w]={}),a=u.maps||(u.maps={}),y=new Set,d=new URLSearchParams,b=()=>i||(i=new Promise(async(m,I)=>{var S;await(n=r.createElement("script")),d.set("libraries",[...y]+"");for(t in e)d.set(t.replace(/[A-Z]/g,_=>"_"+_[0].toLowerCase()),e[t]);d.set("callback",w+".maps."+v),te(n,"https://maps.googleapis.com/maps/api/js?"+d),a[v]=m,n.onerror=()=>i=I(Error(o+" could not load.")),n.nonce=((S=r.querySelector("script[nonce]"))==null?void 0:S.nonce)||"",r.head.append(n)}));a[g]?console.warn(o+" only loads once. Ignoring:",e):a[g]=(m,...I)=>y.add(m)&&b().then(()=>a[g](m,...I))},ie=e=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`,oe=e=>`The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(e)}) will be ignored.`,ae=()=>{},re=()=>{};let U=!1;function se(e){if(U){ae(ie(e));return}pe(e),U=!0}async function le(e){var i,n;if(!((n=(i=window==null?void 0:window.google)==null?void 0:i.maps)!=null&&n.importLibrary))throw new Error("google.maps.importLibrary is not installed.");return await google.maps.importLibrary(e)}function pe(e){var n,t;const i=!!((t=(n=window.google)==null?void 0:n.maps)!=null&&t.importLibrary);i&&re(oe(e)),i||ne(e)}async function R(e,{apiKey:i,type:n,center:t,zoom:o,fit_bounds:w,min_zoom:g,max_zoom:v,zooming:r,dragging:M,clustering:u,cluster_icons:a,controls:y,poi:d,markers:b=[],styler_invert_lightness:m,styler_hue:I,styler_saturation:S,styler_lightness:_,styler_gamma:z,popup_max_width:E}){ce({key:i,version:"weekly"});const[{event:G,LatLng:L,LatLngBounds:B,Size:C,Point:W},{Map:j,MapTypeId:J,InfoWindow:Z,StyledMapType:X},{Marker:A},{MarkerClusterer:H}]=await Promise.all(["core","maps","marker"].map(s=>le(s)).concat(u?de():{})),l=new j(e,{zoom:Number(o),minZoom:Number(r?g:o),maxZoom:Number(r?v:o),zoomControl:r&&y?null:!1,scrollwheel:r?null:!1,center:new L(t.lat,t.lng),mapTypeId:J[n.toUpperCase()],disableDefaultUI:!y,gestureHandling:M||r?"auto":"none",mapTypeControlOptions:{mapTypeIds:["styled_map","satellite"]}});l.getMapCapabilities=()=>({...l.mapCapabilities,isAdvancedMarkersAvailable:!1});let P;const T=new Z({maxWidth:E?parseInt(E,10):300});let O;if(u){const s={map:l};Array.isArray(a)&&a.length&&(s.renderer={render({count:p,position:f}){const c=p>=100&&a[2]||p>=10&&a[1]||a[0];return new A({position:f,icon:{url:c.url,scaledSize:c.size?new C(...c.size):null},label:{text:String(p),color:c.textColor?c.textColor:null,fontSize:"11px",fontWeight:"bold"},zIndex:Number(A.MAX_ZINDEX)+p})}}),O=new H(s)}for(const{lat:s,lng:p,content:f,show_popup:c,icon:$,iconSize:k,iconAnchor:N,title:Y}of b){const h=new A({map:l,title:Y,position:new L(s,p)});if($&&h.setIcon({url:$,scaledSize:k?new C(...k):null,anchor:N?new W(...N):null}),O==null||O.addMarker(h),f){const x=()=>{if(T.getMap()&&P===h){T.close();return}T.setContent(f),T.open(l,h),P=h};G.addListener(h,"click",x),c&&x()}}const K=new X([{featureType:"all",elementType:"all",stylers:[{invert_lightness:m},{hue:I},{saturation:S},{lightness:_},{gamma:z}]},{featureType:"poi",stylers:[{visibility:d?"on":"off"}]}],{name:"Map"});if(l.mapTypes.set("styled_map",K),n.toUpperCase()==="ROADMAP"&&l.setMapTypeId("styled_map"),w&&b.length){const s=new B;for(const{lat:p,lng:f}of b)s.extend(new L(p,f));l.fitBounds(s)}}let D=!1;function ce(e){D||(se(e),D=!0)}async function de(){return(await import(`${new URL(import.meta.url).pathname}/../map-google-markerclusterer.js`)).default}q.component("Map",{async connected(){var e,i,n;if(this.script||(this.script=F("script",this.$el)),!!this.script){(e=this.map)!=null||(this.map=JSON.parse(this.script.textContent)),(i=this.templates)!=null||(this.templates=Q("template",this.$el)),(n=this.map.markers)==null||n.forEach((t,o)=>{t.content=V(this.templates[o]).trim(),!t.icon&&this.map.icon&&(t.icon=this.map.icon,t.iconSize=this.map.iconSize,t.iconAnchor=this.map.iconAnchor)});for(const t of this.$el.parentElement.children)t.hidden=this.$el!==t&&!t.hidden;this.map.lazyload&&"IntersectionObserver"in window?ee(this.$el,(t,o)=>{R(this.$el,this.map),o.disconnect()},{rootMargin:`${window.innerHeight/2}px 0px`}):R(this.$el,this.map)}}});
