-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.js
9 lines (9 loc) · 259 KB
/
build.js
1
2
3
4
5
6
7
8
9
var w;L.TileLayer.LMUMaps=L.TileLayer.extend({options:{continuousWorld:!0,tolerance:.8},initialize:function(e,t){t=L.setOptions(this,t),this._url=e,w=t.w;L.point(t.width,t.height),t.tileSize;this._gridSize=[L.point(Math.ceil(.125*t.width/256),Math.ceil(.125*t.height/256)),L.point(Math.ceil(.25*t.width/256),Math.ceil(.25*t.height/256)),L.point(Math.ceil(.5*t.width/256),Math.ceil(.5*t.height/256)),L.point(Math.ceil(t.width/256),Math.ceil(t.height/256))],this._imageSize=[L.point(parseInt(.125*t.width),parseInt(.125*t.height)),L.point(parseInt(.25*t.width),parseInt(.25*t.height)),L.point(parseInt(.5*t.width),parseInt(.5*t.height)),L.point(parseInt(t.width),parseInt(t.height))],this.options.maxZoom=this._gridSize.length-1},onAdd:function(e){L.TileLayer.prototype.onAdd.call(this,e);var t=e.getSize(),n=this._getBestFitZoom(t),r=this._imageSize[n],i=e.options.crs.pointToLatLng(L.point(r.x/2,r.y/2),n);e.setView(i,n,!0)},_getGridSize:function(e){var t=this.options.tileSize;return L.point(Math.ceil(e.x/t),Math.ceil(e.y/t))},_getBestFitZoom:function(e){for(var t,n,r=this.options.tolerance,n=this._imageSize.length-1;n;){if(t=this._imageSize[n],t.x*r<e.x&&t.y*r<e.y)return n;n--}return n},_tileShouldBeLoaded:function(e){var t=this._gridSize[this._map.getZoom()];return e.x>=0&&e.x<t.x&&e.y>=0&&e.y<t.y},_addTile:function(e,t){var n=this._getTilePos(e),r=this._getTile(),i=this._map.getZoom(),a=this._imageSize[i],o=this._gridSize[i],s=this.options.tileSize,l=parseInt(a.x/256),u=parseInt(a.y/256);e.x>=l&&(r.style.width=a.x-s*(o.x-1)+"px"),e.y>=u&&(r.style.height=a.y-s*(o.y-1)+"px"),L.DomUtil.setPosition(r,n,L.Browser.chrome||L.Browser.android23),this._tiles[e.x+":"+e.y]=r,this._loadTile(r,e),r.parentNode!==this._tileContainer&&t.appendChild(r)},getTileUrl:function(e){return 0==this._map.getZoom()?this._url+"125/"+e.x+"/"+e.y+".png":1==this._map.getZoom()?this._url+"250/"+e.x+"/"+e.y+".png":2==this._map.getZoom()?this._url+"500/"+e.x+"/"+e.y+".png":3==this._map.getZoom()?this._url+"1000/"+e.x+"/"+e.y+".png":"error"},_getTileGroup:function(e){var t,n=this._map.getZoom(),r=0;for(z=0;z<n;z++)t=this._gridSize[z],r+=t.x*t.y;return r+=e.y*this._gridSize[n].x+e.x,Math.floor(r/256)},setUrl:function(e,t){return this._url=e,t||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this}}),L.tileLayer.lmuMaps=function(e,t){return new L.TileLayer.LMUMaps(e,t)},function(angular){"use strict";!function(angular){angular.module("leaflet-directive",[]).directive("leaflet",["$q","leafletData","leafletMapDefaults","leafletHelpers","leafletMapEvents",function(e,t,n,r,i){return{restrict:"EA",replace:!0,scope:{center:"=",lfCenter:"=",defaults:"=",maxbounds:"=",bounds:"=",markers:"=",legend:"=",geojson:"=",paths:"=",tiles:"=",layers:"=",controls:"=",decorations:"=",eventBroadcast:"=",markersWatchOptions:"=",geojsonWatchOptions:"="},transclude:!0,template:'<div class="angular-leaflet-map"><div ng-transclude></div></div>',controller:["$scope",function(t){this._leafletMap=e.defer(),this.getMap=function(){return this._leafletMap.promise},this.getLeafletScope=function(){return t}}],link:function(e,a,o,s){function l(){isNaN(o.width)?a.css("width",o.width):a.css("width",o.width+"px")}function u(){isNaN(o.height)?a.css("height",o.height):a.css("height",o.height+"px")}var c=r.isDefined,f=n.setDefaults(e.defaults,o.id),d=i.getAvailableMapEvents(),p=i.addEvents;e.mapId=o.id,t.setDirectiveControls({},o.id),c(o.width)&&(l(),e.$watch(function(){return a[0].getAttribute("width")},function(){l(),h.invalidateSize()})),c(o.height)&&(u(),e.$watch(function(){return a[0].getAttribute("height")},function(){u(),h.invalidateSize()}));var h=new L.Map(a[0],n.getMapCreationDefaults(o.id));if(s._leafletMap.resolve(h),c(o.center)||c(o.lfCenter)||h.setView([f.center.lat,f.center.lng],f.center.zoom),!c(o.tiles)&&!c(o.layers)){var g=L.tileLayer(f.tileLayer,f.tileLayerOptions);g.addTo(h),t.setTiles(g,o.id)}if(c(h.zoomControl)&&c(f.zoomControlPosition)&&h.zoomControl.setPosition(f.zoomControlPosition),c(h.zoomControl)&&!1===f.zoomControl&&h.zoomControl.removeFrom(h),c(h.zoomsliderControl)&&c(f.zoomsliderControl)&&!1===f.zoomsliderControl&&h.zoomsliderControl.removeFrom(h),!c(o.eventBroadcast)){p(h,d,"eventName",e,"broadcast")}h.whenReady(function(){t.setMap(h,o.id)}),e.$on("$destroy",function(){n.reset(),h.remove(),t.unresolveMap(o.id)}),e.$on("invalidateSize",function(){h.invalidateSize()})}}}]),angular.module("leaflet-directive").factory("leafletBoundsHelpers",["$log","leafletHelpers",function(e,t){function n(e){return angular.isDefined(e)&&angular.isDefined(e.southWest)&&angular.isDefined(e.northEast)&&angular.isNumber(e.southWest.lat)&&angular.isNumber(e.southWest.lng)&&angular.isNumber(e.northEast.lat)&&angular.isNumber(e.northEast.lng)}var r=t.isArray,i=t.isNumber,a=t.isFunction,o=t.isDefined;return{createLeafletBounds:function(e){return n(e)?L.latLngBounds([e.southWest.lat,e.southWest.lng],[e.northEast.lat,e.northEast.lng]):void 0},isValidBounds:n,createBoundsFromArray:function(t){return r(t)&&2===t.length&&r(t[0])&&r(t[1])&&2===t[0].length&&2===t[1].length&&i(t[0][0])&&i(t[0][1])&&i(t[1][0])&&i(t[1][1])?{northEast:{lat:t[0][0],lng:t[0][1]},southWest:{lat:t[1][0],lng:t[1][1]}}:void e.error("[AngularJS - Leaflet] The bounds array is not valid.")},createBoundsFromLeaflet:function(t){if(!(o(t)&&a(t.getNorthEast)&&a(t.getSouthWest)))return void e.error("[AngularJS - Leaflet] The leaflet bounds is not valid object.");var n=t.getNorthEast(),r=t.getSouthWest();return{northEast:{lat:n.lat,lng:n.lng},southWest:{lat:r.lat,lng:r.lng}}}}}]),angular.module("leaflet-directive").factory("leafletControlHelpers",["$rootScope","$log","leafletHelpers","leafletLayerHelpers","leafletMapDefaults",function(e,t,n,r,i){var a=n.isDefined,o=n.isObject,s=r.createLayer,l={},u=n.errorHeader+" [Controls] ",c=function(e,t,n){if(!i.getDefaults(n).controls.layers.visible)return!1;var r=!1;return o(e)&&Object.keys(e).forEach(function(t){var n=e[t];a(n.layerOptions)&&!1===n.layerOptions.showOnSelector||(r=!0)}),o(t)&&Object.keys(t).forEach(function(e){var n=t[e];a(n.layerParams)&&!1===n.layerParams.showOnSelector||(r=!0)}),r},f=function(e){var t=i.getDefaults(e),n={collapsed:t.controls.layers.collapsed,position:t.controls.layers.position,autoZIndex:!1};angular.extend(n,t.controls.layers.options);return t.controls.layers&&a(t.controls.layers.control)?t.controls.layers.control.apply(this,[[],[],n]):new L.control.layers([],[],n)},d={draw:{isPluginLoaded:function(){return!!angular.isDefined(L.Control.Draw)||(t.error(u+" Draw plugin is not loaded."),!1)},checkValidParams:function(){return!0},createControl:function(e){return new L.Control.Draw(e)}},scale:{isPluginLoaded:function(){return!0},checkValidParams:function(){return!0},createControl:function(e){return new L.control.scale(e)}},fullscreen:{isPluginLoaded:function(){return!!angular.isDefined(L.Control.Fullscreen)||(t.error(u+" Fullscreen plugin is not loaded."),!1)},checkValidParams:function(){return!0},createControl:function(e){return new L.Control.Fullscreen(e)}},search:{isPluginLoaded:function(){return!!angular.isDefined(L.Control.Search)||(t.error(u+" Search plugin is not loaded."),!1)},checkValidParams:function(){return!0},createControl:function(e){return new L.Control.Search(e)}},custom:{},minimap:{isPluginLoaded:function(){return!!angular.isDefined(L.Control.MiniMap)||(t.error(u+" Minimap plugin is not loaded."),!1)},checkValidParams:function(e){return!!a(e.layer)||(t.warn(u+' minimap "layer" option should be defined.'),!1)},createControl:function(e){var n=s(e.layer);return a(n)?new L.Control.MiniMap(n,e):void t.warn(u+' minimap control "layer" could not be created.')}}};return{layersControlMustBeVisible:c,isValidControlType:function(e){return-1!==Object.keys(d).indexOf(e)},createControl:function(e,t){return d[e].checkValidParams(t)?d[e].createControl(t):void 0},updateLayersControl:function(e,t,n,r,i,o){var s,u=l[t],d=c(r,i,t);if(a(u)&&n){for(s in o.baselayers)u.removeLayer(o.baselayers[s]);for(s in o.overlays)u.removeLayer(o.overlays[s]);e.removeControl(u),delete l[t]}if(d){u=f(t),l[t]=u;for(s in r){!(a(r[s].layerOptions)&&!1===r[s].layerOptions.showOnSelector)&&a(o.baselayers[s])&&u.addBaseLayer(o.baselayers[s],r[s].name)}for(s in i){!(a(i[s].layerParams)&&!1===i[s].layerParams.showOnSelector)&&a(o.overlays[s])&&u.addOverlay(o.overlays[s],i[s].name)}e.addControl(u)}return d}}}]),angular.module("leaflet-directive").service("leafletData",["$log","$q","leafletHelpers",function(e,t,n){var r=n.getDefer,i=n.getUnresolvedDefer,a=n.setResolvedDefer,o={},s=this,l=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},u=["map","tiles","layers","paths","markers","geoJSON","UTFGrid","decorations","directiveControls"];u.forEach(function(e){o[e]={}}),this.unresolveMap=function(e){var t=n.obtainEffectiveMapId(o.map,e);u.forEach(function(e){o[e][t]=void 0})},u.forEach(function(e){var t=l(e);s["set"+t]=function(t,n){i(o[e],n).resolve(t),a(o[e],n)},s["get"+t]=function(t){return r(o[e],t).promise}})}]),angular.module("leaflet-directive").service("leafletDirectiveControlsHelpers",["$log","leafletData","leafletHelpers",function(e,t,n){var r=n.isDefined,i=n.isString,a=n.isObject,o=n.errorHeader,s=o+"[leafletDirectiveControlsHelpers";return{extend:function(n,o,l,u){var c=s+".extend] ",f={};if(!r(o))return void e.error(c+"thingToAddName cannot be undefined");if(i(o)&&r(l)&&r(u))f[o]={create:l,clean:u};else{if(!a(o)||r(l)||r(u))return void e.error(c+"incorrect arguments");f=o}t.getDirectiveControls().then(function(e){angular.extend(e,f),t.setDirectiveControls(e,n)})}}}]),angular.module("leaflet-directive").service("leafletGeoJsonHelpers",["leafletHelpers","leafletIterators",function(e,t){var n=e,r=t,i=function(e,t){return this.lat=e,this.lng=t,this},a=function(e){return Array.isArray(e)&&2===e.length?e[1]:n.isDefined(e.type)&&"Point"===e.type?+e.coordinates[1]:+e.lat},o=function(e){return Array.isArray(e)&&2===e.length?e[0]:n.isDefined(e.type)&&"Point"===e.type?+e.coordinates[0]:+e.lng},s=function(e){if(n.isUndefined(e))return!1;if(n.isArray(e)){if(2===e.length&&n.isNumber(e[0])&&n.isNumber(e[1]))return!0}else if(n.isDefined(e.type)&&"Point"===e.type&&n.isArray(e.coordinates)&&2===e.coordinates.length&&n.isNumber(e.coordinates[0])&&n.isNumber(e.coordinates[1]))return!0;return r.all(["lat","lng"],function(t){return n.isDefined(e[t])&&n.isNumber(e[t])})};return{getLat:a,getLng:o,validateCoords:s,getCoords:function(e){if(e&&s(e)){var t=null;if(Array.isArray(e)&&2===e.length)t=new i(e[1],e[0]);else{if(!n.isDefined(e.type)||"Point"!==e.type)return e;t=new i(e.coordinates[1],e.coordinates[0])}return angular.extend(e,t)}}}}]),angular.module("leaflet-directive").service("leafletHelpers",["$q","$log",function(e,t){function n(e,n){var r,a;if(angular.isDefined(n))r=n;else if(0===Object.keys(e).length)r="main";else if(Object.keys(e).length>=1)for(a in e)e.hasOwnProperty(a)&&(r=a);else t.error(i+"- You have more than 1 map on the DOM, you must provide the map ID to the leafletData.getXXX call");return r}function r(t,r){var i,a=n(t,r);return angular.isDefined(t[a])&&!0!==t[a].resolvedDefer?i=t[a].defer:(i=e.defer(),t[a]={defer:i,resolvedDefer:!1}),i}var i="[AngularJS - Leaflet] ",a=angular.copy,o=a,s=function(e,t){var n;if(e&&angular.isObject(e))return null!==t&&angular.isString(t)?(n=e,t.split(".").forEach(function(e){n&&(n=n[e])}),n):t},l=function(e){return e.split(".").reduce(function(e,t){return e+'["'+t+'"]'})},u=function(e){return e.reduce(function(e,t){return e+"."+t})},c=function(e){return angular.isDefined(e)&&null!==e},f=function(e){return!c(e)},d=/([\:\-\_]+(.))/g,p=/^moz([A-Z])/,h=/^((?:x|data)[\:\-_])/i,g=function(e){return e.replace(d,function(e,t,n,r){return r?n.toUpperCase():n}).replace(p,"Moz$1")};return{camelCase:g,directiveNormalize:function(e){return g(e.replace(h,""))},copy:a,clone:o,errorHeader:i,getObjectValue:s,getObjectArrayPath:l,getObjectDotPath:u,defaultTo:function(e,t){return c(e)?e:t},isTruthy:function(e){return"true"===e||!0===e},isEmpty:function(e){return 0===Object.keys(e).length},isUndefinedOrEmpty:function(e){return angular.isUndefined(e)||null===e||0===Object.keys(e).length},isDefined:c,isUndefined:f,isNumber:angular.isNumber,isString:angular.isString,isArray:angular.isArray,isObject:angular.isObject,isFunction:angular.isFunction,equals:angular.equals,isValidCenter:function(e){return angular.isDefined(e)&&angular.isNumber(e.lat)&&angular.isNumber(e.lng)&&angular.isNumber(e.zoom)},isValidPoint:function(e){return!!angular.isDefined(e)&&(angular.isArray(e)?2===e.length&&angular.isNumber(e[0])&&angular.isNumber(e[1]):angular.isNumber(e.lat)&&angular.isNumber(e.lng))},isSameCenterOnMap:function(e,t){var n=t.getCenter(),r=t.getZoom();return!(!e.lat||!e.lng||n.lat.toFixed(4)!==e.lat.toFixed(4)||n.lng.toFixed(4)!==e.lng.toFixed(4)||r!==e.zoom)},safeApply:function(e,t){var n=e.$root.$$phase;"$apply"===n||"$digest"===n?e.$eval(t):e.$evalAsync(t)},obtainEffectiveMapId:n,getDefer:function(e,t){var i=n(e,t);return angular.isDefined(e[i])&&!1!==e[i].resolvedDefer?e[i].defer:r(e,t)},getUnresolvedDefer:r,setResolvedDefer:function(e,t){e[n(e,t)].resolvedDefer=!0},rangeIsSupported:function(){var e=document.createElement("input");return e.setAttribute("type","range"),"range"===e.type},FullScreenControlPlugin:{isLoaded:function(){return angular.isDefined(L.Control.Fullscreen)}},MiniMapControlPlugin:{isLoaded:function(){return angular.isDefined(L.Control.MiniMap)}},AwesomeMarkersPlugin:{isLoaded:function(){return angular.isDefined(L.AwesomeMarkers)&&angular.isDefined(L.AwesomeMarkers.Icon)},is:function(e){return!!this.isLoaded()&&e instanceof L.AwesomeMarkers.Icon},equal:function(e,t){return!(!this.isLoaded()||!this.is(e))&&angular.equals(e,t)}},VectorMarkersPlugin:{isLoaded:function(){return angular.isDefined(L.VectorMarkers)&&angular.isDefined(L.VectorMarkers.Icon)},is:function(e){return!!this.isLoaded()&&e instanceof L.VectorMarkers.Icon},equal:function(e,t){return!(!this.isLoaded()||!this.is(e))&&angular.equals(e,t)}},DomMarkersPlugin:{isLoaded:function(){return!(!angular.isDefined(L.DomMarkers)||!angular.isDefined(L.DomMarkers.Icon))},is:function(e){return!!this.isLoaded()&&e instanceof L.DomMarkers.Icon},equal:function(e,t){return!(!this.isLoaded()||!this.is(e))&&angular.equals(e,t)}},PolylineDecoratorPlugin:{isLoaded:function(){return!!angular.isDefined(L.PolylineDecorator)},is:function(e){return!!this.isLoaded()&&e instanceof L.PolylineDecorator},equal:function(e,t){return!(!this.isLoaded()||!this.is(e))&&angular.equals(e,t)}},MakiMarkersPlugin:{isLoaded:function(){return!(!angular.isDefined(L.MakiMarkers)||!angular.isDefined(L.MakiMarkers.Icon))},is:function(e){return!!this.isLoaded()&&e instanceof L.MakiMarkers.Icon},equal:function(e,t){return!(!this.isLoaded()||!this.is(e))&&angular.equals(e,t)}},ExtraMarkersPlugin:{isLoaded:function(){return!(!angular.isDefined(L.ExtraMarkers)||!angular.isDefined(L.ExtraMarkers.Icon))},is:function(e){return!!this.isLoaded()&&e instanceof L.ExtraMarkers.Icon},equal:function(e,t){return!(!this.isLoaded()||!this.is(e))&&angular.equals(e,t)}},LabelPlugin:{isLoaded:function(){return angular.isDefined(L.Label)},is:function(e){return!!this.isLoaded()&&e instanceof L.MarkerClusterGroup}},MarkerClusterPlugin:{isLoaded:function(){return angular.isDefined(L.MarkerClusterGroup)},is:function(e){return!!this.isLoaded()&&e instanceof L.MarkerClusterGroup}},GoogleLayerPlugin:{isLoaded:function(){return angular.isDefined(L.Google)},is:function(e){return!!this.isLoaded()&&e instanceof L.Google}},LeafletProviderPlugin:{isLoaded:function(){return angular.isDefined(L.TileLayer.Provider)},is:function(e){return!!this.isLoaded()&&e instanceof L.TileLayer.Provider}},ChinaLayerPlugin:{isLoaded:function(){return angular.isDefined(L.tileLayer.chinaProvider)}},HeatLayerPlugin:{isLoaded:function(){return angular.isDefined(L.heatLayer)}},WebGLHeatMapLayerPlugin:{isLoaded:function(){return angular.isDefined(L.TileLayer.WebGLHeatMap)}},BingLayerPlugin:{isLoaded:function(){return angular.isDefined(L.BingLayer)},is:function(e){return!!this.isLoaded()&&e instanceof L.BingLayer}},WFSLayerPlugin:{isLoaded:function(){return void 0!==L.GeoJSON.WFS},is:function(e){return!!this.isLoaded()&&e instanceof L.GeoJSON.WFS}},AGSBaseLayerPlugin:{isLoaded:function(){return void 0!==L.esri&&void 0!==L.esri.basemapLayer},is:function(e){return!!this.isLoaded()&&e instanceof L.esri.basemapLayer}},AGSLayerPlugin:{isLoaded:function(){return void 0!==lvector&&void 0!==lvector.AGS},is:function(e){return!!this.isLoaded()&&e instanceof lvector.AGS}},AGSFeatureLayerPlugin:{isLoaded:function(){return void 0!==L.esri&&void 0!==L.esri.featureLayer},is:function(e){return!!this.isLoaded()&&e instanceof L.esri.featureLayer}},AGSTiledMapLayerPlugin:{isLoaded:function(){return void 0!==L.esri&&void 0!==L.esri.tiledMapLayer},is:function(e){return!!this.isLoaded()&&e instanceof L.esri.tiledMapLayer}},AGSDynamicMapLayerPlugin:{isLoaded:function(){return void 0!==L.esri&&void 0!==L.esri.dynamicMapLayer},is:function(e){return!!this.isLoaded()&&e instanceof L.esri.dynamicMapLayer}},AGSImageMapLayerPlugin:{isLoaded:function(){return void 0!==L.esri&&void 0!==L.esri.imageMapLayer},is:function(e){return!!this.isLoaded()&&e instanceof L.esri.imageMapLayer}},AGSClusteredLayerPlugin:{isLoaded:function(){return void 0!==L.esri&&void 0!==L.esri.clusteredFeatureLayer},is:function(e){return!!this.isLoaded()&&e instanceof L.esri.clusteredFeatureLayer}},AGSHeatmapLayerPlugin:{isLoaded:function(){return void 0!==L.esri&&void 0!==L.esri.heatmapFeatureLayer},is:function(e){return!!this.isLoaded()&&e instanceof L.esri.heatmapFeatureLayer}},YandexLayerPlugin:{isLoaded:function(){return angular.isDefined(L.Yandex)},is:function(e){return!!this.isLoaded()&&e instanceof L.Yandex}},GeoJSONPlugin:{isLoaded:function(){return angular.isDefined(L.TileLayer.GeoJSON)},is:function(e){return!!this.isLoaded()&&e instanceof L.TileLayer.GeoJSON}},UTFGridPlugin:{isLoaded:function(){return angular.isDefined(L.UtfGrid)},is:function(e){return this.isLoaded()?e instanceof L.UtfGrid:(t.error("[AngularJS - Leaflet] No UtfGrid plugin found."),!1)}},CartoDB:{isLoaded:function(){return cartodb},is:function(){return!0}},Leaflet:{DivIcon:{is:function(e){return e instanceof L.DivIcon},equal:function(e,t){return!!this.is(e)&&angular.equals(e,t)}},Icon:{is:function(e){return e instanceof L.Icon},equal:function(e,t){return!!this.is(e)&&angular.equals(e,t)}}},watchOptions:{doWatch:!0,isDeep:!0,individual:{doWatch:!0,isDeep:!0}}}}]),angular.module("leaflet-directive").service("leafletIterators",["$log","leafletHelpers",function(e,t){var n,r=t,i=t.errorHeader+"leafletIterators: ",a=Object.keys,o=r.isFunction,s=r.isObject,l=Math.pow(2,53)-1,u=function(e){var t=null!==e&&e.length;return r.isNumber(t)&&t>=0&&l>=t},c=function(e){return e},f=function(e){return function(t){return null===t?void 0:t[e]}},d=function(e,t,n){if(void 0===t)return e;switch(null===n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,a){return e.call(t,n,r,i,a)}}return function(){return e.apply(t,arguments)}};n=function(e,t){return function(n){var r=arguments.length;if(2>r||null===n)return n;for(var i=1;r>i;i++)for(var a=arguments[i],o=e(a),s=o.length,l=0;s>l;l++){var u=o[l];t&&void 0!==n[u]||(n[u]=a[u])}return n}}(a);var p,h=function(e,t){var n=a(t),r=n.length;if(null===e)return!r;for(var i=Object(e),o=0;r>o;o++){var s=n[o];if(t[s]!==i[s]||!(s in i))return!1}return!0};p=function(e){return e=n({},e),function(t){return h(t,e)}};var g,v=function(e,t,n){return null===e?c:o(e)?d(e,t,n):s(e)?p(e):f(e)},m=null;g=m=function(e,t,n){t=v(t,n);for(var r=!u(e)&&a(e),i=(r||e).length,o=0;i>o;o++){var s=r?r[o]:o;if(!t(e[s],s,e))return!1}return!0};var $=function(t,n,a,o){return!(a||r.isDefined(t)&&r.isDefined(n))||!r.isFunction(n)&&(o=r.defaultTo(n,"cb"),e.error(i+o+" is not a function"),!0)},y=function(e,t,n){if(!$(void 0,n,!0,"internalCb")&&!$(e,t))for(var r in e)e.hasOwnProperty(r)&&n(e[r],r)},b=function(e,t){y(e,t,function(e,n){t(e,n)})};return{each:b,forEach:b,every:g,all:m}}]),angular.module("leaflet-directive").factory("leafletLayerHelpers",["$rootScope","$log","$q","leafletHelpers","leafletIterators",function($rootScope,$log,$q,leafletHelpers,leafletIterators){function isValidLayerType(e){return isString(e.type)?-1===Object.keys(layerTypes).indexOf(e.type)?($log.error("[AngularJS - Leaflet] A layer must have a valid type: "+Object.keys(layerTypes)),!1):layerTypes[e.type].mustHaveUrl&&!isString(e.url)?($log.error("[AngularJS - Leaflet] A base layer must have an url"),!1):layerTypes[e.type].mustHaveData&&!isDefined(e.data)?($log.error('[AngularJS - Leaflet] The base layer must have a "data" array attribute'),!1):layerTypes[e.type].mustHaveLayer&&!isDefined(e.layer)?($log.error("[AngularJS - Leaflet] The type of layer "+e.type+" must have an layer defined"),!1):layerTypes[e.type].mustHaveBounds&&!isDefined(e.bounds)?($log.error("[AngularJS - Leaflet] The type of layer "+e.type+" must have bounds defined"),!1):!(layerTypes[e.type].mustHaveKey&&!isDefined(e.key))||($log.error("[AngularJS - Leaflet] The type of layer "+e.type+" must have key defined"),!1):($log.error("[AngularJS - Leaflet] A layer must have a valid type defined."),!1)}function createLayer(e){if(isValidLayerType(e)){if(!isString(e.name))return void $log.error("[AngularJS - Leaflet] A base layer must have a name");isObject(e.layerParams)||(e.layerParams={}),isObject(e.layerOptions)||(e.layerOptions={});for(var t in e.layerParams)e.layerOptions[t]=e.layerParams[t];var n={url:e.url,data:e.data,options:e.layerOptions,layer:e.layer,icon:e.icon,type:e.layerType,bounds:e.bounds,key:e.key,apiKey:e.apiKey,pluginOptions:e.pluginOptions,user:e.user};return layerTypes[e.type].createLayer(n)}}function safeAddLayer(e,t){t&&"function"==typeof t.addTo?t.addTo(e):e.addLayer(t)}function safeRemoveLayer(e,t,n){if(isDefined(n)&&isDefined(n.loadedDefer))if(angular.isFunction(n.loadedDefer)){var r=n.loadedDefer();$log.debug("Loaded Deferred",r);var i=r.length;if(i>0)for(var a=function(){0===--i&&e.removeLayer(t)},o=0;o<r.length;o++)r[o].promise.then(a);else e.removeLayer(t)}else n.loadedDefer.promise.then(function(){e.removeLayer(t)});else e.removeLayer(t)}var Helpers=leafletHelpers,isString=leafletHelpers.isString,isObject=leafletHelpers.isObject,isArray=leafletHelpers.isArray,isDefined=leafletHelpers.isDefined,errorHeader=leafletHelpers.errorHeader,$it=leafletIterators,utfGridCreateLayer=function(e){if(!Helpers.UTFGridPlugin.isLoaded())return void $log.error("[AngularJS - Leaflet] The UTFGrid plugin is not loaded.");var t=new L.UtfGrid(e.url,e.pluginOptions);return t.on("mouseover",function(e){$rootScope.$broadcast("leafletDirectiveMap.utfgridMouseover",e)}),t.on("mouseout",function(e){$rootScope.$broadcast("leafletDirectiveMap.utfgridMouseout",e)}),t.on("click",function(e){$rootScope.$broadcast("leafletDirectiveMap.utfgridClick",e)}),t.on("mousemove",function(e){$rootScope.$broadcast("leafletDirectiveMap.utfgridMousemove",e)}),t},layerTypes={xyz:{mustHaveUrl:!0,createLayer:function(e){return L.tileLayer(e.url,e.options)}},mapbox:{mustHaveKey:!0,createLayer:function(e){var t=3;isDefined(e.options.version)&&4===e.options.version&&(t=e.options.version);var n=3===t?"//{s}.tiles.mapbox.com/v3/"+e.key+"/{z}/{x}/{y}.png":"//api.tiles.mapbox.com/v4/"+e.key+"/{z}/{x}/{y}.png?access_token="+e.apiKey;return L.tileLayer(n,e.options)}},geoJSON:{mustHaveUrl:!0,createLayer:function(e){return Helpers.GeoJSONPlugin.isLoaded()?new L.TileLayer.GeoJSON(e.url,e.pluginOptions,e.options):void 0}},geoJSONShape:{mustHaveUrl:!1,createLayer:function(e){return new L.GeoJSON(e.data,e.options)}},geoJSONAwesomeMarker:{mustHaveUrl:!1,createLayer:function(e){return new L.geoJson(e.data,{pointToLayer:function(t,n){return L.marker(n,{icon:L.AwesomeMarkers.icon(e.icon)})}})}},geoJSONVectorMarker:{mustHaveUrl:!1,createLayer:function(e){return new L.geoJson(e.data,{pointToLayer:function(t,n){return L.marker(n,{icon:L.VectorMarkers.icon(e.icon)})}})}},utfGrid:{mustHaveUrl:!0,createLayer:utfGridCreateLayer},cartodbTiles:{mustHaveKey:!0,createLayer:function(e){var t="//"+e.user+".cartodb.com/api/v1/map/"+e.key+"/{z}/{x}/{y}.png";return L.tileLayer(t,e.options)}},cartodbUTFGrid:{mustHaveKey:!0,mustHaveLayer:!0,createLayer:function(e){return e.url="//"+e.user+".cartodb.com/api/v1/map/"+e.key+"/"+e.layer+"/{z}/{x}/{y}.grid.json",utfGridCreateLayer(e)}},cartodbInteractive:{mustHaveKey:!0,mustHaveLayer:!0,createLayer:function(e){var t="//"+e.user+".cartodb.com/api/v1/map/"+e.key+"/{z}/{x}/{y}.png",n=L.tileLayer(t,e.options);e.url="//"+e.user+".cartodb.com/api/v1/map/"+e.key+"/"+e.layer+"/{z}/{x}/{y}.grid.json";var r=utfGridCreateLayer(e);return L.layerGroup([n,r])}},wms:{mustHaveUrl:!0,createLayer:function(e){return L.tileLayer.wms(e.url,e.options)}},wmts:{mustHaveUrl:!0,createLayer:function(e){return L.tileLayer.wmts(e.url,e.options)}},wfs:{mustHaveUrl:!0,mustHaveLayer:!0,createLayer:function(params){if(Helpers.WFSLayerPlugin.isLoaded()){var options=angular.copy(params.options);return options.crs&&"string"==typeof options.crs&&(options.crs=eval(options.crs)),new L.GeoJSON.WFS(params.url,params.layer,options)}}},group:{mustHaveUrl:!1,createLayer:function(e){var t=[];return $it.each(e.options.layers,function(e){t.push(createLayer(e))}),e.options.loadedDefer=function(){var t=[];if(isDefined(e.options.layers))for(var n=0;n<e.options.layers.length;n++){var r=e.options.layers[n].layerOptions.loadedDefer;isDefined(r)&&t.push(r)}return t},L.layerGroup(t)}},featureGroup:{mustHaveUrl:!1,createLayer:function(){return L.featureGroup()}},google:{mustHaveUrl:!1,createLayer:function(e){var t=e.type||"SATELLITE";if(Helpers.GoogleLayerPlugin.isLoaded())return new L.Google(t,e.options)}},here:{mustHaveUrl:!1,createLayer:function(e){var t=e.provider||"HERE.terrainDay";if(Helpers.LeafletProviderPlugin.isLoaded())return new L.TileLayer.Provider(t,e.options)}},china:{mustHaveUrl:!1,createLayer:function(e){var t=e.type||"";if(Helpers.ChinaLayerPlugin.isLoaded())return L.tileLayer.chinaProvider(t,e.options)}},agsBase:{mustHaveLayer:!0,createLayer:function(e){return Helpers.AGSBaseLayerPlugin.isLoaded()?L.esri.basemapLayer(e.layer,e.options):void 0}},ags:{mustHaveUrl:!0,createLayer:function(e){if(Helpers.AGSLayerPlugin.isLoaded()){var t=angular.copy(e.options);angular.extend(t,{url:e.url});var n=new lvector.AGS(t);return n.onAdd=function(e){this.setMap(e)},n.onRemove=function(){this.setMap(null)},n}}},agsFeature:{mustHaveUrl:!0,createLayer:function(e){if(!Helpers.AGSFeatureLayerPlugin.isLoaded())return void $log.warn(errorHeader+" The esri plugin is not loaded.");e.options.url=e.url;var t=L.esri.featureLayer(e.options),n=function(){isDefined(e.options.loadedDefer)&&e.options.loadedDefer.resolve()};return t.on("loading",function(){e.options.loadedDefer=$q.defer(),t.off("load",n),t.on("load",n)}),t}},agsTiled:{mustHaveUrl:!0,createLayer:function(e){return Helpers.AGSTiledMapLayerPlugin.isLoaded()?(e.options.url=e.url,L.esri.tiledMapLayer(e.options)):void $log.warn(errorHeader+" The esri plugin is not loaded.")}},agsDynamic:{mustHaveUrl:!0,createLayer:function(e){return Helpers.AGSDynamicMapLayerPlugin.isLoaded()?(e.options.url=e.url,L.esri.dynamicMapLayer(e.options)):void $log.warn(errorHeader+" The esri plugin is not loaded.")}},agsImage:{mustHaveUrl:!0,createLayer:function(e){return Helpers.AGSImageMapLayerPlugin.isLoaded()?(e.options.url=e.url,L.esri.imageMapLayer(e.options)):void $log.warn(errorHeader+" The esri plugin is not loaded.")}},agsClustered:{mustHaveUrl:!0,createLayer:function(e){return Helpers.AGSClusteredLayerPlugin.isLoaded()?Helpers.MarkerClusterPlugin.isLoaded()?L.esri.clusteredFeatureLayer(e.url,e.options):void $log.warn(errorHeader+" The markercluster plugin is not loaded."):void $log.warn(errorHeader+" The esri clustered layer plugin is not loaded.")}},agsHeatmap:{mustHaveUrl:!0,createLayer:function(e){return Helpers.AGSHeatmapLayerPlugin.isLoaded()?Helpers.HeatLayerPlugin.isLoaded()?L.esri.heatmapFeatureLayer(e.url,e.options):void $log.warn(errorHeader+" The heatlayer plugin is not loaded."):void $log.warn(errorHeader+" The esri heatmap layer plugin is not loaded.")}},markercluster:{mustHaveUrl:!1,createLayer:function(e){return Helpers.MarkerClusterPlugin.isLoaded()?new L.MarkerClusterGroup(e.options):void $log.warn(errorHeader+" The markercluster plugin is not loaded.")}},bing:{mustHaveUrl:!1,createLayer:function(e){return Helpers.BingLayerPlugin.isLoaded()?new L.BingLayer(e.key,e.options):void 0}},webGLHeatmap:{mustHaveUrl:!1,mustHaveData:!0,createLayer:function(e){if(Helpers.WebGLHeatMapLayerPlugin.isLoaded()){var t=new L.TileLayer.WebGLHeatMap(e.options);return isDefined(e.data)&&t.setData(e.data),t}}},heat:{mustHaveUrl:!1,mustHaveData:!0,createLayer:function(e){if(Helpers.HeatLayerPlugin.isLoaded()){var t=new L.heatLayer;return isArray(e.data)&&t.setLatLngs(e.data),isObject(e.options)&&t.setOptions(e.options),t}}},yandex:{mustHaveUrl:!1,createLayer:function(e){var t=e.type||"map";if(Helpers.YandexLayerPlugin.isLoaded())return new L.Yandex(t,e.options)}},imageOverlay:{mustHaveUrl:!0,mustHaveBounds:!0,createLayer:function(e){return L.imageOverlay(e.url,e.bounds,e.options)}},iip:{mustHaveUrl:!0,createLayer:function(e){return L.tileLayer.iip(e.url,e.options)}},custom:{createLayer:function(e){return e.layer instanceof L.Class?angular.copy(e.layer):void $log.error("[AngularJS - Leaflet] A custom layer must be a leaflet Class")}},cartodb:{mustHaveUrl:!0,createLayer:function(e){return cartodb.createLayer(e.map,e.url)}}};return{createLayer:createLayer,safeAddLayer:safeAddLayer,safeRemoveLayer:safeRemoveLayer}}]),angular.module("leaflet-directive").factory("leafletLegendHelpers",function(){var e=function(e,t,n,r){if(e.innerHTML="",t.error)e.innerHTML+='<div class="info-title alert alert-danger">'+t.error.message+"</div>";else if("arcgis"===n)for(var i=0;i<t.layers.length;i++){var a=t.layers[i];e.innerHTML+='<div class="info-title" data-layerid="'+a.layerId+'">'+a.layerName+"</div>";for(var o=0;o<a.legend.length;o++){var s=a.legend[o];e.innerHTML+='<div class="inline" data-layerid="'+a.layerId+'"><img src="data:'+s.contentType+";base64,"+s.imageData+'" /></div><div class="info-label" data-layerid="'+a.layerId+'">'+s.label+"</div>"}}else"image"===n&&(e.innerHTML='<img src="'+r+'"/>')};return{getOnAddLegend:function(t,n,r,i){return function(){var a=L.DomUtil.create("div",n);return L.Browser.touch?L.DomEvent.on(a,"click",L.DomEvent.stopPropagation):(L.DomEvent.disableClickPropagation(a),L.DomEvent.on(a,"mousewheel",L.DomEvent.stopPropagation)),e(a,t,r,i),a}},getOnAddArrayLegend:function(e,t){return function(){for(var n=L.DomUtil.create("div",t),r=0;r<e.colors.length;r++)n.innerHTML+='<div class="outline"><i style="background:'+e.colors[r]+'"></i></div><div class="info-label">'+e.labels[r]+"</div>";return L.Browser.touch?L.DomEvent.on(n,"click",L.DomEvent.stopPropagation):(L.DomEvent.disableClickPropagation(n),L.DomEvent.on(n,"mousewheel",L.DomEvent.stopPropagation)),n}},updateLegend:e}}),angular.module("leaflet-directive").factory("leafletMapDefaults",["$q","leafletHelpers",function(e,t){function n(){return{keyboard:!0,dragging:!0,worldCopyJump:!1,doubleClickZoom:!0,scrollWheelZoom:!0,tap:!0,touchZoom:!0,zoomControl:!0,zoomsliderControl:!1,zoomControlPosition:"topleft",attributionControl:!0,controls:{layers:{visible:!0,position:"topright",collapsed:!0}},nominatim:{server:" http://nominatim.openstreetmap.org/search"},crs:L.CRS.EPSG3857,tileLayer:"//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",tileLayerOptions:{attribution:'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'},path:{weight:10,opacity:1,color:"#0000ff"},center:{lat:0,lng:0,zoom:1}}}
var r=t.isDefined,i=t.isObject,a=t.obtainEffectiveMapId,o={};return{reset:function(){o={}},getDefaults:function(e){var t=a(o,e);return o[t]},getMapCreationDefaults:function(e){var t=a(o,e),n=o[t],i={maxZoom:n.maxZoom,keyboard:n.keyboard,dragging:n.dragging,zoomControl:n.zoomControl,doubleClickZoom:n.doubleClickZoom,scrollWheelZoom:n.scrollWheelZoom,tap:n.tap,touchZoom:n.touchZoom,attributionControl:n.attributionControl,worldCopyJump:n.worldCopyJump,crs:n.crs};if(r(n.minZoom)&&(i.minZoom=n.minZoom),r(n.zoomAnimation)&&(i.zoomAnimation=n.zoomAnimation),r(n.fadeAnimation)&&(i.fadeAnimation=n.fadeAnimation),r(n.markerZoomAnimation)&&(i.markerZoomAnimation=n.markerZoomAnimation),n.map)for(var s in n.map)i[s]=n.map[s];return i},setDefaults:function(e,t){var s=n();r(e)&&(s.doubleClickZoom=r(e.doubleClickZoom)?e.doubleClickZoom:s.doubleClickZoom,s.scrollWheelZoom=r(e.scrollWheelZoom)?e.scrollWheelZoom:s.doubleClickZoom,s.tap=r(e.tap)?e.tap:s.tap,s.touchZoom=r(e.touchZoom)?e.touchZoom:s.doubleClickZoom,s.zoomControl=r(e.zoomControl)?e.zoomControl:s.zoomControl,s.zoomsliderControl=r(e.zoomsliderControl)?e.zoomsliderControl:s.zoomsliderControl,s.attributionControl=r(e.attributionControl)?e.attributionControl:s.attributionControl,s.tileLayer=r(e.tileLayer)?e.tileLayer:s.tileLayer,s.zoomControlPosition=r(e.zoomControlPosition)?e.zoomControlPosition:s.zoomControlPosition,s.keyboard=r(e.keyboard)?e.keyboard:s.keyboard,s.dragging=r(e.dragging)?e.dragging:s.dragging,r(e.controls)&&angular.extend(s.controls,e.controls),i(e.crs)?s.crs=e.crs:r(L.CRS[e.crs])&&(s.crs=L.CRS[e.crs]),r(e.center)&&angular.copy(e.center,s.center),r(e.tileLayerOptions)&&angular.copy(e.tileLayerOptions,s.tileLayerOptions),r(e.maxZoom)&&(s.maxZoom=e.maxZoom),r(e.minZoom)&&(s.minZoom=e.minZoom),r(e.zoomAnimation)&&(s.zoomAnimation=e.zoomAnimation),r(e.fadeAnimation)&&(s.fadeAnimation=e.fadeAnimation),r(e.markerZoomAnimation)&&(s.markerZoomAnimation=e.markerZoomAnimation),r(e.worldCopyJump)&&(s.worldCopyJump=e.worldCopyJump),r(e.map)&&(s.map=e.map),r(e.path)&&(s.path=e.path));var l=a(o,t);return o[l]=s,s}}}]),angular.module("leaflet-directive").service("leafletMarkersHelpers",["$rootScope","$timeout","leafletHelpers","$log","$compile","leafletGeoJsonHelpers",function(e,t,n,r,i,a){var o=n.isDefined,s=n.defaultTo,l=n.MarkerClusterPlugin,u=n.AwesomeMarkersPlugin,c=n.VectorMarkersPlugin,f=n.MakiMarkersPlugin,d=n.ExtraMarkersPlugin,p=n.DomMarkersPlugin,h=n.safeApply,g=n,v=n.isString,m=n.isNumber,$=n.isObject,y={},b=a,w=n.errorHeader,x=function(e){var t="";return["_icon","_latlng","_leaflet_id","_map","_shadow"].forEach(function(n){t+=n+": "+s(e[n],"undefined")+" \n"}),"[leafletMarker] : \n"+t},C=function(e,t){(t?console:r).debug(x(e))},k=function(t){if(o(t)&&o(t.type)&&"awesomeMarker"===t.type)return u.isLoaded()||r.error(w+" The AwesomeMarkers Plugin is not loaded."),new L.AwesomeMarkers.icon(t);if(o(t)&&o(t.type)&&"vectorMarker"===t.type)return c.isLoaded()||r.error(w+" The VectorMarkers Plugin is not loaded."),new L.VectorMarkers.icon(t);if(o(t)&&o(t.type)&&"makiMarker"===t.type)return f.isLoaded()||r.error(w+"The MakiMarkers Plugin is not loaded."),new L.MakiMarkers.icon(t);if(o(t)&&o(t.type)&&"extraMarker"===t.type)return d.isLoaded()||r.error(w+"The ExtraMarkers Plugin is not loaded."),new L.ExtraMarkers.icon(t);if(o(t)&&o(t.type)&&"div"===t.type)return new L.divIcon(t);if(o(t)&&o(t.type)&&"dom"===t.type){p.isLoaded()||r.error(w+"The DomMarkers Plugin is not loaded.");var n=angular.isFunction(t.getMarkerScope)?t.getMarkerScope():e,a=i(t.template)(n),s=angular.copy(t);return s.element=a[0],new L.DomMarkers.icon(s)}if(o(t)&&o(t.type)&&"icon"===t.type)return t.icon;return o(t)&&o(t.iconUrl)?new L.Icon(t):new L.Icon.Default({iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAGmklEQVRYw7VXeUyTZxjvNnfELFuyIzOabermMZEeQC/OclkO49CpOHXOLJl/CAURuYbQi3KLgEhbrhZ1aDwmaoGqKII6odATmH/scDFbdC7LvFqOCc+e95s2VG50X/LLm/f4/Z7neY/ne18aANCmAr5E/xZf1uDOkTcGcWR6hl9247tT5U7Y6SNvWsKT63P58qbfeLJG8M5qcgTknrvvrdDbsT7Ml+tv82X6vVxJE33aRmgSyYtcWVMqX97Yv2JvW39UhRE2HuyBL+t+gK1116ly06EeWFNlAmHxlQE0OMiV6mQCScusKRlhS3QLeVJdl1+23h5dY4FNB3thrbYboqptEFlphTC1hSpJnbRvxP4NWgsE5Jyz86QNNi/5qSUTGuFk1gu54tN9wuK2wc3o+Wc13RCmsoBwEqzGcZsxsvCSy/9wJKf7UWf1mEY8JWfewc67UUoDbDjQC+FqK4QqLVMGGR9d2wurKzqBk3nqIT/9zLxRRjgZ9bqQgub+DdoeCC03Q8j+0QhFhBHR/eP3U/zCln7Uu+hihJ1+bBNffLIvmkyP0gpBZWYXhKussK6mBz5HT6M1Nqpcp+mBCPXosYQfrekGvrjewd59/GvKCE7TbK/04/ZV5QZYVWmDwH1mF3xa2Q3ra3DBC5vBT1oP7PTj4C0+CcL8c7C2CtejqhuCnuIQHaKHzvcRfZpnylFfXsYJx3pNLwhKzRAwAhEqG0SpusBHfAKkxw3w4627MPhoCH798z7s0ZnBJ/MEJbZSbXPhER2ih7p2ok/zSj2cEJDd4CAe+5WYnBCgR2uruyEw6zRoW6/DWJ/OeAP8pd/BGtzOZKpG8oke0SX6GMmRk6GFlyAc59K32OTEinILRJRchah8HQwND8N435Z9Z0FY1EqtxUg+0SO6RJ/mmXz4VuS+DpxXC3gXmZwIL7dBSH4zKE50wESf8qwVgrP1EIlTO5JP9Igu0aexdh28F1lmAEGJGfh7jE6ElyM5Rw/FDcYJjWhbeiBYoYNIpc2FT/SILivp0F1ipDWk4BIEo2VuodEJUifhbiltnNBIXPUFCMpthtAyqws/BPlEF/VbaIxErdxPphsU7rcCp8DohC+GvBIPJS/tW2jtvTmmAeuNO8BNOYQeG8G/2OzCJ3q+soYB5i6NhMaKr17FSal7GIHheuV3uSCY8qYVuEm1cOzqdWr7ku/R0BDoTT+DT+ohCM6/CCvKLKO4RI+dXPeAuaMqksaKrZ7L3FE5FIFbkIceeOZ2OcHO6wIhTkNo0ffgjRGxEqogXHYUPHfWAC/lADpwGcLRY3aeK4/oRGCKYcZXPVoeX/kelVYY8dUGf8V5EBRbgJXT5QIPhP9ePJi428JKOiEYhYXFBqou2Guh+p/mEB1/RfMw6rY7cxcjTrneI1FrDyuzUSRm9miwEJx8E/gUmqlyvHGkneiwErR21F3tNOK5Tf0yXaT+O7DgCvALTUBXdM4YhC/IawPU+2PduqMvuaR6eoxSwUk75ggqsYJ7VicsnwGIkZBSXKOUww73WGXyqP+J2/b9c+gi1YAg/xpwck3gJuucNrh5JvDPvQr0WFXf0piyt8f8/WI0hV4pRxxkQZdJDfDJNOAmM0Ag8jyT6hz0WGXWuP94Yh2jcfjmXAGvHCMslRimDHYuHuDsy2QtHuIavznhbYURq5R57KpzBBRZKPJi8eQg48h4j8SDdowifdIrEVdU+gbO6QNvRRt4ZBthUaZhUnjlYObNagV3keoeru3rU7rcuceqU1mJBxy+BWZYlNEBH+0eH4vRiB+OYybU2hnblYlTvkHinM4m54YnxSyaZYSF6R3jwgP7udKLGIX6r/lbNa9N6y5MFynjWDtrHd75ZvTYAPO/6RgF0k76mQla3FGq7dO+cH8sKn0Vo7nDllwAhqwLPkxrHwWmHJOo+AKJ4rab5OgrM7rVu8eWb2Pu0Dh4eDgXoOfvp7Y7QeqknRmvcTBEyq9m/HQQSCSz6LHq3z0yzsNySRfMS253wl2KyRDbcZPcfJKjZmSEOjcxyi+Y8dUOtsIEH6R2wNykdqrkYJ0RV92H0W58pkfQk7cKevsLK10Py8SdMGfXNXATY+pPbyJR/ET6n9nIfztNtZYRV9XniQu9IA2vOVgy4ir7GCLVmmd+zjkH0eAF9Po6K61pmCXHxU5rHMYd1ftc3owjwRSVRzLjKvqZEty6cRUD7jGqiOdu5HG6MdHjNcNYGqfDm5YRzLBBCCDl/2bk8a8gdbqcfwECu62Fg/HrggAAAABJRU5ErkJggg==",shadowUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAYAAACoYAD2AAAC5ElEQVRYw+2YW4/TMBCF45S0S1luXZCABy5CgLQgwf//S4BYBLTdJLax0fFqmB07nnQfEGqkIydpVH85M+NLjPe++dcPc4Q8Qh4hj5D/AaQJx6H/4TMwB0PeBNwU7EGQAmAtsNfAzoZkgIa0ZgLMa4Aj6CxIAsjhjOCoL5z7Glg1JAOkaicgvQBXuncwJAWjksLtBTWZe04CnYRktUGdilALppZBOgHGZcBzL6OClABvMSVIzyBjazOgrvACf1ydC5mguqAVg6RhdkSWQFj2uxfaq/BrIZOLEWgZdALIDvcMcZLD8ZbLC9de4yR1sYMi4G20S4Q/PWeJYxTOZn5zJXANZHIxAd4JWhPIloTJZhzMQduM89WQ3MUVAE/RnhAXpTycqys3NZALOBbB7kFrgLesQl2h45Fcj8L1tTSohUwuxhy8H/Qg6K7gIs+3kkaigQCOcyEXCHN07wyQazhrmIulvKMQAwMcmLNqyCVyMAI+BuxSMeTk3OPikLY2J1uE+VHQk6ANrhds+tNARqBeaGc72cK550FP4WhXmFmcMGhTwAR1ifOe3EvPqIegFmF+C8gVy0OfAaWQPMR7gF1OQKqGoBjq90HPMP01BUjPOqGFksC4emE48tWQAH0YmvOgF3DST6xieJgHAWxPAHMuNhrImIdvoNOKNWIOcE+UXE0pYAnkX6uhWsgVXDxHdTfCmrEEmMB2zMFimLVOtiiajxiGWrbU52EeCdyOwPEQD8LqyPH9Ti2kgYMf4OhSKB7qYILbBv3CuVTJ11Y80oaseiMWOONc/Y7kJYe0xL2f0BaiFTxknHO5HaMGMublKwxFGzYdWsBF174H/QDknhTHmHHN39iWFnkZx8lPyM8WHfYELmlLKtgWNmFNzQcC1b47gJ4hL19i7o65dhH0Negbca8vONZoP7doIeOC9zXm8RjuL0Gf4d4OYaU5ljo3GYiqzrWQHfJxA6ALhDpVKv9qYeZA8eM3EhfPSCmpuD0AAAAASUVORK5CYII=",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]})},S=function(e){o(y[e])&&y.splice(e,1)},A=function(){y={}},E=function(e,t,n){if(e.closePopup(),o(n)&&o(n.overlays))for(var r in n.overlays)if((n.overlays[r]instanceof L.LayerGroup||n.overlays[r]instanceof L.FeatureGroup)&&n.overlays[r].hasLayer(e))return void n.overlays[r].removeLayer(e);if(o(y))for(var i in y)y[i].hasLayer(e)&&y[i].removeLayer(e);t.hasLayer(e)&&t.removeLayer(e)},M=function(e,t){var n=e._popup._container.offsetHeight,r=new L.Point(e._popup._containerLeft,-n-e._popup._containerBottom);null!==t.layerPointToContainerPoint(r)&&e._popup._adjustPan()},O=function(e,t){i(e._popup._contentNode)(t)},P=function(e,n,r){(e._popup._contentNode.innerText||e._popup._contentNode.textContent).length<1&&t(function(){P(e,n,r)});var i=e._popup._contentNode.offsetWidth;return e._popup._updateLayout(),e._popup._updatePosition(),e._popup.options.autoPan&&M(e,r),i},T=function(t,n,i){var a=angular.isFunction(n.getMessageScope)?n.getMessageScope():e;if(!o(n.compileMessage)||n.compileMessage){if(!o(t._popup)||!o(t._popup._contentNode))return r.error(w+"Popup is invalid or does not have any content."),!1;O(t,a),P(t,n,i)}},D=function(t,n){var r=angular.isFunction(n.getMessageScope)?n.getMessageScope():e,a=angular.isFunction(n.getLabelScope)?n.getLabelScope():r,s=!o(n.compileMessage)||n.compileMessage;g.LabelPlugin.isLoaded()&&o(n.label)&&(o(n.label.options)&&!0===n.label.options.noHide&&t.showLabel(),s&&o(t.label)&&i(t.label._container)(a))},H=function(e,t,n,i,a,s,l){if(o(t)){if(!b.validateCoords(e))return r.warn("There are problems with lat-lng data, please verify your marker model"),void E(n,l,s);var u=e===t;if(o(e.iconAngle)&&t.iconAngle!==e.iconAngle&&n.setIconAngle(e.iconAngle),v(e.layer)||v(t.layer)&&(o(s.overlays[t.layer])&&s.overlays[t.layer].hasLayer(n)&&(s.overlays[t.layer].removeLayer(n),n.closePopup()),l.hasLayer(n)||l.addLayer(n)),(m(e.opacity)||m(parseFloat(e.opacity)))&&e.opacity!==t.opacity&&n.setOpacity(e.opacity),v(e.layer)&&t.layer!==e.layer){if(v(t.layer)&&o(s.overlays[t.layer])&&s.overlays[t.layer].hasLayer(n)&&s.overlays[t.layer].removeLayer(n),n.closePopup(),l.hasLayer(n)&&l.removeLayer(n),!o(s.overlays[e.layer]))return void r.error(w+"You must use a name of an existing layer");var c=s.overlays[e.layer];if(!(c instanceof L.LayerGroup||c instanceof L.FeatureGroup))return void r.error(w+'A marker can only be added to a layer of type "group" or "featureGroup"');c.addLayer(n),l.hasLayer(n)&&!0===e.focus&&n.openPopup()}if(!0!==e.draggable&&!0===t.draggable&&o(n.dragging)&&n.dragging.disable(),!0===e.draggable&&!0!==t.draggable&&(n.dragging?n.dragging.enable():L.Handler.MarkerDrag&&(n.dragging=new L.Handler.MarkerDrag(n),n.options.draggable=!0,n.dragging.enable())),$(e.icon)||$(t.icon)&&(n.setIcon(k()),n.closePopup(),n.unbindPopup(),v(e.message)&&n.bindPopup(e.message,e.popupOptions)),$(e.icon)&&$(t.icon)&&!angular.equals(e.icon,t.icon)){var f=!1;n.dragging&&(f=n.dragging.enabled()),n.setIcon(k(e.icon)),f&&n.dragging.enable(),n.closePopup(),n.unbindPopup(),v(e.message)&&(n.bindPopup(e.message,e.popupOptions),l.hasLayer(n)&&!0===e.focus&&n.openPopup())}!v(e.message)&&v(t.message)&&(n.closePopup(),n.unbindPopup()),g.LabelPlugin.isLoaded()&&(o(e.label)&&o(e.label.message)?"label"in t&&"message"in t.label&&!angular.equals(e.label.message,t.label.message)?n.updateLabelContent(e.label.message):!angular.isFunction(n.getLabel)||angular.isFunction(n.getLabel)&&!o(n.getLabel())?(n.bindLabel(e.label.message,e.label.options),D(n,e)):D(n,e):(!("label"in e)||"message"in e.label)&&angular.isFunction(n.unbindLabel)&&n.unbindLabel()),v(e.message)&&!v(t.message)&&n.bindPopup(e.message,e.popupOptions),v(e.message)&&v(t.message)&&e.message!==t.message&&n.setPopupContent(e.message);var d=!1;!0!==e.focus&&!0===t.focus&&(n.closePopup(),d=!0),(!0===e.focus&&(!o(t.focus)||!1===t.focus)||u&&!0===e.focus)&&(n.openPopup(),d=!0),t.zIndexOffset!==e.zIndexOffset&&n.setZIndexOffset(e.zIndexOffset);var p=n.getLatLng();v(e.layer)&&g.MarkerClusterPlugin.is(s.overlays[e.layer])?d?(e.lat!==t.lat||e.lng!==t.lng)&&(s.overlays[e.layer].removeLayer(n),n.setLatLng([e.lat,e.lng]),s.overlays[e.layer].addLayer(n)):p.lat!==e.lat||p.lng!==e.lng?(s.overlays[e.layer].removeLayer(n),n.setLatLng([e.lat,e.lng]),s.overlays[e.layer].addLayer(n)):e.lat!==t.lat||e.lng!==t.lng?(s.overlays[e.layer].removeLayer(n),n.setLatLng([e.lat,e.lng]),s.overlays[e.layer].addLayer(n)):$(e.icon)&&$(t.icon)&&!angular.equals(e.icon,t.icon)&&(s.overlays[e.layer].removeLayer(n),s.overlays[e.layer].addLayer(n)):(p.lat!==e.lat||p.lng!==e.lng)&&n.setLatLng([e.lat,e.lng])}};return{resetMarkerGroup:S,resetMarkerGroups:A,deleteMarker:E,manageOpenPopup:T,manageOpenLabel:D,createMarker:function(e){if(!o(e)||!b.validateCoords(e))return void r.error(w+"The marker definition is not valid.");var t=b.getCoords(e);if(!o(t))return void r.error(w+"Unable to get coordinates from markerData.");var n={icon:k(e.icon),title:o(e.title)?e.title:"",draggable:!!o(e.draggable)&&e.draggable,clickable:!o(e.clickable)||e.clickable,riseOnHover:!!o(e.riseOnHover)&&e.riseOnHover,zIndexOffset:o(e.zIndexOffset)?e.zIndexOffset:0,iconAngle:o(e.iconAngle)?e.iconAngle:0};for(var i in e)e.hasOwnProperty(i)&&!n.hasOwnProperty(i)&&(n[i]=e[i]);var a=new L.marker(t,n);return v(e.message)||a.unbindPopup(),a},addMarkerToGroup:function(e,t,n,i){return v(t)?l.isLoaded()?(o(y[t])||(y[t]=new L.MarkerClusterGroup(n),i.addLayer(y[t])),void y[t].addLayer(e)):void r.error(w+"The MarkerCluster plugin is not loaded."):void r.error(w+"The marker group you have specified is invalid.")},listenMarkerEvents:function(e,t,n,r,i){e.on("popupopen",function(){h(n,function(){(o(e._popup)||o(e._popup._contentNode))&&(t.focus=!0,T(e,t,i))})}),e.on("popupclose",function(){h(n,function(){t.focus=!1})}),e.on("add",function(){h(n,function(){"label"in t&&D(e,t)})})},updateMarker:H,addMarkerWatcher:function(e,t,n,r,i,a){var l=g.getObjectArrayPath("markers."+t);a=s(a,!0);var u=n.$watch(l,function(t,n){return o(t)?void H(t,n,e,0,0,r,i):(E(e,i,r),void u())},a)},string:x,log:C}}]),angular.module("leaflet-directive").factory("leafletPathsHelpers",["$rootScope","$log","leafletHelpers",function(e,t,n){function r(e){return e.filter(function(e){return c(e)}).map(function(e){return i(e)})}function i(e){return l(e)?new L.LatLng(e[0],e[1]):new L.LatLng(e.lat,e.lng)}function a(e){return e.map(function(e){return r(e)})}function o(e,t){for(var n={},r=0;r<f.length;r++){var i=f[r];s(e[i])?n[i]=e[i]:s(t.path[i])&&(n[i]=t.path[i])}return n}var s=n.isDefined,l=n.isArray,u=n.isNumber,c=n.isValidPoint,f=["stroke","weight","color","opacity","fill","fillColor","fillOpacity","dashArray","lineCap","lineJoin","clickable","pointerEvents","className","smoothFactor","noClip"],d=function(e,t){for(var n={},r=0;r<f.length;r++){var i=f[r];s(t[i])&&(n[i]=t[i])}e.setStyle(t)},p=function(e){if(!l(e))return!1;for(var t=0;t<e.length;t++){var n=e[t];if(!c(n))return!1}return!0},h={polyline:{isValid:function(e){var t=e.latlngs;return p(t)},createPath:function(e){return new L.Polyline([],e)},setPath:function(e,t){e.setLatLngs(r(t.latlngs)),d(e,t)}},multiPolyline:{isValid:function(e){var t=e.latlngs;if(!l(t))return!1;for(var n in t){var r=t[n];if(!p(r))return!1}return!0},createPath:function(e){return new L.multiPolyline([[[0,0],[1,1]]],e)},setPath:function(e,t){e.setLatLngs(a(t.latlngs)),d(e,t)}},polygon:{isValid:function(e){var t=e.latlngs;return p(t)},createPath:function(e){return new L.Polygon([],e)},setPath:function(e,t){e.setLatLngs(r(t.latlngs)),d(e,t)}},multiPolygon:{isValid:function(e){var t=e.latlngs;if(!l(t))return!1;for(var n in t){var r=t[n];if(!p(r))return!1}return!0},createPath:function(e){return new L.MultiPolygon([[[0,0],[1,1],[0,1]]],e)},setPath:function(e,t){e.setLatLngs(a(t.latlngs)),d(e,t)}},rectangle:{isValid:function(e){var t=e.latlngs;if(!l(t)||2!==t.length)return!1;for(var n in t){var r=t[n];if(!c(r))return!1}return!0},createPath:function(e){return new L.Rectangle([[0,0],[1,1]],e)},setPath:function(e,t){e.setBounds(new L.LatLngBounds(r(t.latlngs))),d(e,t)}},circle:{isValid:function(e){var t=e.latlngs;return c(t)&&u(e.radius)},createPath:function(e){return new L.Circle([0,0],1,e)},setPath:function(e,t){e.setLatLng(i(t.latlngs)),s(t.radius)&&e.setRadius(t.radius),d(e,t)}},circleMarker:{isValid:function(e){var t=e.latlngs;return c(t)&&u(e.radius)},createPath:function(e){return new L.CircleMarker([0,0],e)},setPath:function(e,t){e.setLatLng(i(t.latlngs)),s(t.radius)&&e.setRadius(t.radius),d(e,t)}}},g=function(e){var t={};return e.latlngs&&(t.latlngs=e.latlngs),e.radius&&(t.radius=e.radius),t};return{setPathOptions:function(e,t,n){s(t)||(t="polyline"),h[t].setPath(e,n)},createPath:function(e,n,r){s(n.type)||(n.type="polyline");var i=o(n,r),a=g(n);return h[n.type].isValid(a)?h[n.type].createPath(i):void t.error("[AngularJS - Leaflet] Invalid data passed to the "+n.type+" path")}}}]),angular.module("leaflet-directive").service("leafletWatchHelpers",function(){var e=function(e,t,n,r,i){var a=e[t](n,function(e,t){i(e,t),r.doWatch||a()},r.isDeep);return a};return{maybeWatch:function(t,n,r,i){return e(t,"$watch",n,r,i)},maybeWatchCollection:function(t,n,r,i){return e(t,"$watchCollection",n,r,i)}}}),angular.module("leaflet-directive").factory("nominatimService",["$q","$http","leafletHelpers","leafletMapDefaults",function(e,t,n,r){var i=n.isDefined;return{query:function(n,a){var o=r.getDefaults(a),s=o.nominatim.server,l=e.defer();return t.get(s,{params:{format:"json",limit:1,q:n}}).success(function(e){e.length>0&&i(e[0].boundingbox)?l.resolve(e[0]):l.reject("[Nominatim] Invalid address")}),l.promise}}}]),angular.module("leaflet-directive").directive("bounds",["$log","$timeout","$http","leafletHelpers","nominatimService","leafletBoundsHelpers",function(e,t,n,r,i,a){return{restrict:"A",scope:!1,replace:!1,require:["leaflet"],link:function(n,o,s,l){var u=r.isDefined,c=a.createLeafletBounds,f=l[0].getLeafletScope(),d=l[0],p=r.errorHeader+" [Bounds] ",h=function(e){return 0===e._southWest.lat&&0===e._southWest.lng&&0===e._northEast.lat&&0===e._northEast.lng};d.getMap().then(function(r){f.$on("boundsChanged",function(e){var n=e.currentScope,i=r.getBounds();if(!h(i)&&!n.settingBoundsFromScope){n.settingBoundsFromLeaflet=!0;var a={northEast:{lat:i._northEast.lat,lng:i._northEast.lng},southWest:{lat:i._southWest.lat,lng:i._southWest.lng},options:i.options};angular.equals(n.bounds,a)||(n.bounds=a),t(function(){n.settingBoundsFromLeaflet=!1})}});var a;f.$watch("bounds",function(o){if(!n.settingBoundsFromLeaflet){if(u(o.address)&&o.address!==a)return n.settingBoundsFromScope=!0,i.query(o.address,s.id).then(function(e){var t=e.boundingbox,n=[[t[0],t[2]],[t[1],t[3]]];r.fitBounds(n)},function(t){e.error(p+" "+t+".")}),a=o.address,void t(function(){n.settingBoundsFromScope=!1});var l=c(o);l&&!r.getBounds().equals(l)&&(n.settingBoundsFromScope=!0,r.fitBounds(l,o.options),t(function(){n.settingBoundsFromScope=!1}))}},!0)})}}}]);var centerDirectiveTypes=["center","lfCenter"],centerDirectives={};centerDirectiveTypes.forEach(function(e){centerDirectives[e]=["$log","$q","$location","$timeout","leafletMapDefaults","leafletHelpers","leafletBoundsHelpers","leafletMapEvents",function(t,n,r,i,a,o,s,l){var u,c=o.isDefined,f=o.isNumber,d=o.isSameCenterOnMap,p=o.safeApply,h=o.isValidCenter,g=s.isValidBounds,v=o.isUndefinedOrEmpty,m=o.errorHeader,$=function(e,t){return c(e)&&g(e)&&v(t)};return{restrict:"A",scope:!1,replace:!1,require:"leaflet",controller:function(){u=n.defer(),this.getCenter=function(){return u.promise}},link:function(n,o,g,v){var y=v.getLeafletScope(),b=y[e];v.getMap().then(function(n){var o=a.getDefaults(g.id);if(-1!==g[e].search("-"))return t.error(m+' The "center" variable can\'t use a "-" on its key name: "'+g[e]+'".'),void n.setView([o.center.lat,o.center.lng],o.center.zoom);if($(y.bounds,b))n.fitBounds(s.createLeafletBounds(y.bounds),y.bounds.options),b=n.getCenter(),p(y,function(t){angular.extend(t[e],{lat:n.getCenter().lat,lng:n.getCenter().lng,zoom:n.getZoom(),autoDiscover:!1})}),p(y,function(e){var t=n.getBounds();e.bounds={northEast:{lat:t._northEast.lat,lng:t._northEast.lng},southWest:{lat:t._southWest.lat,lng:t._southWest.lng}}});else{if(!c(b))return t.error(m+' The "center" property is not defined in the main scope'),void n.setView([o.center.lat,o.center.lng],o.center.zoom);c(b.lat)&&c(b.lng)||c(b.autoDiscover)||angular.copy(o.center,b)}var v,w;if("yes"===g.urlHashCenter){var L=function(){var e,t=r.search();if(c(t.c)){var n=t.c.split(":");3===n.length&&(e={lat:parseFloat(n[0]),lng:parseFloat(n[1]),zoom:parseInt(n[2],10)})}return e};v=L(),y.$on("$locationChangeSuccess",function(t){var r=t.currentScope,i=L();c(i)&&!d(i,n)&&angular.extend(r[e],{lat:i.lat,lng:i.lng,zoom:i.zoom})})}y.$watch(e,function(e){return y.settingCenterFromLeaflet?void 0:(c(v)&&(angular.copy(v,e),v=void 0),h(e)||!0===e.autoDiscover?!0===e.autoDiscover?(f(e.zoom)||n.setView([o.center.lat,o.center.lng],o.center.zoom),void(f(e.zoom)&&e.zoom>o.center.zoom?n.locate({setView:!0,maxZoom:e.zoom}):c(o.maxZoom)?n.locate({setView:!0,maxZoom:o.maxZoom}):n.locate({setView:!0}))):void(w&&d(e,n)||(y.settingCenterFromScope=!0,n.setView([e.lat,e.lng],e.zoom),l.notifyCenterChangedToBounds(y,n),i(function(){y.settingCenterFromScope=!1}))):void t.warn(m+" invalid 'center'"))},!0),n.whenReady(function(){w=!0}),n.on("moveend",function(){u.resolve(),l.notifyCenterUrlHashChanged(y,n,g,r.search()),d(b,n)||y.settingCenterFromScope||(y.settingCenterFromLeaflet=!0,p(y,function(t){y.settingCenterFromScope||angular.extend(t[e],{lat:n.getCenter().lat,lng:n.getCenter().lng,zoom:n.getZoom(),autoDiscover:!1}),l.notifyCenterChangedToBounds(y,n),i(function(){y.settingCenterFromLeaflet=!1})}))}),!0===b.autoDiscover&&n.on("locationerror",function(){t.warn(m+" The Geolocation API is unauthorized on this page."),h(b)?(n.setView([b.lat,b.lng],b.zoom),l.notifyCenterChangedToBounds(y,n)):(n.setView([o.center.lat,o.center.lng],o.center.zoom),l.notifyCenterChangedToBounds(y,n))})})}}}]}),centerDirectiveTypes.forEach(function(e){angular.module("leaflet-directive").directive(e,centerDirectives[e])}),angular.module("leaflet-directive").directive("controls",["$log","leafletHelpers","leafletControlHelpers",function(e,t,n){return{restrict:"A",scope:!1,replace:!1,require:"?^leaflet",link:function(r,i,a,o){if(o){var s=n.createControl,l=n.isValidControlType,u=o.getLeafletScope(),c=t.isDefined,f=t.isArray,d={},p=t.errorHeader+" [Controls] ";o.getMap().then(function(t){u.$watchCollection("controls",function(n){for(var r in d)c(n[r])||(t.hasControl(d[r])&&t.removeControl(d[r]),delete d[r]);for(var i in n){var a,o=c(n[i].type)?n[i].type:i;if(!l(o))return void e.error(p+" Invalid control type: "+o+".");if("custom"!==o)a=s(o,n[i]),t.addControl(a),d[i]=a;else{var u=n[i];if(f(u))for(var h in u){var g=u[h];t.addControl(g),d[i]=c(d[i])?d[i].concat([g]):[g]}else t.addControl(u),d[i]=u}}})})}}}}]),angular.module("leaflet-directive").directive("decorations",["$log","leafletHelpers",function(e,t){return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(n,r,i,a){function o(t){return c(t)&&c(t.coordinates)&&(u.isLoaded()||e.error("[AngularJS - Leaflet] The PolylineDecorator Plugin is not loaded.")),L.polylineDecorator(t.coordinates)}function s(e,t){return c(e)&&c(t)&&c(t.coordinates)&&c(t.patterns)?(e.setPaths(t.coordinates),e.setPatterns(t.patterns),e):void 0}var l=a.getLeafletScope(),u=t.PolylineDecoratorPlugin,c=t.isDefined,f={};a.getMap().then(function(e){l.$watch("decorations",function(t){for(var n in f)c(t[n])&&angular.equals(t[n],f)||(e.removeLayer(f[n]),delete f[n]);for(var r in t){var i=t[r],a=o(i);c(a)&&(f[r]=a,e.addLayer(a),s(a,i))}},!0)})}}}]),angular.module("leaflet-directive").directive("eventBroadcast",["$log","$rootScope","leafletHelpers","leafletMapEvents","leafletIterators",function(e,t,n,r,i){return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(t,a,o,s){var l=n.isObject,u=n.isDefined,c=s.getLeafletScope(),f=c.eventBroadcast,d=r.getAvailableMapEvents(),p=r.addEvents;s.getMap().then(function(t){var n=[],r="broadcast";u(f.map)?l(f.map)?("emit"!==f.map.logic&&"broadcast"!==f.map.logic?e.warn("[AngularJS - Leaflet] Available event propagation logic are: 'emit' or 'broadcast'."):r=f.map.logic,l(f.map.enable)&&f.map.enable.length>=0?i.each(f.map.enable,function(e){-1===n.indexOf(e)&&-1!==d.indexOf(e)&&n.push(e)}):e.warn("[AngularJS - Leaflet] event-broadcast.map.enable must be an object check your model.")):e.warn("[AngularJS - Leaflet] event-broadcast.map must be an object check your model."):n=d,p(t,n,"eventName",c,r)})}}}]),angular.module("leaflet-directive").directive("geojson",["$log","$rootScope","leafletData","leafletHelpers","leafletWatchHelpers","leafletDirectiveControlsHelpers","leafletIterators","leafletGeoJsonEvents",function(e,t,n,r,i,a,o,s){var l=i.maybeWatch,u=r.watchOptions,c=a.extend,f=r,d=o;return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(e,t,i,a){var o=r.isDefined,p=a.getLeafletScope(),h={},g=!1;a.getMap().then(function(e){var t=p.geojsonWatchOptions||u,a=function(e,t){return angular.isFunction(e.onEachFeature)?e.onEachFeature:function(n,a){r.LabelPlugin.isLoaded()&&o(n.properties.description)&&a.bindLabel(n.properties.description),s.bindEvents(i.id,a,null,n,p,t,{resetStyleOnMouseout:e.resetStyleOnMouseout,mapId:i.id})}},v=f.isDefined(i.geojsonNested)&&f.isTruthy(i.geojsonNested),m=function(){if(h){var t=function(t){o(t)&&e.hasLayer(t)&&e.removeLayer(t)};return v?void d.each(h,function(e){t(e)}):void t(h)}},$=function(t,r){var s=angular.copy(t);if(o(s)&&o(s.data)){var l=a(s,r);o(s.options)||(s.options={style:s.style,filter:s.filter,onEachFeature:l,pointToLayer:s.pointToLayer});var u=L.geoJson(s.data,s.options);r&&f.isString(r)?h[r]=u:h=u,u.addTo(e),g||(g=!0,n.setGeoJSON(h,i.id))}},y=function(e){if(m(),v){if(!e||!Object.keys(e).length)return;return void d.each(e,function(e,t){$(e,t)})}$(e)};c(i.id,"geojson",y,m),l(p,"geojson",t,function(e){y(e)})})}}}]),angular.module("leaflet-directive").directive("layercontrol",["$filter","$log","leafletData","leafletHelpers",function(e,t,n,r){return{restrict:"E",scope:{icons:"=?",autoHideOpacity:"=?",showGroups:"=?",title:"@",baseTitle:"@",overlaysTitle:"@"},replace:!0,transclude:!1,require:"^leaflet",controller:["$scope","$element","$sce",function(e,i,a){t.debug("[Angular Directive - Layers] layers",e,i);var o=r.safeApply,s=r.isDefined;angular.extend(e,{baselayer:"",oldGroup:"",layerProperties:{},groupProperties:{},rangeIsSupported:r.rangeIsSupported(),changeBaseLayer:function(t,i){r.safeApply(e,function(r){r.baselayer=t,n.getMap().then(function(i){n.getLayers().then(function(n){if(!i.hasLayer(n.baselayers[t])){for(var a in r.layers.baselayers)r.layers.baselayers[a].icon=r.icons.unradio,i.hasLayer(n.baselayers[a])&&i.removeLayer(n.baselayers[a]);i.addLayer(n.baselayers[t]),r.layers.baselayers[t].icon=e.icons.radio}})})}),i.preventDefault()},moveLayer:function(t,n,r){var i=Object.keys(e.layers.baselayers).length;if(n>=1+i&&n<=e.overlaysArray.length+i){var a;for(var s in e.layers.overlays)if(e.layers.overlays[s].index===n){a=e.layers.overlays[s];break}a&&o(e,function(){a.index=t.index,t.index=n})}r.stopPropagation(),r.preventDefault()},initIndex:function(t,n){var r=Object.keys(e.layers.baselayers).length;t.index=s(t.index)?t.index:n+r+1},initGroup:function(t){e.groupProperties[t]=e.groupProperties[t]?e.groupProperties[t]:{}},toggleOpacity:function(t,n){if(n.visible){if(e.autoHideOpacity&&!e.layerProperties[n.name].opacityControl)for(var r in e.layerProperties)e.layerProperties[r].opacityControl=!1;e.layerProperties[n.name].opacityControl=!e.layerProperties[n.name].opacityControl}t.stopPropagation(),t.preventDefault()},toggleLegend:function(t){e.layerProperties[t.name].showLegend=!e.layerProperties[t.name].showLegend},showLegend:function(t){return t.legend&&e.layerProperties[t.name].showLegend},unsafeHTML:function(e){return a.trustAsHtml(e)},getOpacityIcon:function(t){return t.visible&&e.layerProperties[t.name].opacityControl?e.icons.close:e.icons.open},getGroupIcon:function(t){return t.visible?e.icons.check:e.icons.uncheck},changeOpacity:function(t){var r=e.layerProperties[t.name].opacity;n.getMap().then(function(i){n.getLayers().then(function(n){var a;for(var o in e.layers.overlays)if(e.layers.overlays[o]===t){a=n.overlays[o];break}i.hasLayer(a)&&(a.setOpacity&&a.setOpacity(r/100),a.getLayers&&a.eachLayer&&a.eachLayer(function(e){e.setOpacity&&e.setOpacity(r/100)}))})})},changeGroupVisibility:function(t){if(s(e.groupProperties[t])){var n=e.groupProperties[t].visible;for(var r in e.layers.overlays){var i=e.layers.overlays[r];i.group===t&&(i.visible=n)}}}});var l=i.get(0);L.Browser.touch?L.DomEvent.on(l,"click",L.DomEvent.stopPropagation):(L.DomEvent.disableClickPropagation(l),L.DomEvent.on(l,"mousewheel",L.DomEvent.stopPropagation))}],template:'<div class="angular-leaflet-control-layers" ng-show="overlaysArray.length"><h4 ng-if="title">{{ title }}</h4><div class="lf-baselayers"><h5 class="lf-title" ng-if="baseTitle">{{ baseTitle }}</h5><div class="lf-row" ng-repeat="(key, layer) in baselayersArray"><label class="lf-icon-bl" ng-click="changeBaseLayer(key, $event)"><input class="leaflet-control-layers-selector" type="radio" name="lf-radio" ng-show="false" ng-checked="baselayer === key" ng-value="key" /> <i class="lf-icon lf-icon-radio" ng-class="layer.icon"></i><div class="lf-text">{{layer.name}}</div></label></div></div><div class="lf-overlays"><h5 class="lf-title" ng-if="overlaysTitle">{{ overlaysTitle }}</h5><div class="lf-container"><div class="lf-row" ng-repeat="layer in (o = (overlaysArray | orderBy:\'index\':order))" ng-init="initIndex(layer, $index)"><label class="lf-icon-ol-group" ng-if="showGroups && layer.group && layer.group != o[$index-1].group"><input class="lf-control-layers-selector" type="checkbox" ng-show="false" ng-change="changeGroupVisibility(layer.group)" ng-model="groupProperties[layer.group].visible"/> <i class="lf-icon lf-icon-check" ng-class="getGroupIcon(groupProperties[layer.group])"></i><div class="lf-text">{{ layer.group }}</div></label><label class="lf-icon-ol"><input class="lf-control-layers-selector" type="checkbox" ng-show="false" ng-model="layer.visible"/> <i class="lf-icon lf-icon-check" ng-class="layer.icon"></i><div class="lf-text">{{layer.name}}</div></label><div class="lf-icons"><i class="lf-icon lf-up" ng-class="icons.up" ng-click="moveLayer(layer, layer.index - orderNumber, $event)"></i> <i class="lf-icon lf-down" ng-class="icons.down" ng-click="moveLayer(layer, layer.index + orderNumber, $event)"></i> <i class="lf-icon lf-toggle-legend" ng-class="icons.toggleLegend" ng-if="layer.legend" ng-click="toggleLegend(layer)"></i> <i class="lf-icon lf-open" ng-class="getOpacityIcon(layer)" ng-click="toggleOpacity($event, layer)"></i></div><div class="lf-legend" ng-if="showLegend(layer)" ng-bind-html="unsafeHTML(layer.legend)"></div><div class="lf-opacity clearfix" ng-if="layer.visible && layerProperties[layer.name].opacityControl"><label ng-if="rangeIsSupported" class="pull-left" style="width: 50%">0</label><label ng-if="rangeIsSupported" class="pull-left text-right" style="width: 50%">100</label><input ng-if="rangeIsSupported" class="clearfix" type="range" min="0" max="100" class="lf-opacity-control" ng-model="layerProperties[layer.name].opacity" ng-change="changeOpacity(layer)"/><h6 ng-if="!rangeIsSupported">Range is not supported in this browser</h6></div></div></div></div></div>',link:function(e,t,i,a){var o=r.isDefined,s=a.getLeafletScope(),l=s.layers;e.$watch("icons",function(){var t={uncheck:"fa fa-square-o",check:"fa fa-check-square-o",radio:"fa fa-dot-circle-o",unradio:"fa fa-circle-o",up:"fa fa-angle-up",down:"fa fa-angle-down",open:"fa fa-angle-double-down",close:"fa fa-angle-double-up",toggleLegend:"fa fa-pencil-square-o"};o(e.icons)?(angular.extend(t,e.icons),angular.extend(e.icons,t)):e.icons=t}),i.order=!o(i.order)||"normal"!==i.order&&"reverse"!==i.order?"normal":i.order,e.order="normal"===i.order,e.orderNumber="normal"===i.order?-1:1,e.layers=l,a.getMap().then(function(t){s.$watch("layers.baselayers",function(r){var i={};n.getLayers().then(function(n){var a;for(a in r){var o=r[a];o.icon=e.icons[t.hasLayer(n.baselayers[a])?"radio":"unradio"],i[a]=o}e.baselayersArray=i})}),s.$watch("layers.overlays",function(t){var r=[],i={};n.getLayers().then(function(n){var a;for(a in t){var s=t[a];s.icon=e.icons[s.visible?"check":"uncheck"],r.push(s),o(e.layerProperties[s.name])||(e.layerProperties[s.name]={opacity:o(s.layerOptions.opacity)?100*s.layerOptions.opacity:100,opacityControl:!1,showLegend:!0}),
o(s.group)&&(o(e.groupProperties[s.group])||(e.groupProperties[s.group]={visible:!1}),i[s.group]=o(i[s.group])?i[s.group]:{count:0,visibles:0},i[s.group].count++,s.visible&&i[s.group].visibles++),o(s.index)&&n.overlays[a].setZIndex&&n.overlays[a].setZIndex(t[a].index)}for(a in i)e.groupProperties[a].visible=i[a].visibles===i[a].count;e.overlaysArray=r})},!0)})}}}]),angular.module("leaflet-directive").directive("layers",["$log","$q","leafletData","leafletHelpers","leafletLayerHelpers","leafletControlHelpers",function(e,t,n,r,i,a){return{restrict:"A",scope:!1,replace:!1,require:"leaflet",controller:["$scope",function(e){e._leafletLayers=t.defer(),this.getLayers=function(){return e._leafletLayers.promise}}],link:function(e,t,o,s){var l=r.isDefined,u={},c=s.getLeafletScope(),f=c.layers,d=i.createLayer,p=i.safeAddLayer,h=i.safeRemoveLayer,g=a.updateLayersControl,v=!1;s.getMap().then(function(t){e._leafletLayers.resolve(u),n.setLayers(u,o.id),u.baselayers={},u.overlays={};var r=o.id,i=!1;for(var a in f.baselayers){var s=d(f.baselayers[a]);l(s)?(u.baselayers[a]=s,!0===f.baselayers[a].top&&(p(t,u.baselayers[a]),i=!0)):delete f.baselayers[a]}!i&&Object.keys(u.baselayers).length>0&&p(t,u.baselayers[Object.keys(f.baselayers)[0]]);for(a in f.overlays){var m=d(f.overlays[a]);l(m)?(u.overlays[a]=m,!0===f.overlays[a].visible&&p(t,u.overlays[a])):delete f.overlays[a]}c.$watch("layers.baselayers",function(e,n){if(angular.equals(e,n))return v=g(t,r,v,e,f.overlays,u),!0;for(var i in u.baselayers)(!l(e[i])||e[i].doRefresh)&&(t.hasLayer(u.baselayers[i])&&t.removeLayer(u.baselayers[i]),delete u.baselayers[i],e[i]&&e[i].doRefresh&&(e[i].doRefresh=!1));for(var a in e)if(l(u.baselayers[a]))!0!==e[a].top||t.hasLayer(u.baselayers[a])?!1===e[a].top&&t.hasLayer(u.baselayers[a])&&t.removeLayer(u.baselayers[a]):p(t,u.baselayers[a]);else{var o=d(e[a]);l(o)&&(u.baselayers[a]=o,!0===e[a].top&&p(t,u.baselayers[a]))}var s=!1;for(var c in u.baselayers)if(t.hasLayer(u.baselayers[c])){s=!0;break}!s&&Object.keys(u.baselayers).length>0&&p(t,u.baselayers[Object.keys(u.baselayers)[0]]),v=g(t,r,v,e,f.overlays,u)},!0),c.$watch("layers.overlays",function(e,n){if(angular.equals(e,n))return v=g(t,r,v,f.baselayers,e,u),!0;for(var i in u.overlays)if(!l(e[i])||e[i].doRefresh){if(t.hasLayer(u.overlays[i])){var a=l(e[i])?e[i].layerOptions:null;h(t,u.overlays[i],a)}delete u.overlays[i],e[i]&&e[i].doRefresh&&(e[i].doRefresh=!1)}for(var o in e){if(l(u.overlays[o]))e[o].visible&&!t.hasLayer(u.overlays[o])?p(t,u.overlays[o]):!1===e[o].visible&&t.hasLayer(u.overlays[o])&&h(t,u.overlays[o],e[o].layerOptions);else{var s=d(e[o]);if(!l(s))continue;u.overlays[o]=s,!0===e[o].visible&&p(t,u.overlays[o])}e[o].visible&&t._loaded&&e[o].data&&"heatmap"===e[o].type&&(u.overlays[o].setData(e[o].data),u.overlays[o].update())}v=g(t,r,v,f.baselayers,e,u)},!0)})}}}]),angular.module("leaflet-directive").directive("legend",["$log","$http","leafletHelpers","leafletLegendHelpers",function(e,t,n,r){return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(i,a,o,s){var l,u,c,f,d=n.isArray,p=n.isDefined,h=n.isFunction,g=s.getLeafletScope(),v=g.legend;g.$watch("legend",function(e){p(e)&&(l=e.legendClass?e.legendClass:"legend",u=e.position||"bottomright",f=e.type||"arcgis")},!0),s.getMap().then(function(n){g.$watch("legend",function(t){return p(t)?p(t.url)||"arcgis"!==f||d(t.colors)&&d(t.labels)&&t.colors.length===t.labels.length?p(t.url)?void e.info("[AngularJS - Leaflet] loading legend service."):(p(c)&&(c.removeFrom(n),c=null),c=L.control({position:u}),"arcgis"===f&&(c.onAdd=r.getOnAddArrayLegend(t,l)),void c.addTo(n)):void e.warn("[AngularJS - Leaflet] legend.colors and legend.labels must be set."):void(p(c)&&(c.removeFrom(n),c=null))}),g.$watch("legend.url",function(i){p(i)&&t.get(i).success(function(e){p(c)?r.updateLegend(c.getContainer(),e,f,i):(c=L.control({position:u}),c.onAdd=r.getOnAddLegend(e,l,f,i),c.addTo(n)),p(v.loadedData)&&h(v.loadedData)&&v.loadedData()}).error(function(){e.warn("[AngularJS - Leaflet] legend.url not loaded.")})})})}}}]),angular.module("leaflet-directive").directive("markers",["$log","$rootScope","$q","leafletData","leafletHelpers","leafletMapDefaults","leafletMarkersHelpers","leafletMarkerEvents","leafletIterators","leafletWatchHelpers","leafletDirectiveControlsHelpers",function(e,t,n,r,i,a,o,s,l,u,c){var f=i.isDefined,d=i.errorHeader,p=i,h=i.isString,g=o.addMarkerWatcher,v=o.updateMarker,m=o.listenMarkerEvents,$=o.addMarkerToGroup,y=o.createMarker,b=o.deleteMarker,w=l,x=i.watchOptions,C=u.maybeWatch,k=c.extend,S=function(e,t,n){if(Object.keys(e).length){if(n&&h(n)){if(!e[n]||!Object.keys(e[n]).length)return;return e[n][t]}return e[t]}},A=function(e,t,n,r){return r&&h(r)?(f(t[r])||(t[r]={}),t[r][n]=e):t[n]=e,e},E=function(t,n,r,i,a,o){if(!h(t))return e.error(d+" A layername must be a string"),!1;if(!f(n))return e.error(d+" You must add layers to the directive if the markers are going to use this functionality."),!1;if(!f(n.overlays)||!f(n.overlays[t]))return e.error(d+' A marker can only be added to a layer of type "group"'),!1;var s=n.overlays[t];return s instanceof L.LayerGroup||s instanceof L.FeatureGroup?(s.addLayer(i),!a&&o.hasLayer(i)&&!0===r.focus&&i.openPopup(),!0):(e.error(d+' Adding a marker to an overlay needs a overlay of the type "group" or "featureGroup"'),!1)},M=function(t,n,r,i,a,o,l,u,c,h){for(var b in n)if(!h[b])if(-1===b.search("-")){var w=p.copy(n[b]),L=p.getObjectDotPath(c?[c,b]:[b]),x=S(o,b,c);if(f(x)){var C=f(C)?r[b]:void 0;v(w,C,x,L,l,a,i)}else{var k=y(w),M=(w?w.layer:void 0)||c;if(!f(k)){e.error(d+" Received invalid data on the marker "+b+".");continue}if(A(k,o,b,c),f(w.message)&&k.bindPopup(w.message,w.popupOptions),f(w.group)){var O=f(w.groupOption)?w.groupOption:null;$(k,w.group,O,i)}if(p.LabelPlugin.isLoaded()&&f(w.label)&&f(w.label.message)&&k.bindLabel(w.label.message,w.label.options),f(w)&&(f(w.layer)||f(c))){var P=E(M,a,w,k,u.individual.doWatch,i);if(!P)continue}else f(w.group)||(i.addLayer(k),u.individual.doWatch||!0!==w.focus||k.openPopup());u.individual.doWatch&&g(k,L,l,a,i,u.individual.isDeep),m(k,w,l,u.individual.doWatch,i),s.bindEvents(t,k,L,w,l,M)}}else e.error('The marker can\'t use a "-" on his key name: "'+b+'".')},O=function(t,n,r,i,a){var o,s,l=!1,u=!1,c=f(n);for(var h in r)l||(e.debug(d+"[markers] destroy: "),l=!0),c&&(s=t[h],o=n[h],u=angular.equals(s,o)&&i),f(t)&&Object.keys(t).length&&f(t[h])&&Object.keys(t[h]).length&&!u||a&&p.isFunction(a)&&a(s,o,h)},P=function(t,n,r,i,a){O(t,n,r,!1,function(t,n,o){e.debug(d+"[marker] is deleting marker: "+o),b(r[o],i,a),delete r[o]})},T=function(t,n,r){var i={};return O(t,n,r,!0,function(t,n,r){e.debug(d+"[marker] is already rendered, marker: "+r),i[r]=t}),i};return{restrict:"A",scope:!1,replace:!1,require:["leaflet","?layers"],link:function(e,t,i,a){var o=a[0],s=o.getLeafletScope();o.getMap().then(function(e){var t,o={};t=f(a[1])?a[1].getLayers:function(){var e=n.defer();return e.resolve(),e.promise};var l=s.markersWatchOptions||x;f(i.watchMarkers)&&(l.doWatch=l.individual.doWatch=!f(i.watchMarkers)||p.isTruthy(i.watchMarkers));var u=f(i.markersNested)&&p.isTruthy(i.markersNested);t().then(function(t){var n=function(n,r){return u?void w.each(n,function(n,i){var a=f(a)?r[i]:void 0;P(n,a,o[i],e,t)}):void P(n,r,o,e,t)},a=function(r,a){n(r,a);var c=null;return u?void w.each(r,function(n,u){var d=f(d)?a[u]:void 0;c=T(r[u],d,o[u]),M(i.id,n,a,e,t,o,s,l,u,c)}):(c=T(r,a,o),void M(i.id,r,a,e,t,o,s,l,void 0,c))};k(i.id,"markers",a,n),r.setMarkers(o,i.id),C(s,"markers",l,function(e,t){a(e,t)})})})}}}]),angular.module("leaflet-directive").directive("maxbounds",["$log","leafletMapDefaults","leafletBoundsHelpers","leafletHelpers",function(e,t,n,r){return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(e,t,i,a){var o=a.getLeafletScope(),s=n.isValidBounds,l=r.isNumber;a.getMap().then(function(e){o.$watch("maxbounds",function(t){if(!s(t))return void e.setMaxBounds();var r=n.createLeafletBounds(t);l(t.pad)&&(r=r.pad(t.pad)),e.setMaxBounds(r),i.center||i.lfCenter||e.fitBounds(r)})})}}}]),angular.module("leaflet-directive").directive("paths",["$log","$q","leafletData","leafletMapDefaults","leafletHelpers","leafletPathsHelpers","leafletPathEvents",function(e,t,n,r,i,a,o){return{restrict:"A",scope:!1,replace:!1,require:["leaflet","?layers"],link:function(s,l,u,c){var f=c[0],d=i.isDefined,p=i.isString,h=f.getLeafletScope(),g=h.paths,v=a.createPath,m=o.bindPathEvents,$=a.setPathOptions;f.getMap().then(function(a){var o,s=r.getDefaults(u.id);o=d(c[1])?c[1].getLayers:function(){var e=t.defer();return e.resolve(),e.promise},d(g)&&o().then(function(t){var r={};n.setPaths(r,u.id);var o=!d(u.watchPaths)||"true"===u.watchPaths,l=function(e,n){var r=h.$watch('paths["'+n+'"]',function(n,i){if(!d(n)){if(d(i.layer))for(var o in t.overlays){var s=t.overlays[o];s.removeLayer(e)}return a.removeLayer(e),void r()}$(e,n.type,n)},!0)};h.$watchCollection("paths",function(n){for(var c in r)d(n[c])||(a.removeLayer(r[c]),delete r[c]);for(var f in n)if(0!==f.search("\\$"))if(-1===f.search("-")){if(!d(r[f])){var g=n[f],y=v(f,n[f],s);if(d(y)&&d(g.message)&&y.bindPopup(g.message,g.popupOptions),i.LabelPlugin.isLoaded()&&d(g.label)&&d(g.label.message)&&y.bindLabel(g.label.message,g.label.options),d(g)&&d(g.layer)){if(!p(g.layer)){e.error("[AngularJS - Leaflet] A layername must be a string");continue}if(!d(t)){e.error("[AngularJS - Leaflet] You must add layers to the directive if the markers are going to use this functionality.");continue}if(!d(t.overlays)||!d(t.overlays[g.layer])){e.error('[AngularJS - Leaflet] A path can only be added to a layer of type "group"');continue}var b=t.overlays[g.layer];if(!(b instanceof L.LayerGroup||b instanceof L.FeatureGroup)){e.error('[AngularJS - Leaflet] Adding a path to an overlay needs a overlay of the type "group" or "featureGroup"');continue}r[f]=y,b.addLayer(y),o?l(y,f):$(y,g.type,g)}else d(y)&&(r[f]=y,a.addLayer(y),o?l(y,f):$(y,g.type,g));m(u.id,y,f,g,h)}}else e.error('[AngularJS - Leaflet] The path name "'+f+'" is not valid. It must not include "-" and a number.')})})})}}}]),angular.module("leaflet-directive").directive("tiles",["$log","leafletData","leafletMapDefaults","leafletHelpers",function(e,t,n,r){return{restrict:"A",scope:!1,replace:!1,require:"leaflet",link:function(i,a,o,s){var l=r.isDefined,u=s.getLeafletScope(),c=u.tiles;return l(c)&&l(c.url)?void s.getMap().then(function(e){var r,i=n.getDefaults(o.id);u.$watch("tiles",function(n,a){var s=i.tileLayerOptions,u=i.tileLayer;return!l(n.url)&&l(r)?void e.removeLayer(r):l(r)?!l(n.url)||!l(n.options)||n.type===a.type&&angular.equals(n.options,s)?void(l(n.url)&&r.setUrl(n.url)):(e.removeLayer(r),s=i.tileLayerOptions,angular.copy(n.options,s),u=n.url,r="wms"===n.type?L.tileLayer.wms(u,s):L.tileLayer(u,s),r.addTo(e),void t.setTiles(r,o.id)):(l(n.options)&&angular.copy(n.options,s),l(n.url)&&(u=n.url),r="wms"===n.type?L.tileLayer.wms(u,s):L.tileLayer(u,s),r.addTo(e),void t.setTiles(r,o.id))},!0)}):void e.warn("[AngularJS - Leaflet] The 'tiles' definition doesn't have the 'url' property.")}}}]),["markers","geojson"].forEach(function(e){angular.module("leaflet-directive").directive(e+"WatchOptions",["$log","$rootScope","$q","leafletData","leafletHelpers",function(t,n,r,i,a){var o=a.isDefined,s=a.errorHeader,l=a.isObject,u=a.watchOptions;return{restrict:"A",scope:!1,replace:!1,require:["leaflet"],link:function(n,r,i,a){var c=a[0],f=c.getLeafletScope();c.getMap().then(function(){o(n[e+"WatchOptions"])&&(l(n[e+"WatchOptions"])?angular.extend(u,n[e+"WatchOptions"]):t.error(s+"["+e+"WatchOptions] is not an object"),f[e+"WatchOptions"]=u)})}}}])}),angular.module("leaflet-directive").factory("LeafletEventsHelpersFactory",["$rootScope","$q","$log","leafletHelpers",function(e,t,n,r){var i=r.safeApply,a=r.isDefined,o=r.isObject,s=r.isArray,l=r.errorHeader,u=function(e,t){this.rootBroadcastName=e,n.debug("LeafletEventsHelpersFactory: lObjectType: "+t+"rootBroadcastName: "+e),this.lObjectType=t};return u.prototype.getAvailableEvents=function(){return[]},u.prototype.genDispatchEvent=function(e,t,r,i,a,o,s,l,u){var c=this;return e=e||"",e&&(e="."+e),function(f){var d=c.rootBroadcastName+e+"."+t;n.debug(d),c.fire(i,d,r,f,f.target||a,s,o,l,u)}},u.prototype.fire=function(t,n,r,o,s,l,u,c){i(t,function(){var i={leafletEvent:o,leafletObject:s,modelName:u,model:l};a(c)&&angular.extend(i,{layerName:c}),"emit"===r?t.$emit(n,i):e.$broadcast(n,i)})},u.prototype.bindEvents=function(e,t,r,i,u,c,f){var d=[],p="emit",h=this;if(a(u.eventBroadcast))if(o(u.eventBroadcast))if(a(u.eventBroadcast[h.lObjectType]))if(o(u.eventBroadcast[h.lObjectType])){a(u.eventBroadcast[this.lObjectType].logic)&&"emit"!==u.eventBroadcast[h.lObjectType].logic&&"broadcast"!==u.eventBroadcast[h.lObjectType].logic&&n.warn(l+"Available event propagation logic are: 'emit' or 'broadcast'.");var g=!1,v=!1;a(u.eventBroadcast[h.lObjectType].enable)&&s(u.eventBroadcast[h.lObjectType].enable)&&(g=!0),a(u.eventBroadcast[h.lObjectType].disable)&&s(u.eventBroadcast[h.lObjectType].disable)&&(v=!0),g&&v?n.warn(l+"can not enable and disable events at the same time"):g||v?g?u.eventBroadcast[this.lObjectType].enable.forEach(function(e){-1!==d.indexOf(e)?n.warn(l+"This event "+e+" is already enabled"):-1===h.getAvailableEvents().indexOf(e)?n.warn(l+"This event "+e+" does not exist"):d.push(e)}):(d=this.getAvailableEvents(),u.eventBroadcast[h.lObjectType].disable.forEach(function(e){var t=d.indexOf(e);-1===t?n.warn(l+"This event "+e+" does not exist or has been already disabled"):d.splice(t,1)})):n.warn(l+"must enable or disable events")}else n.warn(l+"event-broadcast."+[h.lObjectType]+" must be an object check your model.");else d=this.getAvailableEvents();else n.error(l+"event-broadcast must be an object check your model.");else d=this.getAvailableEvents();return d.forEach(function(n){t.on(n,h.genDispatchEvent(e,n,p,u,t,r,i,c,f))}),p},u}]).service("leafletEventsHelpers",["LeafletEventsHelpersFactory",function(e){return new e}]),angular.module("leaflet-directive").factory("leafletGeoJsonEvents",["$rootScope","$q","$log","leafletHelpers","LeafletEventsHelpersFactory","leafletData",function(e,t,n,r,i,a){var o=r.safeApply,s=i,l=function(){s.call(this,"leafletDirectiveGeoJson","geojson")};return l.prototype=new s,l.prototype.genDispatchEvent=function(t,n,r,i,l,u,c,f,d){var p=s.prototype.genDispatchEvent.call(this,t,n,r,i,l,u,c,f),h=this;return function(t){"mouseout"===n&&(d.resetStyleOnMouseout&&a.getGeoJSON(d.mapId).then(function(e){(f?e[f]:e).resetStyle(t.target)}),o(i,function(){e.$broadcast(h.rootBroadcastName+".mouseout",t)})),p(t)}},l.prototype.getAvailableEvents=function(){return["click","dblclick","mouseover","mouseout"]},new l}]),angular.module("leaflet-directive").factory("leafletLabelEvents",["$rootScope","$q","$log","leafletHelpers","LeafletEventsHelpersFactory",function(e,t,n,r,i){var a=r,o=i,s=function(){o.call(this,"leafletDirectiveLabel","markers")};return s.prototype=new o,s.prototype.genDispatchEvent=function(e,t,n,r,i,a,s,l){var u=a.replace("markers.","");return o.prototype.genDispatchEvent.call(this,e,t,n,r,i,u,s,l)},s.prototype.getAvailableEvents=function(){return["click","dblclick","mousedown","mouseover","mouseout","contextmenu"]},s.prototype.genEvents=function(e,t,n,r,i,o,s,l){var u=this,c=this.getAvailableEvents(),f=a.getObjectArrayPath("markers."+o);c.forEach(function(t){i.label.on(t,u.genDispatchEvent(e,t,n,r,i.label,f,s,l))})},s.prototype.bindEvents=function(){},new s}]),angular.module("leaflet-directive").factory("leafletMapEvents",["$rootScope","$q","$log","leafletHelpers","leafletEventsHelpers","leafletIterators",function(e,t,n,r,i,a){var o=r.isDefined,s=i.fire,l=function(){return["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","contextmenu","focus","blur","preclick","load","unload","viewreset","movestart","move","moveend","dragstart","drag","dragend","zoomstart","zoomanim","zoomend","zoomlevelschange","resize","autopanstart","layeradd","layerremove","baselayerchange","overlayadd","overlayremove","locationfound","locationerror","popupopen","popupclose","draw:created","draw:edited","draw:deleted","draw:drawstart","draw:drawstop","draw:editstart","draw:editstop","draw:deletestart","draw:deletestop"]},u=function(e,t,r,i){return i&&(i+="."),function(a){var o="leafletDirectiveMap."+i+t;n.debug(o),s(e,o,r,a,a.target,e)}};return{getAvailableMapEvents:l,genDispatchMapEvent:u,notifyCenterChangedToBounds:function(e){e.$broadcast("boundsChanged")},notifyCenterUrlHashChanged:function(e,t,n,r){if(o(n.urlHashCenter)){var i=t.getCenter(),a=i.lat.toFixed(4)+":"+i.lng.toFixed(4)+":"+t.getZoom();o(r.c)&&r.c===a||e.$emit("centerUrlHash",a)}},addEvents:function(e,t,n,r,i){a.each(t,function(t){var a={};a[n]=t,e.on(t,u(r,t,i,e._container.id||""),a)})}}}]),angular.module("leaflet-directive").factory("leafletMarkerEvents",["$rootScope","$q","$log","leafletHelpers","LeafletEventsHelpersFactory","leafletLabelEvents",function(e,t,n,r,i,a){var o=r.safeApply,s=r.isDefined,l=r,u=a,c=i,f=function(){c.call(this,"leafletDirectiveMarker","markers")};return f.prototype=new c,f.prototype.genDispatchEvent=function(t,n,r,i,a,s,l,u){var f=c.prototype.genDispatchEvent.call(this,t,n,r,i,a,s,l,u);return function(t){"click"===n?o(i,function(){e.$broadcast("leafletDirectiveMarkersClick",s)}):"dragend"===n&&(o(i,function(){l.lat=a.getLatLng().lat,l.lng=a.getLatLng().lng}),l.message&&!0===l.focus&&a.openPopup()),f(t)}},f.prototype.getAvailableEvents=function(){return["click","dblclick","mousedown","mouseover","mouseout","contextmenu","dragstart","drag","dragend","move","remove","popupopen","popupclose","touchend","touchstart","touchmove","touchcancel","touchleave"]},f.prototype.bindEvents=function(e,t,n,r,i,a){var o=c.prototype.bindEvents.call(this,e,t,n,r,i,a);l.LabelPlugin.isLoaded()&&s(t.label)&&u.genEvents(e,n,o,i,t,r,a)},new f}]),angular.module("leaflet-directive").factory("leafletPathEvents",["$rootScope","$q","$log","leafletHelpers","leafletLabelEvents","leafletEventsHelpers",function(e,t,n,r,i,a){var o=r.isDefined,s=r.isObject,l=r,u=r.errorHeader,c=i,f=a.fire,d=function(e,t,r,i,a,o,s,l){return e=e||"",e&&(e="."+e),function(u){var c="leafletDirectivePath"+e+"."+t;n.debug(c),f(i,c,r,u,u.target||a,s,o,l)}},p=function(e,t,r,i,a){var f,p,g=[],v="broadcast";if(o(a.eventBroadcast))if(s(a.eventBroadcast))if(o(a.eventBroadcast.path))if(s(a.eventBroadcast.paths))n.warn(u+"event-broadcast.path must be an object check your model.");else{void 0!==a.eventBroadcast.path.logic&&null!==a.eventBroadcast.path.logic&&("emit"!==a.eventBroadcast.path.logic&&"broadcast"!==a.eventBroadcast.path.logic?n.warn(u+"Available event propagation logic are: 'emit' or 'broadcast'."):"emit"===a.eventBroadcast.path.logic&&(v="emit"));var m=!1,$=!1;if(void 0!==a.eventBroadcast.path.enable&&null!==a.eventBroadcast.path.enable&&"object"==typeof a.eventBroadcast.path.enable&&(m=!0),void 0!==a.eventBroadcast.path.disable&&null!==a.eventBroadcast.path.disable&&"object"==typeof a.eventBroadcast.path.disable&&($=!0),m&&$)n.warn(u+"can not enable and disable events at the same time");else if(m||$)if(m)for(f=0;f<a.eventBroadcast.path.enable.length;f++)p=a.eventBroadcast.path.enable[f],-1!==g.indexOf(p)?n.warn(u+"This event "+p+" is already enabled"):-1===h().indexOf(p)?n.warn(u+"This event "+p+" does not exist"):g.push(p);else for(g=h(),f=0;f<a.eventBroadcast.path.disable.length;f++){p=a.eventBroadcast.path.disable[f];var y=g.indexOf(p);-1===y?n.warn(u+"This event "+p+" does not exist or has been already disabled"):g.splice(y,1)}else n.warn(u+"must enable or disable events")}else g=h();else n.error(u+"event-broadcast must be an object check your model.");else g=h();for(f=0;f<g.length;f++)p=g[f],t.on(p,d(e,p,v,a,g,r));l.LabelPlugin.isLoaded()&&o(t.label)&&c.genEvents(e,r,v,a,t,i)},h=function(){return["click","dblclick","mousedown","mouseover","mouseout","contextmenu","add","remove","popupopen","popupclose"]};return{getAvailablePathEvents:h,bindPathEvents:p}}])}(angular)}(angular),function(e,t,n){"use strict";function r(e,n,r){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(i,a,o,s,l){function u(){p&&(r.cancel(p),p=null),f&&(f.$destroy(),f=null),d&&(p=r.leave(d),p.then(function(){p=null}),d=null)}function c(){var o=e.current&&e.current.locals;if(t.isDefined(o&&o.$template)){var o=i.$new(),s=e.current;d=l(o,function(e){r.enter(e,null,d||a).then(function(){!t.isDefined(h)||h&&!i.$eval(h)||n()}),u()}),f=s.scope=o,f.$emit("$viewContentLoaded"),f.$eval(g)}else u()}var f,d,p,h=o.autoscroll,g=o.onload||"";i.$on("$routeChangeSuccess",c),c()}}}function i(e,t,n){return{restrict:"ECA",priority:-400,link:function(r,i){var a=n.current,o=a.locals;i.html(o.$template);var s=e(i.contents());a.controller&&(o.$scope=r,o=t(a.controller,o),a.controllerAs&&(r[a.controllerAs]=o),i.data("$ngControllerController",o),i.children().data("$ngControllerController",o)),s(r)}}}e=t.module("ngRoute",["ng"]).provider("$route",function(){function e(e,n){return t.extend(Object.create(e),n)}function n(e,t){var n=t.caseInsensitiveMatch,r={originalPath:e,regexp:e},i=r.keys=[];return e=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(e,t,n,r){return e="?"===r?r:null,r="*"===r?r:null,i.push({name:n,optional:!!e}),t=t||"",(e?"":t)+"(?:"+(e?t:"")+(r&&"(.+?)"||"([^/]+)")+(e||"")+")"+(e||"")}).replace(/([\/$\*])/g,"\\$1"),r.regexp=new RegExp("^"+e+"$",n?"i":""),r}var r={};this.when=function(e,i){var a=t.copy(i);if(t.isUndefined(a.reloadOnSearch)&&(a.reloadOnSearch=!0),t.isUndefined(a.caseInsensitiveMatch)&&(a.caseInsensitiveMatch=this.caseInsensitiveMatch),r[e]=t.extend(a,e&&n(e,a)),e){var o="/"==e[e.length-1]?e.substr(0,e.length-1):e+"/";r[o]=t.extend({redirectTo:e},n(o,a))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(e){return"string"==typeof e&&(e={redirectTo:e}),this.when(null,e),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(n,i,o,s,l,u,c){function f(e){var r=$.current;(v=(g=p())&&r&&g.$$route===r.$$route&&t.equals(g.pathParams,r.pathParams)&&!g.reloadOnSearch&&!m)||!r&&!g||n.$broadcast("$routeChangeStart",g,r).defaultPrevented&&e&&e.preventDefault()}function d(){var e=$.current,r=g;v?(e.params=r.params,t.copy(e.params,o),n.$broadcast("$routeUpdate",e)):(r||e)&&(m=!1,($.current=r)&&r.redirectTo&&(t.isString(r.redirectTo)?i.path(h(r.redirectTo,r.params)).search(r.params).replace():i.url(r.redirectTo(r.pathParams,i.path(),i.search())).replace()),s.when(r).then(function(){if(r){var e,n,i=t.extend({},r.resolve);return t.forEach(i,function(e,n){i[n]=t.isString(e)?l.get(e):l.invoke(e,null,null,n)}),t.isDefined(e=r.template)?t.isFunction(e)&&(e=e(r.params)):t.isDefined(n=r.templateUrl)&&(t.isFunction(n)&&(n=n(r.params)),t.isDefined(n)&&(r.loadedTemplateUrl=c.valueOf(n),e=u(n))),t.isDefined(e)&&(i.$template=e),s.all(i)}}).then(function(i){r==$.current&&(r&&(r.locals=i,t.copy(r.params,o)),n.$broadcast("$routeChangeSuccess",r,e))},function(t){r==$.current&&n.$broadcast("$routeChangeError",r,e,t)}))}function p(){var n,a;return t.forEach(r,function(r,o){var s;if(s=!a){var l=i.path();s=r.keys;var u={};if(r.regexp)if(l=r.regexp.exec(l)){for(var c=1,f=l.length;c<f;++c){var d=s[c-1],p=l[c];d&&p&&(u[d.name]=p)}s=u}else s=null;else s=null;s=n=s}s&&(a=e(r,{params:t.extend({},i.search(),n),pathParams:n}),a.$$route=r)}),a||r[null]&&e(r[null],{params:{},pathParams:{}})}function h(e,n){var r=[];return t.forEach((e||"").split(":"),function(e,t){if(0===t)r.push(e);else{var i=e.match(/(\w+)(?:[?*])?(.*)/),a=i[1];r.push(n[a]),r.push(i[2]||""),delete n[a]}}),r.join("")}var g,v,m=!1,$={routes:r,reload:function(){m=!0,n.$evalAsync(function(){f(),d()})},updateParams:function(e){if(!this.current||!this.current.$$route)throw a("norout");e=t.extend({},this.current.params,e),i.path(h(this.current.$$route.originalPath,e)),i.search(e)}};return n.$on("$locationChangeStart",f),n.$on("$locationChangeSuccess",d),$}]});var a=t.$$minErr("ngRoute");e.provider("$routeParams",function(){this.$get=function(){return{}}}),e.directive("ngView",r),e.directive("ngView",i),r.$inject=["$route","$anchorScroll","$animate"],i.$inject=["$compile","$controller","$route"]}(window,window.angular),function(e,t,n){"use strict";function r(e,t){return t=t||Error,function(){var n,r,i=arguments,a=i[0],o="["+(e?e+":":"")+a+"] ",s=i[1];for(o+=s.replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1),n=t+2;return n<i.length?$e(i[n]):e}),o+="\nhttp://errors.angularjs.org/1.4.7/"+(e?e+"/":"")+a,r=2,n="?";r<i.length;r++,n="&")o+=n+"p"+(r-2)+"="+encodeURIComponent($e(i[r]));return new t(o)}}function i(e){if(null==e||E(e))return!1;var t="length"in Object(e)&&e.length;return!(e.nodeType!==zr||!t)||(x(e)||jr(e)||0===t||"number"==typeof t&&t>0&&t-1 in e)}function a(e,t,n){var r,o;if(e)if(S(e))for(r in e)"prototype"==r||"length"==r||"name"==r||e.hasOwnProperty&&!e.hasOwnProperty(r)||t.call(n,e[r],r,e);else if(jr(e)||i(e)){var s="object"!=typeof e;for(r=0,o=e.length;r<o;r++)(s||r in e)&&t.call(n,e[r],r,e)}else if(e.forEach&&e.forEach!==a)e.forEach(t,n,e);else if(L(e))for(r in e)t.call(n,e[r],r,e);else if("function"==typeof e.hasOwnProperty)for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e);else for(r in e)yr.call(e,r)&&t.call(n,e[r],r,e);return e}function o(e,t,n){for(var r=Object.keys(e).sort(),i=0;i<r.length;i++)t.call(n,e[r[i]],r[i]);return r}function s(e){return function(t,n){e(n,t)}}function l(){return++Hr}function u(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function c(e,t,n){for(var r=e.$$hashKey,i=0,a=t.length;i<a;++i){var o=t[i];if(w(o)||S(o))for(var s=Object.keys(o),l=0,f=s.length;l<f;l++){var d=s[l],p=o[d];n&&w(p)?k(p)?e[d]=new Date(p.valueOf()):A(p)?e[d]=new RegExp(p):(w(e[d])||(e[d]=jr(p)?[]:{}),c(e[d],[p],!0)):e[d]=p}}return u(e,r),e}function f(e){return c(e,Ar.call(arguments,1),!1)}function d(e){return c(e,Ar.call(arguments,1),!0)}function p(e){return parseInt(e,10)}function h(e,t){return f(Object.create(e),t)}function g(){}function v(e){return e}function m(e){return function(){return e}}function $(e){return S(e.toString)&&e.toString!==Object.prototype.toString}function y(e){return void 0===e}function b(e){return void 0!==e}function w(e){return null!==e&&"object"==typeof e}function L(e){return null!==e&&"object"==typeof e&&!Pr(e)}function x(e){return"string"==typeof e}function C(e){return"number"==typeof e}function k(e){return"[object Date]"===Or.call(e)}function S(e){return"function"==typeof e}function A(e){return"[object RegExp]"===Or.call(e)}function E(e){return e&&e.window===e}function M(e){return e&&e.$evalAsync&&e.$watch}function O(e){return"[object File]"===Or.call(e)}function P(e){return"[object FormData]"===Or.call(e)}function T(e){return"[object Blob]"===Or.call(e)}function D(e){return"boolean"==typeof e}function H(e){return e&&S(e.then)}function N(e){return Rr.test(Or.call(e))}function j(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function R(e){var t,n={},r=e.split(",");for(t=0;t<r.length;t++)n[r[t]]=!0;return n}function V(e){return $r(e.nodeName||e[0]&&e[0].nodeName)}function I(e,t){var n=e.indexOf(t);return n>=0&&e.splice(n,1),n}function B(e,t,n,r){if(E(e)||M(e))throw Tr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(N(t))throw Tr("cpta","Can't copy! TypedArray destination cannot be mutated.");if(t){if(e===t)throw Tr("cpi","Can't copy! Source and destination are identical.");n=n||[],r=r||[],w(e)&&(n.push(e),r.push(t));var i;if(jr(e)){t.length=0;for(var o=0;o<e.length;o++)t.push(B(e[o],null,n,r))}else{var s=t.$$hashKey;if(jr(t)?t.length=0:a(t,function(e,n){delete t[n]}),L(e))for(i in e)t[i]=B(e[i],null,n,r);else if(e&&"function"==typeof e.hasOwnProperty)for(i in e)e.hasOwnProperty(i)&&(t[i]=B(e[i],null,n,r));else for(i in e)yr.call(e,i)&&(t[i]=B(e[i],null,n,r));u(t,s)}}else if(t=e,w(e)){var l;if(n&&-1!==(l=n.indexOf(e)))return r[l];if(jr(e))return B(e,[],n,r);if(N(e))t=new e.constructor(e);else if(k(e))t=new Date(e.getTime());else if(A(e))t=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0]),t.lastIndex=e.lastIndex;else{if(!S(e.cloneNode)){var c=Object.create(Pr(e));return B(e,c,n,r)}t=e.cloneNode(!0)}r&&(n.push(e),r.push(t))}return t}function _(e,t){if(jr(e)){t=t||[];for(var n=0,r=e.length;n<r;n++)t[n]=e[n]}else if(w(e)){t=t||{};for(var i in e)"$"===i.charAt(0)&&"$"===i.charAt(1)||(t[i]=e[i])}return t||e}function F(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var n,r,i,a=typeof e,o=typeof t;if(a==o&&"object"==a){if(!jr(e)){if(k(e))return!!k(t)&&F(e.getTime(),t.getTime());if(A(e))return!!A(t)&&e.toString()==t.toString();if(M(e)||M(t)||E(e)||E(t)||jr(t)||k(t)||A(t))return!1;i=ge();for(r in e)if("$"!==r.charAt(0)&&!S(e[r])){if(!F(e[r],t[r]))return!1;i[r]=!0}for(r in t)if(!(r in i)&&"$"!==r.charAt(0)&&b(t[r])&&!S(t[r]))return!1;return!0}if(!jr(t))return!1;if((n=e.length)==t.length){for(r=0;r<n;r++)if(!F(e[r],t[r]))return!1;return!0}}return!1}function U(e,t,n){return e.concat(Ar.call(t,n))}function q(e,t){return Ar.call(e,t||0)}function z(e,t){var n=arguments.length>2?q(arguments,2):[];return!S(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,U(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function G(e,r){var i=r;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?i=n:E(r)?i="$WINDOW":r&&t===r?i="$DOCUMENT":M(r)&&(i="$SCOPE"),i}function W(e,t){return void 0===e?n:(C(t)||(t=t?2:null),JSON.stringify(e,G,t))}function J(e){return x(e)?JSON.parse(e):e}function Z(e,t){var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function Y(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function K(e,t,n){return n=n?-1:1,Y(e,n*(Z(t,e.getTimezoneOffset())-e.getTimezoneOffset()))}function Q(e){e=Cr(e).clone();try{e.empty()}catch(e){}var t=Cr("<div>").append(e).html();try{return e[0].nodeType===Gr?$r(t):t.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+$r(t)})}catch(e){return $r(t)}}function X(e){try{return decodeURIComponent(e)}catch(e){}}function ee(e){var t={};return a((e||"").split("&"),function(e){var n,r,i;e&&(r=e=e.replace(/\+/g,"%20"),n=e.indexOf("="),-1!==n&&(r=e.substring(0,n),i=e.substring(n+1)),r=X(r),b(r)&&(i=!b(i)||X(i),yr.call(t,r)?jr(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i))}),t}function te(e){var t=[];return a(e,function(e,n){jr(e)?a(e,function(e){t.push(re(n,!0)+(!0===e?"":"="+re(e,!0)))}):t.push(re(n,!0)+(!0===e?"":"="+re(e,!0)))}),t.length?t.join("&"):""}function ne(e){return re(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function re(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function ie(e,t){var n,r,i=Fr.length;for(r=0;r<i;++r)if(n=Fr[r]+t,x(n=e.getAttribute(n)))return n;return null}function ae(e,t){var n,r,i={};a(Fr,function(t){var i=t+"app";!n&&e.hasAttribute&&e.hasAttribute(i)&&(n=e,r=e.getAttribute(i))}),a(Fr,function(t){var i,a=t+"app";!n&&(i=e.querySelector("["+a.replace(":","\\:")+"]"))&&(n=i,r=i.getAttribute(a))}),n&&(i.strictDi=null!==ie(n,"strict-di"),t(n,r?[r]:[],i))}function oe(n,r,i){w(i)||(i={}),i=f({strictDi:!1},i);var o=function(){if(n=Cr(n),n.injector()){var e=n[0]===t?"document":Q(n);throw Tr("btstrpd","App Already Bootstrapped with this Element '{0}'",e.replace(/</,"<").replace(/>/,">"))}r=r||[],r.unshift(["$provide",function(e){e.value("$rootElement",n)}]),i.debugInfoEnabled&&r.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),r.unshift("ng");var a=Ye(r,i.strictDi);return a.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),a},s=/^NG_ENABLE_DEBUG_INFO!/,l=/^NG_DEFER_BOOTSTRAP!/;if(e&&s.test(e.name)&&(i.debugInfoEnabled=!0,
e.name=e.name.replace(s,"")),e&&!l.test(e.name))return o();e.name=e.name.replace(l,""),Dr.resumeBootstrap=function(e){return a(e,function(e){r.push(e)}),o()},S(Dr.resumeDeferredBootstrap)&&Dr.resumeDeferredBootstrap()}function se(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function le(e){var t=Dr.element(e).injector();if(!t)throw Tr("test","no injector found for element argument to getTestability");return t.get("$$testability")}function ue(e,t){return t=t||"_",e.replace(Ur,function(e,n){return(n?t:"")+e.toLowerCase()})}function ce(e,t,n){if(!e)throw Tr("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function fe(e,t,n){return n&&jr(e)&&(e=e[e.length-1]),ce(S(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function de(e,t){if("hasOwnProperty"===e)throw Tr("badname","hasOwnProperty is not a valid {0} name",t)}function pe(e,t,n){if(!t)return e;for(var r,i=t.split("."),a=e,o=i.length,s=0;s<o;s++)r=i[s],e&&(e=(a=e)[r]);return!n&&S(e)?z(a,e):e}function he(e){for(var t,n=e[0],r=e[e.length-1],i=1;n!==r&&(n=n.nextSibling);i++)(t||e[i]!==n)&&(t||(t=Cr(Ar.call(e,0,i))),t.push(n));return t||e}function ge(){return Object.create(null)}function ve(e){function t(e,t,n){return e[t]||(e[t]=n())}var n=r("$injector"),i=r("ng"),a=t(e,"angular",Object);return a.$$minErr=a.$$minErr||r,t(a,"module",function(){var e={};return function(r,a,o){return function(e,t){if("hasOwnProperty"===e)throw i("badname","hasOwnProperty is not a valid {0} name",t)}(r,"module"),a&&e.hasOwnProperty(r)&&(e[r]=null),t(e,r,function(){function e(e,t,n,r){return r||(r=i),function(){return r[n||"push"]([e,t,arguments]),c}}function t(e,t){return function(n,a){return a&&S(a)&&(a.$$moduleName=r),i.push([e,t,arguments]),c}}if(!a)throw n("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",r);var i=[],s=[],l=[],u=e("$injector","invoke","push",s),c={_invokeQueue:i,_configBlocks:s,_runBlocks:l,requires:a,name:r,provider:t("$provide","provider"),factory:t("$provide","factory"),service:t("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),decorator:t("$provide","decorator"),animation:t("$animateProvider","register"),filter:t("$filterProvider","register"),controller:t("$controllerProvider","register"),directive:t("$compileProvider","directive"),config:u,run:function(e){return l.push(e),this}};return o&&u(o),c})}})}function me(e){var t=[];return JSON.stringify(e,function(e,n){if(n=G(e,n),w(n)){if(t.indexOf(n)>=0)return"...";t.push(n)}return n})}function $e(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):y(e)?"undefined":"string"!=typeof e?me(e):e}function ye(){return++Qr}function be(e){return e.replace(ti,function(e,t,n,r){return r?n.toUpperCase():n}).replace(ni,"Moz$1")}function we(e){return!oi.test(e)}function Le(e){var t=e.nodeType;return t===zr||!t||t===Jr}function xe(e){for(var t in Kr[e.ng339])return!0;return!1}function Ce(e,t){var n,r,i,o,s=t.createDocumentFragment(),l=[];if(we(e))l.push(t.createTextNode(e));else{for(n=n||s.appendChild(t.createElement("div")),r=(si.exec(e)||["",""])[1].toLowerCase(),i=ui[r]||ui._default,n.innerHTML=i[1]+e.replace(li,"<$1></$2>")+i[2],o=i[0];o--;)n=n.lastChild;l=U(l,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",a(l,function(e){s.appendChild(e)}),s}function ke(e,n){n=n||t;var r;return(r=ai.exec(e))?[n.createElement(r[1])]:(r=Ce(e,n))?r.childNodes:[]}function Se(e){if(e instanceof Se)return e;var t;if(x(e)&&(e=Vr(e),t=!0),!(this instanceof Se)){if(t&&"<"!=e.charAt(0))throw ii("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Se(e)}t?je(this,ke(e)):je(this,e)}function Ae(e){return e.cloneNode(!0)}function Ee(e,t){if(t||Oe(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,i=n.length;r<i;r++)Oe(n[r])}function Me(e,t,n,r){if(b(r))throw ii("offargs","jqLite#off() does not support the `selector` argument");var i=Pe(e),o=i&&i.events,s=i&&i.handle;if(s)if(t)a(t.split(" "),function(t){if(b(n)){var r=o[t];if(I(r||[],n),r&&r.length>0)return}ei(e,t,s),delete o[t]});else for(t in o)"$destroy"!==t&&ei(e,t,s),delete o[t]}function Oe(e,t){var r=e.ng339,i=r&&Kr[r];if(i){if(t)return void delete i.data[t];i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),Me(e)),delete Kr[r],e.ng339=n}}function Pe(e,t){var r=e.ng339,i=r&&Kr[r];return t&&!i&&(e.ng339=r=ye(),i=Kr[r]={events:{},data:{},handle:n}),i}function Te(e,t,n){if(Le(e)){var r=b(n),i=!r&&t&&!w(t),a=!t,o=Pe(e,!i),s=o&&o.data;if(r)s[t]=n;else{if(a)return s;if(i)return s&&s[t];f(s,t)}}}function De(e,t){return!!e.getAttribute&&(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function He(e,t){t&&e.setAttribute&&a(t.split(" "),function(t){e.setAttribute("class",Vr((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Vr(t)+" "," ")))})}function Ne(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");a(t.split(" "),function(e){e=Vr(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",Vr(n))}}function je(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var r=0;r<n;r++)e[e.length++]=t[r]}else e[e.length++]=t}}function Re(e,t){return Ve(e,"$"+(t||"ngController")+"Controller")}function Ve(e,t,n){e.nodeType==Jr&&(e=e.documentElement);for(var r=jr(t)?t:[t];e;){for(var i=0,a=r.length;i<a;i++)if(b(n=Cr.data(e,r[i])))return n;e=e.parentNode||e.nodeType===Zr&&e.host}}function Ie(e){for(Ee(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function Be(e,t){t||Ee(e);var n=e.parentNode;n&&n.removeChild(e)}function _e(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):Cr(n).on("load",t)}function Fe(e,t){var n=fi[t.toLowerCase()];return n&&di[V(e)]&&n}function Ue(e){return pi[e]}function qe(e,t){var n=function(n,r){n.isDefaultPrevented=function(){return n.defaultPrevented};var i=t[r||n.type],a=i?i.length:0;if(a){if(y(n.immediatePropagationStopped)){var o=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),o&&o.call(n)}}n.isImmediatePropagationStopped=function(){return!0===n.immediatePropagationStopped},a>1&&(i=_(i));for(var s=0;s<a;s++)n.isImmediatePropagationStopped()||i[s].call(e,n)}};return n.elem=e,n}function ze(){this.$get=function(){return f(Se,{hasClass:function(e,t){return e.attr&&(e=e[0]),De(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),Ne(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),He(e,t)}})}}function Ge(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var r=typeof e;return n="function"==r||"object"==r&&null!==e?e.$$hashKey=r+":"+(t||l)():r+":"+e}function We(e,t){if(t){var n=0;this.nextUid=function(){return++n}}a(e,this.put,this)}function Je(e){var t=e.toString().replace($i,""),n=t.match(gi);return n?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Ze(e,t,n){var r,i,o,s;if("function"==typeof e){if(!(r=e.$inject)){if(r=[],e.length){if(t)throw x(n)&&n||(n=e.name||Je(e)),yi("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);i=e.toString().replace($i,""),o=i.match(gi),a(o[1].split(vi),function(e){e.replace(mi,function(e,t,n){r.push(n)})})}e.$inject=r}}else jr(e)?(s=e.length-1,fe(e[s],"fn"),r=e.slice(0,s)):fe(e,"fn",!0);return r}function Ye(e,t){function r(e){return function(t,n){if(!w(t))return e(t,n);a(t,s(e))}}function i(e,t){if(de(e,"service"),(S(t)||jr(t))&&(t=C.instantiate(t)),!t.$get)throw yi("pget","Provider '{0}' must define $get factory method.",e);return L[e+v]=t}function o(e,t){return function(){var n=A.invoke(t,this);if(y(n))throw yi("undef","Provider '{0}' must return a value from $get factory method.",e);return n}}function l(e,t,n){return i(e,{$get:!1!==n?o(e,t):t})}function u(e,t){return l(e,["$injector",function(e){return e.instantiate(t)}])}function c(e,t){return l(e,m(t),!1)}function f(e,t){de(e,"constant"),L[e]=t,k[e]=t}function d(e,t){var n=C.get(e+v),r=n.$get;n.$get=function(){var e=A.invoke(r,n);return A.invoke(t,null,{$delegate:e})}}function p(e){ce(y(e)||jr(e),"modulesToLoad","not an array");var t,n=[];return a(e,function(e){function r(e){var t,n;for(t=0,n=e.length;t<n;t++){var r=e[t],i=C.get(r[0]);i[r[1]].apply(i,r[2])}}if(!b.get(e)){b.put(e,!0);try{x(e)?(t=Sr(e),n=n.concat(p(t.requires)).concat(t._runBlocks),r(t._invokeQueue),r(t._configBlocks)):S(e)?n.push(C.invoke(e)):jr(e)?n.push(C.invoke(e)):fe(e,"module")}catch(t){throw jr(e)&&(e=e[e.length-1]),t.message&&t.stack&&-1==t.stack.indexOf(t.message)&&(t=t.message+"\n"+t.stack),yi("modulerr","Failed to instantiate module {0} due to:\n{1}",e,t.stack||t.message||t)}}}),n}function h(e,n){function r(t,r){if(e.hasOwnProperty(t)){if(e[t]===g)throw yi("cdep","Circular dependency found: {0}",t+" <- "+$.join(" <- "));return e[t]}try{return $.unshift(t),e[t]=g,e[t]=n(t,r)}catch(n){throw e[t]===g&&delete e[t],n}finally{$.shift()}}function i(e,n,i,a){"string"==typeof i&&(a=i,i=null);var o,s,l,u=[],c=Ye.$$annotate(e,t,a);for(s=0,o=c.length;s<o;s++){if("string"!=typeof(l=c[s]))throw yi("itkn","Incorrect injection token! Expected service name as string, got {0}",l);u.push(i&&i.hasOwnProperty(l)?i[l]:r(l,a))}return jr(e)&&(e=e[o]),e.apply(n,u)}function a(e,t,n){var r=Object.create((jr(e)?e[e.length-1]:e).prototype||null),a=i(e,r,t,n);return w(a)||S(a)?a:r}return{invoke:i,instantiate:a,get:r,annotate:Ye.$$annotate,has:function(t){return L.hasOwnProperty(t+v)||e.hasOwnProperty(t)}}}t=!0===t;var g={},v="Provider",$=[],b=new We([],!0),L={$provide:{provider:r(i),factory:r(l),service:r(u),value:r(c),constant:r(f),decorator:d}},C=L.$injector=h(L,function(e,t){throw Dr.isString(t)&&$.push(t),yi("unpr","Unknown provider: {0}",$.join(" <- "))}),k={},A=k.$injector=h(k,function(e,t){var r=C.get(e+v,t);return A.invoke(r.$get,r,n,e)});return a(p(e),function(e){e&&A.invoke(e)}),A}function Ke(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,r){function i(e){var t=null;return Array.prototype.some.call(e,function(e){if("a"===V(e))return t=e,!0}),t}function a(){var e=s.yOffset;if(S(e))e=e();else if(j(e)){var n=e[0],r=t.getComputedStyle(n);e="fixed"!==r.position?0:n.getBoundingClientRect().bottom}else C(e)||(e=0);return e}function o(e){if(e){e.scrollIntoView();var n=a();if(n){var r=e.getBoundingClientRect().top;t.scrollBy(0,r-n)}}else t.scrollTo(0,0)}function s(e){e=x(e)?e:n.hash();var t;e?(t=l.getElementById(e))?o(t):(t=i(l.getElementsByName(e)))?o(t):"top"===e&&o(null):o(null)}var l=t.document;return e&&r.$watch(function(){return n.hash()},function(e,t){e===t&&""===e||_e(function(){r.$evalAsync(s)})}),s}]}function Qe(e,t){return e||t?e?t?(jr(e)&&(e=e.join(" ")),jr(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function Xe(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType===wi)return n}}function et(e){x(e)&&(e=e.split(" "));var t=ge();return a(e,function(e){e.length&&(t[e]=!0)}),t}function tt(e){return w(e)?e:{}}function nt(e,t,n,r){function i(e){try{e.apply(null,q(arguments,1))}finally{if(0===--$)for(;b.length;)try{b.pop()()}catch(e){n.error(e)}}}function o(e){var t=e.indexOf("#");return-1===t?"":e.substr(t)}function s(){k=null,u(),c()}function l(){try{return p.state}catch(e){}}function u(){w=l(),w=y(w)?null:w,F(w,E)&&(w=E),E=w}function c(){x===f.url()&&L===w||(x=f.url(),L=w,a(S,function(e){e(f.url(),w)}))}var f=this,d=(t[0],e.location),p=e.history,h=e.setTimeout,v=e.clearTimeout,m={};f.isMock=!1;var $=0,b=[];f.$$completeOutstandingRequest=i,f.$$incOutstandingRequestCount=function(){$++},f.notifyWhenNoOutstandingRequests=function(e){0===$?e():b.push(e)};var w,L,x=d.href,C=t.find("base"),k=null;u(),L=w,f.url=function(t,n,i){if(y(i)&&(i=null),d!==e.location&&(d=e.location),p!==e.history&&(p=e.history),t){var a=L===i;if(x===t&&(!r.history||a))return f;var s=x&&Dt(x)===Dt(t);return x=t,L=i,!r.history||s&&a?(s&&!k||(k=t),n?d.replace(t):s?d.hash=o(t):d.href=t,d.href!==t&&(k=t)):(p[n?"replaceState":"pushState"](i,"",t),u(),L=w),f}return k||d.href.replace(/%27/g,"'")},f.state=function(){return w};var S=[],A=!1,E=null;f.onUrlChange=function(t){return A||(r.history&&Cr(e).on("popstate",s),Cr(e).on("hashchange",s),A=!0),S.push(t),t},f.$$applicationDestroyed=function(){Cr(e).off("hashchange popstate",s)},f.$$checkUrlChange=c,f.baseHref=function(){var e=C.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""},f.defer=function(e,t){var n;return $++,n=h(function(){delete m[n],i(e)},t||0),m[n]=!0,n},f.defer.cancel=function(e){return!!m[e]&&(delete m[e],v(e),i(g),!0)}}function rt(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new nt(e,r,t,n)}]}function it(){this.$get=function(){function e(e,n){function i(e){e!=d&&(p?p==e&&(p=e.n):p=e,a(e.n,e.p),a(e,d),d=e,d.n=null)}function a(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw r("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var o=0,s=f({},n,{id:e}),l={},u=n&&n.capacity||Number.MAX_VALUE,c={},d=null,p=null;return t[e]={put:function(e,t){if(!y(t)){if(u<Number.MAX_VALUE){i(c[e]||(c[e]={key:e}))}return e in l||o++,l[e]=t,o>u&&this.remove(p.key),t}},get:function(e){if(u<Number.MAX_VALUE){var t=c[e];if(!t)return;i(t)}return l[e]},remove:function(e){if(u<Number.MAX_VALUE){var t=c[e];if(!t)return;t==d&&(d=t.p),t==p&&(p=t.n),a(t.n,t.p),delete c[e]}delete l[e],o--},removeAll:function(){l={},o=0,c={},d=p=null},destroy:function(){l=null,s=null,c=null,delete t[e]},info:function(){return f({},s,{size:o})}}}var t={};return e.info=function(){var e={};return a(t,function(t,n){e[n]=t.info()}),e},e.get=function(e){return t[e]},e}}function at(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function ot(e,r){function i(e,t,n){var r=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,i={};return a(e,function(e,a){var o=e.match(r);if(!o)throw Si("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",t,a,e,n?"controller bindings definition":"isolate scope definition");i[a]={mode:o[1][0],collection:"*"===o[2],optional:"?"===o[3],attrName:o[4]||a}}),i}function o(e,t){var n={isolateScope:null,bindToController:null};if(w(e.scope)&&(!0===e.bindToController?(n.bindToController=i(e.scope,t,!0),n.isolateScope={}):n.isolateScope=i(e.scope,t,!1)),w(e.bindToController)&&(n.bindToController=i(e.bindToController,t,!0)),w(n.bindToController)){var r=e.controller,a=e.controllerAs;if(!r)throw Si("noctrl","Cannot bind to controller without directive '{0}'s controller.",t);if(!ct(r,a))throw Si("noident","Cannot bind to controller without identifier for directive '{0}'.",t)}return n}function l(e){var t=e.charAt(0);if(!t||t!==$r(t))throw Si("baddir","Directive name '{0}' is invalid. The first character must be a lowercase letter",e);if(e!==e.trim())throw Si("baddir","Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces",e)}var u={},c="Directive",d=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,p=/(([\w\-]+)(?:\:([^;]+))?;?)/,$=R("ngSrc,ngSrcset,src,srcset"),L=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,C=/^(on[a-z]+|formaction)$/;this.directive=function t(n,r){return de(n,"directive"),x(n)?(l(n),ce(r,"directiveFactory"),u.hasOwnProperty(n)||(u[n]=[],e.factory(n+c,["$injector","$exceptionHandler",function(e,t){var r=[];return a(u[n],function(i,a){try{var s=e.invoke(i);S(s)?s={compile:m(s)}:!s.compile&&s.link&&(s.compile=m(s.link)),s.priority=s.priority||0,s.index=a,s.name=s.name||n,s.require=s.require||s.controller&&s.name,s.restrict=s.restrict||"EA";var l=s.$$bindings=o(s,s.name);w(l.isolateScope)&&(s.$$isolateBindings=l.isolateScope),s.$$moduleName=i.$$moduleName,r.push(s)}catch(e){t(e)}}),r}])),u[n].push(r)):a(n,s(t)),this},this.aHrefSanitizationWhitelist=function(e){return b(e)?(r.aHrefSanitizationWhitelist(e),this):r.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return b(e)?(r.imgSrcSanitizationWhitelist(e),this):r.imgSrcSanitizationWhitelist()};var k=!0;this.debugInfoEnabled=function(e){return b(e)?(k=e,this):k},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(e,r,i,o,s,l,m,b,A,E,O){function P(e,t){try{e.addClass(t)}catch(e){}}function T(e,t,n,r,i){e instanceof Cr||(e=Cr(e)),a(e,function(t,n){t.nodeType==Gr&&t.nodeValue.match(/\S+/)&&(e[n]=Cr(t).wrap("<span></span>").parent()[0])});var o=H(e,t,e,n,r,i);T.$$addScopeClass(e);var s=null;return function(t,n,r){ce(t,"scope"),r=r||{};var i=r.parentBoundTranscludeFn,a=r.transcludeControllers,l=r.futureParentElement;i&&i.$$boundTransclude&&(i=i.$$boundTransclude),s||(s=D(l));var u;if(u="html"!==s?Cr(X(s,Cr("<div>").append(e).html())):n?ci.clone.call(e):e,a)for(var c in a)u.data("$"+c+"Controller",a[c].instance);return T.$$addScopeInfo(u,t),n&&n(u,t),o&&o(t,u,u,i),u}}function D(e){var t=e&&e[0];return t&&"foreignobject"!==V(t)&&t.toString().match(/SVG/)?"svg":"html"}function H(e,t,r,i,a,o){function s(e,r,i,a){var o,s,l,u,c,f,d,p,v;if(h){var m=r.length;for(v=new Array(m),c=0;c<g.length;c+=3)d=g[c],v[d]=r[d]}else v=r;for(c=0,f=g.length;c<f;)if(l=v[g[c++]],o=g[c++],s=g[c++],o){if(o.scope){u=e.$new(),T.$$addScopeInfo(Cr(l),u);var $=o.$$destroyBindings;$&&(o.$$destroyBindings=null,u.$on("$destroyed",$))}else u=e;p=o.transcludeOnThisElement?N(e,o.transclude,a):!o.templateOnThisElement&&a?a:!a&&t?N(e,t):null,o(s,u,l,i,p,o)}else s&&s(e,l.childNodes,n,a)}for(var l,u,c,f,d,p,h,g=[],v=0;v<e.length;v++)l=new oe,u=j(e[v],[],l,0===v?i:n,a),c=u.length?_(u,e[v],l,t,r,null,[],[],o):null,c&&c.scope&&T.$$addScopeClass(l.$$element),d=c&&c.terminal||!(f=e[v].childNodes)||!f.length?null:H(f,c?(c.transcludeOnThisElement||!c.templateOnThisElement)&&c.transclude:t),(c||d)&&(g.push(v,c,d),p=!0,h=h||c),o=null;return p?s:null}function N(e,t,n){return function(r,i,a,o,s){return r||(r=e.$new(!1,s),r.$$transcluded=!0),t(r,i,{parentBoundTranscludeFn:n,transcludeControllers:a,futureParentElement:o})}}function j(e,t,n,r,i){var a,o,s=e.nodeType,l=n.$attr;switch(s){case zr:z(t,st(V(e)),"E",r,i);for(var u,c,f,h,g,v,m=e.attributes,$=0,y=m&&m.length;$<y;$++){var b=!1,L=!1;u=m[$],c=u.name,g=Vr(u.value),h=st(c),(v=de.test(h))&&(c=c.replace(Ai,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var C=h.replace(/(Start|End)$/,"");G(C)&&h===C+"Start"&&(b=c,L=c.substr(0,c.length-5)+"end",c=c.substr(0,c.length-6)),f=st(c.toLowerCase()),l[f]=c,!v&&n.hasOwnProperty(f)||(n[f]=g,Fe(e,f)&&(n[f]=!0)),te(e,t,g,f,v),z(t,f,"A",r,i,b,L)}if(o=e.className,w(o)&&(o=o.animVal),x(o)&&""!==o)for(;a=p.exec(o);)f=st(a[2]),z(t,f,"C",r,i)&&(n[f]=Vr(a[3])),o=o.substr(a.index+a[0].length);break;case Gr:if(11===xr)for(;e.parentNode&&e.nextSibling&&e.nextSibling.nodeType===Gr;)e.nodeValue=e.nodeValue+e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);K(t,e.nodeValue);break;case Wr:try{a=d.exec(e.nodeValue),a&&(f=st(a[1]),z(t,f,"M",r,i)&&(n[f]=Vr(a[2])))}catch(e){}}return t.sort(Z),t}function R(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t))do{if(!e)throw Si("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==zr&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(i>0);else r.push(e);return Cr(r)}function B(e,t,n){return function(r,i,a,o,s){return i=R(i[0],t,n),e(r,i,a,o,s)}}function _(e,r,a,o,s,u,c,f,d){function p(e,t,n,r){e&&(n&&(e=B(e,n,r)),e.require=m.require,e.directiveName=$,(O===m||m.$$isolateScope)&&(e=re(e,{isolateScope:!0})),c.push(e)),t&&(n&&(t=B(t,n,r)),t.require=m.require,t.directiveName=$,(O===m||m.$$isolateScope)&&(t=re(t,{isolateScope:!0})),f.push(t))}function h(e,t,n,r){var i;if(x(t)){var a=t.match(L),o=t.substring(a[0].length),s=a[1]||a[3],l="?"===a[2];if("^^"===s?n=n.parent():(i=r&&r[o],i=i&&i.instance),!i){var u="$"+o+"Controller";i=s?n.inheritedData(u):n.data(u)}if(!i&&!l)throw Si("ctreq","Controller '{0}', required by directive '{1}', can't be found!",o,e)}else if(jr(t)){i=[];for(var c=0,f=t.length;c<f;c++)i[c]=h(e,t[c],n,r)}return i||null}function g(e,t,n,r,i,a){var o=ge();for(var s in r){var u=r[s],c={$scope:u===O||u.$$isolateScope?i:a,$element:e,$attrs:t,$transclude:n},f=u.controller;"@"==f&&(f=t[u.name]);var d=l(f,c,!0,u.controllerAs);o[u.name]=d,V||e.data("$"+u.name+"Controller",d.instance)}return o}function v(e,t,i,o,s,l){function u(e,t,r){var i;return M(e)||(r=t,t=e,e=n),V&&(i=y),r||(r=V?w.parent():w),s(e,t,i,r,D)}var d,p,v,m,$,y,b,w,L;if(r===i?(L=a,w=a.$$element):(w=Cr(i),L=new oe(w,a)),O&&($=t.$new(!0)),s&&(b=u,b.$$boundTransclude=s),E&&(y=g(w,L,b,E,$,t)),O&&(T.$$addScopeInfo(w,$,!0,!(P&&(P===O||P===O.$$originalDirective))),T.$$addScopeClass(w,!0),$.$$isolateBindings=O.$$isolateBindings,ae(t,L,$,$.$$isolateBindings,O,$)),y){var x,C,k=O||A;k&&y[k.name]&&(x=k.$$bindings.bindToController,(m=y[k.name])&&m.identifier&&x&&(C=m,l.$$destroyBindings=ae(t,L,m.instance,x,k)));for(d in y){m=y[d];var S=m();S!==m.instance&&(m.instance=S,w.data("$"+d+"Controller",S),m===C&&(l.$$destroyBindings(),l.$$destroyBindings=ae(t,L,S,x,k)))}}for(d=0,p=c.length;d<p;d++)v=c[d],ie(v,v.isolateScope?$:t,w,L,v.require&&h(v.directiveName,v.require,w,y),b);var D=t;for(O&&(O.template||null===O.templateUrl)&&(D=$),e&&e(D,i.childNodes,n,s),d=f.length-1;d>=0;d--)v=f[d],ie(v,v.isolateScope?$:t,w,L,v.require&&h(v.directiveName,v.require,w,y),b)}d=d||{};for(var m,$,y,b,C,k=-Number.MAX_VALUE,A=d.newScopeDirective,E=d.controllerDirectives,O=d.newIsolateScopeDirective,P=d.templateDirective,D=d.nonTlbTranscludeDirective,H=!1,N=!1,V=d.hasElementTranscludeDirective,I=a.$$element=Cr(r),_=u,F=o,z=0,G=e.length;z<G;z++){m=e[z];var Z=m.$$start,K=m.$$end;if(Z&&(I=R(r,Z,K)),y=n,k>m.priority)break;if((C=m.scope)&&(m.templateUrl||(w(C)?(Y("new/isolated scope",O||A,m,I),O=m):Y("new/isolated scope",O,m,I)),A=A||m),$=m.name,!m.templateUrl&&m.controller&&(C=m.controller,E=E||ge(),Y("'"+$+"' controller",E[$],m,I),E[$]=m),(C=m.transclude)&&(H=!0,m.$$tlb||(Y("transclusion",D,m,I),D=m),"element"==C?(V=!0,k=m.priority,y=I,I=a.$$element=Cr(t.createComment(" "+$+": "+a[$]+" ")),r=I[0],ne(s,q(y),r),F=T(y,o,k,_&&_.name,{nonTlbTranscludeDirective:D})):(y=Cr(Ae(r)).contents(),I.empty(),F=T(y,o))),m.template)if(N=!0,Y("template",P,m,I),P=m,C=S(m.template)?m.template(I,a):m.template,C=fe(C),m.replace){if(_=m,y=we(C)?[]:ut(X(m.templateNamespace,Vr(C))),r=y[0],1!=y.length||r.nodeType!==zr)throw Si("tplrt","Template for directive '{0}' must have exactly one root element. {1}",$,"");ne(s,I,r);var ee={$attr:{}},te=j(r,[],ee),se=e.splice(z+1,e.length-(z+1));O&&U(te),e=e.concat(te).concat(se),W(a,ee),G=e.length}else I.html(C);if(m.templateUrl)N=!0,Y("template",P,m,I),P=m,m.replace&&(_=m),v=J(e.splice(z,e.length-z),I,a,s,H&&F,c,f,{controllerDirectives:E,newScopeDirective:A!==m&&A,newIsolateScopeDirective:O,templateDirective:P,nonTlbTranscludeDirective:D}),G=e.length;else if(m.compile)try{b=m.compile(I,a,F),S(b)?p(null,b,Z,K):b&&p(b.pre,b.post,Z,K)}catch(e){i(e,Q(I))}m.terminal&&(v.terminal=!0,k=Math.max(k,m.priority))}return v.scope=A&&!0===A.scope,v.transcludeOnThisElement=H,v.templateOnThisElement=N,v.transclude=F,d.hasElementTranscludeDirective=V,v}function U(e){for(var t=0,n=e.length;t<n;t++)e[t]=h(e[t],{$$isolateScope:!0})}function z(t,n,r,a,o,s,l){if(n===o)return null;var f=null;if(u.hasOwnProperty(n))for(var d,p=e.get(n+c),g=0,v=p.length;g<v;g++)try{d=p[g],(y(a)||a>d.priority)&&-1!=d.restrict.indexOf(r)&&(s&&(d=h(d,{$$start:s,$$end:l})),t.push(d),f=d)}catch(e){i(e)}return f}function G(t){if(u.hasOwnProperty(t))for(var n,r=e.get(t+c),i=0,a=r.length;i<a;i++)if(n=r[i],n.multiElement)return!0;return!1}function W(e,t){var n=t.$attr,r=e.$attr,i=e.$$element;a(e,function(r,i){"$"!=i.charAt(0)&&(t[i]&&t[i]!==r&&(r+=("style"===i?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),a(t,function(t,a){"class"==a?(P(i,t),e.class=(e.class?e.class+" ":"")+t):"style"==a?(i.attr("style",i.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==a.charAt(0)||e.hasOwnProperty(a)||(e[a]=t,r[a]=n[a])})}function J(e,t,n,r,i,s,l,u){var c,f,d=[],p=t[0],g=e.shift(),v=h(g,{templateUrl:null,transclude:null,replace:null,$$originalDirective:g}),m=S(g.templateUrl)?g.templateUrl(t,n):g.templateUrl,$=g.templateNamespace;return t.empty(),o(m).then(function(o){var h,y,b,L;if(o=fe(o),g.replace){if(b=we(o)?[]:ut(X($,Vr(o))),h=b[0],1!=b.length||h.nodeType!==zr)throw Si("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g.name,m);y={$attr:{}},ne(r,t,h);var x=j(h,[],y);w(g.scope)&&U(x),e=x.concat(e),W(n,y)}else h=p,t.html(o);for(e.unshift(v),c=_(e,h,n,i,t,g,s,l,u),a(r,function(e,n){e==h&&(r[n]=t[0])}),f=H(t[0].childNodes,i);d.length;){var C=d.shift(),k=d.shift(),S=d.shift(),A=d.shift(),E=t[0];if(!C.$$destroyed){if(k!==p){var M=k.className;u.hasElementTranscludeDirective&&g.replace||(E=Ae(h)),ne(S,Cr(k),E),P(Cr(E),M)}L=c.transcludeOnThisElement?N(C,c.transclude,A):A,c(f,C,E,r,L,c)}}d=null}),function(e,t,n,r,i){var a=i;t.$$destroyed||(d?d.push(t,n,r,a):(c.transcludeOnThisElement&&(a=N(t,c.transclude,i)),c(f,t,n,r,a,c)))}}function Z(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function Y(e,t,n,r){function i(e){return e?" (module: "+e+")":""}if(t)throw Si("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",t.name,i(t.$$moduleName),n.name,i(n.$$moduleName),e,Q(r))}function K(e,t){var n=r(t,!0);n&&e.push({priority:0,compile:function(e){var t=e.parent(),r=!!t.length;return r&&T.$$addBindingClass(t),function(e,t){var i=t.parent();r||T.$$addBindingClass(i),T.$$addBindingInfo(i,n.expressions),e.$watch(n,function(e){t[0].nodeValue=e})}}})}function X(e,n){switch(e=$r(e||"html")){case"svg":case"math":var r=t.createElement("div");return r.innerHTML="<"+e+">"+n+"</"+e+">",r.childNodes[0].childNodes;default:return n}}function ee(e,t){if("srcdoc"==t)return A.HTML;var n=V(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?A.RESOURCE_URL:void 0}function te(e,t,n,i,a){var o=ee(e,i);a=$[i]||a;var s=r(n,!0,o,a);if(s){if("multiple"===i&&"select"===V(e))throw Si("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",Q(e));t.push({priority:100,compile:function(){return{pre:function(e,t,l){var u=l.$$observers||(l.$$observers=ge());if(C.test(i))throw Si("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var c=l[i];c!==n&&(s=c&&r(c,!0,o,a),n=c),s&&(l[i]=s(e),(u[i]||(u[i]=[])).$$inter=!0,(l.$$observers&&l.$$observers[i].$$scope||e).$watch(s,function(e,t){"class"===i&&e!=t?l.$updateClass(e,t):l.$set(i,e)}))}}}})}}function ne(e,n,r){var i,a,o=n[0],s=n.length,l=o.parentNode;if(e)for(i=0,a=e.length;i<a;i++)if(e[i]==o){e[i++]=r;for(var u=i,c=u+s-1,f=e.length;u<f;u++,c++)c<f?e[u]=e[c]:delete e[u];e.length-=s-1,e.context===o&&(e.context=r);break}l&&l.replaceChild(r,o);var d=t.createDocumentFragment();d.appendChild(o),Cr.hasData(o)&&(Cr(r).data(Cr(o).data()),kr?(Nr=!0,kr.cleanData([o])):delete Cr.cache[o[Cr.expando]]);for(var p=1,h=n.length;p<h;p++){var g=n[p];Cr(g).remove(),d.appendChild(g),delete n[p]}n[0]=r,n.length=1}function re(e,t){return f(function(){return e.apply(null,arguments)},e,t)}function ie(e,t,n,r,a,o){try{e(t,n,r,a,o)}catch(e){i(e,Q(n))}}function ae(e,t,n,i,o,l){var u;a(i,function(i,a){var l,c,f,d,p=i.attrName,h=i.optional,v=i.mode;switch(v){case"@":h||yr.call(t,p)||(n[a]=t[p]=void 0),t.$observe(p,function(e){x(e)&&(n[a]=e)}),t.$$observers[p].$$scope=e,x(t[p])&&(n[a]=r(t[p])(e));break;case"=":if(!yr.call(t,p)){if(h)break;t[p]=void 0}if(h&&!t[p])break;c=s(t[p]),d=c.literal?F:function(e,t){return e===t||e!==e&&t!==t},f=c.assign||function(){throw l=n[a]=c(e),Si("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",t[p],o.name)},l=n[a]=c(e);var m=function(t){return d(t,n[a])||(d(t,l)?f(e,t=n[a]):n[a]=t),l=t};m.$stateful=!0;var $;$=i.collection?e.$watchCollection(t[p],m):e.$watch(s(t[p],m),null,c.literal),u=u||[],u.push($);break;case"&":if((c=t.hasOwnProperty(p)?s(t[p]):g)===g&&h)break;n[a]=function(t){return c(e,t)}}});var c=u?function(){for(var e=0,t=u.length;e<t;++e)u[e]()}:g;return l&&c!==g?(l.$on("$destroy",c),g):c}var oe=function(e,t){if(t){var n,r,i,a=Object.keys(t);for(n=0,r=a.length;n<r;n++)i=a[n],this[i]=t[i]}else this.$attr={};this.$$element=e};oe.prototype={$normalize:st,$addClass:function(e){e&&e.length>0&&E.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&E.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=lt(e,t);n&&n.length&&E.addClass(this.$$element,n);var r=lt(t,e);r&&r.length&&E.removeClass(this.$$element,r)},$set:function(e,t,n,r){var o,s=this.$$element[0],l=Fe(s,e),u=Ue(e),c=e;if(l?(this.$$element.prop(e,t),r=l):u&&(this[u]=t,c=u),this[e]=t,r?this.$attr[e]=r:(r=this.$attr[e])||(this.$attr[e]=r=ue(e,"-")),"a"===(o=V(this.$$element))&&"href"===e||"img"===o&&"src"===e)this[e]=t=O(t,"src"===e);else if("img"===o&&"srcset"===e){for(var f="",d=Vr(t),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,h=/\s/.test(d)?p:/(,)/,g=d.split(h),v=Math.floor(g.length/2),m=0;m<v;m++){var $=2*m;f+=O(Vr(g[$]),!0),f+=" "+Vr(g[$+1])}var b=Vr(g[2*m]).split(/\s/);f+=O(Vr(b[0]),!0),2===b.length&&(f+=" "+Vr(b[1])),this[e]=t=f}!1!==n&&(null===t||y(t)?this.$$element.removeAttr(r):this.$$element.attr(r,t));var w=this.$$observers;w&&a(w[c],function(e){try{e(t)}catch(e){i(e)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers=ge()),i=r[e]||(r[e]=[]);return i.push(t),m.$evalAsync(function(){i.$$inter||!n.hasOwnProperty(e)||y(n[e])||t(n[e])}),function(){I(i,t)}}};var se=r.startSymbol(),le=r.endSymbol(),fe="{{"==se||"}}"==le?v:function(e){return e.replace(/\{\{/g,se).replace(/}}/g,le)},de=/^ngAttr[A-Z]/;return T.$$addBindingInfo=k?function(e,t){var n=e.data("$binding")||[];jr(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:g,T.$$addBindingClass=k?function(e){P(e,"ng-binding")}:g,T.$$addScopeInfo=k?function(e,t,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)}:g,T.$$addScopeClass=k?function(e,t){P(e,t?"ng-isolate-scope":"ng-scope")}:g,T}]}function st(e){return be(e.replace(Ai,""))}function lt(e,t){var n="",r=e.split(/\s+/),i=t.split(/\s+/);e:for(var a=0;a<r.length;a++){for(var o=r[a],s=0;s<i.length;s++)if(o==i[s])continue e;n+=(n.length>0?" ":"")+o}return n}function ut(e){e=Cr(e);var t=e.length;if(t<=1)return e;for(;t--;){e[t].nodeType===Wr&&Er.call(e,t,1)}return e}function ct(e,t){if(t&&x(t))return t;if(x(e)){var n=Mi.exec(e);if(n)return n[3]}}function ft(){var e={},t=!1;this.register=function(t,n){de(t,"controller"),w(t)?f(e,t):e[t]=n},this.allowGlobals=function(){t=!0},this.$get=["$injector","$window",function(i,a){function o(e,t,n,i){if(!e||!w(e.$scope))throw r("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,t);e.$scope[t]=n}return function(r,s,l,u){var c,d,p,h;if(l=!0===l,u&&x(u)&&(h=u),x(r)){if(!(d=r.match(Mi)))throw Ei("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",r);p=d[1],h=h||d[3],r=e.hasOwnProperty(p)?e[p]:pe(s.$scope,p,!0)||(t?pe(a,p,!0):n),fe(r,p,!0)}if(l){var g=(jr(r)?r[r.length-1]:r).prototype;c=Object.create(g||null),h&&o(s,h,c,p||r.name);return f(function(){var e=i.invoke(r,c,s,p);return e!==c&&(w(e)||S(e))&&(c=e,h&&o(s,h,c,p||r.name)),c},{instance:c,identifier:h})}return c=i.instantiate(r,s,p),h&&o(s,h,c,p||r.name),c}}]}function dt(){this.$get=["$window",function(e){return Cr(e.document)}]}function pt(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function ht(e){return w(e)?k(e)?e.toISOString():W(e):e}function gt(){
this.$get=function(){return function(e){if(!e)return"";var t=[];return o(e,function(e,n){null===e||y(e)||(jr(e)?a(e,function(e,r){t.push(re(n)+"="+re(ht(e)))}):t.push(re(n)+"="+re(ht(e))))}),t.join("&")}}}function vt(){this.$get=function(){return function(e){function t(e,r,i){null===e||y(e)||(jr(e)?a(e,function(e,n){t(e,r+"["+(w(e)?n:"")+"]")}):w(e)&&!k(e)?o(e,function(e,n){t(e,r+(i?"":"[")+n+(i?"":"]"))}):n.push(re(r)+"="+re(ht(e))))}if(!e)return"";var n=[];return t(e,"",!0),n.join("&")}}}function mt(e,t){if(x(e)){var n=e.replace(Ni,"").trim();if(n){var r=t("Content-Type");(r&&0===r.indexOf(Pi)||$t(n))&&(e=J(n))}}return e}function $t(e){var t=e.match(Di);return t&&Hi[t[0]].test(e)}function yt(e){function t(e,t){e&&(r[e]=r[e]?r[e]+", "+t:t)}var n,r=ge();return x(e)?a(e.split("\n"),function(e){n=e.indexOf(":"),t($r(Vr(e.substr(0,n))),Vr(e.substr(n+1)))}):w(e)&&a(e,function(e,n){t($r(n),Vr(e))}),r}function bt(e){var t;return function(n){if(t||(t=yt(e)),n){var r=t[$r(n)];return void 0===r&&(r=null),r}return t}}function wt(e,t,n,r){return S(r)?r(e,t,n):(a(r,function(r){e=r(e,t,n)}),e)}function Lt(e){return 200<=e&&e<300}function xt(){var e=this.defaults={transformResponse:[mt],transformRequest:[function(e){return!w(e)||O(e)||T(e)||P(e)?e:W(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:_(Ti),put:_(Ti),patch:_(Ti)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},t=!1;this.useApplyAsync=function(e){return b(e)?(t=!!e,this):t};var i=!0;this.useLegacyPromiseExtensions=function(e){return b(e)?(i=!!e,this):i};var o=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(s,l,u,c,d,p){function h(t){function o(e){var t=f({},e);return e.data?t.data=wt(e.data,e.headers,e.status,l.transformResponse):t.data=e.data,Lt(e.status)?t:d.reject(t)}function s(e,t){var n,r={};return a(e,function(e,i){S(e)?null!=(n=e(t))&&(r[i]=n):r[i]=e}),r}if(!Dr.isObject(t))throw r("$http")("badreq","Http request configuration must be an object. Received: {0}",t);var l=f({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse,paramSerializer:e.paramSerializer},t);l.headers=function(t){var n,r,i,a=e.headers,o=f({},t.headers);a=f({},a.common,a[$r(t.method)]);e:for(n in a){r=$r(n);for(i in o)if($r(i)===r)continue e;o[n]=a[n]}return s(o,_(t))}(t),l.method=br(l.method),l.paramSerializer=x(l.paramSerializer)?p.get(l.paramSerializer):l.paramSerializer;var u=function(t){var r=t.headers,i=wt(t.data,bt(r),n,t.transformRequest);return y(i)&&a(r,function(e,t){"content-type"===$r(t)&&delete r[t]}),y(t.withCredentials)&&!y(e.withCredentials)&&(t.withCredentials=e.withCredentials),g(t,i).then(o,o)},c=[u,n],h=d.when(l);for(a($,function(e){(e.request||e.requestError)&&c.unshift(e.request,e.requestError),(e.response||e.responseError)&&c.push(e.response,e.responseError)});c.length;){var v=c.shift(),m=c.shift();h=h.then(v,m)}return i?(h.success=function(e){return fe(e,"fn"),h.then(function(t){e(t.data,t.status,t.headers,l)}),h},h.error=function(e){return fe(e,"fn"),h.then(null,function(t){e(t.data,t.status,t.headers,l)}),h}):(h.success=Ri("success"),h.error=Ri("error")),h}function g(r,i){function a(e,n,r,i){function a(){o(n,e,r,i)}p&&(Lt(e)?p.put(C,[e,n,yt(r),i]):p.remove(C)),t?c.$applyAsync(a):(a(),c.$$phase||c.$apply())}function o(e,t,n,i){t=t>=-1?t:0,(Lt(t)?$.resolve:$.reject)({data:e,status:t,headers:bt(n),config:r,statusText:i})}function u(e){o(e.data,e.status,_(e.headers()),e.statusText)}function f(){var e=h.pendingRequests.indexOf(r);-1!==e&&h.pendingRequests.splice(e,1)}var p,g,$=d.defer(),L=$.promise,x=r.headers,C=v(r.url,r.paramSerializer(r.params));if(h.pendingRequests.push(r),L.then(f,f),!r.cache&&!e.cache||!1===r.cache||"GET"!==r.method&&"JSONP"!==r.method||(p=w(r.cache)?r.cache:w(e.cache)?e.cache:m),p&&(g=p.get(C),b(g)?H(g)?g.then(u,u):jr(g)?o(g[1],g[0],_(g[2]),g[3]):o(g,200,{},"OK"):p.put(C,L)),y(g)){var k=kn(r.url)?l()[r.xsrfCookieName||e.xsrfCookieName]:n;k&&(x[r.xsrfHeaderName||e.xsrfHeaderName]=k),s(r.method,C,i,a,x,r.timeout,r.withCredentials,r.responseType)}return L}function v(e,t){return t.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+t),e}var m=u("$http");e.paramSerializer=x(e.paramSerializer)?p.get(e.paramSerializer):e.paramSerializer;var $=[];return a(o,function(e){$.unshift(x(e)?p.get(e):p.invoke(e))}),h.pendingRequests=[],function(e){a(arguments,function(e){h[e]=function(t,n){return h(f({},n||{},{method:e,url:t}))}})}("get","delete","head","jsonp"),function(e){a(arguments,function(e){h[e]=function(t,n,r){return h(f({},r||{},{method:e,url:t,data:n}))}})}("post","put","patch"),h.defaults=e,h}]}function Ct(){this.$get=function(){return function(){return new e.XMLHttpRequest}}}function kt(){this.$get=["$browser","$window","$document","$xhrFactory",function(e,t,n,r){return St(e,r,e.defer,t.angular.callbacks,n[0])}]}function St(e,t,n,r,i){function o(e,t,n){var a=i.createElement("script"),o=null;return a.type="text/javascript",a.src=e,a.async=!0,o=function(e){ei(a,"load",o),ei(a,"error",o),i.body.removeChild(a),a=null;var s=-1,l="unknown";e&&("load"!==e.type||r[t].called||(e={type:"error"}),l=e.type,s="error"===e.type?404:200),n&&n(s,l)},Xr(a,"load",o),Xr(a,"error",o),i.body.appendChild(a),o}return function(i,s,l,u,c,f,d,p){function h(){$&&$(),w&&w.abort()}function v(t,r,i,a,o){b(x)&&n.cancel(x),$=w=null,t(r,i,a,o),e.$$completeOutstandingRequest(g)}if(e.$$incOutstandingRequestCount(),s=s||e.url(),"jsonp"==$r(i)){var m="_"+(r.counter++).toString(36);r[m]=function(e){r[m].data=e,r[m].called=!0};var $=o(s.replace("JSON_CALLBACK","angular.callbacks."+m),m,function(e,t){v(u,e,r[m].data,"",t),r[m]=g})}else{var w=t(i,s);w.open(i,s,!0),a(c,function(e,t){b(e)&&w.setRequestHeader(t,e)}),w.onload=function(){var e=w.statusText||"",t="response"in w?w.response:w.responseText,n=1223===w.status?204:w.status;0===n&&(n=t?200:"file"==Cn(s).protocol?404:0),v(u,n,t,w.getAllResponseHeaders(),e)};var L=function(){v(u,-1,null,null,"")};if(w.onerror=L,w.onabort=L,d&&(w.withCredentials=!0),p)try{w.responseType=p}catch(e){if("json"!==p)throw e}w.send(y(l)?null:l)}if(f>0)var x=n(h,f);else H(f)&&f.then(h)}}function At(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function a(e){return"\\\\\\"+e}function o(n){return n.replace(d,e).replace(p,t)}function s(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=W(e)}return e}function l(a,l,d,p){function h(e){try{return e=E(e),p&&!b(e)?e:s(e)}catch(e){r(Vi.interr(a,e))}}p=!!p;for(var g,v,m,$=0,w=[],L=[],x=a.length,C=[],k=[];$<x;){if(-1==(g=a.indexOf(e,$))||-1==(v=a.indexOf(t,g+u))){$!==x&&C.push(o(a.substring($)));break}$!==g&&C.push(o(a.substring($,g))),m=a.substring(g+u,v),w.push(m),L.push(n(m,h)),$=v+c,k.push(C.length),C.push("")}if(d&&C.length>1&&Vi.throwNoconcat(a),!l||w.length){var A=function(e){for(var t=0,n=w.length;t<n;t++){if(p&&y(e[t]))return;C[k[t]]=e[t]}return C.join("")},E=function(e){return d?i.getTrusted(d,e):i.valueOf(e)};return f(function(e){var t=0,n=w.length,i=new Array(n);try{for(;t<n;t++)i[t]=L[t](e);return A(i)}catch(e){r(Vi.interr(a,e))}},{exp:a,expressions:w,$$watchDelegate:function(e,t){var n;return e.$watchGroup(L,function(r,i){var a=A(r);S(t)&&t.call(this,a,r!==i?n:a,e),n=a})}})}}var u=e.length,c=t.length,d=new RegExp(e.replace(/./g,a),"g"),p=new RegExp(t.replace(/./g,a),"g");return l.startSymbol=function(){return e},l.endSymbol=function(){return t},l}]}function Et(){this.$get=["$rootScope","$window","$q","$$q",function(e,t,n,r){function i(i,o,s,l){var u=arguments.length>4,c=u?q(arguments,4):[],f=t.setInterval,d=t.clearInterval,p=0,h=b(l)&&!l,g=(h?r:n).defer(),v=g.promise;return s=b(s)?s:0,v.then(null,null,u?function(){i.apply(null,c)}:i),v.$$intervalId=f(function(){g.notify(p++),s>0&&p>=s&&(g.resolve(p),d(v.$$intervalId),delete a[v.$$intervalId]),h||e.$apply()},o),a[v.$$intervalId]=g,v}var a={};return i.cancel=function(e){return!!(e&&e.$$intervalId in a)&&(a[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete a[e.$$intervalId],!0)},i}]}function Mt(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=ne(t[n]);return t.join("/")}function Ot(e,t){var n=Cn(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=p(n.port)||Bi[n.protocol]||null}function Pt(e,t){var n="/"!==e.charAt(0);n&&(e="/"+e);var r=Cn(e);t.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=ee(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function Tt(e,t){if(0===t.indexOf(e))return t.substr(e.length)}function Dt(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function Ht(e){return e.replace(/(#.+)|#$/,"$1")}function Nt(e){return e.substr(0,Dt(e).lastIndexOf("/")+1)}function jt(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function Rt(e,t,n){this.$$html5=!0,n=n||"",Ot(e,this),this.$$parse=function(e){var n=Tt(t,e);if(!x(n))throw _i("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,t);Pt(n,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=te(this.$$search),n=this.$$hash?"#"+ne(this.$$hash):"";this.$$url=Mt(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=t+this.$$url.substr(1)},this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var a,o,s;return b(a=Tt(e,r))?(o=a,s=b(a=Tt(n,a))?t+(Tt("/",a)||a):e+o):b(a=Tt(t,r))?s=t+a:t==r+"/"&&(s=t),s&&this.$$parse(s),!!s}}function Vt(e,t,n){Ot(e,this),this.$$parse=function(r){var i,a=Tt(e,r)||Tt(t,r);y(a)||"#"!==a.charAt(0)?this.$$html5?i=a:(i="",y(a)&&(e=r,this.replace())):(i=Tt(n,a),y(i)&&(i=a)),Pt(i,this),this.$$path=function(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;return 0===t.indexOf(n)&&(t=t.replace(n,"")),i.exec(t)?e:(r=i.exec(e),r?r[1]:e)}(this.$$path,i,e),this.$$compose()},this.$$compose=function(){var t=te(this.$$search),r=this.$$hash?"#"+ne(this.$$hash):"";this.$$url=Mt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+(this.$$url?n+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return Dt(e)==Dt(t)&&(this.$$parse(t),!0)}}function It(e,t,n){this.$$html5=!0,Vt.apply(this,arguments),this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var a,o;return e==Dt(r)?a=r:(o=Tt(t,r))?a=e+n+o:t===r+"/"&&(a=t),a&&this.$$parse(a),!!a},this.$$compose=function(){var t=te(this.$$search),r=this.$$hash?"#"+ne(this.$$hash):"";this.$$url=Mt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+n+this.$$url}}function Bt(e){return function(){return this[e]}}function _t(e,t){return function(n){return y(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Ft(){var e="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return b(t)?(e=t,this):e},this.html5Mode=function(e){return D(e)?(t.enabled=e,this):w(e)?(D(e.enabled)&&(t.enabled=e.enabled),D(e.requireBase)&&(t.requireBase=e.requireBase),D(e.rewriteLinks)&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,r,i,a,o){function s(e,t,n){var i=u.url(),a=u.$$state;try{r.url(e,t,n),u.$$state=r.state()}catch(e){throw u.url(i),u.$$state=a,e}}function l(e,t){n.$broadcast("$locationChangeSuccess",u.absUrl(),e,u.$$state,t)}var u,c,f,d=r.baseHref(),p=r.url();if(t.enabled){if(!d&&t.requireBase)throw _i("nobase","$location in HTML5 mode requires a <base> tag to be present!");f=jt(p)+(d||"/"),c=i.history?Rt:It}else f=Dt(p),c=Vt;var h=Nt(f);u=new c(f,h,"#"+e),u.$$parseLinkUrl(p,p),u.$$state=r.state();var g=/^\s*(javascript|mailto):/i;a.on("click",function(e){if(t.rewriteLinks&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!=e.which&&2!=e.button){for(var i=Cr(e.target);"a"!==V(i[0]);)if(i[0]===a[0]||!(i=i.parent())[0])return;var s=i.prop("href"),l=i.attr("href")||i.attr("xlink:href");w(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=Cn(s.animVal).href),g.test(s)||!s||i.attr("target")||e.isDefaultPrevented()||u.$$parseLinkUrl(s,l)&&(e.preventDefault(),u.absUrl()!=r.url()&&(n.$apply(),o.angular["ff-684208-preventDefault"]=!0))}}),Ht(u.absUrl())!=Ht(p)&&r.url(u.absUrl(),!0);var v=!0;return r.onUrlChange(function(e,t){if(y(Tt(h,e)))return void(o.location.href=e);n.$evalAsync(function(){var r,i=u.absUrl(),a=u.$$state;u.$$parse(e),u.$$state=t,r=n.$broadcast("$locationChangeStart",e,i,t,a).defaultPrevented,u.absUrl()===e&&(r?(u.$$parse(i),u.$$state=a,s(i,!1,a)):(v=!1,l(i,a)))}),n.$$phase||n.$digest()}),n.$watch(function(){var e=Ht(r.url()),t=Ht(u.absUrl()),a=r.state(),o=u.$$replace,c=e!==t||u.$$html5&&i.history&&a!==u.$$state;(v||c)&&(v=!1,n.$evalAsync(function(){var t=u.absUrl(),r=n.$broadcast("$locationChangeStart",t,e,u.$$state,a).defaultPrevented;u.absUrl()===t&&(r?(u.$$parse(e),u.$$state=a):(c&&s(t,o,a===u.$$state?null:u.$$state),l(e,a)))})),u.$$replace=!1}),u}]}function Ut(){var e=!0,t=this;this.debugEnabled=function(t){return b(t)?(e=t,this):e},this.$get=["$window",function(n){function r(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function i(e){var t=n.console||{},i=t[e]||t.log||g,o=!1;try{o=!!i.apply}catch(e){}return o?function(){var e=[];return a(arguments,function(t){e.push(r(t))}),i.apply(t,e)}:function(e,t){i(e,null==t?"":t)}}return{log:i("log"),info:i("info"),warn:i("warn"),error:i("error"),debug:function(){var n=i("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function qt(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw Ui("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function zt(e,t){if(e+="",!x(e))throw Ui("iseccst","Cannot convert object to primitive value! Expression: {0}",t);return e}function Gt(e,t){if(e){if(e.constructor===e)throw Ui("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw Ui("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw Ui("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw Ui("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function Wt(e,t){if(e){if(e.constructor===e)throw Ui("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===qi||e===zi||e===Gi)throw Ui("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function Jt(e,t){if(e&&(e===(0).constructor||e===(!1).constructor||e==="".constructor||e==={}.constructor||e===[].constructor||e===Function.constructor))throw Ui("isecaf","Assigning to a constructor is disallowed! Expression: {0}",t)}function Zt(e,t){return void 0!==e?e:t}function Yt(e,t){return void 0===e?t:void 0===t?e:e+t}function Kt(e,t){return!e(t).$stateful}function Qt(e,t){var n,r;switch(e.type){case Yi.Program:n=!0,a(e.body,function(e){Qt(e.expression,t),n=n&&e.expression.constant}),e.constant=n;break;case Yi.Literal:e.constant=!0,e.toWatch=[];break;case Yi.UnaryExpression:Qt(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case Yi.BinaryExpression:Qt(e.left,t),Qt(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case Yi.LogicalExpression:Qt(e.left,t),Qt(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case Yi.ConditionalExpression:Qt(e.test,t),Qt(e.alternate,t),Qt(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case Yi.Identifier:e.constant=!1,e.toWatch=[e];break;case Yi.MemberExpression:Qt(e.object,t),e.computed&&Qt(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case Yi.CallExpression:n=!!e.filter&&Kt(t,e.callee.name),r=[],a(e.arguments,function(e){Qt(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=e.filter&&Kt(t,e.callee.name)?r:[e];break;case Yi.AssignmentExpression:Qt(e.left,t),Qt(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case Yi.ArrayExpression:n=!0,r=[],a(e.elements,function(e){Qt(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=r;break;case Yi.ObjectExpression:n=!0,r=[],a(e.properties,function(e){Qt(e.value,t),n=n&&e.value.constant,e.value.constant||r.push.apply(r,e.value.toWatch)}),e.constant=n,e.toWatch=r;break;case Yi.ThisExpression:e.constant=!1,e.toWatch=[]}}function Xt(e){if(1==e.length){var t=e[0].expression,r=t.toWatch;return 1!==r.length?r:r[0]!==t?r:n}}function en(e){return e.type===Yi.Identifier||e.type===Yi.MemberExpression}function tn(e){if(1===e.body.length&&en(e.body[0].expression))return{type:Yi.AssignmentExpression,left:e.body[0].expression,right:{type:Yi.NGValueParameter},operator:"="}}function nn(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===Yi.Literal||e.body[0].expression.type===Yi.ArrayExpression||e.body[0].expression.type===Yi.ObjectExpression)}function rn(e){return e.constant}function an(e,t){this.astBuilder=e,this.$filter=t}function on(e,t){this.astBuilder=e,this.$filter=t}function sn(e){return"constructor"==e}function ln(e){return S(e.valueOf)?e.valueOf():Qi.call(e)}function un(){var e=ge(),t=ge();this.$get=["$filter",function(r){function i(e,t){return null==e||null==t?e===t:("object"!=typeof e||"object"!=typeof(e=ln(e)))&&(e===t||e!==e&&t!==t)}function o(e,t,r,a,o){var s,l=a.inputs;if(1===l.length){var u=i;return l=l[0],e.$watch(function(e){var t=l(e);return i(t,u)||(s=a(e,n,n,[t]),u=t&&ln(t)),s},t,r,o)}for(var c=[],f=[],d=0,p=l.length;d<p;d++)c[d]=i,f[d]=null;return e.$watch(function(e){for(var t=!1,r=0,o=l.length;r<o;r++){var u=l[r](e);(t||(t=!i(u,c[r])))&&(f[r]=u,c[r]=u&&ln(u))}return t&&(s=a(e,n,n,f)),s},t,r,o)}function s(e,t,n,r){var i,a;return i=e.$watch(function(e){return r(e)},function(e,n,r){a=e,S(t)&&t.apply(this,arguments),b(e)&&r.$$postDigest(function(){b(a)&&i()})},n)}function l(e,t,n,r){function i(e){var t=!0;return a(e,function(e){b(e)||(t=!1)}),t}var o,s;return o=e.$watch(function(e){return r(e)},function(e,n,r){s=e,S(t)&&t.call(this,e,n,r),i(e)&&r.$$postDigest(function(){i(s)&&o()})},n)}function u(e,t,n,r){var i;return i=e.$watch(function(e){return r(e)},function(e,n,r){S(t)&&t.apply(this,arguments),i()},n)}function c(e,t){if(!t)return e;var n=e.$$watchDelegate,r=n!==l&&n!==s,i=r?function(n,r,i,a){var o=e(n,r,i,a);return t(o,n,r)}:function(n,r,i,a){var o=e(n,r,i,a),s=t(o,n,r);return b(o)?s:o};return e.$$watchDelegate&&e.$$watchDelegate!==o?i.$$watchDelegate=e.$$watchDelegate:t.$stateful||(i.$$watchDelegate=o,i.inputs=e.inputs?e.inputs:[e]),i}var f=Br().noUnsafeEval,d={csp:f,expensiveChecks:!1},p={csp:f,expensiveChecks:!0};return function(n,i,a){var f,h,v;switch(typeof n){case"string":n=n.trim(),v=n;var m=a?t:e;if(!(f=m[v])){":"===n.charAt(0)&&":"===n.charAt(1)&&(h=!0,n=n.substring(2));var $=a?p:d,y=new Zi($);f=new Ki(y,r,$).parse(n),f.constant?f.$$watchDelegate=u:h?f.$$watchDelegate=f.literal?l:s:f.inputs&&(f.$$watchDelegate=o),m[v]=f}return c(f,i);case"function":return c(n,i);default:return g}}}]}function cn(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return dn(function(t){e.$evalAsync(t)},t)}]}function fn(){this.$get=["$browser","$exceptionHandler",function(e,t){return dn(function(t){e.defer(t)},t)}]}function dn(e,t){function i(e,t,n){function r(t){return function(n){i||(i=!0,t.call(e,n))}}var i=!1;return[r(t),r(n)]}function o(){this.$$state={status:0}}function s(e,t){return function(n){t.call(e,n)}}function l(e){var r,i,a;a=e.pending,e.processScheduled=!1,e.pending=n;for(var o=0,s=a.length;o<s;++o){i=a[o][0],r=a[o][e.status];try{S(r)?i.resolve(r(e.value)):1===e.status?i.resolve(e.value):i.reject(e.value)}catch(e){i.reject(e),t(e)}}}function u(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){l(t)}))}function c(){this.promise=new o,this.resolve=s(this,this.resolve),this.reject=s(this,this.reject),this.notify=s(this,this.notify)}function d(e){var t=new c,n=0,r=jr(e)?[]:{};return a(e,function(e,i){n++,$(e).then(function(e){r.hasOwnProperty(i)||(r[i]=e,--n||t.resolve(r))},function(e){r.hasOwnProperty(i)||t.reject(e)})}),0===n&&t.resolve(r),t.promise}var p=r("$q",TypeError),h=function(){return new c};f(o.prototype,{then:function(e,t,n){if(y(e)&&y(t)&&y(n))return this;var r=new c;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),this.$$state.status>0&&u(this.$$state),r.promise},catch:function(e){return this.then(null,e)},finally:function(e,t){return this.then(function(t){return m(t,!0,e)},function(t){return m(t,!1,e)},t)}}),f(c.prototype,{resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(p("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){var n,r;r=i(this,this.$$resolve,this.$$reject);try{(w(e)||S(e))&&(n=e&&e.then),S(n)?(this.promise.$$state.status=-1,n.call(e,r[0],r[1],this.notify)):(this.promise.$$state.value=e,this.promise.$$state.status=1,u(this.promise.$$state))}catch(e){r[1](e),t(e)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,u(this.promise.$$state)},notify:function(n){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&e(function(){for(var e,i,a=0,o=r.length;a<o;a++){i=r[a][0],e=r[a][3];try{i.notify(S(e)?e(n):n)}catch(e){t(e)}}})}});var g=function(e){var t=new c;return t.reject(e),t.promise},v=function(e,t){var n=new c;return t?n.resolve(e):n.reject(e),n.promise},m=function(e,t,n){var r=null;try{S(n)&&(r=n())}catch(e){return v(e,!1)}return H(r)?r.then(function(){return v(e,t)},function(e){return v(e,!1)}):v(e,t)},$=function(e,t,n,r){var i=new c;return i.resolve(e),i.promise.then(t,n,r)},b=$,L=function e(t){function n(e){i.resolve(e)}function r(e){i.reject(e)}if(!S(t))throw p("norslvr","Expected resolverFn, got '{0}'",t);if(!(this instanceof e))return new e(t);var i=new c;return t(n,r),i.promise};return L.defer=h,L.reject=g,L.when=$,L.resolve=b,L.all=d,L}function pn(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame,r=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,i=!!n,a=i?function(e){var t=n(e);return function(){r(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return a.supported=i,a}]}function hn(){function e(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=l(),this.$$ChildScope=null}return t.prototype=e,t}var t=10,n=r("$rootScope"),o=null,s=null;this.digestTtl=function(e){return arguments.length&&(t=e),t},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(r,u,c,f){function d(e){e.currentScope.$$destroyed=!0}function p(){this.$id=l(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function h(e){if(C.$$phase)throw n("inprog","{0} already in progress",C.$$phase);C.$$phase=e}function v(){C.$$phase=null}function m(e,t){do{e.$$watchersCount+=t}while(e=e.$parent)}function $(e,t,n){do{e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n]}while(e=e.$parent)}function b(){}function L(){for(;E.length;)try{E.shift()()}catch(e){u(e)}s=null}function x(){null===s&&(s=f.defer(function(){C.$apply(L)}))}p.prototype={constructor:p,$new:function(t,n){var r;return n=n||this,t?(r=new p,r.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=e(this)),r=new this.$$ChildScope),r.$parent=n,r.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=r,n.$$childTail=r):n.$$childHead=n.$$childTail=r,(t||n!=this)&&r.$on("$destroy",d),r},$watch:function(e,t,n,r){var i=c(e);if(i.$$watchDelegate)return i.$$watchDelegate(this,t,n,i,e);var a=this,s=a.$$watchers,l={fn:t,last:b,get:i,exp:r||e,eq:!!n};return o=null,S(t)||(l.fn=g),s||(s=a.$$watchers=[]),s.unshift(l),m(this,1),function(){I(s,l)>=0&&m(a,-1),o=null}},$watchGroup:function(e,t){function n(){l=!1,u?(u=!1,t(i,i,s)):t(i,r,s)}var r=new Array(e.length),i=new Array(e.length),o=[],s=this,l=!1,u=!0;if(!e.length){var c=!0;return s.$evalAsync(function(){c&&t(i,i,s)}),function(){c=!1}}return 1===e.length?this.$watch(e[0],function(e,n,a){i[0]=e,r[0]=n,t(i,e===n?i:r,a)}):(a(e,function(e,t){var a=s.$watch(e,function(e,a){i[t]=e,r[t]=a,l||(l=!0,s.$evalAsync(n))});o.push(a)}),function(){for(;o.length;)o.shift()()})},$watchCollection:function(e,t){function n(e){a=e;var t,n,r,s;if(!y(a)){if(w(a))if(i(a)){o!==p&&(o=p,v=o.length=0,f++),t=a.length,v!==t&&(f++,o.length=v=t);for(var l=0;l<t;l++)s=o[l],r=a[l],s!==s&&r!==r||s===r||(f++,o[l]=r)}else{o!==h&&(o=h={},v=0,f++),t=0;for(n in a)yr.call(a,n)&&(t++,r=a[n],s=o[n],n in o?s!==s&&r!==r||s===r||(f++,o[n]=r):(v++,o[n]=r,f++));if(v>t){f++;for(n in o)yr.call(a,n)||(v--,delete o[n])}}else o!==a&&(o=a,f++);return f}}function r(){if(g?(g=!1,t(a,a,l)):t(a,s,l),u)if(w(a))if(i(a)){s=new Array(a.length);for(var e=0;e<a.length;e++)s[e]=a[e]}else{s={};for(var n in a)yr.call(a,n)&&(s[n]=a[n])}else s=a}n.$stateful=!0;var a,o,s,l=this,u=t.length>1,f=0,d=c(e,n),p=[],h={},g=!0,v=0;return this.$watch(d,r)},$digest:function(){var e,r,i,a,l,c,d,p,g,m,$=t,y=this,w=[];h("$digest"),f.$$checkUrlChange(),this===C&&null!==s&&(f.defer.cancel(s),L()),o=null;do{for(c=!1,p=y;k.length;){try{m=k.shift(),m.scope.$eval(m.expression,m.locals)}catch(e){u(e)}o=null}e:do{if(a=p.$$watchers)for(l=a.length;l--;)try{if(e=a[l])if((r=e.get(p))===(i=e.last)||(e.eq?F(r,i):"number"==typeof r&&"number"==typeof i&&isNaN(r)&&isNaN(i))){if(e===o){c=!1;break e}}else c=!0,o=e,e.last=e.eq?B(r,null):r,e.fn(r,i===b?r:i,p),$<5&&(g=4-$,w[g]||(w[g]=[]),w[g].push({msg:S(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:r,oldVal:i}))}catch(e){u(e)}if(!(d=p.$$watchersCount&&p.$$childHead||p!==y&&p.$$nextSibling))for(;p!==y&&!(d=p.$$nextSibling);)p=p.$parent}while(p=d);if((c||k.length)&&!$--)throw v(),n("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",t,w)}while(c||k.length);for(v();A.length;)try{A.shift()()}catch(e){u(e)}},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===C&&f.$$applicationDestroyed(),m(this,-this.$$watchersCount);for(var t in this.$$listenerCount)$(this,this.$$listenerCount[t],t);e&&e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e&&e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=g,this.$on=this.$watch=this.$watchGroup=function(){return g},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}},$eval:function(e,t){return c(e)(this,t)},$evalAsync:function(e,t){C.$$phase||k.length||f.defer(function(){k.length&&C.$digest()}),k.push({scope:this,expression:e,locals:t})},$$postDigest:function(e){A.push(e)},$apply:function(e){try{h("$apply");try{return this.$eval(e)}finally{v()}}catch(e){u(e)}finally{try{C.$digest()}catch(e){throw u(e),e}}},$applyAsync:function(e){function t(){n.$eval(e)}var n=this;e&&E.push(t),x()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var r=this;do{r.$$listenerCount[e]||(r.$$listenerCount[e]=0),r.$$listenerCount[e]++}while(r=r.$parent);var i=this;return function(){var r=n.indexOf(t);-1!==r&&(n[r]=null,$(i,1,e))}},$emit:function(e,t){var n,r,i,a=[],o=this,s=!1,l={name:e,targetScope:o,stopPropagation:function(){s=!0},preventDefault:function(){l.defaultPrevented=!0},defaultPrevented:!1},c=U([l],arguments,1);do{for(n=o.$$listeners[e]||a,l.currentScope=o,r=0,i=n.length;r<i;r++)if(n[r])try{n[r].apply(null,c)}catch(e){u(e)}else n.splice(r,1),r--,i--;if(s)return l.currentScope=null,l;o=o.$parent}while(o);return l.currentScope=null,l},$broadcast:function(e,t){var n=this,r=n,i=n,a={name:e,targetScope:n,preventDefault:function(){a.defaultPrevented=!0},defaultPrevented:!1};if(!n.$$listenerCount[e])return a;for(var o,s,l,c=U([a],arguments,1);r=i;){for(a.currentScope=r,o=r.$$listeners[e]||[],s=0,l=o.length;s<l;s++)if(o[s])try{o[s].apply(null,c)}catch(e){u(e)}else o.splice(s,1),s--,l--;if(!(i=r.$$listenerCount[e]&&r.$$childHead||r!==n&&r.$$nextSibling))for(;r!==n&&!(i=r.$$nextSibling);)r=r.$parent}return a.currentScope=null,a}};var C=new p,k=C.$$asyncQueue=[],A=C.$$postDigestQueue=[],E=C.$$applyAsyncQueue=[];return C}]}function gn(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return b(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return b(e)?(t=e,this):t},this.$get=function(){return function(n,r){var i,a=r?t:e;return i=Cn(n).href,""===i||i.match(a)?n:"unsafe:"+i}}}function vn(e){if("self"===e)return e;if(x(e)){if(e.indexOf("***")>-1)throw Xi("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=Ir(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(A(e))return new RegExp("^"+e.source+"$");throw Xi("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function mn(e){var t=[];return b(e)&&a(e,function(e){t.push(vn(e))}),t}function $n(){this.SCE_CONTEXTS=ea;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=mn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=mn(e)),t},this.$get=["$injector",function(n){function r(e,t){return"self"===e?kn(t):!!e.exec(t.href)}function i(n){var i,a,o=Cn(n.toString()),s=!1;for(i=0,a=e.length;i<a;i++)if(r(e[i],o)){s=!0;break}if(s)for(i=0,a=t.length;i<a;i++)if(r(t[i],o)){s=!1;break}return s}function a(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function o(e,t){var n=f.hasOwnProperty(e)?f[e]:null;if(!n)throw Xi("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||y(t)||""===t)return t;if("string"!=typeof t)throw Xi("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new n(t)}function s(e){return e instanceof c?e.$$unwrapTrustedValue():e}function l(e,t){if(null===t||y(t)||""===t)return t;var n=f.hasOwnProperty(e)?f[e]:null;if(n&&t instanceof n)return t.$$unwrapTrustedValue();if(e===ea.RESOURCE_URL){if(i(t))return t;throw Xi("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===ea.HTML)return u(t);throw Xi("unsafe","Attempting to use an unsafe value in a safe context.")}var u=function(e){throw Xi("unsafe","Attempting to use an unsafe value in a safe context.")};n.has("$sanitize")&&(u=n.get("$sanitize"));var c=a(),f={};return f[ea.HTML]=a(c),f[ea.CSS]=a(c),f[ea.URL]=a(c),f[ea.JS]=a(c),f[ea.RESOURCE_URL]=a(f[ea.URL]),{trustAs:o,getTrusted:l,valueOf:s}}]}function yn(){var e=!0
;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&xr<8)throw Xi("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var r=_(ea);r.isEnabled=function(){return e},r.trustAs=n.trustAs,r.getTrusted=n.getTrusted,r.valueOf=n.valueOf,e||(r.trustAs=r.getTrusted=function(e,t){return t},r.valueOf=v),r.parseAs=function(e,n){var i=t(n);return i.literal&&i.constant?i:t(n,function(t){return r.getTrusted(e,t)})};var i=r.parseAs,o=r.getTrusted,s=r.trustAs;return a(ea,function(e,t){var n=$r(t);r[be("parse_as_"+n)]=function(t){return i(e,t)},r[be("get_trusted_"+n)]=function(t){return o(e,t)},r[be("trust_as_"+n)]=function(t){return s(e,t)}}),r}]}function bn(){this.$get=["$window","$document",function(e,t){var n,r,i={},a=p((/android (\d+)/.exec($r((e.navigator||{}).userAgent))||[])[1]),o=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},l=/^(Moz|webkit|ms)(?=[A-Z])/,u=s.body&&s.body.style,c=!1,f=!1;if(u){for(var d in u)if(r=l.exec(d)){n=r[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in u&&"webkit"),c=!!("transition"in u||n+"Transition"in u),f=!!("animation"in u||n+"Animation"in u),!a||c&&f||(c=x(u.webkitTransition),f=x(u.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||a<4||o),hasEvent:function(e){if("input"===e&&xr<=11)return!1;if(y(i[e])){var t=s.createElement("div");i[e]="on"+e in t}return i[e]},csp:Br(),vendorPrefix:n,transitions:c,animations:f,android:a}}]}function wn(){this.$get=["$templateCache","$http","$q","$sce",function(e,t,n,r){function i(a,o){function s(e){if(!o)throw Si("tpload","Failed to load template: {0} (HTTP status: {1} {2})",a,e.status,e.statusText);return n.reject(e)}i.totalPendingRequests++,x(a)&&e.get(a)||(a=r.getTrustedResourceUrl(a));var l=t.defaults&&t.defaults.transformResponse;jr(l)?l=l.filter(function(e){return e!==mt}):l===mt&&(l=null);var u={cache:e,transformResponse:l};return t.get(a,u).finally(function(){i.totalPendingRequests--}).then(function(t){return e.put(a,t.data),t.data},s)}return i.totalPendingRequests=0,i}]}function Ln(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var r={};return r.findBindings=function(e,t,n){var r=e.getElementsByClassName("ng-binding"),i=[];return a(r,function(e){var r=Dr.element(e).data("$binding");r&&a(r,function(r){if(n){new RegExp("(^|\\s)"+Ir(t)+"(\\s|\\||$)").test(r)&&i.push(e)}else-1!=r.indexOf(t)&&i.push(e)})}),i},r.findModels=function(e,t,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i<r.length;++i){var a=n?"=":"*=",o="["+r[i]+"model"+a+'"'+t+'"]',s=e.querySelectorAll(o);if(s.length)return s}},r.getLocation=function(){return n.url()},r.setLocation=function(t){t!==n.url()&&(n.url(t),e.$digest())},r.whenStable=function(e){t.notifyWhenNoOutstandingRequests(e)},r}]}function xn(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(e,t,n,r,i){function a(a,s,l){S(a)||(l=s,s=a,a=g);var u,c=q(arguments,3),f=b(l)&&!l,d=(f?r:n).defer(),p=d.promise;return u=t.defer(function(){try{d.resolve(a.apply(null,c))}catch(e){d.reject(e),i(e)}finally{delete o[p.$$timeoutId]}f||e.$apply()},s),p.$$timeoutId=u,o[u]=d,p}var o={};return a.cancel=function(e){return!!(e&&e.$$timeoutId in o)&&(o[e.$$timeoutId].reject("canceled"),delete o[e.$$timeoutId],t.defer.cancel(e.$$timeoutId))},a}]}function Cn(e){var t=e;return xr&&(ta.setAttribute("href",t),t=ta.href),ta.setAttribute("href",t),{href:ta.href,protocol:ta.protocol?ta.protocol.replace(/:$/,""):"",host:ta.host,search:ta.search?ta.search.replace(/^\?/,""):"",hash:ta.hash?ta.hash.replace(/^#/,""):"",hostname:ta.hostname,port:ta.port,pathname:"/"===ta.pathname.charAt(0)?ta.pathname:"/"+ta.pathname}}function kn(e){var t=x(e)?Cn(e):e;return t.protocol===na.protocol&&t.host===na.host}function Sn(){this.$get=m(e)}function An(e){function t(e){try{return decodeURIComponent(e)}catch(t){return e}}var n=e[0]||{},r={},i="";return function(){var e,a,o,s,l,u=n.cookie||"";if(u!==i)for(i=u,e=i.split("; "),r={},o=0;o<e.length;o++)a=e[o],(s=a.indexOf("="))>0&&(l=t(a.substring(0,s)),y(r[l])&&(r[l]=t(a.substring(s+1))));return r}}function En(){this.$get=An}function Mn(e){function t(r,i){if(w(r)){var o={};return a(r,function(e,n){o[n]=t(n,e)}),o}return e.factory(r+n,i)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",Hn),t("date",Wn),t("filter",On),t("json",Jn),t("limitTo",Zn),t("lowercase",sa),t("number",Nn),t("orderBy",Yn),t("uppercase",la)}function On(){return function(e,t,n){if(!i(e)){if(null==e)return e;throw r("filter")("notarray","Expected array but received: {0}",e)}var a,o,s=Dn(t);switch(s){case"function":a=t;break;case"boolean":case"null":case"number":case"string":o=!0;case"object":a=Pn(t,n,o);break;default:return e}return Array.prototype.filter.call(e,a)}}function Pn(e,t,n){var r=w(e)&&"$"in e;return!0===t?t=F:S(t)||(t=function(e,t){return!y(e)&&(null===e||null===t?e===t:!(w(t)||w(e)&&!$(e))&&(e=$r(""+e),t=$r(""+t),-1!==e.indexOf(t)))}),function(i){return r&&!w(i)?Tn(i,e.$,t,!1):Tn(i,e,t,n)}}function Tn(e,t,n,r,i){var a=Dn(e),o=Dn(t);if("string"===o&&"!"===t.charAt(0))return!Tn(e,t.substring(1),n,r);if(jr(e))return e.some(function(e){return Tn(e,t,n,r)});switch(a){case"object":var s;if(r){for(s in e)if("$"!==s.charAt(0)&&Tn(e[s],t,n,!0))return!0;return!i&&Tn(e,t,n,!1)}if("object"===o){for(s in t){var l=t[s];if(!S(l)&&!y(l)){var u="$"===s;if(!Tn(u?e:e[s],l,n,u,u))return!1}}return!0}return n(e,t);case"function":return!1;default:return n(e,t)}}function Dn(e){return null===e?"null":typeof e}function Hn(e){var t=e.NUMBER_FORMATS;return function(e,n,r){return y(n)&&(n=t.CURRENCY_SYM),y(r)&&(r=t.PATTERNS[1].maxFrac),null==e?e:jn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function Nn(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:jn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function jn(e,t,n,r,i){if(w(e))return"";var a=e<0;e=Math.abs(e);var o=e===1/0;if(!o&&!isFinite(e))return"";var s=e+"",l="",u=!1,c=[];if(o&&(l="∞"),!o&&-1!==s.indexOf("e")){var f=s.match(/([\d\.]+)e(-?)(\d+)/);f&&"-"==f[2]&&f[3]>i+1?e=0:(l=s,u=!0)}if(o||u)i>0&&e<1&&(l=e.toFixed(i),e=parseFloat(l),l=l.replace(ra,r));else{var d=(s.split(ra)[1]||"").length;y(i)&&(i=Math.min(Math.max(t.minFrac,d),t.maxFrac)),e=+(Math.round(+(e.toString()+"e"+i)).toString()+"e"+-i);var p=(""+e).split(ra),h=p[0];p=p[1]||"";var g,v=0,m=t.lgSize,$=t.gSize;if(h.length>=m+$)for(v=h.length-m,g=0;g<v;g++)(v-g)%$==0&&0!==g&&(l+=n),l+=h.charAt(g);for(g=v;g<h.length;g++)(h.length-g)%m==0&&0!==g&&(l+=n),l+=h.charAt(g);for(;p.length<i;)p+="0";i&&"0"!==i&&(l+=r+p.substr(0,i))}return 0===e&&(a=!1),c.push(a?t.negPre:t.posPre,l,a?t.negSuf:t.posSuf),c.join("")}function Rn(e,t,n){var r="";for(e<0&&(r="-",e=-e),e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),r+e}function Vn(e,t,n,r){return n=n||0,function(i){var a=i["get"+e]();return(n>0||a>-n)&&(a+=n),0===a&&-12==n&&(a=12),Rn(a,t,r)}}function In(e,t){return function(n,r){var i=n["get"+e]();return r[br(t?"SHORT"+e:e)][i]}}function Bn(e,t,n){var r=-1*n,i=r>=0?"+":"";return i+=Rn(Math[r>0?"floor":"ceil"](r/60),2)+Rn(Math.abs(r%60),2)}function _n(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(t<=4?5:12)-t)}function Fn(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function Un(e){return function(t){var n=_n(t.getFullYear()),r=Fn(t),i=+r-+n;return Rn(1+Math.round(i/6048e5),e)}}function qn(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function zn(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function Gn(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function Wn(e){function t(e){var t;if(t=e.match(n)){var r=new Date(0),i=0,a=0,o=t[8]?r.setUTCFullYear:r.setFullYear,s=t[8]?r.setUTCHours:r.setHours;t[9]&&(i=p(t[9]+t[10]),a=p(t[9]+t[11])),o.call(r,p(t[1]),p(t[2])-1,p(t[3]));var l=p(t[4]||0)-i,u=p(t[5]||0)-a,c=p(t[6]||0),f=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(r,l,u,c,f),r}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r,i){var o,s,l="",u=[];if(r=r||"mediumDate",r=e.DATETIME_FORMATS[r]||r,x(n)&&(n=oa.test(n)?p(n):t(n)),C(n)&&(n=new Date(n)),!k(n)||!isFinite(n.getTime()))return n;for(;r;)s=aa.exec(r),s?(u=U(u,s,1),r=u.pop()):(u.push(r),r=null);var c=n.getTimezoneOffset();return i&&(c=Z(i,n.getTimezoneOffset()),n=K(n,i,!0)),a(u,function(t){o=ia[t],l+=o?o(n,e.DATETIME_FORMATS,c):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function Jn(){return function(e,t){return y(t)&&(t=2),W(e,t)}}function Zn(){return function(e,t,n){return t=Math.abs(Number(t))===1/0?Number(t):p(t),isNaN(t)?e:(C(e)&&(e=e.toString()),jr(e)||x(e)?(n=!n||isNaN(n)?0:p(n),n=n<0&&n>=-e.length?e.length+n:n,t>=0?e.slice(n,n+t):0===n?e.slice(t,e.length):e.slice(Math.max(0,n+t),n)):e)}}function Yn(e){function t(t,n){return n=n?-1:1,t.map(function(t){var r=1,i=v;if(S(t))i=t;else if(x(t)&&("+"!=t.charAt(0)&&"-"!=t.charAt(0)||(r="-"==t.charAt(0)?-1:1,t=t.substring(1)),""!==t&&(i=e(t),i.constant))){var a=i();i=function(e){return e[a]}}return{get:i,descending:r*n}})}function n(e){switch(typeof e){case"number":case"boolean":case"string":return!0;default:return!1}}function r(e,t){return"function"==typeof e.valueOf&&(e=e.valueOf(),n(e))?e:$(e)&&(e=e.toString(),n(e))?e:t}function a(e,t){var n=typeof e;return null===e?(n="string",e="null"):"string"===n?e=e.toLowerCase():"object"===n&&(e=r(e,t)),{value:e,type:n}}function o(e,t){var n=0;return e.type===t.type?e.value!==t.value&&(n=e.value<t.value?-1:1):n=e.type<t.type?-1:1,n}return function(e,n,r){function s(e,t){return{value:e,predicateValues:u.map(function(n){return a(n.get(e),t)})}}function l(e,t){for(var n=0,r=0,i=u.length;r<i&&!(n=o(e.predicateValues[r],t.predicateValues[r])*u[r].descending);++r);return n}if(!i(e))return e;jr(n)||(n=[n]),0===n.length&&(n=["+"]);var u=t(n,r);u.push({get:function(){return{}},descending:r?-1:1});var c=Array.prototype.map.call(e,s);return c.sort(l),e=c.map(function(e){return e.value})}}function Kn(e){return S(e)&&(e={link:e}),e.restrict=e.restrict||"AC",m(e)}function Qn(e,t){e.$name=t}function Xn(e,t,r,i,o){var s=this,l=[];s.$error={},s.$$success={},s.$pending=n,s.$name=o(t.name||t.ngForm||"")(r),s.$dirty=!1,s.$pristine=!0,s.$valid=!0,s.$invalid=!1,s.$submitted=!1,s.$$parentForm=fa,s.$rollbackViewValue=function(){a(l,function(e){e.$rollbackViewValue()})},s.$commitViewValue=function(){a(l,function(e){e.$commitViewValue()})},s.$addControl=function(e){de(e.$name,"input"),l.push(e),e.$name&&(s[e.$name]=e),e.$$parentForm=s},s.$$renameControl=function(e,t){var n=e.$name;s[n]===e&&delete s[n],s[t]=e,e.$name=t},s.$removeControl=function(e){e.$name&&s[e.$name]===e&&delete s[e.$name],a(s.$pending,function(t,n){s.$setValidity(n,null,e)}),a(s.$error,function(t,n){s.$setValidity(n,null,e)}),a(s.$$success,function(t,n){s.$setValidity(n,null,e)}),I(l,e),e.$$parentForm=fa},hr({ctrl:this,$element:e,set:function(e,t,n){var r=e[t];if(r){-1===r.indexOf(n)&&r.push(n)}else e[t]=[n]},unset:function(e,t,n){var r=e[t];r&&(I(r,n),0===r.length&&delete e[t])},$animate:i}),s.$setDirty=function(){i.removeClass(e,Wa),i.addClass(e,Ja),s.$dirty=!0,s.$pristine=!1,s.$$parentForm.$setDirty()},s.$setPristine=function(){i.setClass(e,Wa,Ja+" "+da),s.$dirty=!1,s.$pristine=!0,s.$submitted=!1,a(l,function(e){e.$setPristine()})},s.$setUntouched=function(){a(l,function(e){e.$setUntouched()})},s.$setSubmitted=function(){i.addClass(e,da),s.$submitted=!0,s.$$parentForm.$setSubmitted()}}function er(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function tr(e,t,n,r,i,a){nr(e,t,n,r,i,a),er(r)}function nr(e,t,n,r,i,a){var o=$r(t[0].type);if(!i.android){var s=!1;t.on("compositionstart",function(e){s=!0}),t.on("compositionend",function(){s=!1,l()})}var l=function(e){if(u&&(a.defer.cancel(u),u=null),!s){var i=t.val(),l=e&&e.type;"password"===o||n.ngTrim&&"false"===n.ngTrim||(i=Vr(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,l)}};if(i.hasEvent("input"))t.on("input",l);else{var u,c=function(e,t,n){u||(u=a.defer(function(){u=null,t&&t.value===n||l(e)}))};t.on("keydown",function(e){var t=e.keyCode;91===t||15<t&&t<19||37<=t&&t<=40||c(e,this,this.value)}),i.hasEvent("paste")&&t.on("paste cut",c)}t.on("change",l),r.$render=function(){var e=r.$isEmpty(r.$viewValue)?"":r.$viewValue;t.val()!==e&&t.val(e)}}function rr(e,t){if(k(e))return e;if(x(e)){La.lastIndex=0;var n=La.exec(e);if(n){var r=+n[1],i=+n[2],a=0,o=0,s=0,l=0,u=_n(r),c=7*(i-1);return t&&(a=t.getHours(),o=t.getMinutes(),s=t.getSeconds(),l=t.getMilliseconds()),new Date(r,0,u.getDate()+c,a,o,s,l)}}return NaN}function ir(e,t){return function(n,r){var i,o;if(k(n))return n;if(x(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),va.test(n))return new Date(n);if(e.lastIndex=0,i=e.exec(n))return i.shift(),o=r?{yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},a(i,function(e,n){n<t.length&&(o[t[n]]=+e)}),new Date(o.yyyy,o.MM-1,o.dd,o.HH,o.mm,o.ss||0,1e3*o.sss||0)}return NaN}}function ar(e,t,r,i){return function(a,o,s,l,u,c,f){function d(e){return e&&!(e.getTime&&e.getTime()!==e.getTime())}function p(e){return b(e)&&!k(e)?r(e)||n:e}or(a,o,s,l),nr(a,o,s,l,u,c);var h,g=l&&l.$options&&l.$options.timezone;if(l.$$parserName=e,l.$parsers.push(function(e){if(l.$isEmpty(e))return null;if(t.test(e)){var i=r(e,h);return g&&(i=K(i,g)),i}return n}),l.$formatters.push(function(e){if(e&&!k(e))throw Ya("datefmt","Expected `{0}` to be a date",e);return d(e)?(h=e,h&&g&&(h=K(h,g,!0)),f("date")(e,i,g)):(h=null,"")}),b(s.min)||s.ngMin){var v;l.$validators.min=function(e){return!d(e)||y(v)||r(e)>=v},s.$observe("min",function(e){v=p(e),l.$validate()})}if(b(s.max)||s.ngMax){var m;l.$validators.max=function(e){return!d(e)||y(m)||r(e)<=m},s.$observe("max",function(e){m=p(e),l.$validate()})}}}function or(e,t,r,i){var a=t[0];(i.$$hasNativeValidators=w(a.validity))&&i.$parsers.push(function(e){var r=t.prop(mr)||{};return r.badInput&&!r.typeMismatch?n:e})}function sr(e,t,r,i,a,o){if(or(e,t,r,i),nr(e,t,r,i,a,o),i.$$parserName="number",i.$parsers.push(function(e){return i.$isEmpty(e)?null:ya.test(e)?parseFloat(e):n}),i.$formatters.push(function(e){if(!i.$isEmpty(e)){if(!C(e))throw Ya("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),b(r.min)||r.ngMin){var s;i.$validators.min=function(e){return i.$isEmpty(e)||y(s)||e>=s},r.$observe("min",function(e){b(e)&&!C(e)&&(e=parseFloat(e,10)),s=C(e)&&!isNaN(e)?e:n,i.$validate()})}if(b(r.max)||r.ngMax){var l;i.$validators.max=function(e){return i.$isEmpty(e)||y(l)||e<=l},r.$observe("max",function(e){b(e)&&!C(e)&&(e=parseFloat(e,10)),l=C(e)&&!isNaN(e)?e:n,i.$validate()})}}function lr(e,t,n,r,i,a){nr(e,t,n,r,i,a),er(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||ma.test(n)}}function ur(e,t,n,r,i,a){nr(e,t,n,r,i,a),er(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||$a.test(n)}}function cr(e,t,n,r){y(n.name)&&t.attr("name",l());var i=function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)};t.on("click",i),r.$render=function(){var e=n.value;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)}function fr(e,t,n,r,i){var a;if(b(r)){if(a=e(r),!a.constant)throw Ya("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return a(t)}return i}function dr(e,t,n,r,i,a,o,s){var l=fr(s,e,"ngTrueValue",n.ngTrueValue,!0),u=fr(s,e,"ngFalseValue",n.ngFalseValue,!1),c=function(e){r.$setViewValue(t[0].checked,e&&e.type)};t.on("click",c),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return!1===e},r.$formatters.push(function(e){return F(e,l)}),r.$parsers.push(function(e){return e?l:u})}function pr(e,t){return e="ngClass"+e,["$animate",function(n){function r(e,t){var n=[];e:for(var r=0;r<e.length;r++){for(var i=e[r],a=0;a<t.length;a++)if(i==t[a])continue e;n.push(i)}return n}function i(e){var t=[];return jr(e)?(a(e,function(e){t=t.concat(i(e))}),t):x(e)?e.split(" "):w(e)?(a(e,function(e,n){e&&(t=t.concat(n.split(" ")))}),t):e}return{restrict:"AC",link:function(o,s,l){function u(e){var t=f(e,1);l.$addClass(t)}function c(e){var t=f(e,-1);l.$removeClass(t)}function f(e,t){var n=s.data("$classCounts")||ge(),r=[];return a(e,function(e){(t>0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&r.push(e))}),s.data("$classCounts",n),r.join(" ")}function d(e,t){var i=r(t,e),a=r(e,t);i=f(i,1),a=f(a,-1),i&&i.length&&n.addClass(s,i),a&&a.length&&n.removeClass(s,a)}function p(e){if(!0===t||o.$index%2===t){var n=i(e||[]);if(h){if(!F(e,h)){var r=i(h);d(r,n)}}else u(n)}h=_(e)}var h;o.$watch(l[e],p,!0),l.$observe("class",function(t){p(o.$eval(l[e]))}),"ngClass"!==e&&o.$watch("$index",function(n,r){var a=1&n;if(a!==(1&r)){var s=i(o.$eval(l[e]));a===t?u(s):c(s)}})}}}]}function hr(e){function t(e,t,l){y(t)?r("$pending",e,l):i("$pending",e,l),D(t)?t?(f(s.$error,e,l),c(s.$$success,e,l)):(c(s.$error,e,l),f(s.$$success,e,l)):(f(s.$error,e,l),f(s.$$success,e,l)),s.$pending?(a(Za,!0),s.$valid=s.$invalid=n,o("",null)):(a(Za,!1),s.$valid=gr(s.$error),s.$invalid=!s.$valid,o("",s.$valid));var u;u=s.$pending&&s.$pending[e]?n:!s.$error[e]&&(!!s.$$success[e]||null),o(e,u),s.$$parentForm.$setValidity(e,u,s)}function r(e,t,n){s[e]||(s[e]={}),c(s[e],t,n)}function i(e,t,r){s[e]&&f(s[e],t,r),gr(s[e])&&(s[e]=n)}function a(e,t){t&&!u[e]?(d.addClass(l,e),u[e]=!0):!t&&u[e]&&(d.removeClass(l,e),u[e]=!1)}function o(e,t){e=e?"-"+ue(e,"-"):"",a(za+e,!0===t),a(Ga+e,!1===t)}var s=e.ctrl,l=e.$element,u={},c=e.set,f=e.unset,d=e.$animate;u[Ga]=!(u[za]=l.hasClass(za)),s.$setValidity=t}function gr(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}var vr=/^\/(.+)\/([a-z]*)$/,mr="validity",$r=function(e){return x(e)?e.toLowerCase():e},yr=Object.prototype.hasOwnProperty,br=function(e){return x(e)?e.toUpperCase():e},wr=function(e){return x(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Lr=function(e){return x(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e};"i"!=="I".toLowerCase()&&($r=wr,br=Lr);var xr,Cr,kr,Sr,Ar=[].slice,Er=[].splice,Mr=[].push,Or=Object.prototype.toString,Pr=Object.getPrototypeOf,Tr=r("ng"),Dr=e.angular||(e.angular={}),Hr=0;xr=t.documentMode,g.$inject=[],v.$inject=[];var Nr,jr=Array.isArray,Rr=/^\[object (Uint8(Clamped)?)|(Uint16)|(Uint32)|(Int8)|(Int16)|(Int32)|(Float(32)|(64))Array\]$/,Vr=function(e){return x(e)?e.trim():e},Ir=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Br=function(){if(!b(Br.rules)){var e=t.querySelector("[ng-csp]")||t.querySelector("[data-ng-csp]");if(e){var n=e.getAttribute("ng-csp")||e.getAttribute("data-ng-csp");Br.rules={noUnsafeEval:!n||-1!==n.indexOf("no-unsafe-eval"),noInlineStyle:!n||-1!==n.indexOf("no-inline-style")}}else Br.rules={noUnsafeEval:function(){try{return new Function(""),!1}catch(e){return!0}}(),noInlineStyle:!1}}return Br.rules},_r=function(){if(b(_r.name_))return _r.name_;var e,n,r,i,a=Fr.length;for(n=0;n<a;++n)if(r=Fr[n],e=t.querySelector("["+r.replace(":","\\:")+"jq]")){i=e.getAttribute(r+"jq");break}return _r.name_=i},Fr=["ng-","data-ng-","ng:","x-ng-"],Ur=/[A-Z]/g,qr=!1,zr=1,Gr=3,Wr=8,Jr=9,Zr=11,Yr={full:"1.4.7",major:1,minor:4,dot:7,codeName:"dark-luminescence"};Se.expando="ng339";var Kr=Se.cache={},Qr=1,Xr=function(e,t,n){e.addEventListener(t,n,!1)},ei=function(e,t,n){e.removeEventListener(t,n,!1)};Se._data=function(e){return this.cache[e[this.expando]]||{}};var ti=/([\:\-\_]+(.))/g,ni=/^moz([A-Z])/,ri={mouseleave:"mouseout",mouseenter:"mouseover"},ii=r("jqLite"),ai=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,oi=/<|&#?\w+;/,si=/<([\w:-]+)/,li=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ui={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ui.optgroup=ui.option,ui.tbody=ui.tfoot=ui.colgroup=ui.caption=ui.thead,ui.th=ui.td;var ci=Se.prototype={ready:function(n){function r(){i||(i=!0,n())}var i=!1;"complete"===t.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),Se(e).on("load",r))},toString:function(){var e=[];return a(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return Cr(e>=0?this[e]:this[this.length+e])},length:0,push:Mr,sort:[].sort,splice:[].splice},fi={};a("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){fi[$r(e)]=e});var di={};a("input,select,option,textarea,button,form,details".split(","),function(e){di[e]=!0});var pi={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};a({data:Te,removeData:Oe,hasData:xe},function(e,t){Se[t]=e}),a({data:Te,inheritedData:Ve,scope:function(e){return Cr.data(e,"$scope")||Ve(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Cr.data(e,"$isolateScope")||Cr.data(e,"$isolateScopeNoTemplate")},controller:Re,injector:function(e){return Ve(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:De,css:function(e,t,n){if(t=be(t),!b(n))return e.style[t];e.style[t]=n},attr:function(e,t,r){var i=e.nodeType;if(i!==Gr&&2!==i&&i!==Wr){var a=$r(t);if(fi[a]){if(!b(r))return e[t]||(e.attributes.getNamedItem(t)||g).specified?a:n;r?(e[t]=!0,e.setAttribute(t,a)):(e[t]=!1,e.removeAttribute(a))}else if(b(r))e.setAttribute(t,r);else if(e.getAttribute){var o=e.getAttribute(t,2);return null===o?n:o}}},prop:function(e,t,n){if(!b(n))return e[t];e[t]=n},text:function(){function e(e,t){if(y(t)){var n=e.nodeType;return n===zr||n===Gr?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(y(t)){if(e.multiple&&"select"===V(e)){var n=[];return a(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){if(y(t))return e.innerHTML;Ee(e,!0),e.innerHTML=t},empty:Ie},function(e,t){Se.prototype[t]=function(t,n){var r,i,a=this.length;if(e!==Ie&&y(2==e.length&&e!==De&&e!==Re?t:n)){if(w(t)){for(r=0;r<a;r++)if(e===Te)e(this[r],t);else for(i in t)e(this[r],i,t[i]);return this}for(var o=e.$dv,s=y(o)?Math.min(a,1):a,l=0;l<s;l++){var u=e(this[l],t,n);o=o?o+u:u}return o}for(r=0;r<a;r++)e(this[r],t,n);return this}}),a({removeData:Oe,on:function e(t,n,r,i){if(b(i))throw ii("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(Le(t)){var a=Pe(t,!0),o=a.events,s=a.handle;s||(s=a.handle=qe(t,o));for(var l=n.indexOf(" ")>=0?n.split(" "):[n],u=l.length;u--;){n=l[u];var c=o[n];c||(o[n]=[],"mouseenter"===n||"mouseleave"===n?e(t,ri[n],function(e){var t=this,r=e.relatedTarget;r&&(r===t||t.contains(r))||s(e,n)}):"$destroy"!==n&&Xr(t,n,s),c=o[n]),c.push(r)}}},off:Me,one:function(e,t,n){e=Cr(e),e.on(t,function r(){e.off(t,n),e.off(t,r)}),e.on(t,n)},replaceWith:function(e,t){var n,r=e.parentNode;Ee(e),a(new Se(t),function(t){n?r.insertBefore(t,n.nextSibling):r.replaceChild(t,e),n=t})},children:function(e){var t=[];return a(e.childNodes,function(e){e.nodeType===zr&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===zr||n===Zr){t=new Se(t);for(var r=0,i=t.length;r<i;r++){var a=t[r];e.appendChild(a)}}},prepend:function(e,t){if(e.nodeType===zr){var n=e.firstChild;a(new Se(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=Cr(t).eq(0).clone()[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:Be,detach:function(e){Be(e,!0)},after:function(e,t){var n=e,r=e.parentNode;t=new Se(t);for(var i=0,a=t.length;i<a;i++){var o=t[i];r.insertBefore(o,n.nextSibling),n=o}},addClass:Ne,removeClass:He,toggleClass:function(e,t,n){t&&a(t.split(" "),function(t){var r=n;y(r)&&(r=!De(e,t)),(r?Ne:He)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==Zr?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:Ae,triggerHandler:function(e,t,n){var r,i,o,s=t.type||t,l=Pe(e),u=l&&l.events,c=u&&u[s];c&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:g,type:s,target:e},t.type&&(r=f(r,t)),i=_(c),o=n?[r].concat(n):[r],a(i,function(t){r.isImmediatePropagationStopped()||t.apply(e,o)}))}},function(e,t){Se.prototype[t]=function(t,n,r){for(var i,a=0,o=this.length;a<o;a++)y(i)?(i=e(this[a],t,n,r),b(i)&&(i=Cr(i))):je(i,e(this[a],t,n,r));return b(i)?i:this},Se.prototype.bind=Se.prototype.on,Se.prototype.unbind=Se.prototype.off}),We.prototype={put:function(e,t){this[Ge(e,this.nextUid)]=t},get:function(e){return this[Ge(e,this.nextUid)]},remove:function(e){var t=this[e=Ge(e,this.nextUid)];return delete this[e],t}};var hi=[function(){this.$get=[function(){return We}]}],gi=/^[^\(]*\(\s*([^\)]*)\)/m,vi=/,/,mi=/^\s*(_?)(\S+?)\1\s*$/,$i=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,yi=r("$injector");Ye.$$annotate=Ze;var bi=r("$animate"),wi=1,Li=function(){this.$get=["$q","$$rAF",function(e,t){function n(){}return n.all=g,n.chain=g,n.prototype={end:g,cancel:g,resume:g,pause:g,complete:g,then:function(n,r){return e(function(e){t(function(){e()})}).then(n,r)}},n}]},xi=function(){var e=new We,t=[];this.$get=["$$AnimateRunner","$rootScope",function(n,r){function i(e,t,n){var r=!1;return t&&(t=x(t)?t.split(" "):jr(t)?t:[],a(t,function(t){t&&(r=!0,e[t]=n)})),r}function o(){a(t,function(t){var n=e.get(t);if(n){var r=et(t.attr("class")),i="",o="";a(n,function(e,t){e!==!!r[t]&&(e?i+=(i.length?" ":"")+t:o+=(o.length?" ":"")+t)}),a(t,function(e){i&&Ne(e,i),o&&He(e,o)}),e.remove(t)}}),t.length=0}function s(n,a,s){var l=e.get(n)||{},u=i(l,a,!0),c=i(l,s,!1);(u||c)&&(e.put(n,l),t.push(n),1===t.length&&r.$$postDigest(o))}return{enabled:g,on:g,off:g,pin:g,push:function(e,t,r,i){return i&&i(),r=r||{},r.from&&e.css(r.from),r.to&&e.css(r.to),(r.addClass||r.removeClass)&&s(e,r.addClass,r.removeClass),new n}}}]},Ci=["$provide",function(e){var t=this;this.$$registeredAnimations=Object.create(null),this.register=function(n,r){if(n&&"."!==n.charAt(0))throw bi("notcsel","Expecting class selector starting with '.' got '{0}'.",n);var i=n+"-animation";t.$$registeredAnimations[n.substr(1)]=i,e.factory(i,r)},this.classNameFilter=function(e){if(1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null,this.$$classNameFilter)){if(new RegExp("(\\s+|\\/)ng-animate(\\s+|\\/)").test(this.$$classNameFilter.toString()))throw bi("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',"ng-animate")}return this.$$classNameFilter},this.$get=["$$animateQueue",function(e){function t(e,t,n){if(n){var r=Xe(n);!r||r.parentNode||r.previousElementSibling||(n=null)}n?n.after(e):t.prepend(e)}return{on:e.on,off:e.off,pin:e.pin,enabled:e.enabled,cancel:function(e){e.end&&e.end()},enter:function(n,r,i,a){return r=r&&Cr(r),i=i&&Cr(i),r=r||i.parent(),t(n,r,i),e.push(n,"enter",tt(a))},move:function(n,r,i,a){return r=r&&Cr(r),i=i&&Cr(i),r=r||i.parent(),t(n,r,i),e.push(n,"move",tt(a))},leave:function(t,n){return e.push(t,"leave",tt(n),function(){t.remove()})},addClass:function(t,n,r){return r=tt(r),r.addClass=Qe(r.addclass,n),e.push(t,"addClass",r)},removeClass:function(t,n,r){return r=tt(r),r.removeClass=Qe(r.removeClass,n),e.push(t,"removeClass",r)},setClass:function(t,n,r,i){return i=tt(i),i.addClass=Qe(i.addClass,n),i.removeClass=Qe(i.removeClass,r),e.push(t,"setClass",i)},animate:function(t,n,r,i,a){return a=tt(a),a.from=a.from?f(a.from,n):n,a.to=a.to?f(a.to,r):r,i=i||"ng-inline-animate",a.tempClasses=Qe(a.tempClasses,i),e.push(t,"animate",a)}}}]}],ki=function(){this.$get=["$$rAF","$q",function(e,t){var n=function(){};return n.prototype={done:function(e){this.defer&&this.defer[!0===e?"reject":"resolve"]()},end:function(){this.done()},cancel:function(){this.done(!0)},getPromise:function(){return this.defer||(this.defer=t.defer()),this.defer.promise},then:function(e,t){return this.getPromise().then(e,t)},catch:function(e){return this.getPromise().catch(e)},finally:function(e){return this.getPromise().finally(e)}},function(t,r){function i(){return e(function(){a(),o||s.done(),o=!0}),s}function a(){r.addClass&&(t.addClass(r.addClass),r.addClass=null),r.removeClass&&(t.removeClass(r.removeClass),r.removeClass=null),r.to&&(t.css(r.to),r.to=null)}r.cleanupStyles&&(r.from=r.to=null),r.from&&(t.css(r.from),r.from=null);var o,s=new n;return{start:i,end:i}}}]},Si=r("$compile");ot.$inject=["$provide","$$sanitizeUriProvider"];var Ai=/^((?:x|data)[\:\-_])/i,Ei=r("$controller"),Mi=/^(\S+)(\s+as\s+(\w+))?$/,Oi=function(){this.$get=["$document",function(e){return function(t){return t?!t.nodeType&&t instanceof Cr&&(t=t[0]):t=e[0].body,t.offsetWidth+1}}]},Pi="application/json",Ti={"Content-Type":Pi+";charset=utf-8"},Di=/^\[|^\{(?!\{)/,Hi={"[":/]$/,"{":/}$/},Ni=/^\)\]\}',?\n/,ji=r("$http"),Ri=function(e){return function(){throw ji("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",e)}},Vi=Dr.$interpolateMinErr=r("$interpolate");Vi.throwNoconcat=function(e){throw Vi("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",e)},Vi.interr=function(e,t){return Vi("interr","Can't interpolate: {0}\n{1}",e,t.toString())};var Ii=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Bi={http:80,https:443,ftp:21},_i=r("$location"),Fi={$$html5:!1,$$replace:!1,absUrl:Bt("$$absUrl"),url:function(e){if(y(e))return this.$$url;var t=Ii.exec(e);return(t[1]||""===e)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:Bt("$$protocol"),host:Bt("$$host"),port:Bt("$$port"),path:_t("$$path",function(e){return e=null!==e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(x(e)||C(e))e=e.toString(),this.$$search=ee(e);else{if(!w(e))throw _i("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=B(e,{}),a(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:y(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:_t("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};a([It,Vt,Rt],function(e){e.prototype=Object.create(Fi),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==Rt||!this.$$html5)throw _i("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=y(t)?null:t,this}});var Ui=r("$parse"),qi=Function.prototype.call,zi=Function.prototype.apply,Gi=Function.prototype.bind,Wi=ge();a("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){Wi[e]=!0});var Ji={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Zi=function(e){this.options=e};Zi.prototype={constructor:Zi,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index<this.text.length;){var t=this.text.charAt(this.index)
;if('"'===t||"'"===t)this.readString(t);else if(this.isNumber(t)||"."===t&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(t))this.readIdent();else if(this.is(t,"(){}[].,;:?"))this.tokens.push({index:this.index,text:t}),this.index++;else if(this.isWhitespace(t))this.index++;else{var n=t+this.peek(),r=n+this.peek(2),i=Wi[t],a=Wi[n],o=Wi[r];if(i||a||o){var s=o?r:a?n:t;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(e,t){return-1!==t.indexOf(e)},peek:function(e){var t=e||1;return this.index+t<this.text.length&&this.text.charAt(this.index+t)},isNumber:function(e){return"0"<=e&&e<="9"&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||"\t"===e||"\n"===e||"\v"===e||" "===e},isIdent:function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var r=b(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw Ui("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,r,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=$r(this.text.charAt(this.index));if("."==n||this.isNumber(n))e+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))e+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:t,text:e,constant:!0,value:Number(e)})},readIdent:function(){for(var e=this.index;this.index<this.text.length;){var t=this.text.charAt(this.index);if(!this.isIdent(t)&&!this.isNumber(t))break;this.index++}this.tokens.push({index:e,text:this.text.slice(e,this.index),identifier:!0})},readString:function(e){var t=this.index;this.index++;for(var n="",r=e,i=!1;this.index<this.text.length;){var a=this.text.charAt(this.index);if(r+=a,i){if("u"===a){var o=this.text.substring(this.index+1,this.index+5);o.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+o+"]"),this.index+=4,n+=String.fromCharCode(parseInt(o,16))}else{n+=Ji[a]||a}i=!1}else if("\\"===a)i=!0;else{if(a===e)return this.index++,void this.tokens.push({index:t,text:r,constant:!0,value:n});n+=a}this.index++}this.throwError("Unterminated quote",t)}};var Yi=function(e,t){this.lexer=e,this.options=t};Yi.Program="Program",Yi.ExpressionStatement="ExpressionStatement",Yi.AssignmentExpression="AssignmentExpression",Yi.ConditionalExpression="ConditionalExpression",Yi.LogicalExpression="LogicalExpression",Yi.BinaryExpression="BinaryExpression",Yi.UnaryExpression="UnaryExpression",Yi.CallExpression="CallExpression",Yi.MemberExpression="MemberExpression",Yi.Identifier="Identifier",Yi.Literal="Literal",Yi.ArrayExpression="ArrayExpression",Yi.Property="Property",Yi.ObjectExpression="ObjectExpression",Yi.ThisExpression="ThisExpression",Yi.NGValueParameter="NGValueParameter",Yi.prototype={ast:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t},program:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:Yi.Program,body:e}},expressionStatement:function(){return{type:Yi.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e=this.expression();this.expect("|");)e=this.filter(e);return e},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();return this.expect("=")&&(e={type:Yi.AssignmentExpression,left:e,right:this.assignment(),operator:"="}),e},ternary:function(){var e,t,n=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:Yi.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:Yi.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:Yi.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:Yi.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:Yi.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:Yi.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:Yi.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:Yi.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e;this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.constants.hasOwnProperty(this.peek().text)?e=B(this.constants[this.consume().text]):this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());for(var t;t=this.expect("(","[",".");)"("===t.text?(e={type:Yi.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:Yi.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:Yi.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],n={type:Yi.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return n},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)do{e.push(this.expression())}while(this.expect(","));return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:Yi.Identifier,name:e.text}},constant:function(){return{type:Yi.Literal,value:this.consume().value}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:Yi.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:Yi.Property,kind:"init"},this.peek().constant?e.key=this.constant():this.peek().identifier?e.key=this.identifier():this.throwError("invalid key",this.peek()),this.consume(":"),e.value=this.expression(),t.push(e)}while(this.expect(","));return this.consume("}"),{type:Yi.ObjectExpression,properties:t}},throwError:function(e,t){throw Ui("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(0===this.tokens.length)throw Ui("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},peekToken:function(){if(0===this.tokens.length)throw Ui("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,r){return this.peekAhead(0,e,t,n,r)},peekAhead:function(e,t,n,r,i){if(this.tokens.length>e){var a=this.tokens[e],o=a.text;if(o===t||o===n||o===r||o===i||!t&&!n&&!r&&!i)return a}return!1},expect:function(e,t,n,r){var i=this.peek(e,t,n,r);return!!i&&(this.tokens.shift(),i)},constants:{true:{type:Yi.Literal,value:!0},false:{type:Yi.Literal,value:!1},null:{type:Yi.Literal,value:null},undefined:{type:Yi.Literal,value:n},this:{type:Yi.ThisExpression}}},an.prototype={compile:function(e,t){var r=this,i=this.astBuilder.ast(e);this.state={nextId:0,filters:{},expensiveChecks:t,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},Qt(i,r.$filter);var o,s="";if(this.stage="assign",o=tn(i)){this.state.computing="assign";var l=this.nextId();this.recurse(o,l),this.return_(l),s="fn.assign="+this.generateFunction("assign","s,v,l")}var u=Xt(i.body);r.stage="inputs",a(u,function(e,t){var n="fn"+t;r.state[n]={vars:[],body:[],own:{}},r.state.computing=n;var i=r.nextId();r.recurse(e,i),r.return_(i),r.state.inputs.push(n),e.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(i);var c='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+s+this.watchFns()+"return fn;",f=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",c)(this.$filter,qt,Gt,Wt,zt,Jt,Zt,Yt,e);return this.state=this.stage=n,f.literal=nn(i),f.constant=rn(i),f},USE:"use",STRICT:"strict",watchFns:function(){var e=[],t=this.state.inputs,n=this;return a(t,function(t){e.push("var "+t+"="+n.generateFunction(t,"s"))}),t.length&&e.push("fn.inputs=["+t.join(",")+"];"),e.join("")},generateFunction:function(e,t){return"function("+t+"){"+this.varsPrefix(e)+this.body(e)+"};"},filterPrefix:function(){var e=[],t=this;return a(this.state.filters,function(n,r){e.push(n+"=$filter("+t.escape(r)+")")}),e.length?"var "+e.join(",")+";":""},varsPrefix:function(e){return this.state[e].vars.length?"var "+this.state[e].vars.join(",")+";":""},body:function(e){return this.state[e].body.join("")},recurse:function(e,t,r,i,o,s){var l,u,c,f,d=this;if(i=i||g,!s&&b(e.watchId))return t=t||this.nextId(),void this.if_("i",this.lazyAssign(t,this.computedMember("i",e.watchId)),this.lazyRecurse(e,t,r,i,o,!0));switch(e.type){case Yi.Program:a(e.body,function(t,r){d.recurse(t.expression,n,n,function(e){u=e}),r!==e.body.length-1?d.current().body.push(u,";"):d.return_(u)});break;case Yi.Literal:f=this.escape(e.value),this.assign(t,f),i(f);break;case Yi.UnaryExpression:this.recurse(e.argument,n,n,function(e){u=e}),f=e.operator+"("+this.ifDefined(u,0)+")",this.assign(t,f),i(f);break;case Yi.BinaryExpression:this.recurse(e.left,n,n,function(e){l=e}),this.recurse(e.right,n,n,function(e){u=e}),f="+"===e.operator?this.plus(l,u):"-"===e.operator?this.ifDefined(l,0)+e.operator+this.ifDefined(u,0):"("+l+")"+e.operator+"("+u+")",this.assign(t,f),i(f);break;case Yi.LogicalExpression:t=t||this.nextId(),d.recurse(e.left,t),d.if_("&&"===e.operator?t:d.not(t),d.lazyRecurse(e.right,t)),i(t);break;case Yi.ConditionalExpression:t=t||this.nextId(),d.recurse(e.test,t),d.if_(t,d.lazyRecurse(e.alternate,t),d.lazyRecurse(e.consequent,t)),i(t);break;case Yi.Identifier:t=t||this.nextId(),r&&(r.context="inputs"===d.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",e.name)+"?l:s"),r.computed=!1,r.name=e.name),qt(e.name),d.if_("inputs"===d.stage||d.not(d.getHasOwnProperty("l",e.name)),function(){d.if_("inputs"===d.stage||"s",function(){o&&1!==o&&d.if_(d.not(d.nonComputedMember("s",e.name)),d.lazyAssign(d.nonComputedMember("s",e.name),"{}")),d.assign(t,d.nonComputedMember("s",e.name))})},t&&d.lazyAssign(t,d.nonComputedMember("l",e.name))),(d.state.expensiveChecks||sn(e.name))&&d.addEnsureSafeObject(t),i(t);break;case Yi.MemberExpression:l=r&&(r.context=this.nextId())||this.nextId(),t=t||this.nextId(),d.recurse(e.object,l,n,function(){d.if_(d.notNull(l),function(){e.computed?(u=d.nextId(),d.recurse(e.property,u),d.getStringValue(u),d.addEnsureSafeMemberName(u),o&&1!==o&&d.if_(d.not(d.computedMember(l,u)),d.lazyAssign(d.computedMember(l,u),"{}")),f=d.ensureSafeObject(d.computedMember(l,u)),d.assign(t,f),r&&(r.computed=!0,r.name=u)):(qt(e.property.name),o&&1!==o&&d.if_(d.not(d.nonComputedMember(l,e.property.name)),d.lazyAssign(d.nonComputedMember(l,e.property.name),"{}")),f=d.nonComputedMember(l,e.property.name),(d.state.expensiveChecks||sn(e.property.name))&&(f=d.ensureSafeObject(f)),d.assign(t,f),r&&(r.computed=!1,r.name=e.property.name))},function(){d.assign(t,"undefined")}),i(t)},!!o);break;case Yi.CallExpression:t=t||this.nextId(),e.filter?(u=d.filter(e.callee.name),c=[],a(e.arguments,function(e){var t=d.nextId();d.recurse(e,t),c.push(t)}),f=u+"("+c.join(",")+")",d.assign(t,f),i(t)):(u=d.nextId(),l={},c=[],d.recurse(e.callee,u,l,function(){d.if_(d.notNull(u),function(){d.addEnsureSafeFunction(u),a(e.arguments,function(e){d.recurse(e,d.nextId(),n,function(e){c.push(d.ensureSafeObject(e))})}),l.name?(d.state.expensiveChecks||d.addEnsureSafeObject(l.context),f=d.member(l.context,l.name,l.computed)+"("+c.join(",")+")"):f=u+"("+c.join(",")+")",f=d.ensureSafeObject(f),d.assign(t,f)},function(){d.assign(t,"undefined")}),i(t)}));break;case Yi.AssignmentExpression:if(u=this.nextId(),l={},!en(e.left))throw Ui("lval","Trying to assing a value to a non l-value");this.recurse(e.left,n,l,function(){d.if_(d.notNull(l.context),function(){d.recurse(e.right,u),d.addEnsureSafeObject(d.member(l.context,l.name,l.computed)),d.addEnsureSafeAssignContext(l.context),f=d.member(l.context,l.name,l.computed)+e.operator+u,d.assign(t,f),i(t||f)})},1);break;case Yi.ArrayExpression:c=[],a(e.elements,function(e){d.recurse(e,d.nextId(),n,function(e){c.push(e)})}),f="["+c.join(",")+"]",this.assign(t,f),i(f);break;case Yi.ObjectExpression:c=[],a(e.properties,function(e){d.recurse(e.value,d.nextId(),n,function(t){c.push(d.escape(e.key.type===Yi.Identifier?e.key.name:""+e.key.value)+":"+t)})}),f="{"+c.join(",")+"}",this.assign(t,f),i(f);break;case Yi.ThisExpression:this.assign(t,"s"),i("s");break;case Yi.NGValueParameter:this.assign(t,"v"),i("v")}},getHasOwnProperty:function(e,t){var n=e+"."+t,r=this.current().own;return r.hasOwnProperty(n)||(r[n]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),r[n]},assign:function(e,t){if(e)return this.current().body.push(e,"=",t,";"),e},filter:function(e){return this.state.filters.hasOwnProperty(e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefined("+e+","+this.escape(t)+")"},plus:function(e,t){return"plus("+e+","+t+")"},return_:function(e){this.current().body.push("return ",e,";")},if_:function(e,t,n){if(!0===e)t();else{var r=this.current().body;r.push("if(",e,"){"),t(),r.push("}"),n&&(r.push("else{"),n(),r.push("}"))}},not:function(e){return"!("+e+")"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){return e+"."+t},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,n){return n?this.computedMember(e,t):this.nonComputedMember(e,t)},addEnsureSafeObject:function(e){this.current().body.push(this.ensureSafeObject(e),";")},addEnsureSafeMemberName:function(e){this.current().body.push(this.ensureSafeMemberName(e),";")},addEnsureSafeFunction:function(e){this.current().body.push(this.ensureSafeFunction(e),";")},addEnsureSafeAssignContext:function(e){this.current().body.push(this.ensureSafeAssignContext(e),";")},ensureSafeObject:function(e){return"ensureSafeObject("+e+",text)"},ensureSafeMemberName:function(e){return"ensureSafeMemberName("+e+",text)"},ensureSafeFunction:function(e){return"ensureSafeFunction("+e+",text)"},getStringValue:function(e){this.assign(e,"getStringValue("+e+",text)")},ensureSafeAssignContext:function(e){return"ensureSafeAssignContext("+e+",text)"},lazyRecurse:function(e,t,n,r,i,a){var o=this;return function(){o.recurse(e,t,n,r,i,a)}},lazyAssign:function(e,t){var n=this;return function(){n.assign(e,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},escape:function(e){if(x(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(C(e))return e.toString();if(!0===e)return"true";if(!1===e)return"false";if(null===e)return"null";if(void 0===e)return"undefined";throw Ui("esc","IMPOSSIBLE")},nextId:function(e,t){var n="v"+this.state.nextId++;return e||this.current().vars.push(n+(t?"="+t:"")),n},current:function(){return this.state[this.state.computing]}},on.prototype={compile:function(e,t){var n=this,r=this.astBuilder.ast(e);this.expression=e,this.expensiveChecks=t,Qt(r,n.$filter);var i,o;(i=tn(r))&&(o=this.recurse(i));var s,l=Xt(r.body);l&&(s=[],a(l,function(e,t){var r=n.recurse(e);e.input=r,s.push(r),e.watchId=t}));var u=[];a(r.body,function(e){u.push(n.recurse(e.expression))});var c=0===r.body.length?function(){}:1===r.body.length?u[0]:function(e,t){var n;return a(u,function(r){n=r(e,t)}),n};return o&&(c.assign=function(e,t,n){return o(e,n,t)}),s&&(c.inputs=s),c.literal=nn(r),c.constant=rn(r),c},recurse:function(e,t,r){var i,o,s,l=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case Yi.Literal:return this.value(e.value,t);case Yi.UnaryExpression:return o=this.recurse(e.argument),this["unary"+e.operator](o,t);case Yi.BinaryExpression:case Yi.LogicalExpression:return i=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](i,o,t);case Yi.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case Yi.Identifier:return qt(e.name,l.expression),l.identifier(e.name,l.expensiveChecks||sn(e.name),t,r,l.expression);case Yi.MemberExpression:return i=this.recurse(e.object,!1,!!r),e.computed||(qt(e.property.name,l.expression),o=e.property.name),e.computed&&(o=this.recurse(e.property)),e.computed?this.computedMember(i,o,t,r,l.expression):this.nonComputedMember(i,o,l.expensiveChecks,t,r,l.expression);case Yi.CallExpression:return s=[],a(e.arguments,function(e){s.push(l.recurse(e))}),e.filter&&(o=this.$filter(e.callee.name)),e.filter||(o=this.recurse(e.callee,!0)),e.filter?function(e,r,i,a){for(var l=[],u=0;u<s.length;++u)l.push(s[u](e,r,i,a));var c=o.apply(n,l,a);return t?{context:n,name:n,value:c}:c}:function(e,n,r,i){var a,u=o(e,n,r,i);if(null!=u.value){Gt(u.context,l.expression),Wt(u.value,l.expression);for(var c=[],f=0;f<s.length;++f)c.push(Gt(s[f](e,n,r,i),l.expression));a=Gt(u.value.apply(u.context,c),l.expression)}return t?{value:a}:a};case Yi.AssignmentExpression:return i=this.recurse(e.left,!0,1),o=this.recurse(e.right),function(e,n,r,a){var s=i(e,n,r,a),u=o(e,n,r,a);return Gt(s.value,l.expression),Jt(s.context),s.context[s.name]=u,t?{value:u}:u};case Yi.ArrayExpression:return s=[],a(e.elements,function(e){s.push(l.recurse(e))}),function(e,n,r,i){for(var a=[],o=0;o<s.length;++o)a.push(s[o](e,n,r,i));return t?{value:a}:a};case Yi.ObjectExpression:return s=[],a(e.properties,function(e){s.push({key:e.key.type===Yi.Identifier?e.key.name:""+e.key.value,value:l.recurse(e.value)})}),function(e,n,r,i){for(var a={},o=0;o<s.length;++o)a[s[o].key]=s[o].value(e,n,r,i);return t?{value:a}:a};case Yi.ThisExpression:return function(e){return t?{value:e}:e};case Yi.NGValueParameter:return function(e,n,r,i){return t?{value:r}:r}}},"unary+":function(e,t){return function(n,r,i,a){var o=e(n,r,i,a);return o=b(o)?+o:0,t?{value:o}:o}},"unary-":function(e,t){return function(n,r,i,a){var o=e(n,r,i,a);return o=b(o)?-o:0,t?{value:o}:o}},"unary!":function(e,t){return function(n,r,i,a){var o=!e(n,r,i,a);return t?{value:o}:o}},"binary+":function(e,t,n){return function(r,i,a,o){var s=e(r,i,a,o),l=t(r,i,a,o),u=Yt(s,l);return n?{value:u}:u}},"binary-":function(e,t,n){return function(r,i,a,o){var s=e(r,i,a,o),l=t(r,i,a,o),u=(b(s)?s:0)-(b(l)?l:0);return n?{value:u}:u}},"binary*":function(e,t,n){return function(r,i,a,o){var s=e(r,i,a,o)*t(r,i,a,o);return n?{value:s}:s}},"binary/":function(e,t,n){return function(r,i,a,o){var s=e(r,i,a,o)/t(r,i,a,o);return n?{value:s}:s}},"binary%":function(e,t,n){return function(r,i,a,o){var s=e(r,i,a,o)%t(r,i,a,o);return n?{value:s}:s}},"binary===":function(e,t,n){return function(r,i,a,o){var s=e(r,i,a,o)===t(r,i,a,o);return n?{value:s}:s}},"binary!==":function(e,t,n){return function(r,i,a,o){var s=e(r,i,a,o)!==t(r,i,a,o);return n?{value:s}:s}},"binary==":function(e,t,n){return function(r,i,a,o){var s=e(r,i,a,o)==t(r,i,a,o);return n?{value:s}:s}},"binary!=":function(e,t,n){return function(r,i,a,o){var s=e(r,i,a,o)!=t(r,i,a,o);return n?{value:s}:s}},"binary<":function(e,t,n){return function(r,i,a,o){var s=e(r,i,a,o)<t(r,i,a,o);return n?{value:s}:s}},"binary>":function(e,t,n){return function(r,i,a,o){var s=e(r,i,a,o)>t(r,i,a,o);return n?{value:s}:s}},"binary<=":function(e,t,n){return function(r,i,a,o){var s=e(r,i,a,o)<=t(r,i,a,o);return n?{value:s}:s}},"binary>=":function(e,t,n){return function(r,i,a,o){var s=e(r,i,a,o)>=t(r,i,a,o);return n?{value:s}:s}},"binary&&":function(e,t,n){return function(r,i,a,o){var s=e(r,i,a,o)&&t(r,i,a,o);return n?{value:s}:s}},"binary||":function(e,t,n){return function(r,i,a,o){var s=e(r,i,a,o)||t(r,i,a,o);return n?{value:s}:s}},"ternary?:":function(e,t,n,r){return function(i,a,o,s){var l=e(i,a,o,s)?t(i,a,o,s):n(i,a,o,s);return r?{value:l}:l}},value:function(e,t){return function(){return t?{context:n,name:n,value:e}:e}},identifier:function(e,t,r,i,a){return function(o,s,l,u){var c=s&&e in s?s:o;i&&1!==i&&c&&!c[e]&&(c[e]={});var f=c?c[e]:n;return t&&Gt(f,a),r?{context:c,name:e,value:f}:f}},computedMember:function(e,t,n,r,i){return function(a,o,s,l){var u,c,f=e(a,o,s,l);return null!=f&&(u=t(a,o,s,l),u=zt(u),qt(u,i),r&&1!==r&&f&&!f[u]&&(f[u]={}),c=f[u],Gt(c,i)),n?{context:f,name:u,value:c}:c}},nonComputedMember:function(e,t,r,i,a,o){return function(s,l,u,c){var f=e(s,l,u,c);a&&1!==a&&f&&!f[t]&&(f[t]={});var d=null!=f?f[t]:n;return(r||sn(t))&&Gt(d,o),i?{context:f,name:t,value:d}:d}},inputs:function(e,t){return function(n,r,i,a){return a?a[t]:e(n,r,i)}}};var Ki=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n,this.ast=new Yi(this.lexer),this.astCompiler=n.csp?new on(this.ast,t):new an(this.ast,t)};Ki.prototype={constructor:Ki,parse:function(e){return this.astCompiler.compile(e,this.options.expensiveChecks)}};var Qi=(ge(),ge(),Object.prototype.valueOf),Xi=r("$sce"),ea={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Si=r("$compile"),ta=t.createElement("a"),na=Cn(e.location.href);An.$inject=["$document"],Mn.$inject=["$provide"],Hn.$inject=["$locale"],Nn.$inject=["$locale"];var ra=".",ia={yyyy:Vn("FullYear",4),yy:Vn("FullYear",2,0,!0),y:Vn("FullYear",1),MMMM:In("Month"),MMM:In("Month",!0),MM:Vn("Month",2,1),M:Vn("Month",1,1),dd:Vn("Date",2),d:Vn("Date",1),HH:Vn("Hours",2),H:Vn("Hours",1),hh:Vn("Hours",2,-12),h:Vn("Hours",1,-12),mm:Vn("Minutes",2),m:Vn("Minutes",1),ss:Vn("Seconds",2),s:Vn("Seconds",1),sss:Vn("Milliseconds",3),EEEE:In("Day"),EEE:In("Day",!0),a:qn,Z:Bn,ww:Un(2),w:Un(1),G:zn,GG:zn,GGG:zn,GGGG:Gn},aa=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,oa=/^\-?\d+$/;Wn.$inject=["$locale"];var sa=m($r),la=m(br);Yn.$inject=["$parse"];var ua=m({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref)return function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===Or.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),ca={};a(fi,function(e,t){function n(e,n,i){e.$watch(i[r],function(e){i.$set(t,!!e)})}if("multiple"!=e){var r=st("ng-"+t),i=n;"checked"===e&&(i=function(e,t,i){i.ngModel!==i[r]&&n(e,t,i)}),ca[r]=function(){return{restrict:"A",priority:100,link:i}}}}),a(pi,function(e,t){ca[t]=function(){return{priority:100,link:function(e,n,r){if("ngPattern"===t&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(vr);if(i)return void r.$set("ngPattern",new RegExp(i[1],i[2]))}e.$watch(r[t],function(e){r.$set(t,e)})}}}}),a(["src","srcset","href"],function(e){var t=st("ng-"+e);ca[t]=function(){return{priority:99,link:function(n,r,i){var a=e,o=e;"href"===e&&"[object SVGAnimatedString]"===Or.call(r.prop("href"))&&(o="xlinkHref",i.$attr[o]="xlink:href",a=null),i.$observe(t,function(t){if(!t)return void("href"===e&&i.$set(o,null));i.$set(o,t),xr&&a&&r.prop(a,i[o])})}}}});var fa={$addControl:g,$$renameControl:Qn,$removeControl:g,$setValidity:g,$setDirty:g,$setPristine:g,$setSubmitted:g},da="ng-submitted";Xn.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var pa=function(e){return["$timeout","$parse",function(t,r){function i(e){return""===e?r('this[""]').assign:r(e).assign||g}return{name:"form",restrict:e?"EAC":"E",require:["form","^^?form"],controller:Xn,compile:function(r,a){r.addClass(Wa).addClass(za);var o=a.name?"name":!(!e||!a.ngForm)&&"ngForm";return{pre:function(e,r,a,s){var l=s[0];if(!("action"in a)){var u=function(t){e.$apply(function(){l.$commitViewValue(),l.$setSubmitted()}),t.preventDefault()};Xr(r[0],"submit",u),r.on("$destroy",function(){t(function(){ei(r[0],"submit",u)},0,!1)})}(s[1]||l.$$parentForm).$addControl(l);var c=o?i(l.$name):g;o&&(c(e,l),a.$observe(o,function(t){l.$name!==t&&(c(e,n),l.$$parentForm.$$renameControl(l,t),(c=i(l.$name))(e,l))})),r.on("$destroy",function(){l.$$parentForm.$removeControl(l),c(e,n),f(l,fa)})}}}}}]},ha=pa(),ga=pa(!0),va=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,ma=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,$a=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,ya=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,ba=/^(\d{4})-(\d{2})-(\d{2})$/,wa=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,La=/^(\d{4})-W(\d\d)$/,xa=/^(\d{4})-(\d\d)$/,Ca=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ka={text:tr,date:ar("date",ba,ir(ba,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":ar("datetimelocal",wa,ir(wa,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:ar("time",Ca,ir(Ca,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:ar("week",La,rr,"yyyy-Www"),month:ar("month",xa,ir(xa,["yyyy","MM"]),"yyyy-MM"),number:sr,url:lr,email:ur,radio:cr,checkbox:dr,hidden:g,button:g,submit:g,reset:g,file:g},Sa=["$browser","$sniffer","$filter","$parse",function(e,t,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,a,o,s){s[0]&&(ka[$r(o.type)]||ka.text)(i,a,o,s[0],t,e,n,r)}}}}],Aa=/^(true|false|\d+)$/,Ea=function(){return{restrict:"A",priority:100,compile:function(e,t){return Aa.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},Ma=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,n,r){e.$$addBindingInfo(n,r.ngBind),n=n[0],t.$watch(r.ngBind,function(e){n.textContent=y(e)?"":e})}}}}],Oa=["$interpolate","$compile",function(e,t){return{compile:function(n){return t.$$addBindingClass(n),function(n,r,i){var a=e(r.attr(i.$attr.ngBindTemplate));t.$$addBindingInfo(r,a.expressions),r=r[0],i.$observe("ngBindTemplate",function(e){r.textContent=y(e)?"":e})}}}}],Pa=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(r,i){var a=t(i.ngBindHtml),o=t(i.ngBindHtml,function(e){return(e||"").toString()});return n.$$addBindingClass(r),function(t,r,i){n.$$addBindingInfo(r,i.ngBindHtml),t.$watch(o,function(){r.html(e.getTrustedHtml(a(t))||"")})}}}}],Ta=m({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),Da=pr("",!0),Ha=pr("Odd",0),Na=pr("Even",1),ja=Kn({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),Ra=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Va={},Ia={blur:!0,focus:!0};a("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=st("ng-"+e);Va[t]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,a){var o=n(a[t],null,!0);return function(t,n){n.on(e,function(n){var i=function(){o(t,{$event:n})};Ia[e]&&r.$$phase?t.$evalAsync(i):t.$apply(i)})}}}}]});var Ba=["$animate",function(e){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,a,o){var s,l,u;n.$watch(i.ngIf,function(n){n?l||o(function(n,a){l=a,n[n.length++]=t.createComment(" end ngIf: "+i.ngIf+" "),s={clone:n},e.enter(n,r.parent(),r)}):(u&&(u.remove(),u=null),l&&(l.$destroy(),l=null),s&&(u=he(s.clone),e.leave(u).then(function(){u=null}),s=null))})}}}],_a=["$templateRequest","$anchorScroll","$animate",function(e,t,n){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Dr.noop,compile:function(r,i){var a=i.ngInclude||i.src,o=i.onload||"",s=i.autoscroll;return function(r,i,l,u,c){var f,d,p,h=0,g=function(){d&&(d.remove(),d=null),f&&(f.$destroy(),f=null),p&&(n.leave(p).then(function(){d=null}),d=p,p=null)};r.$watch(a,function(a){var l=function(){!b(s)||s&&!r.$eval(s)||t()},d=++h;a?(e(a,!0).then(function(e){if(d===h){var t=r.$new();u.template=e;var s=c(t,function(e){g(),n.enter(e,null,i).then(l)});f=t,p=s,f.$emit("$includeContentLoaded",a),r.$eval(o)}},function(){d===h&&(g(),r.$emit("$includeContentError",a))}),r.$emit("$includeContentRequested",a)):(g(),u.template=null)})}}}}],Fa=["$compile",function(e){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,a){if(/SVG/.test(r[0].toString()))return r.empty(),void e(Ce(a.template,t).childNodes)(n,function(e){r.append(e)},{futureParentElement:r});r.html(a.template),e(r.contents())(n)}}}],Ua=Kn({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),qa=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,r,i){var o=t.attr(r.$attr.ngList)||", ",s="false"!==r.ngTrim,l=s?Vr(o):o,u=function(e){if(!y(e)){var t=[];return e&&a(e.split(l),function(e){e&&t.push(s?Vr(e):e)}),t}};i.$parsers.push(u),i.$formatters.push(function(e){return jr(e)?e.join(o):n}),i.$isEmpty=function(e){return!e||!e.length}}}},za="ng-valid",Ga="ng-invalid",Wa="ng-pristine",Ja="ng-dirty",Za="ng-pending",Ya=r("ngModel"),Ka=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,r,i,o,s,l,u,c,f){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=n,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=f(r.name||"",!1)(e),this.$$parentForm=fa;var d,p=o(r.ngModel),h=p.assign,v=p,m=h,$=null,w=this;this.$$setOptions=function(e){if(w.$options=e,e&&e.getterSetter){var t=o(r.ngModel+"()"),n=o(r.ngModel+"($$$p)");v=function(e){var n=p(e);return S(n)&&(n=t(e)),n},m=function(e,t){S(p(e))?n(e,{$$$p:w.$modelValue}):h(e,w.$modelValue)}}else if(!p.assign)throw Ya("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,Q(i))},this.$render=g,this.$isEmpty=function(e){return y(e)||""===e||null===e||e!==e};var L=0;hr({ctrl:this,$element:i,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},$animate:s}),this.$setPristine=function(){w.$dirty=!1,w.$pristine=!0,s.removeClass(i,Ja),s.addClass(i,Wa)},this.$setDirty=function(){w.$dirty=!0,w.$pristine=!1,s.removeClass(i,Wa),s.addClass(i,Ja),w.$$parentForm.$setDirty()},this.$setUntouched=function(){w.$touched=!1,w.$untouched=!0,s.setClass(i,"ng-untouched","ng-touched")},this.$setTouched=function(){w.$touched=!0,w.$untouched=!1,s.setClass(i,"ng-touched","ng-untouched")},this.$rollbackViewValue=function(){l.cancel($),w.$viewValue=w.$$lastCommittedViewValue,w.$render()},this.$validate=function(){if(!C(w.$modelValue)||!isNaN(w.$modelValue)){var e=w.$$lastCommittedViewValue,t=w.$$rawModelValue,r=w.$valid,i=w.$modelValue,a=w.$options&&w.$options.allowInvalid;w.$$runValidators(t,e,function(e){a||r===e||(w.$modelValue=e?t:n,w.$modelValue!==i&&w.$$writeModelToScope())})}},this.$$runValidators=function(e,t,r){function i(e,t){
s===L&&w.$setValidity(e,t)}function o(e){s===L&&r(e)}L++;var s=L;return function(){var e=w.$$parserName||"parse";return y(d)?(i(e,null),!0):(d||(a(w.$validators,function(e,t){i(t,null)}),a(w.$asyncValidators,function(e,t){i(t,null)})),i(e,d),d)}()&&function(){var n=!0;return a(w.$validators,function(r,a){var o=r(e,t);n=n&&o,i(a,o)}),!!n||(a(w.$asyncValidators,function(e,t){i(t,null)}),!1)}()?void function(){var r=[],s=!0;a(w.$asyncValidators,function(a,o){var l=a(e,t);if(!H(l))throw Ya("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",l);i(o,n),r.push(l.then(function(){i(o,!0)},function(e){s=!1,i(o,!1)}))}),r.length?c.all(r).then(function(){o(s)},g):o(!0)}():void o(!1)},this.$commitViewValue=function(){var e=w.$viewValue;l.cancel($),(w.$$lastCommittedViewValue!==e||""===e&&w.$$hasNativeValidators)&&(w.$$lastCommittedViewValue=e,w.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function t(){w.$modelValue!==o&&w.$$writeModelToScope()}var r=w.$$lastCommittedViewValue,i=r;if(d=!y(i)||n)for(var a=0;a<w.$parsers.length;a++)if(i=w.$parsers[a](i),y(i)){d=!1;break}C(w.$modelValue)&&isNaN(w.$modelValue)&&(w.$modelValue=v(e));var o=w.$modelValue,s=w.$options&&w.$options.allowInvalid;w.$$rawModelValue=i,s&&(w.$modelValue=i,t()),w.$$runValidators(i,w.$$lastCommittedViewValue,function(e){s||(w.$modelValue=e?i:n,t())})},this.$$writeModelToScope=function(){m(e,w.$modelValue),a(w.$viewChangeListeners,function(e){try{e()}catch(e){t(e)}})},this.$setViewValue=function(e,t){w.$viewValue=e,w.$options&&!w.$options.updateOnDefault||w.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var n,r=0,i=w.$options;i&&b(i.debounce)&&(n=i.debounce,C(n)?r=n:C(n[t])?r=n[t]:C(n.default)&&(r=n.default)),l.cancel($),r?$=l(function(){w.$commitViewValue()},r):u.$$phase?w.$commitViewValue():e.$apply(function(){w.$commitViewValue()})},e.$watch(function(){var t=v(e);if(t!==w.$modelValue&&(w.$modelValue===w.$modelValue||t===t)){w.$modelValue=w.$$rawModelValue=t,d=n;for(var r=w.$formatters,i=r.length,a=t;i--;)a=r[i](a);w.$viewValue!==a&&(w.$viewValue=w.$$lastCommittedViewValue=a,w.$render(),w.$$runValidators(t,a,g))}return t})}],Qa=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Ka,priority:1,compile:function(t){return t.addClass(Wa).addClass("ng-untouched").addClass(za),{pre:function(e,t,n,r){var i=r[0],a=r[1]||i.$$parentForm;i.$$setOptions(r[2]&&r[2].$options),a.$addControl(i),n.$observe("name",function(e){i.$name!==e&&i.$$parentForm.$$renameControl(i,e)}),e.$on("$destroy",function(){i.$$parentForm.$removeControl(i)})},post:function(t,n,r,i){var a=i[0];a.$options&&a.$options.updateOn&&n.on(a.$options.updateOn,function(e){a.$$debounceViewValueCommit(e&&e.type)}),n.on("blur",function(n){a.$touched||(e.$$phase?t.$evalAsync(a.$setTouched):t.$apply(a.$setTouched))})}}}}}],Xa=/(\s+|^)default(\s+|$)/,eo=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var n=this;this.$options=B(e.$eval(t.ngModelOptions)),b(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=Vr(this.$options.updateOn.replace(Xa,function(){return n.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},to=Kn({terminal:!0,priority:1e3}),no=r("ngOptions"),ro=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,io=["$compile","$parse",function(e,n){function r(e,t,r){function a(e,t,n,r,i){this.selectValue=e,this.viewValue=t,this.label=n,this.group=r,this.disabled=i}function o(e){var t;if(!u&&i(e))t=e;else{t=[];for(var n in e)e.hasOwnProperty(n)&&"$"!==n.charAt(0)&&t.push(n)}return t}var s=e.match(ro);if(!s)throw no("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,Q(t));var l=s[5]||s[7],u=s[6],c=/ as /.test(s[0])&&s[1],f=s[9],d=n(s[2]?s[1]:l),p=c&&n(c),h=p||d,g=f&&n(f),v=f?function(e,t){return g(r,t)}:function(e){return Ge(e)},m=function(e,t){return v(e,x(e,t))},$=n(s[2]||s[1]),y=n(s[3]||""),b=n(s[4]||""),w=n(s[8]),L={},x=u?function(e,t){return L[u]=t,L[l]=e,L}:function(e){return L[l]=e,L};return{trackBy:f,getTrackByValue:m,getWatchables:n(w,function(e){var t=[];e=e||[];for(var n=o(e),i=n.length,a=0;a<i;a++){var l=e===n?a:n[a],u=(e[l],x(e[l],l)),c=v(e[l],u);if(t.push(c),s[2]||s[1]){var f=$(r,u);t.push(f)}if(s[4]){var d=b(r,u);t.push(d)}}return t}),getOptions:function(){for(var e=[],t={},n=w(r)||[],i=o(n),s=i.length,l=0;l<s;l++){var u=n===i?l:i[l],c=n[u],d=x(c,u),p=h(r,d),g=v(p,d),L=$(r,d),C=y(r,d),k=b(r,d),S=new a(g,p,L,C,k);e.push(S),t[g]=S}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[m(e)]},getViewValueFromOption:function(e){return f?Dr.copy(e.viewValue):e.viewValue}}}}}var o=t.createElement("option"),s=t.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:function(t,n,i,l){function u(e,t){e.element=t,t.disabled=e.disabled,e.label!==t.label&&(t.label=e.label,t.textContent=e.label),e.value!==t.value&&(t.value=e.selectValue)}function c(e,t,n,r){var i;return t&&$r(t.nodeName)===n?i=t:(i=r.cloneNode(!1),t?e.insertBefore(i,t):e.appendChild(i)),i}function f(e){for(var t;e;)t=e.nextSibling,Be(e),e=t}function d(e){var t=g&&g[0],n=L&&L[0];if(t||n)for(;e&&(e===t||e===n||t&&t.nodeType===Wr);)e=e.nextSibling;return e}function p(){var e=x&&v.readValue();x=C.getOptions();var t={},r=n[0].firstChild;if(w&&n.prepend(g),r=d(r),x.items.forEach(function(e){var i,a,l;e.group?(i=t[e.group],i||(a=c(n[0],r,"optgroup",s),r=a.nextSibling,a.label=e.group,i=t[e.group]={groupElement:a,currentOptionElement:a.firstChild}),l=c(i.groupElement,i.currentOptionElement,"option",o),u(e,l),i.currentOptionElement=l.nextSibling):(l=c(n[0],r,"option",o),u(e,l),r=l.nextSibling)}),Object.keys(t).forEach(function(e){f(t[e].currentOptionElement)}),f(r),h.$render(),!h.$isEmpty(e)){var i=v.readValue();(C.trackBy?F(e,i):e===i)||(h.$setViewValue(i),h.$render())}}var h=l[1];if(h){for(var g,v=l[0],m=i.multiple,$=0,y=n.children(),b=y.length;$<b;$++)if(""===y[$].value){g=y.eq($);break}var w=!!g,L=Cr(o.cloneNode(!1));L.val("?");var x,C=r(i.ngOptions,n,t),k=function(){w||n.prepend(g),n.val(""),g.prop("selected",!0),g.attr("selected",!0)},S=function(){w||g.remove()},A=function(){n.prepend(L),n.val("?"),L.prop("selected",!0),L.attr("selected",!0)},E=function(){L.remove()};m?(h.$isEmpty=function(e){return!e||0===e.length},v.writeValue=function(e){x.items.forEach(function(e){e.element.selected=!1}),e&&e.forEach(function(e){var t=x.getOptionFromViewValue(e);t&&!t.disabled&&(t.element.selected=!0)})},v.readValue=function(){var e=n.val()||[],t=[];return a(e,function(e){var n=x.selectValueMap[e];n&&!n.disabled&&t.push(x.getViewValueFromOption(n))}),t},C.trackBy&&t.$watchCollection(function(){if(jr(h.$viewValue))return h.$viewValue.map(function(e){return C.getTrackByValue(e)})},function(){h.$render()})):(v.writeValue=function(e){var t=x.getOptionFromViewValue(e);t&&!t.disabled?n[0].value!==t.selectValue&&(E(),S(),n[0].value=t.selectValue,t.element.selected=!0,t.element.setAttribute("selected","selected")):null===e||w?(E(),k()):(S(),A())},v.readValue=function(){var e=x.selectValueMap[n.val()];return e&&!e.disabled?(S(),E(),x.getViewValueFromOption(e)):null},C.trackBy&&t.$watch(function(){return C.getTrackByValue(h.$viewValue)},function(){h.$render()})),w?(g.remove(),e(g)(t),g.removeClass("ng-scope")):g=Cr(o.cloneNode(!1)),p(),t.$watchCollection(C.getWatchables,p)}}}}],ao=["$locale","$interpolate","$log",function(e,t,n){var r=/{}/g,i=/^when(Minus)?(.+)$/;return{link:function(o,s,l){function u(e){s.text(e||"")}var c,f=l.count,d=l.$attr.when&&s.attr(l.$attr.when),p=l.offset||0,h=o.$eval(d)||{},v={},m=t.startSymbol(),$=t.endSymbol(),b=m+f+"-"+p+$,w=Dr.noop;a(l,function(e,t){var n=i.exec(t);if(n){var r=(n[1]?"-":"")+$r(n[2]);h[r]=s.attr(l.$attr[t])}}),a(h,function(e,n){v[n]=t(e.replace(r,b))}),o.$watch(f,function(t){var r=parseFloat(t),i=isNaN(r);if(i||r in h||(r=e.pluralCat(r-p)),r!==c&&!(i&&C(c)&&isNaN(c))){w();var a=v[r];y(a)?(null!=t&&n.debug("ngPluralize: no rule defined for '"+r+"' in "+d),w=g,u()):w=o.$watch(a,u),c=r}})}}}],oo=["$parse","$animate",function(e,o){var s=r("ngRepeat"),l=function(e,t,n,r,i,a,o){e[n]=r,i&&(e[i]=a),e.$index=t,e.$first=0===t,e.$last=t===o-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0==(1&t))},u=function(e){return e.clone[0]},c=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(r,f){var d=f.ngRepeat,p=t.createComment(" end ngRepeat: "+d+" "),h=d.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!h)throw s("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",d);var g=h[1],v=h[2],m=h[3],$=h[4];if(!(h=g.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/)))throw s("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",g);var y=h[3]||h[1],b=h[2];if(m&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(m)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(m)))throw s("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",m);var w,L,x,C,k={$id:Ge};return $?w=e($):(x=function(e,t){return Ge(t)},C=function(e){return e}),function(e,t,r,f,h){w&&(L=function(t,n,r){return b&&(k[b]=t),k[y]=n,k.$index=r,w(e,k)});var g=ge();e.$watchCollection(v,function(r){var f,v,$,w,k,S,A,E,M,O,P,T,D=t[0],H=ge();if(m&&(e[m]=r),i(r))M=r,E=L||x;else{E=L||C,M=[];for(var N in r)yr.call(r,N)&&"$"!==N.charAt(0)&&M.push(N)}for(w=M.length,P=new Array(w),f=0;f<w;f++)if(k=r===M?f:M[f],S=r[k],A=E(k,S,f),g[A])O=g[A],delete g[A],H[A]=O,P[f]=O;else{if(H[A])throw a(P,function(e){e&&e.scope&&(g[e.id]=e)}),s("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",d,A,S);P[f]={id:A,scope:n,clone:n},H[A]=!0}for(var j in g){if(O=g[j],T=he(O.clone),o.leave(T),T[0].parentNode)for(f=0,v=T.length;f<v;f++)T[f].$$NG_REMOVED=!0;O.scope.$destroy()}for(f=0;f<w;f++)if(k=r===M?f:M[f],S=r[k],O=P[f],O.scope){$=D;do{$=$.nextSibling}while($&&$.$$NG_REMOVED);u(O)!=$&&o.move(he(O.clone),null,Cr(D)),D=c(O),l(O.scope,f,y,S,b,k,w)}else h(function(e,t){O.scope=t;var n=p.cloneNode(!1);e[e.length++]=n,o.enter(e,null,Cr(D)),D=n,O.clone=e,H[O.id]=O,l(O.scope,f,y,S,b,k,w)});g=H})}}}}],so=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngShow,function(t){e[t?"removeClass":"addClass"](n,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],lo=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngHide,function(t){e[t?"addClass":"removeClass"](n,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],uo=Kn(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&a(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),co=["$animate",function(e){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,i,o){var s=i.ngSwitch||i.on,l=[],u=[],c=[],f=[],d=function(e,t){return function(){e.splice(t,1)}};n.$watch(s,function(n){var r,i;for(r=0,i=c.length;r<i;++r)e.cancel(c[r]);for(c.length=0,r=0,i=f.length;r<i;++r){var s=he(u[r].clone);f[r].$destroy();(c[r]=e.leave(s)).then(d(c,r))}u.length=0,f.length=0,(l=o.cases["!"+n]||o.cases["?"])&&a(l,function(n){n.transclude(function(r,i){f.push(i);var a=n.element;r[r.length++]=t.createComment(" end ngSwitchWhen: ");var o={clone:r};u.push(o),e.enter(r,a.parent(),a)})})})}}}],fo=Kn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:t})}}),po=Kn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),ho=Kn({restrict:"EAC",link:function(e,t,n,i,a){if(!a)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",Q(t));a(function(e){t.empty(),t.append(e)})}}),go=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var r=n.id,i=t[0].text;e.put(r,i)}}}}],vo={$setViewValue:g,$render:g},mo=["$element","$scope","$attrs",function(e,r,i){var a=this,o=new We;a.ngModelCtrl=vo,a.unknownOption=Cr(t.createElement("option")),a.renderUnknownOption=function(t){var n="? "+Ge(t)+" ?";a.unknownOption.val(n),e.prepend(a.unknownOption),e.val(n)},r.$on("$destroy",function(){a.renderUnknownOption=g}),a.removeUnknownOption=function(){a.unknownOption.parent()&&a.unknownOption.remove()},a.readValue=function(){return a.removeUnknownOption(),e.val()},a.writeValue=function(t){a.hasOption(t)?(a.removeUnknownOption(),e.val(t),""===t&&a.emptyOption.prop("selected",!0)):null==t&&a.emptyOption?(a.removeUnknownOption(),e.val("")):a.renderUnknownOption(t)},a.addOption=function(e,t){de(e,'"option value"'),""===e&&(a.emptyOption=t);var n=o.get(e)||0;o.put(e,n+1)},a.removeOption=function(e){var t=o.get(e);t&&(1===t?(o.remove(e),""===e&&(a.emptyOption=n)):o.put(e,t-1))},a.hasOption=function(e){return!!o.get(e)}}],$o=function(){return{restrict:"E",require:["select","?ngModel"],controller:mo,link:function(e,t,n,r){var i=r[1];if(i){var o=r[0];if(o.ngModelCtrl=i,i.$render=function(){o.writeValue(i.$viewValue)},t.on("change",function(){e.$apply(function(){i.$setViewValue(o.readValue())})}),n.multiple){o.readValue=function(){var e=[];return a(t.find("option"),function(t){t.selected&&e.push(t.value)}),e},o.writeValue=function(e){var n=new We(e);a(t.find("option"),function(e){e.selected=b(n.get(e.value))})};var s,l=NaN;e.$watch(function(){l!==i.$viewValue||F(s,i.$viewValue)||(s=_(i.$viewValue),i.$render()),l=i.$viewValue}),i.$isEmpty=function(e){return!e||0===e.length}}}}}},yo=["$interpolate",function(e){function t(e){e[0].hasAttribute("selected")&&(e[0].selected=!0)}return{restrict:"E",priority:100,compile:function(n,r){if(b(r.value))var i=e(r.value,!0);else{var a=e(n.text(),!0);a||r.$set("value",n.text())}return function(e,n,r){function o(e){l.addOption(e,n),l.ngModelCtrl.$render(),t(n)}var s=n.parent(),l=s.data("$selectController")||s.parent().data("$selectController");if(l&&l.ngModelCtrl){if(i){var u;r.$observe("value",function(e){b(u)&&l.removeOption(u),u=e,o(e)})}else a?e.$watch(a,function(e,t){r.$set("value",e),t!==e&&l.removeOption(t),o(e)}):o(r.value);n.on("$destroy",function(){l.removeOption(r.value),l.ngModelCtrl.$render()})}}}}}],bo=m({restrict:"E",terminal:!1}),wo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){r&&(n.required=!0,r.$validators.required=function(e,t){return!n.required||!r.$isEmpty(t)},n.$observe("required",function(){r.$validate()}))}}},Lo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,i,a){if(a){var o,s=i.ngPattern||i.pattern;i.$observe("pattern",function(e){if(x(e)&&e.length>0&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,e,Q(t));o=e||n,a.$validate()}),a.$validators.pattern=function(e,t){return a.$isEmpty(t)||y(o)||o.test(t)}}}}},xo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=-1;n.$observe("maxlength",function(e){var t=p(e);i=isNaN(t)?-1:t,r.$validate()}),r.$validators.maxlength=function(e,t){return i<0||r.$isEmpty(t)||t.length<=i}}}}},Co=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=0;n.$observe("minlength",function(e){i=p(e)||0,r.$validate()}),r.$validators.minlength=function(e,t){return r.$isEmpty(t)||t.length>=i}}}}};if(e.angular.bootstrap)return void console.log("WARNING: Tried to load angular more than once.");!function(){var t;if(!qr){var r=_r();kr=y(r)?e.jQuery:r?e[r]:n,kr&&kr.fn.on?(Cr=kr,f(kr.fn,{scope:ci.scope,isolateScope:ci.isolateScope,controller:ci.controller,injector:ci.injector,inheritedData:ci.inheritedData}),t=kr.cleanData,kr.cleanData=function(e){var n;if(Nr)Nr=!1;else for(var r,i=0;null!=(r=e[i]);i++)(n=kr._data(r,"events"))&&n.$destroy&&kr(r).triggerHandler("$destroy");t(e)}):Cr=Se,Dr.element=Cr,qr=!0}}(),function(t){f(t,{bootstrap:oe,copy:B,extend:f,merge:d,equals:F,element:Cr,forEach:a,injector:Ye,noop:g,bind:z,toJson:W,fromJson:J,identity:v,isUndefined:y,isDefined:b,isString:x,isFunction:S,isObject:w,isNumber:C,isElement:j,isArray:jr,version:Yr,isDate:k,lowercase:$r,uppercase:br,callbacks:{counter:0},getTestability:le,$$minErr:r,$$csp:Br,reloadWithDebugInfo:se}),(Sr=ve(e))("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:gn}),e.provider("$compile",ot).directive({a:ua,input:Sa,textarea:Sa,form:ha,script:go,select:$o,style:bo,option:yo,ngBind:Ma,ngBindHtml:Pa,ngBindTemplate:Oa,ngClass:Da,ngClassEven:Na,ngClassOdd:Ha,ngCloak:ja,ngController:Ra,ngForm:ga,ngHide:lo,ngIf:Ba,ngInclude:_a,ngInit:Ua,ngNonBindable:to,ngPluralize:ao,ngRepeat:oo,ngShow:so,ngStyle:uo,ngSwitch:co,ngSwitchWhen:fo,ngSwitchDefault:po,ngOptions:io,ngTransclude:ho,ngModel:Qa,ngList:qa,ngChange:Ta,pattern:Lo,ngPattern:Lo,required:wo,ngRequired:wo,minlength:Co,ngMinlength:Co,maxlength:xo,ngMaxlength:xo,ngValue:Ea,ngModelOptions:eo}).directive({ngInclude:Fa}).directive(ca).directive(Va),e.provider({$anchorScroll:Ke,$animate:Ci,$animateCss:ki,$$animateQueue:xi,$$AnimateRunner:Li,$browser:rt,$cacheFactory:it,$controller:ft,$document:dt,$exceptionHandler:pt,$filter:Mn,$$forceReflow:Oi,$interpolate:At,$interval:Et,$http:xt,$httpParamSerializer:gt,$httpParamSerializerJQLike:vt,$httpBackend:kt,$xhrFactory:Ct,$location:Ft,$log:Ut,$parse:un,$rootScope:hn,$q:cn,$$q:fn,$sce:yn,$sceDelegate:$n,$sniffer:bn,$templateCache:at,$templateRequest:wn,$$testability:Ln,$timeout:xn,$window:Sn,$$rAF:pn,$$jqLite:ze,$$HashMap:hi,$$cookieReader:En})}])}(Dr),Dr.module("ngLocale",[],["$provide",function(e){function t(e){e+="";var t=e.indexOf(".");return-1==t?0:e.length-t-1}function r(e,r){var i=r;n===i&&(i=Math.min(t(e),3));var a=Math.pow(10,i);return{v:i,f:(e*a|0)%a}}var i={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};e.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a",short:"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",pluralCat:function(e,t){var n=0|e,a=r(e,t);return 1==n&&0==a.v?i.ONE:i.OTHER}})}]),Cr(t).ready(function(){ae(t,oe)})}(window,document),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'),function(e){"use strict";e.module("angulartics.piwik",["angulartics"]).config(["$analyticsProvider","$windowProvider",function(t,n){var r=n.$get();t.settings.pageTracking.trackRelativePath=!0,t.api.setCustomVariable=function(e,t,n,i){r._paq&&(i=i||"page",r._paq.push(["setCustomVariable",e,t,n,i]))},t.api.trackSiteSearch=function(t,n,i){if(r._paq&&t){var a=["trackSiteSearch",t,n||!1];e.isDefined(i)&&a.push(i),r._paq.push(a)}},t.api.trackGoal=function(e,t){r._paq&&_paq.push(["trackGoal",e,t||0])},t.registerSetUsername(function(e){r._paq&&r._paq.push(["setUserId",e])}),t.registerPageTrack(function(e,t){r._paq&&(r._paq.push(["setDocumentTitle",r.document.title]),r._paq.push(["setCustomUrl",e]),r._paq.push(["trackPageView"]))}),t.registerEventTrack(function(e,t){if(r._paq){if(t.value){var n=parseInt(t.value,10);t.value=isNaN(n)?0:n}r._paq.push(["trackEvent",t.category,e,t.label,t.value])}})}])}(angular),function(e,t){"use strict";function n(){function t(e){return function(){c.waitForVendorCount&&(u[e]||(u[e]=[]),u[e].push(arguments))}}function n(t,n,r){return f[t]||(f[t]=[]),f[t].push(n),d[n]=r,function(){var n=Array.prototype.slice.apply(arguments);return this.$inject(["$q",e.bind(this,function(r){return r.all(f[t].map(function(t){if((d[t]||{}).async){var i=r.defer(),a=e.copy(n);return a.unshift(i.resolve),t.apply(this,a),i.promise}return r.when(t.apply(this,n))},this))})])}}function r(e,t){t?setTimeout(e,t):e()}function i(t,i,a){p[t]=n(t,i,a);var o=s[t],l=o?o.bufferFlushDelay:null,c=null!==l?l:s.bufferFlushDelay;e.forEach(u[t],function(e,t){r(function(){i.apply(this,e)},t*c)})}function a(e){return e.replace(/^./,function(e){return e.toUpperCase()})}function o(e){var r="register"+a(e);h[r]=function(t,n){i(e,t,n)},p[e]=n(e,t(e))}var s={pageTracking:{autoTrackFirstPage:!0,autoTrackVirtualPages:!0,trackRelativePath:!1,autoBasePath:!1,basePath:"",excludedRoutes:[]},eventTracking:{},bufferFlushDelay:1e3,trackExceptions:!1,developerMode:!1},l=["pageTrack","eventTrack","exceptionTrack","setAlias","setUsername","setUserProperties","setUserPropertiesOnce","setSuperProperties","setSuperPropertiesOnce","incrementProperty","userTimings"],u={},f={},d={},p={settings:s},h={$get:["$injector",function(e){return g(e)}],api:p,settings:s,virtualPageviews:function(e){this.settings.pageTracking.autoTrackVirtualPages=e},excludeRoutes:function(e){this.settings.pageTracking.excludedRoutes=e},firstPageview:function(e){this.settings.pageTracking.autoTrackFirstPage=e},withBase:function(t){this.settings.pageTracking.basePath=t?e.element(document).find("base").attr("href"):""},withAutoBase:function(e){this.settings.pageTracking.autoBasePath=e},trackExceptions:function(e){this.settings.trackExceptions=e},developerMode:function(e){this.settings.developerMode=e}},g=function(t){return e.extend(p,{$inject:t.invoke})};e.forEach(l,o);for(var v in h)this[v]=h[v]}function r(t,n,r,i){function a(e){for(var t=0;t<r.settings.pageTracking.excludedRoutes.length;t++){var n=r.settings.pageTracking.excludedRoutes[t];if(n instanceof RegExp&&n.test(e)||e.indexOf(n)>-1)return!0}return!1}function o(e,t){a(e)||r.pageTrack(e,t)}r.settings.pageTracking.autoTrackFirstPage&&i.invoke(["$location",function(e){var t=!0;if(i.has("$route")){var a=i.get("$route");if(a)for(var s in a.routes){t=!1;break}else null===a&&(t=!1)}else if(i.has("$state")){var l=i.get("$state");for(var u in l.get()){t=!1;break}}if(t)if(r.settings.pageTracking.autoBasePath&&(r.settings.pageTracking.basePath=n.location.pathname),r.settings.pageTracking.trackRelativePath){var c=r.settings.pageTracking.basePath+e.url();o(c,e)}else o(e.absUrl(),e)}]),r.settings.pageTracking.autoTrackVirtualPages&&i.invoke(["$location",function(e){r.settings.pageTracking.autoBasePath&&(r.settings.pageTracking.basePath=n.location.pathname+"#");var a=!0;if(i.has("$route")){var s=i.get("$route");if(s)for(var l in s.routes){a=!1;break}else null===s&&(a=!1);t.$on("$routeChangeSuccess",function(t,n){if(!n||!(n.$$route||n).redirectTo){o(r.settings.pageTracking.basePath+e.url(),e)}})}i.has("$state")&&!i.has("$transitions")&&(a=!1,t.$on("$stateChangeSuccess",function(t,n){o(r.settings.pageTracking.basePath+e.url(),e)})),i.has("$state")&&i.has("$transitions")&&(a=!1,i.invoke(["$transitions",function(t){t.onSuccess({},function(t){t.options().notify&&o(r.settings.pageTracking.basePath+e.url(),e)})}])),a&&t.$on("$locationChangeSuccess",function(t,n){if(!n||!(n.$$route||n).redirectTo)if(r.settings.pageTracking.trackRelativePath){var i=r.settings.pageTracking.basePath+e.url();o(i,e)}else o(e.absUrl(),e)})}]),r.settings.developerMode&&e.forEach(r,function(e,t){"function"==typeof e&&(r[t]=function(){})})}function i(t){return{restrict:"A",link:function(n,r,i){var a=i.analyticsOn||"click",o={};e.forEach(i.$attr,function(e,t){l(t)&&(o[u(t)]=i[t],i.$observe(t,function(e){o[u(t)]=e}))}),e.element(r[0]).bind(a,function(a){var l=i.analyticsEvent||s(r[0]);o.eventType=a.type,(!i.analyticsIf||n.$eval(i.analyticsIf))&&(i.analyticsProperties&&e.extend(o,n.$eval(i.analyticsProperties)),t.eventTrack(l,o))})}}}function a(e){e.decorator("$exceptionHandler",["$delegate","$injector",function(e,t){}])}function o(e){return["a:","button:","button:button","button:submit","input:button","input:submit"].indexOf(e.tagName.toLowerCase()+":"+(e.type||""))>=0}function s(e){return o(e)?e.innerText||e.value:e.id||e.name||e.tagName}function l(e){return"analytics"===e.substr(0,9)&&-1===["On","Event","If","Properties","EventType"].indexOf(e.substr(9))}function u(e){var t=e.slice(9);return void 0!==t&&null!==t&&t.length>0?t.substring(0,1).toLowerCase()+t.substring(1):t}var c=window.angulartics||(window.angulartics={});c.waitForVendorCount=0,c.waitForVendorApi=function(e,t,n,r,i){i||c.waitForVendorCount++,r||(r=n,n=void 0),!Object.prototype.hasOwnProperty.call(window,e)||void 0!==n&&void 0===window[e][n]?setTimeout(function(){c.waitForVendorApi(e,t,n,r,!0)},t):(c.waitForVendorCount--,r(window[e]))},e.module("angulartics",[]).provider("$analytics",n).run(["$rootScope","$window","$analytics","$injector",r]).directive("analyticsOn",["$analytics",i]).config(["$provide",a])}(angular),angular.module("LMURaumfinder",["ngRoute","leaflet-directive","filter","angulartics","angulartics.piwik"]).config(["$logProvider","$routeProvider",function(e,t){"use strict";e.debugEnabled(!1),t.when("/kontakt",{controller:"impressumCtrl",templateUrl:"partials/kontakt.html"}).when("/building/:id",{controller:"buildingCtrl",controllerAs:"ctrl",templateUrl:"partials/buildingDetail.html",reloadOnSearch:!1}).when("/building/:id/map",{controller:"mapCtrl",controllerAs:"ctrl",reloadOnSearch:!1,templateUrl:"partials/buildingMap.html"}).when("/building/:id/map/search",{controller:"roomSearchCtrl",controllerAs:"ctrl",reloadOnSearch:!1,templateUrl:"partials/roomSearch.html"}).when("/part/:id/:map*",{redirectTo:function(e,t,n){var r=window.location.href.split("#")[1].toString();return r=r.replace("part","building"),(r=r.replace(e.id,buildingsLookup[e.id]))||"/404"}}).when("/",{controller:"MainCtrl",controllerAs:"main",templateUrl:"partials/cityMap.html"}).when("/404",{controller:"MainCtrl",controllerAs:"main",templateUrl:"partials/404.html"}).otherwise({redirectTo:"/"})}]).constant("MAP_DEFAULTS",{MAPTILES_URL:"https://api.mapbox.com/styles/v1/lmu/ckk6ongvc094r17ltiup0tt8p/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoibG11IiwiYSI6ImNraWhuaDNmcTF4NXUyenBvMjRxbHU4aWcifQ.twFgGh6y08lQV6ew-q3Kqg",MAP_CREDITS:"© <a href='https://www.mapbox.com/map-feedback/'>Mapbox</a> © <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>"}).directive("topNavi",function(){"use strict";return{restrict:"AE",replace:"true",controller:"AdvertisementController",templateUrl:"partials/mobileTopMenu.html"}}),angular.module("filter",[]).filter("capitalize",function(){"use strict";return function(e,t){var n=/([^\W_]+[^\s-]*) */g;return void 0!==e&&(e=e.replace(/ - /g,"-")),e?e.replace(n,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}):""}}).filter("filterBuildings",function(){"use strict";return function(e,t){var n=[];return void 0===t||""===t?e:(t=t.toLowerCase(),angular.forEach(e,function(e,r){var i=e.displayName.toLowerCase(),a=e.city.toLowerCase();-1===i.indexOf(t)&&-1===a.indexOf(t)||n.push(e)}),n)}}).filter("findInObjects",function(){"use strict";return function(e,t){var n={};return angular.forEach(e,function(e,r){-1!==e.rName.indexOf(t)&&(n[r]=e)}),n}}).filter("stringInBrackets",function(){"use strict";return function(e,t){var n=/\(([^)]+)\)/,r=n.exec(e);return null===r||r.length<1?0:r[1]}}).filter("removeStringInBrackets",function(){"use strict";return function(e){return e.replace(/ *\([^)]*\) */g,"")}}),angular.module("LMURaumfinder").controller("buildingCtrl",["$scope","buildingManager","$routeParams","leafletData","$filter","$location","MAP_DEFAULTS",function(e,t,n,r,i,a,o){"use strict";function s(e){r.getMap().then(function(t){window.screen.width<=767&&(t.dragging.disable(),t.removeControl(t.zoomControl)),t.panTo([e.lat,e.lng]),L.marker([e.lat,e.lng]).addTo(t).bindPopup("<b>"+e.displayName+'</b></br> <a href="#/building/'+e.code+'/map">Raumplan anzeigen</a>').openPopup()})}var l=this;e.naviLink=" ",e.naviText="Gebäudesuche",t.getBuilding(n.id).then(function(e){l.building=e,s(e)},function(e){a.path("/404")}),angular.extend(e,{tiles:{url:o.MAPTILES_URL,type:"xyz",options:{attribution:o.MAP_CREDITS}},center:{lat:48.14,lng:11.58,zoom:18}})}]),angular.module("LMURaumfinder").controller("MainCtrl",["$scope","buildingManager","$filter","MAP_DEFAULTS",function(e,t,n,r){function i(t){var n={},r={};e.builingsCount=t.length,r=0==t.length?{southWest:{lat:48.0521683,lng:11.36503},northEast:{lat:48.2521683,lng:11.68137}}:{southWest:{lat:100,lng:100},northEast:{lat:0,lng:0}};for(var i=0;i<t.length;i++)n[t[i].code]={lat:parseFloat(t[i].lat),lng:parseFloat(t[i].lng),message:"<b>"+t[i].displayName+'</b></br><a href="#/building/'+t[i].code+'/map">Raumplan anzeigen ></a>'},t[i].lat<r.southWest.lat&&(r.southWest.lat=t[i].lat-.001),t[i].lng>r.northEast.lng&&(r.northEast.lng=t[i].lng+.001),t[i].lat>r.northEast.lat&&(r.northEast.lat=t[i].lat+.001),t[i].lng<r.southWest.lng&&(r.southWest.lng=t[i].lng-.001);angular.extend(e,{cityMarkers:n,cityBounds:r})}e.naviLink="",e.naviText="Raumfinder",angular.extend(e,{cityCenter:{lat:48.145,lng:11.58,zoom:14},cityLayers:{url:r.MAPTILES_URL,type:"xyz",options:{attribution:r.MAP_CREDITS}},cityMarkers:{},events:{}}),t.getAllBuildings().then(function(t){e.buildings=t}),e.$watch("searchText",function(t){e.buildings&&i(n("filterBuildings")(e.buildings,e.searchText))})}]),angular.module("LMURaumfinder").controller("mapCtrl",["$scope","$routeParams","$location","$log","leafletData","leafletMapEvents","buildingManager","roomManager","buildingPartManager","$q","$analytics",function(e,t,n,r,i,a,o,s,l,u,c){"use strict";function f(){if(n.search().room)e.mapViaRoom(n.search().room);else if(n.search().level)e.mapViaLevel(n.search().level);else if(n.search().part)e.mapViaPart(n.search().part);else{var t=v.buildingParts[Object.keys(v.buildingParts)[0]];t?d(t):(c.eventTrack("Roomfinder Error!",{category:"ERROR",label:"Can't find building "+t}),n.path("/404"))}}function d(e){r.debug("Init Map"),e||n.path("/404"),i.getMap().then(function(t){m&&t.removeLayer(m),w&&t.removeControl(w),C&&t.removeControl(C),m=L.tileLayer.lmuMaps("https://cms-static.uni-muenchen.de/lmu-roomfinder-4b38a548/tiles/v3/"+e.mapUri.split(".")[0]+"/",{width:e.mapSizeX,height:e.mapSizeY,attribution:"© LMU München"}),m.addTo(t),g(t,e);var n=v.buildingParts.getStructure();w=new b(e.fCode,n[e.buildingPart]),t.addControl(w),v.buildingParts.isComplex()&&(r.debug("This Building has multiple building parts"),C=new x(e.buildingPart,n),t.addControl(C))})}function p(e,t){i.getMap().then(function(n){var r=null;y||(r=n.unproject([0,0],3),y=L.marker(r),n.addLayer(y)),r=n.unproject([e,t],3),y.setLatLng(r),n.panTo(r)})}function h(){
i.getMap().then(function(e){y&&(e.removeLayer(y),y=null)})}function g(e,t){var n=e.unproject([0,t.mapSizeY],3),r=e.unproject([t.mapSizeX,0],3);return $=new L.LatLngBounds(n,r),e.setMaxBounds($),$}var v=this;v.building=null,v.buildingCode=null,v.buildingParts=null,v.rooms=null,v.filteredRooms=null,e.naviText="Gebäudedetails",e.naviLink="building/"+t.id+"/",e.roomLimit=30;var m,$,y,b,w,x,C;angular.extend(e,{center:{zoom:3},defaults:{minZoom:0,maxZoom:3,crs:L.CRS.Simple,continuousWorld:!0},layers:{},events:{map:{enable:[],logic:"emit"}}});!function(){v.buildingCode=t.id,r.debug("Building code ",v.buildingCode);var i=o.getBuilding(v.buildingCode),a=s.getAllRooms(v.buildingCode),d=l.getBuildingPart(v.buildingCode),p=i.then(function(e){r.debug(e),v.building=e}),h=a.then(function(t){r.debug(t),v.rooms=t,v.filteredRooms=v.rooms.getRooms(void 0,e.roomLimit)}),g=d.then(function(e){r.debug(e),v.buildingParts=e,r.debug(e.getStructure(v.buildingCode))});u.all([p,h,g]).then(function(){r.debug("ALL PROMISES RESOLVED"),f()},function(e){c.eventTrack("Roomfinder Error!",{category:"ERROR",label:"Can't find building "+v.buildingCode}),n.path("/404")})}(),e.mapViaRoom=function(e){try{var t=v.rooms.getRoom(e).floorCode;d(v.buildingParts[t]),p(v.rooms.getRoom(e).pX,v.rooms.getRoom(e).pY),c.pageTrack("/building/"+v.buildingCode+"/map?room="+e)}catch(t){c.eventTrack("Roomfinder Error!",{category:"ERROR",label:"Can't find room "+e+" in building "+v.buildingCode}),n.path("/404")}},e.mapViaLevel=function(e){h();var t=v.buildingParts[e];t?(d(t),c.pageTrack("/building/"+v.buildingCode+"/map?level="+e)):(c.eventTrack("Roomfinder Error!",{category:"ERROR",label:"Can't find level "+e+" of building "+v.buildingCode}),n.path("/404"))},e.mapViaPart=function(e){h();try{d(v.buildingParts.getGroundFloor(e)),c.pageTrack("/building/"+v.buildingCode+"/map?part="+e)}catch(t){c.eventTrack("Roomfinder Error!",{category:"ERROR",label:"Can't find building part "+e+" of building "+v.buildingCode}),n.path("/404")}},e.showMoreRooms=function(){e.roomLimit+=50,v.filteredRooms=v.rooms.getRooms(void 0,e.roomLimit)},e.$watch("searchRoom",function(t){v.filteredRooms&&(v.filteredRooms=v.rooms.getRooms(t,e.roomLimit))}),b=L.Control.extend({options:{position:"topright",activeLevelCode:"",activeBPartStructure:""},initialize:function(e,t){this.options.activeLevelCode=e,this.options.activeBPartStructure=t},onAdd:function(t){var n=L.DomUtil.create("div","leaflet-bar leaflet-control leaflet-control-custom"),r=this.options.activeBPartStructure.levels;for(var i in r){var a=L.DomUtil.create("a","");r[i].fCode;this.options.activeLevelCode==r[i].fCode&&a.setAttribute("class","active"),a.setAttribute("fCode",r[i].fCode),a.setAttribute("href","#/building/"+v.buildingCode+"/map?level="+r[i].fCode),a.innerHTML=r[i].level,a.onclick=function(t){e.mapViaLevel(t.target.attributes.fCode.nodeValue)},n.appendChild(a)}return n}}),x=L.Control.extend({options:{position:"bottomleft",activePart:""},initialize:function(e,t){this.options.activePart=e,this.options.structure=t},onAdd:function(t){var n=L.DomUtil.create("div","leaflet-bar leaflet-control leaflet-control-custom");r.debug(this.options.structure);for(var i in this.options.structure){var a=this.options.structure[i],o=L.DomUtil.create("a","");this.options.activePart==i&&o.setAttribute("class","active"),o.setAttribute("buildingPart",i),o.setAttribute("href","#/building/"+v.buildingCode+"/map?part="+i),o.innerHTML=a.name,o.onclick=function(t){e.mapViaPart(t.target.attributes.buildingPart.nodeValue)},n.appendChild(o)}return n}})}]),angular.module("LMURaumfinder").controller("roomSearchCtrl",["$scope","$routeParams","buildingManager","$filter","roomManager",function(e,t,n,r,i){"use strict";e.searchRoom="",e.naviText="LMU Roomfinder",e.naviLink="",e.roomLimit=30;var a=this;a.building=null,a.buildingCode=null,a.rooms=null,a.filteredRooms=null;!function(){a.buildingCode=t.id,e.naviLink="building/"+a.buildingCode+"/map";var r=n.getBuilding(a.buildingCode),o=i.getAllRooms(a.buildingCode);r.then(function(t){a.building=t,e.naviText=t.displayName}),o.then(function(t){a.rooms=t,a.filteredRooms=a.rooms.getRooms(void 0,e.roomLimit)})}(),e.$watch("searchRoom",function(t){a.filteredRooms&&(a.filteredRooms=a.rooms.getRooms(t,e.roomLimit))}),e.showMoreRooms=function(){e.roomLimit+=50,a.filteredRooms=a.rooms.getRooms(void 0,e.roomLimit)}}]).controller("impressumCtrl",["$scope",function(e){"use strict";e.naviText="LMU Roomfinder",e.naviLink=!0}]).controller("AdvertisementController",["$scope",function(e){"use strict";function t(e,t,n){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3);var i="expires="+r.toUTCString();document.cookie=e+"="+t+"; "+i}var n=navigator.userAgent.toLowerCase(),r=n.indexOf("android")>-1,i=function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return""}("adDismissed");e.showAd=!(!r||i),e.dismiss=function(){e.showAd=!1,t("adDismissed",!0,365)}}]),angular.module("LMURaumfinder").factory("Building",["$http","$filter",function(e,t){"use strict";function n(e){e&&(e.displayName=t("capitalize",!0)(e.displayName),e.lat=parseFloat(e.lat),e.lng=parseFloat(e.lng),this.setData(e))}return n.prototype={setData:function(e){angular.extend(this,e)},getImageUrl:function(e){return e<=40?"1"===this.hasImage?"https://cms-cdn.uni-muenchen.de/lmu-roomfinder-4b38a548/photos/thumbnails/"+this.code+".jpg":"img/houseIcon.png":e<=400?"1"===this.hasImage?"https://cms-cdn.uni-muenchen.de/lmu-roomfinder-4b38a548/photos/medium/"+this.code+".jpg":"img/pattern.jpg":void 0}},n}]),angular.module("LMURaumfinder").factory("buildingManager",["$http","$q","Building",function(e,t,n){"use strict";return{_poolArray:[],_pool:{},_retrieveInstance:function(e,t){var r=this._poolArray[e];return r?r.setData(t):(r=new n(t),this._pool[e]=r,this._poolArray.push(r)),r},_search:function(e){return this._pool[e]},_loadAll:function(e){var t=this;buildingsJSON.forEach(function(e){t._retrieveInstance(e.code,e)}),e.resolve(t._poolArray)},_load:function(e,t){var n=this;buildingsJSON.forEach(function(e){n._retrieveInstance(e.code,e)}),n._pool[t]?e.resolve(n._pool[t]):e.reject()},getBuilding:function(e){var n=t.defer(),r=this._search(e);return r?n.resolve(r):this._load(n,e),n.promise},getAllBuildings:function(){var e=t.defer();return this._poolArray.length>0?e.resolve(this._poolArray):this._loadAll(e),e.promise}}}]),angular.module("LMURaumfinder").factory("BuildingPart",["$http","$filter",function(e,t){"use strict";function n(e){if(e){this.setData(e);var n={},a={};for(var o in e)e[o].level=i(e[o].level),a=e[o],a.fCode=o,n[a.buildingPart]||(n[a.buildingPart]={},n[a.buildingPart].levels=[],n[a.buildingPart].name=t("stringInBrackets")(a.address)||"Y"),n[a.buildingPart].levels.push(a);for(var s in n)n[s].levels.sort(r);this.setData({structure:n})}}function r(e,t){var n=["OG8","OG7","OG6","OG5","OG4","ZG3","OG3","ZG2","OG2","ZG1","OG1","ZG","EG","UG1","UG2","UG3"],r=n.indexOf(e.level),i=n.indexOf(t.level);return r==i?0:r<i?-1:1}function i(e){return e=t("removeStringInBrackets")(e),e=rename[e]?rename[e]:e}return n.prototype={setData:function(e){angular.extend(this,e)},isComplex:function(){return Object.keys(this.structure).length>1},getStructure:function(){return this.structure},getFirstPart:function(){return this[Object.keys(this)[0]]},getGroundFloor:function(e){var t=this.structure[e];for(var n in t.levels)if("EG"==t.levels[n].level)return t.levels[n];return t.levels[0]},getPart:function(e){return this[e]}},n}]),angular.module("LMURaumfinder").factory("buildingPartManager",["$http","$q","BuildingPart",function(e,t,n){"use strict";return{_pool:{},_retrieveInstance:function(e,t){var r=this._pool[e];return r?r.setData(t):(r=new n(t),this._pool[e]=r),r},_search:function(e){return this._pool[e]},_load:function(t,n){var r=this;e.get("json/uniqueBuildingParts/"+t+".json").success(function(e){var i=r._retrieveInstance(t,e);n.resolve(i)}).error(function(){n.reject()})},getBuildingPart:function(e){var n=t.defer(),r=this._search(e);return r?n.resolve(r):this._load(e,n),n.promise}}}]),angular.module("LMURaumfinder").factory("roomManager",["$http","$q","Room",function(e,t,n){"use strict";return{_pool:{},_search:function(e){return this._pool[e]},_loadAll:function(t,r,i){var a=this;e.get("json/rooms/"+t+".json").success(function(e){var o=new n(e);a._pool[t]=o,r?i.resolve(o.getRoom(r)):i.resolve(o)}).error(function(){i.reject()})},getAllRooms:function(e){var n=t.defer(),r=this._search(e);return r?n.resolve(r):this._loadAll(e,!1,n),n.promise},getRoom:function(e,n){var r=t.defer(),i=this._search(e,n);return i?r.resolve(i):this._loadAll(e,n,r),r.promise}}}]),angular.module("LMURaumfinder").factory("Room",["$http",function(e){"use strict";function t(e){e&&this.setData({data:e})}return t.prototype={setData:function(e){angular.extend(this,e)},getRoomsCount:function(){return Object.keys(this.data).length},getRoom:function(e){return this.data[e]},getRooms:function(e,t){var n=[],r=!1,i=" ";void 0===e?r=!0:i=e.replace(/ /g,"").toLowerCase();for(var a in this.data)if((r||this.data[a].rName.replace(/ /g,"").toLowerCase().indexOf(i)>-1)&&(this.data[a].rCode=a,n.push(this.data[a])),n.length>t)break;return n}},t}]);