PageSourceSearch

https://www.yoursurpriseelectrician.com/wp-content/plugins/mappres…/build/index_mappress.js?ver=2.82.1

js yoursurpriseelectrician.com collected 2026-09-26 18:04:33 UTC 102,508 bytes, 1 lines download raw bytes

1(()=>{var t={117:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappAutocomplete:()=>u});var i=n(326);const o=wp.element.createElement,{Fragment:s,useCallback:a,useEffect:l,useLayoutEffect:p,useMemo:r,useRef:c,useState:m}=wp.element;function u(e){e={buttonLabel:null,className:"",delay:null,focus:!1,onFetch:null,onSelect:null,placeholder:"",selected:null,suggestions:[],title:"",...e};const t=c(null),n=c(null),[s,a]=m({isOpen:!1,value:""});function p(e){a((t=>({...t,...e})))}(0,i.useClickOutside)(t,(()=>{s.isOpen&&p({isOpen:!1})})),l((()=>{e.focus&&n.current&&n.current.focus()}),[n.current]),l((()=>{s.map&&setMapTypeId(e.mapTypeId)}),[e.mapTypeId,s.map]);const r=(0,i.useDebounce)((t=>{e.onFetch&&e.onFetch(t)}),e.delay);function u(){let t;p({isOpen:!1}),e.suggestions&&(t=null==s.selected?e.suggestions[0]:e.suggestions[s.selected]),e.onSelect({suggestion:t,value:g})}const g=s.selected>=0&&e.suggestions&&e.suggestions[s.selected]?e.suggestions[s.selected].value:s.value;return o("div",{className:"mapp-autocomplete",ref:t},o("div",{className:"mapp-autocomplete-wrapper"},o("input",{className:e.className,onChange:e=>{!function(e){p({value:e,selected:null}),r(e)}(e.target.value)},onKeyDownCapture:t=>function(t){switch(t.stopPropagation(),t.code){case"Backspace":p({isOpen:s.value.length>1});break;case"Enter":u();break;case"Escape":p({isOpen:!1});break;case"ArrowUp":if(t.preventDefault(),e.suggestions&&0!=s.selected){const t=null==s.selected?e.suggestions.length-1:s.selected-1;e.suggestions[t]&&p({isOpen:!0,selected:t})}else p({selected:null});break;case"ArrowDown":if(e.suggestions&&s.selected<e.suggestions.length-1){const t=null==s.selected?0:s.selected+1;e.suggestions[t]&&p({isOpen:!0,selected:t})}else p({selected:null});break;case"Tab":case"AltLeft":case"AltRight":case"ControlLeft":case"ControlRight":case"MetaLeft":case"MetaRight":break;default:p({isOpen:!0})}}(t),placeholder:e.placeholder,ref:n,title:e.title,type:"text",value:g}),s.isOpen&&o("div",{className:"mapp-autocomplete-list"},_.map(e.suggestions,((t,n)=>{const i="mapp-autocomplete-item"+(s.selected==n?" mapp-selected":"");return o("div",{className:i,key:n,onClick:()=>function(t,n){p({isOpen:!1,selected:n}),e.onSelect({suggestion:t})}(t,n)},t.value)})))),e.buttonLabel&&o("div",{className:"mapp-submit-button",onClick:()=>u()},e.buttonLabel))}},715:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappDirections:()=>r});const i=wp.element.createElement,{Fragment:o,useEffect:s,useLayoutEffect:a,useRef:l,useState:p}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function r(e){e={from:null,onClose:null,to:null,...e};const[t,n]=p({from:e.from?e.from:"",to:e.to?e.to:""});function o(e){n((t=>({...t,...e})))}function a(){e.onClose&&e.onClose()}function l(){const e=t.from.trim(),n=t.to.trim();let i=mappl10n.options.directionsServer;i="https://maps.google.com"==i?"https://www.google.com":i,-1==i.toLowerCase().indexOf("http")&&(i="https://"+i),i+="/maps/dir/?api=1&origin="+encodeURIComponent(e)+"&destination="+encodeURIComponent(n),window.open(i),a()}function r(e){13==e?l():27==e&&a()}return s((()=>{"google"==mappl10n.options.directions&&l()}),[]),"google"==mappl10n.options.directions?null:i("div",{className:"mapp-directions-component"},i("div",{className:"mapp-close",onClick:()=>a()}),i("div",null,i("input",{className:"mapp-dir-from",onChange:e=>o({from:e.target.value}),onKeyPress:e=>r(e.which),tabIndex:"1",placeholder:__("My location"),value:t.from}),i("div",{className:"mapp-dir-arrows",onClick:()=>{o({from:t.to,to:t.from})}})),i("div",null,i("input",{className:"mapp-dir-to",onChange:e=>o({to:e.target.value}),onKeyPress:e=>r(e.which),tabIndex:"2",value:t.to})),i("div",{className:"mapp-dir-toolbar"},i("div",{className:"mapp-submit-button",onClick:()=>l()},__("Get Directions"))))}},817:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappFilters:()=>m});var i=n(939),o=n(326);const s=wp.element.createElement,{Fragment:a,useEffect:l,useLayoutEffect:p,useRef:r,useState:c}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress"),sprintf=wp.i18n.sprintf,m=e=>{e={onChange:null,otype:"post",poiCount:0,...e};
1const t=(0,o.useDebounce)(e.onChange,500),[n,p]=c({filters:[],isBusy:!0,open:null,selected:{}});function m(e){p((t=>({...t,...e})))}const u=r({});function g(e,i){let o=n.selected[e.key]?n.selected[e.key].values:null;if("checkbox"==e.format){var s;const e=null===(s=o)||void 0===s?void 0:s.indexOf(i);e>-1?o.splice(e,1):(o=o||[],o.push(i))}else o=i?[i]:[];o.length?n.selected[e.key]={key:e.key,values:o,meta_key:e.meta_key,meta_values:e.meta_values}:delete n.selected[e.key],m({selected:n.selected}),t(n.selected)}function d(e){m({open:n.open==e?null:e})}function h(e){e.key;const t=[...e.values],o=n.selected[e.key]?n.selected[e.key].values:"";switch(e.format){case"input":return s("input",{type:"text",value:o?o[0]:"",onChange:t=>g(e,t.target.value)});case"checkbox":return _.map(t,(t=>s("label",{key:t.value},s("input",{checked:null==o?void 0:o.includes(t.value),key:t.value,onChange:t=>g(e,t.target.value),type:e.format,value:t.value}),t.iconid&&s("img",{className:"mapp-icon",src:i.mappLib.getIconUrl(t.iconid)}),s("span",{dangerouslySetInnerHTML:{__html:t.label}}))));case"radio":return"radio"==e.format&&t.unshift({value:"",label:__("All")}),_.map(t,(t=>s("label",{key:t.value},s("input",{checked:o==t.value||""==t.value&&!o,key:t.value,onChange:t=>g(e,t.target.value),type:e.format,value:t.value}),t.iconid&&s("img",{className:"mapp-icon",src:i.mappLib.getIconUrl(t.iconid)}),s("span",{dangerouslySetInnerHTML:{__html:t.label}}))));case"select":t.unshift({value:"",label:""});const n=_.map(t,(e=>'<option value="'+e.value+'">'+e.label+"</option>"));return s("select",{value:o[0],dangerouslySetInnerHTML:{__html:n},onChange:t=>g(e,t.target.value)})}}function f(i){return s("div",{className:"mapp-filter-dropdown"},function(e){return s("div",{className:"mapp-filter-values"},"all"==e?n.filters.map((e=>s(a,{key:e.key},s("div",{className:"mapp-filter-label"},e.label),h(e)))):h(e))}(i),"all"==i&&function(n){const i="all"==n?"all":n.key;let o=e.poiCount>1?__("%d Results"):__("%d Result");return o=sprintf(o,e.poiCount),s("div",{className:"mapp-filter-toolbar"},s("div",{className:"mapp-link-button",onClick:()=>(m({selected:{}}),void t())},__("Reset")),s("div",{className:"mapp-filter-count"},o),s("div",{className:"mapp-submit-button",onClick:()=>d(i)},__("Done")))}(i))}function v(e){const t="all"==e?"all":e.key,i="all"==e?__("Filter"):e.label,o="mapp-filter mapp-filter-"+t+(n.open==t?" mapp-filter-open":"");return s("div",{key:t,className:o,ref:e=>u.current[t]=e},s("div",{className:"mapp-button mapp-button-caret mapp-filter-button"+(n.isBusy?" mapp-button-disabled":""),onClick:()=>d(t)},i),f(e))}return(0,o.useClickOutside)({current:n.open&&u.current[n.open]?u.current[n.open]:null},(()=>{m({open:null})})),l((()=>{m({isBusy:!0}),i.mappLib.ajax({method:"GET",data:{action:"mapp_filters_get",nonce:mappl10n.options.nonce,otype:e.otype},callback:e=>{e&&"OK"==e.status?m({filters:e.data}):console.error("MapPress: unable to fetch filter data"),m({isBusy:!1})}})}),[]),s("div",{className:"mapp-filters"},v("all"),_.map(n.filters,(e=>e.isStandalone?v(e):null)))}},10:(e,t,n)=>{"use strict";n.r(t),n.d(t,{useGeocoding:()=>c});wp.element.createElement;const{Fragment:i,useCallback:o,useEffect:s,useLayoutEffect:a,useRef:l,useState:p}=wp.element,r={google:function(){this.token=null;const e=document.createElement("div");this.placesService=new google.maps.places.PlacesService(e),this.autocompleteService=new google.maps.places.AutocompleteService}};r.google.prototype={getDetails:function(e){let{suggestion:t,callback:n}=e;this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken,this.token=null;var i={fields:["formatted_address","name","geometry"],placeId:t.place_id,sessionToken:this.token};this.placesService.getDetails(i,(function(e,t){if("OK"==t&&e&&e.geometry){if(e.geometry.location&&(e.geometry.location=e.geometry.location.toJSON()),e.geometry.viewport){var i=e.geometry.viewport.toJSON();e.geometry.viewport={sw:{lat:i.south,lng:i.west},ne:{lat:i.north,lng:i.east}}}n(e)}else n(null)}))},getFirstPrediction:function(e){let{map:t,value:n,callback:i}=e;this.getPredictions({map:t,value:n,callback:e=>{e&&Array.isArray(e)?this.getDetails({suggestion:e[0],callback:e=>i(e)}):i(null)}})},getPredictions:function(e){let{map:t,value:n,includeBusinesses:i,callback:o}=e;this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;var s=t?t.getBounds():null;"leaflet"==mappl10n.options.engine&&(s=new google.maps.LatLngBounds(new google.maps.LatLng(s.getSouthWest
1().lat,s.getSouthWest().lng),new google.maps.LatLng(s.getNorthEast().lat,s.getNorthEast().lng)));var a={input:n,bounds:s=s||new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180)),sessionToken:this.token,types:i?null:["geocode"]};this.autocompleteService.getPlacePredictions(a,(function(e,t){"OK"==t&&e&&e.length?(e=(e=e.map((e=>(e.value=e.description,e)))).filter((e=>e.place_id)),o(e)):(t==google.maps.places.PlacesServiceStatus.REQUEST_DENIED?alert("Google Maps API Key error: please enable the Places API in the Google Developer Console."):t==google.maps.places.PlacesServiceStatus.OVER_QUERY_LIMIT&&alert("Google Maps API Key has exceeded its query limit"),o(null))}))}},r.mapbox=function(){},r.mapbox.prototype={getDetails:function(e){let{suggestion:t,callback:n}=e,i=t.place_name,o=i.indexOf(","),s=i.indexOf(",",o+1);o>0&&(i=parseInt(i.substr(0,o))?i.substr(0,s).replace(",",""):i.substr(0,o));let a=t.bbox&&4==t.bbox.length?{sw:{lat:t.bbox[1],lng:t.bbox[0]},ne:{lat:t.bbox[3],lng:t.bbox[2]}}:null;n({formatted_address:t.place_name,name:i,geometry:{location:{lat:t.center[1],lng:t.center[0]},viewport:a}})},getFirstPrediction:function(e){let{map:t,value:n,callback:i}=e;this.getPredictions({map:t,value:n,callback:e=>{e&&e.length?this.getDetails({suggestion:e[0],callback:e=>i(e)}):i(null)}})},getPredictions:function(e){let{map:t,value:n,callback:i}=e;var o="https://api.mapbox.com/geocoding/v5/mapbox.places/"+n+".json?access_token="+mappl10n.options.mapbox;o=mappl10n.options.country?o+"&country="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&language="+mappl10n.options.language.toLowerCase():o;var s=t?t.getCenter():null;s&&(o+="&proximity="+s.lng+","+s.lat),mappl10n.options.searchBox&&(o+="&bbox="+mappl10n.options.searchBox),fetch(o).then((e=>e.json())).then((e=>{e&&e.features&&e.features.length>0?(e.features=e.features.map((e=>(e.value=e.label=e.place_name,e))),i(e.features)):i(null)}))}},r.nominatim=function(){},r.nominatim.prototype={getDetails:function(e){let{suggestion:t,callback:n}=e,i=t.display_name,o=i.indexOf(","),s=i.indexOf(",",o+1);o>0&&(i=parseInt(i.substr(0,o))?i.substr(0,s).replace(",",""):i.substr(0,o));let a=t.boundingbox&&4==t.boundingbox.length?{sw:{lat:t.boundingbox[0],lng:t.boundingbox[2]},ne:{lat:t.boundingbox[1],lng:t.boundingbox[3]}}:null;n({formatted_address:t.display_name,name:i,geometry:{location:{lat:t.lat,lng:t.lon},viewport:a}})},getFirstPrediction:function(e){let{map:t,value:n,callback:i}=e;this.getPredictions({map:t,value:n,callback:e=>{e&&e.length?this.getDetails({suggestion:e[0],callback:e=>i(e)}):i(null)}})},getPredictions:function(e){let{map:t,value:n,callback:i}=e;var o="https://nominatim.openstreetmap.org/search?format=json&dedupe=1&limit=5&q="+encodeURIComponent(n);if(o=mappl10n.options.country?o+"&countrycodes="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&accept-language="+mappl10n.options.language.toLowerCase():o,mappl10n.options.searchBox)o+="&viewbox="+mappl10n.options.searchBox,o+="&bounded=1";else{var s=t?t.getBounds():null;
1if(s){let e=s.getSouthWest(),t=s.getNorthEast();o+="&viewbox="+e.lng+","+e.lat+","+t.lng+","+t.lat}}fetch(o).then((e=>e.json())).then((e=>{e&&e.length?(e=e.map((e=>(e.value=e.display_name,e))),i(e)):i(null)}))}};const c=e=>{let{includeBusinesses:t}=e;function n(){let e="";return e="leaflet"!=mappl10n.options.engine?"google":mappl10n.options.geocoder?mappl10n.options.geocoder:"nominatim",new r[e]}function i(e,t){navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition((function(t){var n={lat:t.coords.latitude,lng:t.coords.longitude};e({name:n.lat+", "+n.lng,geometry:{location:n}})}),(function(n){if(!t){var i=n&&n.message?" : "+n.message:"";alert(mappl10n.no_geolocate+i)}e(null)}),{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4}):alert(mappl10n.no_geolocate)}return{geocode:function(e){let{map:o,suggestion:s,value:a,callback:l}=e;const p=n();a="string"==typeof a?a.trim():a,s||a?function(e){let{map:t,value:n,callback:o}=e;if(!n)return void o(null);if("string"!=typeof n){const e=n.lat&&n.lng?{geometry:{location:{lat:n.lat,lng:n.lng}}}:null;return void o(e)}if("http"==n.substring(0,4))return void o(n);if("user"==n)return void i((function(e){o(e)}));const s=n.split(",");if(2==s.length){const e=parseFloat(s[0]),t=parseFloat(s[1]);if(!isNaN(e)&&!isNaN(t))return void o({name:e+", "+t,geometry:{location:{lat:e,lng:t}}})}o(null)}({map:o,value:a,callback:e=>{e?l(e):s?p.getDetails({suggestion:s,callback:l}):p.getFirstPrediction({map:o,value:a,includeBusinesses:t,callback:l})}}):l(null)},geolocate:i,getPredictions:function(e){let{map:t,value:i,callback:o}=e;n().getPredictions({map:t,value:i,callback:o})}}}},326:(e,t,n)=>{"use strict";n.r(t),n.d(t,{useClickOutside:()=>c,useDebounce:()=>m,useResizeObserver:()=>u});wp.element.createElement;const{Fragment:i,useCallback:o,useEffect:s,useLayoutEffect:a,useMemo:l,useRef:p,useState:r}=wp.element;function c(e,t){s((()=>{const n=n=>{e.current&&!e.current.contains(n.target)&&t()};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}}))}function m(e,t,n){const i=p(!1);s((()=>(i.current=!0,()=>i.current=!1)),[]);const a=_.debounce((function(){i.current&&e(...arguments)}),t);return o(a,n=n||[])}function u(e,t){const n=p();n.current=t,s((()=>
1{if(!e)return;const t=new ResizeObserver(((e,t)=>{n.current()}));return t.observe(e),()=>{t.disconnect()}}),[e])}},939:(e,t,n)=>{"use strict";n.r(t),n.d(t,{mappLib:()=>i,mappEvent:()=>o,mappPoi:()=>s});const i={ajax:function(e){if("POST"==(e={cache:"no-cache",credentials:"same-origin",data:null,method:e.method?e.method:"GET",mode:"cors",redirect:"follow",referrerPolicy:"no-referrer",responseType:"json",url:e.url?e.url:mappl10n.options.ajaxurl,...e}).method)if(e.data instanceof FormData)e.body=e.data;else{const t=new FormData;t.append("action",e.data.action),t.append("nonce",e.data.nonce),t.append("data",JSON.stringify(e.data)),e.body=t}else"GET"==e.method&&(e.url+="?"+i.jQueryParam(e.data));fetch(e.url,e).then((t=>{if("html"==e.responseType)return t.text();if(t.ok)return t.json();throw Error("Request rejected with status ".concat(t.status))})).then((t=>{e.url!=mappl10n.options.ajaxurl||t&&"OK"==t.status||i.alert(t.status),t.output&&i.alert("MapPress: invalid output from a plugin or theme file.  Deactivate plugins to find the problem.  Output:\r\n"+t.output),e.callback&&e.callback(t)})).catch((t=>{if(e.error)return void e.error();const n=void 0!==t.message?t.message:t.statusText;i.alert("AJAX error -- "+n)}))},alert:function(e){mappl10n.options.admin||mappl10n.options.debug?alert(e):window.console&&console.error(e)}
1,boundsToViewport:function(e){return e?{sw:e.getSouthWest().toJSON(),ne:e.getNorthEast().toJSON()}:null},getIcon:function(e){{const t=this.getIconUrl(e);return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:t,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:t}}},getIconUrl:function(e){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"},jQueryParam:function(e){var t=[],n=function(e,n){n=null==(n="function"==typeof n?n():n)?"":n,t[t.length]=encodeURIComponent(e)+"="+encodeURIComponent(n)},i=function(e,o){var s,a,l;if(e)if(Array.isArray(o))for(s=0,a=o.length;s<a;s++)i(e+"["+("object"==typeof o[s]&&o[s]?s:"")+"]",o[s]);else if("[object Object]"===Object.prototype.toString.call(o))for(l in o)i(e+"["+l+"]",o[l]);else n(e,o);else if(Array.isArray(o))for(s=0,a=o.length;s<a;s++)n(o[s].name,o[s].value);else for(l in o)i(l,o[l]);return t};return i("",e).join("&")},nanoid:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;const t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let n="",i=e;for(;i--;)n+=t[64*Math.random()|0];return n},pointToLatLng:function(e){return e?"leaflet"==mappl10n.options.engine?L.latLng(e):new google.maps.LatLng(e.lat,e.lng):null},template:function(e,t){if(i.templates=i.templates?i.templates:{},!i.templates[e]){var n=document.getElementById("mapp-tmpl-"+e).innerHTML;if(!n)return"";i.templates[e]=_.template(n,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return i.templates[e](t)},viewportToBounds:function(e){return e&&e.sw&&e.ne?"leaflet"==mappl10n.options.engine?new L.LatLngBounds(L.latLng(e.sw.lat,e.sw.lng),L.latLng(e.ne.lat,e.ne.lng)):new google.maps.LatLngBounds(new google.maps.LatLng(e.sw.lat,e.sw.lng),new google.maps.LatLng(e.ne.lat,e.ne.lng)):null}},o={addListener:function(e,t,n){let i=[];t=t.split(" ");for(var o=0;o<t.length;o++)"leaflet"==mappl10n.options.engine?(e.on(t[o],n),i.push({target:e,event:t[o],callback:n})):i.push(google.maps.event.addListener(e,t[o],n));return i},addListenerOnce:function(e,t,n){t=t.split(" ");for(var i=0;i<t.length;i++)"leaflet"==mappl10n.options.engine?e.once(t[i],n):google.maps.event.addListenerOnce(e,t[i],n)},clearInstanceListeners:function(e){"leaflet"==mappl10n.options.engine?e.off():google.maps.event.clearInstanceListeners(e)},clearListeners:function(e,t){t=t.split(" ");for(var n=0;n<t.length;n++)"leaflet"==mappl10n.options.engine?e.off(t[n]):google.maps.event.clearListeners(e,t[n])},removeListener:function(e){for(let t=0;t<e.length;t++)"leaflet"==mappl10n.options.engine?e[t].target.off(e[t].event,e[t].callback):google.maps.event.removeListener(e[t])},trigger:function(e,t,n){"leaflet"==mappl10n.options.engine?e.fire(t,n):google.maps.event.trigger(e,t,n)}},s={parseOverlay:function(e,t){if("google"==mappl10n.options.engine){if("kml"==e){const e=t.getDefaultViewport();return{point:e?e.getCenter().toJSON():null,viewport:e?i.boundsToViewport(e):null}}const n=t instanceof google.maps.Polyline?{strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,stokeWeight:t.strokeWeight}:{fillColor:t.fillColor,fillOpacity:t.fillOpacity,strokeColor:t.strokeColor,strokeOpacity:1,stokeWeight:t.strokeWeight};if("circle"==e)return{point:t.getCenter().toJSON(),poly:{radius:t.getRadius(),...n}};if("rectangle"==e)return{viewport:i.boundsToViewport(t.getBounds()),poly:{...n}};if("polyline"==e){const e=[];return t.getPath().forEach((function(t){e.push(t.toJSON())})),{poly:{path:e,...n}}}if("polygon"==e){const e={fillColor:t.fillColor,fillOpacity:t.fillOpacity,strokeColor:t.strokeColor,strokeOpacity:1,stokeWeight:t.strokeWeight},n=[];return t.getPaths().forEach((function(e){var t=[];e.forEach((function(e){t.push(e.toJSON())})),n.push(t)})),{poly:{paths:n,...e}}}if(!e)return{point:t.getPosition().toJSON()}}else{if("kml"==e){const e=t.getBounds();return{point:e&&e.isValid()?e.getCenter().toJSON():null,viewport:e&&e.isValid()?i.boundsToViewport(e):null}}if(!e)return{point:"leaflet"==mappl10n.options.engine?t.getLatLng().toJSON():t.getPosition().toJSON()}}}};"leaflet"==mappl10n.options.engine&&"undefined"!=typeof L&&(L.LatLng.prototype.toJSON=function(){return{lat:this.lat,lng:this.lng}},L.LatLngBounds.prototype.toJSON=function(){return{south:this.getSouth(),west:this.getWest(),north:this.getNorth(),east:this.getEast()}},L.LatLng.prototype.toUrlValue=function(){return Math.round(1e6*this.lat)/1e6+", "+Math.round(1e6*this.lng)/1e6})}
1,374:(e,t,n)=>{"use strict";n.r(t);var i=n(939),o=n(346);window.mapp=window.mapp||{};const s=wp.element.createElement;mapp.load=function(){if(void 0!==mapp.data)for(const[e,t]of Object.entries(mapp.data)){t.pois&&t.pois.map((e=>{e.id=i.mappLib.nanoid()}));const e=document.getElementById(t.name+"-layout");e?wp.element.render(s(o.MappMap,{...t,parent:e}),e):console.log("Missing container for map "+t.name)}},mapp.load()},346:(t,n,i)=>{"use strict";i.r(n),i.d(n,{MappMap:()=>I});var o=i(939),s=i(715),a=i(817),l=i(602),p=i(818),r=i(81),c=i(50),m=i(615);const u=wp.element.createElement,{Fragment:g,useEffect:d,useLayoutEffect:h,useMemo:f,useRef:v,useState:y}=wp.element;function w(e){e={anchor:null,className:null,content:null,map:null,point:null,...e};const t=v(null),[n,i]=y({isLoaded:null,mapDiv:"leaflet"==mappl10n.options.engine?e.map.getContainer():e.map.getDiv(),overlayView:null});function s(e){i((t=>({...t,...e})))}function a(){const i=t.current;if(!i)return;if(document.fullscreenElement||e.map.isFullscreen)return;let s;const{width:a,height:l}=i.getBoundingClientRect(),p=o.mappLib.pointToLatLng(e.point);if("leaflet"==mappl10n.options.engine)s=e.map.latLngToContainerPoint(p);else{const e=n.overlayView.getProjection();if(!e)return;s=e.fromLatLngToContainerPixel(p)}i.style.bottom=n.mapDiv.clientHeight-s.y-e.anchor.y+"px",i.style.left=s.x-a/2+e.anchor.x+"px"}return h((()=>{"google"==mappl10n.options.engine?n.overlayView||(n.overlayView=new google.maps.OverlayView,n.overlayView.onAdd=function(){s({isLoaded:!0})},n.overlayView.setMap(e.map)):(e.map.stop(),s({isLoaded:!0}))}),[]),h((()=>{if(!n.isLoaded)return;let t;return"google"==mappl10n.options.engine?n.overlayView.draw=()=>a():t=o.mappEvent.addListener(e.map,"move",(e=>a())),()=>{"google"==mappl10n.options.engine?n.overlayView.draw=null:o.mappEvent.removeListener(t)}})),h((()=>{n.isLoaded&&(a(),function(){const i=t.current;if(!i)return;const s=30,a=i.offsetWidth,l=i.offsetHeight,p=n.mapDiv.clientWidth,r=n.mapDiv.clientHeight,c=o.mappLib.pointToLatLng(e.point);let m;if("leaflet"==mappl10n.options.engine)m=e.map.latLngToContainerPoint(c);else{const e=n.overlayView.getProjection();m=e?e.fromLatLngToContainerPixel(c):null}if(!m)return;var u={x:m.x,y:m.y};m.x+a/2+e.anchor.x>p-s?u.x=Math.max(p-a/2-e.anchor.x-s,p/2-e.anchor.x):m.x-a/2+e.anchor.x<s&&(u.x=Math.min(a/2+e.anchor.x+s,p/2-e.anchor.x));m.y+e.anchor.y-l<s&&(u.y=l-e.anchor.y+s);u.y>=r&&(u.y=r-s);const g={x:m.x-u.x,y:m.y-u.y};(g.x<=-1||g.x>=1||g.y<=-1||g.y>=1)&&("leaflet"==mappl10n.options.engine?e.map.panBy([g.x,g.y]):e.map.panBy(g.x,g.y))}())}),[n.isLoaded]),n.isLoaded?u("div",{className:"mapp-ib-wrapper",ref:t},u("div",{className:"mapp-ib-content"},u("div",{className:"mapp-ib"},u("div",{className:"mapp-iw "+(e.className?e.className:"")},e.content)),u("div",{className:"mapp-ib-tip"}))):null}var b=i(892),k=i(10),C=i(326);const{Fragment:O,useCallback:E,useEffect:P,useLayoutEffect:x,useRef:M,useState:S}=wp.element,N=wp.element.createElement,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function I(t){const[n,i]=S({clusterer:null,directionsTo:null,drawingManager:null,filters:null,hasFilters:!1,hasSearch:!!(t.isEditable||t.search||mappl10n.options.search&&t.query),hovered:null,isDirectionsOpen:null,isFetching:null,isGeolocating:null,init:null,isLoaded:null,isMounted:null,isMini:null,isSidebarOpen:null!=t.poiListOpen?t.poiListOpen:mappl10n.options.poiListOpen,kmlEvent:null,layers:{},layout:t.layout?t.layout:mappl10n.options.layout,map:null,opened:null,oid:t.oid?t.oid:mappl10n.options.oid,otype:t.otype?t.otype:mappl10n.options.otype,page:1,pageCount:0,parsedCenter:null,poiList:void 0!==t.poiList&&null!=t.poiList?t.poiList:mappl10n.options.poiList,pois:[],polyline:null,templates:t.query?"user"==t.otype?{item:"user-mashup-item",popup:"user-mashup-popup"}:{item:"mashup-item",popup:"mashup-popup"}:{item:"map-item",popup:"map-popup"},userLocation:null}),u=M(null),g=M(t.parent),{geocode:d,geolocate:h}=(M(),(0,k.useGeocoding)({withBusinesses:t.isEditable}));function f(e){i((t=>({...t,...e})))}function v(e){}function y(e){return n.pois.find((t=>t.id==e))}function E(e){return n.map.fitBounds(e)}function x(){let e;try{e=n.map.getCenter()}catch(t){e=null}return e?e.toJSON():null}function I(e){let t;switch("leaflet"==mappl10n.options.engine&&"kml"!=e.type?null:e.type){case"polygon":t=new google.maps.LatLngBounds,e.poly.paths.map((e=>{e.map((e=>{t.extend(e)}))}));break;case"polyline":t=new google.maps.LatLngBounds,e.poly.path.map((e=>{t.extend(e)}));break;case"circle":const n=new google.maps.Circle({center:e.point,radius:e.poly.radius});t=n.getBounds();break;default:t=o.mappLib.viewportToBounds(e.viewport)}return t}function T(e,t){if(e.point&&!e.type)return"leaflet"==mappl10n.options.engine?L.latLng(e.point):new google.maps.LatLng(e.point.lat,e.point.lng);if("kml"==e.type&&t&&t.latLng)return t.latLng;const n=I(e);return"leaflet"==mappl10n.options.engine?n&&n.isValid()?n.getCenter():new L.latLng(0,0):n?n.getCenter():new google.maps.LatLng(0,0)}function D(){let e;try{e=n.map.getZoom()}catch(t){e=null}return e?parseInt(e):null}(0,C.useResizeObserver)(g.current,(function(){window.frameElement&&(window.frameElement.style.height=g.current.getBoundingClientRect().height+"px");if(n.poiList&&"inline"!=n.layout&&g.current){const e=g.current.clientWidth<mappl10n.options.mini;null==n.isMini?e&&f({isMini:e,isSidebarOpen:!1}):e!=n.isMini&&f({isMini:e,isSidebarOpen:!e})}})),(0,C.useResizeObserver)(u.current,R),P((()=>{switch(n.init){case null:!function(){const e=[__("MapPress FAQ")+": http://mappresspro.com/ma
1ppress-faq",__("Support")+": http://mappresspro.com/chris-contact",__("Get an API Key")+": https://mappresspro.com/how-to-get-a-google-maps-api-key"];let t=[{condition:"leaflet"==mappl10n.options.engine&&"undefined"==typeof L,title:__("Leaflet library not loaded"),text:__("A theme or plugin is preventing the Leaflet library from loading.")},{condition:"google"==mappl10n.options.engine&&"undefined"==typeof google,title:__("Google Maps API not loaded"),text:__("A theme or plugin is preventing Google Maps from loading.")},{condition:"google"==mappl10n.options.engine&&!mappl10n.options.apikey,title:__("Google Maps API key required")},{condition:document.querySelectorAll('script[src*="https://maps.googleapis.com/maps/api/js?v="]').length>1,title:__("Google Maps API loaded multiple times"),text:__("A theme or plugin has loaded Google Maps twice")},{condition:"undefined"==typeof _,title:__("Underscore library not loaded"),text:__("A theme or plugin is preventing the underscore.js library from loading.")}];t=t.filter((e=>e.condition));let n=t.map((e=>e.title+" : "+e.text));n.length&&(console.log(__("Map Error")+"\n----------------\n"+n.join("\n")+"\n----------------\n"+e.join("\n")),mappl10n.options.admin&&alert(__("Map error: please see the developer console (F12 in most browsers) for details.")))}();let e,i={...t.mapOpts};i.minZoom=isNaN(parseInt(i.minZoom))?0:parseInt(i.minZoom),"leaflet"==mappl10n.options.engine?(e=new L.Map(u.current,{attribution:'Map data <a href="https://openstreetmap.org">OpenStreetMap</a>',minZoom:0,scrollWheelZoom:mappl10n.options.scrollWheel,worldCopyJump:!0,zoomControl:null,...i}),L.control.zoom({position:"bottomright",zoomInTitle:"",zoomOutTitle:""}).addTo(e)):e=new google.maps.Map(u.current,{backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,mapTypeControl:!1,minZoom:0,scaleControl:!0,streetViewControl:!t.query,streetViewControlOptions:{position:google.maps.ControlPosition.LEFT_BOTTOM},...i}),f({map:e}),mappl10n.options.userLocation&&mappl10n.options.ssl&&h((e=>{e&&e.geometry&&e.geometry.location&&f({userLocation:e.geometry.location})}),!0),d({value:t.center,callback:e=>{e&&e.geometry&&e.geometry.location?f({parsedCenter:{lat:e.geometry.location.lat,lng:e.geometry.location.lng}}):f({parsedCenter:null}),f({init:1})}});break;case 1:Q(t.mapTypeId),function(){if(mappl10n.options.clustering&&!t.isEditable){let e,t=mappl10n.options.clusteringOptions?mappl10n.options.clusteringOptions:{};void 0!==t.disableClusteringAtZoom&&""==t.disableClusteringAtZoom&&(t.disableClusteringAtZoom=null),"leaflet"==mappl10n.options.engine?(e=L.markerClusterGroup(t),n.map.addLayer(e)):(t={...t,imagePath:mappl10n.options.baseurl+"/lib/js-markerclustererplus-main/images/m"},e=new MarkerClusterer(n.map,[],t)),f({clusterer:e})}}(),function(){if(t.isEditable&&"google"==mappl10n.options.engine&&google.maps.drawing){const e={fillColor:"#0000FF",fillOpacity:.4,strokeColor:"#0000FF",strokeOpacity:1,strokeWeight:2};n.drawingManager=new google.maps.drawing.DrawingManager({drawingControlOptions:{position:google.maps.ControlPosition.TOP_CENTER,drawingModes:[google.maps.drawing.OverlayType.MARKER,google.maps.drawing.OverlayType.POLYGON,google.maps.drawing.OverlayType.POLYLINE,google.maps.drawing.OverlayType.RECTANGLE,google.maps.drawing.OverlayType.CIRCLE]},circleOptions:e,polygonOptions:e,polylineOptions:e,rectangleOptions:e}),n.drawingManager.setMap(n.map)}}(),function(){n.polyline&&("leaflet"==mappl10n.options.engine?n.polyline.remove():n.polyline.setMap(null),f({polyline:null}));if(t.isEditable||!t.lines&&!mappl10n.options.lines||n.pois.length<2)return;const e={...mappl10n.options.lineOpts},i=[];if(_.map(n.pois,(e=>{i.push(T(e))})),"leaflet"==mappl10n.options.engine)f({polyline:new L.Polyline(i,e).addTo(n.map)});else{const t={strokeColor:e.color,strokeWeight:e.weight,strokeOpacity:e.opacity};e.icons&&(_.map(e.icons,(e=>{e.icon.path=parseInt(e.icon.path)})),e.icons[0].repeat="50px"),f({polyline:new google.maps.Polyline({map:n.map,path:i,...e,...t})}),e.animate&&e.icons&&e.icons.length&&function(){let e=0;const t=n.polyline.get("icons");t[0].repeat.replace("%","").replace("px","");window.setInterval((()=>{e+=1;t[0].offset=e+(t[0].repeat.indexOf("%")>=0?"%":"px"),n.polyline.set("icons",t)}),20)}()}}(),t.query?v((()=>f({init:2}))):(f({pois:t.pois?t.pois:[]}),f({init:2}));break;case 2:if((t.initialOpenInfo||mappl10n.options.initialOpenInfo)&&!t.isEditable&&n.pois){const e="leaflet"==mappl10n.options.engine?"load":"tilesloaded";o.mappEvent.addListenerOnce(n.map,e,(()=>{F(n.pois[0]),f({isLoaded:!0})})),J()}else J(),f({isLoaded:!0})}}),[n.init]),P((()=>{n.isLoaded&&!t.query&&f({pois:t.pois?t.pois:[]})}),[t.pois]),P((()=>{n.isLoaded&&t.query&&v()}),[t.query,n.filters]),P((()=>{n.isLoaded&&null==t.center&&J(null)}),[t.center]),P((()=>{n.isLoaded&&Q(t.mapTypeId)}),[t.mapTypeId]),P((()=>{n.isLoaded&&G(t.centerPoi)}),[t.centerPoi]),P((()=>
1{if(!n.isLoaded)return;let e,i,s;return e=o.mappEvent.addListener(n.map,"moveend idle",(e=>V())),i=o.mappEvent.addListener(n.map,"click dragstart zoom_changed zoomstart",(e=>{"leaflet"==mappl10n.options.engine&&"click"==e.type&&e.originalEvent&&!e.originalEvent.target.matches(".mapp-canvas")||A()})),n.drawingManager&&(s=o.mappEvent.addListener(n.drawingManager,"overlaycomplete",(e=>{n.drawingManager.setDrawingMode(null),z(null),t.onDrawingEvent&&t.onDrawingEvent(e)}))),t.name&&(window[t.name]={getPois:()=>n.pois,poiOpen:e=>f({opened:"string"==typeof e?e:e.id})}),()=>{o.mappEvent.removeListener(e),o.mappEvent.removeListener(i),s&&o.mappEvent.removeListener(s)}}));const V=(0,C.useDebounce)((()=>{f({bounds:function(){try{return n.map.getBounds()}catch(e){return null}}(),page:1}),t.onViewportChange&&t.onViewportChange({center:x(),zoom:D()})}),500,[t.onViewportChange,n.map]);function B(e,n){if("poi"!=mappl10n.options.mashupClick&&t.query&&"post"==e.otype&&e.oid&&e.url)switch(mappl10n.options.mashupClick){case"post":return void window.location.assign(e.url);case"postnew":return void window.open(e.url);case"postmodal":const t=document.createElement("div");return document.body.appendChild(t),wp.element.render(N(b.MappPopupModal,{onClose:()=>{wp.element.unmountComponentAtNode(t),t.remove()},poi:e}),t)}else F(e,n)}function A(){f({opened:null,isDirectionsOpen:!1})}function z(e){if(!e||e.id!=n.opened)if(e){if(e.id==n.opened)return;f({hovered:e.id}),mappl10n.options.tooltips&&!t.isEditable&&(A(),F(e,null))}else f({hovered:null})}function F(e,t){A(),n.isMini&&j(!1),f({kmlEvent:t,opened:e.id})}function R(){"leaflet"==mappl10n.options.engine?n.map.invalidateSize():o.mappEvent.trigger(n.map,"resize")}function j(e){f({isSidebarOpen:e=void 0!==e?e:!n.isSidebarOpen,isDirectionsOpen:!1}),setTimeout((()=>R()),100)}function J(e){e=null==e?n.parsedCenter:e;const i=t.zoom&&parseInt(t.zoom)?parseInt(t.zoom):null;if(e)return void Y(e,i||1);if(0==n.pois.length)return void Y({lat:0,lng:0},i||1);if(1==n.pois.length)return void G(n.pois[0]);let o="leaflet"==mappl10n.options.engine?new L.LatLngBounds:new google.maps.LatLngBounds;for(var s=0;s<n.pois.length;s++){var a=I(n.pois[s]);o=a?"leaflet"==mappl10n.options.engine?o.extend(a):o.union(a):o.extend(T(n.pois[s]))}i?Y(o.getCenter().toJSON(),i):E(o)}function G(e){let n;if(e.viewport){var i=e.viewport.ne.lng-e.viewport.sw.lng;i<0&&(i+=360),n=Math.floor(Math.log(360*u.current.clientWidth/i/256)/Math.LN2)}else n=t.zoom&&parseInt(t.zoom)?parseInt(t.zoom):parseInt(mappl10n.options.poiZoom);Y(T(e),n)}function H(){return mappl10n.options.ssl?N("div",{className:"mapp-geolocate-control-wrapper"},N("div",{className:"mapp-geolocate-control",onClick:()=>(f({isGeolocating:!0}),void h((e=>{f({isGeolocating:!1}),e&&e.geometry&&e.geometry.location&&Y(e.geometry.location,parseInt(mappl10n.options.poiZoom))}),!1)),title:__("Your Location")})):null}function W(){return n.hasFilters?N(a.MappFilters,{onChange:e=>function(e){t.onFilterchange?t.onFilterChange(e):f({filters:{...e}})}(e),otype:n.otype,poiCount:n.pageCount}):null}function Z(){if(n.isLoaded)return n.hasSearch||n.hasFilters?N("div",{className:"mapp-header"},n.hasSearch&&n.map?N("div",{className:"mapp-search-container"},N(p.MappPlaces,{buttonLabel:t.isEditable?__("Add to map"):N("img",{src:mappl10n.options.baseurl+"/images/search.png"}),focus:t.isEditable,includeBusinesses:t.isEditable,map:n.map,onSearch:e=>{t.onSearch?t.onSearch(e):function(e){if(!e||!e.geometry)return;const t=e.geometry.location?e.geometry.location:null,n=e.geometry.viewport?e.geometry.viewport:null;let i;if("leaflet"==mappl10n.options.engine){const e=new L.LatLng(t.lat,t.lng);i=n?new L.LatLngBounds(new L.LatLng(n.sw.lat,n.sw.lng),new L.LatLng(n.ne.lat,n.ne.lng)):e.toBounds(1e3*mappl10n.options.radius)}else{const e=new google.maps.Circle({center:t,radius:1e3*mappl10n.options.radius});i=n?new google.maps.LatLngBounds(new google.maps.LatLng(n.sw.lat,n.sw.lng),new google.maps.LatLng(n.ne.lat,n.ne.lng)).union(e.getBounds()):e.getBounds()}i&&E(i),Y(t)}(e)}})):null,"top"==mappl10n.options.filtersPos&&W()):null}function U(){if(n.isLoaded)return n.pois.map((i=>N(r.MappPoi,{key:i.id,isClusterable:!!n.clusterer,isEditable:!!t.isEditable,isHovered:i.id==n.hovered,isOpen:i.id==n.opened,map:n.map,onChange:e=>{t.onPoiChange&&t.onPoiChange(i.id,e)},onClick:e=>B(i,e),onClusterAdd:e=>function(e){n.clusterer&&("leaflet"==mappl10n.options.engine?n.clusterer.addLayer(e):n.clusterer.addMarker(e))}(e),onMouseOut:()=>{z(null)},onMouseOver:()=>z(i),onRenderPopup:(i,o)=>function(i,o){const s=function(e){if(n.clusterer){if("leaflet"==mappl10n.options.engine){var t=n.clusterer.getVisibleParent(e);return t&&t!=e?t.getLatLng():null}const o=n.clusterer.getClusters();for(var i=0;i<o.length;i++){const t=o[i].markers_;if(t.length>1)for(let n=0;n<t.length;n++)if(t[n]==e)return o[i].center_}}}(o),a=T(i),l=s?s.toJSON():a.toJSON();let p,r,m={x:0,y:0};s?m={x:0,y:-14}:i.type||(m=mappl10n.options.iconScale&&mappl10n.options.iconScale[0]&&mappl10n.options.iconScale[1]?{x:0,y:0-mappl10n.options.iconScale[1]}:{x:0,y:-32});n.kmlEvent&&(n.kmlEvent.pixelOffset&&(m={x:e.pixelOffset.width,y:e.pixelOffset.height}),n.kmlEvent.featureData?p=n.kmlEvent.featureData:n.kmlEvent&&n.kmlEvent.propagatedFrom&&n.kmlEvent.propagatedFrom.feature&&n.kmlEvent.propagatedFrom.feature.properties&&(p=n.kmlEvent.propagatedFrom.feature.properties));r=t.onRenderPopup?t.onRenderPopup(i,A):N(c.MappPoiContent,{context:"popup",feature:p,onDirectionsClick:()=>f({isDirectionsOpen:!0,directionsTo:i}),poi:i,template:n.templates.popup,thumbs:mappl10n.options.thumbsPopup});return N(w,{anchor:m,className:!t.isEditable&&mappl10n.options.thumbsPopup?"mapp-thumb-"+mappl10n.options.thumbsPopup:"",content:r,map:n.map,point:l})}(i,o),poi:i})))}function K(){return!n.poiList||n.isDirectionsOpen?null:N("div",{className:"mapp-sidebar"+(n.isSidebarOpen?" mapp-sidebar-open":"")},N("div",{className:"mapp-sidebar-toggle",onClick:()=>j()}),"list"==mappl10n.options.filtersPos&&W(),t.onRenderSidebar&&t.onRenderSidebar(),function(){if(!n.poiList||!n.isLoaded)return null;let e=[];return e=n.hasSearch&&n.bounds&&!t.isEditable?n.pois.filter(((e,t)=>n.bounds.contains(T(e)))):n.pois,n.pageCount!=e.length&&f({pageCount:e.length}),N(m.MappPoiList,{className:!t.isEditable&&mappl10n.options.thumbsList?" mapp-thumb-"+mappl10n.options.thumbsList:"",hovered:n.hovered,isEditable:t.isEditable,isPaged:!!t.query,onClick:e=>B(y(e)),onDirectionsClick:e=>f({isDirectionsOpen:!0,directionsTo:y(e)}),onDragDrop:e=>{let{from:t,to:n}=e;return onDragDrop(t,n)},onHover:e=>z(y(e)),onPage:e=>{f({page:e})},opened:n.opened,page:n.page,pois:e,template:t.isEditable?null:n.templates.item})}())}function q(e){return N(O,null,N("div",{className:"mapp-wrapper",style:e},N("div",{className:"mapp-content"},n.isFetching||n.isGeolocating?N(O,null,N("div",{className:"mapp-spinner-overlay"}),N("div",{className:"mapp-spinner"})):null,Z(),N("div",{className:"mapp-main"},"inline"!=n.layout&&K(),function(){if(!n.isDirectionsOpen)return null;let e="";return n.directionsTo&&(e=n.directionsTo.address?n.directionsTo.address:T(to).toUrlValue()),N(s.MappDirections,{from:fromAddress,to:e,onClose:()=>{f({isDirectionsOpen:!1,directionsTo:null})}})}(),N("div",{className:"mapp-canvas-panel"},N("div",{className:"mapp-canvas",ref:u}),n.isLoaded&&n.userLocation?N(r.MappPoi,{isClusterable:!1,isEditable:!1,isOpen:!1,key:"user",map:n.map,poi:{point:n.userLocation,iconid:"geolocation"}}):null,U(),t.isEditable||"leaflet"==mappl10n.options.engine||!n.map?null:N(l.MappMenuControl,{map:n.map,onCenter:()=>{A(),J()}}),H())),n.poiList&&"inline"!=n.layout&&n.isMini?N("div",{className:"mapp-footer"},!n.isSidebarOpen&&N("div",{className:"mapp-button mapp-view-list",onClick:()=>j(!0)},N("img",{src:mappl10n.options.baseurl+"/images/outline_format_list_bulleted_black_18dp.png"}),"List"),n.isSidebarOpen&&N("div",{className:"mapp-button mapp-view-map",onClick:()=>j(!1)},N("img",{src:mappl10n.options.baseurl+"/images/outline_map_black_18dp.png"}),"Map")):null)),"inline"==n.layout&&K())}function Q(e){const t=mappl10n.options.standardStyles.concat(mappl10n.options.userStyles),i=_.find(t,(t=>t.id==e));!mappl10n.options.style||"roadmap"!=e&&"streets"!=e&&i||(e=mappl10n.options.style);let o=_.find(t,(t=>t.id==e));if(o=o||t[0],"leaflet"==mappl10n.options.engine){let e={mapbox:{accessToken:mappl10n.options.mapbox,attribution:['<a href="https://www.mappresspro.com" target="_blank">MapPress</a>','<a href="https://www.mapbox.com/about/maps" target="_blank">&copy; Mapbox<a/>','<a href="https://www.openstreetmap.org/about/" target="_blank">&copy; OpenStreetMap</a>'],url:"https://api.mapbox.com/styles/v1/{user}/{mapboxid}/tiles/256/{z}/{x}/{y}{r}?access_token={accessToken}&fresh=true",zoomOffset:0},osm:{attribution:['<a href="https://www.mappresspro.com" target="_blank">MapPress</a>','<a href="https://openstreetmap.org" target="_blank">Map data (c) OpenStreetMap</a>'],url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}}[o.provider],t={...e,...o};L.tileLayer(e.url,t).addTo(n.map)}else if(n.map.setMapTypeId("standard"==o.type?o.id:"roadmap"),o.json){let e=null;try{e=JSON.parse(o.json)}catch(e){console.log("Invalid JSON in map style")}n.map.setOptions({styles:e||null})}else n.map.setOptions({styles:null})}function Y(e,t,i){"leaflet"==mappl10n.options.engine?(null==t&&(t=n.map.getZoom()?n.map.getZoom():0),n.map.setVie
1w(e,t,i)):(e=e&&!e.toJSON?{lat:parseFloat(e.lat),lng:parseFloat(e.lng)}:e,t=t?parseInt(t):null,e&&n.map.setCenter(e),t&&n.map.setZoom(t))}const X=t.name?t.name+"-layout":"",$=function(){if(t.embed)return{width:"100%",height:"100%"};const e=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0],n=e=>"string"==typeof e&&(e.indexOf("px")>=0||e.indexOf("%")>=0)?e:e+"px";return{width:t.width?n(t.width):n(e.width),height:t.height?n(t.height):n(e.height)}}();let ee=["mapp-layout"];ee.push("left"==n.layout?"mapp-list-left":"mapp-inline"),ee.push("leaflet"==mappl10n.options.engine?"mapp-leaflet":"mapp-google"),n.isMini&&ee.push("mapp-mini"),t.classname&&ee.push(t.classname);const te=t.alignment?t.alignment:mappl10n.options.alignment;let ne=[];te&&!document.body.classList.contains("block-editor-page")&&(ne.push("align"+te),ne.push("mapp-align-"+te));const ie="full"==t.alignment?"auto":$.width,oe={paddingBottom:$.height,height:"auto"};let se=t.parent?t.parent:null;if(window.frameElement)return window.frameElement.parentElement.className="mapp-iframe-container "+ne.join(" "),window.frameElement.parentElement.style.width=ie,se.className="mapp-layout "+ee.join(" "),q(oe);if(se)return se.className=se.className="mapp-layout "+ee.join(" ")+" "+ne.join(" "),se.id=X,se.style.width=ie,q(oe);{const e="mapp-layout "+ee.join(" ")+" "+ne;return N("div",{ref:g,className:e,id:X,style:{width:ie},tabIndex:"-1"},q(oe))}}},759:(e,t,n)=>{"use strict";n.r(t),n.d(t,{mappMarker:()=>o});var i=n(939);function o(e){this.anchorPoint=null,this.div=null,this.draggable=null,this.icon=null,this.map=null,this.position=null,this.visible=null,this.zIndex=0,this.setValues(e),this.overlayView=new google.maps.OverlayView,this.overlayView.draw=()=>this.draw(),this.overlayView.onAdd=()=>this.onAdd(),this.overlayView.onRemove=()=>this.onRemove(),this.div=document.createElement("div"),this.div.classList.add("mapp-marker")}o.prototype={draw:function(){if(!this.div||!this.icon)return;let e=this.overlayView.getProjection();if(e){let t=e.fromLatLngToDivPixel(this.position),n=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};this.div.style.left=t.x-n.width/2+"px",this.div.style.top=t.y-n.height+"px"}},getDiv:function(){return this.div},getDraggable:function(){return this.draggable},getMap:function(){return this.map},getPosition:function(){return this.position},getVisible:function(){return this.visible},handleEvent:function(e){let t="on"+e.type[0].toUpperCase()+e.type.slice(1);this[t]&&this[t](e)},onAdd:function(){let e=this.overlayView.getPanes();e&&(e.overlayMouseTarget.append(this.div),this.icon&&this.setIcon(),google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.div),this.div.addEventListener("click",(()=>{(!this.dragging||this.dragging&&!this.dragging.moved)&&i.mappEvent.trigger(this,"click"),this.dragging=null})),this.div.addEventListener("mouseenter",this),this.div.addEventListener("mouseleave",this),this.setDraggable(this.draggable))},onMouseenter:function(e){i.mappEvent.trigger(this,"mouseover")},onMouseleave:function(e){i.mappEvent.trigger(this,"mouseout")},onPointerdown:function(e){const t=this.map.getDiv().getBoundingClientRect(),n=this.overlayView.getProjection().fromLatLngToContainerPixel(this.position);this.dragging={moved:!1,startPixel:{x:e.clientX,y:e.clientY},offset:{x:n.x-(e.clientX-t.left),y:n.y-(e.clientY-t.top)}},this.toggleDragEvents(!0)},onPointermove:function(e){if(Math.abs(e.clientX-this.dragging.startPixel.x)+Math.abs(e.clientY-this.dragging.startPixel.y
1)<3)return;const t=this.map.getDiv().getBoundingClientRect();let n={x:e.clientX-t.left+this.dragging.offset.x,y:e.clientY-t.top+this.dragging.offset.y};this.setPosition(this.overlayView.getProjection().fromContainerPixelToLatLng(n)),this.draw(),this.dragging.moved=!0,i.mappEvent.trigger(this,"dragstart")},onPointercancel:function(e){this.onPointerup(e)},onPointerup:function(e){this.dragging&&this.dragging.moved&&i.mappEvent.trigger(this,"dragend"),this.toggleDragEvents(!1)},onRemove:function(){this.div&&(this.toggleDragEvents(!1),this.div.remove(),this.div=null)},set:function(e,t){let n="set"+e[0].toUpperCase()+e.slice(1);this[n]&&this[n](t)},setDraggable:function(e){this.draggable=e,this.map&&this.div&&(this.div.removeEventListener("pointerdown",this,{passive:!0}),e&&this.div.addEventListener("pointerdown",this,{passive:!0}))},setIcon:function(e){if(void 0!==e&&(this.icon=e),this.icon&&this.div){let e='<img draggable="false" src="'+this.icon.url+'">';this.div.innerHTML=e;let t=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};this.div.style.width=t.width+"px",this.div.style.height=t.height+"px",this.setZIndex(),this.draw()}},setMap:function(e){this.map=e,this.overlayView.setMap(e)},setPosition:function(e){this.position=e},setValues:function(e){for(const t in e)this.set(t,e[t])},setVisible:function(e){this.visible=e,this.div&&(this.div.style.visibility=e?"visible":"hidden")},setZIndex:function(e){this.zIndex=void 0!==e?e:this.zIndex,this.div&&(this.div.style.zIndex=e)},toggleDragEvents(e){document.removeEventListener("pointermove",this,{passive:!0}),document.removeEventListener("pointerup",this,{passive:!0}),document.removeEventListener("pointercancel",this,{passive:!0}),e&&(document.addEventListener("pointermove",this,{passive:!0}),document.addEventListener("pointerup",this,{passive:!0}),document.addEventListener("pointercancel",this,{passive:!0}))}}},602:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappMenuControl:()=>c});var i=n(326);const o=wp.element.createElement,{Fragment:s,useEffect:a,useLayoutEffect:l,useRef:p,useState:r}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function c(e){e={layer:null,map:null,onCenter:null,...e};const[t,n]=r({activeLayer:e.layer?e.layer:null,layers:null,isOpen:!1}),l=p(null);function c(e){n((t=>({...t,...e})))}function m(){c({isOpen:!t.isOpen})}return(0,i.useClickOutside)(l,(()=>{t.isOpen&&m()})),a((()=>{if("google"==mappl10n.options.engine){c({layers:{traffic:{googleLayer:new google.maps.TrafficLayer,label:__("Traffic")},bicycling:{googleLayer:new google.maps.BicyclingLayer,label:__("Bicycling")},transit:{googleLayer:new google.maps.TransitLayer,label:__("Transit")}}})}}),[]),o("div",{ref:l},o("div",{className:"mapp-menu-toggle",onClick:()=>m()}),t.isOpen&&function(){const n=_.map(t.layers,((n,i)=>{const s=t.activeLayer==i?"mapp-menu-item mapp-active":"mapp-menu-item";return o("div",{className:s,key:i,onClick:()=>function(n){t.activeLayer&&t.layers[t.activeLayer].googleLayer.setMap(null),n!=t.activeLayer&&t.layers[n].googleLayer.setMap(e.map),c({activeLayer:n==t.activeLayer?null:n,isOpen:!1})}(i)},n.label)}));return o("div",{className:"mapp-menu"},o("div",{className:"mapp-menu-items"},o("div",{className:"mapp-menu-item",onClick:()=>(c({isOpen:!1}),void e.onCenter())},__("Center map")),"google"==mappl10n.options.engine&&o(s,null,o("div",{className:"mapp-menu-separator"}),n)),o("div",{className:"mapp-menu-footer"},o("a",{className:"mapp-menu-help",href:"https://mappresspro.com/mappress-documentation",target:"_blank"},o("span",null,__("Help")))))}())}},27:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappPaginate:()=>r});const i=wp.element.createElement,{Fragment:o,useEffect:s,useLayoutEffect:a,useRef:l,useState:p}=wp.element,{sprintf}=wp.i18n;function r(e){function t(t,n){const i=Math.ceil(e.count/e.pageSize);switch(t){case"first":e.onChange(1);break;case"last":e.onChange(i);break;case"next":e.page<i&&e.onChange(e.page+1);break;case"prev":e.page>1&&e.onChange(e.page-1)}}return function(){const n=Math.ceil(e.count/e.pageSize),o=e.isBusy||e.page<=1,s=e.isBusy||e.page>=n,a=o?"mapp-paginate-button mapp-disabled":"mapp-paginate-button",l=s?"mapp-paginate-button mapp-disabled":"mapp-paginate-button",p=(r="%d of %d",wp.i18n.__(r,"mappress-google-maps-for-wordpress"));var r;return i("div",{className:"mapp-paginate"},i("div",{className:a,onClick:()=>{o||t("first")}},"«"),i("div",{className:a,onClick:()=>{o||t("prev")}},"‹"),i("div",{className:"mapp-paginate-count"},sprintf(p,e.page,n)),i("div",{className:l,onClick:()=>{s||t("next")}},"›"),i("div",{className:l,onClick:()=>{s||t("last")}},"»"))}()}},818:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappPlaces:()=>u});var i=n(117),o=n(10);const s=wp.element.createElement,{Fragment:a,useCallback:l,useEffect:p,useLayoutEffect:r,useRef:c,useState:m}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");function u(e){e={buttonLabel:null,focus:!1,includeBusinesses:!1,map:null,onSearch:null,...e};const{geocode:t,getPredictions:n}=(0,o.useGeocoding)({map:e.map,includeBusinesses:e.includeBusinesses}),[a,l]=m({suggestions:[]});return s(i.MappAutocomplete,{buttonLabel:e.buttonLabel,className:"mapp-places",debounce:"nominatim"===mappl10n.options.geocoder?500:300,delay:"nominatim"==mappl10n.options.geocoder?500:50,focus:e.focus,onFetch:function(t){n({map:e.map,value:t,callback:e=>{var t;t={suggestions:e},l((e=>({...e,...t})))}})},onSelect:function(n){let{suggestion:i,value:o}=n;t({map:e.map,suggestion:i,value:o,callback:t=>{t&&e.onSearch(t)}})},placeholder:__("Search"),suggestions:a.suggestions,title:__("Enter an address, place, KML file URL, or lat,lng")})}},50:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappPoiContent:()=>m});var i=n(939);const o=wp.element.createElement,{Fragment:s,useEffect:a,useLayoutEffect:l,useMemo:p,useRef
1:r,useState:c}=wp.element;wp.i18n.sprintf;function m(e){e={context:null,feature:null,onDirectionsClick:null,poi:null,template:null,thumbs:null,...e};const[t,n]=c({imageNumber:0});function a(e){n((t=>({...t,...e})))}return o(s,null,function(){const n="list"!=e.context&&mappl10n.options.thumbWidth&&mappl10n.options.thumbHeight?{width:mappl10n.options.thumbWidth+"px",height:mappl10n.options.thumbHeight+"px"}:null,i=e.thumbs&&e.poi.images&&e.poi.images.length&&e.poi.images[t.imageNumber]?e.poi.images[t.imageNumber]:null;if(!i)return null;const s=function(e){switch(e.type){case"avatar":return o("div",{className:"mapp-avatar",dangerouslySetInnerHTML:{__html:e.html}});case"embed":return o("div",{className:"mapp-embed",dangerouslySetInnerHTML:{__html:e.html}});default:if("image"==e.type||!e.type)return o("img",{src:e.url,width:e.size[0]+"px",height:e.size[1]+"px"})}}(i);return o("div",{className:"mapp-thumbnail",style:n},t.imageNumber>=1&&o("div",{className:"mapp-gallery-previous",onClick:e=>function(e){t.imageNumber>0&&(a({imageNumber:t.imageNumber-1}),e.stopPropagation())}(e)}),s,t.imageNumber<e.poi.images.length-1&&o("div",{className:"mapp-gallery-next",onClick:n=>function(n){t.imageNumber<e.poi.images.length-1&&(a({imageNumber:t.imageNumber+1}),n.stopPropagation())}(n)}))}(),o("div",{className:"mapp-info"},function(){let t={...e.poi};t.icon=i.mappLib.getIconUrl(e.poi.iconid),e.feature&&(t.body=e.feature.description,t.title=e.feature.name);const n=i.mappLib.template(e.template,{poi:t});return o("div",{className:"mapp-template",dangerouslySetInnerHTML:{__html:n}})}(),function(){var t;if(!(e.template.indexOf("user")>=0))return"popup"==e.context&&mappl10n.options.directionsPopup||"list"==e.context&&mappl10n.options.directionsList?o("div",null,o("span",{className:"mapp-dir",onClick:()=>e.onDirectionsClick()},(t="Get Directions",wp.i18n.__(t,"mappress-google-maps-for-wordpress")))):void 0}()))}},615:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappPoiList:()=>g});var i=n(939),o=n(27),s=n(50);const a=wp.element.createElement,{Fragment:l,useEffect:p,useLayoutEffect:r,useMemo:c,useRef:m,useState:u}=wp.element,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress"),sprintf=wp.i18n.sprintf;const g=wp.element.memo((function(e){e={className:null,hovered:null,isEditable:!1,isPaged:!1,onClick:null,onDragDrop:null,onHover:null,onPage:null,opened:null,page:1,pois:null,template:null,...e};const[t,n]=u({dragging:null,dragover:null,pageSize:!e.isEditable&&mappl10n.options.poiListPageSize?parseInt(mappl10n.options.poiListPageSize):20});function p(e){n((t=>({...t,...e})))}function r(n){let o,r="mapp-item";return e.opened!=n.id&&e.hovered!=n.id||(r+=" mapp-selected"),r+=t.dragover==n.id?" mapp-dragover":"",o=e.isEditable?a(l,null,a("img",{className:"mapp-icon",src:i.mappLib.getIconUrl(n.iconid)}),a("div",{className:"mapp-title"},n.title)):a(s.MappPoiContent,{context:"list",onDirectionsClick:()=>e.onDirectionsClick(n.id),poi:n,template:e.template,thumbs:mappl10n.options.thumbsList}),a("div",{className:r,dangerouslySetInnerHTML:null,draggable:e.isEditable,key:n.id,onClick:()=>e.onClick(n.id),onDragOver:e=>e.preventDefault(),onDragStart:e=>p({dragging:n.id}),onDragEnter:e=>p({dragover:n.id}),onDragEnd:e=>p({dragging:null,dragover:null}),onDrop:i=>{return o=n.id,void(e.onDragDrop&&e.onDragDrop({from:t.dragging,to:o}));var o},onMouseEnter:t=>{e.onHover(n.id)},onMouseLeave:t=>{e.onHover(null)}},o)}return a("div",{className:"mapp-list "+(e.className?e.className:"")},e.isPaged&&function(){let t=1!=e.pois.length?__("%d Results"):__("%d Result");return t=sprintf(t,e.pois.length),a("div",{className:"mapp-list-header"},a("div",{className:"mapp-list-count"},t))}(),function(){const n=t.pageSize*(e.page-1),i=n+t.pageSize-1;return a("div",{className:"mapp-items"},_.map(e.pois,((e,t)=>{if(t>=n&&t<=i)return r(e)})))}(),e.isPaged&&(e.pois.length<=t.pageSize?null:a("div",{className:"mapp-list-footer"},a(o.MappPaginate,{count:e.pois.length,onChange:t=>e.onPage(t),page:e.page,pageSize:t.pageSize}))))}))},81:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappPoi:()=>m});var i=n(939),o=n(759);wp.element.createElement;
1const{Fragment:s,useEffect:a,useLayoutEffect:l,useMemo:p,useRef:r,useState:c}=wp.element;function m(e){e={isClusterable:null,isEditable:null,isHovered:null,isOpen:null,map:null,onClusterAdd:null,onMouseOut:null,onMouseOver:null,poi:null,...e};const t=r(null),[n,s]=c({overlay:null});function l(t){p()&&"google"==mappl10n.options.engine&&("rectangle"==e.poi.type&&(i.mappEvent.clearListeners(n.overlay,"bounds_changed"),t&&i.mappEvent.addListener(n.overlay,"bounds_changed",(()=>{m()}))),"circle"==e.poi.type&&(i.mappEvent.clearListeners(n.overlay,"center_changed radius_changed"),t&&i.mappEvent.addListener(n.overlay,"center_changed radius_changed",(()=>{m()}))),"polygon"!=e.poi.type&&"polyline"!=e.poi.type||(i.mappEvent.clearListeners(n.overlay,"rightclick"),i.mappEvent.clearListeners(n.overlay.getPath(),"insert_at remove_at set_at"),t&&(i.mappEvent.addListener(n.overlay,"rightclick",(e=>{null!=e.vertex&&n.overlay.getPath().getLength()>2&&(n.overlay.getPath().removeAt(e.vertex),m())})),i.mappEvent.addListener(n.overlay.getPath(),"insert_at remove_at set_at",(()=>{m()})))))}function p(){return"google"==mappl10n.options.engine&&-1!=["polyline","polygon","circle","rectangle"].indexOf(e.poi.type)}function m(){const t=i.mappPoi.parseOverlay(e.poi.type,n.overlay);e.onChange(t)}function u(t,n){n?"leaflet"==mappl10n.options.engine?t.addTo(e.map):t.setMap(e.map):"leaflet"==mappl10n.options.engine?t.remove():t.setMap(null)}return a((()=>{const n="leaflet"==mappl10n.options.engine&&"kml"!=e.poi.type?null:e.poi.type,a=_.pick(e.poi.poly,"strokeColor","strokeOpacity","strokeWeight","fillColor","fillOpacity");let l;switch(n){case"polygon":l=new google.maps.Polygon({paths:e.poi.poly.paths,...a});break;case"polyline":l=new google.maps.Polyline({path:e.poi.poly.path,...a});break;case"circle":const t=new google.maps.LatLng(e.poi.point.lat,e.poi.point.lng);l=new google.maps.Circle({center:t,radius:parseFloat(e.poi.poly.radius),...a});break;case"rectangle":l=new google.maps.Rectangle({bounds:i.mappLib.viewportToBounds(e.poi.viewport),...a});break;case"kml":const n=e.poi.kml&&e.poi.kml.url?e.poi.kml.url:"";l="leaflet"==mappl10n.options.engine?omnivore.kml(n):new google.maps.KmlLayer({url:n,preserveViewport:!0,suppressInfoWindows:!0});break;default:l="leaflet"==mappl10n.options.engine?L.marker([e.poi.point.lat,e.poi.point.lng]):new o.mappMarker({position:new google.maps.LatLng(e.poi.point.lat,e.poi.point.lng)}),l.setIcon(i.mappLib.getIcon(e.poi.iconid))}var r;return r={overlay:l},s((e=>({...e,...r}))),"kml"!=e.poi.type&&("leaflet"==mappl10n.options.engine?l.options.draggable=e.isEditable:l.setDraggable(e.isEditable),p()&&l.setEditable(e.isEditable)),e.isClusterable?(e.onClusterAdd(l),"google"==mappl10n.options.engine&&u(l,e.map)):u(l,e.map),t.current=l,()=>{u(t.current,null)}}),[]),a((()=>{if(n.overlay){const t=_.pick(e.poi.poly,"strokeColor","strokeOpacity","strokeWeight","fillColor","fillOpacity");n.overlay.setOptions({...t})}}),[e.poi.poly]),a((()=>{n.overlay&&n.overlay.setIcon(i.mappLib.getIcon(e.poi.iconid))}),[e.poi.iconid]),a((()=>{n.overlay&&function(t){if(e.poi.type)return;if("icon"==mappl10n.options.highlight&&"leaflet"==mappl10n.options.engine&&e.isEditable)return;var o="leaflet"==mappl10n.options.engine?n.overlay._icon:n.overlay.getDiv();if(!o)return;switch(e.isEditable?"circle":mappl10n.options.highlight){case"circle":o.classList.toggle("mapp-marker-circle",t);break;case"icon":var s=t?i.mappLib.getIcon(mappl10n.options.highlightIcon):i.mappLib.getIcon(e.poi.iconid);if("leaflet"==mappl10n.options.engine&&n.overlay.getIcon().options.iconUrl==s.options.iconUrl)return;n.overlay.setIcon(s);break;case"scale":o.classList.add("mapp-marker"),o.classList.toggle("mapp-marker-scale",t)}const a=t?1e4:0;"leaflet"==mappl10n.options.engine?e.poi.type||n.overlay.setZIndexOffset(a):n.overlay.set("zIndex",a)}(e.isHovered||e.isOpen)}),[e.isHovered,e.isOpen,n.overlay]),a((()=>{if(n.overlay)return i.mappEvent.addListener(n.overlay,"click",(t=>{e.onClick(t)})),i.mappEvent.addListener(n.overlay,"mouseover",(t=>e.onMouseOver(t))),i.mappEvent.addListener(n.overlay,"mouseout",(t=>e.onMouseOut(t))),"kml"==e.poi.type&&("leaflet"==mappl10n.options.engine?(i.mappEvent.addListenerOnce(n.overlay,"ready",(()=>{n.overlayUpdate()})),i.mappEvent.addListenerOnce(n.overlay,"error",(()=>{alert(mappl10n.kml_error+" : "+e.poi.kml.url)}))):(i.mappEvent.addListener(n.overlay,"defaultviewport_changed",(()=>{m()}
1)),i.mappEvent.addListener(n.overlay,"status_changed",(()=>{"OK"!=n.overlay.getStatus()&&alert(mappl10n.kml_error+" : "+e.poi.kml.url)})))),e.isEditable&&(l(!0),i.mappEvent.addListener(n.overlay,"dragstart",(()=>(l(!1),void(e.onChange&&e.onChange({viewport:null}))))),i.mappEvent.addListener(n.overlay,"dragend",(()=>(m(),void l(!0))))),()=>{i.mappEvent.clearInstanceListeners(n.overlay)}})),e.isOpen?e.onRenderPopup(e.poi,n.overlay):null}},892:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MappPopupModal:()=>m});var i=n(939);const o=wp.element.createElement,s=wp.element.createPortal,{Fragment:a,useEffect:l,useLayoutEffect:p,useRef:r,useState:c}=wp.element;function m(e){e={onClose:null,poi:null,...e};const[t,n]=c({isBusy:!1,html:null});function a(e){n((t=>({...t,...e})))}const p=React.createRef();function r(t){27==t.keyCode&&e.onClose()}return l((()=>(document.body.classList.add("mapp-modal-noscroll"),()=>document.body.classList.remove("mapp-modal-noscroll"))),[]),l((()=>{e.poi.oid&&(a({isBusy:!0}),i.mappLib.ajax({method:"GET",data:{action:"mapp_get_post",oid:e.poi.oid,nonce:mappl10n.options.nonce},responseType:"html",callback:e=>{a({isBusy:!1,html:e})}}))}),[e.poi.oid]),l((()=>{p.current&&p.current.focus(),console.log("focus"+document.activeElement)}),[p.current]),s(o("div",{className:"mapp-modal"},o("div",{className:"mapp-modal-backdrop",onClick:e.onClose,onKeyDown:r},o("div",{className:"mapp-modal-close",onClick:e.onClose},"×")),o("div",{className:"mapp-modal-content-wrapper",ref:p,onKeyDown:r,tabIndex:0},o("div",{className:"mapp-modal-content"},t.isBusy&&o("div",{className:"mapp-modal-spinner"}),!t.isBusy&&o("div",{className:"mapp-modal-template",dangerouslySetInnerHTML:{__html:t.html}}),o("div",{className:"mapp-modal-close",onClick:e.onClose},"X")))),document.body)}},854:(e,t,n)=>{"use strict";n.r(t);var i=n(715),o=n(817),s=n(939),a=n(602),l=n(818),p=n(50),r=n(615),c=n(892),m=n(10);window.mapp=window.mapp||{};const u=wp.element.createElement,__=e=>wp.i18n.__(e,"mappress-google-maps-for-wordpress");wp.i18n._n;var g;g=jQuery,mapp.Map=function(e,t){this.defaults={alignment:null,center:null,classname:null,embed:null,height:null,initialOpenInfo:null,isEditable:null,layers:null,layout:null,lines:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,onDrawingEvent:null,onPoiClose:null,onPoiOpen:null,onSearch:null,poiList:null,poiListOpen:null,poiListPageSize:null,pois:null,oid:null,otype:null,query:null,search:null,sel:null,title:null,width:null,zoom:null},this.drawingManager=null,this.filters=null,this.hovered=null,this.isFullscreen=!1,this.iw=null,this.mapdata=e,this.opened=null,this.pagination={count:0,page:1},this.polyline=null,this.settings=t||{},this.templates=null,this.clusterer=null,this.dir_=null,this.div={},this.layers_={},this.map_=null,this.pois_=[],this.user_=null,this.xhr_,_.extend(this,this.defaults,this.mapdata,this.settings),this.poiList=void 0!==this.poiList&&null!=this.poiList?this.poiList:mappl10n.options.poiList,this.layout=this.layout?this.layout:mappl10n.options.layout,this.otype=this.otype?this.otype:mappl10n.options.otype,this.oid=this.oid?this.oid:mappl10n.options.oid},mapp.Map.prototype={display:function(){const{geocode:e}=(0,m.useGeocoding)({withBusinesses:this.isEditable});if(this.render(),!this.div||!this.div.layout)return;if(this.sanity(),this.query?this.templates={item:"mashup-item",popup:"mashup-popup"}:this.templates={item:"map-item",popup:"map-popup"},"leaflet"==mappl10n.options.engine?this.mapOpts=_.extend({attribution:'Map data <a href="https://openstreetmap.org">OpenStreetMap</a>',minZoom:0,scrollWheelZoom:mappl10n.options.scrollWheel,worldCopyJump:!0,zoomControl:null},this.mapOpts):this.mapOpts=_.extend({backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,mapTypeControl:!1,minZoom:0,scaleControl:!0,streetViewControl:!this.query,streetViewControlOptions:{position:google.maps.ControlPosition.LEFT_BOTTOM}},this.mapOpts),this.mapOpts.minZoom=isNaN(parseInt(this.mapOpts.minZoom))?0:parseInt(this.mapOpts.minZoom),!this.div||!this.div.canvas)return;"leaflet"==mappl10n.options.engine?(this.map_=new L.Map(this.div.canvas.get(0),this.mapOpts),L.control.zoom({position:"bottomright",zoomInTitle:"",zoomOutTitle:""}).addTo(this.map_)):(this.map_=new google.maps.Map(this.div.canvas.get(0),{mapTypeId:"roadmap",zoom:1}),this.map_.setOptions(this.mapOpts),this.addLayers()),this.addMenu(),this.addPopup(),this.isFilterable()&&this.renderFilters(),this.setMapTypeId(this.mapTypeId),this.clustering(),this.addDrawingManager();const t=g(".mapp-search-container",this.div.layout);t.length&&wp.element.render(u(l.MappPlaces,{buttonLabel:this.isEditable?__("Add to map"):u("img",{src:mappl10n.options.baseurl+"/images/search.png"}),focus:this.isEditable,includeBusinesses:this.isEditable,map:this.getMap(),onSearch:e=>{this.onSearch?this.onSearch(e):this.doSearch(e)}}),t.get(0)),this.addUserLocation(),this.addEvents("click dragstart zoom_changed zoomstart",(e=>{"leaflet"==mappl10n.options.engine&&"click"==e.type&&e.originalEvent&&!e.originalEvent.target.matches(".mapp-canvas")||this.poiClose()})),this.div.layout.on("click","[data-mapp-action]",(e=>{const t=g(e.currentTarget),n=t.attr("data-mapp-action"),i=t.attr("data-mapp-"+n);e.preventDefault(),this.onAction(n,i,t)})),new ResizeObserver(((e,t)=>{this.toggleView("mini"),this.resize()})).observe(this.div.layout.get(0)),e({map:null,value:this.center,callback:e=>{this.center=e&&e.geometry&&e.geometry.location?{lat:e.geometry.location.lat,lng:e.geometry.location.lng}:null,this.setPois(this.pois),this.initCenter()}})}
1,initCenter:function(){setTimeout((()=>{this.recenter(),this.renderList(),this.isSearchable&&!this.isEditable&&this.addSearchMove(),"leaflet"==mappl10n.options.engine?this.initOpen():mapp.event.addListenerOnce(this.map_,"idle",(()=>this.initOpen()))}),100)},initOpen:function(){const e=this.pois_.length?this.pois_[0]:null,t=null!=this.initialOpenInfo?this.initialOpenInfo:mappl10n.options.initialOpenInfo;e&&t&&!this.isEditable&&this.poiOpen(e)},addDrawingManager:function(){if(this.isEditable&&"google"==mappl10n.options.engine&&google.maps.drawing){const e={fillColor:"#0000FF",fillOpacity:.4,strokeColor:"#0000FF",strokeOpacity:1,strokeWeight:2};this.drawingManager=new google.maps.drawing.DrawingManager({drawingControlOptions:{position:google.maps.ControlPosition.TOP_CENTER,drawingModes:[google.maps.drawing.OverlayType.MARKER,google.maps.drawing.OverlayType.POLYGON,google.maps.drawing.OverlayType.POLYLINE,google.maps.drawing.OverlayType.RECTANGLE,google.maps.drawing.OverlayType.CIRCLE]},circleOptions:e,polygonOptions:e,polylineOptions:e,rectangleOptions:e}),this.drawingManager.setMap(this.map_),mapp.event.addListener(this.drawingManager,"overlaycomplete",(e=>{this.drawingManager.setDrawingMode(null),this.poiHover(null),this.onDrawingEvent&&this.onDrawingEvent(e)}))}},addEvents:function(e,t){e=e.split(" ");for(var n=0;n<e.length;n++)mapp.event.addListener(this.map_,e[n],t)},addLayers:function(){this.layers_={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer};for(var e=g.makeArray(this.layers),t=0;t<e.length;t++){var n=e[t].trim(),i=n.split(".").pop();this.layers_[n]?this.toggleLayer(n):"kml"==i||"kmz"==i?this.layers_[n]=new google.maps.KmlLayer({map:this.map_,preserveViewport:!0,url:n}):"json"==i&&(this.layers_[n]=new google.maps.Data({map:this.map_}).loadGeoJson(n))}},addMenu:function(){this.isEditable||"leaflet"==mappl10n.options.engine||wp.element.render(u(a.MappMenuControl,{map:this.getMap(),onCenter:()=>{this.poiClose(),this.recenter()}}),this.div["menu-component"].get(0))},addPopup:function(){var e="mapp-iw";this.isEditable||(e+=" mapp-"+this.templates.popup),this.div.iw=g('<div class="'+e+'">').appendTo(this.div.canvas),this.iw=new mapp.Infobox(this.map_),this.iw.setContent(this.div.iw.get(0)),this.div.iw.on("click",".mapp-close",(()=>{this.poiClose()}))},addSearchMove:function(){},addUserLocation:function(){const{geolocate:e}=(0,m.useGeocoding)({withBusinesses:this.isEditable});mappl10n.options.userLocation&&mappl10n.options.ssl&&e((e=>{if(e&&e.geometry&&e.geometry.location){const t=e.geometry.location,n=s.mappLib.getIcon("geolocation");"leaflet"==mappl10n.options.engine?this.user_=L.marker([t.lat,t.lng],{icon:n}).addTo(this.map_):(this.user_=new mapp.Marker({icon:n,position:new google.maps.LatLng(t.lat,t.lng)}),this.user_.setMap(this.map_))}}),!0)},clusterGetLatLng:function(e){if(this.clusterer){if("leaflet"==mappl10n.options.engine){var t=this.clusterer.getVisibleParent(e.overlay);return t?t.getLatLng():null}for(var n=this.clusterer.getClusters(),i=0;i<n.length;i++){var o=n[i].markers_;if(o.length>1)for(var s=0;s<o.length;s++)if(o[s]==e.overlay)return n[i].center_}}},clustering:function(){if(mappl10n.options.clustering&&!this.isEditable){let e=mappl10n.options.clusteringOptions?mappl10n.options.clusteringOptions:{};void 0!==e.disableClusteringAtZoom&&""==e.disableClusteringAtZoom&&(e.disableClusteringAtZoom=null),"leaflet"==mappl10n.options.engine?this.clusterer=L.markerClusterGroup(e):(e=_.extend(e,{imagePath:mappl10n.options.baseurl+"/lib/js-markerclustererplus-main/images/m"}
1),this.clusterer=new MarkerClusterer(this.map_,[],e))}},clustersReset:function(){this.clusterer&&("leaflet"==mappl10n.options.engine?this.clusterer.clearLayers():this.clusterer.clearMarkers())},clustersSet:function(){if(this.clusterer){var e=[];for(let t=0;t<this.pois_.length;t++)this.pois_[t].type||e.push(this.pois_[t].overlay);"leaflet"==mappl10n.options.engine?(this.clusterer.addLayers(e),this.map_.addLayer(this.clusterer)):this.clusterer.addMarkers(e)}},fetchPois:function(e){var t=new Date;this.poiClose();var n={action:"mapp_query",debug:mappl10n.options.debug,filters:this.filters,query:this.query};this.spinner(!0),this.pagination.page=1,s.mappLib.ajax({data:n,callback:(n,i)=>{this.spinner(!1),n&&"OK"==n.status&&(this.setPois(n.data.pois),this.renderList(),mappl10n.options.debug&&console.log("Results: "+n.data.pois.length+" AJAX: "+(new Date-t)+(n.data.timing?n.data.timing:"")),e&&e())}})},fitBounds:function(e){return this.map_.fitBounds(e)},getBounds:function(){try{return this.map_.getBounds()}catch(e){return null}},getCenter:function(){try{return this.map_.getCenter()}catch(e){return null}},getMap:function(){return this.map_},getPois:function(){return this.pois_},getZoom:function(){try{return this.map_.getZoom()}catch(e){return null}},isFilterable:function(){const e=this.otype&&mappl10n.options.filters[this.otype]&&mappl10n.options.filters[this.otype].length>0;return mappl10n.options.pro&&e&&!this.isEditable&&!!this.query},isSearchable:function(){return!!this.isEditable},onAction:function(e,t,n){switch(e){case"geolocate":const{geolocate:e}=(0,m.useGeocoding)({withBusinesses:this.isEditable});e((e=>{e&&e.geometry&&e.geometry.location&&this.setView(e.geometry.location,parseInt(mappl10n.options.poiZoom))}),!1);break;case"sidebar-toggle":this.toggleSidebar();break;case"view-map":this.toggleSidebar(!1);break;case"view-list":this.toggleSidebar(!0);break;default:return!0}},doSearch:function(e){if(e&&e.geometry){var t=e.geometry.location?e.geometry.location:null,n=e.geometry.viewport?e.geometry.viewport:null;if("leaflet"==mappl10n.options.engine)var i=new L.LatLng(t.lat,t.lng),o=n?new L.LatLngBounds(new L.LatLng(n.sw.lat,n.sw.lng),new L.LatLng(n.ne.lat,n.ne.lng)):i.toBounds(1e3*mappl10n.options.radius);else{var s=new google.maps.Circle({center:t,radius:1e3*mappl10n.options.radius});o=n?new google.maps.LatLngBounds(new google.maps.LatLng(n.sw.lat,n.sw.lng),new google.maps.LatLng(n.ne.lat,n.ne.lng)).union(s.getBounds()):s.getBounds()}o&&this.fitBounds(o),this.setView(t)}},poiClick:function(e,t){if(this.poiClose(),"poi"!=mappl10n.options.mashupClick&&this.query&&"post"==this.otype&&e.oid&&e.url&&!this.isEditable)switch(mappl10n.options.mashupClick){case"post":return void window.location.assign(e.url);case"postnew":return void window.open(e.url);case"postmodal":const t=document.createElement("div");return document.body.appendChild(t),wp.element.render(u(c.MappPopupModal,{onClose:()=>{wp.element.unmountComponentAtNode(t),t.remove()},poi:e}),t)}else this.poiOpen(e,t)},poiClose:function(){this.opened&&this.poiHighlight(this.opened,!1),this.opened=null,wp.element.unmountComponentAtNode(this.div.iw.get(0)),this.iw.close(),this.renderDirections({isOpen:!1}),this.renderList(),this.onPoiClose&&this.onPoiClose()},poiHighlight:function(e,t){"icon"==mappl10n.options.highlight&&"leaflet"==mappl10n.options.engine&&this.isEditable||(t?e.highlight(!0):e.highlight(!1))},poiHover:function(e){e&&this.opened==e||(this.hovered&&this.hovered!=this.opened&&(this.poiHighlight(this.hovered,!1),this.hovered=null),e&&(this.hovered=e,this.poiHighlight(this.hovered,!0),mappl10n.options.tooltips&&!this.isEditable?(this.poiClose(),this.poiOpen(e,null,"popup")):this.poiHighlight(e,!0)),this.renderList())},poiInsert:function(e){this.pois_.unshift(e),e.setMap(this),this.renderList()},poiOpen:function(e,t){this.poiClose(),this.div.layout.hasClass("mapp-mini")&&this.toggleSidebar(!1),this.popupOpen(e,t,"popup"),this.poiHighlight(e,!0),this.onPoiOpen&&this.onPoiOpen(e)},poiRemove:function(e){var t=g.inArray(e,this.pois_);-1!=t&&(this.pois_[t].setMap(null),this.pois_.splice(t,1),this.renderList())},popupClose:function(){"icon"==mappl10n.options.highlight&&"leaflet"==mappl10n.options.engine&&this.isEditable||(this.iw.close(),this.renderDirections({isOpen:!1}),g(this).triggerHandler("mapp.close"))},popupOpen:function(e,t){let n=null;this.popupClose(),t&&t.featureData?n=t.featureData:t&&t.propagatedFrom&&t.propagatedFrom.feature&&t.propagatedFrom.feature.properties&&(n=t.propagatedFrom.feature.properties),this.isEditable||(wp.element.render(u(p.MappPoiContent,{context:"popup",feature:n,onDirectionsClick:()=>this.renderDirections({isOpen:!0,from:null,to:e}),poi:e,template:this.templates.popup,thumbs:mappl10n.options.thumbsPopup}
1),this.div.iw.get(0)),e.images&&e.images.length&&this.div.iw.addClass(" mapp-thumb-"+mappl10n.options.thumbsPopup));var i=this.clusterGetLatLng(e),o=i||e.getPosition(t);this.iw.open({position:o,anchorPoint:e.getAnchorPoint(t)}),this.opened=e},recenter:function(){var e=this.center&&this.center.hasOwnProperty("lat")&&this.center.hasOwnProperty("lng")?this.center:null,t=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null;if(e&&!t&&this.query)return void this.doSearch({geometry:{location:{lat:e.lat,lng:e.lng}}});if(e)return void this.setView(e,t||1);if(0==this.pois_.length)return void this.setView({lat:0,lng:0},t||1);if(1==this.pois_.length)return void this.pois_[0].center(t);let n="leaflet"==mappl10n.options.engine?new L.LatLngBounds:new google.maps.LatLngBounds;for(var i=0;i<this.pois_.length;i++){var o=this.pois_[i].getBounds(),s=this.pois_[i].getPosition();n=o?"leaflet"==mappl10n.options.engine?n.extend(o):n.union(o):n.extend(s)}t?this.setView(n.getCenter().toJSON(),t):this.fitBounds(n)},render:function(){let e=this.name?this.name+"-layout":"",t="mapp-layout",n=this.layout&&window.parent==window?this.layout:"left";if(t+="left"==n?" mapp-list-left":" mapp-inline",t+="leaflet"==mappl10n.options.engine?" mapp-leaflet ":" mapp-google ",t+=this.classname?" "+this.classname:"",!document.body.classList.contains("block-editor-page")){let e=this.alignment?this.alignment:mappl10n.options.alignment;if(e){let n=" align"+e+" mapp-align-"+e;window.parent==window?t+=n:g(window.frameElement).parent().parent().addClass(n)}}var i=s.mappLib.template("map",{map:this,layout:n});if(this.sel){if(this.div.layout=g(this.sel),this.div.layout.html(i),this.div.layout.addClass(t),this.div.layout.attr("id",e),!this.div.layout.length)return console.log("MapPress: Missing map name or container for map: "+this.name)}else{let n=g('<div id="'+e+'" class="'+t+'">');n.html(i);let o=g("#"+this.name+"-layout");if(!o.length)return console.log("MapPress: Missing map name or container for map: "+this.name);o.replaceWith(n),this.div.layout=n}g.each(["canvas","content","controls","directions","filters","header","list-component","menu-component","search","sidebar","wrapper"],((e,t)=>{this.div[t]=g(".mapp-"+t,this.div.layout)})),this.setSize({width:this.width,height:this.height}),this.set({poiList:this.poiList}),this.spinner(!1)},renderDirections:function(e){let{isOpen:t,from:n,to:o}=e;if(this.toggleView("directions",t),t){const e=o?o.getAddress():"",t=n?n.getAddress():"";wp.element.render(u(i.MappDirections,{from:t,to:e,onClose:()=>{wp.element.unmountComponentAtNode(this.div.directions.get(0)),this.toggleView("directions",!1)}}),this.div.directions.get(0))}else this.div.directions.length&&wp.element.unmountComponentAtNode(this.div.directions.get(0))},renderFilters:function(){this.div.filters&&this.div.filters.length&&wp.element.render(u(o.MappFilters,{onChange:e=>{this.filters=e,this.fetchPois()},poiCount:this.pagination.count}),this.div.filters.get(0))},renderList:function(){let e=[];
1if(!this.poiList)return;if(e=this.pois_,this.isSearchable()&&!this.isEditable){e=[];let t=this.getBounds();t&&_.map(this.pois_,((n,i)=>{t.contains(n.getPosition())&&e.push(n)}))}this.pagination.count!=e.length&&(this.pagination.count=e.length,this.renderFilters());let t=!this.isEditable&&mappl10n.options.thumbsList?" mapp-thumb-"+mappl10n.options.thumbsList:"";const n=e=>this.pois_.find((t=>t.id==e)),i=(e,t)=>{let n=_.findIndex(this.pois_,(t=>t.id==e)),i=_.findIndex(this.pois_,(e=>e.id==t));this.pois_.splice(i,0,this.pois_.splice(n,1)[0])};wp.element.render(u(r.MappPoiList,{bounds:this.getBounds(),className:t,hovered:this.hovered?this.hovered.id:null,isEditable:this.isEditable,isPaged:!0,map:this,onClick:e=>this.poiClick(n(e)),onDirectionsClick:e=>this.renderDirections({isOpen:!0,from:null,to:n(e)}),onDragDrop:e=>{let{from:t,to:n}=e;return i(t,n)},onHover:e=>this.poiHover(n(e)),onPage:e=>{this.pagination.page=e,this.renderList()},onSort:e=>{this.pois_=e,this.renderList()},opened:this.opened?this.opened.id:null,page:this.pagination.page,pois:e,template:this.isEditable?null:this.templates.item}),this.div["list-component"].get(0))},resetPois:function(){for(var e=0;e<this.pois_.length;e++)this.pois_[e].setMap(null);this.pois_=[],this.clustersReset()},resize:function(){this.map_&&("leaflet"==mappl10n.options.engine?this.map_.invalidateSize():mapp.event.trigger(this.map_,"resize"),this.toggleView("mini"))},sanity:function(){const e="<a href='"+mappl10n.options.adminurl+"/admin.php?page=mappress'>"+__("MapPress Settings")+"</a>",t="<a href ='http://mappresspro.com/mappress-faq' target='_blank'>"+__("MapPress FAQ")+"</a>",n="<a href='http://mappresspro.com/chris-contact', target='_blank'>"+__("contact support")+"</a>",i="<br/>"+sprintf(__("Please see the %s for help, or %s and provide this error message."),t,n),o=sprintf("<div class='mapp-errors-toolbar'><div class='mapp-errors-apikey'>%s</a></div>",__("Get an API Key"));this.div.layout.on("click",".mapp-errors-apikey",(()=>{window.open("https://mappresspro.com/how-to-get-a-google-maps-api-key")}));let s=[{condition:"leaflet"==mappl10n.options.engine&&"undefined"==typeof L,title:__("Leaflet library not loaded"),text:__("A theme or plugin is preventing the Leaflet library from loading.")+i},{condition:"google"==mappl10n.options.engine&&"undefined"==typeof google,title:__("Google Maps API not loaded"),text:__("A theme or plugin is preventing Google Maps from loading.")+i},{condition:"google"==mappl10n.options.engine&&!mappl10n.options.apikey,title:__("Google Maps API key required"),text:sprintf(__("Please enter a Google Maps API key in the %s, or switch to Leaflet maps."),e)+o},{condition:g('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1,title:__("Google Maps API loaded multiple times"),text:__("A theme or plugin has loaded Google Maps twice")+i},{condition:"undefined"==typeof _,title:__("Underscore library not loaded"),text:__("A theme or plugin is preventing the underscore.js library from loading.")+i}];_.map(s,(e=>{if(e.condition){mappl10n.options.admin&&this.sanityOutput({title:e.title,text:e.text?e.text:""});let t=jQuery("<span>"+e.text.replace("<br/>","\n")+"</span>").text();console.error(__("Map error")+": "+e.title+" - "+t)}}))},sanityOutput(e){if(!g(".mapp-errors-overlay",this.div.content).length){let e="<div class='mapp-errors-overlay'></div><div class='mapp-errors'><div class='mapp-errors-header'>"+__("Oops!  Something went wrong.")+"</div><div class='mapp-errors-list'></div></div>";this.div.content.prepend(e)}g(".mapp-errors-list",this.div.content).append("<div class='mapp-errors-title'>"+e.title+"</div><div class='mapp-errors-text'>"+e.text+"</div>")},set:function(e){for(let n in e){var t=e[n];switch(n){case"mapTypeId":this.mapTypeId=t,this.setMapTypeId(t);break;case"poiList":this.poiList=null==t?mappl10n.options.poiList:t,this.toggleSidebar(mappl10n.options.poiListOpen),this.toggleView("mini");break;case"search":this.search=t;break;case"style":this.setStyle(t);break;case"title":this.title=t;break;default:this[n]=t}}},setMapTypeId:function(e){const t=mappl10n.options.standardStyles.concat(mappl10n.options.userStyles),n=_.find(t,(t=>t.id==e));!mappl10n.options.style||"roadmap"!=e&&"streets"!=e&&n||(e=mappl10n.options.style);let i=_.find(t,(t=>t.id==e));i=i||t[0],this.setStyle(i)},setPois:function(e){if(this.resetPois(),e)for(var t=0;t<e.length;t++){var n=new mapp.Poi(e[t]);this.pois_.push(n),n.setMap(this)}
1this.clustersSet(),this.setLines()},setSize:function(e){var t=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0];let n={},i={};if(e&&e.hasOwnProperty("width")&&(n={width:e.width?e.width:t.width}),e&&e.hasOwnProperty("height")){let n=e.height?e.height:t.height;i="string"==typeof n&&n.includes("%")?{"padding-bottom":n,height:"auto"}:{"padding-bottom":0,height:n}}window.frameElement&&window.frameElement.classList.contains("mapp-iframe")?(g(window.frameElement).parent().parent().css(n),g(window.frameElement).parent().css(i)):this.embed?(n={height:"100%"},i={"padding-bottom":0,height:"100%"}):(this.div.layout.css(n),this.div.wrapper.css(i)),this.resize()},setStyle:function(e){if("leaflet"==mappl10n.options.engine){let t={mapbox:{accessToken:mappl10n.options.mapbox,attribution:['<a href="https://www.mappresspro.com" target="_blank">MapPress</a>','<a href="https://www.mapbox.com/about/maps" target="_blank">&copy; Mapbox<a/>','<a href="https://www.openstreetmap.org/about/" target="_blank">&copy; OpenStreetMap</a>'],url:"https://api.mapbox.com/styles/v1/{user}/{mapboxid}/tiles/256/{z}/{x}/{y}{r}?access_token={accessToken}&fresh=true",zoomOffset:0},osm:{attribution:['<a href="https://www.mappresspro.com" target="_blank">MapPress</a>','<a href="https://openstreetmap.org" target="_blank">Map data (c) OpenStreetMap</a>'],url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}}[e.provider],n=g.extend({},t,e);L.tileLayer(t.url,n).addTo(this.map_)}else if(this.map_.setMapTypeId("standard"==e.type?e.id:"roadmap"),e.json){let t=null;try{t=JSON.parse(e.json)}catch(e){console.log("Invalid JSON in map style")}this.map_.setOptions({styles:t||null})}else this.map_.setOptions({styles:null})},setLines:function(){if(this.polyline&&("leaflet"==mappl10n.options.engine?this.polyline.remove():this.polyline.setMap(null),this.polyline=null),this.isEditable||!this.lines&&!mappl10n.options.lines||this.pois_.length<2)return;const e={...mappl10n.options.lineOpts},t=[];if(_.map(this.pois_,(e=>{t.push(e.getPosition())})),"leaflet"==mappl10n.options.engine)this.polyline=new L.Polyline(t,e).addTo(this.map_);else{const n={strokeColor:e.color,strokeWeight:e.weight,strokeOpacity:e.opacity};e.icons&&(_.map(e.icons,(e=>{e.icon.path=parseInt(e.icon.path)})),e.icons[0].repeat="50px"),this.polyline=new google.maps.Polyline({map:this.map_,path:t,...e,...n}),e.animate&&e.icons&&e.icons.length&&this.setLinesAnimation()}},setLinesAnimation:function(){let e=0;const t=this.polyline.get("icons");t[0].repeat.replace("%","").replace("px",""),window.setInterval((()=>{e+=1,t[0].offset=e+(t[0].repeat.indexOf("%")>=0?"%":"px"),this.polyline.set("icons",t)}),20)},setView:function(e,t,n){"leaflet"==mappl10n.options.engine?(null==t&&(t=this.map_.getZoom()?this.map_.getZoom():0),this.map_.setView(e,t,n)):(e=e&&!e.toJSON?{lat:parseFloat(e.lat),lng:parseFloat(e.lng)}:e,t=t?parseInt(t):null,e&&this.map_.setCenter(e),t&&this.map_.setZoom(t))},spinner:function(e){g(".mapp-spinner-overlay",this.div.layout).toggle(e),g(".mapp-spinner",this.div.layout).toggle(e)},toggleLayer:function(e,t){t=void 0!==t?t:null==this.layers_[e].getMap(),g.each(["traffic","bicycling","transit"],((e,t)=>{this.layers_[t].setMap(null)})),t&&this.layers_[e].setMap(this.map_)},toggleSidebar:function(e){this.div.sidebar.toggleClass("mapp-sidebar-open",e),this.isSidebarOpen=e,g(".mapp-view-list",this.div.layout).toggle(!e),g(".mapp-view-map",this.div.layout).toggle(e),setTimeout((()=>this.resize()),100)},togglePois:function(e){e=!!e;for(var t=0;t<this.pois_.length;t++)this.pois_[t].setVisible(e)},toggleView:function(e,t){if("mini"==e){let e=this.div.layout.hasClass("mapp-mini"),t=!("inline"==this.layout||!this.poiList)&&this.div.layout.width()<mappl10n.options.mini;return this.div.layout.toggleClass("mapp-mini",t),t!=e&&this.toggleSidebar(!t),g(".mapp-footer",this.div.layout).toggle(t),void(t&&(g(".mapp-view-list",this.div.layout).toggle(!0),g(".mapp-view-map",this.div.layout).toggle(!1)))}t=void 0===t?!this.div.layout.hasClass("mapp-view-"+e):t,this.div.layout.toggleClass("mapp-view-"+e,t),"list"==e&&t&&this.renderList(),"directions"==e&&(this.resize(),g(".mapp-directions",this.div.layout).toggle(t),g(".mapp-sidebar",this.div.layout).toggle(!t))},toJSON:function(){this.pois=[];for(var e=0;e<this.pois_.length;e++)this.pois.push(this.pois_[e].toJSON());return{center:this.center,height:this.height,mapid:this.mapid,mapTypeId:this.mapTypeId,metaKey:this.metaKey,pois:this.pois,oid:this.oid,otype:this.otype,search:this.search,title:this.title,width:this.width,zoom:this.zoom}}}},689:()=>{var e;window.mapp=window.mapp||{},e=jQuery,mapp.Infobox=function(t,n){this.map=t,this.anchorPoint=null,this.fudge=30,this.isOpen=!1,this.mapDiv="leaflet"==mappl10n.options.engine?t.getContainer():t.getDiv(),this.node=null,this.opts=_.extend({clip:!0,pan:!0},n),this.overlayView=null,this.position=null,this.size=null,this.wrapper=null,this.wrapper=e('<div class="mapp-ib-wrapper" tabindex="0"><div class="mapp-ib-content"><div class="mapp-ib" tabindex="0"></div><div class="mapp-ib-tip"></div></div></div>'),this.wrapper.css({display:"none"}),n&&n.className&&this.wrapper.addClass(n.className),this.node=e(".mapp-ib-content",this.wrapper),"leaflet"==mappl10n.options.engine?mapp.event.addListener(this.map,"move",(e=>{this.isOpen&&this.draw()})):(this.overlayView=new google.maps.OverlayView,this.overlayView.onAdd=function(){},this.overlayView.setMap(this.map),this.overlayView.draw=()=>{this.isOpen&&this.draw()}),this.node.get(0).addEventListener("load",(()=>{"leaflet"==mappl10n.options.engine?this.open({position:this.position,anchorPoint:this.anchorPoint}):mapp.event.addListenerOnce(this.map,"panend",(e=>{this.open({position:this.position,anchorPoint:this.anchorPoint})}))}),{capture:!0});var i="leaflet"==mappl10n.options.engine?this.map.getContainer():this.map.getDiv();this.wrapper.appendTo(i),"leaflet"==mappl10n.options.engine&&t.on("load",(()=>{L.DomEvent.disableClickPropagation(this.wrapper.get(0))}))},mapp.Infobox.prototype={close:function(){this.isOpen=!1,this.wrapper&&this.wrapper.css({display:"none"})},draw:function(){if(document.fullscreenElement||this.map.isFullscreen)return;if(!this.position)return;let e,t,n;if(e=this.node.outerWidth(),t=this.node.outerHeight(),"leaflet"==mappl10n.options.engine)n=this.map.latLngToContainerPoint(this.position);else{const e=this.overlayView.getProjection();if(!e)return;n=e.fromLatLngToContainerPixel(this.position)}this.wrapper.css({left:n.x-e/2+this.anchorPoint.x,bottom:this.mapDiv.clientHeight-n.y-this.anchorPoint.y})},getContent:function(){return e(".mapp-ib",this.node).get(0)},open:function(e){this.position=e.position,this.anchorPoint=e.anchorPoint?e.anchorPoint:{x:0,y:0},this.wrapper.css({display:"flex"}),this.wrapper.css({left:0,bottom:0,width:"auto",height:"auto"});const{width:t,height:n}=this.wrapper.get(0).getBoundingClientRect();this.wrapper.css({width:t,height:n}),"leaflet"==mappl10n.options.engine&&this.map.stop(),this.isOpen=!0,this.draw(),this.pan()},pan:function(){const t=this.node.outerWidth(),n=this.node.outerHeight(),i=e(this.mapDiv).width(),o=e(this.mapDiv).height();if("leaflet"==mappl10n.options.engine)var s=this.map.latLngToContainerPoint(this.position);else{var a=this.overlayView.getProjection();s=a?a.fromLatLngToContainerPixel(this.position):null}if(!s)return;var l={x:s.x,y:s.y};s.x+t/2+this.anchorPoint.x>i-this.fudge?l.x=Math.max(i-t/2-this.anchorPoint.x-this.fudge,i/2-this.anchorPoint.x):s.x-t/2+this.anchorPoint.x<this.fudge&&(l.x=Math.min(t/2+this.anchorPoint.x+this.fudge,i/2-this.anchorPoint.x)),s.y+this.anchorPoint.y-n<this.fudge&&(l.y=n-this.anchorPoint.y+this.fudge),l.y>=o&&(l.y=o-this.fudge);const p={x:s.x-l.x,y:s.y-l.y};p.x<=-1||p.x>=1||p.y<=-1||p.y>=1?"leaflet"==mappl10n.options.engine?this.map.panBy([p.x,p.y]):(mapp.event.addListenerOnce(this.map,"idle",(e=>{mapp.event.trigger(this.map,"panend")})),this.map.panBy(p.x,p.y)):mapp.event.trigger(this.map,"panend")},setContent:function(t){e(".mapp-ib",this.node).empty().append(t)}}},628:()=>{var e;window.mapp=window.mapp||{},e=jQuery,mapp.lib={template:function(t,n){if(mapp.lib.templates=mapp.lib.templates?mapp.lib.templates:{},!mapp.lib.templates[t]){var i=mappl10n.options.templates?mappl10n.options.template[t]:e("#mapp-tmpl-"+t).html();if(!i)return"";mapp.lib.templates[t]=_.template(i,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return mapp.lib.templates[t](n)}},jQuery,mapp.event={addListener:function(e,t,n){t=t.split(" ");for(var i=0;i<t.length;i++)"leaflet"==mappl10n.options.engine?e.on(t[i],n):google.maps.event.addListener(e,t[i],n)},addListenerOnce:function(e,t,n){t=t.split(" ");for(var i=0;i<t.length;i++)"leaflet"==mappl10n.options.engine?e.once(t[i],n):google.maps.event.addListenerOnce(e,t[i],n)},clearInstanceListeners:function(e){"leaflet"==mappl10n.options.engine?e.off():google.maps.event.clearInstanceListeners(e)},clearListeners:function(e,t){t=t.split(" ");for(var n=0;n<t.length;n++)"leaflet"==mappl10n.options.engine?e.off(t[n]):google.maps.event.clearListeners(e,t[n])},trigger:function(e,t,n){"leaflet"==mappl10n.options.engine?e.fire(t,n):google.maps.event.trigger(e,t,n)}}},436:()=>{var e;window.mapp=window.mapp||{},e=jQuery,mapp.Marker=function(e){this.anchorPoint=null,this.div=null,this.draggable=null,this.icon=null,this.map=null,this.position=null,this.visible=null,this.zIndex=0,this.setValues(e),this.overlayView=new google.maps.OverlayView,this.overlayView.draw=()=>this.draw(),this.overlayView.onAdd=()=>this.onAdd(),this.overlayView.onRemove=()=>this.onRemove()},mapp.Marker.prototype={draw:function(){if(!this.div||!this.icon)return;let t=this.overlayView.getProjection();if(t){let n=t.fromLatLngToDivPixel(this.position),i=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};e(this.div).css({left:n.x-i.width/2,top:n.y-i.height})}},getDiv:function(){return this.div},getDraggable:function(){return this.draggable},getMap:function(){return this.map},getPosition:function(){return this.position},getVisible:function(){return this.visible},handleEvent:function(e){let t="on"+e.type[0].toUpperCase()+e.type.slice(1);this[t]&&this[t](e)},onAdd:function(){let t=this.overlayView.getPanes();t&&(this.div=e('<div class="mapp-marker">'),this.div.appendTo(t.overlayMouseTarget),this.icon&&this.setIcon(),google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.div.get(0)),this.div.get(0).addEventListener("click",(()=>{(!this.dragging||this.dragging&&!this.dragging.moved)&&mapp.event.trigger(this,"click"),this.dragging=null})),this.div.get(0).addEventListener("mouseenter",this),this.div.get(0).addEventListener("mouseleave",this),this.setDraggable(this.draggable))},onMouseenter:function(e){mapp.event.trigger(this,"mouseover")},onMouseleave:function(e){mapp.event.trigger(this,"mouseout")},onPointerdown:function(e){const t=this.map.getDiv().getBoundingClientRect(),n=this.overlayView.getProjection().fromLatLngToContainerPixel(this.position);this.dragging={moved:!1,startPixel:{x:e.clientX,y:e.clientY},offset:{x:n.x-(e.clientX-t.left),y:n.y-(e.clientY-t.top)}},this.toggleDragEvents(!0)}
1,onPointermove:function(e){if(Math.abs(e.clientX-this.dragging.startPixel.x)+Math.abs(e.clientY-this.dragging.startPixel.y)<3)return;const t=this.map.getDiv().getBoundingClientRect();let n={x:e.clientX-t.left+this.dragging.offset.x,y:e.clientY-t.top+this.dragging.offset.y};this.setPosition(this.overlayView.getProjection().fromContainerPixelToLatLng(n)),this.draw(),this.dragging.moved=!0,mapp.event.trigger(this,"dragstart")},onPointercancel:function(e){this.onPointerup(e)},onPointerup:function(e){this.dragging&&this.dragging.moved&&mapp.event.trigger(this,"dragend"),this.toggleDragEvents(!1)},onRemove:function(){this.div&&(this.toggleDragEvents(!1),this.div.remove(),this.div=null)},set:function(e,t){let n="set"+e[0].toUpperCase()+e.slice(1);this[n]&&this[n](t)},setDraggable:function(e){this.draggable=e,this.map&&(this.div.get(0).removeEventListener("pointerdown",this,{passive:!0}),e&&this.div.get(0).addEventListener("pointerdown",this,{passive:!0}))},setIcon:function(e){if(void 0!==e&&(this.icon=e),this.icon&&this.div){let e='<img draggable="false" src="'+this.icon.url+'">';this.div.html(e);let t=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};this.div.css({width:t.width,height:t.height}),this.setZIndex(),this.draw()}},setMap:function(e){this.map=e,this.overlayView.setMap(e)},setPosition:function(e){this.position=e},setValues:function(e){for(const t in e)this.set(t,e[t])},setVisible:function(e){this.visible=e,this.div&&this.div.css("visibility",e?"visible":"hidden")},setZIndex:function(e){this.zIndex=void 0!==e?e:this.zIndex,this.div&&this.div.css("z-index",e)},toggleDragEvents(e){document.removeEventListener("pointermove",this,{passive:!0}),document.removeEventListener("pointerup",this,{passive:!0}),document.removeEventListener("pointercancel",this,{passive:!0}),e&&(document.addEventListener("pointermove",this,{passive:!0}),document.addEventListener("pointerup",this,{passive:!0}),document.addEventListener("pointercancel",this,{passive:!0}))}}},548:(e,t,n)=>{"use strict";n.r(t);var i=n(939);window.mapp=window.mapp||{};var o;o=jQuery,mapp.Poi=function(e){if(this.defaults={address:null,body:null,html:null,iconid:null,id:null,images:null,kml:null,map:null,overlay:null,oid:null,otype:null,poly:null,props:null,title:"",url:null,type:null,viewport:null},o.extend(this,this.defaults,e),this.id=i.mappLib.nanoid(),e&&e.correctedAddress&&(this.address=e.correctedAddress),"leaflet"==mappl10n.options.engine&&this.isPoly()&&(this.type=null),!e.overlay)switch(this.type){case"polygon":this.overlay=new google.maps.Polygon({paths:e.poly.paths}),this.setColors(e.poly);break;case"polyline":this.overlay=new google.maps.Polyline({path:e.poly.path}),this.setColors(e.poly);break;case"circle":var t=new google.maps.LatLng(e.point.lat,e.point.lng);this.overlay=new google.maps.Circle({center:t,radius:parseFloat(e.poly.radius)}),this.setColors(e.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:mapp.poi.viewportToBounds(this.viewport)}),this.setColors(e.poly);break;case"kml":var n=e.kml&&e.kml.url?e.kml.url:"";this.overlay="leaflet"==mappl10n.options.engine?omnivore.kml(n):new google.maps.KmlLayer({url:n,preserveViewport:!0,suppressInfoWindows:!0});break;default:"leaflet"==mappl10n.options.engine?this.overlay=L.marker([e.point.lat,e.point.lng]):this.overlay=new mapp.Marker({position:new google.maps.LatLng(e.point.lat,e.point.lng)}),this.set({iconid:e.iconid})}},mapp.Poi.prototype={addEvents:function(){mapp.event.clearInstanceListeners(this.overlay),mapp.event.addListener(this.overlay,"click",(e=>{this.onClick(e)})),mapp.event.addListener(this.overlay,"mouseover",(e=>{this.map.poiHover(this)})),mapp.event.addListener(this.overlay,"mouseout",(e=>{this.map.poiHover(null)})),"kml"==this.type&&this.addKmlEvents(),this.map.isEditable&&(this.addPolyEditEvents(!0),this.map.isEditable&&mapp.event.addListener(this.overlay,"dragstart",(()=>{this.viewport=null,this.addPolyEditEvents(!1)})),mapp.event.addListener(this.overlay,"dragend",(()=>{this.updateFromOverlay(),this.addPolyEditEvents(!0)})))},addKmlEvents:function(){"leaflet"==mappl10n.options.engine?(mapp.event.addListenerOnce(this.overlay,"ready",(()=>{this.updateFromOverlay()})),mapp.event.addListenerOnce(this.overlay,"error",(()=>{alert(mappl10n.kml_error+" : "+this.kml.url)}))):(mapp.event.addListener(this.overlay,"defaultviewport_changed",(()=>{this.updateFromOverlay()})),mapp.event.addListener(this.overlay,"status_changed",(()=>
1{"OK"!=this.overlay.getStatus()&&alert(mappl10n.kml_error+" : "+this.kml.url)})))},addPolyEditEvents(e){this.isPoly()&&"google"==mappl10n.options.engine&&("rectangle"==this.type&&(mapp.event.clearListeners(this.overlay,"bounds_changed"),e&&mapp.event.addListener(this.overlay,"bounds_changed",(()=>{this.updateFromOverlay()}))),"circle"==this.type&&(mapp.event.clearListeners(this.overlay,"center_changed radius_changed"),e&&mapp.event.addListener(this.overlay,"center_changed radius_changed",(()=>{this.updateFromOverlay()}))),"polygon"!=this.type&&"polyline"!=this.type||(mapp.event.clearListeners(this.overlay,"rightclick"),mapp.event.clearListeners(this.overlay.getPath(),"insert_at remove_at set_at"),e&&(mapp.event.addListener(this.overlay,"rightclick",(e=>{null!=e.vertex&&this.overlay.getPath().getLength()>2&&(this.overlay.getPath().removeAt(e.vertex),this.updateFromOverlay())})),mapp.event.addListener(this.overlay.getPath(),"insert_at remove_at set_at",(()=>{this.updateFromOverlay()})))))},center:function(e){var t=this.getBounds();if("number"!=typeof e)if(t){var n=t.getNorthEast().toJSON().lng-t.getSouthWest
1().toJSON().lng;n<0&&(n+=360),e=Math.round(Math.log(360*this.map.div.canvas.width()/n/256)/Math.LN2),this.map.setView(this.getPosition(),e,{animate:!1})}else this.map.setView(this.getPosition(),parseInt(mappl10n.options.poiZoom));else this.map.setView(this.getPosition(),e)},getAddress:function(){return this.address?this.address:this.getPosition().toUrlValue()},getAnchorPoint:function(e){switch(this.isPoly()?"poly":this.type){case"kml":return e&&e.pixelOffset?{x:e.pixelOffset.width,y:e.pixelOffset.height}:{x:0,y:0};case"poly":return{x:0,y:0};default:return mappl10n.options.iconScale&&mappl10n.options.iconScale[0]&&mappl10n.options.iconScale[1]?{x:0,y:0-mappl10n.options.iconScale[1]}:{x:0,y:-32}}},getBounds:function(){var e;switch(this.type){case"polyline":e=new google.maps.LatLngBounds,this.overlay.getPath().forEach((function(t){e.extend(t)}));break;case"polygon":e=new google.maps.LatLngBounds,this.overlay.getPaths().forEach((function(t){t.forEach((function(t){e.extend(t)}))}));break;case"rectangle":case"circle":e=this.overlay.getBounds();break;case"kml":e=(e="leaflet"==mappl10n.options.engine?this.overlay.getBounds().isValid()?this.overlay.getBounds():null:this.overlay.getDefaultViewport())||mapp.poi.viewportToBounds(this.viewport);break;default:return mapp.poi.viewportToBounds(this.viewport)}return e},getColors:function(){var e={};for(var t in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})void 0!==this.overlay[t]&&(e[t]=this.overlay[t]);return e},getPosition:function(e){if(!this.type)return"leaflet"==mappl10n.options.engine?L.latLng(this.point):new google.maps.LatLng(this.point.lat,this.point.lng);if("kml"==this.type&&e&&e.latLng)return e.latLng;const t=this.getBounds();return"leaflet"==mappl10n.options.engine?t&&t.isValid()?t.getCenter():new L.latLng(0,0):t?t.getCenter():new google.maps.LatLng(0,0)},highlight:function(e){if(!this.type){var t="leaflet"==mappl10n.options.engine?o(this.overlay._icon):this.overlay.getDiv();if(t){switch(this.map&&this.map.isEditable?"circle":mappl10n.options.highlight){case"circle":t.toggleClass("mapp-marker-circle",e);break;case"icon":var n=e?i.mappLib.getIcon(mappl10n.options.highlightIcon):i.mappLib.getIcon(this.iconid);if("leaflet"==mappl10n.options.engine&&this.overlay.getIcon().options.iconUrl==n.options.iconUrl)return;this.overlay.setIcon(n);break;case"scale":t.addClass("mapp-marker"),t.toggleClass("mapp-marker-scale",e)}this.setZIndex(e?1e4:0)}}},isPoly:function(){return-1!=jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])},onClick:function(e){this.map.poiClick(this,e)},set:function(e){for(var t in e){var n=e[t];"iconid"===t?this.type||(this.iconid=n,this.overlay.setIcon(i.mappLib.getIcon(n))):this[t]=n}},setColors:function(e){var t={};for(var n in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})e&&void 0!==e[n]&&(t[n]=e[n]);this.overlay.setOptions(t)},setEditable:function(e){"kml"!=this.type&&("leaflet"==mappl10n.options.engine?this.overlay.options.draggable=e:this.overlay.setDraggable(e),this.isPoly()&&this.overlay.setEditable(e))},setMap:function(e){this.map=e,null!=e?(this.setEditable(this.map.isEditable),this.addEvents(),!this.type&&this.map.clusterer||("leaflet"==mappl10n.options.engine?this.overlay.addTo(e.getMap()):this.overlay.setMap(e.getMap()))):"leaflet"==mappl10n.options.engine?this.overlay.remove():this.overlay.setMap(null)},setVisible:function(e){void 0!==this.overlay.setVisible&&this.overlay.setVisible(e)},setZIndex:function(e){"leaflet"==mappl10n.options.engine?this.type||this.overlay.setZIndexOffset(e):this.overlay.set("zIndex",e)},toJSON:function(){var e={address:this.address,body:this.body,iconid:this.iconid,images:this.images,point:this.point,title:this.title,type:this.type,viewport:this.viewport};return"kml"==this.type?e.kml=this.kml:this.isPoly()&&(e.poly=this.poly),e},updateFromOverlay(){_.extend(this,mapp.poi.parseOverlay(this.type,this.overlay))}},mapp.poi={boundsToViewport:function(e){return e?{sw:e.getSouthWest
1().toJSON(),ne:e.getNorthEast().toJSON()}:null},boundsCenterPoint:function(e){return e&&e.isValid()?e.getCenter().toJSON():{lat:0,lng:0}},pointToLatLng:function(e){return e?"leaflet"==mappl10n.options.engine?L.latLng(this.point):new google.maps.LatLng(e.lat,e.lng):null},viewportToBounds:function(e){return e&&e.sw&&e.ne?"leaflet"==mappl10n.options.engine?new L.LatLngBounds(L.latLng(e.sw.lat,e.sw.lng),L.latLng(e.ne.lat,e.ne.lng)):new google.maps.LatLngBounds(new google.maps.LatLng(e.sw.lat,e.sw.lng),new google.maps.LatLng(e.ne.lat,e.ne.lng)):null},parseOverlay:function(e,t){if("google"==mappl10n.options.engine){if("kml"==e){const e=t.getDefaultViewport();return{point:e?e.getCenter().toJSON():null,viewport:e?mapp.poi.boundsToViewport(e):null}}const n=t instanceof google.maps.Polyline?{strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,stokeWeight:t.strokeWeight}:{fillColor:t.fillColor,fillOpacity:t.fillOpacity,strokeColor:t.strokeColor,strokeOpacity:1,stokeWeight:t.strokeWeight};if("circle"==e)return{point:t.getCenter().toJSON(),poly:{radius:t.getRadius(),...n}};if("rectangle"==e)return{viewport:mapp.poi.boundsToViewport(t.getBounds()),poly:{...n}};if("polyline"==e){const e=[];return t.getPath().forEach((function(t){e.push(t.toJSON())})),{poly:{path:e,...n}}}if("polygon"==e){const e={fillColor:t.fillColor,fillOpacity:t.fillOpacity,strokeColor:t.strokeColor,strokeOpacity:1,stokeWeight:t.strokeWeight},n=[];return t.getPaths().forEach((function(e){var t=[];e.forEach((function(e){t.push(e.toJSON())})),n.push(t)})),{poly:{paths:n,...e}}}if(!e)return{point:t.getPosition().toJSON()}}else{if("kml"==e){const e=t.getBounds();return{point:e&&e.isValid()?e.getCenter().toJSON():null,viewport:e&&e.isValid()?mapp.poi.boundsToViewport(e):null}}if(!e)return{point:"leaflet"==mappl10n.options.engine?t.getLatLng().toJSON():t.getPosition().toJSON()}}}}}},n={};function i(e){var o=n[e];if(void 0!==o)return o.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,i),s.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(117),i(715),i(817),i(10),i(326),i(939),i(346),i(759),i(602),i(27),i(818),i(81),i(50),i(615),i(892),i(628),i(854),i(689),i(436),i(548),i(374)})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.