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

const ee=window.UIkit&&Object.prototype.hasOwnProperty.call(window.UIkit,"default")?window.UIkit.default:window.UIkit,{$:te,trigger:ie,$$:oe,html:ae,observeIntersection:ne}=window.UIkit.util,re=e=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`,se=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.`,le=(e,t)=>`Failed to create Trusted Types policy "${e}": ${t instanceof Error?t.message:String(t)}.

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