1var IPGmaps=IPGmaps||{};IPGmaps=function(){var e,o,t,n,r,i=null,a={},s={},l=new google.maps.InfoWindow,p=function(e){var o=e.feature;if(l.close(),!o.getProperty("hidePopup"))if(l.setOptions({pixelOffset:new google.maps.Size((-1),(-40))}),l.setPosition(o.getGeometry().get()),l.setContent("<i class='fa fa-spinner fa-spin fa-lg' id='popup-spinner'></i>"),l.open(i),o.getProperty("popup")){var t=o.getProperty("popup");t+=I(o),l.setContent(t)}else $.ajax({url:n,dataType:"html",method:"GET",data:{id:o.getId()}}).done(function(e){o.setProperty("popup",e);var t=e.concat(I(o));l.setContent(t)})},u=new google.maps.DirectionsService,d=new google.maps.DirectionsRenderer({suppressMarkers:!0}),f=[],m={zoomControl:{style:google.maps.ZoomControlStyle.SMALL},mapTypeControl:{style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR,mapTypeIds:[google.maps.MapTypeId.ROADMAP,google.maps.MapTypeId.SATELLITE],position:google.maps.ControlPosition.BOTTOM_CENTER}},c=function(s){if(!("mapElementID"in s))return void console.error("You must define the target element for the map!");if(!1 in s)return void console.error("You must define the map center!");var l={center:s.mapCenter,zoom:s.zoomLevel?s.zoomLevel:10,zoomControl:void 0==s.showZoomControls||s.showZoomControls,zoomControlOptions:s.zoomControlOptions?s.zoomControlOptions:m.zoomControl,scrollwheel:void 0==s.scrollZoom||s.scrollZoom,styles:s.mapStyle?s.mapStyle:f,disableDefaultUI:void 0==s.disableDefaultUI||s.disableDefaultUI,mapTypeControl:void 0==s.showMapTypeControls||s.showMapTypeControls,mapTypeControlOptions:s.mapTypeControlOptions?s.mapTypeControlOptions:m.mapTypeControl};return s.maxZoom&&(l.maxZoom=s.maxZoom),i=new google.maps.Map(document.getElementById(s.mapElementID),l),o=s.customMarkers?s.customMarkers:{},r=s.routingOptions?s.routingOptions:{},n=s.popupRequestURL?s.popupRequestURL:"/minha_visita/pop_up_content",popupListenerFunc=s.popupListenerFunc?s.popupListenerFunc:p,a["default"]=i.data,i.data.addListener("click",popupListenerFunc),e=new geoXML3.parser({map:i,singleInfoWindow:!0}),o.kmlMarker&&(e.options.markerOptions={icon:o.kmlMarker}),s.enableClustering&&(t=new DataLayerClusterer(i,{maxZoom:13,styles:[{url:"/static/img/agregador.png",height:50,width:50,textColor:"white"}]})),i},g=function(e){if(!("position"in e&&e.position.lat&&e.position.lng))return console.error("You must define position for the point"),null;if(!("id"in e))return console.error("You must define the id of the point"),null;var o=e.layer?e.layer:"default",t=new google.maps.Data.Feature({geometry:{lat:e.position.lat,lng:e.position.lng},id:e.id,properties:e.properties?e.properties:{}});return o in a||L(o),t.setProperty("layer",o),a[o].add(t),t},y=function(e,o,t,n){if(!(e in a))return void(n&&console.error("There is no layer with the given name"));var r=a[e],i=h(e,o),s=!0;return i?(r.remove(i),r.forEach(function(e){s=!1}),void(s&&"default"!==e&&t&&(r.setMap(null),delete a[e]))):void(n&&console.error("There is no feature with the given id"))},v=function(e,o,t){t=void 0!=t&&t,y(e,o,t,!0)},h=function(e,o){if(!(e in a))return console.error("There is no feature layer with the given name"),null;var t=a[e].getFeatureById(o);return t||console.error("There is no feature with that ID!"),t},L=function(e,o){if(e in a||e in s)return console.error("There is already a layer with that name!"),null;var t=new google.maps.Data({map:i});return o&&t.setStyle(o),t.addListener("click",p),a[e]=t,t},w=function(o,t){if(!(o in a||o in s))return void(t&&console.error("There is no layer with the given name"));if(o in a)a[o].setMap(null),delete a[o];else{for(var n,r=0;n=s[o].files[r];r++)if(n instanceof google.maps.KmlLayer)n.setMap(null);else{e.hideDocument(n);for(var i,l=0;i=e.docs[l];l++)if(i===n){delete e.docsByUrl[i.url],e.docs.splice(l,1);break}}delete s[o]}},M=function(e){w(e,!0)},T=function(e){return e in a?void a[e].forEach(function(o){a[e].remove(o)}):void console.error("There is no feature layer with the given name")},P=function(o){if(!(o in s))return void console.error("There is no kml layer with the given name");for(var t,n=0;t=s[o].files[n];n++)if(t instanceof google.maps.KmlLayer)t.setMap(null);else{e.hideDocument(t);for(var r,i=0;r=e.docs[i];i++)if(r===t){delete e.docsByUrl[r.url],e.docs.splice(i,1);break}}s[o].files=[]},C=function(){var e=new google.maps.LatLngBounds;for(var o in a){var t=a[o];t.forEach(function(o){Y(o.getGeometry(),e)})}for(var o in s)for(var n,r=0;n=s[o].files[r];r++){var l=n instanceof google.maps.KmlLayer?n.getDefaultViewport():n.bounds;l&&e.union(l)}e.isEmpty()||i.fitBounds(e)},D=function(e){if(!(e in a||e in s))return void console.error("There is no layer with the given name");var o=new google.maps.LatLngBounds;if(e in a)a[e].forEach(function(e){Y(e.getGeometry(),o)});else{var t=kmlLayer instanceof google.maps.KmlLayer?kmlLayer.getDefaultViewport():kmlLayer.bounds;o.union(t)}o.isEmpty()||i.fitBounds(o)},k=function(){return l},I=function(e){var o;if("Point"==e.getGeometry().getType()){var t=e.getGeometry().get();o='<div class="hidden-inputs"><input type="hidden" name="lat" value="'+t.lat()+'"><input type="hidden" name="lng" value="'+t.lng()+'"><input type="hidden" name="layer" value="'+e.getProperty("layer")+'"><input type="hidden" name="id" value="'+e.getId()+'"></div>'}return o},O=function(o,n){if(!(o in a||o in s))return void console.error("There is no layer with that name!");if(void 0==n)return void console.error("You must provide the layer visibility!");if(o in a)a[o].setMap(n?i:null),t&&t.repaint();else{for(var r,p=0;r=s[o].files[p];p++)r instanceof google.maps.KmlLayer?r.setMap(n?i:null):n?e.showDocument(r):e.hideDocument(r);s[o].isVisible=n}l.close()},R=function(e){O(e,!1)},b=function(){for(var e in a)O(e,!1);for(var e in s)O(e,!1)},A=function(e){O(e,!0)},E=function(){for(var e in a)O(e,!0);for(var e in s)O(e,!0)},S=function(e){return e in a||e in s?void(e in a?O(e,null==a[e].getMap()):O(e,!s[e].isVisible)):void console.error("There is no layer with that name!")},_=function(o,t){if(!t)return void console.error("You must define the kml layer name");if(t in a)return void console.error("There is already a feature layer with that name!");if(!("publicURL"in o||"privateURL"in o||"kml"in o))return void console.error("You must define a valid kml source");var n;return"publicURL"in o?n=new google.maps.KmlLayer({url:o.publicURL,map:i}):"privateURL"in o?(n=[],e.parse(o.privateURL,n),n=n[0]):(n=[],e.parseKmlString(o.kml,n),n=n[0]),t in s?(s[t].files.push(n),s[t].isVisible||e.hideDocument(n)):s[t]={files:[n],isVisible:!0},n},G=function(o){e.options.zoom=o},z=function(e){var o=new google.maps.Data;o.addGeoJson(e),o.forEach(function(e){if(e.getGeometry()){var o=e.getProperty("layer");o?(o in a||L(o),a[o].add(e)):(e.setProperty("layer","default"),a["default"].add(e))}})},U=function(){return{featureLayers:a,kmlLayers:s}},F=function(e){return e in a||e in s?e in a?a[e]:s[e]:(console.error("There is no layer with that name"),null)},K=function(e){"origin"in e&&"destination"in e||console.error("You must define the origin and destination of the trip!");var o=e.waypoints?e.waypoints:[];if(d.setMap(i),r.directionsPanelElement){var t=$(r.directionsPanelElement)[0];d.setPanel(t)}"travelMode"in r&&r.travelMode in google.maps.TravelMode||(console.warn("The travel mode was either not provided or invalid! - (Defaulted to DRIVING). Valid options are: "+Object.keys(google.maps.TravelMode).join(",")+"."),r.travelMode="DRIVING"),u.route({origin:e.origin,waypoints:o,destination:e.destination,travelMode:google.maps.TravelMode[r.travelMode],provideRouteAlternatives:void 0!=r.provideRouteAlternatives&&r.provideRouteAlternatives},function(e,o){o===google.maps.DirectionsStatus.OK?(d.setDirections(e),V(e)):window.alert("Directions request failed due to "+o)})},V=function(e){var t=e.routes[0].legs.length,n=e.routes[0].legs[0],r=e.routes[0].legs[t-1];if(L("_routing",function(e){var t;switch(e.getId()){case"startingPoint":t=o.startMarker;break;case"endPoint":t=o.finishMarker;break;default:t=o.waypointMarker}return{icon:t}}),g({position:n.steps[0].start_point.toJSON(),id:"startingPoint",layer:"_routing",properties:{popup:n.start_address}}),g({position:r.steps[r.steps.length-1].end_point.toJSON(),id:"endPoint",layer:"_routing",properties:{popup:r.end_address}}),t>1)for(var i=1;i<t;i++)g({position:e.routes[0].legs[i].steps[0].start_point.toJSON(),id:"wayPoint"+i,layer:"_routing",properties:{popup:e.routes[0].legs[i].start_address}})},Z=function(){d.setMap(null),d.setPanel(null),w("_routing",!1)},B=function(e,o){i.panTo(e),void 0!==o&&i.setZoom(o)},x=function(){return i},N=function(){return e},Y=function(e,o){e instanceof google.maps.LatLng?o.extend(e):e instanceof google.maps.Data.Point?o.extend(e.get()):null!==e&&e.getArray().forEac
1h(function(e){Y(e,o)})},J=function(){return t},W=function(){google.maps.event.trigger(i,"resize")};return{initMap:c,getMap:x,fitAllLayers:C,fitLayer:D,updateSize:W,createLayer:L,addPoint:g,removeFeature:v,getFeature:h,removeAllFeaturesFromLayer:T,removeAllKMLFromLayer:P,removeLayer:M,hideLayer:R,hideAllLayers:b,showLayer:A,showAllLayers:E,setLayerVisibility:O,toggleLayerVisibility:S,getAllLayers:U,getLayerWithName:F,panTo:B,getPopupInfoWindow:k,addGeoJson:z,addKMLToLayer:_,fitKMLOnAdd:G,getKMLParser:N,getFeatureClusterer:J,calculateAndDisplayRoute:K,clearRoute:Z}}();
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.