tin-spa 9.0.0 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/tin-spa.umd.js +4416 -1589
- package/bundles/tin-spa.umd.js.map +1 -1
- package/bundles/tin-spa.umd.min.js +2 -2
- package/bundles/tin-spa.umd.min.js.map +1 -1
- package/esm2015/lib/classes/Classes.js +58 -45
- package/esm2015/lib/classes/TinCore.js +137 -0
- package/esm2015/lib/components/activity/activity.component.js +84 -18
- package/esm2015/lib/components/attach/attach.component.js +101 -27
- package/esm2015/lib/components/change-password/change-password.component.js +122 -34
- package/esm2015/lib/components/check/check.component.js +39 -33
- package/esm2015/lib/components/chips/chips.component.js +75 -35
- package/esm2015/lib/components/create-account/create-account.component.js +124 -42
- package/esm2015/lib/components/date/date.component.js +54 -33
- package/esm2015/lib/components/datetime/datetime.component.js +43 -30
- package/esm2015/lib/components/filter/filter.component.js +64 -0
- package/esm2015/lib/components/html/html.component.js +30 -25
- package/esm2015/lib/components/label/label.component.js +109 -21
- package/esm2015/lib/components/loader/loader.component.js +43 -20
- package/esm2015/lib/components/login/login.component.js +194 -76
- package/esm2015/lib/components/logs/logs.component.js +180 -28
- package/esm2015/lib/components/message/messageDialog.component.js +128 -17
- package/esm2015/lib/components/money/currency-input-mask.directive.js +187 -0
- package/esm2015/lib/components/money/currency-input-mask.module.js +30 -0
- package/esm2015/lib/components/money/money.component.js +141 -39
- package/esm2015/lib/components/nav-menu/nav-menu.component.js +174 -21
- package/esm2015/lib/components/option/option.component.js +107 -40
- package/esm2015/lib/components/profile/profile.component.js +143 -53
- package/esm2015/lib/components/recover-account/recover-account.component.js +48 -26
- package/esm2015/lib/components/roles/addRoleDialog.component.js +99 -26
- package/esm2015/lib/components/roles/roles.component.js +153 -73
- package/esm2015/lib/components/select/select.component.js +108 -48
- package/esm2015/lib/components/settings/settings.component.js +76 -21
- package/esm2015/lib/components/signup/signup.component.js +107 -24
- package/esm2015/lib/components/steps/steps.component.js +47 -31
- package/esm2015/lib/components/table/table.component.js +301 -35
- package/esm2015/lib/components/text/text.component.js +146 -71
- package/esm2015/lib/components/tiles/tiles.component.js +75 -21
- package/esm2015/lib/components/timeout/timeout.component.js +65 -22
- package/esm2015/lib/components/tin-spa.component.js +19 -12
- package/esm2015/lib/components/users/users.component.js +308 -65
- package/esm2015/lib/components/viewer/viewer.component.js +64 -39
- package/esm2015/lib/components/viewer/viewerDialog.component.js +73 -18
- package/esm2015/lib/dnd.directive.js +30 -25
- package/esm2015/lib/modules/spa-admin.module.js +65 -51
- package/esm2015/lib/modules/spa-index.module.js +45 -20
- package/esm2015/lib/modules/spa-mat.module.js +40 -25
- package/esm2015/lib/modules/spa-user.module.js +43 -19
- package/esm2015/lib/services/auth.service.js +39 -50
- package/esm2015/lib/services/data.service.js +82 -49
- package/esm2015/lib/services/export.service.js +11 -11
- package/esm2015/lib/services/http.service.js +79 -0
- package/esm2015/lib/services/loader-interceptor.service.js +30 -30
- package/esm2015/lib/services/loader.service.js +11 -11
- package/esm2015/lib/services/log.service.js +12 -12
- package/esm2015/lib/services/message.service.js +11 -17
- package/esm2015/lib/services/storage.service.js +12 -11
- package/esm2015/lib/services/tin-spa.service.js +11 -11
- package/esm2015/lib/tin-spa.module.js +113 -48
- package/esm2015/public-api.js +4 -6
- package/esm2015/tin-spa.js +1 -5
- package/esm5/lib/classes/Classes.js +70 -55
- package/esm5/lib/classes/TinCore.js +164 -0
- package/esm5/lib/components/activity/activity.component.js +82 -15
- package/esm5/lib/components/attach/attach.component.js +100 -24
- package/esm5/lib/components/change-password/change-password.component.js +120 -31
- package/esm5/lib/components/check/check.component.js +37 -30
- package/esm5/lib/components/chips/chips.component.js +73 -32
- package/esm5/lib/components/create-account/create-account.component.js +122 -39
- package/esm5/lib/components/date/date.component.js +52 -30
- package/esm5/lib/components/datetime/datetime.component.js +41 -27
- package/esm5/lib/components/filter/filter.component.js +66 -0
- package/esm5/lib/components/html/html.component.js +28 -22
- package/esm5/lib/components/label/label.component.js +107 -18
- package/esm5/lib/components/loader/loader.component.js +41 -17
- package/esm5/lib/components/login/login.component.js +193 -74
- package/esm5/lib/components/logs/logs.component.js +178 -25
- package/esm5/lib/components/message/messageDialog.component.js +126 -14
- package/esm5/lib/components/money/currency-input-mask.directive.js +193 -0
- package/esm5/lib/components/money/currency-input-mask.module.js +34 -0
- package/esm5/lib/components/money/money.component.js +139 -36
- package/esm5/lib/components/nav-menu/nav-menu.component.js +172 -18
- package/esm5/lib/components/option/option.component.js +105 -37
- package/esm5/lib/components/profile/profile.component.js +141 -50
- package/esm5/lib/components/recover-account/recover-account.component.js +46 -23
- package/esm5/lib/components/roles/addRoleDialog.component.js +97 -23
- package/esm5/lib/components/roles/roles.component.js +152 -72
- package/esm5/lib/components/select/select.component.js +106 -45
- package/esm5/lib/components/settings/settings.component.js +74 -18
- package/esm5/lib/components/signup/signup.component.js +105 -21
- package/esm5/lib/components/steps/steps.component.js +46 -28
- package/esm5/lib/components/table/table.component.js +299 -32
- package/esm5/lib/components/text/text.component.js +144 -68
- package/esm5/lib/components/tiles/tiles.component.js +73 -18
- package/esm5/lib/components/timeout/timeout.component.js +63 -19
- package/esm5/lib/components/tin-spa.component.js +16 -8
- package/esm5/lib/components/users/users.component.js +307 -62
- package/esm5/lib/components/viewer/viewer.component.js +62 -36
- package/esm5/lib/components/viewer/viewerDialog.component.js +71 -15
- package/esm5/lib/dnd.directive.js +28 -22
- package/esm5/lib/modules/spa-admin.module.js +63 -48
- package/esm5/lib/modules/spa-index.module.js +43 -17
- package/esm5/lib/modules/spa-mat.module.js +38 -22
- package/esm5/lib/modules/spa-user.module.js +41 -16
- package/esm5/lib/services/auth.service.js +37 -47
- package/esm5/lib/services/data.service.js +89 -55
- package/esm5/lib/services/export.service.js +9 -8
- package/esm5/lib/services/http.service.js +81 -0
- package/esm5/lib/services/loader-interceptor.service.js +28 -27
- package/esm5/lib/services/loader.service.js +9 -8
- package/esm5/lib/services/log.service.js +11 -9
- package/esm5/lib/services/message.service.js +9 -14
- package/esm5/lib/services/storage.service.js +10 -8
- package/esm5/lib/services/tin-spa.service.js +9 -8
- package/esm5/lib/tin-spa.module.js +111 -45
- package/esm5/public-api.js +4 -6
- package/esm5/tin-spa.js +1 -5
- package/fesm2015/tin-spa.js +4418 -1612
- package/fesm2015/tin-spa.js.map +1 -1
- package/fesm5/tin-spa.js +4442 -1612
- package/fesm5/tin-spa.js.map +1 -1
- package/lib/classes/Classes.d.ts +55 -43
- package/lib/classes/TinCore.d.ts +27 -0
- package/lib/components/activity/activity.component.d.ts +3 -5
- package/lib/components/attach/attach.component.d.ts +3 -5
- package/lib/components/change-password/change-password.component.d.ts +11 -9
- package/lib/components/check/check.component.d.ts +3 -5
- package/lib/components/chips/chips.component.d.ts +3 -5
- package/lib/components/create-account/create-account.component.d.ts +13 -13
- package/lib/components/date/date.component.d.ts +6 -7
- package/lib/components/datetime/datetime.component.d.ts +3 -5
- package/lib/components/filter/filter.component.d.ts +15 -0
- package/lib/components/html/html.component.d.ts +3 -5
- package/lib/components/label/label.component.d.ts +3 -5
- package/lib/components/loader/loader.component.d.ts +3 -5
- package/lib/components/login/login.component.d.ts +12 -14
- package/lib/components/logs/logs.component.d.ts +5 -9
- package/lib/components/message/messageDialog.component.d.ts +3 -5
- package/lib/components/money/currency-input-mask.directive.d.ts +41 -0
- package/lib/components/money/currency-input-mask.module.d.ts +8 -0
- package/lib/components/money/money.component.d.ts +19 -8
- package/lib/components/nav-menu/nav-menu.component.d.ts +3 -5
- package/lib/components/option/option.component.d.ts +4 -5
- package/lib/components/profile/profile.component.d.ts +9 -11
- package/lib/components/recover-account/recover-account.component.d.ts +6 -8
- package/lib/components/roles/addRoleDialog.component.d.ts +5 -7
- package/lib/components/roles/roles.component.d.ts +6 -10
- package/lib/components/select/select.component.d.ts +4 -6
- package/lib/components/settings/settings.component.d.ts +5 -7
- package/lib/components/signup/signup.component.d.ts +6 -8
- package/lib/components/steps/steps.component.d.ts +3 -5
- package/lib/components/table/table.component.d.ts +3 -5
- package/lib/components/text/text.component.d.ts +4 -5
- package/lib/components/tiles/tiles.component.d.ts +3 -5
- package/lib/components/timeout/timeout.component.d.ts +3 -5
- package/lib/components/tin-spa.component.d.ts +3 -5
- package/lib/components/users/users.component.d.ts +8 -13
- package/lib/components/viewer/viewer.component.d.ts +3 -5
- package/lib/components/viewer/viewerDialog.component.d.ts +4 -6
- package/lib/dnd.directive.d.ts +3 -5
- package/lib/modules/spa-admin.module.d.ts +13 -19
- package/lib/modules/spa-index.module.d.ts +10 -11
- package/lib/modules/spa-mat.module.d.ts +30 -32
- package/lib/modules/spa-user.module.d.ts +9 -10
- package/lib/services/auth.service.d.ts +14 -14
- package/lib/services/data.service.d.ts +28 -17
- package/lib/services/export.service.d.ts +3 -4
- package/lib/services/http.service.d.ts +22 -0
- package/lib/services/loader-interceptor.service.d.ts +3 -5
- package/lib/services/loader.service.d.ts +3 -4
- package/lib/services/log.service.d.ts +3 -4
- package/lib/services/message.service.d.ts +3 -4
- package/lib/services/storage.service.d.ts +3 -4
- package/lib/services/tin-spa.service.d.ts +3 -4
- package/lib/tin-spa.module.d.ts +35 -35
- package/package.json +2 -10
- package/public-api.d.ts +3 -5
- package/tin-spa.d.ts +1 -6
- package/__ivy_ngcc__/fesm2015/tin-spa.js +0 -6813
- package/__ivy_ngcc__/fesm2015/tin-spa.js.map +0 -1
- package/esm2015/lib/components/profiles/profiles.component.js +0 -16
- package/esm2015/lib/components/roles/editRoleDialog.component.js +0 -57
- package/esm2015/lib/components/roles/viewRoleDialog.component.js +0 -38
- package/esm2015/lib/components/users/addUserDialog.component.js +0 -53
- package/esm2015/lib/components/users/editUserDialog.component.js +0 -96
- package/esm5/lib/components/profiles/profiles.component.js +0 -18
- package/esm5/lib/components/roles/editRoleDialog.component.js +0 -59
- package/esm5/lib/components/roles/viewRoleDialog.component.js +0 -39
- package/esm5/lib/components/users/addUserDialog.component.js +0 -55
- package/esm5/lib/components/users/editUserDialog.component.js +0 -99
- package/lib/components/activity/activity.component.d.ts.__ivy_ngcc_bak +0 -8
- package/lib/components/attach/attach.component.d.ts.__ivy_ngcc_bak +0 -39
- package/lib/components/change-password/change-password.component.d.ts.__ivy_ngcc_bak +0 -20
- package/lib/components/check/check.component.d.ts.__ivy_ngcc_bak +0 -16
- package/lib/components/chips/chips.component.d.ts.__ivy_ngcc_bak +0 -15
- package/lib/components/create-account/create-account.component.d.ts.__ivy_ngcc_bak +0 -25
- package/lib/components/date/date.component.d.ts.__ivy_ngcc_bak +0 -13
- package/lib/components/datetime/datetime.component.d.ts.__ivy_ngcc_bak +0 -12
- package/lib/components/html/html.component.d.ts.__ivy_ngcc_bak +0 -12
- package/lib/components/label/label.component.d.ts.__ivy_ngcc_bak +0 -8
- package/lib/components/loader/loader.component.d.ts.__ivy_ngcc_bak +0 -9
- package/lib/components/login/login.component.d.ts.__ivy_ngcc_bak +0 -29
- package/lib/components/logs/logs.component.d.ts.__ivy_ngcc_bak +0 -17
- package/lib/components/message/messageDialog.component.d.ts.__ivy_ngcc_bak +0 -12
- package/lib/components/money/money.component.d.ts.__ivy_ngcc_bak +0 -14
- package/lib/components/nav-menu/nav-menu.component.d.ts.__ivy_ngcc_bak +0 -17
- package/lib/components/option/option.component.d.ts.__ivy_ngcc_bak +0 -17
- package/lib/components/profile/profile.component.d.ts.__ivy_ngcc_bak +0 -30
- package/lib/components/profiles/profiles.component.d.ts +0 -10
- package/lib/components/profiles/profiles.component.d.ts.__ivy_ngcc_bak +0 -5
- package/lib/components/recover-account/recover-account.component.d.ts.__ivy_ngcc_bak +0 -15
- package/lib/components/roles/addRoleDialog.component.d.ts.__ivy_ngcc_bak +0 -19
- package/lib/components/roles/editRoleDialog.component.d.ts +0 -24
- package/lib/components/roles/editRoleDialog.component.d.ts.__ivy_ngcc_bak +0 -19
- package/lib/components/roles/roles.component.d.ts.__ivy_ngcc_bak +0 -29
- package/lib/components/roles/viewRoleDialog.component.d.ts +0 -20
- package/lib/components/roles/viewRoleDialog.component.d.ts.__ivy_ngcc_bak +0 -15
- package/lib/components/select/select.component.d.ts.__ivy_ngcc_bak +0 -20
- package/lib/components/settings/settings.component.d.ts.__ivy_ngcc_bak +0 -16
- package/lib/components/signup/signup.component.d.ts.__ivy_ngcc_bak +0 -20
- package/lib/components/steps/steps.component.d.ts.__ivy_ngcc_bak +0 -15
- package/lib/components/table/table.component.d.ts.__ivy_ngcc_bak +0 -25
- package/lib/components/text/text.component.d.ts.__ivy_ngcc_bak +0 -37
- package/lib/components/tiles/tiles.component.d.ts.__ivy_ngcc_bak +0 -11
- package/lib/components/timeout/timeout.component.d.ts.__ivy_ngcc_bak +0 -21
- package/lib/components/tin-spa.component.d.ts.__ivy_ngcc_bak +0 -5
- package/lib/components/users/addUserDialog.component.d.ts +0 -21
- package/lib/components/users/addUserDialog.component.d.ts.__ivy_ngcc_bak +0 -16
- package/lib/components/users/editUserDialog.component.d.ts +0 -32
- package/lib/components/users/editUserDialog.component.d.ts.__ivy_ngcc_bak +0 -27
- package/lib/components/users/users.component.d.ts.__ivy_ngcc_bak +0 -35
- package/lib/components/viewer/viewer.component.d.ts.__ivy_ngcc_bak +0 -16
- package/lib/components/viewer/viewerDialog.component.d.ts.__ivy_ngcc_bak +0 -19
- package/lib/dnd.directive.d.ts.__ivy_ngcc_bak +0 -8
- package/lib/modules/spa-admin.module.d.ts.__ivy_ngcc_bak +0 -2
- package/lib/modules/spa-index.module.d.ts.__ivy_ngcc_bak +0 -2
- package/lib/modules/spa-mat.module.d.ts.__ivy_ngcc_bak +0 -2
- package/lib/modules/spa-user.module.d.ts.__ivy_ngcc_bak +0 -2
- package/lib/services/auth.service.d.ts.__ivy_ngcc_bak +0 -45
- package/lib/services/data.service.d.ts.__ivy_ngcc_bak +0 -23
- package/lib/services/export.service.d.ts.__ivy_ngcc_bak +0 -7
- package/lib/services/loader-interceptor.service.d.ts.__ivy_ngcc_bak +0 -18
- package/lib/services/loader.service.d.ts.__ivy_ngcc_bak +0 -5
- package/lib/services/log.service.d.ts.__ivy_ngcc_bak +0 -16
- package/lib/services/message.service.d.ts.__ivy_ngcc_bak +0 -12
- package/lib/services/storage.service.d.ts.__ivy_ngcc_bak +0 -7
- package/lib/services/tin-spa.service.d.ts.__ivy_ngcc_bak +0 -3
- package/lib/tin-spa.module.d.ts.__ivy_ngcc_bak +0 -2
- package/tin-spa.d.ts.__ivy_ngcc_bak +0 -8
- package/tin-spa.metadata.json +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/material/dialog"),require("@angular/common"),require("@angular/material/form-field"),require("@angular/material/button"),require("rxjs"),require("rxjs/operators"),require("@angular/material/snack-bar"),require("file-saver"),require("xlsx"),require("@angular/router"),require("@angular/common/http"),require("@angular/material/autocomplete"),require("@angular/material/badge"),require("@angular/material/card"),require("@angular/material/checkbox"),require("@angular/material/chips"),require("@angular/material/core"),require("@angular/material/datepicker"),require("@angular/material/icon"),require("@angular/material/input"),require("@angular/material/list"),require("@angular/material/menu"),require("@angular/material/paginator"),require("@angular/material/progress-spinner"),require("@angular/material/radio"),require("@angular/material/select"),require("@angular/material/slider"),require("@angular/material/sort"),require("@angular/material/stepper"),require("@angular/material/table"),require("@angular/material/tabs"),require("@angular/material/tooltip"),require("@angular/forms"),require("@ng-idle/keepalive"),require("angular2-moment"),require("ngx-doc-viewer"),require("@ng-idle/core"),require("@kolkov/angular-editor"),require("@angular/cdk/stepper")):"function"==typeof define&&define.amd?define("tin-spa",["exports","@angular/core","@angular/material/dialog","@angular/common","@angular/material/form-field","@angular/material/button","rxjs","rxjs/operators","@angular/material/snack-bar","file-saver","xlsx","@angular/router","@angular/common/http","@angular/material/autocomplete","@angular/material/badge","@angular/material/card","@angular/material/checkbox","@angular/material/chips","@angular/material/core","@angular/material/datepicker","@angular/material/icon","@angular/material/input","@angular/material/list","@angular/material/menu","@angular/material/paginator","@angular/material/progress-spinner","@angular/material/radio","@angular/material/select","@angular/material/slider","@angular/material/sort","@angular/material/stepper","@angular/material/table","@angular/material/tabs","@angular/material/tooltip","@angular/forms","@ng-idle/keepalive","angular2-moment","ngx-doc-viewer","@ng-idle/core","@kolkov/angular-editor","@angular/cdk/stepper"],t):t((e=e||self)["tin-spa"]={},e.ng.core,e.ng.material.dialog,e.ng.common,e.ng.material.formField,e.ng.material.button,e.rxjs,e.rxjs.operators,e.ng.material.snackBar,e.fileSaver,e.xlsx,e.ng.router,e.ng.common.http,e.ng.material.autocomplete,e.ng.material.badge,e.ng.material.card,e.ng.material.checkbox,e.ng.material.chips,e.ng.material.core,e.ng.material.datepicker,e.ng.material.icon,e.ng.material.input,e.ng.material.list,e.ng.material.menu,e.ng.material.paginator,e.ng.material.progressSpinner,e.ng.material.radio,e.ng.material.select,e.ng.material.slider,e.ng.material.sort,e.ng.material.stepper,e.ng.material.table,e.ng.material.tabs,e.ng.material.tooltip,e.ng.forms,e.keepalive,e.angular2Moment,e.ngxDocViewer,e.core$2,e.angularEditor,e.ng.cdk.stepper)}(this,(function(e,t,n,i,a,r,o,l,s,c,p,d,m,u,f,g,h,v,y,x,S,C,M,w,b,E,I,k,P,N,D,O,T,F,L,j,A,R,U,V,_){"use strict";
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
|
|
13
13
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
14
14
|
and limitations under the License.
|
|
15
|
-
***************************************************************************** */var H=function(t,e){return(H=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function B(t,e){function n(){this.constructor=t}H(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function G(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function V(t,e){return function(n,r){e(n,r,t)}}function W(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))}function Z(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function $(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var J,Y=function(){function t(){}return t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=G([e.Injectable({providedIn:"root"})],t)}(),K=function(){function t(){}return t.prototype.store=function(t,e){return W(this,void 0,void 0,(function(){var n;return Z(this,(function(r){switch(r.label){case 0:return n=btoa(escape(JSON.stringify(e))),[4,localStorage.setItem(t,n)];case 1:return r.sent(),[2]}}))}))},t.prototype.get=function(t){return W(this,void 0,void 0,(function(){var e;return Z(this,(function(n){switch(n.label){case 0:return[4,localStorage.getItem(t)];case 1:return e=n.sent(),[2,JSON.parse(unescape(atob(e)))]}}))}))},t.prototype.removeStorageItem=function(t){return W(this,void 0,void 0,(function(){return Z(this,(function(e){switch(e.label){case 0:return[4,localStorage.removeItem(t)];case 1:return e.sent(),[2]}}))}))},t.prototype.clear=function(){return W(this,void 0,void 0,(function(){return Z(this,(function(t){switch(t.label){case 0:return[4,localStorage.clear()];case 1:return t.sent(),[2]}}))}))},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=G([e.Injectable({providedIn:"root"})],t)}(),Q=function(){function t(t,e){this.dialogRef=t,this.data=e}return t.prototype.ngOnInit=function(){this.messageType=this.data.type,this._messageSubject=this.data.subject,this._messageDetails=this.data.details},t.prototype.response=function(t){this.dialogRef.close(t)},t.ctorParameters=function(){return[{type:r.MatDialogRef},{type:void 0,decorators:[{type:e.Inject,args:[r.MAT_DIALOG_DATA]}]}]},t=G([e.Component({selector:"lib-app-message",template:'\r\n <h2 mat-dialog-title>\r\n\r\n <mat-label *ngIf="messageType==\'confirm\'">Confirm</mat-label>\r\n <mat-label *ngIf="messageType==\'info\'">Information</mat-label>\r\n <mat-label *ngIf="messageType==\'error\'">Error</mat-label>\r\n\r\n </h2>\r\n\r\n <mat-dialog-content class="mat-typography">\r\n\r\n\r\n \x3c!-- Confirm --\x3e\r\n <p *ngIf="messageType==\'confirm\'">{{_messageDetails}}</p>\r\n\r\n\r\n \x3c!-- Information --\x3e\r\n <div *ngIf="messageType==\'info\'">\r\n\r\n <h3>{{_messageSubject}}</h3>\r\n <mat-label>{{_messageDetails}}</mat-label>\r\n\r\n </div>\r\n\r\n\r\n \x3c!-- Error --\x3e\r\n <div *ngIf="messageType==\'error\'">\r\n\r\n <mat-label>{{_messageDetails}}</mat-label>\r\n\r\n </div>\r\n\r\n\r\n </mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n\r\n <button id="btnYes" mat-stroked-button *ngIf="messageType==\'confirm\'" (click)="response(\'yes\')" cdkFocusInitial>Yes</button>\r\n\r\n <button id="btnNo" mat-stroked-button *ngIf="messageType==\'confirm\'" (click)="response(\'no\')" >No</button>\r\n\r\n <button id="btnOK" mat-stroked-button *ngIf="messageType==\'info\' || messageType==\'error\'" (click)="response(\'ok\')" cdkFocusInitial>OK</button>\r\n\r\n</mat-dialog-actions>\r\n\r\n\r\n\r\n'}),V(1,e.Inject(r.MAT_DIALOG_DATA))],t)}(),X=function(){function t(t,e){this.snackBar=t,this.dialog=e}return t.prototype.toast=function(t){this.snackBar.open(t,"OK",{duration:5e3})},t.prototype.info=function(t,e){this.dialog.open(Q,{width:"600px",data:{type:"info",subject:t,details:e}})},t.prototype.error=function(t){this.dialog.open(Q,{width:"600px",data:{type:"error",subject:void 0,details:t}})},t.prototype.confirm=function(t){var e=t;return this.dialog.open(Q,{width:"400px",data:{type:"confirm",subject:"",details:e}}).afterClosed().pipe(i.mergeMap((function(t){return o.of(t)})))},t.ctorParameters=function(){return[{type:n.MatSnackBar},{type:r.MatDialog}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.MatSnackBar),e.ɵɵinject(r.MatDialog))},token:t,providedIn:"root"}),t=G([e.Injectable({providedIn:"root"})],t)}(),tt=function(){function t(){this.fileType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8",this.fileExtension=".xlsx"}return t.prototype.exportExcel=function(t,e){var n={Sheets:{data:s.utils.json_to_sheet(t)},SheetNames:["data"]},r=s.write(n,{bookType:"xlsx",type:"array"});this.saveExcelFile(r,e)},t.prototype.saveExcelFile=function(t,e){var n=new Blob([t],{type:this.fileType});a.saveAs(n,e+this.fileExtension)},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=G([e.Injectable({providedIn:"root"})],t)}();(J=t.LogLevel||(t.LogLevel={}))[J.All=0]="All",J[J.Debug=1]="Debug",J[J.Info=2]="Info",J[J.Warn=3]="Warn",J[J.Error=4]="Error",J[J.Fatal=5]="Fatal",J[J.Off=6]="Off";var et,nt=function(){},rt=function(){},ot=function(){this.enableFilter=!1,this.create=new it,this.greyout=new lt},it=function(){},at=function(){this.name="default",this.display="default",this.type=t.TableColumnType.String};(et=t.TableColumnType||(t.TableColumnType={}))[et.String=0]="String",et[et.Date=1]="Date",et[et.DateTime=2]="DateTime",et[et.Image=3]="Image",et[et.Icon=4]="Icon",et[et.TextIcon=5]="TextIcon",et[et.Chip=6]="Chip";var st,lt=function(){this.field="",this.operator=t.Operator.Equal,this.value=""};(st=t.Operator||(t.Operator={}))[st.Equal=0]="Equal",st[st.Less=1]="Less",st[st.Greater=2]="Greater",st[st.NotEqual=3]="NotEqual";var ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e}(lt),pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return B(e,t),e}(lt),dt=function(){},ut=function(){},mt=function(){this.appName="",this.selfService=!1,this.logo="",this.logoSize="normal"},ht=function(){this.appName="App Name",this.logo="",this.ADAuth=!0,this.localAuth=!0,this.employees=!1,this.approvals=!1},gt=function(){this.name="",this.display="New Cap Item",this.enabled=!1,this.type="",this.newLine=!1,this.showMenu=!0,this.ignoreSubsDisplay=!1,this.link="",this.icon="navigate_next"},ft=function(){this.roleID="",this.roleName="New Role",this.cap1=!1,this.cap2=!1,this.cap3=!1,this.cap4=!1,this.cap5=!1,this.cap6=!1,this.cap7=!1,this.cap8=!1,this.cap9=!1,this.cap10=!1,this.cap11=!1,this.cap12=!1,this.cap13=!1,this.cap14=!1,this.cap15=!1,this.cap16=!1,this.cap17=!1,this.cap18=!1,this.cap19=!1,this.cap20=!1,this.cap21=!1,this.cap22=!1,this.cap23=!1,this.cap24=!1,this.cap25=!1,this.cap26=!1,this.cap27=!1,this.cap28=!1,this.cap29=!1,this.cap30=!1,this.cap31=!1,this.cap32=!1,this.cap33=!1,this.cap34=!1,this.cap35=!1,this.cap36=!1,this.cap37=!1,this.cap38=!1,this.cap39=!1,this.cap40=!1,this.cap41=!1,this.cap42=!1,this.cap43=!1,this.cap44=!1,this.cap45=!1,this.cap46=!1,this.cap47=!1,this.cap48=!1,this.cap49=!1,this.cap50=!1,this.cap51=!1,this.cap52=!1,this.cap53=!1,this.cap54=!1,this.cap55=!1,this.cap56=!1,this.cap57=!1,this.cap58=!1,this.cap59=!1,this.cap60=!1,this.cap61=!1,this.cap62=!1,this.cap63=!1,this.cap64=!1,this.cap65=!1,this.cap66=!1,this.cap67=!1,this.cap68=!1,this.cap69=!1,this.cap70=!1,this.cap71=!1,this.cap72=!1,this.cap73=!1,this.cap74=!1,this.cap75=!1,this.cap76=!1,this.cap77=!1,this.cap78=!1,this.cap79=!1,this.cap80=!1,this.cap81=!1,this.cap82=!1,this.cap83=!1,this.cap84=!1,this.cap85=!1,this.cap86=!1,this.cap87=!1,this.cap88=!1,this.cap89=!1,this.cap90=!1,this.cap91=!1,this.cap92=!1,this.cap93=!1,this.cap94=!1,this.cap95=!1,this.cap96=!1,this.cap97=!1,this.cap98=!1,this.cap99=!1,this.cap100=!1},vt=function(){},yt=function(){this.userID="",this.password="",this.tries="0",this.locked="0",this.logged="0",this.disabled="0",this.changepassword="0",this.dateCreated=l.Core.nowDate(),this.dateUpdated=l.Core.nowDate(),this.token="",this.dateExpire=l.Core.nowDate(),this.tokenExpire=l.Core.nowDate(),this.authType=""},bt=function(){this.userID="",this.currentPassword="",this.newPassword="",this.confirmPassword=""},xt=function(){this.profileID="",this.userID="",this.roleID="1",this.firstName="",this.lastName="",this.email="",this.empID="",this.arID="0",this.authType=""},wt=function(){function n(){this.level=t.LogLevel.All,this.logToConsole=!0,this.logToApi=!1}return n.prototype.debug=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.writeToLog(e,t.LogLevel.Debug,n)},n.prototype.info=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.writeToLog(e,t.LogLevel.Info,n)},n.prototype.warn=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.writeToLog(e,t.LogLevel.Warn,n)},n.prototype.error=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.writeToLog(e,t.LogLevel.Error,n)},n.prototype.fatal=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.writeToLog(e,t.LogLevel.Fatal,n)},n.prototype.log=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.writeToLog(e,t.LogLevel.All,n)},n.prototype.writeToLog=function(t,e,n){if(this.shouldLog(e)){var r=l.Core.getFormatedDate(Date(),!1).replace("T"," ");r+=" - Message: "+t,n.length&&(r+=" - Extra Info: "+this.formatParams(n)),this.logToConsole&&console.log(r),this.logToApi}},n.prototype.formatParams=function(t){var e,n,r=t.join(",");if(t.some((function(t){return"object"==typeof t}))){r="";try{for(var o=$(t),i=o.next();!i.done;i=o.next()){var a=i.value;r+=JSON.stringify(a)+","}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}}return r},n.prototype.shouldLog=function(e){var n=!1;return(e>=this.level&&e!==t.LogLevel.Off||this.level===t.LogLevel.All)&&(n=!0),n},n.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new n},token:n,providedIn:"root"}),n=G([e.Injectable({providedIn:"root"})],n)}(),It=function(){function t(t,e,n,r,i){this.storage=t,this.router=e,this.httpService=n,this.messageService=r,this.logService=i,this.loggedin=!1,this.loggedinSource=new o.BehaviorSubject(this.loggedin),this.loggedinObserv=this.loggedinSource.asObservable(),this.token="",this.tokenSource=new o.BehaviorSubject(this.token),this.tokenObserv=this.tokenSource.asObservable(),this.tokenExpire="",this.tokenExpireSource=new o.BehaviorSubject(this.tokenExpire),this.tokenExpireObserv=this.tokenExpireSource.asObservable(),this.currentUser="tnyagato",this.currentUserSource=new o.BehaviorSubject(this.currentUser),this.currentUserObserv=this.currentUserSource.asObservable(),this.islineManager=!1,this.isLineManagerSource=new o.BehaviorSubject(this.islineManager),this.isLineManagerObserv=this.isLineManagerSource.asObservable(),this.currentRole=new ft,this.currentRoleSource=new o.BehaviorSubject(this.currentRole),this.myRoleObserv=this.currentRoleSource.asObservable(),this.loggedUserSource=new o.BehaviorSubject("tnyagato"),this.loggedUserFullName=this.loggedUserSource.asObservable()}return t.prototype.updateloggedin=function(t){this.loggedinSource.next(t),this.loggedin=t},t.prototype.updateToken=function(t){this.tokenSource.next(t)},t.prototype.updateTokenExpire=function(t){this.tokenExpireSource.next(t)},t.prototype.updateCurrentUser=function(t){this.currentUserSource.next(t.toLocaleLowerCase()),this.currentUser=t.toLocaleLowerCase()},t.prototype.updateIsLineManager=function(t){this.isLineManagerSource.next(t)},t.prototype.updateRole=function(t){this.currentRoleSource.next(t)},t.prototype.updateLoggedUserFullName=function(t){this.loggedUserSource.next(t)},t.prototype.isAuthorised=function(t){return!!this.currentRoleSource.value[t]||(this.router.navigate(["home"]),this.messageService.toast("Unauthorised: "+t),!1)},t.prototype.isValidToken=function(){var t=new Date(this.tokenExpireSource.value)>new Date;return t||(this.router.navigate(["login"]),this.messageService.toast("Expired Session")),t},t.prototype.canActivate=function(){var t=this;return!(!this.loggedin||!this.isValidToken())||(null===localStorage.getItem(l.Constants.AUTH_USER)?(this.updateloggedin(!1),this.router.navigate(["login"]),!1):(this.updateloggedin(!0),this.storage.get(l.Constants.AUTH_USER).then((function(e){t.updateCurrentUser(e)})),this.storage.get(l.Constants.AUTH_NAME).then((function(e){t.updateLoggedUserFullName(e)})),this.storage.get(l.Constants.AUTH_ROLES).then((function(e){var n=JSON.parse(e);t.updateRole(n)})),this.storage.get(l.Constants.AUTH_TOKEN).then((function(e){t.updateToken(e)})),this.storage.get(l.Constants.AUTH_TOKEN_EXPIRE).then((function(e){t.updateTokenExpire(e),t.isValidToken()})),!0))},t.ctorParameters=function(){return[{type:K},{type:c.Router},{type:l.HttpService},{type:X},{type:wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(K),e.ɵɵinject(c.Router),e.ɵɵinject(l.HttpService),e.ɵɵinject(X),e.ɵɵinject(wt))},token:t,providedIn:"root"}),t=G([e.Injectable({providedIn:"root"})],t)}(),St=function(){function t(t){this.httpService=t,this.capUsers=new gt,this.tmpProfileUserID="",this.capUsers.name="cap3",this.capUsers.display="Users",this.capUsers.link="home/admin/users"}return t.prototype.GetUser=function(t,e){return this.httpService.Get("Basic/GetUser?by="+t+"&val="+e)},t.prototype.UpdateUser=function(t,e){return this.httpService.Post("Basic/UpdateUser?action="+e,t)},t.prototype.login=function(t){return this.httpService.Post("Basic/login",t)},t.prototype.changePassword=function(t){return this.httpService.Post("Basic/ChangePassword",t)},t.prototype.changePasswordAdmin=function(t){return this.httpService.Post("Basic/ChangePasswordAdmin",t)},t.prototype.SelfReset=function(t){return this.httpService.Post("Basic/SelfReset",t)},t.prototype.UpdateRole=function(t,e){return this.httpService.Post("Basic/UpdateRole?action="+e,t)},t.prototype.GetRole=function(t,e){return this.httpService.Get("Basic/GetRole?by="+t+"&val="+e)},t.prototype.UpdateAccount=function(t,e){return this.httpService.Post("Basic/UpdateAccount?action="+e,t)},t.prototype.GetProfile=function(t,e){return this.httpService.Get("Basic/GetProfile?by="+t+"&val="+e)},t.prototype.UpdateProfile=function(t,e){return this.httpService.Post("Basic/UpdateProfile?action="+e,t)},t.prototype.GetLog=function(t,e){return this.httpService.Get("Basic/GetLog?by="+t+"&val="+e)},t.prototype.GetSetting=function(t,e){return this.httpService.Get("Basic/GetSetting?by="+t+"&val="+e)},t.prototype.UpdateSetting=function(t,e){return this.httpService.Post("Basic/UpdateSetting?action="+e,t)},t.ctorParameters=function(){return[{type:l.HttpService}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(l.HttpService))},token:t,providedIn:"root"}),t=G([e.Injectable({providedIn:"root"})],t)}(),Ct=function(){function t(){this.isLoading=new o.BehaviorSubject(!1)}return t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=G([e.Injectable({providedIn:"root"})],t)}(),kt=function(){function t(t){var e=this;this.loaderService=t,this.logo="",this.loaderService.isLoading.subscribe((function(t){e.loading=t}))}return t.prototype.ngOnInit=function(){},t.ctorParameters=function(){return[{type:Ct}]},G([e.Input()],t.prototype,"logo",void 0),t=G([e.Component({selector:"spa-loader",template:'<div class="progress-loader" style="z-index: 9999;" [hidden]="!loading">\r\n <div class="loading-spinner">\r\n\r\n <img *ngIf="logo==\'\'" style="width: 100px;"\r\n src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg=="\r\n\r\n >\r\n\r\n <img *ngIf="logo!=\'\'" [src]="logo" style="width: 100px;" />\r\n\r\n\r\n <span id="loadingMessage" class="loading-message">Please wait...</span>\r\n </div>\r\n</div>\r\n',styles:[".loading-spinner{background-color:#0000001f;position:absolute;width:100%;top:0;left:0;height:100vh;align-items:center;justify-content:center;display:-ms-grid;display:grid}.loading-spinner img{-ms-grid-row-align:end;align-self:end}.loading-message{text-align:center;-ms-grid-row-align:start;align-self:start}"]})],t)}(),Mt={disableClose:!0,hasBackdrop:!0},Dt=function(){function t(){}return t=G([e.NgModule({declarations:[],imports:[],exports:[p.CommonModule,U.FormsModule,U.ReactiveFormsModule,S.MatMenuModule,P.MatSliderModule,A.MatTableModule,C.MatPaginatorModule,g.MatCheckboxModule,u.MatBadgeModule,m.MatButtonModule,x.MatIconModule,r.MatDialogModule,n.MatSnackBarModule,L.MatTabsModule,b.MatFormFieldModule,w.MatInputModule,h.MatCardModule,f.MatChipsModule,D.MatSelectModule,v.MatNativeDateModule,k.MatProgressSpinnerModule,I.MatListModule,d.MatAutocompleteModule,R.MatTooltipModule,T.MatSortModule,y.MatDatepickerModule,E.MatStepperModule,M.MatRadioModule],providers:[{provide:r.MAT_DIALOG_DEFAULT_OPTIONS,useValue:Mt},{provide:v.MAT_DATE_LOCALE,useValue:"en-GB"}]})],t)}(),Pt=function(){function t(t,e,n,r,o){this.loaderService=t,this.messageService=e,this.authService=n,this.router=r,this.logService=o,this.requests=[]}return t.prototype.removeRequest=function(t){var e=this.requests.indexOf(t);e>=0&&this.requests.splice(e,1),this.loaderService.isLoading.next(this.requests.length>0)},t.prototype.intercept=function(t,e){var n=this,r=t.clone({setHeaders:{Authorization:"Basic "+btoa(this.authService.currentUser+":"+this.authService.tokenSource.value)}});return this.requests.push(r),this.requests.length>1&&this.logService.info("Multiple connections detected > "+this.requests.length),this.loaderService.isLoading.next(!0),o.Observable.create((function(t){var o=e.handle(r).subscribe((function(e){e instanceof N.HttpResponse&&(n.removeRequest(r),t.next(e))}),(function(e){n.messageService.toast("error: "+e.statusText),n.removeRequest(r),t.error(e),401===e.status&&n.router.navigate(["login"])}),(function(){n.removeRequest(r),t.complete()}));return function(){n.removeRequest(r),o.unsubscribe()}}))},t.ctorParameters=function(){return[{type:Ct},{type:X},{type:It},{type:c.Router},{type:wt}]},t=G([e.Injectable()],t)}(),Tt=function(){function t(){}return t.prototype.ngOnInit=function(){},t=G([e.Component({selector:"lib-tin-spa",template:"\n <p>\n tin-spa works!\n </p>\n "})],t)}(),Et=function(){function t(t,e){this.router=t,this.authService=e,this.isExpanded=!1,this.appConfig=new ht}return t.prototype.ngOnInit=function(){var t=this;this.authService.loggedUserFullName.subscribe((function(e){return t.loggedUserFullName=e})),this.authService.myRoleObserv.subscribe((function(e){return t.myRole=e})),this.authService.loggedinObserv.subscribe((function(e){return t.loggedin=e}))},t.prototype.collapse=function(){this.isExpanded=!1},t.prototype.toggle=function(){this.isExpanded=!this.isExpanded},t.prototype.redirectTo=function(t){""!=t&&this.router.navigate([t])},t.ctorParameters=function(){return[{type:c.Router},{type:It}]},G([e.Input()],t.prototype,"appConfig",void 0),t=G([e.Component({selector:"spa-nav-menu",template:'<header *ngIf="loggedin">\r\n <nav class="toolbar navbar navbar-expand-sm navbar-toggleable-sm navbar-light border-bottom box-shadow mb-3 " style="padding-right: 10px;">\r\n <div class="container-fluid" style="padding-right: 0px;">\r\n \x3c!--<a class="navbar-brand" [routerLink]="[\'/\']">Orbit</a>--\x3e\r\n\r\n <img *ngIf="appConfig.logo!=\'\'" [src]="appConfig.logo" style="height: 50px; margin-right: 2em" />\r\n\r\n\r\n <div style="font-size: 20px;">\r\n {{appConfig.appName}}\r\n </div>\r\n\r\n\r\n <button class="navbar-toggler"\r\n type="button"\r\n data-toggle="collapse"\r\n data-target=".navbar-collapse"\r\n aria-label="Toggle navigation"\r\n [attr.aria-expanded]="isExpanded"\r\n (click)="toggle()">\r\n <span class="navbar-toggler-icon"></span>\r\n </button>\r\n\r\n <div *ngIf="myRole" class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse stack-top" style="margin-right: 0px;" [ngClass]="{ show: isExpanded }" >\r\n\r\n <button mat-icon-button (click)="redirectTo(\'login\')"> <mat-icon>logout</mat-icon> </button>\r\n\r\n <button id="btnUser" mat-button [matMenuTriggerFor]="profileMenu" style="margin-left:2em"><mat-icon>account_circle</mat-icon> {{loggedUserFullName}}</button>\r\n\r\n <mat-menu #profileMenu="matMenu">\r\n <button id="btnProfile" mat-menu-item (click)="redirectTo(\'home/user/profile\')" >Profile</button>\r\n <button id="btnLogOff" mat-menu-item (click)="redirectTo(\'login\')">Log Off</button>\r\n </mat-menu>\r\n\r\n <div *ngFor="let item of appConfig.capItems">\r\n\r\n \x3c!-- Menu Item --\x3e\r\n <button id="btnMenu" *ngIf="myRole[item.name] && !item.capSubItems && item.showMenu" mat-button (click)="redirectTo(item.link)">{{item.display}}</button>\r\n\r\n \x3c!-- Menu Item with Sub items ignored --\x3e\r\n <button id="btnMenu" *ngIf="myRole[item.name] && item.capSubItems && item.showMenu && item.ignoreSubsDisplay" mat-button (click)="redirectTo(item.link)">{{item.display}}</button>\r\n\r\n \x3c!-- Menu Item with Sub items to display--\x3e\r\n <button id="btnMenu" *ngIf="myRole[item.name] && item.capSubItems && item.showMenu && !item.ignoreSubsDisplay" mat-button [matMenuTriggerFor]="adminMenu">{{item.display}}</button>\r\n\r\n\r\n \x3c!-- Sub Menu Items --\x3e\r\n <mat-menu #adminMenu="matMenu">\r\n\r\n <div *ngFor="let subItem of item.capSubItems">\r\n\r\n <button *ngIf="myRole[subItem.name] && subItem.showMenu" mat-menu-item (click)="redirectTo(subItem.link)">{{subItem.display}}</button>\r\n\r\n </div>\r\n\r\n </mat-menu>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n </nav>\r\n</header>\r\n',styles:["a.navbar-brand{white-space:normal;text-align:center;word-break:break-all}html{font-size:14px}@media (min-width:768px){html{font-size:16px}}.box-shadow{box-shadow:0 .25rem .75rem rgba(0,0,0,.05)}.toolbar{height:60px;display:flex;align-items:center;background-color:#03a;color:#fff;font-weight:600}.stack-top{z-index:9;margin:20px}"]})],t)}(),At=function(){function t(t,e,n,r){var o=this;this.idle=t,this.keepalive=e,this.authService=n,this.router=r,this.loggedin=!1,this.idleState="Not started.",this.timedOut=!1,this.lastPing=null,this.isWarning=!1,this.authService.loggedinObserv.subscribe((function(t){o.loggedin=t})),t.setIdle(900),t.setTimeout(10),t.setInterrupts(z.DEFAULT_INTERRUPTSOURCES),t.onIdleStart.subscribe((function(){o.idleState="You've gone idle!"})),t.onIdleEnd.subscribe((function(){o.idleState="No longer idle.",o.isWarning=!1})),t.onTimeoutWarning.subscribe((function(t){o.idleState="You will be signed out in "+t+" seconds!",o.loggedin&&(o.isWarning=!0)})),t.onTimeout.subscribe((function(){o.idleState="Timed out!",o.timedOut=!0,o.stopWatch()})),e.interval(15),e.onPing.subscribe((function(){o.lastPing=new Date})),this.startWatch()}return t.prototype.ngOnInit=function(){},t.prototype.startWatch=function(){this.idle.watch(),this.idleState="Started.",this.timedOut=!1,this.isWarning=!1},t.prototype.stopWatch=function(){this.idle.stop(),this.isWarning=!1,this.router.navigate(["login"])},t.prototype.using=function(){this.isWarning=!1},t.ctorParameters=function(){return[{type:z.Idle},{type:O.Keepalive},{type:It},{type:c.Router}]},t=G([e.Component({selector:"spa-timeout",template:'\r\n<div class="loading-spinner" [hidden]="!isWarning" >\r\n\r\n <div style="width: 500px; text-align: center;">\r\n\r\n\r\n\r\n <div class="row">\r\n <div class="col">\r\n <img style="width: 100px;"\r\n src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">\r\n </div>\r\n </div>\r\n\r\n <mat-card class="mat-elevation-z3" >\r\n\r\n <mat-card-header>\r\n\r\n <h5>Are you still there ?</h5>\r\n\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n\r\n <br>\r\n <span>{{idleState}}</span>\r\n\r\n <br>\r\n\r\n </mat-card-content>\r\n\r\n <mat-card-actions>\r\n\r\n <div class="row justify-content-around">\r\n\r\n <div class="col-2">\r\n <button style="width: 100px;" mat-stroked-button color="primary" (click)="using()">Yes</button>\r\n </div>\r\n\r\n <div class="col-4">\r\n <button style="width: 100px;" mat-stroked-button color="primary" (click)="stopWatch()">No</button>\r\n </div>\r\n\r\n </div>\r\n\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n\r\n</div>\r\n\r\n</div>\r\n',styles:[".loading-spinner{background-color:#0000001f;position:absolute;width:100%;top:0;left:0;height:100vh;align-items:center;justify-content:center;display:-ms-grid;display:grid}.loading-spinner img{-ms-grid-row-align:end;align-self:end}.loading-message{text-align:center;-ms-grid-row-align:start;align-self:start}"]})],t)}(),Lt=function(){function n(){this.dataChange=new e.EventEmitter,this.buttonClick=new e.EventEmitter,this.loadClick=new e.EventEmitter,this.createClick=new e.EventEmitter,this.colType=t.TableColumnType,this.op=t.Operator,this.displayedColumns=[],this._filterText=""}return n.prototype.ngOnInit=function(){var t=this;this.config.columns.forEach((function(e){t.displayedColumns.push(e.name)})),this.displayedColumns.push("Action"),this.styleString="width: "+50*this.config.actions.length+"px"},n.prototype.ngOnChanges=function(){this.data=new A.MatTableDataSource(this.data),this.data.paginator=this.tablePaginator,this.applyFilter(this._filterText)},n.prototype.applyFilter=function(t){this.data.filter=t.trim().toLowerCase()},n.prototype.do=function(t,e){var n=new ut;n.name=t,n.value=e,this.buttonClick.emit(n)},n.prototype.create=function(){this.createClick.emit()},n.prototype.load=function(){this.loadClick.emit()},n.prototype.test=function(e,n,r){return n==t.Operator.Equal?e==r:n==t.Operator.Greater?e>r:n==t.Operator.Less?e<r:n==t.Operator.NotEqual?e!=r:void 0},G([e.Input()],n.prototype,"config",void 0),G([e.Input()],n.prototype,"data",void 0),G([e.Output()],n.prototype,"dataChange",void 0),G([e.Output()],n.prototype,"buttonClick",void 0),G([e.Output()],n.prototype,"loadClick",void 0),G([e.Output()],n.prototype,"createClick",void 0),G([e.ViewChild("tablePaginator")],n.prototype,"tablePaginator",void 0),n=G([e.Component({selector:"spa-table",template:'<div >\r\n\r\n<div *ngIf="config.create.enabled || config.enableFilter" class="row justify-content-between" style="padding-bottom: 10px">\r\n <div class="col">\r\n<button *ngIf="config.create" [disabled]="!config.create.enabled" mat-raised-button color="primary" (click)="create()">{{config.create.display}}</button>\r\n</div>\r\n <div *ngIf="config.enableFilter" class="col d-flex justify-content-end">\r\n<mat-form-field style="font-size:12px;margin-right: 5px;">\r\n<mat-label>Filter</mat-label>\r\n<input matInput [(ngModel)]="_filterText" (keyup)="applyFilter($event.target.value)" placeholder="Enter Filter text" autocomplete="off">\r\n</mat-form-field>\r\n<button mat-mini-fab color="primary" (click)="load()" style="margin-top:5px" matTooltip="refresh data" matTooltipPosition="right"><mat-icon class="refreshIcon">refresh</mat-icon></button>\r\n</div>\r\n</div>\r\n\r\n<div class="mat-elevation-z8" *ngIf="data">\r\n\r\n <table mat-table [dataSource]="data">\r\n\r\n <ng-container *ngFor="let col of config.columns; let i = index"\r\n\r\n [matColumnDef]="col.name">\r\n <th mat-header-cell *matHeaderCellDef> {{col.display}} </th>\r\n <td mat-cell *matCellDef="let row">\r\n\r\n \x3c!-- String --\x3e\r\n <div *ngIf="(col.type==colType.String || col.type == null) && col.color == null"> {{row[col.name]}}</div>\r\n\r\n <div [ngStyle]="{\'color\':col.color.name}"\r\n *ngIf="(col.type==colType.String || col.type == null) && col.color != null && test(row[col.color.field], col.color.operator, col.color.value )" >\r\n {{row[col.name]}}\r\n </div>\r\n\r\n <div\r\n *ngIf="(col.type==colType.String || col.type == null) && col.color != null && !test(row[col.color.field], col.color.operator, col.color.value )" >\r\n {{row[col.name]}}\r\n </div>\r\n\r\n \x3c!-- <div [ngStyle]="{\'color\':col.color.name}"\r\n *ngIf="(col.type==colType.String || col.type == null) && col.color != null &&\r\n col.color.operator==op.Equal && row[col.color.field]==col.color.value" >\r\n {{row[col.name]}}\r\n </div>\r\n\r\n <div [ngStyle]="{\'color\':col.color.name}"\r\n *ngIf="(col.type==colType.String || col.type == null) && col.color != null &&\r\n col.color.operator==op.Greater && row[col.color.field]>col.color.value" >\r\n {{row[col.name]}}\r\n </div>\r\n\r\n <div [ngStyle]="{\'color\':col.color.name}"\r\n *ngIf="(col.type==colType.String || col.type == null) && col.color != null &&\r\n col.color.operator==op.Less && row[col.color.field]<col.color.value" >\r\n {{row[col.name]}}\r\n </div>\r\n\r\n <div [ngStyle]="{\'color\':col.color.name}"\r\n *ngIf="(col.type==colType.String || col.type == null) && col.color != null &&\r\n col.color.operator==op.NotEqual && row[col.color.field]!=col.color.value" >\r\n {{row[col.name]}}\r\n </div> --\x3e\r\n\r\n\r\n \x3c!-- Date --\x3e\r\n <div *ngIf="col.type==colType.Date"> {{row[col.name] | date:\'dd/MM/yyyy\'}}</div>\r\n\r\n\r\n \x3c!-- DateTime --\x3e\r\n <div *ngIf="col.type==colType.DateTime"> {{row[col.name] | date:\'dd/MM/yyyy HH:mm\'}}</div>\r\n\r\n\r\n <ng-container *ngFor="let icon of col.icons;">\r\n \x3c!-- <mat-icon *ngIf="col.type==colType.Icon && icon.operator==op.Equal && row[icon.field]==icon.value"\r\n [ngStyle]="{\'color\':icon.color}"\r\n [matTooltip]="icon.hint" matTooltipPosition="above">\r\n {{icon.name}}\r\n </mat-icon>\r\n\r\n <mat-icon *ngIf="col.type==colType.Icon && icon.operator==op.Greater && row[icon.field]>icon.value"\r\n [ngStyle]="{\'color\':icon.color}"\r\n [matTooltip]="icon.hint" matTooltipPosition="above">\r\n {{icon.name}}\r\n </mat-icon>\r\n\r\n <mat-icon *ngIf="col.type==colType.Icon && icon.operator==op.Less && row[icon.field]<icon.value"\r\n [ngStyle]="{\'color\':icon.color}"\r\n [matTooltip]="icon.hint" matTooltipPosition="above">\r\n {{icon.name}}\r\n </mat-icon>\r\n <mat-icon *ngIf="col.type==colType.Icon && icon.operator==op.NotEqual && row[icon.field]!=icon.value"\r\n [ngStyle]="{\'color\':icon.color}"\r\n [matTooltip]="icon.hint" matTooltipPosition="above">\r\n {{icon.name}}\r\n </mat-icon> --\x3e\r\n\r\n <mat-icon *ngIf="col.type==colType.Icon && test(row[icon.field],icon.operator,icon.value)"\r\n [ngStyle]="{\'color\':icon.color}"\r\n [matTooltip]="icon.hint" matTooltipPosition="above">\r\n {{icon.name}}\r\n </mat-icon>\r\n\r\n </ng-container>\r\n\r\n </td>\r\n\r\n </ng-container>\r\n\r\n\r\n\r\n\r\n <ng-container matColumnDef="Action">\r\n\r\n <th mat-header-cell *matHeaderCellDef> Action </th>\r\n <td mat-cell *matCellDef="let row" [style]="styleString+\';padding-right: 0px;\'">\r\n\r\n <ng-container *ngFor="let act of config.actions">\r\n\r\n <button *ngIf=" (act.disappear && (row[act.disappear.field] != act.disappear.value)) || !act.disappear" mat-mini-fab\r\n\r\n [disabled]="(act.disable && (row[act.disable.field] == act.disable.value))"\r\n [color]="act.color==null? \'primary\' : act.color"\r\n [matTooltip]="act.hint" matTooltipPosition="above"\r\n (click)="do(act.name,row)" style="margin-right:5px">\r\n <mat-icon>{{act.icon}}</mat-icon>\r\n\r\n </button>\r\n\r\n </ng-container>\r\n\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>\r\n <tr mat-row *matRowDef="let row; columns: displayedColumns;" [ngClass]="{\'make-gray\': row[config.greyout.field]==config.greyout.value}"></tr>\r\n\r\n </table>\r\n</div>\r\n<mat-paginator #tablePaginator [pageSizeOptions]="[10, 50, 100]" showFirstLastButtons></mat-paginator>\r\n</div>\r\n\r\n',styles:[".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.make-gray{background-color:#d3d3d3}"]})],n)}(),Rt=function(){function t(){this.clickable=!1,this.tileClick=new e.EventEmitter,this.selected=""}return t.prototype.ngOnInit=function(){},t.prototype.clicked=function(t){this.clickable&&(this.selected==t.tileName?(this.tileClick.emit(""),this.selected=""):(this.tileClick.emit(t.tileName),this.selected=t.tileName))},G([e.Input()],t.prototype,"tiles",void 0),G([e.Input()],t.prototype,"clickable",void 0),G([e.Output()],t.prototype,"tileClick",void 0),t=G([e.Component({selector:"spa-tiles",template:' <div class="row align-items-center">\r\n\r\n \x3c!-- <div class="col" *ngFor="let row of tiles" >\r\n\r\n <mat-card *ngIf="row.visible">\r\n <div class="row d-flex justify-content-center">\r\n\r\n <mat-label style="font-size:30px;font-weight:bold" [ngStyle]="{\'color\':row.tileColor}">{{row.tileValue}}</mat-label>\r\n\r\n </div>\r\n\r\n <div class="row d-flex justify-content-center">\r\n\r\n <mat-label [ngStyle]="{\'color\':row.selected == true ? \'darkorange\' : \'black\' }" style="font-size:12px;padding-left:5px;padding-right:5px">{{row.tileName}}</mat-label>\r\n <mat-icon style="font-size: 17px; color:steelblue;">info</mat-icon>\r\n\r\n </div>\r\n </mat-card>\r\n\r\n </div> --\x3e\r\n\r\n <ng-container *ngFor="let row of tiles">\r\n\r\n <mat-card class="col" style="margin-left: 10px;margin-right: 10px" *ngIf="row.visible" (click)="clicked(row)">\r\n\r\n <div class="row d-flex justify-content-center">\r\n\r\n <mat-label style="font-weight:bold" [ngStyle]="{\'color\':row.tileColor,\'font-size\':row.tileName == selected ? \'35px\' : \'30px\' }">{{row.tileValue}}</mat-label>\r\n\r\n </div>\r\n\r\n <div class="row d-flex justify-content-center row align-items-center">\r\n\r\n <mat-label [ngStyle]="{\'font-size\':row.tileName == selected ? \'18px\' : \'12px\' }" style="padding-left:5px;padding-right:5px">{{row.tileName}}</mat-label>\r\n <mat-icon [matTooltip]="row.info" matTooltipPosition="above" [ngStyle]="{\'font-size\':row.tileName == selected ? \'20px\' : \'17px\' }" style=" color:steelblue;">info</mat-icon>\r\n\r\n </div>\r\n\r\n </mat-card>\r\n\r\n\r\n </ng-container>\r\n\r\n </div>\r\n',styles:[""]})],t)}(),Ut=function(){function t(){this.date=new U.FormControl(new Date),this.display="",this.readonly=!1,this.currentYear=(new Date).getFullYear(),this.min=new U.FormControl(new Date(this.currentYear-50,0,1)),this.max=new U.FormControl(new Date(this.currentYear+50,0,1))}return t.prototype.ngOnInit=function(){},t.prototype.onChangeEvent=function(t){},G([e.Input()],t.prototype,"date",void 0),G([e.Input()],t.prototype,"display",void 0),G([e.Input()],t.prototype,"readonly",void 0),G([e.Input()],t.prototype,"min",void 0),G([e.Input()],t.prototype,"max",void 0),t=G([e.Component({selector:"spa-date",template:'\r\n<mat-form-field style="width:150px;margin-right:20px">\r\n<input [formControl]="date" [min]="min.value" [max]="max.value" matInput [matDatepicker]="picker_date" [placeholder]="display" [readonly]="true" [disabled]="readonly">\r\n<mat-datepicker-toggle matSuffix [for]="picker_date"></mat-datepicker-toggle>\r\n<mat-datepicker #picker_date></mat-datepicker>\r\n</mat-form-field>\r\n',styles:[""]})],t)}(),Nt=function(){function t(){this.hideRequiredControl=new U.FormControl(!0),this.readonly=!1,this.hint="",this.display="",this.placeholder="",this.value="",this.valueChange=new e.EventEmitter,this.format="text",this.leave=new e.EventEmitter,this.enterPress=new e.EventEmitter,this.rows="",this.width="100%",this.options=[],this.optionValue="",this.optionDisplay="",this.myControl=new U.FormControl,this.required=!0,this.min=0,this.max=9e15,this.regex="",this.control=new U.FormControl(this.value,[U.Validators.required,U.Validators.minLength(this.min),U.Validators.maxLength(this.max),U.Validators.pattern(this.regex)])}return t.prototype.ngOnInit=function(){this.options.length>0&&this.initFilter(),""==this.placeholder&&(this.placeholder=this.display)},t.prototype.ngAfterViewInit=function(){this.readonly&&(this.control.setValidators(null),this.control.updateValueAndValidity()),this.required||this.readonly||(this.control.setValidators([U.Validators.minLength(this.min),U.Validators.maxLength(this.max),U.Validators.pattern(this.regex)]),this.control.updateValueAndValidity())},t.prototype.initFilter=function(){var t=this;this.filteredOptions=this.myControl.valueChanges.pipe(i.startWith(""),i.map((function(e){return t._filter(e)})))},t.prototype._filter=function(t){var e=this,n=t.toLowerCase();return this.options.filter((function(t){return t[""+e.optionDisplay].toLowerCase().includes(n)}))},t.prototype.changed=function(){this.valueChange.emit(this.value)},t.prototype.changed2=function(){this.valueChange.emit(this.myControl.value)},t.prototype.leaved=function(){this.leave.emit()},t.prototype.enterPressed=function(){this.enterPress.emit()},t.prototype.validate=function(){return(this.required||this.min>0)&&this.control.hasError("required")?"Required":this.control.hasError("minlength")?"Minimun length is "+this.min:this.control.hasError("maxlength")?"Maximum length is "+this.max:this.control.hasError("pattern")?"Invalid Input":""},G([e.Input()],t.prototype,"readonly",void 0),G([e.Input()],t.prototype,"hint",void 0),G([e.Input()],t.prototype,"display",void 0),G([e.Input()],t.prototype,"placeholder",void 0),G([e.Input()],t.prototype,"value",void 0),G([e.Output()],t.prototype,"valueChange",void 0),G([e.Input()],t.prototype,"format",void 0),G([e.Output()],t.prototype,"leave",void 0),G([e.Output()],t.prototype,"enterPress",void 0),G([e.Input()],t.prototype,"rows",void 0),G([e.Input()],t.prototype,"width",void 0),G([e.Input()],t.prototype,"options",void 0),G([e.Input()],t.prototype,"optionValue",void 0),G([e.Input()],t.prototype,"optionDisplay",void 0),G([e.Input()],t.prototype,"required",void 0),G([e.Input()],t.prototype,"min",void 0),G([e.Input()],t.prototype,"max",void 0),G([e.Input()],t.prototype,"regex",void 0),t=G([e.Component({selector:"spa-text",template:'<mat-form-field *ngIf="rows == \'\' && options.length==0" hideRequiredMarker="true" [hintLabel]="hint" style="padding-right: 20px;" [ngStyle]="{\'width\':width}" >\r\n<mat-label *ngIf="format==\'text\'">{{display}}</mat-label>\r\n<mat-label *ngIf="format==\'date\'">{{display | date:\'dd/MM/yyyy\'}}</mat-label>\r\n\x3c!-- <mat-label *ngIf="format==\'datetime\'">{{display | date:\'dd/MM/yyyy HH:mm\'}}</mat-label> --\x3e\r\n<input matInput autocomplete="off" [(ngModel)]="value" (change)="changed()" (blur)="leaved()" (keyup.enter)="enterPressed()" [placeholder]="placeholder" [formControl]="control" [required]="required" [readonly]="readonly"/>\r\n<mat-error *ngIf="control.invalid">{{validate()}}</mat-error>\r\n</mat-form-field>\r\n\r\n\r\n\x3c!-- TextArea copy - Only change input to textarea and change ngif to not --\x3e\r\n\r\n<mat-form-field *ngIf="rows != \'\' && options.length==0" hideRequiredMarker="true" [hintLabel]="hint" style="padding-right: 20px;" [ngStyle]="{\'width\':width}">\r\n<mat-label>{{display}}</mat-label>\r\n<textarea matInput autocomplete="off" [rows]="rows" [(ngModel)]="value" (change)="changed()" (keyup.enter)="enterPressed()" [placeholder]="placeholder" [formControl]="control" [required]="required" [readonly]="readonly"></textarea>\r\n<mat-error *ngIf="control.invalid">{{validate()}}</mat-error>\r\n</mat-form-field>\r\n\r\n\r\n\r\n\x3c!-- Work in progress cant bind to value --\x3e\r\n\r\n \x3c!-- <mat-form-field *ngIf="options.length !=0" hideRequiredMarker="true" [hintLabel]="hint" style="padding-right: 20px;" [ngStyle]="{\'width\':width}">\r\n <input type="text" autocomplete="off" [placeholder]="display" (change)="changed2()" matInput [formControl]="myControl" [matAutocomplete]="auto" [readonly]="readonly">\r\n <mat-autocomplete #auto="matAutocomplete">\r\n <mat-option *ngFor="let row of filteredOptions | async" [value]="row[optionValue]">\r\n {{row[optionDisplay]}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n</mat-form-field> --\x3e\r\n\r\n',styles:[""]})],t)}(),Ot=function(){function t(t,e){this.httpService=t,this.data=e,this.isProcessing=!1,this.fileNames=new Array,this.currIndex=0,this.currentFileUrl="",this.imageDoc=!1}return t.prototype.ngOnInit=function(){this.fileNames=this.data.fileNames,this.path=this.data.path,this.fileName=this.data.fileName,this.currIndex=this.data.fileNames.indexOf(this.fileName),this.setURL()},t.prototype.previous=function(){0!=this.fileNames.length&&(this.currIndex-1>=0?this.currIndex=this.currIndex-1:0==this.currIndex&&(this.currIndex=this.fileNames.length-1),this.setURL())},t.prototype.next=function(){0!=this.fileNames.length&&(this.currIndex+1<this.fileNames.length?this.currIndex=this.currIndex+1:this.currIndex+1>this.fileNames.length-1&&(this.currIndex=0),this.setURL())},t.prototype.setURL=function(){this.currentFileUrl=""+this.httpService.apiUrl.replace("/api/","/")+this.path.replace("//","/")+"/"+this.fileNames[this.currIndex],this.currentFileUrl.toLocaleLowerCase().endsWith(".pdf")||this.currentFileUrl.toLocaleLowerCase().endsWith(".jpg")||this.currentFileUrl.toLocaleLowerCase().endsWith(".jpeg")?this.imageDoc=!0:(this.imageDoc=!1,window.open(this.currentFileUrl,"_blank"))},t.prototype.change=function(t){this.currIndex=this.fileNames.indexOf(t),this.setURL()},t.ctorParameters=function(){return[{type:l.HttpService},{type:void 0,decorators:[{type:e.Inject,args:[r.MAT_DIALOG_DATA]}]}]},t=G([e.Component({selector:"app-editRequest",template:'\r\n\r\n<mat-dialog-content class="mat-typography">\r\n\r\n <div class="row">\r\n\r\n <div class="col">\r\n <ngx-doc-viewer *ngIf="imageDoc"\r\n [url]="currentFileUrl"\r\n viewer="url"\r\n style="width:100%;height:60vh;">\r\n </ngx-doc-viewer>\r\n\r\n <div *ngIf="!imageDoc" class="d-flex justify-content-center row align-items-center" style="height:60vh;">\r\n\r\n This file type will be downloaded\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n <div class="col-3">\r\n <spa-chips [chips]="fileNames" display="Documents" icon="description" (click)="change($event)"></spa-chips>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n<button mat-button [disabled]="currIndex == 0" (click)="previous()" cdkFocusInitial>Previous</button>\r\n<button mat-button [disabled]="currIndex+1 == fileNames.length" (click)="next()" cdkFocusInitial>Next</button>\r\n<button mat-button mat-dialog-close>Cancel</button>\r\n</mat-dialog-actions>\r\n\r\n\r\n\r\n',styles:[".truncate-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.align-end{justify-content:flex-end}.fx-spacer{flex:1 1 auto}"]}),V(1,e.Inject(r.MAT_DIALOG_DATA))],t)}(),Ft=function(){function t(t){this.dialog=t,this.dir="",this.folderName="",this.fileNames=new Array,this.removable=!1,this.remove=new e.EventEmitter,this.display="Documents",this.title="Documents"}return t.prototype.ngOnInit=function(){},t.prototype.viewDocs=function(t){if("string"==typeof t)this.dialog.open(Ot,{minWidth:"1500px",maxWidth:"80vw",data:{fileNames:this.fileNames,fileName:t,path:this.dir+"/"+this.folderName}})},t.prototype.removed=function(t){this.remove.emit(t)},t.ctorParameters=function(){return[{type:r.MatDialog}]},G([e.Input()],t.prototype,"dir",void 0),G([e.Input()],t.prototype,"folderName",void 0),G([e.Input()],t.prototype,"fileNames",void 0),G([e.Input()],t.prototype,"removable",void 0),G([e.Output()],t.prototype,"remove",void 0),G([e.Input()],t.prototype,"display",void 0),G([e.Input()],t.prototype,"title",void 0),t=G([e.Component({selector:"spa-viewer",template:'<div class="tin-input-row mt-3" *ngIf="title != \'\'">\r\n <mat-label style="font-size: 20px; font-weight: 300" > {{title}}</mat-label >\r\n</div>\r\n\r\n<spa-chips [chips]="fileNames" [title]="title" [removable]="removable" icon="description" (click)="viewDocs($event)" (remove)="removed($event)"></spa-chips>\r\n\r\n\r\n\r\n<div *ngIf="!fileNames" class="d-flex justify-content-center row align-items-center" style="max-height:200px">\r\n\r\n No {{title.toLowerCase()}}\r\n\r\n</div>\r\n',styles:[".truncate-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.align-end{justify-content:flex-end}.fx-spacer{flex:1 1 auto}"]})],t)}(),jt=function(){function t(){this.width="100%",this.readonly=!1,this.readonlyMode="",this.hint="",this.display="",this.value="",this.optionValue="",this.optionDisplay="",this.optionDisplayExtra="",this.valueChange=new e.EventEmitter}return t.prototype.ngOnInit=function(){},t.prototype.ngOnChanges=function(){var t=this;""!=this.readonlyMode&&this.options.length>0&&(this.displayValue=this.options.filter((function(e){return e[""+t.optionValue]==t.value}))[0][""+this.optionDisplay])},t.prototype.changed=function(){this.valueChange.emit(this.value)},t.prototype.selectChanged=function(){},G([e.Input()],t.prototype,"width",void 0),G([e.Input()],t.prototype,"readonly",void 0),G([e.Input()],t.prototype,"readonlyMode",void 0),G([e.Input()],t.prototype,"hint",void 0),G([e.Input()],t.prototype,"display",void 0),G([e.Input()],t.prototype,"value",void 0),G([e.Input()],t.prototype,"options",void 0),G([e.Input()],t.prototype,"optionValue",void 0),G([e.Input()],t.prototype,"optionDisplay",void 0),G([e.Input()],t.prototype,"optionDisplayExtra",void 0),G([e.Output()],t.prototype,"valueChange",void 0),t=G([e.Component({selector:"spa-select",template:'\r\n\r\n\r\n<mat-form-field *ngIf="readonlyMode==\'\'" style="padding-right: 20px;" [ngStyle]="{\'width\':width}">\r\n <mat-label>{{display}}</mat-label>\r\n <mat-select [(value)]="value" (selectionChange)="changed()" [disabled]="readonly">\r\n <mat-option *ngFor="let row of options" [value]="row[optionValue]">\r\n {{row[optionDisplay]}} <label *ngIf="optionDisplayExtra!=\'\' && row[optionDisplayExtra] && row[optionDisplayExtra] != \'\'">({{row[optionDisplayExtra]}})</label>\r\n </mat-option>\r\n </mat-select>\r\n <mat-hint *ngIf="hint!=\'\'">{{hint}}</mat-hint>\r\n</mat-form-field>\r\n\r\n\x3c!-- ReadOnlyModes original, text, label --\x3e\r\n\x3c!-- <spa-text *ngIf="readonlyMode==\'text\' && readonly" [display]="display" [(value)]="displayValue" [readonly]="true" ></spa-text> --\x3e\r\n',styles:[""]})],t)}(),zt=function(){function t(){this.readonly=!1,this.display="",this.value=!1,this.valueChange=new e.EventEmitter,this.click=new e.EventEmitter,this.check=new e.EventEmitter,this.uncheck=new e.EventEmitter}return t.prototype.ngOnInit=function(){},t.prototype.changed=function(){this.valueChange.emit(this.value)},t.prototype.clicked=function(){this.click.emit(),this.value?this.unchecked():this.checked()},t.prototype.checked=function(){this.check.emit()},t.prototype.unchecked=function(){this.uncheck.emit()},G([e.Input()],t.prototype,"readonly",void 0),G([e.Input()],t.prototype,"display",void 0),G([e.Input()],t.prototype,"value",void 0),G([e.Output()],t.prototype,"valueChange",void 0),G([e.Output()],t.prototype,"click",void 0),G([e.Output()],t.prototype,"check",void 0),G([e.Output()],t.prototype,"uncheck",void 0),t=G([e.Component({selector:"spa-check",template:' <mat-checkbox color="primary" style="margin-right:50px; font-size:14px" [(ngModel)]="value" (change)="changed()" (click)="clicked()" [disabled]="readonly">{{display}}</mat-checkbox>\r\n',styles:[""]})],t)}(),_t=function(){function t(){this.message="Drag and drop files here",this.files=[],this.filesChange=new e.EventEmitter,this.upload=new e.EventEmitter,this.enableUpload=!1}return t.prototype.ngOnInit=function(){},t.prototype.onFileDropped=function(t){this.prepareFilesList(t)},t.prototype.fileBrowseHandler=function(t){this.prepareFilesList(t)},t.prototype.deleteFile=function(t){this.files.splice(t,1)},t.prototype.prepareFilesList=function(t){var e,n;try{for(var r=$(t),o=r.next();!o.done;o=r.next()){var i=o.value;i.progress=0,this.files.push(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.formatBytes=function(t,e){if(0===t)return"0 Bytes";var n=e<=0?0:e||2,r=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,r)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]},t.prototype.uploaded=function(){this.upload.emit()},t.prototype.filesChanged=function(){this.filesChange.emit(this.files)},G([e.Input()],t.prototype,"message",void 0),G([e.Input()],t.prototype,"files",void 0),G([e.Output()],t.prototype,"filesChange",void 0),G([e.Output()],t.prototype,"upload",void 0),G([e.Input()],t.prototype,"enableUpload",void 0),t=G([e.Component({selector:"spa-attach",template:'<div class="tin-input-row" style="width: 100%;">\r\n\r\n <div class="col">\r\n <div class="container" appDnd (fileDropped)="onFileDropped($event)">\r\n <input type="file" #fileDropRef id="fileDropRef" multiple (change)="fileBrowseHandler($event.target.files)" />\r\n <h4>{{message}}</h4>\r\n <h4>or</h4>\r\n <label for="fileDropRef">Click to Browse</label>\r\n </div>\r\n </div>\r\n\r\n <div class="col">\r\n <div class="files-list ">\r\n <div class="single-file " style="width: 100%;" *ngFor="let file of files; let i = index">\r\n\r\n <div class="tin-input-row info" >\r\n <h4 class="name">\r\n {{ file?.name }}\r\n </h4>\r\n <p class="size">\r\n {{ formatBytes(file?.size, 2) }}\r\n </p>\r\n </div>\r\n\r\n <div class="delete" (click)="deleteFile(i)">\r\n <svg xmlns="http://www.w3.org/2000/svg" width="14" height="18" viewBox="0 0 14 18">\r\n <path fill="#B1B1B1" fill-rule="nonzero"\r\n d="M1 16c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v10zm3.17-7.83a.996.996 0 0 1 1.41 0L7 9.59l1.42-1.42a.996.996 0 1 1 1.41 1.41L8.41 11l1.42 1.42a.996.996 0 1 1-1.41 1.41L7 12.41l-1.42 1.42a.996.996 0 1 1-1.41-1.41L5.59 11 4.17 9.58a.996.996 0 0 1 0-1.41zM10.5 1L9.79.29C9.61.11 9.35 0 9.09 0H4.91c-.26 0-.52.11-.7.29L3.5 1H1c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1h-2.5z" />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf="files.length > 0 && enableUpload" class="tin-input-row d-flex justify-content-center" style="width: 100%;" >\r\n <button mat-button color="primary" (click)="uploaded()" matTooltip="Upload New Documents" matTooltipPosition="above" ><mat-icon>file_upload</mat-icon> Upload</button>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n',styles:[".container{width:100%;height:200px;padding:2rem;text-align:center;border:2px dashed #2a7b94;position:relative;margin:0 auto}.container input{opacity:0;position:absolute;z-index:2;width:100%;height:100%;top:0;left:0}.container label{color:#fff;width:183px;height:44px;border-radius:21.5px;background-color:#db202f;padding:8px 16px}.container h3{font-size:20px;font-weight:600;color:#38424c}.fileover{-webkit-animation:1s infinite shake;animation:1s infinite shake}.files-list{margin-top:1.5rem}.files-list .single-file{display:flex;padding:.5rem;justify-content:space-between;align-items:center;border:1px dashed #1c824d;margin-bottom:1rem;margin-right:1rem;display:flex;flex-grow:1}.files-list .single-file .delete{display:flex;margin-left:.5rem;cursor:pointer;align-self:flex-end}.files-list .single-file .name{font-size:14px;font-weight:500;color:#353f4a;margin:0}.files-list .single-file .size{font-size:12px;font-weight:500;color:#a4a4a4;margin:0 0 0 1rem}.files-list .single-file .info{width:100%}@-webkit-keyframes shake{0%{transform:translate(1px,1px) rotate(0)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px,0) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0)}100%{transform:translate(1px,-2px) rotate(-1deg)}}@keyframes shake{0%{transform:translate(1px,1px) rotate(0)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px,0) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0)}100%{transform:translate(1px,-2px) rotate(-1deg)}}"]})],t)}(),qt=function(){function t(){this.display="",this.value="",this.valueChange=new e.EventEmitter,this.readonly=!1,this.min="01 jan 1900",this.max="31 dec 9999"}return t.prototype.ngOnInit=function(){},t.prototype.changed=function(){this.valueChange.emit(this.value)},G([e.Input()],t.prototype,"display",void 0),G([e.Input()],t.prototype,"value",void 0),G([e.Output()],t.prototype,"valueChange",void 0),G([e.Input()],t.prototype,"readonly",void 0),G([e.Input()],t.prototype,"min",void 0),G([e.Input()],t.prototype,"max",void 0),t=G([e.Component({selector:"spa-datetime",template:'<mat-form-field style="width:150px;margin-right:20px">\r\n<mat-label>{{display}}</mat-label>\r\n<input matInput autocomplete="off" type="datetime-local" [(ngModel)]="value" [min]="min" [max]="max" (change)="changed()" [placeholder]="display" [readonly]="readonly" />\r\n</mat-form-field>\r\n',styles:[""]})],t)}(),Ht=function(){function t(){this.readonly=!1,this.display="",this.value="",this.valueChange=new e.EventEmitter,this.width="100%",this.hint="",this.currency="$"}return t.prototype.ngOnInit=function(){},t.prototype.ngOnChanges=function(){},t.prototype.changed=function(){this.valueChange.emit(this.value)},G([e.Input()],t.prototype,"readonly",void 0),G([e.Input()],t.prototype,"display",void 0),G([e.Input()],t.prototype,"value",void 0),G([e.Output()],t.prototype,"valueChange",void 0),G([e.Input()],t.prototype,"width",void 0),G([e.Input()],t.prototype,"hint",void 0),G([e.Input()],t.prototype,"currency",void 0),t=G([e.Component({selector:"spa-money",template:'\r\n<div class="tin-input-row">\r\n\r\n<Label>{{currency}}</Label>\r\n<mat-form-field [hintLabel]="hint" style="padding-right: 20px;" [ngStyle]="{\'width\':width}" >\r\n <mat-label>{{display}}</mat-label>\r\n \x3c!-- <span>$</span> --\x3e\r\n <input matInput class="example-right-align" autocomplete="off" type="number" min="0.00" step="0.01" [(ngModel)]="value " [placeholder]="display" (change)="changed()" [readonly]="readonly" />\r\n\x3c!-- <span matTextSuffix>.00</span> --\x3e\r\n</mat-form-field>\r\n</div>\r\n\r\n\r\n\r\n\r\n',styles:["input.example-right-align{-moz-appearance:textfield}.example-right-align{text-align:right}input.example-right-align::-webkit-inner-spin-button,input.example-right-align::-webkit-outer-spin-button{display:none}.curr{background-color:red}"]})],t)}(),Bt=function(){function t(){this.fileDropped=new e.EventEmitter}return t.prototype.onDragOver=function(t){t.preventDefault(),t.stopPropagation(),this.fileOver=!0},t.prototype.onDragLeave=function(t){t.preventDefault(),t.stopPropagation(),this.fileOver=!1},t.prototype.ondrop=function(t){t.preventDefault(),t.stopPropagation(),this.fileOver=!1;var e=t.dataTransfer.files;e.length>0&&this.fileDropped.emit(e)},G([e.HostBinding("class.fileover")],t.prototype,"fileOver",void 0),G([e.Output()],t.prototype,"fileDropped",void 0),G([e.HostListener("dragover",["$event"])],t.prototype,"onDragOver",null),G([e.HostListener("dragleave",["$event"])],t.prototype,"onDragLeave",null),G([e.HostListener("drop",["$event"])],t.prototype,"ondrop",null),t=G([e.Directive({selector:"[appDnd]"})],t)}(),Gt=function(){function t(t){this.messageService=t,this.icon="",this.removable=!1,this.addable=!1,this.click=new e.EventEmitter,this.remove=new e.EventEmitter}return t.prototype.ngOnInit=function(){},t.prototype.clicked=function(t){console.log("Clicked chip: "+t),"string"==typeof t&&t&&this.click.emit(t)},t.prototype.removed=function(t){var e=this;this.messageService.confirm("Remove "+t+" ?").subscribe((function(n){"yes"==n&&e.remove.emit(t)}))},t.ctorParameters=function(){return[{type:X}]},G([e.Input()],t.prototype,"icon",void 0),G([e.Input()],t.prototype,"removable",void 0),G([e.Input()],t.prototype,"addable",void 0),G([e.Input()],t.prototype,"chips",void 0),G([e.Output()],t.prototype,"click",void 0),G([e.Output()],t.prototype,"remove",void 0),t=G([e.Component({selector:"spa-chips",template:'\r\n\r\n\r\n<div class="row mt-1" style="margin-left: 1em;">\r\n <mat-chip-list #chipList >\r\n <mat-chip *ngFor="let chip of chips let i = index" selectable [removable]="removable" style="font-size: 12px;" [ngStyle]="{\'padding-right\': removable ? \'5px\':\'12px\'}" (click)="clicked(chip)" >\r\n <mat-icon *ngIf="icon != \'\'" color="primary" style="font-size: 22px;">{{icon}}</mat-icon>\r\n\r\n {{chip}}\r\n\r\n <mat-icon *ngIf="removable" style="font-size: 20px; margin-left: 5px;margin-top: 3px;margin-right: 0px; color: grey;" (click)="removed(chip)">cancel</mat-icon>\r\n </mat-chip>\r\n </mat-chip-list>\r\n</div>\r\n\r\n\r\n',styles:[""]})],t)}(),Vt=function(){function t(){this.notes=new Array,this.notesMessage="Empty",this.title="Notes"}return t.prototype.ngOnInit=function(){},G([e.Input()],t.prototype,"notes",void 0),G([e.Input()],t.prototype,"title",void 0),t=G([e.Component({selector:"spa-activity",template:'\r\n <div class="tin-input-row mt-3" *ngIf="title != \'\'">\r\n <mat-label style="font-size: 20px; font-weight: 300" > {{title}}</mat-label >\r\n </div>\r\n\r\n <ul *ngIf="notes && notes.length>0" class="list-group list-group-flush" style="max-height:350px; margin-left:5px">\r\n\r\n <li *ngFor="let note of notes" class="list-group-item list-group-item-action flex-column align-items-start">\r\n <div class="d-flex w-100 justify-content-between">\r\n <div class="mb-0">{{note.createdByName}}</div>\r\n \x3c!-- <small class="text-muted">{{note.expr1}} ago</small> --\x3e\r\n </div>\r\n\r\n <small>{{note.details}} (<em>{{note.createdDate | date: \'dd MMM yyyy HH:mm\'}}</em>) </small>\r\n </li>\r\n\r\n\r\n </ul>\r\n\r\n <div *ngIf="notes && notes.length==0" class="d-flex justify-content-center row align-items-center" style="max-height:200px">\r\n\r\n No {{title.toLowerCase()}}\r\n\r\n </div>\r\n',styles:[""]})],t)}(),Wt=function(){function t(){this.value="",this.valueChange=new e.EventEmitter,this.readonly=!1,this.config={editable:!0,spellcheck:!0,height:"auto",minHeight:"5rem",placeholder:"Enter text here...",translate:"no",defaultParagraphSeparator:"",defaultFontName:"Arial",toolbarHiddenButtons:[["bold","italic","underline","strikeThrough","subscript","superscript","justifyLeft","justifyCenter","justifyRight","justifyFull","indent","outdent","insertUnorderedList","insertOrderedList","heading","fontName"],["fontSize","textColor","backgroundColor","customClasses","link","unlink","insertImage","insertVideo","insertHorizontalRule","removeFormat","toggleEditorMode"]],customClasses:[{name:"quote",class:"quote"},{name:"redText",class:"redText"},{name:"titleText",class:"titleText",tag:"h1"}]}}return t.prototype.ngOnInit=function(){},t.prototype.changed=function(){this.valueChange.emit(this.value)},t.prototype.ngOnChanges=function(){this.config.editable=!this.readonly},G([e.Input()],t.prototype,"value",void 0),G([e.Output()],t.prototype,"valueChange",void 0),G([e.Input()],t.prototype,"readonly",void 0),G([e.Input()],t.prototype,"config",void 0),t=G([e.Component({selector:"spa-html",template:'<angular-editor [(ngModel)]="value" [config]="config" (ngModelChange)="changed()" ></angular-editor>\r\n',styles:[""]})],t)}(),Zt=function(){function t(){this.optionValue="",this.optionDisplay="",this.readonly=!1,this.value="",this.display="",this.show=!1,this.valueChange=new e.EventEmitter,this.enterPress=new e.EventEmitter}return t.prototype.ngOnInit=function(){},t.prototype.changed=function(){this.valueChange.emit(this.value)},t.prototype.enterPressed=function(){this.valueChange.emit()},t.prototype.resetValue=function(){this.value="",this.changed()},G([e.Input()],t.prototype,"options",void 0),G([e.Input()],t.prototype,"optionValue",void 0),G([e.Input()],t.prototype,"optionDisplay",void 0),G([e.Input()],t.prototype,"readonly",void 0),G([e.Input()],t.prototype,"value",void 0),G([e.Input()],t.prototype,"display",void 0),G([e.Input()],t.prototype,"show",void 0),G([e.Output()],t.prototype,"valueChange",void 0),G([e.Output()],t.prototype,"enterPress",void 0),t=G([e.Component({selector:"spa-option",template:'\r\n<mat-checkbox color="primary" style="margin-right:5px" [(ngModel)]="show" (change)="resetValue()" labelPosition="after">{{display}}</mat-checkbox>\r\n\r\n<mat-form-field style="margin-right:10px;width: 0px;" >\r\n<input matInput />\r\n</mat-form-field>\r\n\r\n<mat-form-field style="margin-right:30px" *ngIf="show && !options">\r\n<input matInput [(ngModel)]="value" width="100" (change)="changed()" (keyup.enter)="changed()" [placeholder]="\'Enter \' + display" autocomplete="off" />\r\n</mat-form-field>\r\n\r\n\r\n<mat-form-field style="margin-right: 20px;" width="100" *ngIf="show && options">\r\n <mat-label>{{display}}</mat-label>\r\n <mat-select [(value)]="value" (selectionChange)="changed()" [disabled]="readonly" >\r\n <mat-option *ngFor="let row of options" [value]="row[optionValue]">\r\n {{row[optionDisplay]}}\r\n </mat-option>\r\n </mat-select>\r\n</mat-form-field>\r\n\r\n\x3c!-- <spa-text *ngIf="show" style="margin-right:30px" [display]="\'Enter \' + display" (enterPress)="enterPressed()" (valueChange)="changed($event.target.value)" width="100" [required]="false" [(value)]="value" ></spa-text> --\x3e\r\n\r\n',styles:[""]})],t)}(),$t=function(){function t(){this.display="",this.value="",this.format="text"}return t.prototype.ngOnInit=function(){},G([e.Input()],t.prototype,"display",void 0),G([e.Input()],t.prototype,"value",void 0),G([e.Input()],t.prototype,"format",void 0),t=G([e.Component({selector:"spa-label",template:"<div *ngIf=\"format=='text'\">\r\n <label style=\"font-weight: 500\" >{{display}}: </label> <label>{{value}} </label> \r\n</div>\r\n\r\n<div *ngIf=\"format=='date'\">\r\n <label style=\"font-weight: 500\" >{{display}}: </label> <label>{{value | date:'dd/MM/yyyy'}} </label> \r\n</div>\r\n\r\n<div *ngIf=\"format=='datetime'\">\r\n <label style=\"font-weight: 500\" >{{display}}: </label> <label>{{value | date:'dd/MM/yyyy HH:mm'}} </label> \r\n</div>\r\n\r\n<div *ngIf=\"format=='money'\">\r\n <label style=\"font-weight: 500\" >{{display}}: </label> <label>{{value | currency:'USD':''}} </label> \r\n</div>\r\n",styles:[""]})],t)}(),Jt={displayDefaultIndicatorType:!1},Yt=function(){function t(){this.value=""}return t.prototype.ngOnInit=function(){},t.prototype.ngAfterViewInit=function(){},t.prototype.ngOnChanges=function(){this.pushSteps()},t.prototype.setStepper=function(){if(""!=this.value)switch(this.stepper.selectedIndex=0,this.value){case"Draft":this.stepper.selectedIndex=0;break;case"Head Approval":this.pushStepper(1);break;case"CE Approval":this.pushStepper(2);break;case"Booking":this.pushStepper(3);break;case"BTA Approval":this.pushStepper(4);break;case"Travel":this.pushStepper(5);break;case"BTR Approval":this.pushStepper(6);break;case"Travel Closure":this.pushStepper(7)}},t.prototype.pushStepper=function(t){for(var e=0;e<t+1;e++)this.stepper.selectedIndex=e},t.prototype.pushSteps=function(){var t,e;if(0!=this.steps.length&&""!=this.value){this.stepper.selectedIndex=0;var n=0;try{for(var r=$(this.steps),o=r.next();!o.done;o=r.next()){if(o.value.name==this.value){this.stepper.selectedIndex=n;break}this.stepper.selectedIndex=n,n++}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}}},G([e.ViewChild("stepper")],t.prototype,"stepper",void 0),G([e.Input()],t.prototype,"value",void 0),G([e.Input()],t.prototype,"steps",void 0),t=G([e.Component({selector:"spa-steps",template:'\r\n\r\n\r\n\x3c!-- <mat-horizontal-stepper class="test" labelPosition="bottom" #stepper>\r\n <mat-step [editable]="false" label="Draft"> </mat-step>\r\n <mat-step [editable]="false" label="Head Approval" > </mat-step>\r\n <mat-step [editable]="false" label="CE Approval"> </mat-step>\r\n <mat-step [editable]="false" label="Booking" state="booking"> </mat-step>\r\n <mat-step [editable]="false" label="BTA Approval"> </mat-step>\r\n <mat-step [editable]="false" label="Travel"> </mat-step>\r\n <mat-step [editable]="false" label="BTR Approval"> </mat-step>\r\n <mat-step [editable]="false" label="Closure"> </mat-step>\r\n <ng-template matStepperIcon="booking"> <mat-icon>forum</mat-icon> </ng-template>\r\n</mat-horizontal-stepper> --\x3e\r\n\r\n<mat-horizontal-stepper class="transparent" labelPosition="bottom" #stepper>\r\n\r\n <mat-step *ngFor="let row of steps"\r\n [editable]="false" [label]="row.name">\r\n </mat-step>\r\n\r\n \x3c!-- <ng-template *ngFor="let row of steps"\r\n [matStepperIcon]="row.name"> <mat-icon>{{row.icon}}</mat-icon>\r\n </ng-template> --\x3e\r\n\r\n \x3c!-- <ng-template matStepperIcon="booking">\r\n <mat-icon>call_end</mat-icon>\r\n </ng-template> --\x3e\r\n\r\n \x3c!-- <ng-template ngFor let-xb [ngForOf]="steps" matStepperIcon="Booking"> <mat-icon>forum</mat-icon>\r\n\r\n </ng-template> --\x3e\r\n\r\n</mat-horizontal-stepper>\r\n',providers:[{provide:q.STEPPER_GLOBAL_OPTIONS,useValue:Jt}],styles:[".transparent{background-color:rgba(0,0,0,0)}:host ::ng-deep.mat-step-header{padding:5px!important}:host ::ng-deep.mat-stepper-horizontal-line{min-width:5px!important}:host ::ng-deep .mat-horizontal-content-container{padding:0!important}:host ::ng-deep .mat-horizontal-stepper-header{pointer-events:none!important}"]})],t)}(),Kt=function(){function t(){}return t=G([e.NgModule({declarations:[Bt,Tt,Q,Et,kt,At,Lt,Rt,Ut,Nt,Ft,jt,zt,_t,qt,Ht,Gt,Vt,Ot,Wt,Zt,$t,Yt],entryComponents:[Q],imports:[U.ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl:"never"}),p.CommonModule,U.FormsModule,U.ReactiveFormsModule,Dt,F.MomentModule,j.NgxDocViewerModule,_.AngularEditorModule,O.NgIdleKeepaliveModule.forRoot()],exports:[p.CommonModule,U.FormsModule,Dt,Tt,Q,Et,kt,At,Lt,Rt,Ut,Ft,jt,Nt,qt,zt,_t,Ht,Gt,Vt,Wt,Zt,$t,Yt],providers:[{provide:N.HTTP_INTERCEPTORS,useClass:Pt,multi:!0},{provide:p.LocationStrategy,useClass:p.HashLocationStrategy}]})],t)}(),Qt=function(){function t(t,e,n,r,o,i,a){this.httpService=t,this.storageService=e,this.router=n,this.messageService=r,this.dataService=o,this.authService=i,this.logService=a,this.user=new yt,this.hide=!0,this.isProcessing=!1,this.appConfig=new ht}return t.prototype.ngOnInit=function(){this.authService.updateloggedin(!1),this.authService.updateRole(null),this.storageService.clear()},t.prototype.signup=function(){this.router.navigate(["signup"])},t.prototype.recoverAccount=function(){this.router.navigate(["recover-account"])},t.prototype.login=function(){var t=this;""!=this.user.userID&&""!=this.user.password?(this.logService.info("logging in"),this.isProcessing=!0,this.dataService.login(this.user).subscribe((function(e){if(t.isProcessing=!1,"success"==e.message){if("local"==e.ds.dtUser[0].authType&&!t.appConfig.localAuth)return void t.messageService.toast("Contact Admin: Authentication Type error");if("AD"==e.ds.dtUser[0].authType&&!t.appConfig.ADAuth)return void t.messageService.toast("Contact Admin: Authentication Type error");t.authService.updateloggedin(!0),t.authService.updateToken(e.ds.dtUser[0].token),t.storageService.store(l.Constants.AUTH_TOKEN,e.ds.dtUser[0].token),t.authService.updateTokenExpire(e.ds.dtUser[0].tokenExpire),t.storageService.store(l.Constants.AUTH_TOKEN_EXPIRE,e.ds.dtUser[0].tokenExpire),t.authService.updateCurrentUser(t.user.userID),t.storageService.store(l.Constants.AUTH_USER,t.user.userID),t.authService.updateLoggedUserFullName(e.ds.dtProfile[0].firstName),t.storageService.store(l.Constants.AUTH_NAME,e.ds.dtProfile[0].firstName),t.authService.updateRole(e.ds.dtRole[0]),t.storageService.store(l.Constants.AUTH_ROLES,JSON.stringify(e.ds.dtRole[0])),"0"==e.ds.dtUser[0].changePassword?(t.router.navigate(["home"]),t.logService.info("logged in")):t.router.navigate(["home/user/change-password"])}else t.messageService.toast("Error: "+e.message),t.user.password=""}),(function(e){t.isProcessing=!1,t.messageService.toast(t.httpService.Error(e))}))):this.messageService.toast("Please enter your credentials")},t.prototype.setRole=function(t){var e=this;this.dataService.GetRole("id",t).subscribe((function(t){e.authService.updateRole(t.dt[0]),e.storageService.store(l.Constants.AUTH_ROLES,JSON.stringify(t.dt[0]))}))},t.ctorParameters=function(){return[{type:l.HttpService},{type:K},{type:c.Router},{type:X},{type:St},{type:It},{type:wt}]},G([e.Input()],t.prototype,"config",void 0),G([e.Input()],t.prototype,"appConfig",void 0),t=G([e.Component({selector:"spa-login",template:'\r\n <div class="tin-bg-login login-page">\r\n\r\n\r\n <div *ngIf="config.logo!=\'\'" class="d-flex justify-content-center row align-items-center" style="margin-top:3em;margin-bottom:1em">\r\n\r\n <img *ngIf="config.logoSize==\'normal\'" [src]="config.logo" style="height:100px;margin-right:3em;margin-left:3em" />\r\n <img *ngIf="config.logoSize==\'medium\'" [src]="config.logo" style="height:150px;margin-right:3em;margin-left:3em" />\r\n <img *ngIf="config.logoSize==\'large\'" [src]="config.logo" style="height:250px;margin-right:3em;margin-left:3em" />\r\n\r\n </div>\r\n\r\n\r\n <div *ngIf="config.logo ==\'\'" style="margin-top:2em">\r\n \x3c!-- Add margin top when there is no logo --\x3e\r\n </div>\r\n\r\n\r\n <div class="d-flex justify-content-center row align-items-center" style="margin-top:3em">\r\n\r\n\r\n <div class="d-none d-sm-block">\r\n\r\n </div>\r\n\r\n <div style="margin-left:1em">\r\n\r\n\r\n\r\n <mat-card class="mat-elevation-z3" style="width:400px; ">\r\n\r\n <mat-card-header>\r\n <mat-card-title>{{config.appName}}</mat-card-title>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n\r\n\r\n <div class="tin-input mt-2">\r\n\r\n <mat-form-field style="width: 100%;">\r\n <mat-label>Username</mat-label>\r\n <input id="txtUserID" matInput #parentInput placeholder="Enter Username" [(ngModel)]="user.userID" autocomplete="off" autofocus>\r\n </mat-form-field>\r\n\r\n <mat-form-field >\r\n <mat-label>Password</mat-label>\r\n <input id="txtPassword" matInput [type]="hide ? \'password\' : \'text\'" (keyup.enter)="login()" [(ngModel)]="user.password" autocomplete="off" >\r\n <button mat-icon-button matSuffix (click)="hide = !hide" [attr.aria-label]="\'Hide password\'" [attr.aria-pressed]="hide">\r\n <mat-icon style="font-size: 18px;">{{hide ? \'visibility_off\' : \'visibility\'}}</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n\r\n </div>\r\n\r\n </mat-card-content>\r\n\r\n\r\n <mat-card-actions>\r\n\r\n <div class="row ">\r\n\r\n <div class="col d-flex justify-content-center">\r\n\r\n <button id="btnLogin" mat-raised-button [disabled]="isProcessing" style="width: 100px;" (click)="login()" color="primary">Login</button>\r\n </div>\r\n\r\n <div class="col d-flex justify-content-center" *ngIf="config.selfService">\r\n <button id="btnSignup" mat-stroked-button color="primary" style="width: 100px;" (click)="signup()">Signup</button>\r\n </div>\r\n\r\n </div>\r\n\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n <div *ngIf="config.selfService">\r\n <br />\r\n <a mat-button id="lnkRecover" style="margin-left: 1em" (click)="recoverAccount()">Forgot your password ?</a>\r\n </div>\r\n\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n\r\n',styles:[".login-page{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto}.tin-bg-login{background-image:url(~/assets/login-bg.jpg);background-size:100%}"]})],t)}(),Xt=function(){function t(t,e,n,r){this.httpService=t,this.messageService=e,this.dataService=n,this.authService=r,this.isProcessing=!1,this.user=new yt,this.profile=new xt,this.account=new vt}return t.prototype.ngOnInit=function(){this.account.user=this.user,this.account.profile=this.profile},t.prototype.create=function(){var t=this;this.profile.userID=this.user.userID,this.isProcessing=!0,this.dataService.UpdateAccount(this.account,"add").subscribe((function(e){t.isProcessing=!1,"success"==e.message?(t.messageService.toast("Account Created"),t.user=new yt,t.profile=new xt):t.messageService.toast("Error: "+e.message)}),(function(e){t.isProcessing=!1,t.messageService.toast(t.httpService.Error(e))}))},t.ctorParameters=function(){return[{type:l.HttpService},{type:X},{type:St},{type:It}]},t=G([e.Component({selector:"spa-signup",template:'\r\n<h4 style="margin-top: 1em;">Signup</h4>\r\n\r\n<hr/>\r\nComplete the form below.\r\n\r\n<div class="d-flex justify-content-center row align-items-center">\r\n\r\n <div class="tin-input" style="font-size:14px; width: 50%;">\r\n\r\n\r\n <div class="tin-input-row">\r\n\r\n <div class="col">\r\n\r\n <mat-form-field style="width:100%">\r\n <mat-label>FirstName</mat-label>\r\n <input matInput autocomplete="off" [(ngModel)]="account.profile.firstName" placeholder="Enter FirstName" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class="col">\r\n\r\n <mat-form-field style="width:100%">\r\n <mat-label>LastName</mat-label>\r\n <input matInput autocomplete="off" [(ngModel)]="profile.lastName" placeholder="Enter LastName" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n <div class="tin-input-row mt-3">\r\n\r\n <div class="col-6">\r\n\r\n <mat-form-field style="width:100%">\r\n <mat-label>UserID</mat-label>\r\n <input matInput autocomplete="off" [(ngModel)]="user.userID" placeholder="Enter UserID" />\r\n </mat-form-field>\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n <div class="tin-input-row">\r\n\r\n <div class="col">\r\n\r\n <mat-form-field style="width:100%">\r\n <mat-label>Password</mat-label>\r\n <input matInput autocomplete="off" type="password" [(ngModel)]="user.password" placeholder="Enter Password" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class="col">\r\n\r\n <mat-form-field style="width:100%">\r\n <mat-label>Confirm Password</mat-label>\r\n <input matInput autocomplete="off" type="password" [(ngModel)]="confirmPassword" placeholder="Enter Confirm Password" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n\r\n\r\n <div class="tin-input-row mt-3">\r\n <button mat-raised-button color="primary" (click)="create()" cdkFocusInitial>Create</button>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n\r\n\r\n\r\n</div>\r\n\r\n',styles:[""]})],t)}(),te=function(){function t(t,e,n,r){this.location=t,this.dataService=e,this.authService=n,this.messageService=r,this.userID=""}return t.prototype.ngOnInit=function(){},t.prototype.recover=function(){var t=this;if(""!=this.userID){var e=new yt;e.userID=this.userID,this.dataService.SelfReset(e).subscribe((function(e){"success"==e.message?(t.messageService.toast("The password has been sent to your email"),t.location.back()):t.messageService.toast("Error: "+e.message)}))}else this.messageService.toast("Please enter your userID")},t.ctorParameters=function(){return[{type:p.Location},{type:St},{type:It},{type:X}]},t=G([e.Component({selector:"spa-recover-account",template:'<h4 style="margin-top: 1em;">Recover Account</h4>\r\n\r\n<hr/>\r\nSubmit your UserID and we will send you details to your registered email address.\r\n\r\n<div class="mt-3" >\r\n\r\n\r\n <div class="tin-input " style="font-size:14px;">\r\n\r\n\r\n\r\n <div class="col">\r\n\r\n <mat-form-field style="width:300px">\r\n <mat-label>UserID</mat-label>\r\n <input matInput autocomplete="off" [(ngModel)]="userID" placeholder="Enter UserID" />\r\n </mat-form-field>\r\n </div>\r\n\r\n\r\n\r\n <div class="col mt-3">\r\n\r\n <button mat-raised-button color="primary" (click)="recover()" cdkFocusInitial>Submit</button>\r\n </div>\r\n\r\n </div>\r\n\r\n</div>\r\n',styles:[""]})],t)}(),ee=function(){function t(){}return t=G([e.NgModule({declarations:[Qt,Xt,te],entryComponents:[],imports:[U.ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl:"never"}),p.CommonModule,U.FormsModule,U.ReactiveFormsModule,Dt],exports:[p.CommonModule,U.FormsModule,Dt,Qt,Xt,te]})],t)}(),ne=function(){function t(t,e,n,r,o){this.location=t,this.httpService=e,this.messageService=n,this.dataService=r,this.authService=o,this.isProcessing=!1,this.changePassword=new bt}return t.prototype.ngOnInit=function(){this.myRole=this.authService.currentRoleSource.value,""==this.dataService.tmpProfileUserID?this.changePassword.userID=this.authService.currentUser:(this.changePassword.userID=this.dataService.tmpProfileUserID,this.dataService.tmpProfileUserID="")},t.prototype.change=function(){var t=this;this.myRole[this.dataService.capUsers.name]||""!=this.changePassword.currentPassword?""!=this.changePassword.newPassword?""!=this.changePassword.confirmPassword?this.changePassword.confirmPassword==this.changePassword.newPassword?(this.isProcessing=!0,this.myRole[this.dataService.capUsers.name]?this.dataService.changePasswordAdmin(this.changePassword).subscribe((function(e){t.isProcessing=!1,"success"==e.message?(t.messageService.toast("Password Changed"),t.location.back()):t.messageService.toast("Error: "+e.message)})):this.dataService.changePassword(this.changePassword).subscribe((function(e){t.isProcessing=!1,"success"==e.message?(t.messageService.toast("Password Changed"),t.location.back()):t.messageService.toast("Error: "+e.message)}))):this.messageService.toast("Passwords do not match"):this.messageService.toast("Please confirm new Password"):this.messageService.toast("Please enter new Password"):this.messageService.toast("Please enter current Password")},t.ctorParameters=function(){return[{type:p.Location},{type:l.HttpService},{type:X},{type:St},{type:It}]},t=G([e.Component({selector:"spa-change-password",template:'<h4>Change Password</h4>\r\n<hr>\r\n\r\n<div class="container">\r\n\r\n <div class="d-flex justify-content-center row align-items-center" >\r\n\r\n <div class="col">\r\n\r\n <div class="tin-input " style="font-size:14px;">\r\n\r\n <div class="col" *ngIf="changePassword.userID!=\'\'">\r\n\r\n <mat-form-field style="width:300px">\r\n <mat-label>User ID</mat-label>\r\n <input id="txtUserID" matInput autocomplete="off" [(ngModel)]="changePassword.userID" readonly/>\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class="col" *ngIf="!myRole[dataService.capUsers.name]">\r\n\r\n <mat-form-field style="width:300px">\r\n <mat-label>Current Password</mat-label>\r\n <input id="txtPassword" matInput autocomplete="off" type="password" [(ngModel)]="changePassword.currentPassword" placeholder="Enter Current Password" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class="col">\r\n\r\n <mat-form-field style="width:300px">\r\n <mat-label>New Password</mat-label>\r\n <input id="txtNewPassword" matInput autocomplete="off" type="password" [(ngModel)]="changePassword.newPassword" placeholder="Enter New Password" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class="col">\r\n\r\n <mat-form-field style="width:300px">\r\n <mat-label>Confirm Password</mat-label>\r\n <input id="txtConfirmPassword" matInput autocomplete="off" type="password" [(ngModel)]="changePassword.confirmPassword" placeholder="Enter Confirm Password" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class="col mt-3">\r\n\r\n <button id="btnChange" mat-raised-button color="primary" (click)="change()" cdkFocusInitial>Change</button>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n <div class="col">\r\n\r\n <div class="alert alert-info" style="font-size: 14px;" role="alert">\r\n *Please consider these requirements for your new password. <br><br>\r\n\r\n At least 8 characters<br>\r\n At least 1 uppercase letter (A-Z)<br>\r\n At least 2 lowercase letters (a-z)<br>\r\n At least 1 digit (0-9)<br>\r\n At least 1 special character (~`! …)<br>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n</div>\r\n\r\n',styles:[""]})],t)}(),re=function(){function t(t,e,n,r,o){this.dataService=t,this.messageService=e,this.httpService=n,this.router=r,this.authService=o,this.appConfig=new ht,this.selfProfile=!1,this.profile=new xt}return t.prototype.ngOnInit=function(){this.myRole=this.authService.currentRoleSource.value,""==this.dataService.tmpProfileUserID?this.loadProfile(this.authService.currentUser):(this.loadProfile(this.dataService.tmpProfileUserID),this.dataService.tmpProfileUserID="")},t.prototype.loadProfile=function(t){var e=this,n="all";this.appConfig.approvals&&this.appConfig.employees&&(n="set"),this.appConfig.approvals&&!this.appConfig.employees&&(n="setapp"),!this.appConfig.approvals&&this.appConfig.employees&&(n="setemp"),this.dataService.GetProfile(n,t).subscribe((function(t){e.profile=t.ds.dtProfiles[0],e.profile.userID.toLocaleLowerCase()==e.authService.currentUser.toLocaleLowerCase()&&(e.selfProfile=!0),e.roles=t.ds.dtRoles,e.approvalRoles=t.ds.dtApprovalRoles,e.employees=t.ds.dtEmployees}),(function(t){e.isProcessing=!1,e.messageService.toast(e.httpService.Error(t))}))},t.prototype.loadRoles=function(){var t=this;this.dataService.GetRole("all","").subscribe((function(e){t.roles=e.dt}),(function(e){t.isProcessing=!1,t.messageService.toast(t.httpService.Error(e))}))},t.prototype.changePassword=function(){this.dataService.tmpProfileUserID=this.profile.userID,this.router.navigate(["home/user/change-password"])},t.prototype.gotoUsers=function(){this.router.navigate(["home/admin/users"])},t.prototype.update=function(){},t.prototype.updateProfile=function(){var t=this;this.isProcessing=!0,this.dataService.UpdateProfile(this.profile,"edit").subscribe((function(e){t.isProcessing=!1,"success"==e.message?t.messageService.toast("Profile Updated"):t.messageService.toast("Error: "+e.message)}),(function(e){t.messageService.toast("Connection failed "),t.isProcessing=!1}))},t.ctorParameters=function(){return[{type:St},{type:X},{type:l.HttpService},{type:c.Router},{type:It}]},G([e.Input()],t.prototype,"appConfig",void 0),t=G([e.Component({selector:"spa-profile",template:'\r\n\r\n<div class="container">\r\n\r\n <div class="row mt-3" style="font-size:14px;">\r\n\r\n\r\n <div class="col-2 mt-3 ">\r\n\r\n <div class="tin-input">\r\n\r\n\r\n <div class="col">\r\n <mat-icon style="font-size: 70px;">account_circle</mat-icon>\r\n \x3c!-- <img style="height: 40px"> --\x3e\r\n </div>\r\n\r\n <div class="col">\r\n <mat-label id="lblUserID" style="font-size: 14px;">{{profile.userID}}</mat-label>\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n\r\n <div class="col-8 mt-3">\r\n\r\n <div class="tin-input" style="width: 70%;">\r\n\r\n <div class="tin-input-row">\r\n\r\n\r\n <div class="col">\r\n <mat-form-field style="width:200px">\r\n <mat-label>FirstName</mat-label>\r\n <input id="txtFirstName" matInput autocomplete="off" [(ngModel)]="profile.firstName" placeholder="Enter FirstName" [readOnly]="selfProfile"/>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class="col">\r\n <mat-form-field style="width:200px">\r\n <mat-label>LastName</mat-label>\r\n <input id="txtLastName" matInput autocomplete="off" [(ngModel)]="profile.lastName" placeholder="Enter LastName " [readOnly]="selfProfile" />\r\n </mat-form-field>\r\n </div>\r\n\r\n </div>\r\n\r\n <div class="col">\r\n <mat-form-field style="width:300px">\r\n <mat-label>Authentication</mat-label>\r\n <input id="txtAuth" matInput autocomplete="off" [(ngModel)]="profile.authType" placeholder="Authentication" readonly/>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class="col">\r\n <mat-form-field style="width:300px">\r\n <mat-label>Email</mat-label>\r\n <input id="txtEmail" matInput autocomplete="off" [(ngModel)]="profile.email" placeholder="Enter Email" [readOnly]="selfProfile"/>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class="col">\r\n\r\n <mat-form-field style="width:300px">\r\n <mat-label>Role</mat-label>\r\n <mat-select id="cboRole" [(value)]="profile.roleID" [disabled]="selfProfile">\r\n <mat-option *ngFor="let row of roles" [value]="row.roleID">\r\n {{row.roleName}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class="col" *ngIf="appConfig.approvals">\r\n\r\n <mat-form-field style="width:300px">\r\n <mat-label>Approval Role</mat-label>\r\n <mat-select id="cboApprovalRole" [(value)]="profile.arID" [disabled]="selfProfile">\r\n <mat-option *ngFor="let row of approvalRoles" [value]="row.arID">\r\n {{row.arName}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class="col" *ngIf="appConfig.employees">\r\n\r\n <mat-form-field style="width:300px">\r\n <mat-label>Employee Profile</mat-label>\r\n <mat-select id="cboEmployee" [(value)]="profile.empID" [disabled]="selfProfile">\r\n <mat-option *ngFor="let row of employees" [value]="row.empID">\r\n {{row.firstName}} {{row.lastName}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n\r\n\r\n\r\n <div class="tin-input-row mt-2">\r\n <button id="btnUpdate" mat-raised-button color="primary" *ngIf="!selfProfile" [disabled]="isProcessing" (click)="updateProfile()" >Update Profile</button>\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n <div class="col-2 mt-4">\r\n\r\n <a mat-button id="lnkUserManager" style="margin-left: 1em" *ngIf="!selfProfile" (click)="gotoUsers()" >User Manager</a>\r\n <a mat-button id="lnkChangePassword" style="margin-left: 1em" *ngIf="(selfProfile || myRole[dataService.capUsers.name]) && profile.authType==\'local\'" (click)="changePassword()" >Change Password</a>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n</div>\r\n\r\n\r\n\r\n',styles:[""]})],t)}(),oe=function(){function t(){}return t=G([e.NgModule({declarations:[ne,re],entryComponents:[],imports:[U.ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl:"never"}),p.CommonModule,U.FormsModule,U.ReactiveFormsModule,Dt],exports:[p.CommonModule,U.FormsModule,Dt,ne,re]})],t)}(),ie=function(){function t(t,e){this.dataService=t,this.messageService=e,this._filterText="",this.isProcessing=!1}return t.prototype.ngOnInit=function(){this.loadSettings()},t.prototype.applyFilter=function(t){this.settings.filter=t.trim().toLowerCase()},t.prototype.loadSettings=function(){var t=this;this.dataService.GetSetting("all","").subscribe((function(e){t.settings=e.dt}))},t.prototype.updateSetting=function(t){var e=this;this.isProcessing=!0,this.dataService.UpdateSetting(t,"edit").subscribe((function(n){e.isProcessing=!1,"success"==n.message?(e.messageService.toast("Setting "+t.sName+" Updated"),e.loadSettings()):e.messageService.toast("Error: "+n.message)}))},t.prototype.addSetting=function(){this.messageService.toast("Feature not Available")},t.ctorParameters=function(){return[{type:St},{type:X}]},t=G([e.Component({selector:"spa-settings",template:'<h4>Settings</h4>\r\n<hr>\r\n\r\n<div class="container">\r\n\r\n\r\n\r\n <div class="row justify-content-between" style="padding-bottom: 10px;padding-left:10px">\r\n <div class="col-2">\r\n <button mat-raised-button (click)="addSetting()">New Setting</button>\r\n </div>\r\n <div class="col-2">\r\n\r\n <button mat-raised-button (click)="loadSettings()">Refresh</button>\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n <div class="row mt-1 mb-1" style="margin-left:10px" *ngFor="let setting of settings">\r\n\r\n <mat-form-field style="width: 500px; font-size: 14px;">\r\n <mat-label>{{setting.sName}}</mat-label>\r\n <input matInput autocomplete="off" [(ngModel)]="setting.sValue" >\r\n </mat-form-field>\r\n\r\n <button mat-mini-fab color="primary" (click)="updateSetting(setting)" style="margin-right:150px;"><mat-icon>done_all</mat-icon></button>\r\n\r\n <mat-label style="font-size: small;">Last Updated by {{setting.updatedBy}} on {{setting.dateUpdated | date: \'dd MMM yy HH:mm\'}}</mat-label>\r\n\r\n </div>\r\n\r\n\r\n</div>\r\n\r\n',styles:[".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}"]})],t)}(),ae=function(){function t(t,e){this.authService=t,this.dataService=e,this.isProcessing=!1,this._filterText="",this.displayedColumns=["dateLogged","userID","fullName","source","details"]}return t.prototype.ngOnInit=function(){this.loadLogs()},t.prototype.loadLogs=function(){var t=this;this.dataService.GetLog("all","").subscribe((function(e){t.logs=new A.MatTableDataSource(e.dt),t.logs.paginator=t.logsPaginator,t.applyFilter(t._filterText)}))},t.prototype.applyFilter=function(t){this.logs.filter=t.trim().toLowerCase()},t.ctorParameters=function(){return[{type:It},{type:St}]},G([e.ViewChild("logsPaginator")],t.prototype,"logsPaginator",void 0),t=G([e.Component({selector:"spa-logs",template:'<h4>Logs</h4>\r\n<hr />\r\n\r\n<div class="container-fluid">\r\n\r\n\r\n <div class="row justify-content-between" style="padding-bottom: 10px">\r\n <div class="col-2">\r\n\r\n \x3c!-- <mat-form-field>\r\n <input matInput [(ngModel)]="_filterText" (keyup)="applyFilter($event.target.value) " placeholder="Filter" autocomplete="off">\r\n </mat-form-field> --\x3e\r\n\r\n </div>\r\n <div class="col-3">\r\n <mat-form-field style="font-size:12px">\r\n <mat-label>Filter</mat-label>\r\n <input id="txtFilter" matInput [(ngModel)]="_filterText" (keyup)="applyFilter($event.target.value)" placeholder="Enter Filter text" autocomplete="off">\r\n </mat-form-field>\r\n <button id="btnFilter" mat-mini-fab color="primary" (click)="loadLogs()" style="margin-right:3em;margin-top:5px"><mat-icon class="refreshIcon">refresh</mat-icon></button>\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <p *ngIf="!logs"><em>Loading...</em></p>\r\n\r\n\r\n <div class="mat-elevation-z8" *ngIf="logs">\r\n\r\n <table id="tblTable" mat-table [dataSource]="logs">\r\n\r\n\r\n <ng-container matColumnDef="userID">\r\n <th mat-header-cell *matHeaderCellDef> User ID </th>\r\n <td mat-cell *matCellDef="let log"> {{log.userID}} </td>\r\n </ng-container>\r\n\r\n\r\n <ng-container matColumnDef="dateLogged">\r\n <th mat-header-cell *matHeaderCellDef class="datetime"> Date Logged </th>\r\n <td mat-cell *matCellDef="let log"> {{log.dateLogged | date: \'dd MMM yy HH:mm:ss\'}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef="source">\r\n <th mat-header-cell *matHeaderCellDef> Source </th>\r\n <td mat-cell *matCellDef="let log"> {{log.source}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef="details">\r\n <th mat-header-cell *matHeaderCellDef> Details </th>\r\n <td mat-cell *matCellDef="let log"> {{log.details}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef="fullName">\r\n <th mat-header-cell *matHeaderCellDef> Name </th>\r\n <td mat-cell *matCellDef="let user"> {{user.firstName}} {{user.lastName}} </td>\r\n </ng-container>\r\n\r\n\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>\r\n <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>\r\n\r\n\r\n </table>\r\n\r\n </div>\r\n\r\n <mat-paginator #logsPaginator [pageSizeOptions]="[50, 100, 200]" showFirstLastButtons></mat-paginator>\r\n</div>\r\n\r\n',styles:[".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}"]})],t)}(),se=function(){function t(t,e,n,r,o,i){this.httpService=t,this.router=e,this.authService=n,this.dataService=r,this.dialog=o,this.messageService=i,this.isProcessing=!1,this._filterText="",this.displayedColumns=["userID","fullName","roleName","locked","dateCreated","Action"]}return t.prototype.ngOnInit=function(){this.UpdateData()},t.prototype.UpdateData=function(){var t=this;this.dataService.GetUser("all","").subscribe((function(e){t.users=new A.MatTableDataSource(e.dt),t.users.paginator=t.usersPaginator,t.applyFilter(t._filterText)}),(function(e){t.isProcessing=!1,t.messageService.toast(t.httpService.Error(e))}))},t.prototype.applyFilter=function(t){this.users.filter=t.trim().toLowerCase()},t.prototype.createAccount=function(){this.router.navigate(["home/admin/create-account"])},t.prototype.viewProfile=function(t){this.dataService.tmpProfileUserID=t.userID,this.router.navigate(["home/user/profile"])},t.prototype.lock=function(t){t.locked="1",this.updateUser(t)},t.prototype.unlock=function(t){t.locked="0",t.tries="0",this.updateUser(t)},t.prototype.enable=function(t){t.disabled="0",this.updateUser(t)},t.prototype.disable=function(t){t.disabled="1",this.updateUser(t)},t.prototype.recover=function(t){var e=this;this.dataService.SelfReset(t).subscribe((function(t){"success"==t.message?e.messageService.toast("The password has been sent on email"):e.messageService.toast("Error: "+t.message)}))},t.prototype.updateUser=function(t){var e=this;this.isProcessing=!0,this.dataService.UpdateUser(t,"edit").subscribe((function(t){e.isProcessing=!1,"success"==t.message?(e.messageService.toast("User Updated"),e.UpdateData()):e.messageService.toast("Error: "+t.message)}),(function(t){e.messageService.toast("Connection failed "),e.isProcessing=!1}))},t.prototype.deleteUser=function(t){var e=this;this.messageService.confirm("Delete "+t.userID+" ?").subscribe((function(n){"yes"==n&&(e.isProcessing=!0,e.dataService.UpdateUser(t,"delete").subscribe((function(t){e.isProcessing=!1,"success"==t.message?(e.messageService.toast("User Deleted"),e.UpdateData()):e.messageService.toast("Error: "+t.message)}),(function(t){e.messageService.toast("Connection failed "),e.isProcessing=!1})))}))},t.ctorParameters=function(){return[{type:l.HttpService},{type:c.Router},{type:It},{type:St},{type:r.MatDialog},{type:X}]},G([e.ViewChild("usersPaginator")],t.prototype,"usersPaginator",void 0),t=G([e.Component({selector:"spa-users",template:'\r\n<h4>Users</h4>\r\n<hr />\r\n\r\n<div class="container">\r\n\r\n\r\n <div class="row justify-content-between" style="padding-bottom: 10px">\r\n <div class="col-2">\r\n <button id="btnCreateAccount" mat-raised-button color="primary" (click)="createAccount()">Create Account</button>\r\n\r\n\r\n </div>\r\n <div class="col-3">\r\n <mat-form-field style="font-size:12px">\r\n <mat-label>Filter</mat-label>\r\n <input id="txtFilter" matInput [(ngModel)]="_filterText" (keyup)="applyFilter($event.target.value)" placeholder="Enter Filter text" autocomplete="off">\r\n </mat-form-field>\r\n <button id="btnFilter" mat-mini-fab color="primary" (click)="UpdateData()" style="margin-right:3em;margin-top:5px" matTooltip="refresh data" matTooltipPosition="right"><mat-icon class="refreshIcon">refresh</mat-icon></button>\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <p *ngIf="!users"><em>Loading...</em></p>\r\n\r\n\r\n <div class="mat-elevation-z8" *ngIf="users">\r\n\r\n <table id="tblTable" mat-table [dataSource]="users">\r\n\r\n <ng-container matColumnDef="userID">\r\n <th mat-header-cell *matHeaderCellDef> UserID </th>\r\n <td mat-cell *matCellDef="let user"> {{user.userID}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef="locked">\r\n <th mat-header-cell *matHeaderCellDef> Locked </th>\r\n <td mat-cell *matCellDef="let user"> {{user.locked}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef="fullName">\r\n <th mat-header-cell *matHeaderCellDef> Name </th>\r\n <td mat-cell *matCellDef="let user"> {{user.firstName}} {{user.lastName}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef="roleName">\r\n <th mat-header-cell *matHeaderCellDef> Role </th>\r\n <td mat-cell *matCellDef="let user"> {{user.roleName}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef="disabled">\r\n <th mat-header-cell *matHeaderCellDef> Disabled </th>\r\n <td mat-cell *matCellDef="let user"> {{user.disabled}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef="dateCreated">\r\n <th mat-header-cell *matHeaderCellDef> Created </th>\r\n <td mat-cell *matCellDef="let user"> {{user.dateCreated | date: \'dd MMM yy\'}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef="dateUpdated">\r\n <th mat-header-cell *matHeaderCellDef> Updated </th>\r\n <td mat-cell *matCellDef="let user"> {{user.dateUpdated | date: \'dd MMM yy\'}} </td>\r\n </ng-container>\r\n\r\n\r\n <ng-container matColumnDef="Action">\r\n <th mat-header-cell *matHeaderCellDef> Action </th>\r\n <td mat-cell *matCellDef="let user" style="width: 250px;">\r\n\r\n <button mat-mini-fab color="primary" (click)="viewProfile(user)" style="margin-right:30px" matTooltip="View Profile" matTooltipPosition="above"> <mat-icon>account_circle</mat-icon></button>\r\n\r\n <button *ngIf="user.locked==\'0\'" mat-mini-fab color="warn" (click)="lock(user)" style="margin-right:10px" matTooltip="Lock" matTooltipPosition="above"> <mat-icon>lock</mat-icon></button>\r\n <button *ngIf="user.locked==\'1\'" mat-mini-fab (click)="unlock(user)" style="margin-right:10px; background-color: green;" matTooltip="Unlock" matTooltipPosition="above"> <mat-icon >lock_open</mat-icon></button>\r\n\r\n <button *ngIf="user.disabled==\'0\'" mat-mini-fab color="warn" (click)="disable(user)" style="margin-right:10px" matTooltip="Disable" matTooltipPosition="above"> <mat-icon>block</mat-icon></button>\r\n <button *ngIf="user.disabled==\'1\'" mat-mini-fab (click)="enable(user)" style="margin-right:10px; background-color: green" matTooltip="Enable" matTooltipPosition="above"> <mat-icon>done</mat-icon></button>\r\n\r\n <button mat-mini-fab color="warn" (click)="deleteUser(user)" style="margin-right:10px" matTooltip="Delete" matTooltipPosition="above"> <mat-icon>delete</mat-icon></button>\r\n \x3c!-- <button mat-mini-fab color="primary" (click)="recover(user)" style="margin-right:10px" matTooltip="Reset Password" matTooltipPosition="above"> <mat-icon>vpn_key</mat-icon></button> --\x3e\r\n\r\n\r\n\r\n </td>\r\n </ng-container>\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>\r\n <tr mat-row *matRowDef="let row; columns: displayedColumns;" [ngClass]="{\'make-gray\': row.disabled ==\'1\'}"></tr>\r\n\r\n </table>\r\n\r\n </div>\r\n\r\n <mat-paginator #usersPaginator [pageSizeOptions]="[10, 20, 50]" showFirstLastButtons></mat-paginator>\r\n</div>\r\n',styles:[".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}.make-gray{background-color:#d3d3d3}"]})],t)}(),le=function(){function t(t,e,n){this.dataserv=t,this.messageService=e,this.dialogRef=n,this.currentCount=0,this.user=new yt,this.isProcessing=!1}return t.prototype.ngOnInit=function(){},t.prototype.Signup=function(){var t=this;this.user.dateCreated=l.Core.getFormatedDate(l.Core.nowDate()),this.user.dateUpdated=l.Core.getFormatedDate(l.Core.nowDate()),this.user.dateExpire=l.Core.getFormatedDate(l.Core.nowDate()),this.isProcessing=!0,this.dataserv.UpdateUser(this.user,"add").subscribe((function(e){t.isProcessing=!1,"success"==e.message?(t.messageService.toast("User Added"),t.dialogRef.close("success")):t.messageService.toast("Error: "+e.message)}))},t.ctorParameters=function(){return[{type:St},{type:X},{type:r.MatDialogRef}]},t=G([e.Component({selector:"spa-add-user",template:'<h2 mat-dialog-title>Add User</h2>\r\n<mat-dialog-content class="mat-typography">\r\n\r\n\r\n\r\n\r\n <div class="tin-input " style="font-size:12px">\r\n\r\n <mat-form-field appearance="outline">\r\n <mat-label>Username</mat-label>\r\n <input matInput autocomplete="off" [(ngModel)]="user.userID" placeholder="Enter Username">\r\n </mat-form-field>\r\n\r\n\r\n\r\n <mat-form-field appearance="outline">\r\n <mat-label>Password</mat-label>\r\n <input matInput autocomplete="off" type="password" [(ngModel)]="user.password" placeholder="Enter Password">\r\n </mat-form-field>\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n\r\n\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n <button mat-button [disabled]="isProcessing" (click)="Signup()" cdkFocusInitial>Submit</button>\r\n <button mat-button mat-dialog-close>Cancel</button>\r\n</mat-dialog-actions>\r\n',styles:[".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}.make-gray{background-color:#d3d3d3}"]})],t)}(),ce=function(){function t(t,e,n,r){this.dataserv=t,this.messageService=e,this.dialogRef=n,this.data=r,this.user=new yt,this.isProcessing=!1,this.myUser=new yt}return t.prototype.ngOnInit=function(){this.user=this.data},t.prototype.unlock=function(){this.user.locked="0"},t.prototype.lock=function(){this.user.locked="1"},t.prototype.enable=function(){this.user.disabled="0"},t.prototype.disable=function(){this.user.disabled="1"},t.prototype.Update=function(){var t=this;this.isProcessing=!0,this.dataserv.UpdateUser(this.user,"edit").subscribe((function(e){t.isProcessing=!1,"success"==e.message?(t.messageService.toast("User Updated"),t.dialogRef.close("success")):t.messageService.toast("Error: "+e.message)}),(function(e){t.messageService.toast("Connection failed "),t.isProcessing=!1}))},t.prototype.DeleteUser=function(){var t=this;this.isProcessing=!0,this.dataserv.UpdateUser(this.user,"delete").subscribe((function(e){t.isProcessing=!1,t.myData=e,t.myResponse=t.myData.message,"success"==t.myResponse&&(t.messageService.toast(t.user.userID+" Deleted"),t.dialogRef.close("success"))}))},t.ctorParameters=function(){return[{type:St},{type:X},{type:r.MatDialogRef},{type:void 0,decorators:[{type:e.Inject,args:[r.MAT_DIALOG_DATA]}]}]},t=G([e.Component({selector:"spa-edit-user",template:'<h2 mat-dialog-title>User Details</h2>\r\n<mat-dialog-content class="mat-typography">\r\n\r\n\r\n\r\n <div class="tin-input" style="font-size:14px">\r\n\r\n <mat-form-field>\r\n <mat-label>Username</mat-label>\r\n <input matInput autocomplete="off" [(ngModel)]="user.userID" placeholder="Enter Username" readonly>\r\n </mat-form-field>\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n <button mat-button [disabled]="isProcessing" (click)="Update()" cdkFocusInitial>Update</button>\r\n \x3c!--<button mat-button [disabled]="isProcessing" (click)="DeleteUser()">Delete</button>--\x3e\r\n <button mat-button mat-dialog-close>Cancel</button>\r\n</mat-dialog-actions>\r\n',styles:[".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}.make-gray{background-color:#d3d3d3}"]}),V(3,e.Inject(r.MAT_DIALOG_DATA))],t)}(),pe=function(){function t(t,e,n,r,o){this.messageService=t,this.dataserv=e,this.authserv=n,this.dialogRef=r,this.data=o}return t.prototype.ngOnInit=function(){},t.prototype.submit=function(){},t.ctorParameters=function(){return[{type:X},{type:St},{type:It},{type:r.MatDialogRef},{type:void 0,decorators:[{type:e.Inject,args:[r.MAT_DIALOG_DATA]}]}]},t=G([e.Component({selector:"app-viewRole",template:"",styles:[".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}"]}),V(4,e.Inject(r.MAT_DIALOG_DATA))],t)}(),de=function(){function t(t,e,n,r,o){this.messageService=t,this.dataService=e,this.authService=n,this.dialogRef=r,this.data=o,this.role=new ft}return t.prototype.ngOnInit=function(){this.capItems=this.data},t.prototype.submit=function(){var t=this;"New Role"!=this.role.roleName&&""!=this.role.roleName?(this.isProcessing=!0,this.dataService.UpdateRole(this.role,"add").subscribe((function(e){t.isProcessing=!1,"success"==e.message?(t.messageService.toast("Role Added"),t.dialogRef.close("success")):t.messageService.toast("Error: "+e.message)}),(function(e){t.messageService.toast("Connection failed"),t.isProcessing=!1}))):this.messageService.toast("Please enter Role Name")},t.ctorParameters=function(){return[{type:X},{type:St},{type:It},{type:r.MatDialogRef},{type:void 0,decorators:[{type:e.Inject,args:[r.MAT_DIALOG_DATA]}]}]},t=G([e.Component({selector:"app-addRole",template:'<mat-form-field>\r\n <mat-label>Role Name</mat-label>\r\n <input matInput autocomplete="off" [(ngModel)]="role.roleName" placeholder="Enter Role Name" />\r\n</mat-form-field>\r\n\r\n<mat-dialog-content class="mat-typography">\r\n\r\n <div class="row" >\r\n\r\n \x3c!-- <div class=" col-4">\r\n\r\n <div class="row">\r\n <mat-checkbox color="primary" style="margin-right:20px; font-size:14px" [(ngModel)]="role.cap1">Admin</mat-checkbox>\r\n </div>\r\n\r\n </div> --\x3e\r\n\r\n <div class="row" style="margin-left: 2em;margin-right: 2em;">\r\n\r\n <div class="row" style="margin-left: 2em;" *ngFor="let capItem of capItems">\r\n\r\n <mat-checkbox color="primary" style="margin-right:20px; font-size:12px; width: 200px;" [(ngModel)]="role[capItem.name]">{{capItem.display}}</mat-checkbox>\r\n\r\n <div *ngFor="let capSubItem of capItem.capSubItems">\r\n\r\n <mat-checkbox color="primary" style="margin-right:20px; font-size:12px; width: 200px;" [(ngModel)]="role[capSubItem.name]">{{capSubItem.display}}</mat-checkbox>\r\n\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n <button mat-button [disabled]="isProcessing" (click)="submit()" cdkFocusInitial>Submit</button>\r\n <button mat-button mat-dialog-close="success">Cancel</button>\r\n</mat-dialog-actions>\r\n',styles:[".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}"]}),V(4,e.Inject(r.MAT_DIALOG_DATA))],t)}(),ue=function(){function t(t,e,n,r,o){this.messageService=t,this.dataserv=e,this.authserv=n,this.dialogRef=r,this.data=o,this.role=new ft,this.isLoadComplete=!1}return t.prototype.ngOnInit=function(){this.role=this.data,this.isLoadComplete=!0},t.prototype.submit=function(){var t=this;this.isProcessing=!0,this.dataserv.UpdateRole(this.role,"edit").subscribe((function(e){t.isProcessing=!1,"success"==e.message?(t.messageService.toast("Role Updated"),t.dialogRef.close("success")):t.messageService.toast("Error: "+e.message)}),(function(e){t.messageService.toast("Connection failed "),t.isProcessing=!1}))},t.ctorParameters=function(){return[{type:X},{type:St},{type:It},{type:r.MatDialogRef},{type:void 0,decorators:[{type:e.Inject,args:[r.MAT_DIALOG_DATA]}]}]},t=G([e.Component({selector:"app-editRole",template:'\r\n <mat-form-field>\r\n <mat-label>Role Name</mat-label>\r\n <input matInput autocomplete="off" [(ngModel)]="role.roleName" placeholder="Enter Role Name" />\r\n </mat-form-field>\r\n <mat-dialog-content class="mat-typography">\r\n\r\n <div class="row" style="margin-left:2em">\r\n\r\n\r\n\r\n <div class=" col-4">\r\n\r\n <div class="row">\r\n <mat-checkbox color="primary" style="margin-right:20px; font-size:18px" [(ngModel)]="role.cap1">Admin</mat-checkbox>\r\n </div>\r\n\r\n <div class="row">\r\n <mat-checkbox color="primary" style="margin-right:20px; font-size:12px" [(ngModel)]="role.cap1">Users</mat-checkbox>\r\n <mat-checkbox color="primary" style="margin-right:20px; font-size:12px" [(ngModel)]="role.cap1">Overview</mat-checkbox>\r\n <mat-checkbox color="primary" style="margin-right:20px; font-size:12px" [(ngModel)]="role.cap1">Search</mat-checkbox>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n <div class=" col-4">\r\n\r\n <div class="row">\r\n <mat-label style="margin-right:20px;font-size:18px">Requests</mat-label>\r\n </div>\r\n\r\n <div class="row">\r\n <mat-checkbox color="primary" style="margin-right:20px; font-size:12px" [(ngModel)]="role.cap1">Budget</mat-checkbox>\r\n\r\n <mat-checkbox color="primary" style="margin-right:20px; font-size:12px" [(ngModel)]="role.cap1">Procurement</mat-checkbox>\r\n <mat-checkbox color="primary" style="margin-right:20px; font-size:12px" [(ngModel)]="role.cap1">Payment</mat-checkbox>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n\r\n\r\n\r\n </mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n <button mat-button [disabled]="isProcessing" (click)="submit()" cdkFocusInitial>Submit</button>\r\n <button mat-button mat-dialog-close>Cancel</button>\r\n</mat-dialog-actions>\r\n\r\n\r\n\r\n',styles:[".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}"]}),V(4,e.Inject(r.MAT_DIALOG_DATA))],t)}(),me=function(){function t(t,e,n,r,o,i){this.httpService=t,this.router=e,this.authService=n,this.dataService=r,this.dialog=o,this.messageService=i,this.isProcessing=!1,this.appConfig=new ht}return t.prototype.ngOnInit=function(){this.loadRoles()},t.prototype.loadRoles=function(){var t=this;this.dataService.GetRole("all","").subscribe((function(e){t.roles=e.dt}),(function(e){t.isProcessing=!1,t.messageService.toast(t.httpService.Error(e))}))},t.prototype.refresh=function(){this.loadRoles()},t.prototype.addRole=function(){var t=this;this.dialog.open(de,{width:"1100px",data:this.appConfig.capItems}).afterClosed().subscribe((function(e){"success"==e&&t.loadRoles()}))},t.prototype.viewRole=function(t){var e=this;this.dialog.open(pe,{width:"1100px",data:t}).afterClosed().subscribe((function(t){"success"==t&&e.loadRoles()}))},t.prototype.editRole=function(t){var e=this;this.dialog.open(ue,{width:"1100px",data:t}).afterClosed().subscribe((function(t){"success"==t&&e.loadRoles()}))},t.prototype.updateRole=function(t){var e=this;this.messageService.confirm("UPDATE "+t.roleName+" ?").subscribe((function(n){"yes"==n&&e.dataService.UpdateRole(t,"edit").subscribe((function(t){"success"==t.message?(e.messageService.toast("Role Updated"),e.loadRoles()):e.messageService.toast("Error: "+t.message)}))}))},t.prototype.deleteRole=function(t){var e=this;this.messageService.confirm("DELETE "+t.roleName+" ?").subscribe((function(n){"yes"==n&&e.dataService.UpdateRole(t,"delete").subscribe((function(t){"success"==t.message?(e.messageService.toast("Role Deleted"),e.loadRoles()):e.messageService.toast("Error: "+t.message)}))}))},t.ctorParameters=function(){return[{type:l.HttpService},{type:c.Router},{type:It},{type:St},{type:r.MatDialog},{type:X}]},G([e.Input()],t.prototype,"appConfig",void 0),t=G([e.Component({selector:"spa-roles",template:'<h4> Roles </h4>\r\n<hr />\r\n\r\n<div class="container mb-5">\r\n\r\n <div class="row justify-content-between" style="padding-bottom: 10px;padding-left:10px">\r\n <div class="col-2">\r\n\r\n <button id="btnNewRole" mat-raised-button color="primary" (click)="addRole()">New Role</button>\r\n </div>\r\n <div class="col-1">\r\n\r\n <button id="btnRefresh" mat-mini-fab color="primary" (click)="refresh()" style="margin-right:1em;margin-top:5px" matTooltip="refresh data" matTooltipPosition="right"><mat-icon class="refreshIcon">refresh</mat-icon></button>\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n <div class="row mt-2 mb-1" style="margin-left:10px" *ngFor="let role of roles">\r\n\r\n <mat-card class="mat-elevation-z8" style="width:100%;padding-left:2em">\r\n\r\n <h4>{{role.roleName}}</h4>\r\n <hr />\r\n\r\n <div class="row" style="margin-left: 2em;">\r\n\r\n\r\n <div class="row" style="margin-right:20px;" *ngFor="let capItem of appConfig.capItems">\r\n\r\n <mat-checkbox color="primary" style=" font-size:12px; width: 200px;" [(ngModel)]="role[capItem.name]">{{capItem.display}}</mat-checkbox>\r\n\r\n <div class="row" style="margin-right:20px;margin-left: 0px; " *ngFor="let capSubItem of capItem.capSubItems">\r\n\r\n <mat-checkbox color="primary" style=" font-size:12px; width: 200px;" [(ngModel)]="role[capSubItem.name]">{{capSubItem.display}}</mat-checkbox>\r\n\r\n <div class="row" style="margin-right:20px;margin-left: 0px;" *ngFor="let capSubSubItem of capSubItem.capSubItems">\r\n\r\n <mat-checkbox color="primary" style="font-size:12px; width: 200px;" [(ngModel)]="role[capSubSubItem.name]">{{capSubSubItem.display}}</mat-checkbox>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <mat-card-actions>\r\n\r\n <button mat-mini-fab color="primary" (click)="updateRole(role)" style="margin-right:10px;">\r\n <mat-icon>done_all</mat-icon>\r\n </button>\r\n\r\n \x3c!-- <button mat-mini-fab color="warn" (click)="editRole(role)" style="margin-right:10px">\r\n <mat-icon>edit</mat-icon>\r\n </button> --\x3e\r\n\r\n <button mat-mini-fab color="warn" (click)="deleteRole(role)" style="margin-right:10px">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n\r\n </mat-card-actions>\r\n\r\n </mat-card>\r\n\r\n </div>\r\n\r\n\r\n</div>\r\n\r\n',styles:[".mat-mini-fab{width:32px;height:32px}.mat-mini-fab mat-icon{font-size:16px;margin-top:-3px}.refreshIcon{font-size:22px!important;margin-top:-7px!important}"]})],t)}(),he=function(){function t(){}return t.prototype.ngOnInit=function(){},t=G([e.Component({selector:"spa-profiles",template:"<h6></h6>\r\n<hr>\r\n",styles:[""]})],t)}(),ge=function(){function t(t,e,n,r,o){this.httpService=t,this.messageService=e,this.dataService=n,this.authService=r,this.router=o,this.appConfig=new ht,this.isProcessing=!1,this.user=new yt,this.profile=new xt,this.account=new vt,this.openProfile=!0}return t.prototype.ngOnInit=function(){},t.prototype.create=function(){var t=this;""!=this.user.authType?(this.account.user=this.user,this.account.profile=this.profile,this.profile.userID=this.user.userID,this.isProcessing=!0,this.dataService.UpdateAccount(this.account,"add").subscribe((function(e){t.isProcessing=!1,"success"==e.message?(t.messageService.toast("Account Created"),t.openProfile?t.viewProfile(t.user):(t.user=new yt,t.profile=new xt,t.confirmPassword="")):t.messageService.toast("Error: "+e.message)}),(function(e){t.isProcessing=!1,t.messageService.toast(t.httpService.Error(e))}))):this.messageService.toast("Choose Authentication Type")},t.prototype.viewProfile=function(t){this.dataService.tmpProfileUserID=t.userID,this.router.navigate(["home/user/profile"])},t.ctorParameters=function(){return[{type:l.HttpService},{type:X},{type:St},{type:It},{type:c.Router}]},G([e.Input()],t.prototype,"appConfig",void 0),t=G([e.Component({selector:"spa-create-account",template:'<h4>Create Account</h4>\r\n\r\n<hr/>\r\n\r\n<div class="container">\r\n\r\n <div class="tin-input" style="font-size:14px; width: 50%;">\r\n\r\n\r\n <div class="tin-input-row">\r\n\r\n <div class="col">\r\n\r\n <mat-form-field style="width:100%">\r\n <mat-label>FirstName</mat-label>\r\n <input id="txtFirstName" matInput autocomplete="off" [(ngModel)]="profile.firstName" placeholder="Enter FirstName" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class="col">\r\n\r\n <mat-form-field style="width:100%">\r\n <mat-label>LastName</mat-label>\r\n <input id="txtLastName" matInput autocomplete="off" [(ngModel)]="profile.lastName" placeholder="Enter LastName" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n <div class="tin-input-row mt-3">\r\n\r\n <div class="col-6">\r\n\r\n <mat-form-field style="width:100%">\r\n <mat-label>UserID</mat-label>\r\n <input id="txtUserID" matInput autocomplete="off" [(ngModel)]="user.userID" placeholder="Enter UserID" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class="col-6">\r\n\r\n <mat-form-field style="width:300px">\r\n <mat-select id="cboAuth" [(value)]="user.authType">\r\n <mat-option *ngIf="appConfig.localAuth" value="local">Local Authentication</mat-option>\r\n <mat-option *ngIf="appConfig.ADAuth" value="AD">AD Authentication</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n\r\n\r\n\r\n </div>\r\n\r\n <div class="tin-input-row" *ngIf="user.authType==\'local\'">\r\n\r\n <div class="col">\r\n\r\n <mat-form-field style="width:100%">\r\n <mat-label>Password</mat-label>\r\n <input id="txtPassword" matInput autocomplete="off" type="password" [(ngModel)]="user.password" placeholder="Enter Password" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n <div class="col">\r\n\r\n <mat-form-field style="width:100%">\r\n <mat-label>Confirm Password</mat-label>\r\n <input id="txtConfirmPassword" matInput autocomplete="off" type="password" [(ngModel)]="confirmPassword" placeholder="Enter Confirm Password" />\r\n </mat-form-field>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n\r\n <div class="tin-input-row mt-3" style="margin-left: 1em;">\r\n\r\n <mat-checkbox id="cbkOpenAfter" color="primary" style="margin-right:100px; font-size:12px" [(ngModel)]="openProfile">Open profile after creation</mat-checkbox>\r\n\r\n </div>\r\n\r\n <div class="tin-input-row mt-3">\r\n <button id="btnCreate" [disabled]="user.authType ==\'\'" mat-raised-button color="primary" (click)="create()" cdkFocusInitial>Create</button>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n</div>\r\n\r\n',styles:[""]})],t)}(),fe=function(){function t(){}return t=G([e.NgModule({declarations:[se,le,ce,me,de,ue,pe,he,ge,ae,ie],entryComponents:[le,ce,de,ue,pe],imports:[U.ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl:"never"}),p.CommonModule,U.FormsModule,U.ReactiveFormsModule,Dt],exports:[p.CommonModule,U.FormsModule,Dt,se,le,ce,me,de,ue,pe,he,ge,ae,ie]})],t)}();t.Account=vt,t.ActionResponse=ut,t.ActivityComponent=Vt,t.AddUserDialog=le,t.AppConfig=ht,t.AttachComponent=_t,t.AuthService=It,t.CapItem=gt,t.ChangePasswordComponent=ne,t.ChangeUserPassword=bt,t.CheckComponent=zt,t.ChipsComponent=Gt,t.Color=ct,t.Condition=lt,t.CreateAccountComponent=ge,t.DataService=St,t.DateComponent=Ut,t.DatetimeComponent=qt,t.EditUserDialog=ce,t.ExportService=tt,t.HtmlComponent=Wt,t.Icon=pt,t.LabelComponent=$t,t.LoaderComponent=kt,t.LogService=wt,t.LoginComponent=Qt,t.LogsComponent=ae,t.MessageService=X,t.MoneyComponent=Ht,t.NavMenuComponent=Et,t.OptionComponent=Zt,t.Profile=xt,t.ProfileComponent=re,t.ProfilesComponent=he,t.RecoverAccountComponent=te,t.Role=ft,t.RolesComponent=me,t.SelectComponent=jt,t.SettingsComponent=ie,t.SignupComponent=Xt,t.SpaAdminModule=fe,t.SpaIndexModule=ee,t.SpaMatModule=Dt,t.SpaUserModule=oe,t.Step=rt,t.StepsComponent=Yt,t.StorageService=K,t.TableAction=dt,t.TableColumn=at,t.TableComponent=Lt,t.TableConfig=ot,t.TableCreate=it,t.TextComponent=Nt,t.Tile=nt,t.TilesComponent=Rt,t.TimeoutComponent=At,t.TinSpaComponent=Tt,t.TinSpaModule=Kt,t.TinSpaService=Y,t.User=yt,t.UsersComponent=se,t.ViewerComponent=Ft,t.addRoleDialog=de,t.editRoleDialog=ue,t.loginConfig=mt,t.messageDialog=Q,t.viewRoleDialog=pe,t.ɵ0=Mt,t.ɵa=Bt,t.ɵb=Ct,t.ɵc=Ot,t.ɵd=Pt,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
15
|
+
***************************************************************************** */var z=function(e,t){return(z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function B(e,t){function n(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function q(e,t,n,i){return new(n||(n=Promise))((function(a,r){function o(e){try{s(i.next(e))}catch(e){r(e)}}function l(e){try{s(i.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((i=i.apply(e,t||[])).next())}))}function H(e,t){var n,i,a,r,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=2&r[0]?i.return:r[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,r[1])).done)return a;switch(i=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,i=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){o.label=r[1];break}if(6===r[0]&&o.label<a[1]){o.label=a[1],a=r;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(r);break}a[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],i=0}finally{n=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}}function $(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var G=function(){function e(){}return e.ɵfac=function(t){return new(t||e)},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}(),W=function(){function e(){}return e.prototype.store=function(e,t){return q(this,void 0,void 0,(function(){var n;return H(this,(function(i){switch(i.label){case 0:return n=btoa(escape(JSON.stringify(t))),[4,localStorage.setItem(e,n)];case 1:return i.sent(),[2]}}))}))},e.prototype.get=function(e){return q(this,void 0,void 0,(function(){var t;return H(this,(function(n){switch(n.label){case 0:return[4,localStorage.getItem(e)];case 1:return t=n.sent(),[2,JSON.parse(unescape(atob(t)))]}}))}))},e.prototype.removeStorageItem=function(e){return q(this,void 0,void 0,(function(){return H(this,(function(t){switch(t.label){case 0:return[4,localStorage.removeItem(e)];case 1:return t.sent(),[2]}}))}))},e.prototype.clear=function(){return q(this,void 0,void 0,(function(){return H(this,(function(e){switch(e.label){case 0:return[4,localStorage.clear()];case 1:return e.sent(),[2]}}))}))},e.ɵfac=function(t){return new(t||e)},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}();function Z(e,n){1&e&&(t.ɵɵelementStart(0,"mat-label"),t.ɵɵtext(1,"Confirm"),t.ɵɵelementEnd())}function J(e,n){1&e&&(t.ɵɵelementStart(0,"mat-label"),t.ɵɵtext(1,"Information"),t.ɵɵelementEnd())}function Q(e,n){1&e&&(t.ɵɵelementStart(0,"mat-label"),t.ɵɵtext(1,"Error"),t.ɵɵelementEnd())}function K(e,n){if(1&e&&(t.ɵɵelementStart(0,"p"),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵtextInterpolate(i._messageDetails)}}function Y(e,n){if(1&e&&(t.ɵɵelementStart(0,"div"),t.ɵɵelementStart(1,"h3"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"mat-label"),t.ɵɵtext(4),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵtextInterpolate(i._messageSubject),t.ɵɵadvance(2),t.ɵɵtextInterpolate(i._messageDetails)}}function X(e,n){if(1&e&&(t.ɵɵelementStart(0,"div"),t.ɵɵelementStart(1,"mat-label"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵtextInterpolate(i._messageDetails)}}function ee(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",6),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().response("yes")})),t.ɵɵtext(1,"Yes"),t.ɵɵelementEnd()}}function te(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",7),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().response("no")})),t.ɵɵtext(1,"No"),t.ɵɵelementEnd()}}function ne(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",8),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().response("ok")})),t.ɵɵtext(1,"OK"),t.ɵɵelementEnd()}}var ie,ae=function(){function e(e,t){this.dialogRef=e,this.data=t}return e.prototype.ngOnInit=function(){this.messageType=this.data.type,this._messageSubject=this.data.subject,this._messageDetails=this.data.details},e.prototype.response=function(e){this.dialogRef.close(e)},e.ɵfac=function(i){return new(i||e)(t.ɵɵdirectiveInject(n.MatDialogRef),t.ɵɵdirectiveInject(n.MAT_DIALOG_DATA))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["lib-app-message"]],decls:12,vars:9,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"mat-typography"],["id","btnYes","mat-stroked-button","","cdkFocusInitial","",3,"click",4,"ngIf"],["id","btnNo","mat-stroked-button","",3,"click",4,"ngIf"],["id","btnOK","mat-stroked-button","","cdkFocusInitial","",3,"click",4,"ngIf"],["id","btnYes","mat-stroked-button","","cdkFocusInitial","",3,"click"],["id","btnNo","mat-stroked-button","",3,"click"],["id","btnOK","mat-stroked-button","","cdkFocusInitial","",3,"click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"h2",0),t.ɵɵtemplate(1,Z,2,0,"mat-label",1),t.ɵɵtemplate(2,J,2,0,"mat-label",1),t.ɵɵtemplate(3,Q,2,0,"mat-label",1),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"mat-dialog-content",2),t.ɵɵtemplate(5,K,2,1,"p",1),t.ɵɵtemplate(6,Y,5,2,"div",1),t.ɵɵtemplate(7,X,3,1,"div",1),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"mat-dialog-actions"),t.ɵɵtemplate(9,ee,2,0,"button",3),t.ɵɵtemplate(10,te,2,0,"button",4),t.ɵɵtemplate(11,ne,2,0,"button",5),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵproperty("ngIf","confirm"==n.messageType),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","info"==n.messageType),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","error"==n.messageType),t.ɵɵadvance(2),t.ɵɵproperty("ngIf","confirm"==n.messageType),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","info"==n.messageType),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","error"==n.messageType),t.ɵɵadvance(2),t.ɵɵproperty("ngIf","confirm"==n.messageType),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","confirm"==n.messageType),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","info"==n.messageType||"error"==n.messageType))},directives:[n.MatDialogTitle,i.NgIf,n.MatDialogContent,n.MatDialogActions,a.MatLabel,r.MatButton],encapsulation:2}),e}(),re=function(){function e(e,t){this.snackBar=e,this.dialog=t}return e.prototype.toast=function(e){this.snackBar.open(e,"OK",{duration:5e3})},e.prototype.info=function(e,t){this.dialog.open(ae,{width:"600px",data:{type:"info",subject:e,details:t}})},e.prototype.error=function(e){this.dialog.open(ae,{width:"600px",data:{type:"error",subject:void 0,details:e}})},e.prototype.confirm=function(e){var t=e;return this.dialog.open(ae,{width:"400px",data:{type:"confirm",subject:"",details:t}}).afterClosed().pipe(l.mergeMap((function(e){return o.of(e)})))},e.ɵfac=function(i){return new(i||e)(t.ɵɵinject(s.MatSnackBar),t.ɵɵinject(n.MatDialog))},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}(),oe=function(){function e(){this.fileType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8",this.fileExtension=".xlsx"}return e.prototype.exportExcel=function(e,t){var n={Sheets:{data:p.utils.json_to_sheet(e)},SheetNames:["data"]},i=p.write(n,{bookType:"xlsx",type:"array"});this.saveExcelFile(i,t)},e.prototype.saveExcelFile=function(e,t){var n=new Blob([e],{type:this.fileType});c.saveAs(n,t+this.fileExtension)},e.ɵfac=function(t){return new(t||e)},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}(),le=function(){function e(){}return e.getClone=function(e){return JSON.parse(JSON.stringify(e))},e.getNumber=function(e){return null==e||""==e?0:e.replace(/[^\d.-]/g,"")},e.getFirstDayOfMonth=function(){var e=new Date;return new Date(e.getFullYear(),e.getMonth(),1)},e.emailIsValid=function(e){return/\S+@\S+\.\S+/.test(e)},e.isValidUNCPath=function(e){return/\\\\([a-zA-Z0-9_.$●-]+)\\([a-zA-Z0-9_.$●-]+).*/.test(e)},e.isValidDate=function(e){var t=Date.parse(e);return!(!isNaN(e)||isNaN(t))},e.isValidEmailList=function(e){var t,n;if(e.includes(";")){var i=e.split(";");try{for(var a=$(i),r=a.next();!r.done;r=a.next()){var o=r.value;if(0==this.emailIsValid(o))return!1}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}else if(0==this.emailIsValid(e))return!1;return!0},e.isNumber=function(e){return null!=e&&""!==e&&!isNaN(Number(e.toString()))},e.getDiff=function(e,t){void 0===t&&(t=Date());var n=new Date(e),i=new Date(t).valueOf()-n.valueOf();function a(e){return"1"==e.toFixed()?"":"s"}var r=i/6e4,o=i/36e5,l=i/864e5,s=i/6048e5,c=i/24192e5,p=i/31536e6;return p>=1?p.toFixed()+" year"+a(p):c>=1?c.toFixed()+" month"+a(c):s>=1?s.toFixed()+" week"+a(s):l>=1?l.toFixed()+" day"+a(l):o>=1?o.toFixed()+" hour"+a(o):r>=1?r.toFixed()+" minute"+a(r):i>=-6e4?"a minute":"N/A"},e.nowDate=function(e){return void 0===e&&(e=!1),e?this.getFormatedDate(Date(),!0):this.getFormatedDate(Date())},e.getFormatedDate=function(e,t){void 0===t&&(t=!1);var n=new Date(e);return n.setHours(n.getHours()+2),1==t?n.toISOString().split("T")[0]:n.toISOString().split(".")[0]},e.getBusinessDatesCount=function(e,t){for(var n=0,i=new Date(e),a=new Date(t),r=i;r<a;){var o=r.getDay();6!=o&&0!=o&&n++,r.setDate(r.getDate()+1)}return n},e.nullDate="01 Jan 1969",e}(),se=function(){},ce=function(){function e(){}return e.AUTH_USER="a",e.AUTH_NAME="b",e.AUTH_ROLES="c",e.AUTH_TOKEN="d",e.AUTH_TOKEN_EXPIRE="e",e}();(ie=e.LogLevel||(e.LogLevel={}))[ie.All=0]="All",ie[ie.Debug=1]="Debug",ie[ie.Info=2]="Info",ie[ie.Warn=3]="Warn",ie[ie.Error=4]="Error",ie[ie.Fatal=5]="Fatal",ie[ie.Off=6]="Off";var pe,de=function(){},me=function(){},ue=function(){this.enableFilter=!1,this.create=new fe,this.greyout=new ve},fe=function(){},ge=function(){this.name="default",this.display="default",this.type=e.TableColumnType.String};(pe=e.TableColumnType||(e.TableColumnType={}))[pe.String=0]="String",pe[pe.Date=1]="Date",pe[pe.DateTime=2]="DateTime",pe[pe.Image=3]="Image",pe[pe.Icon=4]="Icon",pe[pe.TextIcon=5]="TextIcon",pe[pe.Chip=6]="Chip";var he,ve=function(){this.field="",this.operator=e.Operator.Equal,this.value=""};(he=e.Operator||(e.Operator={}))[he.Equal=0]="Equal",he[he.Less=1]="Less",he[he.Greater=2]="Greater",he[he.NotEqual=3]="NotEqual";var ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t}(ve),xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t}(ve),Se=function(){},Ce=function(){},Me=function(){this.appName="",this.selfService=!1,this.logo="",this.logoSize="normal"},we=function(){this.appName="App Name",this.logo="",this.logoSize="normal",this.ADAuth=!0,this.localAuth=!0,this.selfService=!1},be=function(){this.name="",this.display="New Cap Item",this.enabled=!1,this.type="",this.newLine=!1,this.showMenu=!0,this.ignoreSubsDisplay=!1,this.link="",this.icon="navigate_next"},Ee=function(){},Ie=function(){this.userName="",this.password="",this.tries="0",this.locked="0",this.logged="0",this.disabled="0",this.changepassword="0",this.dateCreated=le.nowDate(),this.dateUpdated=le.nowDate(),this.token="",this.dateExpire=le.nowDate(),this.tokenExpire=le.nowDate(),this.authType=""},ke=function(){this.userName="",this.currentPassword="",this.newPassword="",this.confirmPassword=""},Pe=function(){this.userName="",this.roleID=1,this.firstName="",this.lastName="",this.email="",this.authType="",this.password=""},Ne=function(){this.profileID="",this.userName="",this.roleID=1,this.firstName="",this.lastName="",this.email="",this.empID="",this.arID="0",this.authType="",this.password="",this.role=new De},De=function(){this.roleID=0,this.roleName="New Role",this.cap1=!1,this.cap2=!1,this.cap3=!1,this.cap4=!1,this.cap5=!1,this.cap6=!1,this.cap7=!1,this.cap8=!1,this.cap9=!1,this.cap10=!1,this.cap11=!1,this.cap12=!1,this.cap13=!1,this.cap14=!1,this.cap15=!1,this.cap16=!1,this.cap17=!1,this.cap18=!1,this.cap19=!1,this.cap20=!1,this.cap21=!1,this.cap22=!1,this.cap23=!1,this.cap24=!1,this.cap25=!1,this.cap26=!1,this.cap27=!1,this.cap28=!1,this.cap29=!1,this.cap30=!1,this.cap31=!1,this.cap32=!1,this.cap33=!1,this.cap34=!1,this.cap35=!1,this.cap36=!1,this.cap37=!1,this.cap38=!1,this.cap39=!1,this.cap40=!1,this.cap41=!1,this.cap42=!1,this.cap43=!1,this.cap44=!1,this.cap45=!1,this.cap46=!1,this.cap47=!1,this.cap48=!1,this.cap49=!1,this.cap50=!1,this.cap51=!1,this.cap52=!1,this.cap53=!1,this.cap54=!1,this.cap55=!1,this.cap56=!1,this.cap57=!1,this.cap58=!1,this.cap59=!1,this.cap60=!1,this.cap61=!1,this.cap62=!1,this.cap63=!1,this.cap64=!1,this.cap65=!1,this.cap66=!1,this.cap67=!1,this.cap68=!1,this.cap69=!1,this.cap70=!1,this.cap71=!1,this.cap72=!1,this.cap73=!1,this.cap74=!1,this.cap75=!1,this.cap76=!1,this.cap77=!1,this.cap78=!1,this.cap79=!1,this.cap80=!1,this.cap81=!1,this.cap82=!1,this.cap83=!1,this.cap84=!1,this.cap85=!1,this.cap86=!1,this.cap87=!1,this.cap88=!1,this.cap89=!1,this.cap90=!1,this.cap91=!1,this.cap92=!1,this.cap93=!1,this.cap94=!1,this.cap95=!1,this.cap96=!1,this.cap97=!1,this.cap98=!1,this.cap99=!1,this.cap100=!1},Oe=function(){function e(e,t){this.httpClient=e,this.router=t,this.apiUrl="https://api.solinc.co.zw/",this.httpOptions_Legacy={headers:new m.HttpHeaders({Accept:"application/json","Content-Type":"application/json",Authorization:"Basic "+btoa("emptyUser:emptyToken")}),resposeType:"json"},this.httpOptions_Files={headers:new m.HttpHeaders({Authorization:"Basic "+btoa("tnyagato:j5Toszfr@ys")}),resposeType:"json"}}return e.prototype.Post=function(e,t){return this.httpClient.post(this.apiUrl+e,t,this.httpOptions_Legacy)},e.prototype.Put=function(e,t){return this.httpClient.put(this.apiUrl+e,t,this.httpOptions_Legacy)},e.prototype.Post_Raw=function(e,t){return this.httpClient.post(e,t,this.httpOptions_Legacy)},e.prototype.Post_WithFile=function(e,t,n){var i=new FormData;return n&&i.append("uploadFile",n,n.name),i.append("data",JSON.stringify(t)),this.httpClient.post(this.apiUrl+e,i,this.httpOptions_Files)},e.prototype.Post_FormData=function(e,t){return this.httpClient.post(this.apiUrl+e,t,this.httpOptions_Files)},e.prototype.Get=function(e){return this.httpClient.get(this.apiUrl+e,this.httpOptions_Legacy)},e.prototype.Get_Raw=function(e){return this.httpClient.get(e,this.httpOptions_Legacy)},e.prototype.Error=function(e){return"Unauthorized"==e.statusText?(this.router.navigate(["login"]),"Unauthorized"):"Connection failed"},e.ɵfac=function(n){return new(n||e)(t.ɵɵinject(m.HttpClient),t.ɵɵinject(d.Router))},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}(),Te=function(){function n(){this.level=e.LogLevel.All,this.logToConsole=!0,this.logToApi=!1}return n.prototype.debug=function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this.writeToLog(t,e.LogLevel.Debug,n)},n.prototype.info=function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this.writeToLog(t,e.LogLevel.Info,n)},n.prototype.warn=function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this.writeToLog(t,e.LogLevel.Warn,n)},n.prototype.error=function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this.writeToLog(t,e.LogLevel.Error,n)},n.prototype.fatal=function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this.writeToLog(t,e.LogLevel.Fatal,n)},n.prototype.log=function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this.writeToLog(t,e.LogLevel.All,n)},n.prototype.writeToLog=function(e,t,n){if(this.shouldLog(t)){var i=le.getFormatedDate(Date(),!1).replace("T"," ");i+=" - Message: "+e,n.length&&(i+=" - Extra Info: "+this.formatParams(n)),this.logToConsole&&console.log(i),this.logToApi}},n.prototype.formatParams=function(e){var t,n,i=e.join(",");if(e.some((function(e){return"object"==typeof e}))){i="";try{for(var a=$(e),r=a.next();!r.done;r=a.next()){var o=r.value;i+=JSON.stringify(o)+","}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}return i},n.prototype.shouldLog=function(t){var n=!1;return(t>=this.level&&t!==e.LogLevel.Off||this.level===e.LogLevel.All)&&(n=!0),n},n.ɵfac=function(e){return new(e||n)},n.ɵprov=t.ɵɵdefineInjectable({token:n,factory:n.ɵfac,providedIn:"root"}),n}(),Fe=function(){function e(e,t,n,i,a,r){this._route=e,this.storage=t,this.router=n,this.httpService=i,this.messageService=a,this.logService=r,this.loggedin=!1,this.loggedinSource=new o.BehaviorSubject(this.loggedin),this.loggedinObserv=this.loggedinSource.asObservable(),this.token="",this.tokenSource=new o.BehaviorSubject(this.token),this.tokenObserv=this.tokenSource.asObservable(),this.tokenExpire="",this.tokenExpireSource=new o.BehaviorSubject(this.tokenExpire),this.tokenExpireObserv=this.tokenExpireSource.asObservable(),this.currentUser="tnyagato",this.currentUserSource=new o.BehaviorSubject(this.currentUser),this.currentUserObserv=this.currentUserSource.asObservable(),this.islineManager=!1,this.isLineManagerSource=new o.BehaviorSubject(this.islineManager),this.isLineManagerObserv=this.isLineManagerSource.asObservable(),this.currentRole=new De,this.currentRoleSource=new o.BehaviorSubject(this.currentRole),this.myRoleObserv=this.currentRoleSource.asObservable(),this.loggedUserSource=new o.BehaviorSubject("tnyagato"),this.loggedUserFullName=this.loggedUserSource.asObservable()}return e.prototype.Updateloggedin=function(e){this.loggedinSource.next(e),this.loggedin=e},e.prototype.UpdateToken=function(e){this.tokenSource.next(e)},e.prototype.UpdateTokenExpire=function(e){this.tokenExpireSource.next(e)},e.prototype.UpdateCurrentUser=function(e){this.currentUserSource.next(e.toLocaleLowerCase()),this.currentUser=e.toLocaleLowerCase()},e.prototype.UpdateIsLineManager=function(e){this.isLineManagerSource.next(e)},e.prototype.UpdateRole=function(e){this.currentRoleSource.next(e)},e.prototype.updateLoggedUserFullName=function(e){this.loggedUserSource.next(e)},e.prototype.isAuthorised=function(e){return!!this.currentRoleSource.value[e]||(this.router.navigate(["home"]),this.messageService.toast("Unauthorised: "+e),!1)},e.prototype.isValidToken=function(){var e=new Date(this.tokenExpireSource.value)>new Date;return e||(this.router.navigate(["login"]),this.messageService.toast("Expired Session")),e},e.prototype.canActivate=function(){var e=this;if(this.loggedin&&this.isValidToken())return!0;if(null===localStorage.getItem(ce.AUTH_USER)){this.Updateloggedin(!1);var t=new URL(window.location.href).hash.replace("#/","");return this.router.navigate(["login"],{relativeTo:this._route,queryParams:{redirectTo:t},queryParamsHandling:"merge",skipLocationChange:!1}),!1}return this.Updateloggedin(!0),this.storage.get(ce.AUTH_USER).then((function(t){e.UpdateCurrentUser(t)})),this.storage.get(ce.AUTH_NAME).then((function(t){e.updateLoggedUserFullName(t)})),this.storage.get(ce.AUTH_ROLES).then((function(t){var n=JSON.parse(t);e.UpdateRole(n)})),this.storage.get(ce.AUTH_TOKEN).then((function(t){e.UpdateToken(t)})),this.storage.get(ce.AUTH_TOKEN_EXPIRE).then((function(t){e.UpdateTokenExpire(t),e.isValidToken()})),!0},e.ɵfac=function(n){return new(n||e)(t.ɵɵinject(d.ActivatedRoute),t.ɵɵinject(W),t.ɵɵinject(d.Router),t.ɵɵinject(Oe),t.ɵɵinject(re),t.ɵɵinject(Te))},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}(),Le=function(){function e(e){this.httpService=e,this.appConfig=new we,this.appConfigSource=new o.BehaviorSubject(this.appConfig),this.appConfigObserv=this.appConfigSource.asObservable(),this.capHome=new be,this.capAdmin=new be,this.capUsers=new be,this.capRoles=new be,this.capLogs=new be,this.capSettings=new be,this.tmpProfileuserName="",this.appConfig.appName="App-Name",this.appConfig.logo="./assets/logo.png",this.appConfig.ADAuth=!0,this.appConfig.capItems=[this.capAdmin,this.capHome],this.capHome.name="cap1",this.capHome.display="Home",this.capHome.link="home",this.capAdmin.name="cap2",this.capAdmin.display="Admin",this.capAdmin.capSubItems=[this.capUsers,this.capRoles,this.capLogs,this.capSettings],this.capUsers.name="cap3",this.capUsers.display="Users",this.capUsers.link="home/admin/users",this.capRoles.name="cap4",this.capRoles.display="Roles",this.capRoles.link="home/admin/roles",this.capLogs.name="cap5",this.capLogs.display="Logs",this.capLogs.link="home/admin/logs",this.capSettings.name="cap6",this.capSettings.display="Settings",this.capSettings.link="home/admin/settings"}return e.prototype.UpdateAppConfig=function(e){this.appConfigSource.next(e),this.appConfig=e},e.prototype.GetUser=function(){return this.httpService.Get("User/all/x")},e.prototype.RegisterAccount=function(e){return this.httpService.Post("User/register",e)},e.prototype.GetUserByID=function(e){return this.httpService.Get("User/id/"+e)},e.prototype.UpdateUser=function(e){return this.httpService.Post("User/edit",e)},e.prototype.UnlockUser=function(e){return this.httpService.Post("User/unlock",e)},e.prototype.LockUser=function(e){return this.httpService.Post("User/lock",e)},e.prototype.DeleteUser=function(e){return this.httpService.Post("User/delete",e)},e.prototype.Login=function(e){return this.httpService.Post("User/login",e)},e.prototype.ChangePassword=function(e){return this.httpService.Post("User/changepassword-self",e)},e.prototype.ChangePasswordAdmin=function(e){return this.httpService.Post("User/changepassword-admin",e)},e.prototype.SelfReset=function(e){return this.httpService.Post("Basic/SelfReset",e)},e.prototype.PostRole=function(e,t){return this.httpService.Post("Role?action="+t,e)},e.prototype.PutRole=function(e){return this.httpService.Put("Role",e)},e.prototype.GetRole=function(e,t){return this.httpService.Get("Role/all/x")},e.prototype.GetLog=function(e,t){return this.httpService.Get("Log/all/x")},e.prototype.GetSetting=function(e,t){return this.httpService.Get("Setting/all/x")},e.prototype.UpdateSetting=function(e,t){return this.httpService.Post("Setting?action="+t,e)},e.ɵfac=function(n){return new(n||e)(t.ɵɵinject(Oe))},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}(),je=function(){function e(){this.isLoading=new o.BehaviorSubject(!1)}return e.ɵfac=function(t){return new(t||e)},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac,providedIn:"root"}),e}();function Ae(e,n){1&e&&t.ɵɵelement(0,"img",5)}function Re(e,n){if(1&e&&t.ɵɵelement(0,"img",6),2&e){var i=t.ɵɵnextContext();t.ɵɵproperty("src",i.logo,t.ɵɵsanitizeUrl)}}var Ue=function(){function e(e){var t=this;this.loaderService=e,this.logo="",this.loaderService.isLoading.subscribe((function(e){t.loading=e}))}return e.prototype.ngOnInit=function(){},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(je))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-loader"]],inputs:{logo:"logo"},decls:6,vars:3,consts:[[1,"progress-loader",2,"z-index","9999",3,"hidden"],[1,"loading-spinner"],["style","width: 100px;","src","data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==",4,"ngIf"],["style","width: 100px;",3,"src",4,"ngIf"],["id","loadingMessage",1,"loading-message"],["src","data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==",2,"width","100px"],[2,"width","100px",3,"src"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵtemplate(2,Ae,1,0,"img",2),t.ɵɵtemplate(3,Re,1,1,"img",3),t.ɵɵelementStart(4,"span",4),t.ɵɵtext(5,"Please wait..."),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵproperty("hidden",!n.loading),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",""==n.logo),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",""!=n.logo))},directives:[i.NgIf],styles:[".loading-spinner[_ngcontent-%COMP%]{background-color:#0000001f;position:absolute;width:100%;top:0;left:0;height:100vh;align-items:center;justify-content:center;display:-ms-grid;display:grid}.loading-spinner[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{-ms-grid-row-align:end;align-self:end}.loading-message[_ngcontent-%COMP%]{text-align:center;-ms-grid-row-align:start;align-self:start}"]}),e}(),Ve=function(){function e(){}return e.ɵmod=t.ɵɵdefineNgModule({type:e}),e.ɵinj=t.ɵɵdefineInjector({factory:function(t){return new(t||e)},providers:[{provide:n.MAT_DIALOG_DEFAULT_OPTIONS,useValue:{disableClose:!0,hasBackdrop:!0}},{provide:y.MAT_DATE_LOCALE,useValue:"en-GB"}],imports:[[],i.CommonModule,L.FormsModule,L.ReactiveFormsModule,w.MatMenuModule,P.MatSliderModule,O.MatTableModule,b.MatPaginatorModule,h.MatCheckboxModule,f.MatBadgeModule,r.MatButtonModule,S.MatIconModule,n.MatDialogModule,s.MatSnackBarModule,T.MatTabsModule,a.MatFormFieldModule,C.MatInputModule,g.MatCardModule,v.MatChipsModule,k.MatSelectModule,y.MatNativeDateModule,E.MatProgressSpinnerModule,M.MatListModule,u.MatAutocompleteModule,F.MatTooltipModule,N.MatSortModule,x.MatDatepickerModule,D.MatStepperModule,I.MatRadioModule]}),e}();("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(Ve,{exports:[i.CommonModule,L.FormsModule,L.ReactiveFormsModule,w.MatMenuModule,P.MatSliderModule,O.MatTableModule,b.MatPaginatorModule,h.MatCheckboxModule,f.MatBadgeModule,r.MatButtonModule,S.MatIconModule,n.MatDialogModule,s.MatSnackBarModule,T.MatTabsModule,a.MatFormFieldModule,C.MatInputModule,g.MatCardModule,v.MatChipsModule,k.MatSelectModule,y.MatNativeDateModule,E.MatProgressSpinnerModule,M.MatListModule,u.MatAutocompleteModule,F.MatTooltipModule,N.MatSortModule,x.MatDatepickerModule,D.MatStepperModule,I.MatRadioModule]});var _e=function(){function e(e,t,n,i,a){this.loaderService=e,this.messageService=t,this.authService=n,this.router=i,this.logService=a,this.requests=[]}return e.prototype.removeRequest=function(e){var t=this.requests.indexOf(e);t>=0&&this.requests.splice(t,1),this.loaderService.isLoading.next(this.requests.length>0)},e.prototype.intercept=function(e,t){var n=this,i=e.clone({setHeaders:{Authorization:"Bearer "+this.authService.tokenSource.value}});return this.requests.push(i),this.requests.length>1&&this.logService.info("Multiple connections detected > "+this.requests.length),this.loaderService.isLoading.next(!0),o.Observable.create((function(e){var a=t.handle(i).subscribe((function(t){t instanceof m.HttpResponse&&(n.removeRequest(i),e.next(t))}),(function(t){n.removeRequest(i),e.error(t),401===t.status?(n.router.navigate(["login"]),n.messageService.toast("Unauthorised: Please login again")):500===t.status?(console.log(t.error),n.messageService.toast("System Error")):"Unknown Error"==t.statusText?n.messageService.toast("Connection Error"):n.messageService.toast("Error: "+t.statusText)}),(function(){n.removeRequest(i),e.complete()}));return function(){n.removeRequest(i),a.unsubscribe()}}))},e.ɵfac=function(n){return new(n||e)(t.ɵɵinject(je),t.ɵɵinject(re),t.ɵɵinject(Fe),t.ɵɵinject(d.Router),t.ɵɵinject(Te))},e.ɵprov=t.ɵɵdefineInjectable({token:e,factory:e.ɵfac}),e}(),ze=function(){function e(){}return e.prototype.ngOnInit=function(){},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["lib-tin-spa"]],decls:2,vars:0,template:function(e,n){1&e&&(t.ɵɵelementStart(0,"p"),t.ɵɵtext(1," tin-spa works! "),t.ɵɵelementEnd())},encapsulation:2}),e}();function Be(e,n){if(1&e&&t.ɵɵelement(0,"img",8),2&e){var i=t.ɵɵnextContext(2);t.ɵɵproperty("src",i.appConfig.logo,t.ɵɵsanitizeUrl)}}function qe(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",19),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(i);var e=t.ɵɵnextContext().$implicit;return t.ɵɵnextContext(3).redirectTo(e.link)})),t.ɵɵtext(1),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(a.display)}}function He(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",19),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(i);var e=t.ɵɵnextContext().$implicit;return t.ɵɵnextContext(3).redirectTo(e.link)})),t.ɵɵtext(1),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(a.display)}}function $e(e,n){if(1&e&&(t.ɵɵelementStart(0,"button",20),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext().$implicit,a=t.ɵɵreference(5);t.ɵɵproperty("matMenuTriggerFor",a),t.ɵɵadvance(1),t.ɵɵtextInterpolate(i.display)}}function Ge(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",22),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(i);var e=t.ɵɵnextContext().$implicit;return t.ɵɵnextContext(4).redirectTo(e.link)})),t.ɵɵtext(1),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(a.display)}}function We(e,n){if(1&e&&(t.ɵɵelementStart(0,"div"),t.ɵɵtemplate(1,Ge,2,1,"button",21),t.ɵɵelementEnd()),2&e){var i=n.$implicit,a=t.ɵɵnextContext(4);t.ɵɵadvance(1),t.ɵɵproperty("ngIf",a.myRole[i.name]&&i.showMenu)}}function Ze(e,n){if(1&e&&(t.ɵɵelementStart(0,"div"),t.ɵɵtemplate(1,qe,2,1,"button",16),t.ɵɵtemplate(2,He,2,1,"button",16),t.ɵɵtemplate(3,$e,2,2,"button",17),t.ɵɵelementStart(4,"mat-menu",null,18),t.ɵɵtemplate(6,We,2,1,"div",15),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var i=n.$implicit,a=t.ɵɵnextContext(3);t.ɵɵadvance(1),t.ɵɵproperty("ngIf",a.myRole[i.name]&&!i.capSubItems&&i.showMenu),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",a.myRole[i.name]&&i.capSubItems&&i.showMenu&&i.ignoreSubsDisplay),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",a.myRole[i.name]&&i.capSubItems&&i.showMenu&&!i.ignoreSubsDisplay),t.ɵɵadvance(3),t.ɵɵproperty("ngForOf",i.capSubItems)}}var Je=function(e){return{show:e}};function Qe(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",9),t.ɵɵelementStart(1,"button",10),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext(2).redirectTo("login")})),t.ɵɵelementStart(2,"mat-icon"),t.ɵɵtext(3,"logout"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"button",11),t.ɵɵelementStart(5,"mat-icon"),t.ɵɵtext(6,"account_circle"),t.ɵɵelementEnd(),t.ɵɵtext(7),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"mat-menu",null,12),t.ɵɵelementStart(10,"button",13),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext(2).redirectTo("home/user/profile")})),t.ɵɵtext(11,"Profile"),t.ɵɵelementEnd(),t.ɵɵelementStart(12,"button",14),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext(2).redirectTo("login")})),t.ɵɵtext(13,"Log Off"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(14,Ze,7,4,"div",15),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵreference(9),r=t.ɵɵnextContext(2);t.ɵɵproperty("ngClass",t.ɵɵpureFunction1(4,Je,r.isExpanded)),t.ɵɵadvance(4),t.ɵɵproperty("matMenuTriggerFor",a),t.ɵɵadvance(3),t.ɵɵtextInterpolate1(" ",r.loggedUserFullName,""),t.ɵɵadvance(7),t.ɵɵproperty("ngForOf",r.appConfig.capItems)}}function Ke(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"header"),t.ɵɵelementStart(1,"nav",1),t.ɵɵelementStart(2,"div",2),t.ɵɵtemplate(3,Be,1,1,"img",3),t.ɵɵelementStart(4,"div",4),t.ɵɵtext(5),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"button",5),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().toggle()})),t.ɵɵelement(7,"span",6),t.ɵɵelementEnd(),t.ɵɵtemplate(8,Qe,15,6,"div",7),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵadvance(3),t.ɵɵproperty("ngIf",""!=a.appConfig.logo),t.ɵɵadvance(2),t.ɵɵtextInterpolate1(" ",a.appConfig.appName," "),t.ɵɵadvance(1),t.ɵɵattribute("aria-expanded",a.isExpanded),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",a.myRole)}}var Ye=function(){function e(e,t){this.router=e,this.authService=t,this.isExpanded=!1,this.appConfig=new we}return e.prototype.ngOnInit=function(){var e=this;this.authService.loggedUserFullName.subscribe((function(t){return e.loggedUserFullName=t})),this.authService.myRoleObserv.subscribe((function(t){return e.myRole=t})),this.authService.loggedinObserv.subscribe((function(t){return e.loggedin=t}))},e.prototype.collapse=function(){this.isExpanded=!1},e.prototype.toggle=function(){this.isExpanded=!this.isExpanded},e.prototype.redirectTo=function(e){""!=e&&this.router.navigate([e])},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(d.Router),t.ɵɵdirectiveInject(Fe))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-nav-menu"]],inputs:{appConfig:"appConfig"},decls:1,vars:1,consts:[[4,"ngIf"],[1,"toolbar","navbar","navbar-expand-sm","navbar-toggleable-sm","navbar-light","border-bottom","box-shadow","mb-3",2,"padding-right","10px"],[1,"container-fluid",2,"padding-right","0px"],["style","height: 50px; margin-right: 2em",3,"src",4,"ngIf"],[2,"font-size","20px"],["type","button","data-toggle","collapse","data-target",".navbar-collapse","aria-label","Toggle navigation",1,"navbar-toggler",3,"click"],[1,"navbar-toggler-icon"],["class","navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse stack-top","style","margin-right: 0px;",3,"ngClass",4,"ngIf"],[2,"height","50px","margin-right","2em",3,"src"],[1,"navbar-collapse","collapse","d-sm-inline-flex","flex-sm-row-reverse","stack-top",2,"margin-right","0px",3,"ngClass"],["mat-icon-button","",3,"click"],["id","btnUser","mat-button","",2,"margin-left","2em",3,"matMenuTriggerFor"],["profileMenu","matMenu"],["id","btnProfile","mat-menu-item","",3,"click"],["id","btnLogOff","mat-menu-item","",3,"click"],[4,"ngFor","ngForOf"],["id","btnMenu","mat-button","",3,"click",4,"ngIf"],["id","btnMenu","mat-button","",3,"matMenuTriggerFor",4,"ngIf"],["adminMenu","matMenu"],["id","btnMenu","mat-button","",3,"click"],["id","btnMenu","mat-button","",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click",4,"ngIf"],["mat-menu-item","",3,"click"]],template:function(e,n){1&e&&t.ɵɵtemplate(0,Ke,9,4,"header",0),2&e&&t.ɵɵproperty("ngIf",n.loggedin)},directives:[i.NgIf,i.NgClass,r.MatButton,S.MatIcon,w.MatMenuTrigger,w._MatMenu,w.MatMenuItem,i.NgForOf],styles:["a.navbar-brand[_ngcontent-%COMP%]{white-space:normal;text-align:center;word-break:break-all}html[_ngcontent-%COMP%]{font-size:14px}@media (min-width:768px){html[_ngcontent-%COMP%]{font-size:16px}}.box-shadow[_ngcontent-%COMP%]{box-shadow:0 .25rem .75rem rgba(0,0,0,.05)}.toolbar[_ngcontent-%COMP%]{height:60px;display:flex;align-items:center;background-color:#03a;color:#fff;font-weight:600}.stack-top[_ngcontent-%COMP%]{z-index:9;margin:20px}"]}),e}(),Xe=function(){function e(e,t,n,i){var a=this;this.idle=e,this.keepalive=t,this.authService=n,this.router=i,this.loggedin=!1,this.idleState="Not started.",this.timedOut=!1,this.lastPing=null,this.isWarning=!1,this.authService.loggedinObserv.subscribe((function(e){a.loggedin=e})),e.setIdle(900),e.setTimeout(10),e.setInterrupts(U.DEFAULT_INTERRUPTSOURCES),e.onIdleStart.subscribe((function(){a.idleState="You've gone idle!"})),e.onIdleEnd.subscribe((function(){a.idleState="No longer idle.",a.isWarning=!1})),e.onTimeoutWarning.subscribe((function(e){a.idleState="You will be signed out in "+e+" seconds!",a.loggedin&&(a.isWarning=!0)})),e.onTimeout.subscribe((function(){a.idleState="Timed out!",a.timedOut=!0,a.stopWatch()})),t.interval(15),t.onPing.subscribe((function(){a.lastPing=new Date})),this.startWatch()}return e.prototype.ngOnInit=function(){},e.prototype.startWatch=function(){this.idle.watch(),this.idleState="Started.",this.timedOut=!1,this.isWarning=!1},e.prototype.stopWatch=function(){this.idle.stop(),this.isWarning=!1,this.router.navigate(["login"])},e.prototype.using=function(){this.isWarning=!1},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(U.Idle),t.ɵɵdirectiveInject(j.Keepalive),t.ɵɵdirectiveInject(Fe),t.ɵɵdirectiveInject(d.Router))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-timeout"]],decls:22,vars:2,consts:[[1,"loading-spinner",3,"hidden"],[2,"width","500px","text-align","center"],[1,"row"],[1,"col"],["src","data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==",2,"width","100px"],[1,"mat-elevation-z3"],[1,"row","justify-content-around"],[1,"col-2"],["mat-stroked-button","","color","primary",2,"width","100px",3,"click"],[1,"col-4"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵelementStart(3,"div",3),t.ɵɵelement(4,"img",4),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"mat-card",5),t.ɵɵelementStart(6,"mat-card-header"),t.ɵɵelementStart(7,"h5"),t.ɵɵtext(8,"Are you still there ?"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"mat-card-content"),t.ɵɵelement(10,"br"),t.ɵɵelementStart(11,"span"),t.ɵɵtext(12),t.ɵɵelementEnd(),t.ɵɵelement(13,"br"),t.ɵɵelementEnd(),t.ɵɵelementStart(14,"mat-card-actions"),t.ɵɵelementStart(15,"div",6),t.ɵɵelementStart(16,"div",7),t.ɵɵelementStart(17,"button",8),t.ɵɵlistener("click",(function(){return n.using()})),t.ɵɵtext(18,"Yes"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(19,"div",9),t.ɵɵelementStart(20,"button",8),t.ɵɵlistener("click",(function(){return n.stopWatch()})),t.ɵɵtext(21,"No"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵproperty("hidden",!n.isWarning),t.ɵɵadvance(12),t.ɵɵtextInterpolate(n.idleState))},directives:[g.MatCard,g.MatCardHeader,g.MatCardContent,g.MatCardActions,r.MatButton],styles:[".loading-spinner[_ngcontent-%COMP%]{background-color:#0000001f;position:absolute;width:100%;top:0;left:0;height:100vh;align-items:center;justify-content:center;display:-ms-grid;display:grid}.loading-spinner[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{-ms-grid-row-align:end;align-self:end}.loading-message[_ngcontent-%COMP%]{text-align:center;-ms-grid-row-align:start;align-self:start}"]}),e}(),et=["tablePaginator"];function tt(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",8),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext(2).create()})),t.ɵɵtext(1),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext(2);t.ɵɵproperty("disabled",!a.config.create.enabled),t.ɵɵadvance(1),t.ɵɵtextInterpolate(a.config.create.display)}}function nt(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",9),t.ɵɵelementStart(1,"mat-form-field",10),t.ɵɵelementStart(2,"mat-label"),t.ɵɵtext(3,"Filter"),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"input",11),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(i),t.ɵɵnextContext(2)._filterText=e}))("keyup",(function(e){return t.ɵɵrestoreView(i),t.ɵɵnextContext(2).applyFilter(e.target.value)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"button",12),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext(2).load()})),t.ɵɵelementStart(6,"mat-icon",13),t.ɵɵtext(7,"refresh"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext(2);t.ɵɵadvance(4),t.ɵɵproperty("ngModel",a._filterText)}}function it(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",4),t.ɵɵelementStart(1,"div",5),t.ɵɵtemplate(2,tt,2,2,"button",6),t.ɵɵelementEnd(),t.ɵɵtemplate(3,nt,8,1,"div",7),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵproperty("ngIf",i.config.create),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",i.config.enableFilter)}}function at(e,n){if(1&e&&(t.ɵɵelementStart(0,"th",24),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",i.display," ")}}function rt(e,n){if(1&e&&(t.ɵɵelementStart(0,"div"),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext().$implicit,a=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",i[a.name],"")}}var ot=function(e){return{color:e}};function lt(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",29),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext().$implicit,a=t.ɵɵnextContext().$implicit;t.ɵɵproperty("ngStyle",t.ɵɵpureFunction1(2,ot,a.color.name)),t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",i[a.name]," ")}}function st(e,n){if(1&e&&(t.ɵɵelementStart(0,"div"),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext().$implicit,a=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",i[a.name]," ")}}function ct(e,n){if(1&e&&(t.ɵɵelementStart(0,"div"),t.ɵɵtext(1),t.ɵɵpipe(2,"date"),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext().$implicit,a=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",t.ɵɵpipeBind2(2,1,i[a.name],"dd/MM/yyyy"),"")}}function pt(e,n){if(1&e&&(t.ɵɵelementStart(0,"div"),t.ɵɵtext(1),t.ɵɵpipe(2,"date"),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext().$implicit,a=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",t.ɵɵpipeBind2(2,1,i[a.name],"dd/MM/yyyy HH:mm"),"")}}function dt(e,n){if(1&e&&(t.ɵɵelementStart(0,"mat-icon",31),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext().$implicit;t.ɵɵproperty("ngStyle",t.ɵɵpureFunction1(3,ot,i.color))("matTooltip",i.hint),t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",i.name," ")}}function mt(e,n){if(1&e&&(t.ɵɵelementContainerStart(0),t.ɵɵtemplate(1,dt,2,5,"mat-icon",30),t.ɵɵelementContainerEnd()),2&e){var i=n.$implicit,a=t.ɵɵnextContext().$implicit,r=t.ɵɵnextContext().$implicit,o=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵproperty("ngIf",r.type==o.colType.Icon&&o.test(a[i.field],i.operator,i.value))}}function ut(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",25),t.ɵɵtemplate(1,rt,2,1,"div",26),t.ɵɵtemplate(2,lt,2,4,"div",27),t.ɵɵtemplate(3,st,2,1,"div",26),t.ɵɵtemplate(4,ct,3,4,"div",26),t.ɵɵtemplate(5,pt,3,4,"div",26),t.ɵɵtemplate(6,mt,2,1,"ng-container",28),t.ɵɵelementEnd()),2&e){var i=n.$implicit,a=t.ɵɵnextContext().$implicit,r=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵproperty("ngIf",(a.type==r.colType.String||null==a.type)&&null==a.color),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",(a.type==r.colType.String||null==a.type)&&null!=a.color&&r.test(i[a.color.field],a.color.operator,a.color.value)),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",(a.type==r.colType.String||null==a.type)&&null!=a.color&&!r.test(i[a.color.field],a.color.operator,a.color.value)),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",a.type==r.colType.Date),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",a.type==r.colType.DateTime),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",a.icons)}}function ft(e,n){if(1&e&&(t.ɵɵelementContainerStart(0,22),t.ɵɵtemplate(1,at,2,1,"th",18),t.ɵɵtemplate(2,ut,7,6,"td",23),t.ɵɵelementContainerEnd()),2&e){var i=n.$implicit;t.ɵɵproperty("matColumnDef",i.name)}}function gt(e,n){1&e&&(t.ɵɵelementStart(0,"th",24),t.ɵɵtext(1," Action "),t.ɵɵelementEnd())}function ht(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",33),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(i);var e=t.ɵɵnextContext().$implicit,n=t.ɵɵnextContext().$implicit;return t.ɵɵnextContext(2).do(e.name,n)})),t.ɵɵelementStart(1,"mat-icon"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext().$implicit,r=t.ɵɵnextContext().$implicit;t.ɵɵproperty("disabled",a.disable&&r[a.disable.field]==a.disable.value)("color",null==a.color?"primary":a.color)("matTooltip",a.hint),t.ɵɵadvance(2),t.ɵɵtextInterpolate(a.icon)}}function vt(e,n){if(1&e&&(t.ɵɵelementContainerStart(0),t.ɵɵtemplate(1,ht,3,4,"button",32),t.ɵɵelementContainerEnd()),2&e){var i=n.$implicit,a=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngIf",i.disappear&&a[i.disappear.field]!=i.disappear.value||!i.disappear)}}function yt(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",25),t.ɵɵtemplate(1,vt,2,1,"ng-container",28),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext(2);t.ɵɵstyleMap(i.styleString+";padding-right: 0px;"),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",i.config.actions)}}function xt(e,n){1&e&&t.ɵɵelement(0,"tr",34)}var St=function(e){return{"make-gray":e}};function Ct(e,n){if(1&e&&t.ɵɵelement(0,"tr",35),2&e){var i=n.$implicit,a=t.ɵɵnextContext(2);t.ɵɵproperty("ngClass",t.ɵɵpureFunction1(1,St,i[a.config.greyout.field]==a.config.greyout.value))}}function Mt(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",14),t.ɵɵelementStart(1,"table",15),t.ɵɵtemplate(2,ft,3,1,"ng-container",16),t.ɵɵelementContainerStart(3,17),t.ɵɵtemplate(4,gt,2,0,"th",18),t.ɵɵtemplate(5,yt,2,3,"td",19),t.ɵɵelementContainerEnd(),t.ɵɵtemplate(6,xt,1,0,"tr",20),t.ɵɵtemplate(7,Ct,1,3,"tr",21),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵproperty("dataSource",i.data),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",i.config.columns),t.ɵɵadvance(4),t.ɵɵproperty("matHeaderRowDef",i.displayedColumns),t.ɵɵadvance(1),t.ɵɵproperty("matRowDefColumns",i.displayedColumns)}}var wt=function(){return[10,50,100]},bt=function(){function n(){this.dataChange=new t.EventEmitter,this.buttonClick=new t.EventEmitter,this.loadClick=new t.EventEmitter,this.createClick=new t.EventEmitter,this.colType=e.TableColumnType,this.op=e.Operator,this.displayedColumns=[],this._filterText=""}return n.prototype.ngOnInit=function(){var e=this;this.config.columns.forEach((function(t){e.displayedColumns.push(t.name)})),this.displayedColumns.push("Action"),this.styleString="width: "+50*this.config.actions.length+"px"},n.prototype.ngOnChanges=function(){this.data=new O.MatTableDataSource(this.data),this.data.paginator=this.tablePaginator,this.applyFilter(this._filterText)},n.prototype.applyFilter=function(e){this.data.filter=e.trim().toLowerCase()},n.prototype.do=function(e,t){var n=new Ce;n.name=e,n.value=t,this.buttonClick.emit(n)},n.prototype.create=function(){this.createClick.emit()},n.prototype.load=function(){this.loadClick.emit()},n.prototype.test=function(t,n,i){return n==e.Operator.Equal?t==i:n==e.Operator.Greater?t>i:n==e.Operator.Less?t<i:n==e.Operator.NotEqual?t!=i:void 0},n.ɵfac=function(e){return new(e||n)},n.ɵcmp=t.ɵɵdefineComponent({type:n,selectors:[["spa-table"]],viewQuery:function(e,n){var i;(1&e&&t.ɵɵviewQuery(et,!0),2&e)&&(t.ɵɵqueryRefresh(i=t.ɵɵloadQuery())&&(n.tablePaginator=i.first))},inputs:{config:"config",data:"data"},outputs:{dataChange:"dataChange",buttonClick:"buttonClick",loadClick:"loadClick",createClick:"createClick"},features:[t.ɵɵNgOnChangesFeature],decls:5,vars:4,consts:[["class","row justify-content-between","style","padding-bottom: 10px",4,"ngIf"],["class","mat-elevation-z8",4,"ngIf"],["showFirstLastButtons","",3,"pageSizeOptions"],["tablePaginator",""],[1,"row","justify-content-between",2,"padding-bottom","10px"],[1,"col"],["mat-raised-button","","color","primary",3,"disabled","click",4,"ngIf"],["class","col d-flex justify-content-end",4,"ngIf"],["mat-raised-button","","color","primary",3,"disabled","click"],[1,"col","d-flex","justify-content-end"],[2,"font-size","12px","margin-right","5px"],["matInput","","placeholder","Enter Filter text","autocomplete","off",3,"ngModel","ngModelChange","keyup"],["mat-mini-fab","","color","primary","matTooltip","refresh data","matTooltipPosition","right",2,"margin-top","5px",3,"click"],[1,"refreshIcon"],[1,"mat-elevation-z8"],["mat-table","",3,"dataSource"],[3,"matColumnDef",4,"ngFor","ngForOf"],["matColumnDef","Action"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"style",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"ngClass",4,"matRowDef","matRowDefColumns"],[3,"matColumnDef"],["mat-cell","",4,"matCellDef"],["mat-header-cell",""],["mat-cell",""],[4,"ngIf"],[3,"ngStyle",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"ngStyle"],["matTooltipPosition","above",3,"ngStyle","matTooltip",4,"ngIf"],["matTooltipPosition","above",3,"ngStyle","matTooltip"],["mat-mini-fab","","matTooltipPosition","above","style","margin-right:5px",3,"disabled","color","matTooltip","click",4,"ngIf"],["mat-mini-fab","","matTooltipPosition","above",2,"margin-right","5px",3,"disabled","color","matTooltip","click"],["mat-header-row",""],["mat-row","",3,"ngClass"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div"),t.ɵɵtemplate(1,it,4,2,"div",0),t.ɵɵtemplate(2,Mt,8,4,"div",1),t.ɵɵelement(3,"mat-paginator",2,3),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.config.create.enabled||n.config.enableFilter),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.data),t.ɵɵadvance(1),t.ɵɵproperty("pageSizeOptions",t.ɵɵpureFunction0(3,wt)))},directives:[i.NgIf,b.MatPaginator,r.MatButton,a.MatFormField,a.MatLabel,C.MatInput,L.DefaultValueAccessor,L.NgControlStatus,L.NgModel,F.MatTooltip,S.MatIcon,O.MatTable,i.NgForOf,O.MatColumnDef,O.MatHeaderCellDef,O.MatCellDef,O.MatHeaderRowDef,O.MatRowDef,O.MatHeaderCell,O.MatCell,i.NgStyle,O.MatHeaderRow,O.MatRow,i.NgClass],pipes:[i.DatePipe],styles:[".mat-mini-fab[_ngcontent-%COMP%]{width:32px;height:32px}.mat-mini-fab[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;margin-top:-3px}.make-gray[_ngcontent-%COMP%]{background-color:#d3d3d3}"]}),n}(),Et=function(e,t){return{color:e,"font-size":t}},It=function(e){return{"font-size":e}};function kt(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"mat-card",3),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(i);var e=t.ɵɵnextContext().$implicit;return t.ɵɵnextContext().clicked(e)})),t.ɵɵelementStart(1,"div",4),t.ɵɵelementStart(2,"mat-label",5),t.ɵɵtext(3),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"div",6),t.ɵɵelementStart(5,"mat-label",7),t.ɵɵtext(6),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"mat-icon",8),t.ɵɵtext(8,"info"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext().$implicit,r=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵproperty("ngStyle",t.ɵɵpureFunction2(6,Et,a.tileColor,a.tileName==r.selected?"35px":"30px")),t.ɵɵadvance(1),t.ɵɵtextInterpolate(a.tileValue),t.ɵɵadvance(2),t.ɵɵproperty("ngStyle",t.ɵɵpureFunction1(9,It,a.tileName==r.selected?"18px":"12px")),t.ɵɵadvance(1),t.ɵɵtextInterpolate(a.tileName),t.ɵɵadvance(1),t.ɵɵproperty("matTooltip",a.info)("ngStyle",t.ɵɵpureFunction1(11,It,a.tileName==r.selected?"20px":"17px"))}}function Pt(e,n){if(1&e&&(t.ɵɵelementContainerStart(0),t.ɵɵtemplate(1,kt,9,13,"mat-card",2),t.ɵɵelementContainerEnd()),2&e){var i=n.$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngIf",i.visible)}}var Nt=function(){function e(){this.clickable=!1,this.tileClick=new t.EventEmitter,this.selected=""}return e.prototype.ngOnInit=function(){},e.prototype.clicked=function(e){this.clickable&&(this.selected==e.tileName?(this.tileClick.emit(""),this.selected=""):(this.tileClick.emit(e.tileName),this.selected=e.tileName))},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-tiles"]],inputs:{tiles:"tiles",clickable:"clickable"},outputs:{tileClick:"tileClick"},decls:2,vars:1,consts:[[1,"row","align-items-center"],[4,"ngFor","ngForOf"],["class","col","style","margin-left: 10px;margin-right: 10px",3,"click",4,"ngIf"],[1,"col",2,"margin-left","10px","margin-right","10px",3,"click"],[1,"row","d-flex","justify-content-center"],[2,"font-weight","bold",3,"ngStyle"],[1,"row","d-flex","justify-content-center","row","align-items-center"],[2,"padding-left","5px","padding-right","5px",3,"ngStyle"],["matTooltipPosition","above",2,"color","steelblue",3,"matTooltip","ngStyle"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵtemplate(1,Pt,2,1,"ng-container",1),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",n.tiles))},directives:[i.NgForOf,i.NgIf,g.MatCard,a.MatLabel,i.NgStyle,S.MatIcon,F.MatTooltip],styles:[""]}),e}(),Dt=function(){function e(){this.date=new L.FormControl(new Date),this.display="",this.readonly=!1,this.currentYear=(new Date).getFullYear(),this.min=new L.FormControl(new Date(this.currentYear-50,0,1)),this.max=new L.FormControl(new Date(this.currentYear+50,0,1)),this.dateChange=new t.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.onChangeEvent=function(){this.dateChange.emit()},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-date"]],inputs:{date:"date",display:"display",readonly:"readonly",min:"min",max:"max"},outputs:{dateChange:"dateChange"},decls:5,vars:8,consts:[[2,"width","150px","margin-right","20px"],["matInput","",3,"formControl","min","max","matDatepicker","placeholder","readonly","disabled","dateInput"],["matSuffix","",3,"for"],["picker_date",""]],template:function(e,n){if(1&e&&(t.ɵɵelementStart(0,"mat-form-field",0),t.ɵɵelementStart(1,"input",1),t.ɵɵlistener("dateInput",(function(){return n.onChangeEvent()})),t.ɵɵelementEnd(),t.ɵɵelement(2,"mat-datepicker-toggle",2),t.ɵɵelement(3,"mat-datepicker",null,3),t.ɵɵelementEnd()),2&e){var i=t.ɵɵreference(4);t.ɵɵadvance(1),t.ɵɵproperty("formControl",n.date)("min",n.min.value)("max",n.max.value)("matDatepicker",i)("placeholder",n.display)("readonly",!0)("disabled",n.readonly),t.ɵɵadvance(1),t.ɵɵproperty("for",i)}},directives:[a.MatFormField,C.MatInput,L.DefaultValueAccessor,x.MatDatepickerInput,L.NgControlStatus,L.FormControlDirective,x.MatDatepickerToggle,a.MatSuffix,x.MatDatepicker],styles:[""]}),e}();function Ot(e,n){if(1&e&&(t.ɵɵelementStart(0,"mat-label"),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵtextInterpolate(i.display)}}function Tt(e,n){if(1&e&&(t.ɵɵelementStart(0,"mat-label"),t.ɵɵtext(1),t.ɵɵpipe(2,"date"),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind2(2,1,i.display,"dd/MM/yyyy"))}}function Ft(e,n){if(1&e&&(t.ɵɵelementStart(0,"mat-error"),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵtextInterpolate(i.validate())}}var Lt=function(e){return{width:e}};function jt(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"mat-form-field",1),t.ɵɵtemplate(1,Ot,2,1,"mat-label",2),t.ɵɵtemplate(2,Tt,3,4,"mat-label",2),t.ɵɵelementStart(3,"input",3),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(i),t.ɵɵnextContext().value=e}))("change",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().changed()}))("blur",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().leaved()}))("keyup.enter",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().enterPressed()})),t.ɵɵelementEnd(),t.ɵɵtemplate(4,Ft,2,1,"mat-error",2),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("hintLabel",a.hint)("ngStyle",t.ɵɵpureFunction1(11,Lt,a.width)),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","text"==a.format),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","date"==a.format),t.ɵɵadvance(1),t.ɵɵproperty("ngModel",a.value)("type",a.type)("placeholder",a.placeholder)("formControl",a.control)("required",a.required)("readonly",a.readonly),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",a.control.invalid)}}function At(e,n){if(1&e&&(t.ɵɵelementStart(0,"mat-error"),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵtextInterpolate(i.validate())}}function Rt(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"mat-form-field",1),t.ɵɵelementStart(1,"mat-label"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"textarea",4),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(i),t.ɵɵnextContext().value=e}))("change",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().changed()}))("keyup.enter",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().enterPressed()})),t.ɵɵelementEnd(),t.ɵɵtemplate(4,At,2,1,"mat-error",2),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("hintLabel",a.hint)("ngStyle",t.ɵɵpureFunction1(10,Lt,a.width)),t.ɵɵadvance(2),t.ɵɵtextInterpolate(a.display),t.ɵɵadvance(1),t.ɵɵproperty("rows",a.rows)("ngModel",a.value)("placeholder",a.placeholder)("formControl",a.control)("required",a.required)("readonly",a.readonly),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",a.control.invalid)}}var Ut=function(){function e(){this.hideRequiredControl=new L.FormControl(!0),this.readonly=!1,this.hint="",this.display="",this.placeholder="",this.value="",this.valueChange=new t.EventEmitter,this.format="text",this.type="",this.leave=new t.EventEmitter,this.enterPress=new t.EventEmitter,this.rows="",this.width="100%",this.options=[],this.optionValue="",this.optionDisplay="",this.myControl=new L.FormControl,this.required=!0,this.min=0,this.max=9e15,this.regex="",this.control=new L.FormControl(this.value,[L.Validators.required,L.Validators.minLength(this.min),L.Validators.maxLength(this.max),L.Validators.pattern(this.regex)])}return e.prototype.ngOnInit=function(){this.options.length>0&&this.initFilter(),""==this.placeholder&&(this.placeholder="Enter "+this.display)},e.prototype.ngAfterViewInit=function(){this.readonly&&(this.control.setValidators(null),this.control.updateValueAndValidity()),this.required||this.readonly||(this.control.setValidators([L.Validators.minLength(this.min),L.Validators.maxLength(this.max),L.Validators.pattern(this.regex)]),this.control.updateValueAndValidity())},e.prototype.initFilter=function(){var e=this;this.filteredOptions=this.myControl.valueChanges.pipe(l.startWith(""),l.map((function(t){return e._filter(t)})))},e.prototype._filter=function(e){var t=this,n=e.toLowerCase();return this.options.filter((function(e){return e[""+t.optionDisplay].toLowerCase().includes(n)}))},e.prototype.changed=function(){this.valueChange.emit(this.value)},e.prototype.changed2=function(){this.valueChange.emit(this.myControl.value)},e.prototype.leaved=function(){this.leave.emit()},e.prototype.enterPressed=function(){this.enterPress.emit()},e.prototype.validate=function(){return(this.required||this.min>0)&&this.control.hasError("required")?"Required":this.control.hasError("minlength")?"Minimun length is "+this.min:this.control.hasError("maxlength")?"Maximum length is "+this.max:this.control.hasError("pattern")?"Invalid Input":""},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-text"]],inputs:{readonly:"readonly",hint:"hint",display:"display",placeholder:"placeholder",value:"value",format:"format",type:"type",rows:"rows",width:"width",options:"options",optionValue:"optionValue",optionDisplay:"optionDisplay",required:"required",min:"min",max:"max",regex:"regex"},outputs:{valueChange:"valueChange",leave:"leave",enterPress:"enterPress"},decls:2,vars:2,consts:[["hideRequiredMarker","true","style","padding-right: 20px;",3,"hintLabel","ngStyle",4,"ngIf"],["hideRequiredMarker","true",2,"padding-right","20px",3,"hintLabel","ngStyle"],[4,"ngIf"],["matInput","","autocomplete","off",3,"ngModel","type","placeholder","formControl","required","readonly","ngModelChange","change","blur","keyup.enter"],["matInput","","autocomplete","off",3,"rows","ngModel","placeholder","formControl","required","readonly","ngModelChange","change","keyup.enter"]],template:function(e,n){1&e&&(t.ɵɵtemplate(0,jt,5,13,"mat-form-field",0),t.ɵɵtemplate(1,Rt,5,12,"mat-form-field",0)),2&e&&(t.ɵɵproperty("ngIf",""==n.rows&&0==n.options.length),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",""!=n.rows&&0==n.options.length))},directives:[i.NgIf,a.MatFormField,i.NgStyle,C.MatInput,L.DefaultValueAccessor,L.NgControlStatus,L.FormControlDirective,L.RequiredValidator,a.MatLabel,a.MatError],pipes:[i.DatePipe],styles:[""]}),e}();function Vt(e,n){if(1&e&&(t.ɵɵelementStart(0,"mat-icon",6),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵtextInterpolate(i.icon)}}function _t(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"mat-icon",7),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(i);var e=t.ɵɵnextContext().$implicit;return t.ɵɵnextContext().removed(e)})),t.ɵɵtext(1,"cancel"),t.ɵɵelementEnd()}}var zt=function(e){return{"padding-right":e}};function Bt(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"mat-chip",3),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(i);var e=n.$implicit;return t.ɵɵnextContext().clicked(e)})),t.ɵɵtemplate(1,Vt,2,1,"mat-icon",4),t.ɵɵtext(2),t.ɵɵtemplate(3,_t,2,0,"mat-icon",5),t.ɵɵelementEnd()}if(2&e){var a=n.$implicit,r=t.ɵɵnextContext();t.ɵɵproperty("removable",r.removable)("ngStyle",t.ɵɵpureFunction1(5,zt,r.removable?"5px":"12px")),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",""!=r.icon),t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",a," "),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",r.removable)}}var qt=function(){function e(e){this.messageService=e,this.icon="",this.removable=!1,this.addable=!1,this.click=new t.EventEmitter,this.remove=new t.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.clicked=function(e){"string"==typeof e&&e&&this.click.emit(e)},e.prototype.removed=function(e){var t=this;this.messageService.confirm("Remove "+e+" ?").subscribe((function(n){"yes"==n&&t.remove.emit(e)}))},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(re))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-chips"]],inputs:{icon:"icon",removable:"removable",addable:"addable",chips:"chips"},outputs:{click:"click",remove:"remove"},decls:4,vars:1,consts:[[1,"row","mt-1",2,"margin-left","1em"],["chipList",""],["selectable","","style","font-size: 12px;",3,"removable","ngStyle","click",4,"ngFor","ngForOf"],["selectable","",2,"font-size","12px",3,"removable","ngStyle","click"],["color","primary","style","font-size: 22px;",4,"ngIf"],["style","font-size: 20px; margin-left: 5px;margin-top: 3px;margin-right: 0px; color: grey;",3,"click",4,"ngIf"],["color","primary",2,"font-size","22px"],[2,"font-size","20px","margin-left","5px","margin-top","3px","margin-right","0px","color","grey",3,"click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"mat-chip-list",null,1),t.ɵɵtemplate(3,Bt,4,7,"mat-chip",2),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(3),t.ɵɵproperty("ngForOf",n.chips))},directives:[v.MatChipList,i.NgForOf,v.MatChip,i.NgStyle,i.NgIf,S.MatIcon],styles:[""]}),e}();function Ht(e,n){if(1&e&&t.ɵɵelement(0,"ngx-doc-viewer",9),2&e){var i=t.ɵɵnextContext();t.ɵɵproperty("url",i.currentFileUrl)}}function $t(e,n){1&e&&(t.ɵɵelementStart(0,"div",10),t.ɵɵtext(1," This file type will be downloaded "),t.ɵɵelementEnd())}var Gt=function(){function e(e,t){this.httpService=e,this.data=t,this.isProcessing=!1,this.fileNames=new Array,this.currIndex=0,this.currentFileUrl="",this.imageDoc=!1}return e.prototype.ngOnInit=function(){this.fileNames=this.data.fileNames,this.path=this.data.path,this.fileName=this.data.fileName,this.currIndex=this.data.fileNames.indexOf(this.fileName),this.setURL()},e.prototype.previous=function(){0!=this.fileNames.length&&(this.currIndex-1>=0?this.currIndex=this.currIndex-1:0==this.currIndex&&(this.currIndex=this.fileNames.length-1),this.setURL())},e.prototype.next=function(){0!=this.fileNames.length&&(this.currIndex+1<this.fileNames.length?this.currIndex=this.currIndex+1:this.currIndex+1>this.fileNames.length-1&&(this.currIndex=0),this.setURL())},e.prototype.setURL=function(){this.currentFileUrl=""+this.httpService.apiUrl.replace("/api/","/")+this.path.replace("//","/")+"/"+this.fileNames[this.currIndex],this.currentFileUrl.toLocaleLowerCase().endsWith(".pdf")||this.currentFileUrl.toLocaleLowerCase().endsWith(".jpg")||this.currentFileUrl.toLocaleLowerCase().endsWith(".jpeg")?this.imageDoc=!0:(this.imageDoc=!1,window.open(this.currentFileUrl,"_blank"))},e.prototype.change=function(e){this.currIndex=this.fileNames.indexOf(e),this.setURL()},e.ɵfac=function(i){return new(i||e)(t.ɵɵdirectiveInject(Oe),t.ɵɵdirectiveInject(n.MAT_DIALOG_DATA))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["app-editRequest"]],decls:14,vars:5,consts:[[1,"mat-typography"],[1,"row"],[1,"col"],["viewer","url","style","width:100%;height:60vh;",3,"url",4,"ngIf"],["class","d-flex justify-content-center row align-items-center","style","height:60vh;",4,"ngIf"],[1,"col-3"],["display","Documents","icon","description",3,"chips","click"],["mat-button","","cdkFocusInitial","",3,"disabled","click"],["mat-button","","mat-dialog-close",""],["viewer","url",2,"width","100%","height","60vh",3,"url"],[1,"d-flex","justify-content-center","row","align-items-center",2,"height","60vh"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"mat-dialog-content",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵtemplate(3,Ht,1,1,"ngx-doc-viewer",3),t.ɵɵtemplate(4,$t,2,0,"div",4),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"div",5),t.ɵɵelementStart(6,"spa-chips",6),t.ɵɵlistener("click",(function(e){return n.change(e)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"mat-dialog-actions"),t.ɵɵelementStart(8,"button",7),t.ɵɵlistener("click",(function(){return n.previous()})),t.ɵɵtext(9,"Previous"),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"button",7),t.ɵɵlistener("click",(function(){return n.next()})),t.ɵɵtext(11,"Next"),t.ɵɵelementEnd(),t.ɵɵelementStart(12,"button",8),t.ɵɵtext(13,"Cancel"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(3),t.ɵɵproperty("ngIf",n.imageDoc),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",!n.imageDoc),t.ɵɵadvance(2),t.ɵɵproperty("chips",n.fileNames),t.ɵɵadvance(2),t.ɵɵproperty("disabled",0==n.currIndex),t.ɵɵadvance(2),t.ɵɵproperty("disabled",n.currIndex+1==n.fileNames.length))},directives:[n.MatDialogContent,i.NgIf,qt,n.MatDialogActions,r.MatButton,n.MatDialogClose,R.NgxDocViewerComponent],styles:[".truncate-text[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.align-end[_ngcontent-%COMP%]{justify-content:flex-end}.fx-spacer[_ngcontent-%COMP%]{flex:1 1 auto}"]}),e}();function Wt(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",3),t.ɵɵelementStart(1,"mat-label",4),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵtextInterpolate1(" ",i.title,"")}}function Zt(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",5),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" No ",i.title.toLowerCase()," ")}}var Jt=function(){function e(e){this.dialog=e,this.dir="",this.folderName="",this.fileNames=new Array,this.removable=!1,this.remove=new t.EventEmitter,this.display="Documents",this.title="Documents"}return e.prototype.ngOnInit=function(){},e.prototype.viewDocs=function(e){if("string"==typeof e)this.dialog.open(Gt,{minWidth:"1500px",maxWidth:"80vw",data:{fileNames:this.fileNames,fileName:e,path:this.dir+"/"+this.folderName}})},e.prototype.removed=function(e){this.remove.emit(e)},e.ɵfac=function(i){return new(i||e)(t.ɵɵdirectiveInject(n.MatDialog))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-viewer"]],inputs:{dir:"dir",folderName:"folderName",fileNames:"fileNames",removable:"removable",display:"display",title:"title"},outputs:{remove:"remove"},decls:3,vars:5,consts:[["class","tin-input-row mt-3",4,"ngIf"],["icon","description",3,"chips","title","removable","click","remove"],["class","d-flex justify-content-center row align-items-center","style","max-height:200px",4,"ngIf"],[1,"tin-input-row","mt-3"],[2,"font-size","20px","font-weight","300"],[1,"d-flex","justify-content-center","row","align-items-center",2,"max-height","200px"]],template:function(e,n){1&e&&(t.ɵɵtemplate(0,Wt,3,1,"div",0),t.ɵɵelementStart(1,"spa-chips",1),t.ɵɵlistener("click",(function(e){return n.viewDocs(e)}))("remove",(function(e){return n.removed(e)})),t.ɵɵelementEnd(),t.ɵɵtemplate(2,Zt,2,1,"div",2)),2&e&&(t.ɵɵproperty("ngIf",""!=n.title),t.ɵɵadvance(1),t.ɵɵproperty("chips",n.fileNames)("title",n.title)("removable",n.removable),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",!n.fileNames))},directives:[i.NgIf,qt,a.MatLabel],styles:[".truncate-text[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.align-end[_ngcontent-%COMP%]{justify-content:flex-end}.fx-spacer[_ngcontent-%COMP%]{flex:1 1 auto}"]}),e}();function Qt(e,n){if(1&e&&(t.ɵɵelementStart(0,"label"),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext().$implicit,a=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵtextInterpolate1("(",i[a.optionDisplayExtra],")")}}function Kt(e,n){if(1&e&&(t.ɵɵelementStart(0,"mat-option",5),t.ɵɵtext(1),t.ɵɵtemplate(2,Qt,2,1,"label",4),t.ɵɵelementEnd()),2&e){var i=n.$implicit,a=t.ɵɵnextContext(2);t.ɵɵproperty("value",i[a.optionValue]),t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",i[a.optionDisplay]," "),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",""!=a.optionDisplayExtra&&i[a.optionDisplayExtra]&&""!=i[a.optionDisplayExtra])}}function Yt(e,n){if(1&e&&(t.ɵɵelementStart(0,"mat-hint"),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵtextInterpolate(i.hint)}}var Xt=function(e){return{width:e}};function en(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"mat-form-field",1),t.ɵɵelementStart(1,"mat-label"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"mat-select",2),t.ɵɵlistener("valueChange",(function(e){return t.ɵɵrestoreView(i),t.ɵɵnextContext().value=e}))("selectionChange",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().changed()})),t.ɵɵtemplate(4,Kt,3,3,"mat-option",3),t.ɵɵelementEnd(),t.ɵɵtemplate(5,Yt,2,1,"mat-hint",4),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("ngStyle",t.ɵɵpureFunction1(7,Xt,a.width)),t.ɵɵadvance(2),t.ɵɵtextInterpolate(a.display),t.ɵɵadvance(1),t.ɵɵproperty("value",a.value)("disabled",a.readonly)("placeholder",a.placeholder),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",a.options),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",""!=a.hint)}}var tn=function(){function e(){this.width="100%",this.readonly=!1,this.readonlyMode="",this.hint="",this.placeholder="",this.display="",this.value="",this.optionValue="",this.optionDisplay="",this.optionDisplayExtra="",this.valueChange=new t.EventEmitter}return e.prototype.ngOnInit=function(){""==this.placeholder&&(this.placeholder="Select "+this.display)},e.prototype.ngOnChanges=function(){var e=this;""!=this.readonlyMode&&this.options.length>0&&(this.displayValue=this.options.filter((function(t){return t[""+e.optionValue]==e.value}))[0][""+this.optionDisplay])},e.prototype.changed=function(){this.valueChange.emit(this.value)},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-select"]],inputs:{width:"width",readonly:"readonly",readonlyMode:"readonlyMode",hint:"hint",placeholder:"placeholder",display:"display",value:"value",options:"options",optionValue:"optionValue",optionDisplay:"optionDisplay",optionDisplayExtra:"optionDisplayExtra"},outputs:{valueChange:"valueChange"},features:[t.ɵɵNgOnChangesFeature],decls:1,vars:1,consts:[["style","padding-right: 20px;","floatLabel","always",3,"ngStyle",4,"ngIf"],["floatLabel","always",2,"padding-right","20px",3,"ngStyle"],[3,"value","disabled","placeholder","valueChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],[3,"value"]],template:function(e,n){1&e&&t.ɵɵtemplate(0,en,6,9,"mat-form-field",0),2&e&&t.ɵɵproperty("ngIf",""==n.readonlyMode)},directives:[i.NgIf,a.MatFormField,i.NgStyle,a.MatLabel,k.MatSelect,i.NgForOf,y.MatOption,a.MatHint],styles:[""]}),e}(),nn=function(){function e(){this.readonly=!1,this.display="",this.value=!1,this.valueChange=new t.EventEmitter,this.click=new t.EventEmitter,this.check=new t.EventEmitter,this.uncheck=new t.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.changed=function(){this.valueChange.emit(this.value)},e.prototype.clicked=function(){this.click.emit(),this.value?this.unchecked():this.checked()},e.prototype.checked=function(){this.check.emit()},e.prototype.unchecked=function(){this.uncheck.emit()},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-check"]],inputs:{readonly:"readonly",display:"display",value:"value"},outputs:{valueChange:"valueChange",click:"click",check:"check",uncheck:"uncheck"},decls:2,vars:3,consts:[["color","primary",2,"margin-right","50px","font-size","14px",3,"ngModel","disabled","ngModelChange","change","click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"mat-checkbox",0),t.ɵɵlistener("ngModelChange",(function(e){return n.value=e}))("change",(function(){return n.changed()}))("click",(function(){return n.clicked()})),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e&&(t.ɵɵproperty("ngModel",n.value)("disabled",n.readonly),t.ɵɵadvance(1),t.ɵɵtextInterpolate(n.display))},directives:[h.MatCheckbox,L.NgControlStatus,L.NgModel],styles:[""]}),e}(),an=function(){function e(){this.fileDropped=new t.EventEmitter}return e.prototype.onDragOver=function(e){e.preventDefault(),e.stopPropagation(),this.fileOver=!0},e.prototype.onDragLeave=function(e){e.preventDefault(),e.stopPropagation(),this.fileOver=!1},e.prototype.ondrop=function(e){e.preventDefault(),e.stopPropagation(),this.fileOver=!1;var t=e.dataTransfer.files;t.length>0&&this.fileDropped.emit(t)},e.ɵfac=function(t){return new(t||e)},e.ɵdir=t.ɵɵdefineDirective({type:e,selectors:[["","appDnd",""]],hostVars:2,hostBindings:function(e,n){1&e&&t.ɵɵlistener("dragover",(function(e){return n.onDragOver(e)}))("dragleave",(function(e){return n.onDragLeave(e)}))("drop",(function(e){return n.ondrop(e)})),2&e&&t.ɵɵclassProp("fileover",n.fileOver)},outputs:{fileDropped:"fileDropped"}}),e}();function rn(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",9),t.ɵɵelementStart(1,"div",10),t.ɵɵelementStart(2,"h4",11),t.ɵɵtext(3),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"p",12),t.ɵɵtext(5),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"div",13),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(i);var e=n.index;return t.ɵɵnextContext().deleteFile(e)})),t.ɵɵnamespaceSVG(),t.ɵɵelementStart(7,"svg",14),t.ɵɵelement(8,"path",15),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=n.$implicit,r=t.ɵɵnextContext();t.ɵɵadvance(3),t.ɵɵtextInterpolate1(" ",null==a?null:a.name," "),t.ɵɵadvance(2),t.ɵɵtextInterpolate1(" ",r.formatBytes(null==a?null:a.size,2)," ")}}function on(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",16),t.ɵɵelementStart(1,"button",17),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().uploaded()})),t.ɵɵelementStart(2,"mat-icon"),t.ɵɵtext(3,"file_upload"),t.ɵɵelementEnd(),t.ɵɵtext(4," Upload"),t.ɵɵelementEnd(),t.ɵɵelementEnd()}}var ln=function(){function e(){this.message="Drag and drop files here",this.files=[],this.filesChange=new t.EventEmitter,this.upload=new t.EventEmitter,this.enableUpload=!1}return e.prototype.ngOnInit=function(){},e.prototype.onFileDropped=function(e){this.prepareFilesList(e)},e.prototype.fileBrowseHandler=function(e){this.prepareFilesList(e)},e.prototype.deleteFile=function(e){this.files.splice(e,1)},e.prototype.prepareFilesList=function(e){var t,n;try{for(var i=$(e),a=i.next();!a.done;a=i.next()){var r=a.value;r.progress=0,this.files.push(r)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.formatBytes=function(e,t){if(0===e)return"0 Bytes";var n=t<=0?0:t||2,i=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,i)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]},e.prototype.uploaded=function(){this.upload.emit()},e.prototype.filesChanged=function(){this.filesChange.emit(this.files)},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-attach"]],inputs:{message:"message",files:"files",enableUpload:"enableUpload"},outputs:{filesChange:"filesChange",upload:"upload"},decls:15,vars:3,consts:[[1,"tin-input-row",2,"width","100%"],[1,"col"],["appDnd","",1,"container",3,"fileDropped"],["type","file","id","fileDropRef","multiple","",3,"change"],["fileDropRef",""],["for","fileDropRef"],[1,"files-list"],["class","single-file ","style","width: 100%;",4,"ngFor","ngForOf"],["class","tin-input-row d-flex justify-content-center","style","width: 100%;",4,"ngIf"],[1,"single-file",2,"width","100%"],[1,"tin-input-row","info"],[1,"name"],[1,"size"],[1,"delete",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","14","height","18","viewBox","0 0 14 18"],["fill","#B1B1B1","fill-rule","nonzero","d","M1 16c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v10zm3.17-7.83a.996.996 0 0 1 1.41 0L7 9.59l1.42-1.42a.996.996 0 1 1 1.41 1.41L8.41 11l1.42 1.42a.996.996 0 1 1-1.41 1.41L7 12.41l-1.42 1.42a.996.996 0 1 1-1.41-1.41L5.59 11 4.17 9.58a.996.996 0 0 1 0-1.41zM10.5 1L9.79.29C9.61.11 9.35 0 9.09 0H4.91c-.26 0-.52.11-.7.29L3.5 1H1c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1h-2.5z"],[1,"tin-input-row","d-flex","justify-content-center",2,"width","100%"],["mat-button","","color","primary","matTooltip","Upload New Documents","matTooltipPosition","above",3,"click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵlistener("fileDropped",(function(e){return n.onFileDropped(e)})),t.ɵɵelementStart(3,"input",3,4),t.ɵɵlistener("change",(function(e){return n.fileBrowseHandler(e.target.files)})),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"h4"),t.ɵɵtext(6),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"h4"),t.ɵɵtext(8,"or"),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"label",5),t.ɵɵtext(10,"Click to Browse"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"div",1),t.ɵɵelementStart(12,"div",6),t.ɵɵtemplate(13,rn,9,2,"div",7),t.ɵɵelementEnd(),t.ɵɵtemplate(14,on,5,0,"div",8),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(6),t.ɵɵtextInterpolate(n.message),t.ɵɵadvance(7),t.ɵɵproperty("ngForOf",n.files),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.files.length>0&&n.enableUpload))},directives:[an,i.NgForOf,i.NgIf,r.MatButton,F.MatTooltip,S.MatIcon],styles:[".container[_ngcontent-%COMP%]{width:100%;height:200px;padding:2rem;text-align:center;border:2px dashed #2a7b94;position:relative;margin:0 auto}.container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{opacity:0;position:absolute;z-index:2;width:100%;height:100%;top:0;left:0}.container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:#fff;width:183px;height:44px;border-radius:21.5px;background-color:#db202f;padding:8px 16px}.container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#38424c}.fileover[_ngcontent-%COMP%]{-webkit-animation:1s infinite shake;animation:1s infinite shake}.files-list[_ngcontent-%COMP%]{margin-top:1.5rem}.files-list[_ngcontent-%COMP%] .single-file[_ngcontent-%COMP%]{display:flex;padding:.5rem;justify-content:space-between;align-items:center;border:1px dashed #1c824d;margin-bottom:1rem;margin-right:1rem;display:flex;flex-grow:1}.files-list[_ngcontent-%COMP%] .single-file[_ngcontent-%COMP%] .delete[_ngcontent-%COMP%]{display:flex;margin-left:.5rem;cursor:pointer;align-self:flex-end}.files-list[_ngcontent-%COMP%] .single-file[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#353f4a;margin:0}.files-list[_ngcontent-%COMP%] .single-file[_ngcontent-%COMP%] .size[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#a4a4a4;margin:0 0 0 1rem}.files-list[_ngcontent-%COMP%] .single-file[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{width:100%}@-webkit-keyframes shake{0%{transform:translate(1px,1px) rotate(0)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px,0) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0)}100%{transform:translate(1px,-2px) rotate(-1deg)}}@keyframes shake{0%{transform:translate(1px,1px) rotate(0)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px,0) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0)}100%{transform:translate(1px,-2px) rotate(-1deg)}}"]}),e}(),sn=function(){function e(){this.display="",this.value="",this.valueChange=new t.EventEmitter,this.readonly=!1,this.min="01 jan 1900",this.max="31 dec 9999"}return e.prototype.ngOnInit=function(){},e.prototype.changed=function(){this.valueChange.emit(this.value)},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-datetime"]],inputs:{display:"display",value:"value",readonly:"readonly",min:"min",max:"max"},outputs:{valueChange:"valueChange"},decls:4,vars:6,consts:[[2,"width","150px","margin-right","20px"],["matInput","","autocomplete","off","type","datetime-local",3,"ngModel","min","max","placeholder","readonly","ngModelChange","change"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"mat-form-field",0),t.ɵɵelementStart(1,"mat-label"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"input",1),t.ɵɵlistener("ngModelChange",(function(e){return n.value=e}))("change",(function(){return n.changed()})),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(2),t.ɵɵtextInterpolate(n.display),t.ɵɵadvance(1),t.ɵɵproperty("ngModel",n.value)("min",n.min)("max",n.max)("placeholder",n.display)("readonly",n.readonly))},directives:[a.MatFormField,a.MatLabel,C.MatInput,L.DefaultValueAccessor,L.NgControlStatus,L.NgModel],styles:[""]}),e}(),cn={provide:L.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return pn})),multi:!0},pn=function(){function e(e,t){this.elementRef=e,this.decimalPipe=t,this.DECIMAL_MARK="."}return e.prototype.ngOnInit=function(){this.el=this.elementRef.nativeElement},e.prototype.handleFocus=function(e){var t=this.getInputValue(),n=this.getUnmaskedValue(t);this.updateInputValue(n)},e.prototype.handleCut=function(e){var t=this;setTimeout((function(){t.inputUpdated()}),0)},e.prototype.handleKeypress=function(e){var t=String.fromCharCode(e.which);if(/^[\d.]+$/.test(t)){var n=e.target.value.indexOf(this.DECIMAL_MARK);if(n>=0&&t===this.DECIMAL_MARK)if(!this.isIdxBetweenSelection(n)){var i=n+1;return this.setCursorPosition(i),void e.preventDefault()}}else e.preventDefault()},e.prototype.handleInput=function(e){this.inputUpdated()},e.prototype.handlePaste=function(e){var t=this;setTimeout((function(){t.inputUpdated()}),1)},e.prototype.handleBlur=function(e){var t=this.getInputValue(),n=this.convertStrToDecimal(t);this.maskInput(n),this.onModelTouched.apply(e)},e.prototype.registerOnChange=function(e){this.onModelChange=e},e.prototype.registerOnTouched=function(e){this.onModelTouched=e},e.prototype.setDisabledState=function(e){this.el.disabled=e},e.prototype.writeValue=function(e){this.maskInput(e)},e.prototype.maskInput=function(e){if(this.isNumeric(e)){var t=this.convertDecimalToStr(e),n=this.transformWithPipe(t);this.updateInputValue(n)}else this.updateInputValue("")},e.prototype.inputUpdated=function(){this.restrictDecimalValue();var e=this.getInputValue(),t=this.getUnmaskedValue(e),n=this.convertStrToDecimal(t);n!==this.lastNumVal&&(this.lastNumVal=n,this.onModelChange(n))},e.prototype.restrictDecimalValue=function(){var e=this.getInputValue(),t=e.indexOf(this.DECIMAL_MARK);if(t>=0&&e.substring(t+1).length>2){var n=e.substring(0,t+3);return void this.updateInputValue(n,!0)}},e.prototype.transformWithPipe=function(e){return this.decimalPipe.transform(e,"1.2-2")},e.prototype.getUnmaskedValue=function(e){return e.replace(/[^-\d\\.]/g,"")},e.prototype.updateInputValue=function(e,t){void 0===t&&(t=!1),t&&this.saveCursorPosition(),this.el.value=e},e.prototype.getInputValue=function(){return this.el.value},e.prototype.convertStrToDecimal=function(e){return this.isNumeric(e)?parseFloat(e):null},e.prototype.convertDecimalToStr=function(e){return this.isNumeric(e)?e+"":""},e.prototype.isNumeric=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},e.prototype.saveCursorPosition=function(){var e=this,t=this.el.selectionStart;setTimeout((function(){e.setCursorPosition(t)}),1)},e.prototype.setCursorPosition=function(e){this.el.selectionStart=e,this.el.selectionEnd=e},e.prototype.isIdxBetweenSelection=function(e){return this.el.selectionStart!==this.el.selectionEnd&&(e>=this.el.selectionStart&&e<this.el.selectionEnd)},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(t.ElementRef),t.ɵɵdirectiveInject(i.DecimalPipe))},e.ɵdir=t.ɵɵdefineDirective({type:e,selectors:[["","appCurrencyInputMask",""]],hostBindings:function(e,n){1&e&&t.ɵɵlistener("focus",(function(e){return n.handleFocus(e)}))("cut",(function(e){return n.handleCut(e)}))("keypress",(function(e){return n.handleKeypress(e)}))("input",(function(e){return n.handleInput(e)}))("paste",(function(e){return n.handlePaste(e)}))("blur",(function(e){return n.handleBlur(e)}))},features:[t.ɵɵProvidersFeature([cn,i.DecimalPipe])]}),e}();function dn(e,n){if(1&e&&(t.ɵɵelementStart(0,"span",4),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵtextInterpolate1("",i.currency," ")}}function mn(e,n){if(1&e&&(t.ɵɵelementStart(0,"mat-error"),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵtextInterpolate(i.validate(i.control))}}var un=function(e){return{width:e}},fn=function(){function e(){this.readonly=!1,this.hint="",this.display="",this.placeholder="",this.value="",this.width="100%",this.currency="",this.valueChange=new t.EventEmitter,this.leave=new t.EventEmitter,this.enterPress=new t.EventEmitter,this.required=!0,this.min=0,this.max=9e15,this.control=new L.FormControl(this.value,[L.Validators.required,L.Validators.min(this.min),L.Validators.max(this.max)])}return e.prototype.ngOnInit=function(){""==this.placeholder&&(this.placeholder="Enter "+this.display)},e.prototype.ngOnChanges=function(){},e.prototype.ngAfterViewInit=function(){this.initControl(this.control)},e.prototype.initControl=function(e){this.readonly&&(e.setValidators(null),e.updateValueAndValidity()),this.required||this.readonly||(e.setValidators([L.Validators.min(this.min),L.Validators.max(this.max)]),this.control.updateValueAndValidity())},e.prototype.changed=function(e){this.valueChange.emit(e)},e.prototype.leaved=function(){this.leave.emit()},e.prototype.enterPressed=function(){this.enterPress.emit()},e.prototype.validate=function(e){return this.required&&e.hasError("required")?"Required":parseFloat(this.value)<this.min?"Minimun value is "+this.min:parseFloat(this.value)>this.max?"Maximum value is "+this.max:e.hasError("min")?"Minimun value is "+this.min:e.hasError("max")?"Maximum value is "+this.max:""},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-money"]],inputs:{readonly:"readonly",hint:"hint",display:"display",placeholder:"placeholder",value:"value",width:"width",currency:"currency",required:"required",min:"min",max:"max"},outputs:{valueChange:"valueChange",leave:"leave",enterPress:"enterPress"},features:[t.ɵɵNgOnChangesFeature],decls:6,vars:13,consts:[["hideRequiredMarker","true","hideRequiredMarker","true",2,"margin-right","5px",3,"hintLabel","ngStyle"],["matInput","","appCurrencyInputMask","","autocomplete","off",2,"text-align","right",3,"min","max","ngModel","placeholder","formControl","readonly","ngModelChange","keyup.enter","blur"],["matPrefix","",4,"ngIf"],[4,"ngIf"],["matPrefix",""]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"mat-form-field",0),t.ɵɵelementStart(1,"mat-label"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"input",1),t.ɵɵlistener("ngModelChange",(function(e){return n.changed(e)}))("keyup.enter",(function(){return n.enterPressed()}))("blur",(function(){return n.leaved()})),t.ɵɵelementEnd(),t.ɵɵtemplate(4,dn,2,1,"span",2),t.ɵɵtemplate(5,mn,2,1,"mat-error",3),t.ɵɵelementEnd()),2&e&&(t.ɵɵproperty("hintLabel",n.hint)("ngStyle",t.ɵɵpureFunction1(11,un,n.width)),t.ɵɵadvance(2),t.ɵɵtextInterpolate(n.display),t.ɵɵadvance(1),t.ɵɵproperty("min",n.min)("max",n.max)("ngModel",n.value)("placeholder",n.placeholder)("formControl",n.control)("readonly",n.readonly),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",""!=n.currency),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.control.invalid))},directives:[a.MatFormField,i.NgStyle,a.MatLabel,C.MatInput,L.DefaultValueAccessor,pn,L.NgControlStatus,L.FormControlDirective,i.NgIf,a.MatPrefix,a.MatError],styles:["input.example-right-align[_ngcontent-%COMP%]{-moz-appearance:textfield}.example-right-align[_ngcontent-%COMP%]{text-align:right}input.example-right-align[_ngcontent-%COMP%]::-webkit-inner-spin-button, input.example-right-align[_ngcontent-%COMP%]::-webkit-outer-spin-button{display:none}.curr[_ngcontent-%COMP%]{background-color:red}"]}),e}();function gn(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",3),t.ɵɵelementStart(1,"mat-label",4),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵtextInterpolate1(" ",i.title,"")}}function hn(e,n){if(1&e&&(t.ɵɵelementStart(0,"li",7),t.ɵɵelementStart(1,"div",8),t.ɵɵelementStart(2,"div",9),t.ɵɵtext(3),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"small"),t.ɵɵtext(5),t.ɵɵelementStart(6,"em"),t.ɵɵtext(7),t.ɵɵpipe(8,"date"),t.ɵɵelementEnd(),t.ɵɵtext(9,") "),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var i=n.$implicit;t.ɵɵadvance(3),t.ɵɵtextInterpolate(i.createdByName),t.ɵɵadvance(2),t.ɵɵtextInterpolate1("",i.details," ("),t.ɵɵadvance(2),t.ɵɵtextInterpolate(t.ɵɵpipeBind2(8,3,i.createdDate,"dd MMM yyyy HH:mm"))}}function vn(e,n){if(1&e&&(t.ɵɵelementStart(0,"ul",5),t.ɵɵtemplate(1,hn,10,6,"li",6),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",i.notes)}}function yn(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",10),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" No ",i.title.toLowerCase()," ")}}var xn=function(){function e(){this.notes=new Array,this.notesMessage="Empty",this.title="Notes"}return e.prototype.ngOnInit=function(){},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-activity"]],inputs:{notes:"notes",title:"title"},decls:3,vars:3,consts:[["class","tin-input-row mt-3",4,"ngIf"],["class","list-group list-group-flush","style","max-height:350px; margin-left:5px",4,"ngIf"],["class","d-flex justify-content-center row align-items-center","style","max-height:200px",4,"ngIf"],[1,"tin-input-row","mt-3"],[2,"font-size","20px","font-weight","300"],[1,"list-group","list-group-flush",2,"max-height","350px","margin-left","5px"],["class","list-group-item list-group-item-action flex-column align-items-start",4,"ngFor","ngForOf"],[1,"list-group-item","list-group-item-action","flex-column","align-items-start"],[1,"d-flex","w-100","justify-content-between"],[1,"mb-0"],[1,"d-flex","justify-content-center","row","align-items-center",2,"max-height","200px"]],template:function(e,n){1&e&&(t.ɵɵtemplate(0,gn,3,1,"div",0),t.ɵɵtemplate(1,vn,2,1,"ul",1),t.ɵɵtemplate(2,yn,2,1,"div",2)),2&e&&(t.ɵɵproperty("ngIf",""!=n.title),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.notes&&n.notes.length>0),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.notes&&0==n.notes.length))},directives:[i.NgIf,a.MatLabel,i.NgForOf],pipes:[i.DatePipe],styles:[""]}),e}(),Sn=function(){function e(){this.value="",this.valueChange=new t.EventEmitter,this.readonly=!1,this.config={editable:!0,spellcheck:!0,height:"auto",minHeight:"5rem",placeholder:"Enter text here...",translate:"no",defaultParagraphSeparator:"",defaultFontName:"Arial",toolbarHiddenButtons:[["bold","italic","underline","strikeThrough","subscript","superscript","justifyLeft","justifyCenter","justifyRight","justifyFull","indent","outdent","insertUnorderedList","insertOrderedList","heading","fontName"],["fontSize","textColor","backgroundColor","customClasses","link","unlink","insertImage","insertVideo","insertHorizontalRule","removeFormat","toggleEditorMode"]],customClasses:[{name:"quote",class:"quote"},{name:"redText",class:"redText"},{name:"titleText",class:"titleText",tag:"h1"}]}}return e.prototype.ngOnInit=function(){},e.prototype.changed=function(){this.valueChange.emit(this.value)},e.prototype.ngOnChanges=function(){this.config.editable=!this.readonly},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-html"]],inputs:{value:"value",readonly:"readonly",config:"config"},outputs:{valueChange:"valueChange"},features:[t.ɵɵNgOnChangesFeature],decls:1,vars:2,consts:[[3,"ngModel","config","ngModelChange"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"angular-editor",0),t.ɵɵlistener("ngModelChange",(function(e){return n.value=e}))("ngModelChange",(function(){return n.changed()})),t.ɵɵelementEnd()),2&e&&t.ɵɵproperty("ngModel",n.value)("config",n.config)},directives:[V.AngularEditorComponent,L.NgControlStatus,L.NgModel],styles:[""]}),e}();function Cn(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"mat-form-field",5),t.ɵɵelementStart(1,"mat-label"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"input",6),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(i),t.ɵɵnextContext().value=e}))("change",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().changed()}))("keyup.enter",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().changed()})),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵtextInterpolate(a.display),t.ɵɵadvance(1),t.ɵɵproperty("ngModel",a.value)("placeholder","Enter "+a.display)}}function Mn(e,n){if(1&e&&(t.ɵɵelementStart(0,"mat-option",10),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=n.$implicit,a=t.ɵɵnextContext(2);t.ɵɵproperty("value",i[a.optionValue]),t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",i[a.optionDisplay]," ")}}function wn(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"mat-form-field",7),t.ɵɵelementStart(1,"mat-label"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"mat-select",8),t.ɵɵlistener("valueChange",(function(e){return t.ɵɵrestoreView(i),t.ɵɵnextContext().value=e}))("selectionChange",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().changed()})),t.ɵɵtemplate(4,Mn,2,2,"mat-option",9),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵtextInterpolate(a.display),t.ɵɵadvance(1),t.ɵɵproperty("value",a.value)("placeholder","Select "+a.display)("disabled",a.readonly),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",a.options)}}var bn=function(){function e(){this.optionValue="",this.optionDisplay="",this.readonly=!1,this.value="",this.display="",this.show=!1,this.valueChange=new t.EventEmitter,this.enterPress=new t.EventEmitter}return e.prototype.ngOnInit=function(){this.OGValue=this.value},e.prototype.changed=function(){this.valueChange.emit(this.value)},e.prototype.enterPressed=function(){this.valueChange.emit()},e.prototype.resetValue=function(){this.value=this.OGValue,this.changed()},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-option"]],inputs:{options:"options",optionValue:"optionValue",optionDisplay:"optionDisplay",readonly:"readonly",value:"value",display:"display",show:"show"},outputs:{valueChange:"valueChange",enterPress:"enterPress"},decls:6,vars:4,consts:[["color","primary","labelPosition","after",2,"margin-right","5px",3,"ngModel","ngModelChange","change"],[2,"margin-right","10px","width","0px"],["matInput",""],["style","margin-right:30px",4,"ngIf"],["style","margin-right: 20px;","floatLabel","always","width","100",4,"ngIf"],[2,"margin-right","30px"],["matInput","","width","100","autocomplete","off",3,"ngModel","placeholder","ngModelChange","change","keyup.enter"],["floatLabel","always","width","100",2,"margin-right","20px"],[3,"value","placeholder","disabled","valueChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"mat-checkbox",0),t.ɵɵlistener("ngModelChange",(function(e){return n.show=e}))("change",(function(){return n.resetValue()})),t.ɵɵtext(1),t.ɵɵelementEnd(),t.ɵɵelementStart(2,"mat-form-field",1),t.ɵɵelement(3,"input",2),t.ɵɵelementEnd(),t.ɵɵtemplate(4,Cn,4,3,"mat-form-field",3),t.ɵɵtemplate(5,wn,5,5,"mat-form-field",4)),2&e&&(t.ɵɵproperty("ngModel",n.show),t.ɵɵadvance(1),t.ɵɵtextInterpolate(n.display),t.ɵɵadvance(3),t.ɵɵproperty("ngIf",n.show&&!n.options),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.show&&n.options))},directives:[h.MatCheckbox,L.NgControlStatus,L.NgModel,a.MatFormField,C.MatInput,i.NgIf,a.MatLabel,L.DefaultValueAccessor,k.MatSelect,i.NgForOf,y.MatOption],styles:[""]}),e}();function En(e,n){if(1&e&&(t.ɵɵelementStart(0,"div"),t.ɵɵelementStart(1,"label",1),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵtext(3," "),t.ɵɵelementStart(4,"label"),t.ɵɵtext(5),t.ɵɵelementEnd(),t.ɵɵtext(6," \n"),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵtextInterpolate1("",i.display,": "),t.ɵɵadvance(3),t.ɵɵtextInterpolate1("",i.value," ")}}function In(e,n){if(1&e&&(t.ɵɵelementStart(0,"div"),t.ɵɵelementStart(1,"label",1),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵtext(3," "),t.ɵɵelementStart(4,"label"),t.ɵɵtext(5),t.ɵɵpipe(6,"date"),t.ɵɵelementEnd(),t.ɵɵtext(7," \n"),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵtextInterpolate1("",i.display,": "),t.ɵɵadvance(3),t.ɵɵtextInterpolate1("",t.ɵɵpipeBind2(6,2,i.value,"dd/MM/yyyy")," ")}}function kn(e,n){if(1&e&&(t.ɵɵelementStart(0,"div"),t.ɵɵelementStart(1,"label",1),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵtext(3," "),t.ɵɵelementStart(4,"label"),t.ɵɵtext(5),t.ɵɵpipe(6,"date"),t.ɵɵelementEnd(),t.ɵɵtext(7," \n"),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵtextInterpolate1("",i.display,": "),t.ɵɵadvance(3),t.ɵɵtextInterpolate1("",t.ɵɵpipeBind2(6,2,i.value,"dd/MM/yyyy HH:mm")," ")}}function Pn(e,n){if(1&e&&(t.ɵɵelementStart(0,"div"),t.ɵɵelementStart(1,"label",1),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵtext(3," "),t.ɵɵelementStart(4,"label"),t.ɵɵtext(5),t.ɵɵpipe(6,"currency"),t.ɵɵelementEnd(),t.ɵɵtext(7," \n"),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵtextInterpolate1("",i.display,": "),t.ɵɵadvance(3),t.ɵɵtextInterpolate1("",t.ɵɵpipeBind3(6,2,i.value,"USD","")," ")}}var Nn=function(){function e(){this.display="",this.value="",this.format="text"}return e.prototype.ngOnInit=function(){},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-label"]],inputs:{display:"display",value:"value",format:"format"},decls:4,vars:4,consts:[[4,"ngIf"],[2,"font-weight","500"]],template:function(e,n){1&e&&(t.ɵɵtemplate(0,En,7,2,"div",0),t.ɵɵtemplate(1,In,8,5,"div",0),t.ɵɵtemplate(2,kn,8,5,"div",0),t.ɵɵtemplate(3,Pn,8,6,"div",0)),2&e&&(t.ɵɵproperty("ngIf","text"==n.format),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","date"==n.format),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","datetime"==n.format),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","money"==n.format))},directives:[i.NgIf],pipes:[i.DatePipe,i.CurrencyPipe],styles:[""]}),e}(),Dn=["stepper"];function On(e,n){if(1&e&&t.ɵɵelement(0,"mat-step",3),2&e){var i=n.$implicit;t.ɵɵproperty("editable",!1)("label",i.name)}}var Tn=function(){function e(){this.value=""}return e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){},e.prototype.ngOnChanges=function(){this.pushSteps()},e.prototype.setStepper=function(){if(""!=this.value)switch(this.stepper.selectedIndex=0,this.value){case"Draft":this.stepper.selectedIndex=0;break;case"Head Approval":this.pushStepper(1);break;case"CE Approval":this.pushStepper(2);break;case"Booking":this.pushStepper(3);break;case"BTA Approval":this.pushStepper(4);break;case"Travel":this.pushStepper(5);break;case"BTR Approval":this.pushStepper(6);break;case"Travel Closure":this.pushStepper(7)}},e.prototype.pushStepper=function(e){for(var t=0;t<e+1;t++)this.stepper.selectedIndex=t},e.prototype.pushSteps=function(){var e,t;if(0!=this.steps.length&&""!=this.value){this.stepper.selectedIndex=0;var n=0;try{for(var i=$(this.steps),a=i.next();!a.done;a=i.next()){if(a.value.name==this.value){this.stepper.selectedIndex=n;break}this.stepper.selectedIndex=n,n++}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}}},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-steps"]],viewQuery:function(e,n){var i;(1&e&&t.ɵɵviewQuery(Dn,!0),2&e)&&(t.ɵɵqueryRefresh(i=t.ɵɵloadQuery())&&(n.stepper=i.first))},inputs:{value:"value",steps:"steps"},features:[t.ɵɵProvidersFeature([{provide:_.STEPPER_GLOBAL_OPTIONS,useValue:{displayDefaultIndicatorType:!1}}]),t.ɵɵNgOnChangesFeature],decls:3,vars:1,consts:[["labelPosition","bottom",1,"transparent"],["stepper",""],[3,"editable","label",4,"ngFor","ngForOf"],[3,"editable","label"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"mat-horizontal-stepper",0,1),t.ɵɵtemplate(2,On,1,2,"mat-step",2),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(2),t.ɵɵproperty("ngForOf",n.steps))},directives:[D.MatHorizontalStepper,i.NgForOf,D.MatStep],styles:[".transparent[_ngcontent-%COMP%]{background-color:rgba(0,0,0,0)}[_nghost-%COMP%] .mat-step-header{padding:5px!important}[_nghost-%COMP%] .mat-stepper-horizontal-line{min-width:5px!important}[_nghost-%COMP%] .mat-horizontal-content-container{padding:0!important}[_nghost-%COMP%] .mat-horizontal-stepper-header{pointer-events:none!important}"]}),e}(),Fn=function(){function e(){this.data=new O.MatTableDataSource,this.refreshClick=new t.EventEmitter,this._filterText=""}return e.prototype.ngOnInit=function(){},e.prototype.ngOnChanges=function(){this.applyFilter(this._filterText)},e.prototype.applyFilter=function(e){this.data&&(this.data.filter=e.trim().toLowerCase())},e.prototype.refreshClicked=function(){this.refreshClick.emit()},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-filter"]],inputs:{data:"data"},outputs:{refreshClick:"refreshClick"},features:[t.ɵɵNgOnChangesFeature],decls:7,vars:1,consts:[[2,"font-size","12px"],["id","txtFilter","matInput","","placeholder","Enter Filter text","autocomplete","off",3,"ngModel","ngModelChange","keyup"],["id","btnFilter","mat-mini-fab","","color","primary","matTooltip","Refresh Data","matTooltipPosition","above",2,"margin-right","1em","margin-top","5px",3,"click"],[1,"refreshIcon"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"mat-form-field",0),t.ɵɵelementStart(1,"mat-label"),t.ɵɵtext(2,"Filter"),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"input",1),t.ɵɵlistener("ngModelChange",(function(e){return n._filterText=e}))("keyup",(function(e){return n.applyFilter(e.target.value)})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"button",2),t.ɵɵlistener("click",(function(){return n.refreshClicked()})),t.ɵɵelementStart(5,"mat-icon",3),t.ɵɵtext(6,"refresh"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(3),t.ɵɵproperty("ngModel",n._filterText))},directives:[a.MatFormField,a.MatLabel,C.MatInput,L.DefaultValueAccessor,L.NgControlStatus,L.NgModel,r.MatButton,F.MatTooltip,S.MatIcon],styles:[".mat-mini-fab[_ngcontent-%COMP%]{width:32px;height:32px}.mat-mini-fab[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;margin-top:-3px}.refreshIcon[_ngcontent-%COMP%]{font-size:22px!important;margin-top:-7px!important}"]}),e}(),Ln=function(){function e(){}return e.ɵmod=t.ɵɵdefineNgModule({type:e}),e.ɵinj=t.ɵɵdefineInjector({factory:function(t){return new(t||e)},imports:[[i.CommonModule,L.FormsModule]]}),e}();("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(Ln,{declarations:[pn],imports:[i.CommonModule,L.FormsModule],exports:[pn]});var jn=function(){function e(){}return e.ɵmod=t.ɵɵdefineNgModule({type:e}),e.ɵinj=t.ɵɵdefineInjector({factory:function(t){return new(t||e)},providers:[i.CurrencyPipe,{provide:m.HTTP_INTERCEPTORS,useClass:_e,multi:!0},{provide:i.LocationStrategy,useClass:i.HashLocationStrategy}],imports:[[L.ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl:"never"}),i.CommonModule,L.FormsModule,L.ReactiveFormsModule,Ve,A.MomentModule,R.NgxDocViewerModule,V.AngularEditorModule,Ln,j.NgIdleKeepaliveModule.forRoot()],i.CommonModule,L.FormsModule,Ve]}),e}();function An(e,n){if(1&e&&t.ɵɵelement(0,"img",21),2&e){var i=t.ɵɵnextContext(2);t.ɵɵproperty("src",i.appConfig.logo,t.ɵɵsanitizeUrl)}}function Rn(e,n){if(1&e&&t.ɵɵelement(0,"img",22),2&e){var i=t.ɵɵnextContext(2);t.ɵɵproperty("src",i.appConfig.logo,t.ɵɵsanitizeUrl)}}function Un(e,n){if(1&e&&t.ɵɵelement(0,"img",23),2&e){var i=t.ɵɵnextContext(2);t.ɵɵproperty("src",i.appConfig.logo,t.ɵɵsanitizeUrl)}}function Vn(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",17),t.ɵɵtemplate(1,An,1,1,"img",18),t.ɵɵtemplate(2,Rn,1,1,"img",19),t.ɵɵtemplate(3,Un,1,1,"img",20),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵproperty("ngIf","normal"==i.appConfig.logoSize),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","medium"==i.appConfig.logoSize),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","large"==i.appConfig.logoSize)}}function _n(e,n){1&e&&t.ɵɵelement(0,"div",24)}function zn(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",13),t.ɵɵelementStart(1,"button",25),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().signup()})),t.ɵɵtext(2,"Signup"),t.ɵɵelementEnd(),t.ɵɵelementEnd()}}function Bn(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div"),t.ɵɵelement(1,"br"),t.ɵɵelementStart(2,"a",26),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().recoverAccount()})),t.ɵɵtext(3,"Forgot your password ?"),t.ɵɵelementEnd(),t.ɵɵelementEnd()}}("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(jn,{declarations:[an,ze,ae,Ye,Ue,Xe,bt,Nt,Dt,Ut,Jt,tn,nn,ln,sn,fn,qt,xn,Gt,Sn,bn,Nn,Tn,Fn],imports:[L.ReactiveFormsModule,i.CommonModule,L.FormsModule,L.ReactiveFormsModule,Ve,A.MomentModule,R.NgxDocViewerModule,V.AngularEditorModule,Ln,j.NgIdleKeepaliveModule],exports:[i.CommonModule,L.FormsModule,Ve,ze,ae,Ye,Ue,Xe,bt,Nt,Dt,Jt,tn,Ut,sn,nn,ln,fn,qt,xn,Sn,bn,Nn,Tn,Fn]});var qn=function(){function e(e,t,n,i,a,r,o,l){this.httpService=e,this.storageService=t,this.router=n,this.messageService=i,this.dataService=a,this.authService=r,this.logService=o,this.route=l,this.user=new Ie,this.hide=!0,this.isProcessing=!1,this.appConfig=new we}return e.prototype.ngOnInit=function(){var e=this;this.authService.Updateloggedin(!1),this.authService.UpdateRole(null),this.storageService.clear(),this.dataService.appConfigObserv.subscribe((function(t){return e.appConfig=t})),null!=this.route.snapshot.queryParams.redirectTo?this.redirectPath=this.route.snapshot.queryParams.redirectTo:this.redirectPath="home"},e.prototype.signup=function(){this.router.navigate(["signup"])},e.prototype.recoverAccount=function(){this.router.navigate(["recover-account"])},e.prototype.login=function(){var e=this;""!=this.user.userName&&""!=this.user.password?(this.logService.info("logging in"),this.isProcessing=!0,this.user.userName=this.user.userName,this.dataService.Login(this.user).subscribe((function(t){if(e.isProcessing=!1,t.success){if("local"==t.data.authType&&!e.appConfig.localAuth)return void e.messageService.toast("Contact Admin: Authentication Type error");if("AD"==t.data.authType&&!e.appConfig.ADAuth)return void e.messageService.toast("Contact Admin: Authentication Type error");if(e.authService.Updateloggedin(!0),e.authService.UpdateToken(t.data.token),e.storageService.store(ce.AUTH_TOKEN,t.data.token),e.authService.UpdateTokenExpire(t.data.expiration),e.storageService.store(ce.AUTH_TOKEN_EXPIRE,t.data.expiration),e.authService.UpdateCurrentUser(e.user.userName),e.storageService.store(ce.AUTH_USER,e.user.userName),e.authService.updateLoggedUserFullName(t.data.firstName),e.storageService.store(ce.AUTH_NAME,t.data.firstName),e.authService.UpdateRole(t.data.role),e.storageService.store(ce.AUTH_ROLES,JSON.stringify(t.data.role)),e.logService.info("logged in"),1==t.data.changePassword&&"local"==t.data.authType)return void e.router.navigate(["home/user/change-password"],{queryParams:{redirectTo:e.redirectPath},queryParamsHandling:"merge",skipLocationChange:!1});e.router.navigate([e.redirectPath])}else e.messageService.toast("Error: "+t.message),e.user.password=""}),(function(t){e.isProcessing=!1,e.messageService.toast(e.httpService.Error(t))}))):this.messageService.toast("Please enter your credentials")},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(Oe),t.ɵɵdirectiveInject(W),t.ɵɵdirectiveInject(d.Router),t.ɵɵdirectiveInject(re),t.ɵɵdirectiveInject(Le),t.ɵɵdirectiveInject(Fe),t.ɵɵdirectiveInject(Te),t.ɵɵdirectiveInject(d.ActivatedRoute))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-login"]],decls:27,vars:12,consts:[[1,"tin-bg-login","login-page"],["class","d-flex justify-content-center row align-items-center","style","margin-top:3em;margin-bottom:1em",4,"ngIf"],["style","margin-top:2em",4,"ngIf"],[1,"d-flex","justify-content-center","row","align-items-center",2,"margin-top","3em"],[1,"d-none","d-sm-block"],[2,"margin-left","1em"],[1,"mat-elevation-z3",2,"width","400px"],[1,"tin-input","mt-2"],["id","txtuserName","display","Username",3,"value","valueChange"],["id","txtPassword","matInput","","autocomplete","off",3,"type","ngModel","keyup.enter","ngModelChange"],["mat-icon-button","","matSuffix","",3,"click"],[2,"font-size","18px"],[1,"row"],[1,"col","d-flex","justify-content-center"],["id","btnLogin","mat-raised-button","","color","primary",2,"width","100px",3,"disabled","click"],["class","col d-flex justify-content-center",4,"ngIf"],[4,"ngIf"],[1,"d-flex","justify-content-center","row","align-items-center",2,"margin-top","3em","margin-bottom","1em"],["style","height:100px;margin-right:3em;margin-left:3em",3,"src",4,"ngIf"],["style","height:150px;margin-right:3em;margin-left:3em",3,"src",4,"ngIf"],["style","height:250px;margin-right:3em;margin-left:3em",3,"src",4,"ngIf"],[2,"height","100px","margin-right","3em","margin-left","3em",3,"src"],[2,"height","150px","margin-right","3em","margin-left","3em",3,"src"],[2,"height","250px","margin-right","3em","margin-left","3em",3,"src"],[2,"margin-top","2em"],["id","btnSignup","mat-stroked-button","","color","primary",2,"width","100px",3,"click"],["mat-button","","id","lnkRecover",2,"margin-left","1em",3,"click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵtemplate(1,Vn,4,3,"div",1),t.ɵɵtemplate(2,_n,1,0,"div",2),t.ɵɵelementStart(3,"div",3),t.ɵɵelement(4,"div",4),t.ɵɵelementStart(5,"div",5),t.ɵɵelementStart(6,"mat-card",6),t.ɵɵelementStart(7,"mat-card-header"),t.ɵɵelementStart(8,"mat-card-title"),t.ɵɵtext(9),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"mat-card-content"),t.ɵɵelementStart(11,"div",7),t.ɵɵelementStart(12,"spa-text",8),t.ɵɵlistener("valueChange",(function(e){return n.user.userName=e})),t.ɵɵelementEnd(),t.ɵɵelementStart(13,"mat-form-field"),t.ɵɵelementStart(14,"mat-label"),t.ɵɵtext(15,"Password"),t.ɵɵelementEnd(),t.ɵɵelementStart(16,"input",9),t.ɵɵlistener("keyup.enter",(function(){return n.login()}))("ngModelChange",(function(e){return n.user.password=e})),t.ɵɵelementEnd(),t.ɵɵelementStart(17,"button",10),t.ɵɵlistener("click",(function(){return n.hide=!n.hide})),t.ɵɵelementStart(18,"mat-icon",11),t.ɵɵtext(19),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(20,"mat-card-actions"),t.ɵɵelementStart(21,"div",12),t.ɵɵelementStart(22,"div",13),t.ɵɵelementStart(23,"button",14),t.ɵɵlistener("click",(function(){return n.login()})),t.ɵɵtext(24,"Login"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(25,zn,3,0,"div",15),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(26,Bn,4,0,"div",16),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵproperty("ngIf",""!=n.appConfig.logo),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",""==n.appConfig.logo),t.ɵɵadvance(7),t.ɵɵtextInterpolate(n.appConfig.appName),t.ɵɵadvance(3),t.ɵɵproperty("value",n.user.userName),t.ɵɵadvance(4),t.ɵɵproperty("type",n.hide?"password":"text")("ngModel",n.user.password),t.ɵɵadvance(1),t.ɵɵattribute("aria-label","Hide password")("aria-pressed",n.hide),t.ɵɵadvance(2),t.ɵɵtextInterpolate(n.hide?"visibility_off":"visibility"),t.ɵɵadvance(4),t.ɵɵproperty("disabled",n.isProcessing),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",n.appConfig.selfService),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.appConfig.selfService))},directives:[i.NgIf,g.MatCard,g.MatCardHeader,g.MatCardTitle,g.MatCardContent,Ut,a.MatFormField,a.MatLabel,C.MatInput,L.DefaultValueAccessor,L.NgControlStatus,L.NgModel,r.MatButton,a.MatSuffix,S.MatIcon,g.MatCardActions,r.MatAnchor],styles:[".login-page[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto}.tin-bg-login[_ngcontent-%COMP%]{background-image:url(~/assets/login-bg.jpg);background-size:100%}"]}),e}(),Hn=function(){function e(e,t,n,i){this.httpService=e,this.messageService=t,this.dataService=n,this.authService=i,this.isProcessing=!1,this.user=new Ie,this.profile=new Ne,this.account=new Ee}return e.prototype.ngOnInit=function(){this.account.user=this.user,this.account.profile=this.profile},e.prototype.create=function(){var e=this;this.profile.userName=this.user.userName,this.isProcessing=!0,this.dataService.RegisterAccount(this.account).subscribe((function(t){e.isProcessing=!1,"success"==t.message?(e.messageService.toast("Account Created"),e.user=new Ie,e.profile=new Ne):e.messageService.toast("Error: "+t.message)}),(function(t){e.isProcessing=!1,e.messageService.toast(e.httpService.Error(t))}))},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(Oe),t.ɵɵdirectiveInject(re),t.ɵɵdirectiveInject(Le),t.ɵɵdirectiveInject(Fe))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-signup"]],decls:37,vars:5,consts:[[2,"margin-top","1em"],[1,"d-flex","justify-content-center","row","align-items-center"],[1,"tin-input",2,"font-size","14px","width","50%"],[1,"tin-input-row"],[1,"col"],[2,"width","100%"],["matInput","","autocomplete","off","placeholder","Enter FirstName",3,"ngModel","ngModelChange"],["matInput","","autocomplete","off","placeholder","Enter LastName",3,"ngModel","ngModelChange"],[1,"tin-input-row","mt-3"],[1,"col-6"],["matInput","","autocomplete","off","placeholder","Enter userName",3,"ngModel","ngModelChange"],["matInput","","autocomplete","off","type","password","placeholder","Enter Password",3,"ngModel","ngModelChange"],["matInput","","autocomplete","off","type","password","placeholder","Enter Confirm Password",3,"ngModel","ngModelChange"],["mat-raised-button","","color","primary","cdkFocusInitial","",3,"click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"h4",0),t.ɵɵtext(1,"Signup"),t.ɵɵelementEnd(),t.ɵɵelement(2,"hr"),t.ɵɵtext(3,"\nComplete the form below. "),t.ɵɵelementStart(4,"div",1),t.ɵɵelementStart(5,"div",2),t.ɵɵelementStart(6,"div",3),t.ɵɵelementStart(7,"div",4),t.ɵɵelementStart(8,"mat-form-field",5),t.ɵɵelementStart(9,"mat-label"),t.ɵɵtext(10,"FirstName"),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"input",6),t.ɵɵlistener("ngModelChange",(function(e){return n.account.profile.firstName=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(12,"div",4),t.ɵɵelementStart(13,"mat-form-field",5),t.ɵɵelementStart(14,"mat-label"),t.ɵɵtext(15,"LastName"),t.ɵɵelementEnd(),t.ɵɵelementStart(16,"input",7),t.ɵɵlistener("ngModelChange",(function(e){return n.profile.lastName=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(17,"div",8),t.ɵɵelementStart(18,"div",9),t.ɵɵelementStart(19,"mat-form-field",5),t.ɵɵelementStart(20,"mat-label"),t.ɵɵtext(21,"userName"),t.ɵɵelementEnd(),t.ɵɵelementStart(22,"input",10),t.ɵɵlistener("ngModelChange",(function(e){return n.user.userName=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(23,"div",3),t.ɵɵelementStart(24,"div",4),t.ɵɵelementStart(25,"mat-form-field",5),t.ɵɵelementStart(26,"mat-label"),t.ɵɵtext(27,"Password"),t.ɵɵelementEnd(),t.ɵɵelementStart(28,"input",11),t.ɵɵlistener("ngModelChange",(function(e){return n.user.password=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(29,"div",4),t.ɵɵelementStart(30,"mat-form-field",5),t.ɵɵelementStart(31,"mat-label"),t.ɵɵtext(32,"Confirm Password"),t.ɵɵelementEnd(),t.ɵɵelementStart(33,"input",12),t.ɵɵlistener("ngModelChange",(function(e){return n.confirmPassword=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(34,"div",8),t.ɵɵelementStart(35,"button",13),t.ɵɵlistener("click",(function(){return n.create()})),t.ɵɵtext(36,"Create"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(11),t.ɵɵproperty("ngModel",n.account.profile.firstName),t.ɵɵadvance(5),t.ɵɵproperty("ngModel",n.profile.lastName),t.ɵɵadvance(6),t.ɵɵproperty("ngModel",n.user.userName),t.ɵɵadvance(6),t.ɵɵproperty("ngModel",n.user.password),t.ɵɵadvance(5),t.ɵɵproperty("ngModel",n.confirmPassword))},directives:[a.MatFormField,a.MatLabel,C.MatInput,L.DefaultValueAccessor,L.NgControlStatus,L.NgModel,r.MatButton],styles:[""]}),e}(),$n=function(){function e(e,t,n,i){this.location=e,this.dataService=t,this.authService=n,this.messageService=i,this.userName=""}return e.prototype.ngOnInit=function(){},e.prototype.recover=function(){var e=this;if(""!=this.userName){var t=new Ie;t.userName=this.userName,this.dataService.SelfReset(t).subscribe((function(t){"success"==t.message?(e.messageService.toast("The password has been sent to your email"),e.location.back()):e.messageService.toast("Error: "+t.message)}))}else this.messageService.toast("Please enter your userName")},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(i.Location),t.ɵɵdirectiveInject(Le),t.ɵɵdirectiveInject(Fe),t.ɵɵdirectiveInject(re))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-recover-account"]],decls:11,vars:1,consts:[[2,"margin-top","1em"],[1,"mt-3"],[1,"tin-input",2,"font-size","14px"],[1,"col"],["display","Username",3,"value","valueChange"],[1,"col","mt-3"],["mat-raised-button","","color","primary","cdkFocusInitial","",3,"click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"h4",0),t.ɵɵtext(1,"Recover Account"),t.ɵɵelementEnd(),t.ɵɵelement(2,"hr"),t.ɵɵtext(3,"\nSubmit your userName and we will send you details to your registered email address. "),t.ɵɵelementStart(4,"div",1),t.ɵɵelementStart(5,"div",2),t.ɵɵelementStart(6,"div",3),t.ɵɵelementStart(7,"spa-text",4),t.ɵɵlistener("valueChange",(function(e){return n.userName=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"div",5),t.ɵɵelementStart(9,"button",6),t.ɵɵlistener("click",(function(){return n.recover()})),t.ɵɵtext(10,"Submit"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(7),t.ɵɵproperty("value",n.userName))},directives:[Ut,r.MatButton],styles:[""]}),e}(),Gn=function(){function e(){}return e.ɵmod=t.ɵɵdefineNgModule({type:e}),e.ɵinj=t.ɵɵdefineInjector({factory:function(t){return new(t||e)},imports:[[L.ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl:"never"}),i.CommonModule,L.FormsModule,L.ReactiveFormsModule,Ve,jn],i.CommonModule,L.FormsModule,Ve]}),e}();function Wn(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",2),t.ɵɵelementStart(1,"spa-text",10),t.ɵɵlistener("valueChange",(function(e){return t.ɵɵrestoreView(i),t.ɵɵnextContext().changePassword.userName=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵproperty("value",a.changePassword.userName)}}function Zn(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",2),t.ɵɵelementStart(1,"spa-text",11),t.ɵɵlistener("valueChange",(function(e){return t.ɵɵrestoreView(i),t.ɵɵnextContext().changePassword.currentPassword=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵproperty("value",a.changePassword.currentPassword)}}("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(Gn,{declarations:[qn,Hn,$n],imports:[L.ReactiveFormsModule,i.CommonModule,L.FormsModule,L.ReactiveFormsModule,Ve,jn],exports:[i.CommonModule,L.FormsModule,Ve,qn,Hn,$n]});var Jn=function(){function e(e,t,n,i,a,r,o){this.router=e,this.location=t,this.httpService=n,this.messageService=i,this.dataService=a,this.authService=r,this.route=o,this.isProcessing=!1,this.changePassword=new ke}return e.prototype.ngOnInit=function(){this.myRole=this.authService.currentRoleSource.value,""==this.dataService.tmpProfileuserName?this.changePassword.userName=this.authService.currentUser:(this.changePassword.userName=this.dataService.tmpProfileuserName,this.dataService.tmpProfileuserName=""),null!=this.route.snapshot.queryParams.redirectTo?this.redirectPath=this.route.snapshot.queryParams.redirectTo:this.redirectPath="home"},e.prototype.change=function(){var e=this;this.myRole[this.dataService.capUsers.name]||""!=this.changePassword.currentPassword?""!=this.changePassword.newPassword?""!=this.changePassword.confirmPassword?this.changePassword.confirmPassword==this.changePassword.newPassword?(this.isProcessing=!0,this.myRole[this.dataService.capUsers.name]?this.dataService.ChangePasswordAdmin(this.changePassword).subscribe((function(t){e.isProcessing=!1,"success"==t.message?(e.messageService.toast("Password Changed"),e.router.navigate([e.redirectPath])):e.messageService.toast("Error: "+t.message)})):this.dataService.ChangePassword(this.changePassword).subscribe((function(t){e.isProcessing=!1,"success"==t.message?(e.messageService.toast("Password Changed"),e.router.navigate([e.redirectPath])):e.messageService.toast("Error: "+t.message)}))):this.messageService.toast("Passwords do not match"):this.messageService.toast("Please confirm new Password"):this.messageService.toast("Please enter new Password"):this.messageService.toast("Please enter current Password")},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(d.Router),t.ɵɵdirectiveInject(i.Location),t.ɵɵdirectiveInject(Oe),t.ɵɵdirectiveInject(re),t.ɵɵdirectiveInject(Le),t.ɵɵdirectiveInject(Fe),t.ɵɵdirectiveInject(d.ActivatedRoute))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-change-password"]],decls:32,vars:4,consts:[[1,"container"],[1,"d-flex","justify-content-center","row","align-items-center"],[1,"col"],[1,"tin-input",2,"font-size","14px"],["class","col",4,"ngIf"],["id","txtNewPassword","display","New Password","width","300px","type","password",3,"value","valueChange"],["id","txtConfirmPassword","display","Confirm Password","width","300px","type","password",3,"value","valueChange"],[1,"col","mt-3"],["id","btnChange","mat-raised-button","","color","primary","cdkFocusInitial","",3,"click"],["role","alert",1,"alert","alert-info",2,"font-size","14px"],["id","txtuserName","display","Username","width","300px","readonly","true",3,"value","valueChange"],["id","txtPassword","display","Current Password","width","300px","type","password",3,"value","valueChange"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"h4"),t.ɵɵtext(1,"Change Password"),t.ɵɵelementEnd(),t.ɵɵelement(2,"hr"),t.ɵɵelementStart(3,"div",0),t.ɵɵelementStart(4,"div",1),t.ɵɵelementStart(5,"div",2),t.ɵɵelementStart(6,"div",3),t.ɵɵtemplate(7,Wn,2,1,"div",4),t.ɵɵtemplate(8,Zn,2,1,"div",4),t.ɵɵelementStart(9,"div",2),t.ɵɵelementStart(10,"spa-text",5),t.ɵɵlistener("valueChange",(function(e){return n.changePassword.newPassword=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"div",2),t.ɵɵelementStart(12,"spa-text",6),t.ɵɵlistener("valueChange",(function(e){return n.changePassword.confirmPassword=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(13,"div",7),t.ɵɵelementStart(14,"button",8),t.ɵɵlistener("click",(function(){return n.change()})),t.ɵɵtext(15,"Change"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(16,"div",2),t.ɵɵelementStart(17,"div",9),t.ɵɵelementStart(18,"b"),t.ɵɵtext(19,"*Please consider these requirements for your new password."),t.ɵɵelementEnd(),t.ɵɵelement(20,"br"),t.ɵɵelement(21,"br"),t.ɵɵtext(22," At least 8 characters"),t.ɵɵelement(23,"br"),t.ɵɵtext(24," At least 1 uppercase letter (A-Z)"),t.ɵɵelement(25,"br"),t.ɵɵtext(26," At least 2 lowercase letters (a-z)"),t.ɵɵelement(27,"br"),t.ɵɵtext(28," At least 1 digit (0-9)"),t.ɵɵelement(29,"br"),t.ɵɵtext(30," At least 1 special character (~`! …)"),t.ɵɵelement(31,"br"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(7),t.ɵɵproperty("ngIf",""!=n.changePassword.userName),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",!n.myRole[n.dataService.capUsers.name]),t.ɵɵadvance(2),t.ɵɵproperty("value",n.changePassword.newPassword),t.ɵɵadvance(2),t.ɵɵproperty("value",n.changePassword.confirmPassword))},directives:[i.NgIf,Ut,r.MatButton],styles:[""]}),e}();function Qn(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",20),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().updateProfile()})),t.ɵɵtext(1,"Update Profile"),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵproperty("disabled",a.isProcessing)}}function Kn(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"a",21),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().gotoUsers()})),t.ɵɵtext(1,"User Manager"),t.ɵɵelementEnd()}}function Yn(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"a",22),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(i),t.ɵɵnextContext().changePassword()})),t.ɵɵtext(1,"Change Password"),t.ɵɵelementEnd()}}var Xn=function(){function e(e,t,n,i,a){this.dataService=e,this.messageService=t,this.httpService=n,this.router=i,this.authService=a,this.appConfig=new we,this.selfProfile=!1,this.profile=new Ne}return e.prototype.ngOnInit=function(){this.myRole=this.authService.currentRoleSource.value,""==this.dataService.tmpProfileuserName?this.loadProfile(this.authService.currentUser):(this.loadProfile(this.dataService.tmpProfileuserName),this.dataService.tmpProfileuserName="")},e.prototype.loadProfile=function(e){var t=this;this.dataService.GetUserByID(e).subscribe((function(e){t.profile=e[0],t.profile.userName.toLocaleLowerCase()==t.authService.currentUser.toLocaleLowerCase()&&(t.selfProfile=!0),t.loadRoles(),console.log(t.profile)}),(function(e){t.isProcessing=!1,t.messageService.toast(t.httpService.Error(e))}))},e.prototype.loadRoles=function(){var e=this;this.dataService.GetRole("all","").subscribe((function(t){e.roles=t,console.log(e.roles)}),(function(t){e.isProcessing=!1,e.messageService.toast(e.httpService.Error(t))}))},e.prototype.changePassword=function(){this.dataService.tmpProfileuserName=this.profile.userName,this.router.navigate(["home/user/change-password"])},e.prototype.gotoUsers=function(){this.router.navigate(["home/admin/users"])},e.prototype.update=function(){},e.prototype.updateProfile=function(){var e=this;this.isProcessing=!0,this.dataService.UpdateUser(this.profile).subscribe((function(t){e.isProcessing=!1,t.success?e.messageService.toast("Profile Updated"):e.messageService.toast("Error: "+t.message)}),(function(t){e.messageService.toast("Connection failed "),e.isProcessing=!1}))},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(Le),t.ɵɵdirectiveInject(re),t.ɵɵdirectiveInject(Oe),t.ɵɵdirectiveInject(d.Router),t.ɵɵdirectiveInject(Fe))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-profile"]],inputs:{appConfig:"appConfig"},decls:28,vars:15,consts:[[1,"container"],[1,"row","mt-3",2,"font-size","14px"],[1,"col-2","mt-3"],[1,"tin-input"],[1,"col"],[2,"font-size","70px"],["id","lbluserName",2,"font-size","14px"],[1,"col-8","mt-3"],[1,"tin-input",2,"width","70%"],[1,"tin-input-row"],["id","txtFirstName","display","First Name",3,"value","readonly","valueChange"],["id","txtLastName","display","Last Name",3,"value","readonly","valueChange"],["id","txtAuth","display","Authentication",3,"value","readonly","valueChange"],["id","txtEmail","display","Email",3,"value","readonly","valueChange"],["id","cboRole","display","Role","optionDisplay","roleName","optionValue","roleID",3,"options","value","readonly","valueChange"],[1,"tin-input-row","mt-2"],["id","btnUpdate","mat-raised-button","","color","primary",3,"disabled","click",4,"ngIf"],[1,"col-2","mt-4"],["mat-button","","id","lnkUserManager","style","margin-left: 1em",3,"click",4,"ngIf"],["mat-button","","id","lnkChangePassword","style","margin-left: 1em",3,"click",4,"ngIf"],["id","btnUpdate","mat-raised-button","","color","primary",3,"disabled","click"],["mat-button","","id","lnkUserManager",2,"margin-left","1em",3,"click"],["mat-button","","id","lnkChangePassword",2,"margin-left","1em",3,"click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵelementStart(3,"div",3),t.ɵɵelementStart(4,"div",4),t.ɵɵelementStart(5,"mat-icon",5),t.ɵɵtext(6,"account_circle"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"div",4),t.ɵɵelementStart(8,"mat-label",6),t.ɵɵtext(9),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"div",7),t.ɵɵelementStart(11,"div",8),t.ɵɵelementStart(12,"div",9),t.ɵɵelementStart(13,"div",4),t.ɵɵelementStart(14,"spa-text",10),t.ɵɵlistener("valueChange",(function(e){return n.profile.firstName=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(15,"div",4),t.ɵɵelementStart(16,"spa-text",11),t.ɵɵlistener("valueChange",(function(e){return n.profile.lastName=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(17,"div",4),t.ɵɵelementStart(18,"spa-text",12),t.ɵɵlistener("valueChange",(function(e){return n.profile.authType=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(19,"div",4),t.ɵɵelementStart(20,"spa-text",13),t.ɵɵlistener("valueChange",(function(e){return n.profile.email=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(21,"div",4),t.ɵɵelementStart(22,"spa-select",14),t.ɵɵlistener("valueChange",(function(e){return n.profile.roleID=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(23,"div",15),t.ɵɵtemplate(24,Qn,2,1,"button",16),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(25,"div",17),t.ɵɵtemplate(26,Kn,2,0,"a",18),t.ɵɵtemplate(27,Yn,2,0,"a",19),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(9),t.ɵɵtextInterpolate(null==n.profile?null:n.profile.userName),t.ɵɵadvance(5),t.ɵɵproperty("value",n.profile.firstName)("readonly",n.selfProfile),t.ɵɵadvance(2),t.ɵɵproperty("value",n.profile.lastName)("readonly",n.selfProfile),t.ɵɵadvance(2),t.ɵɵproperty("value",n.profile.authType)("readonly",!0),t.ɵɵadvance(2),t.ɵɵproperty("value",n.profile.email)("readonly",n.selfProfile),t.ɵɵadvance(2),t.ɵɵproperty("options",n.roles)("value",n.profile.roleID)("readonly",n.selfProfile),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",!n.selfProfile),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",!n.selfProfile),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",(n.selfProfile||n.myRole[n.dataService.capUsers.name])&&"local"==n.profile.authType))},directives:[S.MatIcon,a.MatLabel,Ut,tn,i.NgIf,r.MatButton,r.MatAnchor],styles:[""]}),e}(),ei=function(){function e(){}return e.ɵmod=t.ɵɵdefineNgModule({type:e}),e.ɵinj=t.ɵɵdefineInjector({factory:function(t){return new(t||e)},imports:[[L.ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl:"never"}),i.CommonModule,L.FormsModule,L.ReactiveFormsModule,Ve,jn],i.CommonModule,L.FormsModule,Ve]}),e}();function ti(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",5),t.ɵɵelementStart(1,"mat-form-field",6),t.ɵɵelementStart(2,"mat-label"),t.ɵɵtext(3),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"input",7),t.ɵɵlistener("ngModelChange",(function(e){return t.ɵɵrestoreView(i),n.$implicit.sValue=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(5,"button",8),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(i);var e=n.$implicit;return t.ɵɵnextContext().updateSetting(e)})),t.ɵɵelementStart(6,"mat-icon"),t.ɵɵtext(7,"done_all"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"mat-label",9),t.ɵɵtext(9),t.ɵɵpipe(10,"date"),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=n.$implicit;t.ɵɵadvance(3),t.ɵɵtextInterpolate(a.sName),t.ɵɵadvance(1),t.ɵɵproperty("ngModel",a.sValue),t.ɵɵadvance(5),t.ɵɵtextInterpolate2("Last Updated by ",a.updatedBy," on ",t.ɵɵpipeBind2(10,4,a.updatedDate,"dd MMM yy HH:mm"),"")}}("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(ei,{declarations:[Jn,Xn],imports:[L.ReactiveFormsModule,i.CommonModule,L.FormsModule,L.ReactiveFormsModule,Ve,jn],exports:[i.CommonModule,L.FormsModule,Ve,Jn,Xn]});var ni=function(){function e(e,t){this.dataService=e,this.messageService=t,this._filterText="",this.isProcessing=!1}return e.prototype.ngOnInit=function(){this.loadSettings()},e.prototype.applyFilter=function(e){this.settings.filter=e.trim().toLowerCase()},e.prototype.loadSettings=function(){var e=this;this.dataService.GetSetting("all","").subscribe((function(t){e.settings=t}))},e.prototype.updateSetting=function(e){var t=this;this.isProcessing=!0,this.dataService.UpdateSetting(e,"edit").subscribe((function(n){t.isProcessing=!1,n.success?(t.messageService.toast("Setting "+e.sName+" Updated"),t.loadSettings()):t.messageService.toast("Error: "+n.message)}))},e.prototype.addSetting=function(){this.messageService.toast("Feature not Available")},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(Le),t.ɵɵdirectiveInject(re))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-settings"]],decls:10,vars:1,consts:[[1,"container"],[1,"row","justify-content-between",2,"padding-bottom","10px","padding-left","10px"],[1,"col-2"],["mat-raised-button","",3,"click"],["class","row mt-1 mb-1","style","margin-left:10px",4,"ngFor","ngForOf"],[1,"row","mt-1","mb-1",2,"margin-left","10px"],[2,"width","500px","font-size","14px"],["matInput","","autocomplete","off",3,"ngModel","ngModelChange"],["mat-mini-fab","","color","primary",2,"margin-right","150px",3,"click"],[2,"font-size","small"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"h4"),t.ɵɵtext(1,"Settings"),t.ɵɵelementEnd(),t.ɵɵelement(2,"hr"),t.ɵɵelementStart(3,"div",0),t.ɵɵelementStart(4,"div",1),t.ɵɵelement(5,"div",2),t.ɵɵelementStart(6,"div",2),t.ɵɵelementStart(7,"button",3),t.ɵɵlistener("click",(function(){return n.loadSettings()})),t.ɵɵtext(8,"Refresh"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(9,ti,11,7,"div",4),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(9),t.ɵɵproperty("ngForOf",n.settings))},directives:[r.MatButton,i.NgForOf,a.MatFormField,a.MatLabel,C.MatInput,L.DefaultValueAccessor,L.NgControlStatus,L.NgModel,S.MatIcon],pipes:[i.DatePipe],styles:[".mat-mini-fab[_ngcontent-%COMP%]{width:32px;height:32px}.mat-mini-fab[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;margin-top:-3px}"]}),e}(),ii=["logsPaginator"];function ai(e,n){1&e&&(t.ɵɵelementStart(0,"p"),t.ɵɵelementStart(1,"em"),t.ɵɵtext(2,"Loading..."),t.ɵɵelementEnd(),t.ɵɵelementEnd())}function ri(e,n){1&e&&(t.ɵɵelementStart(0,"th",21),t.ɵɵtext(1," User "),t.ɵɵelementEnd())}function oi(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",22),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",i.userName," ")}}function li(e,n){1&e&&(t.ɵɵelementStart(0,"th",23),t.ɵɵtext(1," Date Logged "),t.ɵɵelementEnd())}function si(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",22),t.ɵɵtext(1),t.ɵɵpipe(2,"date"),t.ɵɵelementEnd()),2&e){var i=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",t.ɵɵpipeBind2(2,1,i.dateLogged,"dd MMM yy HH:mm:ss")," ")}}function ci(e,n){1&e&&(t.ɵɵelementStart(0,"th",21),t.ɵɵtext(1," Source "),t.ɵɵelementEnd())}function pi(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",22),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",i.source," ")}}function di(e,n){1&e&&(t.ɵɵelementStart(0,"th",21),t.ɵɵtext(1," Details "),t.ɵɵelementEnd())}function mi(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",22),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",i.details," ")}}function ui(e,n){1&e&&(t.ɵɵelementStart(0,"th",21),t.ɵɵtext(1," Name "),t.ɵɵelementEnd())}function fi(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",22),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate2("",i.user.firstName," ",i.user.lastName,"")}}function gi(e,n){1&e&&t.ɵɵelement(0,"tr",24)}function hi(e,n){1&e&&t.ɵɵelement(0,"tr",25)}function vi(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",9),t.ɵɵelementStart(1,"table",10),t.ɵɵelementContainerStart(2,11),t.ɵɵtemplate(3,ri,2,0,"th",12),t.ɵɵtemplate(4,oi,2,1,"td",13),t.ɵɵelementContainerEnd(),t.ɵɵelementContainerStart(5,14),t.ɵɵtemplate(6,li,2,0,"th",15),t.ɵɵtemplate(7,si,3,4,"td",13),t.ɵɵelementContainerEnd(),t.ɵɵelementContainerStart(8,16),t.ɵɵtemplate(9,ci,2,0,"th",12),t.ɵɵtemplate(10,pi,2,1,"td",13),t.ɵɵelementContainerEnd(),t.ɵɵelementContainerStart(11,17),t.ɵɵtemplate(12,di,2,0,"th",12),t.ɵɵtemplate(13,mi,2,1,"td",13),t.ɵɵelementContainerEnd(),t.ɵɵelementContainerStart(14,18),t.ɵɵtemplate(15,ui,2,0,"th",12),t.ɵɵtemplate(16,fi,2,2,"td",13),t.ɵɵelementContainerEnd(),t.ɵɵtemplate(17,gi,1,0,"tr",19),t.ɵɵtemplate(18,hi,1,0,"tr",20),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵproperty("dataSource",i.logs),t.ɵɵadvance(16),t.ɵɵproperty("matHeaderRowDef",i.displayedColumns),t.ɵɵadvance(1),t.ɵɵproperty("matRowDefColumns",i.displayedColumns)}}var yi=function(){return[50,100,200]},xi=function(){function e(e,t){this.authService=e,this.dataService=t,this.isProcessing=!1,this.displayedColumns=["dateLogged","userName","fullName","source","details"]}return e.prototype.ngOnInit=function(){this.authService.isAuthorised(this.dataService.capLogs.name),this.loadLogs()},e.prototype.loadLogs=function(){var e=this;this.dataService.GetLog("all","").subscribe((function(t){e.logs=new O.MatTableDataSource(t),e.logs.paginator=e.logsPaginator}))},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(Fe),t.ɵɵdirectiveInject(Le))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-logs"]],viewQuery:function(e,n){var i;(1&e&&t.ɵɵviewQuery(ii,!0),2&e)&&(t.ɵɵqueryRefresh(i=t.ɵɵloadQuery())&&(n.logsPaginator=i.first))},decls:12,vars:5,consts:[[1,"container-fluid"],[1,"row","justify-content-between",2,"padding-bottom","10px"],[1,"col-2"],[1,"d-flex","justify-content-end"],[3,"data","refreshClick"],[4,"ngIf"],["class","mat-elevation-z8",4,"ngIf"],["showFirstLastButtons","",3,"pageSizeOptions"],["logsPaginator",""],[1,"mat-elevation-z8"],["id","tblTable","mat-table","",3,"dataSource"],["matColumnDef","userName"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","dateLogged"],["mat-header-cell","","class","datetime",4,"matHeaderCellDef"],["matColumnDef","source"],["matColumnDef","details"],["matColumnDef","fullName"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-cell","",1,"datetime"],["mat-header-row",""],["mat-row",""]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"h4"),t.ɵɵtext(1,"Logs"),t.ɵɵelementEnd(),t.ɵɵelement(2,"hr"),t.ɵɵelementStart(3,"div",0),t.ɵɵelementStart(4,"div",1),t.ɵɵelement(5,"div",2),t.ɵɵelementStart(6,"div",3),t.ɵɵelementStart(7,"spa-filter",4),t.ɵɵlistener("refreshClick",(function(){return n.loadLogs()})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(8,ai,3,0,"p",5),t.ɵɵtemplate(9,vi,19,3,"div",6),t.ɵɵelement(10,"mat-paginator",7,8),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(7),t.ɵɵproperty("data",n.logs),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",!n.logs),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.logs),t.ɵɵadvance(1),t.ɵɵproperty("pageSizeOptions",t.ɵɵpureFunction0(4,yi)))},directives:[Fn,i.NgIf,b.MatPaginator,O.MatTable,O.MatColumnDef,O.MatHeaderCellDef,O.MatCellDef,O.MatHeaderRowDef,O.MatRowDef,O.MatHeaderCell,O.MatCell,O.MatHeaderRow,O.MatRow],pipes:[i.DatePipe],styles:[".mat-mini-fab[_ngcontent-%COMP%]{width:32px;height:32px}.mat-mini-fab[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;margin-top:-3px}.refreshIcon[_ngcontent-%COMP%]{font-size:22px!important;margin-top:-7px!important}"]}),e}(),Si=["usersPaginator"];function Ci(e,n){1&e&&(t.ɵɵelementStart(0,"p"),t.ɵɵelementStart(1,"em"),t.ɵɵtext(2,"Loading..."),t.ɵɵelementEnd(),t.ɵɵelementEnd())}function Mi(e,n){1&e&&(t.ɵɵelementStart(0,"th",25),t.ɵɵtext(1," userName "),t.ɵɵelementEnd())}function wi(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",26),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",i.userName," ")}}function bi(e,n){1&e&&(t.ɵɵelementStart(0,"th",25),t.ɵɵtext(1," Locked "),t.ɵɵelementEnd())}function Ei(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",26),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",i.locked," ")}}function Ii(e,n){1&e&&(t.ɵɵelementStart(0,"th",25),t.ɵɵtext(1," Name "),t.ɵɵelementEnd())}function ki(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",26),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate2(" ",i.firstName," ",i.lastName," ")}}function Pi(e,n){1&e&&(t.ɵɵelementStart(0,"th",25),t.ɵɵtext(1," Role "),t.ɵɵelementEnd())}function Ni(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",26),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",i.role.roleName," ")}}function Di(e,n){1&e&&(t.ɵɵelementStart(0,"th",25),t.ɵɵtext(1," Disabled "),t.ɵɵelementEnd())}function Oi(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",26),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var i=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",i.disabled," ")}}function Ti(e,n){1&e&&(t.ɵɵelementStart(0,"th",25),t.ɵɵtext(1," Created "),t.ɵɵelementEnd())}function Fi(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",26),t.ɵɵtext(1),t.ɵɵpipe(2,"date"),t.ɵɵelementEnd()),2&e){var i=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",t.ɵɵpipeBind2(2,1,i.createdDate,"dd/MM/yyyy")," ")}}function Li(e,n){1&e&&(t.ɵɵelementStart(0,"th",25),t.ɵɵtext(1," Updated "),t.ɵɵelementEnd())}function ji(e,n){if(1&e&&(t.ɵɵelementStart(0,"td",26),t.ɵɵtext(1),t.ɵɵpipe(2,"date"),t.ɵɵelementEnd()),2&e){var i=n.$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",t.ɵɵpipeBind2(2,1,i.updatedDate,"dd/MM/yyyy")," ")}}function Ai(e,n){1&e&&(t.ɵɵelementStart(0,"th",25),t.ɵɵtext(1," Action "),t.ɵɵelementEnd())}function Ri(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",32),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(i);var e=t.ɵɵnextContext().$implicit;return t.ɵɵnextContext(2).lock(e)})),t.ɵɵelementStart(1,"mat-icon"),t.ɵɵtext(2,"lock"),t.ɵɵelementEnd(),t.ɵɵelementEnd()}}function Ui(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",33),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(i);var e=t.ɵɵnextContext().$implicit;return t.ɵɵnextContext(2).unlock(e)})),t.ɵɵelementStart(1,"mat-icon"),t.ɵɵtext(2,"lock_open"),t.ɵɵelementEnd(),t.ɵɵelementEnd()}}function Vi(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"td",27),t.ɵɵelementStart(1,"button",28),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(i);var e=n.$implicit;return t.ɵɵnextContext(2).viewProfile(e)})),t.ɵɵelementStart(2,"mat-icon"),t.ɵɵtext(3,"account_circle"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(4,Ri,3,0,"button",29),t.ɵɵtemplate(5,Ui,3,0,"button",30),t.ɵɵelementStart(6,"button",31),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(i);var e=n.$implicit;return t.ɵɵnextContext(2).deleteUser(e)})),t.ɵɵelementStart(7,"mat-icon"),t.ɵɵtext(8,"delete"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=n.$implicit;t.ɵɵadvance(4),t.ɵɵproperty("ngIf","0"==a.locked),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","1"==a.locked)}}function _i(e,n){1&e&&t.ɵɵelement(0,"tr",34)}var zi=function(e){return{"make-gray":e}};function Bi(e,n){if(1&e&&t.ɵɵelement(0,"tr",35),2&e){var i=n.$implicit;t.ɵɵproperty("ngClass",t.ɵɵpureFunction1(1,zi,"1"==i.disabled))}}function qi(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",10),t.ɵɵelementStart(1,"table",11),t.ɵɵelementContainerStart(2,12),t.ɵɵtemplate(3,Mi,2,0,"th",13),t.ɵɵtemplate(4,wi,2,1,"td",14),t.ɵɵelementContainerEnd(),t.ɵɵelementContainerStart(5,15),t.ɵɵtemplate(6,bi,2,0,"th",13),t.ɵɵtemplate(7,Ei,2,1,"td",14),t.ɵɵelementContainerEnd(),t.ɵɵelementContainerStart(8,16),t.ɵɵtemplate(9,Ii,2,0,"th",13),t.ɵɵtemplate(10,ki,2,2,"td",14),t.ɵɵelementContainerEnd(),t.ɵɵelementContainerStart(11,17),t.ɵɵtemplate(12,Pi,2,0,"th",13),t.ɵɵtemplate(13,Ni,2,1,"td",14),t.ɵɵelementContainerEnd(),t.ɵɵelementContainerStart(14,18),t.ɵɵtemplate(15,Di,2,0,"th",13),t.ɵɵtemplate(16,Oi,2,1,"td",14),t.ɵɵelementContainerEnd(),t.ɵɵelementContainerStart(17,19),t.ɵɵtemplate(18,Ti,2,0,"th",13),t.ɵɵtemplate(19,Fi,3,4,"td",14),t.ɵɵelementContainerEnd(),t.ɵɵelementContainerStart(20,20),t.ɵɵtemplate(21,Li,2,0,"th",13),t.ɵɵtemplate(22,ji,3,4,"td",14),t.ɵɵelementContainerEnd(),t.ɵɵelementContainerStart(23,21),t.ɵɵtemplate(24,Ai,2,0,"th",13),t.ɵɵtemplate(25,Vi,9,2,"td",22),t.ɵɵelementContainerEnd(),t.ɵɵtemplate(26,_i,1,0,"tr",23),t.ɵɵtemplate(27,Bi,1,3,"tr",24),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var i=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵproperty("dataSource",i.users),t.ɵɵadvance(25),t.ɵɵproperty("matHeaderRowDef",i.displayedColumns),t.ɵɵadvance(1),t.ɵɵproperty("matRowDefColumns",i.displayedColumns)}}var Hi=function(){return[10,20,50]},$i=function(){function e(e,t,n,i,a,r){this.httpService=e,this.router=t,this.authService=n,this.dataService=i,this.dialog=a,this.messageService=r,this.isProcessing=!1,this._filterText="",this.displayedColumns=["userName","fullName","roleName","locked","dateCreated","Action"]}return e.prototype.ngOnInit=function(){this.authService.isAuthorised(this.dataService.capUsers.name),this.UpdateData()},e.prototype.UpdateData=function(){var e=this;this.dataService.GetUser().subscribe((function(t){e.users=new O.MatTableDataSource(t),e.users.paginator=e.usersPaginator,e.applyFilter(e._filterText)}),(function(t){e.isProcessing=!1,e.messageService.toast(e.httpService.Error(t))}))},e.prototype.applyFilter=function(e){this.users.filter=e.trim().toLowerCase()},e.prototype.createAccount=function(){this.router.navigate(["home/admin/create-account"])},e.prototype.viewProfile=function(e){this.dataService.tmpProfileuserName=e.userName,this.router.navigate(["home/user/profile"])},e.prototype.lock=function(e){var t=this,n={userName:e.userName,password:"Abcdef@123"};this.dataService.LockUser(n).subscribe((function(e){e.success?(t.messageService.toast("User Locked"),t.UpdateData()):t.messageService.toast("Error: "+e)}))},e.prototype.unlock=function(e){var t=this,n={userName:e.userName,password:"Abcdef@123"};this.dataService.UnlockUser(n).subscribe((function(e){e.success?(t.messageService.toast("User Unlocked"),t.UpdateData()):t.messageService.toast("Error: "+e)}))},e.prototype.recover=function(e){var t=this;this.dataService.SelfReset(e).subscribe((function(e){"success"==e.message?t.messageService.toast("The password has been sent on email"):t.messageService.toast("Error: "+e.message)}))},e.prototype.deleteUser=function(e){var t=this;this.messageService.confirm("Delete "+e.userName+" ?").subscribe((function(n){"yes"==n&&(t.isProcessing=!0,t.dataService.DeleteUser(e).subscribe((function(e){t.isProcessing=!1,"success"==e.message?(t.messageService.toast("User Deleted"),t.UpdateData()):t.messageService.toast("Error: "+e.message)}),(function(e){t.messageService.toast("Connection failed "),t.isProcessing=!1})))}))},e.ɵfac=function(i){return new(i||e)(t.ɵɵdirectiveInject(Oe),t.ɵɵdirectiveInject(d.Router),t.ɵɵdirectiveInject(Fe),t.ɵɵdirectiveInject(Le),t.ɵɵdirectiveInject(n.MatDialog),t.ɵɵdirectiveInject(re))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-users"]],viewQuery:function(e,n){var i;(1&e&&t.ɵɵviewQuery(Si,!0),2&e)&&(t.ɵɵqueryRefresh(i=t.ɵɵloadQuery())&&(n.usersPaginator=i.first))},decls:14,vars:5,consts:[[1,"container"],[1,"row","justify-content-between",2,"padding-bottom","10px"],[1,"col-2"],["id","btnCreateAccount","mat-raised-button","","color","primary",3,"click"],[1,"d-flex","justify-content-end"],[3,"data","refreshClick"],[4,"ngIf"],["class","mat-elevation-z8",4,"ngIf"],["showFirstLastButtons","",3,"pageSizeOptions"],["usersPaginator",""],[1,"mat-elevation-z8"],["id","tblTable","mat-table","",3,"dataSource"],["matColumnDef","userName"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","locked"],["matColumnDef","fullName"],["matColumnDef","roleName"],["matColumnDef","disabled"],["matColumnDef","dateCreated"],["matColumnDef","dateUpdated"],["matColumnDef","Action"],["mat-cell","","style","width: 250px;",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"ngClass",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-cell","",2,"width","250px"],["mat-mini-fab","","color","primary","matTooltip","View Profile","matTooltipPosition","above",2,"margin-right","30px",3,"click"],["mat-mini-fab","","color","warn","style","margin-right:10px","matTooltip","Lock","matTooltipPosition","above",3,"click",4,"ngIf"],["mat-mini-fab","","style","margin-right:10px; background-color: green;","matTooltip","Unlock","matTooltipPosition","above",3,"click",4,"ngIf"],["mat-mini-fab","","color","warn","matTooltip","Delete","matTooltipPosition","above",2,"margin-right","10px",3,"click"],["mat-mini-fab","","color","warn","matTooltip","Lock","matTooltipPosition","above",2,"margin-right","10px",3,"click"],["mat-mini-fab","","matTooltip","Unlock","matTooltipPosition","above",2,"margin-right","10px","background-color","green",3,"click"],["mat-header-row",""],["mat-row","",3,"ngClass"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"h4"),t.ɵɵtext(1,"Users"),t.ɵɵelementEnd(),t.ɵɵelement(2,"hr"),t.ɵɵelementStart(3,"div",0),t.ɵɵelementStart(4,"div",1),t.ɵɵelementStart(5,"div",2),t.ɵɵelementStart(6,"button",3),t.ɵɵlistener("click",(function(){return n.createAccount()})),t.ɵɵtext(7,"Create Account"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"div",4),t.ɵɵelementStart(9,"spa-filter",5),t.ɵɵlistener("refreshClick",(function(){return n.UpdateData()})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(10,Ci,3,0,"p",6),t.ɵɵtemplate(11,qi,28,3,"div",7),t.ɵɵelement(12,"mat-paginator",8,9),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(9),t.ɵɵproperty("data",n.users),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",!n.users),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.users),t.ɵɵadvance(1),t.ɵɵproperty("pageSizeOptions",t.ɵɵpureFunction0(4,Hi)))},directives:[r.MatButton,Fn,i.NgIf,b.MatPaginator,O.MatTable,O.MatColumnDef,O.MatHeaderCellDef,O.MatCellDef,O.MatHeaderRowDef,O.MatRowDef,O.MatHeaderCell,O.MatCell,F.MatTooltip,S.MatIcon,O.MatHeaderRow,O.MatRow,i.NgClass],pipes:[i.DatePipe],styles:[".mat-mini-fab[_ngcontent-%COMP%]{width:32px;height:32px}.mat-mini-fab[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;margin-top:-3px}.refreshIcon[_ngcontent-%COMP%]{font-size:22px!important;margin-top:-7px!important}.make-gray[_ngcontent-%COMP%]{background-color:#d3d3d3}"]}),e}();function Gi(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div"),t.ɵɵelementStart(1,"mat-checkbox",8),t.ɵɵlistener("ngModelChange",(function(e){t.ɵɵrestoreView(i);var a=n.$implicit;return t.ɵɵnextContext(2).role[a.name]=e})),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=n.$implicit,r=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵproperty("ngModel",r.role[a.name]),t.ɵɵadvance(1),t.ɵɵtextInterpolate(a.display)}}function Wi(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",7),t.ɵɵelementStart(1,"mat-checkbox",8),t.ɵɵlistener("ngModelChange",(function(e){t.ɵɵrestoreView(i);var a=n.$implicit;return t.ɵɵnextContext().role[a.name]=e})),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵtemplate(3,Gi,3,2,"div",9),t.ɵɵelementEnd()}if(2&e){var a=n.$implicit,r=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵproperty("ngModel",r.role[a.name]),t.ɵɵadvance(1),t.ɵɵtextInterpolate(a.display),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",a.capSubItems)}}var Zi=function(){function e(e,t,n,i,a){this.messageService=e,this.dataService=t,this.authService=n,this.dialogRef=i,this.data=a,this.role=new De}return e.prototype.ngOnInit=function(){this.capItems=this.data},e.prototype.submit=function(){var e=this;"New Role"!=this.role.roleName&&""!=this.role.roleName?(this.isProcessing=!0,this.dataService.PostRole(this.role,"add").subscribe((function(t){e.isProcessing=!1,t.success?(e.messageService.toast("Role Added"),e.dialogRef.close("success")):e.messageService.toast("Error: "+t.message)}),(function(t){e.messageService.toast("Connection failed"),e.isProcessing=!1}))):this.messageService.toast("Please enter Role Name")},e.ɵfac=function(i){return new(i||e)(t.ɵɵdirectiveInject(re),t.ɵɵdirectiveInject(Le),t.ɵɵdirectiveInject(Fe),t.ɵɵdirectiveInject(n.MatDialogRef),t.ɵɵdirectiveInject(n.MAT_DIALOG_DATA))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["app-addRole"]],decls:13,vars:3,consts:[["matInput","","autocomplete","off","placeholder","Enter Role Name",3,"ngModel","ngModelChange"],[1,"mat-typography"],[1,"row"],[1,"row",2,"margin-left","2em","margin-right","2em"],["class","row","style","margin-left: 2em;",4,"ngFor","ngForOf"],["mat-button","","cdkFocusInitial","",3,"disabled","click"],["mat-button","","mat-dialog-close","success"],[1,"row",2,"margin-left","2em"],["color","primary",2,"margin-right","20px","font-size","12px","width","200px",3,"ngModel","ngModelChange"],[4,"ngFor","ngForOf"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"mat-form-field"),t.ɵɵelementStart(1,"mat-label"),t.ɵɵtext(2,"Role Name"),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"input",0),t.ɵɵlistener("ngModelChange",(function(e){return n.role.roleName=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"mat-dialog-content",1),t.ɵɵelementStart(5,"div",2),t.ɵɵelementStart(6,"div",3),t.ɵɵtemplate(7,Wi,4,3,"div",4),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"mat-dialog-actions"),t.ɵɵelementStart(9,"button",5),t.ɵɵlistener("click",(function(){return n.submit()})),t.ɵɵtext(10,"Submit"),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"button",6),t.ɵɵtext(12,"Cancel"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(3),t.ɵɵproperty("ngModel",n.role.roleName),t.ɵɵadvance(4),t.ɵɵproperty("ngForOf",n.capItems),t.ɵɵadvance(2),t.ɵɵproperty("disabled",n.isProcessing))},directives:[a.MatFormField,a.MatLabel,C.MatInput,L.DefaultValueAccessor,L.NgControlStatus,L.NgModel,n.MatDialogContent,i.NgForOf,n.MatDialogActions,r.MatButton,n.MatDialogClose,h.MatCheckbox],styles:[".mat-mini-fab[_ngcontent-%COMP%]{width:32px;height:32px}.mat-mini-fab[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;margin-top:-3px}.refreshIcon[_ngcontent-%COMP%]{font-size:22px!important;margin-top:-7px!important}"]}),e}();function Ji(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",17),t.ɵɵelementStart(1,"mat-checkbox",15),t.ɵɵlistener("ngModelChange",(function(e){t.ɵɵrestoreView(i);var a=n.$implicit;return t.ɵɵnextContext(3).$implicit[a.name]=e})),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=n.$implicit,r=t.ɵɵnextContext(3).$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngModel",r[a.name]),t.ɵɵadvance(1),t.ɵɵtextInterpolate(a.display)}}function Qi(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",17),t.ɵɵelementStart(1,"mat-checkbox",15),t.ɵɵlistener("ngModelChange",(function(e){t.ɵɵrestoreView(i);var a=n.$implicit;return t.ɵɵnextContext(2).$implicit[a.name]=e})),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵtemplate(3,Ji,3,2,"div",18),t.ɵɵelementEnd()}if(2&e){var a=n.$implicit,r=t.ɵɵnextContext(2).$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngModel",r[a.name]),t.ɵɵadvance(1),t.ɵɵtextInterpolate(a.display),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",a.capSubItems)}}function Ki(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",14),t.ɵɵelementStart(1,"mat-checkbox",15),t.ɵɵlistener("ngModelChange",(function(e){t.ɵɵrestoreView(i);var a=n.$implicit;return t.ɵɵnextContext().$implicit[a.name]=e})),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵtemplate(3,Qi,4,3,"div",16),t.ɵɵelementEnd()}if(2&e){var a=n.$implicit,r=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngModel",r[a.name]),t.ɵɵadvance(1),t.ɵɵtextInterpolate(a.display),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",a.capSubItems)}}function Yi(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",8),t.ɵɵelementStart(1,"mat-card",9),t.ɵɵelementStart(2,"h4"),t.ɵɵtext(3),t.ɵɵelementEnd(),t.ɵɵelement(4,"hr"),t.ɵɵelementStart(5,"div",10),t.ɵɵtemplate(6,Ki,4,3,"div",11),t.ɵɵelementEnd(),t.ɵɵelementStart(7,"mat-card-actions"),t.ɵɵelementStart(8,"button",12),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(i);var e=n.$implicit;return t.ɵɵnextContext().updateRole(e)})),t.ɵɵelementStart(9,"mat-icon"),t.ɵɵtext(10,"done_all"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"button",13),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(i);var e=n.$implicit;return t.ɵɵnextContext().deleteRole(e)})),t.ɵɵelementStart(12,"mat-icon"),t.ɵɵtext(13,"delete"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=n.$implicit,r=t.ɵɵnextContext();t.ɵɵadvance(3),t.ɵɵtextInterpolate(a.roleName),t.ɵɵadvance(3),t.ɵɵproperty("ngForOf",r.appConfig.capItems)}}var Xi=function(){function e(e,t,n,i,a,r){this.httpService=e,this.router=t,this.authService=n,this.dataService=i,this.dialog=a,this.messageService=r,this.isProcessing=!1,this.appConfig=new we}return e.prototype.ngOnInit=function(){var e=this;this.authService.isAuthorised(this.dataService.capRoles.name),this.loadRoles(),this.dataService.appConfigObserv.subscribe((function(t){return e.appConfig=t}))},e.prototype.loadRoles=function(){var e=this;this.dataService.GetRole("all","").subscribe((function(t){e.roles=t}))},e.prototype.refresh=function(){this.loadRoles()},e.prototype.addRole=function(){var e=this;this.dialog.open(Zi,{width:"1100px",data:this.appConfig.capItems}).afterClosed().subscribe((function(t){"success"==t&&e.loadRoles()}))},e.prototype.updateRole=function(e){var t=this;this.messageService.confirm("UPDATE "+e.roleName+" ?").subscribe((function(n){"yes"==n&&t.dataService.PostRole(e,"edit").subscribe((function(e){e.success?(t.messageService.toast("Role Updated"),t.loadRoles()):t.messageService.toast("Error: "+e)}))}))},e.prototype.deleteRole=function(e){var t=this;this.messageService.confirm("DELETE "+e.roleName+" ?").subscribe((function(n){"yes"==n&&t.dataService.PostRole(e,"delete").subscribe((function(e){e.success?(t.messageService.toast("Role Deleted"),t.loadRoles()):t.messageService.toast("Error: "+e)}))}))},e.ɵfac=function(i){return new(i||e)(t.ɵɵdirectiveInject(Oe),t.ɵɵdirectiveInject(d.Router),t.ɵɵdirectiveInject(Fe),t.ɵɵdirectiveInject(Le),t.ɵɵdirectiveInject(n.MatDialog),t.ɵɵdirectiveInject(re))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-roles"]],decls:13,vars:1,consts:[[1,"container","mb-5"],[1,"row","justify-content-between",2,"padding-bottom","10px","padding-left","10px"],[1,"col-2"],["id","btnNewRole","mat-raised-button","","color","primary",3,"click"],[1,"col-1"],["id","btnRefresh","mat-mini-fab","","color","primary","matTooltip","refresh data","matTooltipPosition","right",2,"margin-right","1em","margin-top","5px",3,"click"],[1,"refreshIcon"],["class","row mt-2 mb-1","style","margin-left:10px",4,"ngFor","ngForOf"],[1,"row","mt-2","mb-1",2,"margin-left","10px"],[1,"mat-elevation-z8",2,"width","100%","padding-left","2em"],[1,"row",2,"margin-left","2em"],["class","row","style","margin-right:20px;",4,"ngFor","ngForOf"],["mat-mini-fab","","color","primary",2,"margin-right","10px",3,"click"],["mat-mini-fab","","color","warn",2,"margin-right","10px",3,"click"],[1,"row",2,"margin-right","20px"],["color","primary",2,"font-size","12px","width","200px",3,"ngModel","ngModelChange"],["class","row","style","margin-right:20px;margin-left: 0px; ",4,"ngFor","ngForOf"],[1,"row",2,"margin-right","20px","margin-left","0px"],["class","row","style","margin-right:20px;margin-left: 0px;",4,"ngFor","ngForOf"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"h4"),t.ɵɵtext(1," Roles "),t.ɵɵelementEnd(),t.ɵɵelement(2,"hr"),t.ɵɵelementStart(3,"div",0),t.ɵɵelementStart(4,"div",1),t.ɵɵelementStart(5,"div",2),t.ɵɵelementStart(6,"button",3),t.ɵɵlistener("click",(function(){return n.addRole()})),t.ɵɵtext(7,"New Role"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"div",4),t.ɵɵelementStart(9,"button",5),t.ɵɵlistener("click",(function(){return n.refresh()})),t.ɵɵelementStart(10,"mat-icon",6),t.ɵɵtext(11,"refresh"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(12,Yi,14,2,"div",7),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(12),t.ɵɵproperty("ngForOf",n.roles))},directives:[r.MatButton,F.MatTooltip,S.MatIcon,i.NgForOf,g.MatCard,g.MatCardActions,h.MatCheckbox,L.NgControlStatus,L.NgModel],styles:[".mat-mini-fab[_ngcontent-%COMP%]{width:32px;height:32px}.mat-mini-fab[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;margin-top:-3px}.refreshIcon[_ngcontent-%COMP%]{font-size:22px!important;margin-top:-7px!important}"]}),e}();function ea(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",2),t.ɵɵelementStart(1,"div",3),t.ɵɵelementStart(2,"spa-text",13),t.ɵɵlistener("valueChange",(function(e){return t.ɵɵrestoreView(i),t.ɵɵnextContext().register.password=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"div",3),t.ɵɵelementStart(4,"spa-text",14),t.ɵɵlistener("valueChange",(function(e){return t.ɵɵrestoreView(i),t.ɵɵnextContext().confirmPassword=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext();t.ɵɵadvance(2),t.ɵɵproperty("value",a.register.password),t.ɵɵadvance(2),t.ɵɵproperty("value",a.confirmPassword)}}var ta=function(){function e(e,t,n,i,a){this.httpService=e,this.messageService=t,this.dataService=n,this.authService=i,this.router=a,this.appConfig=new we,this.isProcessing=!1,this.register=new Pe,this.openProfile=!0,this.authTypes=[{name:"Local Authentication",value:"local"},{name:"AD Authentication",value:"AD"}]}return e.prototype.ngOnInit=function(){this.appConfig=this.dataService.appConfig},e.prototype.create=function(){var e=this;""!=this.register.authType?(this.isProcessing=!0,this.dataService.RegisterAccount(this.register).subscribe((function(t){e.isProcessing=!1,t.success?(e.messageService.toast("Account Created"),e.openProfile?e.viewProfile(e.register.userName):(e.register=new Pe,e.confirmPassword="")):e.messageService.toast("Error: "+t.message)}),(function(t){e.isProcessing=!1,e.messageService.toast(e.httpService.Error(t))}))):this.messageService.toast("Choose Authentication Type")},e.prototype.viewProfile=function(e){this.dataService.tmpProfileuserName=e,this.router.navigate(["home/user/profile"])},e.ɵfac=function(n){return new(n||e)(t.ɵɵdirectiveInject(Oe),t.ɵɵdirectiveInject(re),t.ɵɵdirectiveInject(Le),t.ɵɵdirectiveInject(Fe),t.ɵɵdirectiveInject(d.Router))},e.ɵcmp=t.ɵɵdefineComponent({type:e,selectors:[["spa-create-account"]],inputs:{appConfig:"appConfig"},decls:22,vars:8,consts:[[1,"container"],[1,"tin-input",2,"font-size","14px","width","70%"],[1,"tin-input-row"],[1,"col"],["id","txtFirstName","display","FirstName",3,"value","valueChange"],["id","txtLastName","display","LastName",3,"value","valueChange"],[1,"tin-input-row","mt-3"],["id","txtUserName","display","Username",3,"value","valueChange"],["id","cboAuth","display","Authentication Type","optionDisplay","name","optionValue","value",3,"options","value","valueChange"],["class","tin-input-row",4,"ngIf"],[1,"tin-input-row","mt-3",2,"margin-left","1em"],["id","cbkOpenAfter","color","primary",2,"margin-right","100px","font-size","12px",3,"ngModel","ngModelChange"],["id","btnCreate","mat-raised-button","","color","primary","cdkFocusInitial","",3,"disabled","click"],["id","txtPassword","display","Password","type","password",3,"value","valueChange"],["id","txtConfirmPassword","display","Confirm Password","type","password",3,"value","valueChange"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"h4"),t.ɵɵtext(1,"Create Account"),t.ɵɵelementEnd(),t.ɵɵelement(2,"hr"),t.ɵɵelementStart(3,"div",0),t.ɵɵelementStart(4,"div",1),t.ɵɵelementStart(5,"div",2),t.ɵɵelementStart(6,"div",3),t.ɵɵelementStart(7,"spa-text",4),t.ɵɵlistener("valueChange",(function(e){return n.register.firstName=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"div",3),t.ɵɵelementStart(9,"spa-text",5),t.ɵɵlistener("valueChange",(function(e){return n.register.lastName=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"div",6),t.ɵɵelementStart(11,"div",3),t.ɵɵelementStart(12,"spa-text",7),t.ɵɵlistener("valueChange",(function(e){return n.register.userName=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(13,"div",3),t.ɵɵelementStart(14,"spa-select",8),t.ɵɵlistener("valueChange",(function(e){return n.register.authType=e})),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(15,ea,5,2,"div",9),t.ɵɵelementStart(16,"div",10),t.ɵɵelementStart(17,"mat-checkbox",11),t.ɵɵlistener("ngModelChange",(function(e){return n.openProfile=e})),t.ɵɵtext(18,"Open profile after creation"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(19,"div",6),t.ɵɵelementStart(20,"button",12),t.ɵɵlistener("click",(function(){return n.create()})),t.ɵɵtext(21,"Create"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(7),t.ɵɵproperty("value",n.register.firstName),t.ɵɵadvance(2),t.ɵɵproperty("value",n.register.lastName),t.ɵɵadvance(3),t.ɵɵproperty("value",n.register.userName),t.ɵɵadvance(2),t.ɵɵproperty("options",n.authTypes)("value",n.register.authType),t.ɵɵadvance(1),t.ɵɵproperty("ngIf","local"==n.register.authType),t.ɵɵadvance(2),t.ɵɵproperty("ngModel",n.openProfile),t.ɵɵadvance(3),t.ɵɵproperty("disabled",""==n.register.authType))},directives:[Ut,tn,i.NgIf,h.MatCheckbox,L.NgControlStatus,L.NgModel,r.MatButton],styles:[""]}),e}(),na=function(){function e(){}return e.ɵmod=t.ɵɵdefineNgModule({type:e}),e.ɵinj=t.ɵɵdefineInjector({factory:function(t){return new(t||e)},imports:[[L.ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl:"never"}),i.CommonModule,L.FormsModule,L.ReactiveFormsModule,Ve,jn],i.CommonModule,L.FormsModule,Ve]}),e}();("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(na,{declarations:[$i,Xi,Zi,ta,xi,ni],imports:[L.ReactiveFormsModule,i.CommonModule,L.FormsModule,L.ReactiveFormsModule,Ve,jn],exports:[i.CommonModule,L.FormsModule,Ve,$i,Xi,Zi,ta,xi,ni]}),e.Account=Ee,e.ActionResponse=Ce,e.ActivityComponent=xn,e.ApiResponse=se,e.AppConfig=we,e.AttachComponent=ln,e.AuthService=Fe,e.CapItem=be,e.ChangePasswordComponent=Jn,e.ChangeUserPassword=ke,e.CheckComponent=nn,e.ChipsComponent=qt,e.Color=ye,e.Condition=ve,e.Constants=ce,e.Core=le,e.CreateAccountComponent=ta,e.DataServiceLib=Le,e.DateComponent=Dt,e.DatetimeComponent=sn,e.ExportService=oe,e.FilterComponent=Fn,e.HtmlComponent=Sn,e.HttpService=Oe,e.Icon=xe,e.LabelComponent=Nn,e.LoaderComponent=Ue,e.LogService=Te,e.LoginComponent=qn,e.LogsComponent=xi,e.MessageService=re,e.MoneyComponent=fn,e.NavMenuComponent=Ye,e.OptionComponent=bn,e.Profile=Ne,e.ProfileComponent=Xn,e.RecoverAccountComponent=$n,e.Register=Pe,e.Role=De,e.RolesComponent=Xi,e.SelectComponent=tn,e.SettingsComponent=ni,e.SignupComponent=Hn,e.SpaAdminModule=na,e.SpaIndexModule=Gn,e.SpaMatModule=Ve,e.SpaUserModule=ei,e.Step=me,e.StepsComponent=Tn,e.StorageService=W,e.TableAction=Se,e.TableColumn=ge,e.TableComponent=bt,e.TableConfig=ue,e.TableCreate=fe,e.TextComponent=Ut,e.Tile=de,e.TilesComponent=Nt,e.TimeoutComponent=Xe,e.TinSpaComponent=ze,e.TinSpaModule=jn,e.TinSpaService=G,e.User=Ie,e.UsersComponent=$i,e.ViewerComponent=Jt,e.addRoleDialog=Zi,e.loginConfig=Me,e.messageDialog=ae,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=tin-spa.umd.min.js.map
|