https://tomedo.de/wp-content/plugins/wp-google-maps-gold/js/v8/wp-google-maps-gold.min.js?ver=5.2.10
1jQuery(function($){WPGMZA.CachingSettingsPanel=function(){var self=this;this.updateCachingContols(),$('input[name="enable_caching"]').on("change",function(event){self.updateCachingContols()})},WPGMZA.CachingSettingsPanel.prototype.updateCachingContols=function(){$("input[name='enable_caching']").prop("checked")?$(".caching-conditional-row").show():$(".caching-conditional-row").hide()},$(document).ready(function(){"map-settings"==WPGMZA.currentPage&&(WPGMZA.cachingSettingsPanel=new WPGMZA.CachingSettingsPanel)})}),jQuery(function($){WPGMZA.LiveTracker=function(){var self=this;let refreshInterval=6e4;void 0!==WPGMZA.settings&&void 0!==WPGMZA.settings.liveTrackingRefreshInterval&&0<parseInt(WPGMZA.settings.liveTrackingRefreshInterval)&&(refreshInterval=parseInt(WPGMZA.settings.liveTrackingRefreshInterval)),this.update(),this.intervalID=setInterval(function(){self.update()},refreshInterval)},WPGMZA.LiveTracker.prototype.update=function(){var mapIDs=[];WPGMZA.maps.forEach(function(map){mapIDs.push(map.id)}),0!=mapIDs.length&&WPGMZA.restAPI.call("/live-tracker/devices/",{data:{map_ids:mapIDs.join(",")},success:function(data,status,xhr){for(var i=0;i<data.length;i++){var map,marker,device=data[i];device.marker&&(map=WPGMZA.getMapByID(device.marker.map_id))&&((marker=map.getMarkerByID(device.marker.id))||(marker=WPGMZA.Marker.createInstance(device.marker),map.addMarker(marker)),marker.setPosition(new WPGMZA.LatLng({lat:device.marker.lat,lng:device.marker.lng})))}}})},$(document).ready(function(){WPGMZA.settings.enable_live_tracking&&(WPGMZA.liveTracker=new WPGMZA.LiveTracker)})}),jQuery(function($){WPGMZA.LiveTrackingSettingsPanel=function(){var self=this;this.templateTableItem=$("#wpgmza-live-tracking-devices>tbody>tr"),this.templateTableItem.remove(),this.refresh(),$("#wpgmza-refresh-live-tracking-devices").on("click",function(){self.refresh()}),$("#wpgmza-live-tracking-devices").on("change","input, select, textarea",function(event){self.onDeviceChanged(event)}),$("#wpgmza-live-tracking-devices").on("click",".wpgmza-tracking-remove",function(event){self.onRemoveDevice(event)})},WPGMZA.LiveTrackingSettingsPanel.prototype.clear=function(){$("#wpgmza-live-tracking-devices>tbody").html("")},WPGMZA.LiveTrackingSettingsPanel.prototype.refresh=function(){var self=this;$("#wpgmza-live-tracking-devices").css("opacity",.5),WPGMZA.restAPI.call("/live-tracker/devices/",{success:function(data,status,xhr){self.populate(data)}})},WPGMZA.LiveTrackingSettingsPanel.prototype.populate=function(devices){var self=this,tbody=$("#wpgmza-live-tracking-devices>tbody");this.clear(),devices.forEach(function(data){var name,item=self.templateTableItem.clone();for(name in data){var el=$(item).find("[data-name='"+name+"'], [data-ajax-name='"+name+"']");el.length&&("input"!=el.prop("tagName").toLowerCase()?el.text(data[name]):"checkbox"===el.attr("type")?$(el).prop("checked",1==data[name]):$(el).val(data[name]))}tbody.append(item)}),$("#wpgmza-live-tracking-devices").css("opacity",1)},WPGMZA.LiveTrackingSettingsPanel.prototype.onDeviceChanged=function(event){var event=$(event.target).closest("tr"),fields=$(event).find("input[data-name], input[data-ajax-name]"),data={},event=$(event).find("input[data-ajax-name='id']").val();$("#wpgmza-live-tracking-devices").css("opacity",.5),fields.each(function(index,el){var name=$(el).attr("data-name");name&&name.length||(name=$(el).attr("data-ajax-name")),"checkbox"===$(el).attr("type")?data[name]=$(el).prop("checked")?1:0:data[name]=$(el).val()}),WPGMZA.restAPI.call("/live-tracker/devices/"+event,{method:"POST",data:data,success:function(data,status,xhr){$("#wpgmza-live-tracking-devices").css("opacity",1)}})},WPGMZA.LiveTrackingSettingsPanel.prototype.onRemoveDevice=function(event){event=$(event.target).closest("tr"),event=$(event).find("[data-name='deviceID']").text();confirm(WPGMZA.localized_strings.tracking_device_delete_prompt)&&($("#wpgmza-live-tracking-devices").css("opacity",.5),WPGMZA.restAPI.call("/live-tracker/devices/unlink/"+event,{method:"POST",success:(data,status,xhr)=>{$("#wpgmza-live-tracking-devices").css("opacity",1),this.refresh()}}))},$(document).ready(function(){"map-settings"==WPGMZA.currentPage&&(WPGMZA.liveTrackingSettingsPanel=new WPGMZA.LiveTrackingSettingsPanel)})}),jQuery(function($){WPGMZA.MarkerClusterIcon=function(cluster,styles,padding){WPGMZA.EventDispatcher.call(this),this.styles=styles,this.padding=padding||0,this.cluster=cluster,this.center=null,this.map=cluster.getMap(),this.sums=null,this.visible=!1},WPGMZA.MarkerClusterIcon.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.MarkerClusterIcon.prototype.constructor=WPGMZA.MarkerClusterIcon,WPGMZA.MarkerClusterIcon.createInstance=function(cluster,styles,padding){switch(WPGMZA.settings.engine){case"open-layers":case"open-layers-latest":return new WPGMZA.OLMarkerClusterIcon(cluster,styles,padding);case"leaflet":case"leaflet-stadia":case"leaflet-maptiler":case"leaflet-zerocost":case"leaflet-azure":case"leaflet-locationiq":return new WPGMZA.LeafletMarkerClusterIcon(cluster,styles,padding);default:return new WPGMZA.GoogleMarkerClusterIcon(cluster,styles,padding)}},WPGMZA.MarkerClusterIcon.prototype.getPosFromLatLng=function(latLng){return this.map.latLngToPixels(latLng)},WPGMZA.MarkerClusterIcon.prototype.hide=function(){},WPGMZA.MarkerClusterIcon.prototype.show=function(){this.overlay.element&&($(this.overlay.element).css(this.getCSS()),$(this.overlay.element).text(this.sums.text))},WPGMZA.MarkerClusterIcon.prototype.onRemove=function(){},WPGMZA.MarkerClusterIcon.prototype.setSums=function(sums){this.sums=sums,this.text=sums.text,this.index=sums.index,this.useStyle()},WPGMZA.MarkerClusterIcon.prototype.useStyle=function(){var index=Math.max(0,this.sums.index-1),index=Math.min(this.styles.length-1,index),index=this.styles[index];this.url=index.url,this.height=index.height,this.width=index.width,this.textColor=index.textColor,this.anchor=index.anchor,this.textSize=index.textSize,this.backgroundPosition=index.backgroundPosition},WPGMZA.MarkerClusterIcon.prototype.getCSS=function(){var styles={"background-image":"url('"+this.url+"')","background-position":this.backgroundPosition,width:this.width+"px",height:this.height+"px",cursor:"pointer","line-height":this.height+"px","text-align":"center","font-family":"sans-serif","font-size":this.textSize||11,color:this.textColor||"black","font-weight":"bold"};return"google-maps"===WPGMZA.settings.engine?styles.transform="translate(-50%,-50%)":(styles["margin-left"]=-this.width/2+"px",styles["margin-top"]=-this.height/2+"px"),styles},WPGMZA.MarkerClusterIcon.prototype.setCenter=function(center){this.center=center},WPGMZA.MarkerClusterIcon.prototype.onClick=function(event){this.cluster&&this.cluster.markerClusterer&&2<=this.cluster.markerClusterer.pointerCounter||(this.cluster.markerClusterer.isZoomOnClick()&&this.cluster.fitMapToMarkers(),this.trigger("click"),this.map.trigger("clusterclick"))}}
1),jQuery(function($){WPGMZA.Cluster=function(markerClusterer){if(!(markerClusterer instanceof WPGMZA.MarkerClusterer))throw new Error("Argument must be an instance of WPGMZA.MarkerClusterer");this.markerClusterer=markerClusterer,this.map=markerClusterer.getMap(),this.gridSize=markerClusterer.getGridSize(),this.minClusterSize=markerClusterer.getMinClusterSize(),this.averageCenter=markerClusterer.isAverageCenter(),this.center=null,this.markers=[],this.bounds=null,this.clusterIcon=WPGMZA.MarkerClusterIcon.createInstance(this,markerClusterer.getStyles(),markerClusterer.getGridSize())},WPGMZA.Cluster.prototype.isMarkerAlreadyAdded=function(marker){if(this.markers.indexOf)return-1!=this.markers.indexOf(marker);for(var m,i=0;m=this.markers[i];i++)if(m==marker)return!0;return!1},WPGMZA.Cluster.prototype.addMarker=function(marker){if(this.isMarkerAlreadyAdded(marker))return!1;this.center?this.averageCenter&&(l=this.markers.length+1,p=marker.getPosition(),this.bounds.west>this.bounds.east&&(0<=this.center.lng?p.lng-=360:p.lng+=360),lat=(this.center.lat*(l-1)+p.lat)/l,p=(this.center.lng*(l-1)+p.lng)/l,this.center=new WPGMZA.LatLng(lat,p),this.calculateBounds()):(this.center=marker.getPosition(),this.calculateBounds()),marker.isClustered=!0,this.markers.push(marker);var l,lat,p,len=this.markers.length;if(len<this.minClusterSize&&this.setMarkerVisbility(marker,!0),len==this.minClusterSize)for(var i=0;i<len;i++)this.setMarkerVisbility(this.markers[i],!1);return len>=this.minClusterSize&&this.setMarkerVisbility(marker,!1),this.updateIcon(),!0},WPGMZA.Cluster.prototype.getMarkerClusterer=function(){return this.markerCluster},WPGMZA.Cluster.prototype.getBounds=function(){for(var marker,bounds=new WPGMZA.LatLngBounds(this.center,this.center),markers=this.getMarkers(),i=0;marker=markers[i];i++)bounds.extend(marker.getPosition());return bounds},WPGMZA.Cluster.prototype.remove=function(){this.clusterIcon.remove(),this.markers&&(this.markers.length=0),delete this.markers},WPGMZA.Cluster.prototype.getSize=function(){return this.markers.length},WPGMZA.Cluster.prototype.getMarkers=function(){return this.markers},WPGMZA.Cluster.prototype.getCenter=function(){return this.center},WPGMZA.Cluster.prototype.calculateBounds=function(){var bounds=new WPGMZA.LatLngBounds(this.center,this.center);this.bounds=this.markerClusterer.getExtendedBounds(bounds)},WPGMZA.Cluster.prototype.isMarkerInClusterBounds=function(marker){return this.bounds.contains(marker.getPosition())},WPGMZA.Cluster.prototype.setMarkerVisbility=function(marker,visible){marker.setVisible(visible&&(!marker.separatorGroup||marker.separatorGroup.state!=WPGMZA.MarkerSeparatorGroup.STATE_CLOSED)),marker.separatorGroup&&marker.separatorGroup.placeholder.setVisible(visible)},WPGMZA.Cluster.prototype.getMap=function(){return this.map},WPGMZA.Cluster.prototype.updateIcon=function(){var zoom=this.map.getZoom(),mz=this.markerClusterer.getMaxZoom();if(mz&&mz<zoom)for(var marker,i=0;marker=this.markers[i];i++)this.setMarkerVisbility(marker,!0);else this.markers.length<this.minClusterSize?this.clusterIcon.hide():(mz=this.markerClusterer.getStyles().length,zoom=this.markerClusterer.getCalculator()(this.markers,mz),this.clusterIcon.setCenter(this.center),this.clusterIcon.setSums(zoom),this.clusterIcon.show())},WPGMZA.Cluster.prototype.fitMapToMarkers=function(){for(var marker,temp,markers=this.markers,bounds=new WPGMZA.LatLngBounds,i=0;marker=markers[i];i++)bounds.extend(marker.getPosition()),this.setMarkerVisbility(marker,!0);bounds.west>bounds.east&&(temp=bounds.west,bounds.west=bounds.east+360,bounds.east=temp),this.map.fitBounds(bounds)}}),jQuery(function($){WPGMZA.MarkerClusterer=function(map,markers,options){WPGMZA.MarkerClusterer.log("Clusterer created",this);var self=this;this.ready=!1,this.map=map,this._markers=[],this.clusters=[],this.sizes=[53,56,66,78,90],this.options=options||{},this.gridSize=options.gridSize||60,this.minClusterSize=options.minClusterSize||2,this.maxZoom=options.maxZoom||null,this.styles=options.styles||null,this.imagePath=options.imagePath||WPGMZA.goldPluginDirURL+"images/m",this.imageExtension=options.imageExtension||"png",this.zoomOnClick=!0,this.averageCenter=!0,this.pointerCounter=0,null!=options.zoomOnClick&&(this.zoomOnClick=options.zoomOnClick),this.setupStyles(),this.setMap(ma
1p),this.prevZoom=map.getZoom(),this.map.on("zoomchanged",function(){var zoom=map.getZoom();self.prevZoom!=zoom&&(self.prevZoom=zoom,self.resetViewport())}),this.map.on("filteringcomplete",function(){self.shouldRegenNVC=!0,self.resetViewport(),self.redraw()}),this.map.on("idle",function(){self.ready=!0,self.resetViewport(),self.redraw()}),window.addEventListener("pointerdown",()=>{this.pointerCounter++},!0),window.addEventListener("pointerup",()=>{this.pointerCounter--},!0),window.addEventListener("pointercancel",()=>{this.pointerCounter--},!0),markers&&markers.length&&this.addMarkers(markers,!1)},WPGMZA.MarkerClusterer.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.MarkerClusterer.prototype.constructor=WPGMZA.MarkerClusterer,WPGMZA.MarkerClusterer.enableDebugLog=!1,WPGMZA.MarkerClusterer.log=WPGMZA.MarkerClusterer.enableDebugLog?console.log:function(){},Object.defineProperty(WPGMZA.MarkerClusterer.prototype,"markers",{get:function(){return this._markers},set:function(value){WPGMZA.MarkerClusterer.log("Setting markers to",value),this._markers=value}}),WPGMZA.MarkerClusterer.prototype.setupStyles=function(){if(WPGMZA.MarkerClusterer.log("setupStyles called",this),!this.styles||!this.styles.length){this.styles=[];for(var size,i=0;size=this.sizes[i];i++)this.styles.push({url:this.imagePath+(i+1)+"."+this.imageExtension,height:size,width:size})}},WPGMZA.MarkerClusterer.prototype.setStyles=function(styles){WPGMZA.MarkerClusterer.log("setStyles called",this),this.styles=styles},WPGMZA.MarkerClusterer.prototype.getStyles=function(){return this.styles},WPGMZA.MarkerClusterer.prototype.isZoomOnClick=function(){return this.zoomOnClick},WPGMZA.MarkerClusterer.prototype.isAverageCenter=function(){return this.averageCenter},WPGMZA.MarkerClusterer.prototype.calculator=function(markers,numStyles){for(var index=0,markers=markers.length,dv=markers;0!==dv;)dv=parseInt(dv/10,10),index++;return{text:markers,index:index=Math.min(index,numStyles)}},WPGMZA.MarkerClusterer.prototype.getCalculator=function(){return this.calculator},WPGMZA.MarkerClusterer.prototype.setCalculator=function(calculator){this.calculator=calculator},WPGMZA.MarkerClusterer.prototype.addMarker=function(marker,nodraw){if(!(marker instanceof WPGMZA.Marker))throw new Error("First argument must be an instance of WPGMZA.Marker");this.pushMarkerTo(marker),nodraw||this.redraw()},WPGMZA.MarkerClusterer.prototype.addMarkers=function(markers,nodraw){WPGMZA.MarkerClusterer.log("addMarkers called",this);for(var marker,i=0;marker=markers[i];i++){if(!(marker instanceof WPGMZA.Marker))throw new Error("Value is not an instance of WPGMZA.Marker");this.pushMarkerTo(marker)}nodraw||this.redraw()},WPGMZA.MarkerClusterer.prototype.pushMarkerTo=function(marker){marker.isClustered=!1,this.markers.push(marker)},WPGMZA.MarkerClusterer.prototype.getMarkers=function(){return this.markers},WPGMZA.MarkerClusterer.prototype.getTotalMarkers=function(){return this.markers.length},WPGMZA.MarkerClusterer.prototype.removeMarker_=function(marker){var index=-1;if(this.markers.indexOf)index=this.markers.indexOf(marker);else for(var m,i=0;m=this.markers[i];i++)if(m==marker){index=i;break}return-1!=index&&(marker.setVisible(!1),this.markers.splice(index,1),!0)},WPGMZA.MarkerClusterer.prototype.removeMarker=function(marker,nodraw){marker=this.removeMarker_(marker);return!(!nodraw||!marker||(this.resetViewport(),this.redraw(),0))},WPGMZA.MarkerClusterer.prototype.removeMarkers=function(markers,nodraw){WPGMZA.MarkerClusterer.log("removeMarkers called",this);for(var removed=!1,i=0;marker=markers[i];i++)var marker=this.removeMarker_(marker),removed=removed||marker;if(nodraw&&removed)return this.resetViewport(),this.redraw(),!0},WPGMZA.MarkerClusterer.prototype.setReady=function(ready){this.ready||(this.ready=ready,this.createClusters())},WPGMZA.MarkerClusterer.prototype.getTotalClusters=function(){return this.clusters.length},WPGMZA.MarkerClusterer.prototype.getMap=function(){return this.map},WPGMZA.MarkerClusterer.prototype.setMap=function(map){WPGMZA.MarkerClusterer.log("setMap called",this),this.map=map},WPGMZA.MarkerClusterer.prototype.getGridSize=function(){return this.gridSize},WPGMZA.MarkerClusterer.prototype.setGridSize=function(size){WPGMZA.MarkerClusterer.log("setGridSize called",this),this.gridSize=size},WPGMZA.MarkerClusterer.prototype.getMinClusterSize=function(){return this.minClusterSize},WPGMZA.MarkerClusterer.prototype.setMinClusterSize=function(size){WPGMZA.MarkerClusterer.log("setMinClusterSize called",this),this.minClusterSize=size},WPGMZA.MarkerClusterer.prototype.getMaxZoom=function(){return this.maxZoom},WPGMZA.MarkerClusterer.prototype.setMaxZoom=function(maxZoom){WPGMZA.MarkerClusterer.log("setMaxZoom called",this),this.maxZoom=maxZoom},WPGMZA.MarkerClusterer.prototype.getExtendedBounds=function(bou
1nds){return WPGMZA.MarkerClusterer.log("Getting bounds extended by "+this.gridSize),bounds.extendByPixelMargin(this.map,this.gridSize),bounds},WPGMZA.MarkerClusterer.prototype.clearMarkers=function(){WPGMZA.MarkerClusterer.log("clearMarkers called",this),this.resetViewport(!0),window.WPGMZA&&WPGMZA.pro_version&&WPGMZA.Version.compare(WPGMZA.pro_version,"7.11.00")==WPGMZA.Version.GREATER_THAN||(this.markers=[])},WPGMZA.MarkerClusterer.prototype.resetViewport=function(hide){WPGMZA.MarkerClusterer.log("resetViewport called",this);for(var cluster,i=0;cluster=this.clusters[i];i++)cluster.remove();for(var marker,i=0;marker=this.markers[i];i++)marker.isClustered=!1,hide&&marker.setVisible(!1);this.clusters=[]},WPGMZA.MarkerClusterer.prototype.distanceBetweenPoints=function(p1,p2){return WPGMZA.Distance.between(p1,p2)},WPGMZA.MarkerClusterer.prototype.addToClosestCluster=function(marker){WPGMZA.MarkerClusterer.log("addToClosestCluster called",this),WPGMZA.MarkerClusterer.log("Adding marker to nearest cluster",marker);var distance=4e4,clusterToAddTo=null,pos=marker.getPosition();WPGMZA.MarkerClusterer.log("Marker is at "+pos.toString()),WPGMZA.MarkerClusterer.log("Checking "+this.cluster
1s.length+" clusters");for(var i=0;cluster=this.clusters[i];i++){var center=cluster.getCenter();WPGMZA.MarkerClusterer.log("Comparing against cluster ",center.toString()),center&&(center=this.distanceBetweenPoints(center,marker.getPosition()),WPGMZA.MarkerClusterer.log("Distance is "+center),center<distance)&&(distance=center,clusterToAddTo=cluster)}var cluster,pos=clusterToAddTo&&clusterToAddTo.isMarkerInClusterBounds(marker);WPGMZA.MarkerClusterer.log(clusterToAddTo?"Marker is "+(pos?" WITHIN ":" NOT WITHIN ")+"cluster bounds "+clusterToAddTo.bounds.toString():"No cluster to add to"),clusterToAddTo&&pos?clusterToAddTo.addMarker(marker):(WPGMZA.MarkerClusterer.log("Creating a new cluster for the marker"),(cluster=new WPGMZA.Cluster(this)).addMarker(marker),this.clusters.push(cluster))},WPGMZA.MarkerClusterer.prototype.createClusters=function(){if(WPGMZA.MarkerClusterer.log("createClusters called for "+this.markers.length+" markers",this),this.ready){var isAdmin=1===parseInt(WPGMZA.is_admin),lpActive=!!document.querySelector(".am-preview-frame:not(.am-preview-off)");if(!isAdmin||lpActive){WPGMZA.MarkerClusterer.log("Creating clusters for "+this.markers.length+" markers");var bounds=this.getExtendedBounds(this.map.getBounds());WPGMZA.MarkerClusterer.log(this.map.getBounds());for(var i=0;marker=this.markers[i];i++){WPGMZA.MarkerClusterer.log("Checking marker "+marker.id+" ("+marker.lat+", "+marker.lng+") is within bounds "+bounds.toString());var isWithinBounds=this.isMarkerInBounds(marker,bounds);WPGMZA.MarkerClusterer.log(isWithinBounds),marker.isClustered||!isWithinBounds||marker.isFiltered||(WPGMZA.MarkerClusterer.log(marker,marker.isFiltered),this.addToClosestCluster(marker))}}
1else{if(0<this.clusters.length){for(var cluster,ci=0;cluster=this.clusters[ci];ci++)cluster.remove();this.clusters=[]}for(var marker,mi=0;marker=this.markers[mi];mi++){marker.isClustered=!1;var inClosedSeparator=marker.separatorGroup&&marker.separatorGroup.state==WPGMZA.MarkerSeparatorGroup.STATE_CLOSED;marker.isFiltered||inClosedSeparator||(marker.setVisible(!0),marker.separatorGroup&&marker.separatorGroup.placeholder.setVisible(!0))}}}},WPGMZA.MarkerClusterer.prototype.isMarkerInBounds=function(marker,bounds){return bounds.contains(marker.getPosition())},WPGMZA.MarkerClusterer.prototype.repaint=function(){WPGMZA.MarkerClusterer.log("repaint called",this);var oldClusters=this.clusters.slice();this.clusters.length=0,this.resetViewport(),this.redraw(),setTimeout(function(){for(var cluster,i=0;cluster=oldClusters[i];i++)cluster.remove()},0)},WPGMZA.MarkerClusterer.prototype.redraw=function(){if(WPGMZA.MarkerClusterer.log("redraw called",this),void 0===this.shouldRegenNVC&&(this.shouldRegenNVC=!0),this.maxZoom&&this.map.getZoom()>=this.maxZoom){if(this.map.markers.forEach(function(marker){marker.isFiltered||marker.separatorGroup&&marker.separatorGroup.state==WPGMZA.MarkerSeparatorGroup.STATE_CLOSED||marker.setVisible(!0)}),WPGMZA.settings.wpgmza_near_vicinity_control_enabled&&this.shouldRegenNVC&&(this.shouldRegenNVC=!1,this.map)){if(this.map.markerSeparator){if(this.map.markerSeparator.groups&&0<this.map.markerSeparator.groups.length)for(var gI in this.map.markerSeparator.groups){gI=this.map.markerSeparator.groups[gI].placeholder;this.map.removeMarker(gI)}this.map.markerSeparator.destroy()}this.map.markerSeparator=new WPGMZA.MarkerSeparator(this.map.id)}}else this.shouldRegenNVC=!0,this.setReady(!0),this.createClusters()},WPGMZA.MarkerClusterer.prototype.draw=function(){}}),jQuery(function($){WPGMZA.MarkerSeparatorGroup=function(){var self=this;this.state=WPGMZA.MarkerSeparatorGroup.STATE_CLOSED,this.markers=[],this.placeholder=WPGMZA.Marker.createInstance(),this.placeholder.disableInfoWindow=!0,this.placeholder.on("click",function(event){self.state==WPGMZA.MarkerSeparatorGroup.STATE_CLOSED?self.open():self.close()})},WPGMZA.MarkerSeparatorGroup.STATE_CLOSED="closed",WPGMZA.MarkerSeparatorGroup.STATE_OPEN="open",WPGMZA.MarkerSeparatorGroup.algorithms={circle:function(count){for(var radius=count/Math.PI,angle=0,increment=2*Math.PI/count,result=[],i=0;i<count;i++)result.push({x:Math.cos(angle)*radius/2,y:Math.sin(angle)*radius/2}),angle+=increment;return result},spiral:function(count){for(var awayStep=count/10/(2*(count/10)*Math.PI),theta=1/awayStep,result=[],i=1;i<=count;i++){var away=awayStep*theta,around=theta;result.push({x:Math.cos(around)*away,y:Math.sin(around)*away}),theta+=1/away}return result},hexagon:function(count){for(var result=WPGMZA.MarkerSeparatorGroup.algorithms.grid(count),squareRootOf3=Math.sqrt(3),i=0;i<result.length;i++){var coord=result[i];coord.x=coord.x+coord.y/2,coord.y=squareRootOf3/2*coord.y}return result},line:function(count){for(var result=[],x=-(count-1)/2,i=0;i<count;i++)result.push({x:x,y:1}),x++;return result},grid:function(count){var result=[],x=0,y=0;function add(x,y){result.push({x:x,y:y})}for(var i=1;result.length<=count;i++){for(var j=0;j<i;++j)add(++x,y);for(j=0;j<i-1;++j)add(x,++y);for(j=0;j<i;++j)add(--x,++y);for(j=0;j<i;++j)add(--x,y);for(j=0;j<i;++j)add(x,--y);for(j=0;j<i;++j)add(++x,--y)}return result},random:function(count){}},WPGMZA.MarkerSeparatorGroup.prototype.addMarker=function(marker){if(!(marker instanceof WPGMZA.Marker||window.google&&google.maps&&marker instanceof google.maps.Marker))throw new Error("Argument must be an instance of WPGMZA.Marker or google.maps.Marker");if(marker.separatorGroup&&marker.separatorGroup!=this)throw new Error("Marker is already in a separator group");this.markers.push(marker),marker.setVisible(!1),marker.separatorGroup=this,marker.positionBeforeSeparation=WPGMZA.MarkerSeparator.getNativeLatLng(marker.getPosition()),this.updatePlaceholder()},WPGMZA.MarkerSeparatorGroup.prototype.getAverageMarkerPostion=function(){if(0==this.markers.length)return null;var averagePosition=new WPGMZA.LatLng(this.markers[0].positionBeforeSeparation);if(!(this.markers.length<2)){for(var i=1;i<this.markers.length;i++){var position=this.markers[i].positionBeforeSeparation;averagePosition.lat+=position.lat,averagePosition.lng+=position.lng}averagePosition.lat/=this.markers.length,averagePosition.lng/=this.markers.length;for(i=0;i<this.markers.length;i++)WPGMZA.isProVersionBelow7_10_00?this.markers[i].setPosition(this.markers[i].positionBeforeSeparation.toGoogleLatLng()):this.markers[i].setPosition(this.markers[i].positionBeforeSeparation)}return averagePosition},WPGMZA.MarkerSeparatorGroup.prototype.updatePlaceholder=function(){for(var position=this.getAverageMarkerPostion(),icon=this.markers[0].getIcon(),areAllMarkersClustered=(this.placeholder.setPosition(position),WPGMZA.settings.marker_separator_placeholder_icon&&WPGMZA.settings.marker_separator_placeholder_icon.length&&(icon=WPGMZA.settings.marker_separator_placeholder_icon),WPGMZA.isProVersionBelow7_10_00?this.placeholder.googleMarker.setIcon(icon):icon&&this.placeholder.setIcon(icon),!0),i=0;i<this.markers.length;i++)if(!this.markers[i].isClustered){areAllMarkersClustered=!1;break}this.placeholder.setVisible(!areAllMarkersClustered)},WPGMZA.MarkerSeparatorGroup.prototype.open=function(){if(this.state!=WPGMZA.MarkerSeparatorGroup.STATE_OPEN){WPGMZA.MarkerSeparatorGroup.lastGroupOpened&&WPGMZA.MarkerSeparatorGroup.lastGroupOpened!=this&&WPGMZA.MarkerSeparatorGroup.lastGroupOpened.state!=WPGMZA.MarkerSeparatorGroup.CLOSED&&WPGMZA.MarkerSeparatorGroup.lastGroupOpened.close();for(var algorithm=WPGMZA.MarkerSeparatorGroup.algorithms.circle,offsets=(algorithm=WPGMZA.settings.marker_separator_algorithm?WPGMZA.MarkerSeparatorGroup.algorithms[WPGMZA.settings.marker_separator_algorithm]:algorithm)(this.markers.length),multiplier=64,duration=1e3*WPGMZA.settings.marker_separator_animation_duration,animate=WPGMZA.settings.marker_separator_animate,stagger=WPGMZA.settings.marker_separator_stagger_animation?1e3*WPGMZA.settings.marker_separator_stagger_interval:0,i=0;i<this.markers.length;i++){var marker=this.markers[i];marker.setVisible(!0),animate?function(marker,offsetX,offsetY,delay){delay?setTimeout(function(){$(marker).animate({offsetX:offsetX*multiplier,offsetY:offsetY*multiplier},duration)},delay):$(marker).animate({offsetX:offsetX*multiplier,offsetY:offsetY*multiplier},duration)}(marker,offsets[i].x,offsets[i].y,stagger?stagger*i:0):marker.setOffset(offsets[i].x*multiplier,offsets[i].y*multiplier)}this.state=WPGMZA.MarkerSeparatorGroup.STATE_OPEN,WPGMZA.MarkerSeparatorGroup.lastGroupOpened=this}},WPGMZA.MarkerSeparatorGroup.prototype.close=function(){if(this.state!=WPGMZA.MarkerSeparatorGroup.STATE_CLOSE){for(var duration=1e3*WPGMZA.settings.marker_separator_animation_duration,animate=WPGMZA.settings.marker_separator_animate,stagger=WPGMZA.settings.marker_separator_stagger_animation?1e3*WPGMZA.settings.marker_separator_stagger_interval:0,i=0;i<this.markers.length;i++){var marker=this.markers[i];animate?function(marker,delay){delay?setTimeout(function(){$(marker).animate({offsetX:0,offsetY:0},duration,function(){this.setVisible(!1),window.infoWindow&&window.infoWindow[this.id]&&infoWindow[this.id].close()})},delay):$(marker).animate({offsetX:0,offsetY:0},duration,function(){this.setVisible(!1),this.infoWindow?this.infoWindow.close():window.infoWindow&&window.infoWindow[this.id]&&infoWindow[this.id].close()})}(marker,stagger?stagger*i:0):(marker.setOffset(0,0),marker.setVisible(!1))}this.state=WPGMZA.MarkerSeparatorGroup.STATE_CLOSED}}}),jQuery(function($){$(document).ready(function(event){var el=$("#marker-separator-placeholder-icon-picker-container > .wpgmza-marker-icon-picker");el.length&&new WPGMZA.MarkerIconPicker(el)}
1)}),jQuery(function($){WPGMZA.MarkerSeparator=function(map_id){this.map=WPGMZA.getMapByID(map_id),this.map_id=map_id,this.groups=[],this.threshold=.05,WPGMZA.settings.wpgmza_near_vicinity_aff_radius&&(this.threshold=WPGMZA.settings.wpgmza_near_vicinity_aff_radius/1e3),this.threshold,this.groupMarkers()},WPGMZA.MarkerSeparator.prototype.destroy=function(){this.getMarkers().forEach(function(marker){delete marker.separatorGroup})},WPGMZA.MarkerSeparator.getNativeLatLng=function(latLng){return WPGMZA.isProVersionBelow7_10_00?WPGMZA.LatLng.fromGoogleLatLng(latLng):new WPGMZA.LatLng(latLng)},WPGMZA.MarkerSeparator.prototype.getMarkers=function(){var i,markers=[];for(i in this.map.markers)this.map.markers[i].getVisible()&&markers.push(this.map.markers[i]);return this.map.markers},WPGMZA.MarkerSeparator.prototype.groupMarkers=function(){(new Date).getTime();var points=[],markers=this.getMarkers();if(markers.length)for(var cheapRuler,position=markers[0].getPosition(),minLat=position.lat,maxLat=position.lat,avgLat=0,tree=(markers.forEach(function(marker){var latLng;marker.isFiltered||(latLng=WPGMZA.MarkerSeparator.getNativeLatLng(marker.getPosition()),minLat=Math.min(latLng.lat,minLat),maxLat=Math.max(latLng.lat,maxLat),avgLat+=latLng.lat,latLng.marker=marker,points.push(latLng))}),avgLat/=markers.length,position=Math.abs(maxLat-minLat)<5||WPGMZA.settings.forceCheapRuler?(cheapRuler=new CheapRuler(avgLat,"kilometers"),function(a,b){return cheapRuler.distance([a.lat,a.lng],[b.lat,b.lng])}):WPGMZA.Distance.between,new kdTree(points,position,["lat","lng"])),i=0;i<markers.length;i++)if(!markers[i].separatorGroup&&markers[i].getVisible()&&!markers[i].isFiltered){var marker=markers[i];if(!marker.separatorGroup){for(var maxGroupSize=WPGMZA.settings.marker_separator_maximum_group_size||8,nearest=tree.nearest(marker.getPosition(),maxGroupSize,[this.threshold]),group=null,j=0;j<nearest.length;j++){var other=nearest[j][0].marker;other===marker||other.separatorGroup||(group||(group=new WPGMZA.MarkerSeparatorGroup).addMarker(marker),group.addMarker(other))}group&&(WPGMZA.isProVersionBelow7_10_00?group.placeholder.googleMarker.setMap(this.map):this.map.addMarker(group.placeholder),this.groups.push(group))}}},$(document.body).on("markersplaced.wpgmza filteringcomplete.wpgmza",function(event){if(WPGMZA.getCurrentPage()!=WPGMZA.PAGE_MAP_EDIT&&WPGMZA.settings.wpgmza_near_vicinity_control_enabled){var event=event.target.id.match(/\d+$/),map=WPGMZA.getMapByID(event);if(map&&(!map.settings||!map.settings.custom_tile_enabled)){if(map.markerSeparator){if(map.markerSeparator.groups&&0<map.markerSeparator.groups.length)for(var gI in map.markerSeparator.groups){gI=map.markerSeparator.groups[gI].placeholder;map.removeMarker(gI)}map.markerSeparator.destroy()}map.markerSeparator=new WPGMZA.MarkerSeparator(event)}}}),$(document.body).on("infowindowopen.wpgmza",function(event){event.target&&event.target.feature&&event.target.feature.separatorGroup&&event.target.feature.separatorGroup.state===WPGMZA.MarkerSeparatorGroup.STATE_CLOSED&&event.target.feature.separatorGroup.open()})}),jQuery(function($){WPGMZA.GoogleMarkerClusterIcon=function(cluster,styles,padding){var self=this;WPGMZA.MarkerClusterIcon.apply(this,arguments),this.overlay=new WPGMZA.GoogleHTMLOverlay(this.map),this.overlay.element.on("click",function(event){self.onClick(event)})},WPGMZA.GoogleMarkerClusterIcon.prototype=Object.create(WPGMZA.MarkerClusterIcon.prototype),WPGMZA.GoogleMarkerClusterIcon.prototype.constructor=WPGMZA.GoogleMarkerClusterIcon,WPGMZA.GoogleMarkerClusterIcon.prototype.remove=function(){this.overlay.setMap(null)},WPGMZA.GoogleMarkerClusterIcon.prototype.setCenter=function(center){WPGMZA.MarkerClusterIcon.prototype.setCenter.apply(this,arguments),this.overlay.position=center,this.overlay.updateElementPosition()}}),jQuery(function($){WPGMZA.LeafletMarkerClusterIcon=function(cluster,styles,padding){var self=this,initialLatLng=(WPGMZA.MarkerClusterIcon.apply(this,arguments),this.element=$("<div class='wpgmza-marker-cluster-icon'/>")[0],L.latLng(0,0));this.overlay=new L.DivIcon({html:this.element,className:"wpgmza-cluster-icon-marker",iconSize:[0,0],iconAnchor:[0,0]}),this.marker=L.marker(initialLatLng,{icon:this.overlay,pane:"markerPane",interactive:!0}),this.marker.addTo(this.map.leafletMap),this.marker.on("click",function(event){var markers=cluster.markers.slice();
1self.onClick(event),setTimeout(function(){markers.forEach(function(marker){marker.setVisible(!0)})},10)})},WPGMZA.LeafletMarkerClusterIcon.prototype=Object.create(WPGMZA.MarkerClusterIcon.prototype),WPGMZA.LeafletMarkerClusterIcon.prototype.constructor=WPGMZA.LeafletMarkerClusterIcon,WPGMZA.LeafletMarkerClusterIcon.prototype.setCenter=function(center){WPGMZA.MarkerClusterIcon.prototype.setCenter.apply(this,arguments);var latLng=L.latLng(parseFloat(this.center.lat),parseFloat(this.center.lng));this.marker.setLatLng(latLng)},WPGMZA.LeafletMarkerClusterIcon.prototype.remove=function(){this.map.leafletMap.removeLayer(this.marker)},WPGMZA.LeafletMarkerClusterIcon.prototype.show=function(){this.element&&($(this.element).css(this.getCSS()),$(this.element).text(this.sums.text))}}),jQuery(function($){WPGMZA.OLMarkerClusterIcon=function(cluster,styles,padding){var self=this;WPGMZA.MarkerClusterIcon.apply(this,arguments),ol.proj.fromLonLat([0,0]);this.element=$("<div class='wpgmza-marker-cluster-icon'/>"),this.overlay=new ol.Overlay({positioning:"top-left"}),this.map.olMap.addOverlay(this.overlay),$(this.overlay.element).on("click",function(event){var markers=cluster.markers.slice();self.onClick(event),setTimeout(function(){markers.forEach(function(marker){marker.setVisible(!0)})},10)})},WPGMZA.OLMarkerClusterIcon.prototype=Object.create(WPGMZA.MarkerClusterIcon.prototype),WPGMZA.OLMarkerClusterIcon.prototype.constructor=WPGMZA.OLMarkerClusterIcon,WPGMZA.OLMarkerClusterIcon.prototype.setCenter=function(center){WPGMZA.MarkerClusterIcon.prototype.setCenter.apply(this,arguments),console.log(this.center.lat,this.center.lng);var origin=ol.proj.fromLonLat([parseFloat(this.center.lng),parseFloat(this.center.lat)]);this.overlay.setPosition(origin)},WPGMZA.OLMarkerClusterIcon.prototype.remove=function(){this.map.olMap.removeOverlay(this.overlay)}}),jQuery(function($){WPGMZA.RatingWidget=function(options){var self=this;WPGMZA.EventDispatcher.call(this),this._averageRating=0,this._numRatings=0,this.userGuid=Cookies.get("wpgmza-user-guid"),this.userGuid||(this.userGuid=WPGMZA.guid(),Cookies.set("wpgmza-user-guid",this.userGuid)),this.element=$("<span class='wpgmza-rating'></span>"),this.on("rated",function(event){self.onRated(event)})},WPGMZA.RatingWidget.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.RatingWidget.prototype.constructor=WPGMZA.RatingWidget,WPGMZA.RatingWidget.STYLE_RADIOS="radios",WPGMZA.RatingWidget.STYLE_GRADIENT="gradient",WPGMZA.RatingWidget.STYLE_STARS="stars",WPGMZA.RatingWidget.STYLE_THUMBS="thumbs",WPGMZA.RatingWidget.createInstance=function(options,forceStyle){var style=WPGMZA.RatingWidget.getSelectedStyle();switch(style=forceStyle?forceStyle:style){case WPGMZA.RatingWidget.STYLE_GRADIENT:return new WPGMZA.GradientRatingWidget(options);case WPGMZA.RatingWidget.STYLE_STARS:return new WPGMZA.StarsRatingWidget(options);case WPGMZA.RatingWidget.STYLE_THUMBS:return new WPGMZA.ThumbsRatingWidget(options);default:return new WPGMZA.RadiosRatingWidget(options)}},WPGMZA.RatingWidget.getSelectedStyle=function(){return WPGMZA.settings.marker_rating_widget_style},WPGMZA.RatingWidget.getRatingWidgetForMarker=function(marker){var options={type:"marker",id:marker.id};return marker.rating&&(options.averageRating=marker.rating.average,options.numRatings=marker.rating.count),WPGMZA.RatingWidget.createInstance(options)},Object.defineProperty(WPGMZA.RatingWidget.prototype,"min",{get:function(){return parseInt(WPGMZA.settings.minimum_rating)}}),Object.defineProperty(WPGMZA.RatingWidget.prototype,"max",{get:function(){return parseInt(WPGMZA.settings.maximum_rating)}}),Object.defineProperty(WPGMZA.RatingWidget.prototype,"step",{get:function(){return parseFloat(WPGMZA.settings.rating_step)}}),Object.defineProperty(WPGMZA.RatingWidget.prototype,"numRatings",{get:function(){return $(this.element).find(".wpgmza-num-ratings").text()},set:function(value){$(this.element).find(".wpgmza-num-ratings").text(value)}}),Object.defineProperty(WPGMZA.RatingWidget.prototype,"localStorageKey",{get:function(){return"wpgmza_rating_"+this.type+"_"+this.id}}),WPGMZA.RatingWidget.prototype.setOptions=function(options){for(var key in options)this[key]=options[key];this.recallSubmittedRating()},WPGMZA.RatingWidget.prototype.getAJAXRequestParameters=function(){var params={};
1return this.type&&(params.type=this.type),this.id&&(params.id=this.id),params.userGuid=this.userGuid,params.amount=this.value,params},WPGMZA.RatingWidget.prototype.onRated=function(event){var self=this,params={method:"POST",data:this.getAJAXRequestParameters(),success:function(data,status,xhr){self.averageRating=data.average,self.numRatings=data.count,self.storeSubmittedRating(self.value)},complete:function(){self.showPreloader(!1)}};this.showPreloader(!0),WPGMZA.restAPI.call("/ratings/",params)},WPGMZA.RatingWidget.prototype.showPreloader=function(show){(this.isLoading=show)?$(this.element).addClass("wpgmza-loading"):$(this.element).removeClass("wpgmza-loading")},WPGMZA.RatingWidget.prototype.recallSubmittedRating=function(){var item;window.localStorage&&(item=localStorage.getItem(this.localStorageKey))&&(item=JSON.parse(item),this.value=item.amount)},WPGMZA.RatingWidget.prototype.storeSubmittedRating=function(amount){window.localStorage&&localStorage.setItem(this.localStorageKey,JSON.stringify({amount:amount}))},$(window).on("infowindowopen.wpgmza",function(event){var marker=event.target.feature;!marker.map.settings.enable_marker_ratings||marker.isIntegrated||(marker=WPGMZA.RatingWidget.getRatingWidgetForMarker(marker),$(event.target.element).children().hasClass("wpgmza-rating"))||$(event.target.element).children().last().after(marker.element)}),$(document.body).on("markerlistingupdated.wpgmza",function(event){var map=event.target.map;$(event.target.element).find(".wpgmza-rating-container").each(function(index,el){var marker_id=$(el).closest("[data-marker-id]").attr("data-marker-id"),marker_id=map.getMarkerByID(marker_id),marker_id=WPGMZA.RatingWidget.getRatingWidgetForMarker(marker_id);map.settings.enable_marker_ratings?$(el).append(marker_id.element):$(el).remove()})})}),jQuery(function($){WPGMZA.GradientRatingWidget=function(options){var self=this,start_color=(WPGMZA.RatingWidget.call(this),this.input=$("<input type='hidden'/>"),this.element.append(this.input),this.container=$("<div class='wpgmza-rating-gradient-container'></div>"),this.container.css({overflow:"hidden"}),this.element.append(this.container),this.gradient=$("<div class='wpgmza-rating-gradient'></div>"),WPGMZA.settings.marker_rating_gradient_widget_start_color),end_color=WPGMZA.settings.marker_rating_gradient_widget_end_color;this.gradient.css({background:"linear-gradient(to right, "+start_color+" 0%, "+end_color+" 128px)",filter:"progid:DXImageTransform.Microsoft.gradient( startColorstr= "+start_color+", endColorst'= "+end_color+", GradientType = 1 )"}),this.container.append(this.gradient),this.element.append(" "),this.element.append($("<i class='fa fa-users' aria-hidden='true'></i>")),this.element.append(" "),this.element.append($("<span class='wpgmza-num-ratings'></span>")),this.container.on("mousemove",function(event){self.onMouseMove(event)}),this.container.on("mouseout",function(event){self.onMouseOut(event)}),this.container.on("click",function(event){self.isLoading||self.trigger("rated")}),this.setOptions(options)},WPGMZA.extend(WPGMZA.GradientRatingWidget,WPGMZA.RatingWidget),Object.defineProperty(WPGMZA.GradientRatingWidget.prototype,"averageRating",{get:function(){return this._averageRating},set:function(value){this.showValue(value),this._averageRating=value}}),Object.defineProperty(WPGMZA.GradientRatingWidget.prototype,"value",{get:function(){return this.lastHoveredRating},set:function(){}}),WPGMZA.GradientRatingWidget.prototype.showValue=function(value){value=(value-this.min)/(this.max-this.min);this.gradient.css({width:100*value+"%"})},WPGMZA.GradientRatingWidget.prototype.onMouseMove=function(event){var x;this.isLoading||(x=event.pageX-$(this.container).offset().left,event.pageY,$(this.container).offset().top,event=x/$(this.container).width()*this.max,event=((x=this.min+Math.round(event/this.step)*this.step)-this.min)/(this.max-this.min)*100,this.lastHoveredRating=x,this.gradient.css({width:event+"%"}))},WPGMZA.GradientRatingWidget.prototype.onMouseOut=function(event){this.showValue(this.averageRating)}}),jQuery(function($){WPGMZA.RadiosRatingWidget=function(options){var self=this;WPGMZA.RatingWidget.call(this),this.element.append(this.min+" "),this.name=WPGMZA.guid();for(var amount=this.min;amount<=this.max;amount+=this.step){var radio=$("<input type='radio'/>");radio.attr("name",this.name),radio.val(amount),this.element.append(radio)}this.element.append(this.max),this.element.append(" ("),this.element.append($("<i class='fa fa-dot-circle-o' aria-hidden='true'></i> <span class='wpgmza-average-rating'></span> - <i class='fa fa-users' aria-hidden='true'></i> <span class='wpgmza-num-ratings'></span>")),this.element.append(")"),this.setOptions(options),$(this.element).on("change","input",function(event){self.trigger("rated")})},WPGMZA.extend(WPGMZA.RadiosRatingWidget,WPGMZA.RatingWidget),Object.defineProperty(WPGMZA.RadiosRatingWidget.prototype,"value",{get:function(){return this.element.find("input:checked").val()},set:function(value){this.element.find("input:checked").prop("checked",!1),this.element.find("input[value='"+value+"']").prop("checked",!0)}}),Object.defineProperty(WPGMZA.RadiosRatingWidget.prototype,"averageRating",{get:function(){return this._averageRating},set:function(value){!isNaN(value)&&value||(value=0);var display=parseFloat(value).toFixed(2);$(this.element).find(".wpgmza-average-rating").text(display),this._averageRating=value}}),WPGMZA.RadiosRatingWidget.prototype.showPreloader=function(show){WPGMZA.RatingWidget.prototype.showPreloader.apply(this,arguments),$(this.element).find("input").prop("disabled",show)}}),jQuery(function($){WPGMZA.StarsRatingWidget=function(options){var self=this;WPGMZA.RatingWidget.call(this),this.input=$("<input type='hidden'/>"),this.element.append(this.input),this.container=$("<span class='wpgmza-rating-stars-container'></span>"),this.element.append(this.container),this.background=$("<span class='wpgmza-background'></span>"),this.container.append(this.background),this.foreground=$("<span class='wpgmza-foreground'></span>"),this.container.append(this.foreground);for(var amount=this.min;amount<=this.max;amount++)this.background.append("☆"),this.foreground.append("★");this.element.append(" "),this.element.append($("<span class='wpgmza-num-ratings'></span>")),this.visibilityTestInterval=setInterval(function(){var width=$(self.background).width(),height=$(self.background).height();0!=width&&(self.container.css(width={width:width+"px",height:height+"px"}),self.element.find(".wpgmza-num-ratings").css({left:width.width}),clearInterval(self.visibilityTestInterval),self.showStars(self.averageRating))},100),this.container.on("mousemove",function(event){self.onMouseMove(event)}),this.container.on("mouseout",function(event){self.onMouseOut(event)}),this.container.on("click",function(event){self.isLoading||self.trigger("rated")}),this.setOptions(options)},WPGMZA.extend(WPGMZA.StarsRatingWidget,WPGMZA.RatingWidget),Object.defineProperty(WPGMZA.StarsRatingWidget.prototype,"value",{get:function(){return this.lastHoveredRating},set:function(){}}),Object.defineProperty(WPGMZA.StarsRatingWidget.prototype,"averageRating",{get:function(){return this._averageRating},set:function(value){this._averageRating=value,this.showStars(value)}}),WPGMZA.StarsRatingWidget.prototype.showStars=function(amount){var amount=amount/this.max,w=$(this.background).width();this.foreground.css({width:amount*w+"px"})},WPGMZA.StarsRatingWidget.prototype.onMouseMove=function(event){this.container.css({width:$(this.background).width(),height:$(this.background).height()});var event=(event.pageX-$(this.container).offset().left)/$(this.background).width(),event=($(this.background).width(),this.step,Math.ceil(event*this.max)),px=event/this.max*$(this.container).width();this.lastHoveredRating=event,this.foreground.css({width:px+"px"})},WPGMZA.StarsRatingWidget.prototype.onMouseOut=function(event){this.showStars(this.averageRating)}}),jQuery(function($){WPGMZA.ThumbsRatingWidget=function(options){var self=this;WPGMZA.RatingWidget.call(this),this.input=$("<input type='hidden'/>"),this.element.append(this.input),this.container=$("<span class='wpgmza-rating-thumbs-container'></span>"),this.element.append(this.container),this.downvote=$("<span class='wpgmza-downvote'><i class='fa fa-thumbs-down' aria-hidden='true'></i></span>"),this.container.append(this.downvote),this.upvote=$("<span class='wpgmza-upvote'><i class='fa fa-thumbs-up' aria-hidden='true'></i></span>"),this.container.append(this.upvote),this.setOptions(options),this.downvote.on("click",function(event){self.onButtonClicked(event)}),this.upvote.on("click",function(event){self.onButtonClicked(event)})},WPGMZA.extend(WPGMZA.ThumbsRatingWidget,WPGMZA.RatingWidget),Object.defineProperty(WPGMZA.ThumbsRatingWidget.prototype,"value",{get:function(){return this.lastClickedRating},set:function(value){value==this.min?this.downvote.addClass("wpgmza-remembered-rating"):value==this.max&&this.upvote.addClass("wpgmza-remembered-rating")}}),Object.defineProperty(WPGMZA.ThumbsRatingWidget.prototype,"averageRating",{get:function(){return this._averageRating}
1,set:function(value){this.setBackgroundValue(value),this._averageRating=value}}),WPGMZA.ThumbsRatingWidget.prototype.setBackgroundValue=function(value){for(var percent=100*((value-this.min)/(this.max-this.min)),prefixes=["-moz-","-webkit-",""],color=this.getAverageDisplayColor(),i=0;i<prefixes.length;i++)this.container.css({background:prefixes[i]+"linear-gradient(to right, "+color+" 0%, "+color+" "+percent+"%, transparent "+percent+"%, transparent 100%)"})},WPGMZA.ThumbsRatingWidget.prototype.getAverageDisplayColor=function(){return WPGMZA.settings.marker_rating_thumb_widget_average_rating_color||"#3cc639"},WPGMZA.ThumbsRatingWidget.prototype.onButtonClicked=function(event){this.isLoading||($(event.currentTarget).hasClass("wpgmza-upvote")?this.lastClickedRating=this.max:this.lastClickedRating=this.min,$(this.element).find(".wpgmza-remembered-rating").removeClass(".wpgmza-remembered-rating"),$(event.currentTarget).addClass("wpgmza-remembered-rating"),this.trigger("rated"))}}); 2//# sourceMappingURL=wp-google-maps-gold.min.js.map
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.