var MapSVG=function(){};!function(t){MapSVG.templatesLoaded={},"undefined"!=typeof mapsvg_paths?MapSVG.urls=mapsvg_paths:MapSVG.urls={},MapSVG.instances=[],MapSVG.userAgent=navigator.userAgent.toLowerCase(),MapSVG.touchDevice="ontouchstart"in window||0
':""},MapSVG.DetailsController.prototype.viewDidLoad=function(){this.events&&this.events.shown&&this.events.shown.call(this,this.mapsvg),this.modal&&MapSVG.isPhone&&this.mapsvg.getData().options.detailsView.mobileFullscreen&&!this.mobileCloseBtn&&(this.mobileCloseBtn=e('"),this.view.append(this.mobileCloseBtn))},MapSVG.DetailsController.prototype.setEventHandlers=function(){var t=this;this.view.on("click",".mapsvg-popover-close, .mapsvg-mobile-modal-close",function(e){e.stopPropagation(),t.destroy(),t.events&&t.events.closed&&t.events.closed.call(t,t.mapsvg)})}}(jQuery),function($){MapSVG.DirectoryController=function(e){this.database=e.database,this.noPadding=!0,this.position=e.position,this.search=e.search,this.filters=e.filters,MapSVG.Controller.call(this,e)},MapSVG.extend(MapSVG.DirectoryController,MapSVG.Controller),MapSVG.DirectoryController.prototype.getToolbarTemplate=function(){return'
This is the demo content of the Region %templateType%.
\nClick on the following link to edit the content of this window: Menu > Templates > Region %templateType%.
\nMore information about templates: mapsvg.com/docs/map-editor/templates
\nStatus: {{status_text}}
\n\n\x3c!-- Show all linked Database Objects: --\x3e\n{{#each objects}}\n\n \x3c!-- DB Object are available inside of this block --\x3e\n\n{{{description}}}
\n{{location.address.formatted}}
\n\n \x3c!-- Show all images: --\x3e\n {{#each images}}\n \x3c!-- Image fields "thumbnail", "medium", "full" --\x3e\n \x3c!-- are available in this block --\x3e\n \n {{/each}}\n\n{{/each}}',i='This is the demo content of the DB Object %templateType%.
\nClick on the following link to edit the content of this window: Menu > Templates > Region %templateType%.
\nMore information about templates: mapsvg.com/docs/map-editor/templates
\n{{{description}}}
\n{{location.address.formatted}}
\n\n\x3c!-- Show all images: --\x3e\n{{#each images}}\n \x3c!-- Image fields "thumbnail", "medium", "full" --\x3e\n \x3c!-- are available in this block --\x3e\n \n{{/each}}\n\n\x3c!-- Show all linked Regions, comma-separated: --\x3e\nRegions: \n {{#each regions}}\n \x3c!-- Region fields are available in this block --\x3e\n {{#if title}}\n {{title}}\n {{else}}\n {{id}}\n {{/if}}{{#unless @last}}, {{/unless}}\n {{/each}}\n
';this.defaults={markerLastID:0,regionLastID:0,dataLastID:1,disableAll:!1,width:null,height:null,lockAspectRatio:!1,padding:{top:0,left:0,right:0,bottom:0},maxWidth:null,maxHeight:null,minWidth:null,minHeight:null,loadingText:"Loading map...",colorsIgnore:!1,colors:{baseDefault:"#000000",background:"#eeeeee",selected:40,hover:20,directory:"#fafafa",detailsView:"",status:{},clusters:"",clustersBorders:"",clustersText:"",clustersHover:"",clustersHoverBorders:"",clustersHoverText:"",markers:{base:{opacity:100,saturation:100},hovered:{opacity:100,saturation:100},unhovered:{opacity:40,saturation:100},active:{opacity:100,saturation:100},inactive:{opacity:40,saturation:100}}},regions:{},clustering:{on:!1},viewBox:[],cursor:"default",manualRegions:!1,onClick:null,mouseOver:null,mouseOut:null,menuOnClick:null,beforeLoad:null,afterLoad:null,zoom:{on:!0,limit:[0,10],delta:2,buttons:{on:!0,location:"right"},mousewheel:!0,fingers:!0},scroll:{on:!0,limit:!1,background:!1,spacebar:!1},responsive:!0,tooltips:{on:!1,position:"bottom-right",template:"",maxWidth:"",minWidth:100},popovers:{on:!1,position:"top",template:"",centerOn:!0,width:300,maxWidth:50,maxHeight:50},multiSelect:!1,regionStatuses:{1:{label:"Enabled",value:"1",color:"",disabled:!1},0:{label:"Disabled",value:"0",color:"",disabled:!0}},events:{afterLoad:"function(){\n // var mapsvg = this;\n // var regions = mapsvg.regions;\n // var dbObjects = mapsvg.database.getLoaded();\n}",beforeLoad:"function(){\n // var mapsvg = this;\n // var settings = mapsvg.options;\n // console.log(settings);\n}",databaseLoaded:"function (){\n // var mapsvg = this;\n // var dbObjects = mapsvg.database.getLoaded();\n}","click.region":"function (e, mapsvg){\n // var region = this;\n // console.log(region);\n}","mouseover.region":"function (e, mapsvg){\n // var region = this;\n // console.log(region);\n}","mouseout.region":"function (e, mapsvg){\n // var region = this;\n // console.log(region);\n}","click.marker":"function (e, mapsvg){\n // var marker = this;\n // console.log(marker);\n}","mouseover.marker":"function (e, mapsvg){\n // var marker = this;\n // console.log(marker);\n}","mouseout.marker":"function (e, mapsvg){\n // var marker = this;\n // console.log(marker);\n}","click.directoryItem":"function (e, regionOrObject, mapsvg){\n // var itemjQueryObject = this;\n}","mouseover.directoryItem":"function (e, regionOrObject, mapsvg){\n // var itemjQueryObject = this;\n}","mouseout.directoryItem":"function (e, regionOrObject, mapsvg){\n // var itemjQueryObject = this;\n}","shown.popover":"function (mapsvg){\n // var popoverjQueryObject = this;\n}","closed.popover":"function (mapsvg){\n // var popoverjQueryObject = this;\n}","closed.detailsView":"function (mapsvg){\n // var detailsjQueryObject = this;\n}","shown.detailsView":"function (mapsvg){\n // var detailsjQueryObject = this;\n}"},css:"#mapsvg-map-%id% .mapsvg-tooltip {\n\n}\n#mapsvg-map-%id% .mapsvg-popover {\n\n}\n#mapsvg-map-%id% .mapsvg-details-container {\n\n}\n#mapsvg-map-%id% .mapsvg-directory-item {\n\n}\n#mapsvg-map-%id% .mapsvg-region-label {\n /* background-color: rgba(255,255,255,.6); */\n font-size: 11px;\n padding: 3px 5px;\n border-radius: 4px;\n}\n#mapsvg-map-%id% .mapsvg-marker-label {\n padding: 3px 5px;\n /*\n border-radius: 4px;\n background-color: white;\n margin-top: -4px;\n */\n}\n#mapsvg-map-%id% .mapsvg-filters-wrap {\n\n}\n\n\n\n\n\n\n",templates:{popoverRegion:o.replace(/%templateType%/g,"Popover").replace(/%templateTypeSnake%/g,"popover"),popoverMarker:i.replace(/%templateType%/g,"Popover").replace(/%templateTypeSnake%/g,"popover"),tooltipRegion:"\x3c!-- Region fields are available in this template --\x3e\n{{id}} - {{title}}",tooltipMarker:"\x3c!-- DB Object fields are available in this template --\x3e\n{{title}}",directoryItem:"\x3c!-- If Directory Source = Database: DB Object fields are available in this template --\x3e\n\x3c!-- If Directory Source = Regions: Region fields are available in this template --\x3e\n{{title}}",directoryCategoryItem:'\x3c!-- Available fields: "label", "value", "counter" --\x3e\n{{label}}\n{{counter}}\n',detailsView:i.replace(/%templateType%/g,"Details View").replace(/%templateTypeSnake%/g,"detailsView"),detailsViewRegion:o.replace(/%templateType%/g,"Details View").replace(/%templateTypeSnake%/g,"detailsView"),labelMarker:"\x3c!-- DB Object fields are available in this template --\x3e\n{{title}}",labelRegion:"\x3c!-- Region fields are available in this template --\x3e\n{{title}}",labelLocation:"You are here!"},gauge:{on:!1,labels:{low:"low",high:"high"},colors:{lowRGB:null,highRGB:null,low:"#550000",high:"#ee0000"},min:0,max:0},filters:{on:!0,source:"database",location:"header",modalLocation:"mapContainer",width:"100%",hide:!1,buttonText:"Filters",clearButtonText:"Clear all",clearButton:!1,padding:""},menu:{on:!1,hideOnMobile:!0,location:"leftSidebar",locationMobile:"leftSidebar",search:!1,containerId:"",searchPlaceholder:"Search...",searchFallback:!1,source:"database",showFirst:"map",showMapOnClick:!0,minHeight:"400",sortBy:"id",sortDirection:"desc",categories:{on:!1,groupBy:"",hideEmpty:!0,collapse:!0,collapseOther:!0},clickActions:{region:"default",marker:"default",directoryItem:{triggerClick:!0,showPopover:!1,showDetails:!0}},detailsViewLocation:"overDirectory",noResultsText:"No results found",filterout:{field:"",cond:"=",val:""}},database:{pagination:{on:!0,perpage:30,next:"Next",prev:"Prev.",showIn:"directory"},loadOnStart:!0,table:""},actions:{map:{afterLoad:{selectRegion:!1}},region:{click:{addIdToUrl:!1,showDetails:!0,showDetailsFor:"region",filterDirectory:!1,loadObjects:!1,showPopover:!1,showPopoverFor:"region",goToLink:!1,linkField:"Region.link"},touch:{showPopover:!1}},marker:{click:{showDetails:!0,showPopover:!1,goToLink:!1,linkField:"Object.link"},touch:{showPopover:!1}},directoryItem:{click:{showDetails:!0,showPopover:!1,goToLink:!1,selectRegion:!0,fireRegionOnClick:!0,linkField:"Object.link"},hover:{centerOnMarker:!1}}},detailsView:{location:"mapContainer",containerId:"",width:"100%",mobileFullscreen:!0},mobileView:{labelMap:"Map",labelList:"List",labelClose:"Close"},googleMaps:{on:!1,apiKey:"",loaded:!1,center:"auto",type:"roadmap",minZoom:1,style:"default",styleJSON:[]},groups:[],floors:[],layersControl:{on:!1,position:"top-left",label:"Show on map",expanded:!0,maxHeight:"100%"},floorsControl:{on:!1,position:"top-left",label:"Floors",expanded:!1,maxHeight:"100%"},containers:{leftSidebar:{on:!1,width:"250px"},rightSidebar:{on:!1,width:"250px"},header:{on:!0,height:"auto"},footer:{on:!1,height:"auto"}},labelsMarkers:{on:!1},labelsRegions:{on:!1},svgFileVersion:1,fitMarkers:!1,fitMarkersOnStart:!1,controls:{location:"right",zoom:!0,zoomReset:!1,userLocation:!1}},this.markerOptions={src:MapSVG.urls.root+"markers/pin1_red.png"},this.init(t,$("#"+e))},MapSVG.Map.prototype={setMarkersClickAsLink:function(){var t=this;this.database.loadSchema().done(function(e){e&&e.forEach(function(e){"marker"==e.type&&(t.markerIsLink=MapSVG.parseBoolean(e.isLink),t.markerUrlField=e.urlField)})})},setGroups:function(){var o=this;o.groups=o.options.groups,o.groups.forEach(function(t){t.objects&&t.objects.length&&t.objects.forEach(function(e){o.$svg.find("#"+e.value).toggle(t.visible)})})},setLayersControl:function(e){var o=this;e&&$.extend(!0,o.options.layersControl,e),o.options.layersControl.on?(o.$layersControl||(o.$layersControl=$(''),o.$layersControlLabel=$('').appendTo(o.$layersControl),o.$layersControlListWrap=$('').appendTo(o.$layersControl),o.$layersControlListNano=$('').appendTo(o.$layersControlListWrap),o.$layersControlList=$('').appendTo(o.$layersControlListNano),o.$layersControl.appendTo(o.$mapContainer)),o.$layersControl.show(),o.$layersControlLabel.html(o.options.layersControl.label),o.$layersControlList.empty(),o.$layersControl.removeClass("mapsvg-top-left mapsvg-top-right mapsvg-bottom-left mapsvg-bottom-right"),o.$layersControl.addClass("mapsvg-"+o.options.layersControl.position),o.options.menu.on&&!o.options.menu.customContainer&&-1!==o.options.layersControl.position.indexOf("left")&&o.$layersControl.css("left",o.options.menu.width),o.$layersControl.css({"max-height":o.options.layersControl.maxHeight}),o.options.groups.forEach(function(e){$('