text: ﻿var CommonModule,ConfigurationModule,CoreModule,DashboardModule,GroupModule,RoleModule,SecurityModule,ServerProcessModule,SessionModule,UserModule;(function(){var n=angular.module("common",["configuration","core","session"])})(CommonModule||(CommonModule={}));angular.module("common").run(["$templateCache",function(n){n.put("/app/common/components/entityAdminMenu/entityAdminMenu.html",'<div class="entity-admin-menu">        <h1>        {{ entityNamePluralized }}    <\/h1>    <ul>        <li><a ng-href="#/{{ entityNameLowerCase }}/add">Add {{ entityName }}<\/a><\/li>        <li><a ng-href="#/{{ entityNameLowerCase }}/list">{{ entityNamePluralized }}<\/a><\/li>    <\/ul><\/div>')}]),function(){"use strict";var n=function(){function n(){this.$inject=[];this.restrict="E";this.replace=!0;this.scope={};this.templateUrl="/app/common/components/entityAdminMenu/entityAdminMenu.html";this.link=function(n,t,i){n.entityNameLowerCase=i.entityName.toLowerCase();n.entityName=i.entityName;n.entityNamePluralized=i.entityNamePluralized}}return n.componentId="entityAdminMenu",n}();angular.module("common").directive(n.componentId,function(){return new n})}(CommonModule||(CommonModule={})),function(){function n(n){return{templateUrl:"/app/common/components/identityMenu/identityMenu.html",restrict:"EA",replace:!0,scope:{},link:function(t){t.session=n}}}angular.module("common").directive("identityMenu",["session",n])}(CommonModule||(CommonModule={}));angular.module("common").run(["$templateCache",function(n){n.put("/app/common/components/multiEntitySelect/multiEntitySelect.html",'<div class="form-group">    <label>        {{ entityNamePlural }}    <\/label>    <select ng-model="selectedId"            data-ng-options="e.id as e.name for e in vm.entities"><\/select>    <div>        <ul>            <li data-ng-repeat="entity in parentEntities">                <a>{{ entity.name }}<\/a>            <\/li>        <\/ul>    <\/div><\/div>')}]),function(){var n=function(){function n(){this.restrict="E";this.replace=!0;this.templateUrl="/app/common/components/multiEntitySelect/multiEntitySelect.html";this.scope={parentEntities:"=",entityService:"="};this.link=function(n,t,i){return n.parentEntities=n.parentEntities||[],n.entityNamePlural=i.entityNamePlural,n.$watch("selectedId",function(){n.processSelectedIdChange();n.selectedId=null}),n.processSelectedIdChange=function(){var t;if(n.selectedId){for(t=0;t<n.parentEntities.length;t++)if(n.parentEntities[t].id==n.selectedId){n.parentEntities.splice(t,1);return}for(t=0;t<n.vm.entities.length;t++)n.vm.entities[t].id==n.selectedId&&n.parentEntities.push(n.vm.entities[t])}},n.entityService.getAll().then(function(t){n.vm={entities:t}})}}return n.componentId="multiEntitySelect",n}();angular.module("common").directive(n.componentId,function(){return new n})}(CommonModule||(CommonModule={})),function(){"use strict";var n=function(n,t){return{restrict:"E",scope:{},template:"<div ng-show='requestCount' class='work-spinner'><i class='fa fa-spinner fa-spin fade'><\/i><\/div>",link:function(n){n.$watch(function(){return t.getRequestCount()},function(t){n.requestCount=t})}}};n.$inject=["$rootScope","requestCounter"];angular.module("common").directive("workSpinner",n)}(CommonModule||(CommonModule={})),function(){var n=angular.module("configuration",[])}(ConfigurationModule||(ConfigurationModule={})),function(n){var t=function(){function n(n,t,i){this.$http=n;this.$q=t;this.$rootScope=i;this.baseUri="api/configuration/"}return n.prototype.get=function(){var t=this,n=this.$q.defer();return this.$http({method:"GET",url:this.baseUri+"get"}).then(function(i){n.resolve(t.$rootScope.configuration=i.data)}).catch(function(t){n.reject(t)}),n.promise},n.serviceId="configurationService",n}();n.ConfigurationService=t;angular.module("configuration").service(t.serviceId,["$http","$q","$rootScope",function(n,i,r){return new t(n,i,r)}])}(ConfigurationModule||(ConfigurationModule={})),function(){function n(n){n.interceptors.push("authorizationInterceptor");n.interceptors.push("requestCounter")}var t=angular.module("core",["configuration","session"]).config(n);n.$inject=["$httpProvider"]}(CoreModule||(CoreModule={})),function(){"use strict"}(CoreModule||(CoreModule={})),function(){"use strict"}(CoreModule||(CoreModule={})),function(){"use strict";function n(n,t,i){var r=this;return r.request=function(n){return i.get()&&(n.headers.Authorization="basic "+i.get()),n},r}n.$inject=["$q","$rootScope","token"];angular.module("core").factory("authorizationInterceptor",n)}(CoreModule||(CoreModule={})),function(){"use strict";function n(n){var t=0,i=function(i){return t+=1,n.when(i)},r=function(i){return t-=1,n.reject(i)},u=function(i){return t-=1,n.when(i)},f=function(i){return t-=1,n.reject(i)},e=function(){return t};return{request:i,response:u,requestError:r,responseError:f,getRequestCount:e}}n.$inject=["$q"];angular.module("core").factory("requestCounter",n)}(CoreModule||(CoreModule={})),function(){angular.module("core").value("$",$)}(CoreModule||(CoreModule={})),function(){var n=function(){function n(){}return n.prototype.configure=function(n){this.config={baseUrl:n}},n.prototype.$get=function(){return this.config},n}();angular.module("core").provider("apiEndpointProvider",n)}(CoreModule||(CoreModule={})),function(){"use strict";function n(){var n="ngBlogStorage";return{get:function(){return JSON.parse(localStorage.getItem(n)||"[]")},getByName:function(t){for(var r=JSON.parse(localStorage.getItem(n)||"[]"),i=0;i<r.length;i++)if(t.name===r[i].name)return r[i];return null},put:function(t){for(var i=JSON.parse(localStorage.getItem(n)||"[]"),r=0;r<i.length;r++)if(t.name===i[r].name){i[r].value=t.value;localStorage.setItem(n,JSON.stringify(i));return}i.push(t);localStorage.setItem(n,JSON.stringify(i))}}}angular.module("core").factory("storage",[n])}(),function(){"use strict";function n(n,t){var r=this,i=null,u="configuration";return r.get=function(){if(i)return i;try{i=t.getByName({name:u}).value}catch(n){}return i},r.set=function(n){i=n.data;t.put({name:u,value:n.data})},n.$on("$routeChangeStart",function(n,t){t.originalPath=="/signin"&&(i=null,r.set({data:null}))}),r}angular.module("core").service("configuration",["$rootScope","storage",n])}(),function(){"use strict";function n(n){var t=new XMLHttpRequest,i=null;return t.onreadystatechange=function(){t.readyState==4&&t.status==200&&(i=t.responseText)},t.open("GET",n,!1),t.send(null),i}angular.module("core").value("getStringFromUrl",n)}(CoreModule||(CoreModule={})),function(){function n(n,t,i,r,u){u.digestTtl(8);t.interceptors.push("authorizationInterceptor");t.useApplyAsync(!0);i.html5Mode(!1);n.debugInfoEnabled(!1);r.when("/",{templateUrl:"app/dashboard/templates/splash.html",resolve:{routeData:["serverProcessDashboardRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!1,caseInsensitiveMatch:!0});r.when("/signin",{templateUrl:"app/dashboard/templates/signin.html",resolve:{routeData:["serverProcessDashboardRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!1,caseInsensitiveMatch:!0});r.when("/dashboard",{templateUrl:"app/dashboard/templates/dashboard.html",resolve:{routeData:["serverProcessDashboardRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0,caseInsensitiveMatch:!0});r.when("/version",{templateUrl:"app/dashboard/templates/version.html",resolve:{routeData:["serverProcessDashboardRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0,caseInsensitiveMatch:!0});r.otherwise("/")}function t(n,t,i,r,u,f,e,o){i.$on("$routeChangeStart",function(n,r){i.inViewTransition=!0;r.originalPath=="/signin"&&o.set({data:null});r.$$route&&r.$$route.authorizationRequired&&o.get()==null&&i.$evalAsync(function(){t.path("/signin")})});i.$on("$viewContentLoaded",function(){i.inViewTransition=!1;r.current.$$route.authorizationRequired&&(f.get()==null||f.get()=="")&&t.path("/signin")})}angular.module("dashboard",["configuration","common","core","session","security","serverProcess","ngRoute"]).config(n).run(t);n.$inject=["$compileProvider","$httpProvider","$locationProvider","$routeProvider","$rootScopeProvider"];t.$inject=["$http","$location","$rootScope","$route","$templateCache","currentUser","serverProcessDashboardSignalRService","token"]}(DashboardModule||(DashboardModule={}));angular.module("dashboard").run(["$templateCache",function(n){n.put("/app/dashboard/components/dashboardHeader/dashboardHeader.html",'<div id="dashboard-header">    <ul data-ng-if="session.isLoggedIn()">        <li><a href="#/">Home<\/a><\/li>        <li><a href="#/dashboard">Dashboard<\/a><\/li>        <li><a href="#/security">Security<\/a><\/li>        <li><a href="#/version">Version<\/a><\/li>        <li><a href="#/serverProcess">Sever Processes<\/a><\/li>        <li><a href="#/signin">Logout<\/a><\/li>        <li><a>Hi {{ session.getCurrentUser().username }}!<\/a><\/li>    <\/ul>        <ul data-ng-if="!session.isLoggedIn()">        <li><a href="#/">Home<\/a><\/li>        <li><a href="#/signin">Login<\/a><\/li>    <\/ul><\/div>')}]),function(n){"use strict";var t=function(){function n(n){var t=this;this.session=n;this.templateUrl="app/dashboard/components/dashboardHeader/dashboardHeader.html";this.restrict="E";this.scope={};this.replace=!0;this.link=function(n){n.session=t.session}}return n.componentId="dashboardHeader",n.$inject=["session"],n}();n.DashboardHeader=t;angular.module("dashboard").directive(t.componentId,function(n){return new t(n)})}(DashboardModule||(DashboardModule={}));angular.module("dashboard").run(["$templateCache",function(n){n.put("/app/dashboard/components/dashboardTile/dashboardTile.html",'<div id="">    <\/div>')}]);angular.module("dashboard").run(["$templateCache",function(n){n.put("/app/dashboard/components/dashboardVersion/dashboardVersion.html","<div>        <h1>Version<\/h1>        <div>        OWIN Windows Service Version: {{ configuration.simWindowServiceVersion }}    <\/div>        <div>        Execution Host Version: {{ configuration.simExecutionHostVersion }}    <\/div><\/div>")}]),function(){var n=function(){function n(n){var t=this;this.$rootScope=n;this.restrict="E";this.scope={};this.replace=!0;this.templateUrl="/app/dashboard/components/dashboardVersion/dashboardVersion.html";this.link=function(n){n.configuration=t.$rootScope.configuration};this.$inject=["$rootScope"]}return n.componentId="dashboardVersion",n}();angular.module("dashboard").directive(n.componentId,function(t){return new n(t)})}(DashboardModule||(DashboardModule={}));angular.module("dashboard").run(["$templateCache",function(n){n.put("/app/dashboard/components/feedReport/feedReport.html",'<div id="feed-report">    <h1>Feed Report<\/h1>        <div data-ng-repeat="runningJob in runningJobs">        <a> {{ runningJob.name }}<\/a>    <\/div><\/div>')}]),function(){var n=function(){function n(){this.restrict="E";this.replace=!0;this.templateUrl="/app/dashboard/components/feedReport/feedReport.html";this.link=function(n){n.runningJobs=[];n.$on("runStart",function(){n.runningJobs.push({name:"New Job"});n.$digest()})}}return n.componentId="feedReport",n}();angular.module("dashboard").directive(n.componentId,function(){return new n})}(DashboardModule||(DashboardModule={})),function(){"use strict";function n(n,t,i,r,u){var f=this;return f.resolveRoute=function(){return r.get().then(function(){return u.identity.getCurrentUser().then(function(){return!0})})},f}angular.module("dashboard").service("serverProcessDashboardRouteResolver",["$location","$q","$route","configurationService","securityUow",n])}(DashboardModule||(DashboardModule={})),function(){function t(){}t.$inject=["$rootScope"];var n=function(){function n(n,t){var i=this;this.$rootScope=n;this.$=t;this.$inject=["$rootScope","$"];this.connection=null;this.hub=null;this.run=function(n,t){i.hub.invoke("run",n,t)};this.runStart=function(){i.$rootScope.$broadcast("runStart")};this.connection=this.$.hubConnection();this.hub=this.connection.createHubProxy("serverProcessDashboardHub");this.hub.on("serverProcessRunStart",function(){i.runStart()});this.connection.start(function(){});this.$rootScope.$on("serverProcessRunRequest",function(n,t){i.run(t.entity.name,t.entity.step)})}return n.serviceId="serverProcessDashboardSignalRService",n}();angular.module("dashboard").service(n.serviceId,function(t,i){return new n(t,i)})}(DashboardModule||(DashboardModule={})),function(){function n(n){n.when("/group/add",{templateUrl:""});n.when("/group/list",{templateUrl:""})}angular.module("group",["configuration","common","core","session","ngRoute"]).config(n);n.$inject=["$routeProvider"]}(GroupModule||(GroupModule={}));angular.module("group").run(["$templateCache",function(n){n.put("/app/group/components/groupEditor/groupEditor.html",'<div>    <hgroup>        <h1 data-ng-show="vm.entity.id > 0">Edit Group<\/h1>        <h1 data-ng-hide="vm.entity.id">Create Group<\/h1>    <\/hgroup>    <form name="groupEditor" role="form" data-ng-submit="tryToSave(groupEditor)" novalidate>        <div class="form-group">            <label>                Name            <\/label>            <input data-ng-model="vm.entity.name" type="text" class="form-control" />        <\/div>        <p>            <input type="submit" value="save" class="btn btn-lrg" />        <\/p>    <\/form><\/div>')}]),function(){var n=function(){function n(n,t){var i=this;this.$location=n;this.groupService=t;this.replace=!0;this.restrict="E";this.templateUrl="/app/group/components/groupEditor/groupEditor.html";this.scope={entity:"="};this.link=function(n){n.vm={};n.vm.entity=n.entity;n.tryToSave=function(){return n.vm.entity.id?i.groupService.update({entity:n.vm.entity}).then(function(){i.$location.path("/group/list")}):i.groupService.add({entity:n.vm.entity}).then(function(){i.$location.path("/group/list")})}};this.$inject=["$location","groupService"]}return n.componentId="groupEditor",n}();angular.module("group").directive(n.componentId,function(t,i){return new n(t,i)})}(GroupModule||(GroupModule={}));angular.module("group").run(["$templateCache",function(n){n.put("/app/group/components/groupList/groupList.html",'<div>    <hgroup>        <h1>Groups<\/h1>    <\/hgroup>    <a href="#/group/add">Add<\/a>    <table>        <thead>            <tr>                <th>Id<\/th>                <th>Name<\/th>                <th>Actions<\/th>            <\/tr>        <\/thead>        <tbody>            <tr data-ng-repeat="entity in vm.entities">                <td><a>{{ entity.id }}<\/a><\/td>                <td><a>{{ entity.name }}<\/a><\/td>                <td><a href="#/group/edit/{{ entity.id }}">edit<\/a>&nbsp;|&nbsp;<a data-ng-click="vm.remove(entity)">delete<\/a><\/td>            <\/tr>        <\/tbody>    <\/table><\/div>')}]),function(){var n=function(){function n(n){var t=this;this.groupService=n;this.replace=!0;this.restrict="E";this.templateUrl="/app/group/components/groupList/groupList.html";this.scope={};this.link=function(n){return n.vm={},n.vm.remove=function(i){return t.groupService.remove({id:i.id}).then(function(){for(var t=0;t<n.vm.entities.length;t++)n.vm.entities[t].id==i.id&&n.vm.entities.splice(t,1)}).catch(function(){})},t.groupService.getAll().then(function(t){return n.vm.entities=t})};this.$inject=["groupService"]}return n.componentId="groupList",n}();angular.module("group").directive(n.componentId,function(t){return new n(t)})}(GroupModule||(GroupModule={})),function(n){"use strict";var t=function(){function n(n,t,i,r){var u=this;this.$http=n;this.$q=t;this.$rootScope=i;this.configurationService=r;this.dataStore={getAll:null,getById:null,pages:[]};this.clearDataStore=function(){u.dataStore={getAll:null,getById:null,pages:[]}};this.getBaseUri=function(){return u.$rootScope.configuration&&u.$rootScope.configuration.apiVersion?"api/"+u.$rootScope.configuration.apiVersion+"/group/":"api/group/"};this.add=function(n){var t=u.$q.defer();return u.$http({method:"POST",url:u.getBaseUri()+"add",data:n.entity}).then(function(n){t.resolve(n)}).catch(function(n){t.reject(n)}),t.promise};this.remove=function(n){var t=u.$q.defer();return u.$http({method:"DELETE",url:u.getBaseUri()+"remove?id="+n.id}).then(function(n){t.resolve(n)}).catch(function(n){t.reject(n)}),t.promise};this.getAll=function(){var n=u.$q.defer();return u.dataStore.getAll?(n.resolve(u.dataStore.getAll),n.promise):(u.$http({method:"GET",url:u.getBaseUri()+"getAll"}).then(function(t){u.dataStore.getAll=t.data;n.resolve(t.data)}).catch(function(t){n.reject(t)}),n.promise)};this.getById=function(n){var t=u.$q.defer();return u.dataStore.getById&&u.dataStore.getById.id==n?(t.resolve(u.dataStore.getById),t.promise):(u.$http({method:"GET",url:u.getBaseUri()+"getbyid?id="+n}).then(function(n){t.resolve(n)}).catch(function(n){t.reject(n)}),t.promise)};this.getPage=function(){var n=u.$q.defer();return u.dataStore.getAll?(n.resolve(u.dataStore.getAll),n.promise):(u.$http({method:"GET",url:u.getBaseUri()+"getAll"}).then(function(t){n.resolve(t)}).catch(function(t){n.reject(t)}),n.promise)};this.$rootScope.$on("$locationChangeStart",function(){u.clearDataStore()})}return n.serviceId="groupService",n.$inject=["$http","$q","$rootScope","configurationService"],n}();n.GroupService=t;angular.module("group").service(t.serviceId,function(n,i,r,u){return new t(n,i,r,u)})}(GroupModule||(GroupModule={})),function(){function n(n){n.when("/role/add",{templateUrl:""});n.when("/role/list",{templateUrl:""})}angular.module("role",["configuration","common","core","session","ngRoute"]).config(n);n.$inject=["$routeProvider"]}(RoleModule||(RoleModule={}));angular.module("role").run(["$templateCache",function(n){n.put("/app/role/components/roleEditor/roleEditor.html",'<div>    <hgroup>        <h1 data-ng-show="vm.entity.id > 0">Edit Role<\/h1>        <h1 data-ng-hide="vm.entity.id">Create Role<\/h1>    <\/hgroup>    <form name="roleEditor" role="form" data-ng-submit="tryToSave(roleEditor)" novalidate>        <div class="form-group">            <label>                Name            <\/label>            <input data-ng-model="vm.entity.name" type="text" class="form-control" />        <\/div>        <p>            <input type="submit" value="save" class="btn btn-lrg" />        <\/p>    <\/form><\/div>')}]),function(){var n=function(){function n(n,t){var i=this;this.$location=n;this.roleService=t;this.replace=!0;this.restrict="E";this.templateUrl="/app/role/components/roleEditor/roleEditor.html";this.scope={entity:"="};this.link=function(n){n.vm={};n.vm.entity=n.entity;n.tryToSave=function(){return n.vm.entity.id?i.roleService.update({entity:n.vm.entity}).then(function(){i.$location.path("/role/list")}):i.roleService.add({entity:n.vm.entity}).then(function(){i.$location.path("/role/list")})}};this.$inject=["$location","roleService"]}return n.componentId="roleEditor",n}();angular.module("role").directive(n.componentId,function(t,i){return new n(t,i)})}(RoleModule||(RoleModule={}));angular.module("role").run(["$templateCache",function(n){n.put("/app/role/components/roleList/roleList.html",'<div>    <hgroup>        <h1>Roles<\/h1>    <\/hgroup>    <a href="#/role/add">Add<\/a>    <table>        <thead>            <tr>                <th>Id<\/th>                <th>Name<\/th>                <th>Actions<\/th>            <\/tr>        <\/thead>        <tbody>            <tr data-ng-repeat="entity in vm.entities">                <td><a>{{ entity.id }}<\/a><\/td>                <td><a>{{ entity.name }}<\/a><\/td>                <td><a href="#/role/edit/{{ entity.id }}">edit<\/a>&nbsp;|&nbsp;<a data-ng-click="vm.remove(entity)">delete<\/a><\/td>            <\/tr>        <\/tbody>    <\/table><\/div>')}]),function(){var n=function(){function n(n){var t=this;this.roleService=n;this.replace=!0;this.restrict="E";this.templateUrl="/app/role/components/roleList/roleList.html";this.scope={};this.link=function(n){return n.vm={},n.vm.remove=function(i){return t.roleService.remove({id:i.id}).then(function(){for(var t=0;t<n.vm.entities.length;t++)n.vm.entities[t].id==i.id&&n.vm.entities.splice(t,1)}).catch(function(){})},t.roleService.getAll().then(function(t){return n.vm.entities=t})};this.$inject=["roleService"]}return n.componentId="roleList",n}();angular.module("role").directive(n.componentId,function(t){return new n(t)})}(RoleModule||(RoleModule={})),function(n){"use strict";var t=function(){function n(n,t,i,r){var u=this;this.$http=n;this.$q=t;this.$rootScope=i;this.configurationService=r;this.dataStore={getAll:null,getById:null,pages:[]};this.clearDataStore=function(){u.dataStore={getAll:null,getById:null,pages:[]}};this.getBaseUri=function(){return u.$rootScope.configuration&&u.$rootScope.configuration.apiVersion?"api/"+u.$rootScope.configuration.apiVersion+"/role/":"api/role/"};this.add=function(n){var t=u.$q.defer();return u.$http({method:"POST",url:u.getBaseUri()+"add",data:n.entity}).then(function(n){t.resolve(n)}).catch(function(n){t.reject(n)}),t.promise};this.remove=function(n){var t=u.$q.defer();return u.$http({method:"DELETE",url:u.getBaseUri()+"remove?id="+n.id}).then(function(n){t.resolve(n)}).catch(function(n){t.reject(n)}),t.promise};this.getAll=function(){var n=u.$q.defer();return u.dataStore.getAll?(n.resolve(u.dataStore.getAll),n.promise):(u.$http({method:"GET",url:u.getBaseUri()+"getAll"}).then(function(t){u.dataStore.getAll=t.data;n.resolve(t.data)}).catch(function(t){n.reject(t)}),n.promise)};this.getById=function(n){var t=u.$q.defer();return u.dataStore.getById&&u.dataStore.getById.id==n?(t.resolve(u.dataStore.getById),t.promise):(u.$http({method:"GET",url:u.getBaseUri()+"getbyid?id="+n}).then(function(n){t.resolve(n)}).catch(function(n){t.reject(n)}),t.promise)};this.getPage=function(){var n=u.$q.defer();return u.dataStore.getAll?(n.resolve(u.dataStore.getAll),n.promise):(u.$http({method:"GET",url:u.getBaseUri()+"getAll"}).then(function(t){n.resolve(t)}).catch(function(t){n.reject(t)}),n.promise)};this.$rootScope.$on("$locationChangeStart",function(){u.clearDataStore()})}return n.serviceId="roleService",n.$inject=["$http","$q","$rootScope","configurationService"],n}();n.RoleService=t;angular.module("role").service(t.serviceId,function(n,i,r,u){return new t(n,i,r,u)})}(RoleModule||(RoleModule={})),function(){function n(n){n.when("/signin",{templateUrl:"app/security/templates/signin.html",resolve:{routeData:["securityRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!1,caseInsensitiveMatch:!0});n.when("/security",{templateUrl:"app/security/templates/security.html",resolve:{routeData:["securityRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0,caseInsensitiveMatch:!0});n.when("/role/add",{templateUrl:"/app/security/templates/addrole.html",resolve:{routeData:["securityRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0,caseInsensitiveMatch:!0});n.when("/role/edit/:roleid",{templateUrl:"/app/security/templates/addrole.html",resolve:{routeData:["securityRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0,caseInsensitiveMatch:!0});n.when("/role/list",{templateUrl:"/app/security/templates/roles.html",resolve:{routeData:["securityRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0,caseInsensitiveMatch:!0});n.when("/user/changepassword/:changepasswordid",{templateUrl:"/app/security/templates/changepassword.html",resolve:{routeData:["securityRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0,caseInsensitiveMatch:!0});n.when("/user/add",{templateUrl:"/app/security/templates/adduser.html",resolve:{routeData:["securityRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0,caseInsensitiveMatch:!0});n.when("/user/edit/:userid",{templateUrl:"/app/security/templates/adduser.html",resolve:{routeData:["securityRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0,caseInsensitiveMatch:!0});n.when("/user/list",{templateUrl:"/app/security/templates/users.html",resolve:{routeData:["securityRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0,caseInsensitiveMatch:!0});n.when("/group/add",{templateUrl:"/app/security/templates/addgroup.html",resolve:{routeData:["securityRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0,caseInsensitiveMatch:!0});n.when("/group/edit/:groupid",{templateUrl:"/app/security/templates/addgroup.html",resolve:{routeData:["securityRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0,caseInsensitiveMatch:!0});n.when("/group/list",{templateUrl:"/app/security/templates/groups.html",resolve:{routeData:["securityRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0,caseInsensitiveMatch:!0})}angular.module("security",["configuration","common","core","session","group","role","user","ngRoute"]).config(n);n.$inject=["$routeProvider"]}(SecurityModule||(SecurityModule={}));angular.module("security").run(["$templateCache",function(n){n.put("/app/security/components/securityMenu/securityMenu.html",'<div id="security-menu" class="sub-menu">        <entity-admin-menu entity-name-pluralized="Users" entity-name="User"><\/entity-admin-menu>        <entity-admin-menu entity-name-pluralized="Groups" entity-name="Group"><\/entity-admin-menu>        <entity-admin-menu entity-name-pluralized="Roles" entity-name="Role"><\/entity-admin-menu><\/div>')}]),function(){var n=function(){function n(){this.restrict="E";this.replace=!0;this.templateUrl="/app/security/components/securityMenu/securityMenu.html";this.scope={};this.link=function(){}}return n.componentId="securityMenu",n}();angular.module("dashboard").directive(n.componentId,function(){return new n})}(SecurityModule||(SecurityModule={}));angular.module("security").run(["$templateCache",function(n){n.put("/app/security/components/userEditor/userEditor.html",'<div>    <hgroup>        <h1 data-ng-show="vm.entity.id">Edit User: {{ vm.entity.firstname + \' \' + vm.entity.lastname }}<\/h1>        <h1 data-ng-hide="vm.entity.id">Create User<\/h1>    <\/hgroup>    <a href="#/user/changepassword/{{vm.entity.id}}" data-ng-hide="!vm.entity.id">Change Password<\/a>    <form name="userEditor" role="form" data-ng-submit="tryToSave(userEditor)" novalidate>                <multi-entity-select parent-entities="vm.entity.roles" entity-service="uow.roles" entity-name-plural="Roles"><\/multi-entity-select>        <multi-entity-select parent-entities="vm.entity.groups" entity-service="uow.groups" entity-name-plural="Groups"><\/multi-entity-select>                <div class="form-group">            <label>                Username            <\/label>            <input data-ng-model="vm.entity.username" type="text" class="form-control" />        <\/div>        <div class="form-group">            <label>                First Name            <\/label>            <input data-ng-model="vm.entity.firstname" type="text" class="form-control" />        <\/div>        <div class="form-group">            <label>                Last Name            <\/label>            <input data-ng-model="vm.entity.lastname" type="text" class="form-control" />        <\/div>        <div class="form-group">            <label>                Email            <\/label>            <input data-ng-model="vm.entity.emailAddress" type="text" class="form-control" />        <\/div>        <div class="form-group" data-ng-hide="vm.entity.id">            <label>                Password            <\/label>            <input data-ng-model="vm.entity.password" type="password" class="form-control" />        <\/div>        <div class="form-group" data-ng-hide="vm.entity.id">            <label>                Confirm Password            <\/label>            <input data-ng-model="vm.entity.confirmpassword" type="password" class="form-control" />        <\/div>        <p>            <input type="submit" value="save" class="btn btn-lrg" />        <\/p>    <\/form><\/div>')}]),function(){var n=function(){function n(n,t,i){var r=this;this.$location=n;this.$routeParams=t;this.securityUow=i;this.replace=!0;this.restrict="E";this.templateUrl="/app/security/components/userEditor/userEditor.html";this.scope={};this.link=function(n){return n.vm={},n.uow={roles:r.securityUow.roles,groups:r.securityUow.groups},n.tryToSave=function(){return n.vm.entity.id?r.securityUow.users.update({model:n.vm.entity}).then(function(){r.$location.path("/user/list")}):r.securityUow.users.add({model:n.vm.entity}).then(function(){r.$location.path("/user/list")})},r.$routeParams.userid?r.securityUow.users.getById({id:r.$routeParams.userid}).then(function(t){n.vm.entity=t}).catch(function(){}):void 0};this.$inject=["$location","userService"]}return n.componentId="userEditor",n}();angular.module("security").directive(n.componentId,function(t,i,r){return new n(t,i,r)})}(SecurityModule||(SecurityModule={})),function(){var n=function(){function n(n,t,i,r){this.groupService=n;this.identityService=t;this.roleService=i;this.userService=r;this.$inject=["groupService","identityService","roleService","userService"];this.identity=this.identityService;this.groups=this.groupService;this.roles=this.roleService;this.users=this.userService}return n.serviceId="securityUow",n}();angular.module("security").service(n.serviceId,function(t,i,r,u){return new n(t,i,r,u)})}(SecurityModule||(SecurityModule={})),function(){var n=function(){function n(n,t,i,r){var u=this;this.configurationService=n;this.securityUow=t;this.$q=i;this.$route=r;this.resolveRoute=function(){return u.configurationService.get().then(function(){return u.securityUow.identity.getCurrentUser().then(function(){return u.$route.current.params.userid?(console.log("edit user"),u.$q.all([u.securityUow.roles.getAll(),u.securityUow.groups.getAll(),u.securityUow.users.getById({id:u.$route.current.params.userid})]).then(function(n){return n})):u.$route.current.params.roleid?u.$q.all([u.securityUow.roles.getById({id:u.$route.current.params.roleid})]).then(function(n){return n}):u.$route.current.params.groupid?u.$q.all([u.securityUow.groups.getById({id:u.$route.current.params.groupid})]).then(function(n){return n}):!0})})}}return n.serviceId="securityRouteResolver",n}();angular.module("security").service(n.serviceId,function(t,i,r,u){return new n(t,i,r,u)})}(SecurityModule||(SecurityModule={})),function(){function n(n){n.when("/serverProcess",{templateUrl:"app/serverProcess/templates/list.html",resolve:{routeData:["serverProcessRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0});n.when("/serverProcess/add",{templateUrl:"app/serverProcess/templates/add.html",resolve:{routeData:["serverProcessRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0});n.when("/serverProcess/run",{templateUrl:"app/serverProcess/templates/runserverProcess.html",resolve:{routeData:["serverProcessRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0})}function t(){}var i=angular.module("serverProcess",["configuration","common","core","session","security","ngRoute"]).config(n).run(t);n.$inject=["$routeProvider"]}(ServerProcessModule||(ServerProcessModule={}));angular.module("serverProcess").run(["$templateCache",function(n){n.put("/app/serverProcess/components/runningServerProcessList/runningServerProcessList.html","<div><\/div>")}]),function(){"use strict";var n=function(){function n(n){this.serverProcessService=n;this.restrict="E";this.replace=!0;this.templateUrl="/app/serverProcess/components/runningServerProcessList/runningServerProcessList.html";this.link=function(n){n.save=function(){}};this.$inject=["serverProcessService"]}return n.componentId="runningServerProcessList",n}();angular.module("serverProcess").directive(n.componentId,function(t){return new n(t)})}(ServerProcessModule||(ServerProcessModule={})),function(){"use strict";var n=function(){function n(n){var t=this;this.serverProcessService=n;this.restrict="E";this.replace=!0;this.scope={};this.templateUrl="/app/serverProcess/components/runServerProcessForm/runServerProcessForm.html";this.link=function(n){n.tryToRun=function(){return t.serverProcessService.run({model:n.entity}).then(function(){})}};this.$inject=["serverProcessService"]}return n.componentId="runServerProcessForm",n}();angular.module("serverProcess").directive(n.componentId,function(t){return new n(t)})}(ServerProcessModule||(ServerProcessModule={})),function(){"use strict";var n=function(){function n(n){this.serverProcessUow=n;this.restrict="E";this.replace=!0;this.templateUrl="/app/serverProcess/components/serverProcessEditor/serverProcessEditor.html";this.link=function(n){n.save=function(){}};this.$inject=["serverProcessUow"]}return n.componentId="serverProcessEditor",n}();angular.module("serverProcess").directive(n.componentId,function(t){return new n(t)})}(ServerProcessModule||(ServerProcessModule={}));angular.module("serverProcess").run(["$templateCache",function(n){n.put("/app/serverProcess/components/serverProcessList/serverProcessList.html",'<div>    <hgroup>        <h1>Server Processes<\/h1>    <\/hgroup>    <a href="#/serverProcess/add">Add<\/a>    <table>        <thead>            <tr>                <th>Id<\/th>                <th>Name<\/th>                <th>Actions<\/th>            <\/tr>        <\/thead>        <tbody>            <tr data-ng-repeat="entity in vm.entities">                <td><a>{{ entity.id }}<\/a><\/td>                <td><a>{{ entity.name }}<\/a><\/td>                <td><a href="#/serverprocess/edit/{{ entity.id }}">edit<\/a>&nbsp;|&nbsp;<a data-ng-click="vm.remove(entity)">delete<\/a><\/td>            <\/tr>        <\/tbody>    <\/table><\/div>')}]),function(){var n=function(){function n(n){var t=this;this.serverProcessService=n;this.replace=!0;this.restrict="E";this.templateUrl="/app/serverProcess/components/serverProcessList/serverProcessList.html";this.scope={};this.link=function(n){return n.vm={},n.vm.remove=function(i){return t.serverProcessService.remove({id:i.id}).then(function(){for(var t=0;t<n.vm.entities.length;t++)n.vm.entities[t].id==i.id&&n.vm.entities.splice(t,1)}).catch(function(){})},t.serverProcessService.getAll().then(function(t){return n.vm.entities=t})};this.$inject=["serverProcessService"]}return n.componentId="serverProcessList",n}();angular.module("serverProcess").directive(n.componentId,function(t){return new n(t)})}(ServerProcessModule||(ServerProcessModule={})),function(){var n;(function(n){n[n.created=0]="created";n[n.inProgress=1]="inProgress";n[n.stopped=2]="stopped";n[n.paused=3]="paused";n[n.killed=4]="killed"})(n||(n={}));angular.module("serverProcess").value("executionState",n)}(ServerProcessModule||(ServerProcessModule={})),function(n){"use strict";var t=function(){function n(n,t,i,r){var u=this;this.$http=n;this.$q=t;this.$rootScope=i;this.configurationService=r;this.dataStore={getAll:null,getById:null,pages:[]};this.clearDataStore=function(){u.dataStore={getAll:null,getById:null,pages:[]}};this.getBaseUri=function(){return u.$rootScope.configuration&&u.$rootScope.configuration.apiVersion?"api/"+u.$rootScope.configuration.apiVersion+"/runningServerProcess/":"api/runningServerProcess/"};this.getAll=function(){var n=u.$q.defer();return u.dataStore.getAll?(n.resolve(u.dataStore.getAll),n.promise):(u.$http({method:"GET",url:u.getBaseUri()+"getAll"}).then(function(t){n.resolve(t)}).catch(function(t){n.reject(t)}),n.promise)};this.getById=function(n){var t=u.$q.defer();return u.dataStore.getById&&u.dataStore.getById.id==n?(t.resolve(u.dataStore.getById),t.promise):(u.$http({method:"GET",url:u.getBaseUri()+"getbyid?id="+n}).then(function(n){t.resolve(n)}).catch(function(n){t.reject(n)}),t.promise)};this.getPage=function(){var n=u.$q.defer();return u.dataStore.getAll?(n.resolve(u.dataStore.getAll),n.promise):(u.$http({method:"GET",url:u.getBaseUri()+"getAll"}).then(function(t){n.resolve(t)}).catch(function(t){n.reject(t)}),n.promise)};this.restart=function(n){var t=u.$q.defer();return u.$http({method:"POST",url:u.getBaseUri()+"restart",data:{guid:n.guid}}).then(function(n){t.resolve(n)}).catch(function(n){t.reject(n)}),t.promise};this.kill=function(n){var t=u.$q.defer();return u.$http({method:"POST",url:u.getBaseUri()+"kill",data:{guid:n.guid}}).then(function(n){t.resolve(n)}).catch(function(n){t.reject(n)}),t.promise};this.pause=function(n){var t=u.$q.defer();return u.$http({method:"POST",url:u.getBaseUri()+"pause",data:{guid:n.guid}}).then(function(n){t.resolve(n)}).catch(function(n){t.reject(n)}),t.promise};this.stop=function(n){var t=u.$q.defer();return u.$http({method:"POST",url:u.getBaseUri()+"stop",data:{guid:n.guid}}).then(function(n){t.resolve(n)}).catch(function(n){t.reject(n)}),t.promise};this.$rootScope.$on("$locationChangeStart",function(){u.clearDataStore()})}return n.serviceId="runningServerProcessService",n.$inject=["$http","$q","$rootScope","configurationService"],n}();n.RunningServerProcessService=t;angular.module("serverProcess").service(t.serviceId,function(n,i,r,u){return new t(n,i,r,u)})}(ServerProcessModule||(ServerProcessModule={})),function(){"use strict";function n(n,t,i,r,u){var f=this;return f.resolveRoute=function(){return r.get().then(function(){return u.identity.getCurrentUser().then(function(){return!0})})},f}angular.module("serverProcess").service("serverProcessRouteResolver",["$location","$q","$route","configurationService","securityUow","serverProcessUow",n])}(ServerProcessModule||(ServerProcessModule={})),function(n){"use strict";var t=function(){function n(n,t,i,r){var u=this;this.$http=n;this.$q=t;this.$rootScope=i;this.configurationService=r;this.dataStore={getAll:null,getById:null,pages:[]};this.clearDataStore=function(){u.dataStore={getAll:null,getById:null,pages:[]}};this.getBaseUri=function(){return u.$rootScope.configuration&&u.$rootScope.configuration.apiVersion?"api/"+u.$rootScope.configuration.apiVersion+"/serverProcess/":"api/serverProcess/"};this.getAll=function(){var n=u.$q.defer();return u.dataStore.getAll?(n.resolve(u.dataStore.getAll),n.promise):(u.$http({method:"GET",url:u.getBaseUri()+"getAll"}).then(function(t){n.resolve(t)}).catch(function(t){n.reject(t)}),n.promise)};this.getById=function(n){var t=u.$q.defer();return u.dataStore.getById&&u.dataStore.getById.id==n?(t.resolve(u.dataStore.getById),t.promise):(u.$http({method:"GET",url:u.getBaseUri()+"getbyid?id="+n}).then(function(n){t.resolve(n)}).catch(function(n){t.reject(n)}),t.promise)};this.getPage=function(){var n=u.$q.defer();return u.dataStore.getAll?(n.resolve(u.dataStore.getAll),n.promise):(u.$http({method:"GET",url:u.getBaseUri()+"getAll"}).then(function(t){n.resolve(t)}).catch(function(t){n.reject(t)}),n.promise)};this.add=function(n){var t=u.$q.defer();return u.$http({method:"POST",url:u.getBaseUri()+"add",data:n.entity}).then(function(n){t.resolve(n)}).catch(function(n){t.reject(n)}),t.promise};this.run=function(n){var t=u.$q.defer();return u.$http({method:"POST",url:u.getBaseUri()+"run",data:{name:n.name,step:n.step}}).then(function(n){t.resolve(n)}).catch(function(n){t.reject(n)}),t.promise};this.remove=function(n){var t=u.$q.defer();return u.$http({method:"POST",url:u.getBaseUri()+"remove",data:n.serverProcessId}).then(function(n){t.resolve(n)}).catch(function(n){t.reject(n)}),t.promise};this.$rootScope.$on("$locationChangeStart",function(){u.clearDataStore()})}return n.serviceId="serverProcessService",n.$inject=["$http","$q","$rootScope","configurationService"],n}();n.ServerProcessService=t;angular.module("serverProcess").service(t.serviceId,function(n,i,r,u){return new t(n,i,r,u)})}(ServerProcessModule||(ServerProcessModule={})),function(){"use strict";angular.module("serverProcess").service("serverProcessSignalRService",function(t,i){return new n(t,i)});var n=function(){function n(n,t){var i=this;this.$rootScope=n;this.$=t;this.connection=null;this.hub=null;this.run=function(n,t){i.hub.invoke("run",n,t)};this.runStart=function(){i.$rootScope.$broadcast("serverProcessRunStart")};this.$inject=["$rootScope","$"];this.connection=this.$.hubConnection();this.hub=this.connection.createHubProxy("serverProcessHub");this.hub.on("serverProcessRunStart",function(){i.runStart()});this.connection.start(function(){});this.$rootScope.$on("serverProcessRunRequest",function(n,t){i.run(t.entity.name,t.entity.step)})}return n.serviceId="serverProcessSignalRService",n}()}(ServerProcessModule||(ServerProcessModule={})),function(){var n=function(){function n(n){this.serverProcessService=n;this.serverProcesss=this.serverProcessService;this.$inject=["serverProcessService"]}return n.serviceId="serverProcessUow",n}();angular.module("serverProcess").service(n.serviceId,function(t){return new n(t)})}(ServerProcessModule||(ServerProcessModule={})),function(){"use strict";function n(n,t,i,r,u){var f=this;return f.resolveRoute=function(){return r.get().then(function(){return u.identity.getCurrentUser().then(function(){return!0})})},f}angular.module("serverProcess").service("serverProcessRouteResolver",["$location","$q","$route","configurationService","securityUow","serverProcessUow",n])}(ServerProcessModule||(ServerProcessModule={})),function(n){"use strict";var t=function(){function n(n,t,i,r){var u=this;this.$http=n;this.$q=t;this.$rootScope=i;this.configurationService=r;this.dataStore={getAll:null,getById:null,pages:[]};this.clearDataStore=function(){u.dataStore={getAll:null,getById:null,pages:[]}};this.getBaseUri=function(){return u.$rootScope.configuration&&u.$rootScope.configuration.apiVersion?"api/"+u.$rootScope.configuration.apiVersion+"/serverProcess/":"api/serverProcess/"};this.getAll=function(){var n=u.$q.defer();return u.dataStore.getAll?(n.resolve(u.dataStore.getAll),n.promise):(u.$http({method:"GET",url:u.getBaseUri()+"getAll"}).then(function(t){n.resolve(t)}).catch(function(t){n.reject(t)}),n.promise)};this.getById=function(n){var t=u.$q.defer();return u.dataStore.getById&&u.dataStore.getById.id==n?(t.resolve(u.dataStore.getById),t.promise):(u.$http({method:"GET",url:u.getBaseUri()+"getbyid?id="+n}).then(function(n){t.resolve(n)}).catch(function(n){t.reject(n)}),t.promise)};this.getPage=function(){var n=u.$q.defer();return u.dataStore.getAll?(n.resolve(u.dataStore.getAll),n.promise):(u.$http({method:"GET",url:u.getBaseUri()+"getAll"}).then(function(t){n.resolve(t)}).catch(function(t){n.reject(t)}),n.promise)};this.$rootScope.$on("$locationChangeStart",function(){u.clearDataStore()})}return n.serviceId="serverProcessService",n.$inject=["$http","$q","$rootScope","configurationService"],n}();n.ServerProcessService=t;angular.module("serverProcess").service(t.serviceId,function(n,i,r,u){return new t(n,i,r,u)})}(ServerProcessModule||(ServerProcessModule={})),function(){var n=function(){function n(n,t){var i=this;this.$rootScope=n;this.$=t;this.connection=null;this.hub=null;this.run=function(n,t){i.hub.invoke("run",n,t)};this.runStart=function(){i.$rootScope.$broadcast("serverProcessRunStart")};this.$inject=["$rootScope","$"];this.connection=this.$.hubConnection();this.hub=this.connection.createHubProxy("serverProcessHub");this.hub.on("serverProcessRunStart",function(){i.runStart()});this.connection.start(function(){});this.$rootScope.$on("serverProcessRunRequest",function(n,t){i.run(t.entity.name,t.entity.step)})}return n}();angular.module("serverProcess").service("serverProcessSignalRService",function(t,i){return new n(t,i)})}(ServerProcessModule||(ServerProcessModule={})),function(){var n=function(){function n(n){this.serverProcessService=n;this.serverProcesss=this.serverProcessService;this.$inject=["serverProcessService"]}return n.serviceId="serverProcessUow",n}();angular.module("serverProcess").service(n.serviceId,function(t){return new n(t)})}(ServerProcessModule||(ServerProcessModule={})),function(){"use strict";var n=angular.module("session",["configuration","common","core"])}(),function(n){function i(n,t,i,r,u,f,e){var o=this;return o.isLoggedIn=function(){if(o.getCurrentUser()!=null&&o.getCurrentUser()!="")return o.getCurrentUser().username},o.isUserInRole=function(n){var i,t;if(o.isLoggedIn())for(i=o.getCurrentUser(),t=0;t<i.roles.length;t++)if(n==i.roles[t].name)return!0;return!1},o.getCurrentUser=function(){return f.get()},o.signOut=function(){t({method:"GET",url:"api/identity/signout"}).then(function(){});e.set({data:null});f.set({data:null});n.path("/")},o.setConfigurationAsync=function(){return r.get()?i.when(r.get()):u.get().then(function(n){return r.set({data:n}),r.get()})},o.getConfiguration=function(){return r.get()},o}var t;angular.module("session").service("session",["$location","$http","$q","configuration","configurationService","currentUser","token",i]);t=function(){function n(n,t,i,r,u,f,e){this.$location=n;this.$http=t;this.$q=i;this.configuration=r;this.configurationService=u;this.currentUser=f;this.token=e;this.isLoggedIn=function(){return!0};this.isUserInRole=function(){return!0};this.getCurrentUser=function(){return{}};this.signOut=function(){};this.setConfigurationAsync=function(){};this.getConfiguration=function(){return{}}}return n.ServiceId="session",n}();n.Session=t}(SessionModule||(SessionModule={})),function(){"use strict";function n(n,t){var r=this,i=null,u="configuration";return r.get=function(){if(i)return i;try{i=t.getByName({name:u}).value}catch(n){}return i},r.set=function(n){i=n.data;t.put({name:u,value:n.data})},n.$on("$routeChangeStart",function(n,t){t.originalPath=="/signin"&&(i=null,r.set({data:null}))}),r}angular.module("session").service("configuration",["$rootScope","storage",n])}(SessionModule||(SessionModule={})),function(){angular.module("session").factory("currentUser",function(t,i){return new n(t,i)});var n=function(){function n(n,t){var i=this;this.$rootScope=n;this.storage=t;this.name="currentUser";this.get=function(){if(i.data)return i.data;try{i.data=i.storage.getByName({name:name}).value}catch(n){}return i.data};this.set=function(n){i.data=n.data;i.storage.put({name:name,value:n.data})};n.$on("$routeChangeStart",function(n,t){t.originalPath=="/signin"&&(i.data=null,i.set({data:null}))})}return n.$inject=["$rootScope","storage"],n}()}(SessionModule||(SessionModule={})),function(){function n(n,t){var r=this,i=null,u="token";return r.get=function(){if(i)return i;try{i=t.getByName({name:u}).value}catch(n){}return i},r.set=function(n){i=n.data;t.put({name:u,value:n.data})},n.$on("$routeChangeStart",function(n,t){t.originalPath=="/signin"&&(i=null,r.set({data:null}))}),r}angular.module("session").service("token",["$rootScope","storage",n])}(SessionModule||(SessionModule={})),function(){function n(n){n.when("/signin",{templateUrl:"/app/user/templates/signin.html"}).when("/",{templateUrl:"/app/user/templates/preferences.html",controller:"preferencesController",controllerAs:"vm",resolve:{preferencesData:["preferencesService",function(n){return n.getClientPreferences()}],routeData:["userRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!1}).when("/user/add",{templateUrl:"/app/user/templates/edit.html",resolve:{routeData:["userRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0}).when("/admin/user/edit/:id",{templateUrl:"/app/user/templates/edit.html",resolve:["userRouteResolver",function(n){return n.resolveRoute({route:"/admin/user/edit/:id"})}],authorizationRequired:!0}).when("/admin/users",{templateUrl:"/app/user/templates/list.html",resolve:["userRouteResolver",function(n){return n.resolveRoute({route:"/admin/users"})}],authorizationRequired:!0}).when("/register",{templateUrl:"/app/user/templates/register.html",resolve:{routeData:["userRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!1}).when("/preferences",{templateUrl:"/app/user/templates/preferences.html",controller:"preferencesController",controllerAs:"vm",resolve:{routeData:["userRouteResolver",function(n){return n.resolveRoute()}]},authorizationRequired:!0})}var t=angular.module("user",["configuration","common","core","group","role","session","ngRoute"]).config(n);n.$inject=["$routeProvider"]}(UserModule||(UserModule={}));angular.module("user").run(["$templateCache",function(n){n.put("/app/user/components/changePasswordForm/changePasswordForm.html",'<div id="change-password">        <hgroup>        <h1>Change Password: {{ vm.firstname + \' \' + vm.lastname }}<\/h1>    <\/hgroup>    <form name="changePasswordForm" id="change-password-form" data-ng-submit="tryToChangePassword(changePasswordForm)" novalidate>                <div class="form-group">            <label>                Old Password            <\/label>            <input data-ng-model="vm.oldPassword" type="password" class="form-control" />        <\/div>        <div class="form-group">            <label>                New Password            <\/label>            <input data-ng-model="vm.newPassword" type="password" class="form-control" />        <\/div>        <div class="form-group">            <label>                Confirm Password            <\/label>            <input data-ng-model="vm.confirmPassword" type="password" class="form-control" />        <\/div>        <p>            <input type="submit" value="Change Password" class="btn btn-lg" />        <\/p>    <\/form><\/div>')}]),function(){"use strict";var n=function(){function n(n,t,i,r){var u=this;this.identityService=n;this.userService=t;this.$location=i;this.$routeParams=r;this.templateUrl="/app/user/components/changePasswordForm/changePasswordForm.html";this.restrict="E";this.scope={};this.replace=!0;this.link=function(n){return n.vm={},n.tryToChangePassword=function(){return u.userService.changePassword({model:n.vm}).then(function(){u.$location.path("/user/list")}).catch(function(){})},u.$routeParams.changepasswordid?u.userService.getById({id:u.$routeParams.changepasswordid}).then(function(t){n.vm=t}):u.identityService.getCurrentUser().then(function(t){n.vm=t})};this.$inject=["identityService","userService","$location","$routeParams"]}return n.componentId="changePasswordForm",n}();angular.module("user").directive(n.componentId,function(t,i,r,u){return new n(t,i,r,u)})}(UserModule||(UserModule={})),function(){"use strict";function n(n,t){return{templateUrl:"/app/user/components/registrationForm/registrationForm.html",restrict:"EA",replace:!0,scope:{},link:function(i){i.submit=function(){t.register({model:i.model}).then(function(){n.path("/signin")})}}}}angular.module("user").directive("registrationForm",["$location","identityService",n])}();angular.module("user").run(["$templateCache",function(n){n.put("/app/user/components/signinForm/signinForm.html",'<div>    <hgroup><h1>Sign In<\/h1><\/hgroup>    <form name="signInForm" id="sign-in-form" data-ng-submit="tryToSignIn()" novalidate>        <div class="form-group">            <label>                Username            <\/label>            <input data-ng-model="vm.username" type="text" class="form-control" />        <\/div>        <div class="form-group">            <label>                Password            <\/label>            <input data-ng-model="vm.password" type="password" class="form-control" />        <\/div>        <p>            <input type="submit" value="sign in" class="btn btn-lg" />        <\/p>        <div class="form-group">            <input type="checkbox" data-ng-model="model.rememberMe" />            <label>Keep me signed in<\/label>        <\/div>    <\/form><\/div>')}]),function(){"use strict";var n=function(){function n(n,t,i){var r=this;this.identityService=n;this.token=t;this.$location=i;this.templateUrl="/app/user/components/signInForm/signInForm.html";this.restrict="E";this.scope={};this.replace=!0;this.link=function(n){n.vm={username:"System",password:"password"};n.tryToSignIn=function(){return r.identityService.signIn({model:n.vm}).then(function(n){r.token.set({data:n});r.$location.path("/")}).catch(function(){})}};this.$inject=["identityService","token","$location"]}return n.componentId="signInForm",n}();angular.module("user").directive(n.componentId,function(t,i,r){return new n(t,i,r)})}(UserModule||(UserModule={})),function(){"use strict";function n(){return{templateUrl:"/app/user/components/userAdminMenu/userAdminMenu.html",restrict:"EA",replace:!0,scope:{},link:function(){}}}angular.module("user").directive("userAdminMenu",["$location","$routeParams","session",n])}(),function(n){var t=function(){function n(){this.templateUrl="/app/user/components/userDropDownList/userDropDownList.html";this.restrict="E";this.scope={currentuser:"="};this.replace=!0;this.link=function(n){n.users=[{id:0,name:"John"},{id:1,name:"Quinn"},{id:2,name:"Richard"}]}}return n.componentId="userDropDownList",n}();n.UserDropDownList=t;angular.module("user").directive(t.componentId,[function(){return new t}])}(UserModule||(UserModule={}));angular.module("user").run(["$templateCache",function(n){n.put("/app/user/components/userList/userList.html",'<div>    <hgroup>        <h1>Users<\/h1>    <\/hgroup>    <a href="#/user/add">Add<\/a>    <table>        <thead>            <tr>                <th>Id<\/th>                <th>Username<\/th>                <th>First Name<\/th>                <th>Last Name<\/th>                <th>Actions<\/th>            <\/tr>        <\/thead>        <tbody>            <tr data-ng-repeat="entity in vm.entities">                <td><a>{{ entity.id }}<\/a><\/td>                <td><a>{{ entity.username }}<\/a><\/td>                <td><a>{{ entity.firstname }}<\/a><\/td>                <td><a>{{ entity.lastname }}<\/a><\/td>                <td>                    <a href="#/user/edit/{{ entity.id }}">edit<\/a>&nbsp;|&nbsp;                    <a href="#/user/changepassword/{{ entity.id }}">change password<\/a>&nbsp;|&nbsp;                    <a data-ng-click="vm.remove(entity)">delete<\/a>                <\/td>            <\/tr>        <\/tbody>    <\/table><\/div>')}]),function(){var n=function(){function n(n){var t=this;this.userService=n;this.replace=!0;this.restrict="E";this.templateUrl="/app/user/components/userList/userList.html";this.scope={};this.link=function(n){return n.vm={},n.vm.remove=function(i){return t.userService.remove({id:i.id}).then(function(){for(var t=0;t<n.vm.entities.length;t++)n.vm.entities[t].id==i.id&&n.vm.entities.splice(t,1)}).catch(function(){})},t.userService.getAll().then(function(t){return n.vm.entities=t})};this.$inject=["userService"]}return n.componentId="userList",n}();angular.module("user").directive(n.componentId,function(t){return new n(t)})}(UserModule||(UserModule={})),function(){"use strict";function n(n,t,i){var r=this;return r={pageTitle:"Preferences",startScreen:i.Client.StartScreen,poDisplayLimit:i.Client.PoDisplayLimit},r.update=function(n){r.startScreen=n.startScreen;r.poDisplayLimit=n.poDisplayLimit;t.updateClientPreferences({StartScreen:r.startScreen,PoDisplayLimit:r.poDisplayLimit}).then(function(){}).catch(function(){})},r}n.$inject=["$scope","dataService","preferencesData"];angular.module("user").controller("preferencesController",n)}(),function(){function n(n,t){var i=this;return i.signIn=function(t){return n({method:"POST",url:"api/identity/signin",data:JSON.stringify(t.model)}).then(function(n){return n.data.token}).catch(function(){})},i.register=function(t){return n({method:"POST",url:"api/identity/register",data:JSON.stringify(t.model)}).then(function(n){return n.data.token}).catch(function(){})},i.getCurrentUser=function(){return n({method:"GET",url:"api/user/getCurrentUser"}).then(function(n){return t.set({data:n.data}),t.get()}).catch(function(){})},i}angular.module("user").service("identityService",["$http","currentUser",n])}(UserModule||(UserModule={})),function(){"use strict";function n(n,t){var r=this,i=this;return this.$q=t,i.getClientPreferences=function(){var n=r.$q.defer();return n.resolve({Server:{RecentPoLimit:5},Client:{PlaceCallUse:"Skype",StartScreen:"Dashboard",PoDisplayLimit:"15",PoOrderBy:"Due Date",PoOrder:"Descending",RecentPoLimit:"5"}}),n.promise},i}n.$inject=["$http","$q","configuration"];angular.module("user").service("preferencesService",n)}(),function(){function n(n,t,i,r){var u=this;return u.resolveRoute=function(n){return i.get().then(function(){if(n)switch(n.route){case"/admin/users":return r.getAll().then(function(){});case"/admin/user/edit/:id":return r.getById({id:t.params.id}).then(function(){})}}).catch(function(n){console.log(n)})},u}angular.module("user").service("userRouteResolver",["$q","$route","configurationService","userService",n])}(UserModule||(UserModule={})),function(){function n(n,t,i){var r=this;return r.getBaseUri=function(){return i.configuration&&i.configuration.apiVersion?"api/"+i.configuration.apiVersion+"/user/":"api/user/"},r.cache={getAll:null,getById:null},i.$on("$locationChangeStart",function(){r.clearCache()}),r.clearCache=function(){r.cache={getAll:null,getById:null}},r.getAll=function(i){if(r.cache.getAll){var u=t.defer();return u.resolve(r.cache.getAll),u.promise}return n({method:"GET",url:r.getBaseUri()+"getAll",params:i}).then(function(n){return r.cache.getAll=n.data,n.data}).catch(function(){})},r.getById=function(i){if(r.cache.getById&&r.cache.getById.id==i.id){var u=t.defer();return u.resolve(r.cache.getById),u.promise}return n({method:"GET",url:r.getBaseUri()+"getbyid?id="+i.id}).then(function(n){return r.cache.getById=n.data,n.data}).catch(function(){})},r.remove=function(t){return n({method:"DELETE",url:r.getBaseUri()+"remove?id="+t.id}).then(function(n){return r.clearCache(),n}).catch(function(){})},r.changePassword=function(t){return n({method:"POST",url:r.getBaseUri()+"changePassword",data:JSON.stringify(t.model)}).then(function(n){return r.clearCache(),n}).catch(function(){})},r.add=function(t){return n({method:"POST",url:r.getBaseUri()+"add",data:JSON.stringify(t.model)}).then(function(n){return r.clearCache(),n}).catch(function(){})},r.update=function(t){return n({method:"PUT",url:r.getBaseUri()+"update",data:JSON.stringify(t.model)}).then(function(n){return r.clearCache(),n}).catch(function(n){console.log("user service error:"+n)})},r}angular.module("user").service("userService",["$http","$q","$rootScope",n])}(UserModule||(UserModule={}));angular.module("user").run(["$templateCache",function(n){n.put("/app/user/templates/signin.html","<div>        <sign-in-form><\/sign-in-form><\/div>")}]);
  //# sourceMappingURL=app.min.js.map
  