{"version":3,"sources":["webpack:///login.js","webpack:///./app/login.main.ts","webpack:///./app/login.module.ts","webpack:///./app/login.panelComponent.ts"],"names":["webpackJsonp","1032","module","exports","__webpack_require__","Object","defineProperty","value","platformBrowserDynamic","bootstrapModule","AppModule","1033","__decorate","this","decorators","target","key","desc","d","c","arguments","length","r","getOwnPropertyDescriptor","Reflect","decorate","i","enableProdMode","NgModule","imports","BrowserModule","FormsModule","MaterialModule","FlexLayoutModule","BrowserAnimationsModule","HttpModule","declarations","LoginPanelComponent","bootstrap","1034","__metadata","k","v","metadata","http","LS","Languages","message","loading","ngAfterViewInit","headers","Headers","append","get","map","res","json","subscribe","LanguageId","languageId","languages","error","onChangeLanguage","enter","event","login","post","JSON","stringify","userName","password","result","window","location","href","t","concat","split","id","document","getElementById","style","backgroundImage","_lang","getScreenClass","console","log","date","Date","day","getDay","hours","getHours","minutes","getMinutes","Component","selector","templateUrl","Http"],"mappings":"AAAAA,cAAc,IAERC,KACA,SAAUC,EAAQC,EAASC,GAEjC,YAEAC,QAAOC,eAAeH,EAAS,cAAgBI,OAAMA,GCPrD,cACA,SACiB,GAAAC,yBACRC,gBAAgB,EAAAC,YDanBC,KACA,SAAUT,EAAQC,EAASC,GAEjC,YAEA,IAAIQ,GAAcC,MAAQA,KAAKD,YAAe,SAAUE,EAAYC,EAAQC,EAAKC,GAC7E,GAA2HC,GAAvHC,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIJ,EAAkB,OAATE,EAAgBA,EAAOZ,OAAOkB,yBAAyBR,EAAQC,GAAOC,CACrH,IAAuB,gBAAZO,UAAoD,kBAArBA,SAAQC,SAAyBH,EAAIE,QAAQC,SAASX,EAAYC,EAAQC,EAAKC,OACpH,KAAK,GAAIS,GAAIZ,EAAWO,OAAS,EAAGK,GAAK,EAAGA,KAASR,EAAIJ,EAAWY,MAAIJ,GAAKH,EAAI,EAAID,EAAEI,GAAKH,EAAI,EAAID,EAAEH,EAAQC,EAAKM,GAAKJ,EAAEH,E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MC,gBAAkB,kBAAkB,EAAKrC,GAAGsC,MAAK,aAAa,EAAKC,iBAAgB,UAE/H,SAACvB,GACGwB,QAAQC,IAAIzB,IAEhB,eAMJ,YAAAuB,eAAR,WACI,GAAIG,GAAO,GAAIC,MACXC,EAAMF,EAAKG,SACXC,EAAQJ,EAAKK,WACbC,EAAUN,EAAKO,YAEnB,OAAIL,IAAO,GAAKA,GAAO,EACfE,GAAS,GAAKA,GAAS,GAChB,MAEA,SAENA,GAAS,GAAMA,GAAS,GAAKE,GAAW,KAAQF,GAAS,GACnD,MAEA,SApGVtD,EAAmB,GAJ/B,EAAA0D,WACGC,SAAU,cACVC,YAAa,oDHoJTzD,EAAW,qBGlHW,EAAA0D,QAhCjB7D,KAAA,GAAAA,yBH2JV","file":"login.js","sourcesContent":["webpackJsonp([2],{\n\n/***/ 1032:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar platform_browser_dynamic_1 = __webpack_require__(159);\r\nvar login_module_1 = __webpack_require__(1033);\r\nvar platform = platform_browser_dynamic_1.platformBrowserDynamic();\r\nplatform.bootstrapModule(login_module_1.AppModule);\r\n\n\n/***/ }),\n\n/***/ 1033:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar core_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(35);\r\nvar forms_1 = __webpack_require__(30);\r\nvar material_1 = __webpack_require__(6);\r\nvar flex_layout_1 = __webpack_require__(179);\r\nvar animations_1 = __webpack_require__(183);\r\nvar http_1 = __webpack_require__(9);\r\n__webpack_require__(86);\r\nvar login_panelComponent_1 = __webpack_require__(1034);\r\nvar core_2 = __webpack_require__(2);\r\ncore_2.enableProdMode();\r\nvar AppModule = /** @class */ (function () {\r\n function AppModule() {\r\n }\r\n AppModule = __decorate([\r\n core_1.NgModule({\r\n imports: [platform_browser_1.BrowserModule, forms_1.FormsModule, material_1.MaterialModule, flex_layout_1.FlexLayoutModule, animations_1.BrowserAnimationsModule, http_1.HttpModule],\r\n declarations: [login_panelComponent_1.LoginPanelComponent],\r\n bootstrap: [login_panelComponent_1.LoginPanelComponent]\r\n })\r\n ], AppModule);\r\n return AppModule;\r\n}());\r\nexports.AppModule = AppModule;\r\n\n\n/***/ }),\n\n/***/ 1034:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __metadata = (this && this.__metadata) || function (k, v) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar core_1 = __webpack_require__(2);\r\nvar http_1 = __webpack_require__(9);\r\nvar LoginPanelComponent = /** @class */ (function () {\r\n function LoginPanelComponent(http) {\r\n this.http = http;\r\n this.LS = {};\r\n this.Languages = [];\r\n this.message = \"\";\r\n this.loading = false;\r\n }\r\n LoginPanelComponent.prototype.ngAfterViewInit = function () {\r\n var _this = this;\r\n var headers = new http_1.Headers();\r\n headers.append('Content-Type', 'application/json');\r\n this.http.get(\"./Account/GetLanguages\", { headers: headers })\r\n .map(function (res) { return res.json(); }).subscribe(function (res) {\r\n _this.LanguageId = res.languageId;\r\n _this.Languages = res.languages;\r\n }, function (error) {\r\n }, function () {\r\n _this.onChangeLanguage();\r\n });\r\n };\r\n LoginPanelComponent.prototype.enter = function (event) {\r\n var _this = this;\r\n if (!this.login) {\r\n return;\r\n }\r\n this.loading = true;\r\n this.message = '';\r\n var headers = new http_1.Headers();\r\n headers.append('Content-Type', 'application/json');\r\n this.http.post(\"./Account/LogOn\", JSON.stringify({ userName: this.login, password: this.password }), { headers: headers })\r\n .map(function (res) { return res.json(); }).subscribe(function (res) {\r\n if (res.result == 'ok') {\r\n window.location.href = \"../\";\r\n }\r\n else if (res.result == 'error') {\r\n _this.message = \"\".concat.apply(\"\", res.message.split(\"$\").map(function (t) { return t in _this.LS ? _this.LS[t] : t; }));\r\n _this.loading = false;\r\n }\r\n }, function (error) {\r\n _this.loading = false;\r\n }, function () {\r\n //completed\r\n });\r\n };\r\n LoginPanelComponent.prototype.onChangeLanguage = function () {\r\n var _this = this;\r\n var headers = new http_1.Headers();\r\n headers.append('Content-Type', 'application/json');\r\n this.http.post(\"./Account/GetLocalizationStrings\", JSON.stringify({ id: this.LanguageId }), { headers: headers })\r\n .map(function (res) { return res.json(); }).subscribe(function (res) {\r\n _this.LS = res;\r\n document.getElementById('bodyId').style.backgroundImage = \"url('../images/\" + _this.LS._lang + \"/login_bg_\" + _this.getScreenClass() + \".jpg')\";\r\n }, function (error) {\r\n console.log(error);\r\n }, function () {\r\n //completed\r\n });\r\n };\r\n LoginPanelComponent.prototype.getScreenClass = function () {\r\n var date = new Date();\r\n var day = date.getDay();\r\n var hours = date.getHours();\r\n var minutes = date.getMinutes();\r\n if (day >= 1 && day <= 5) {\r\n if (hours >= 8 && hours <= 20)\r\n return \"day\";\r\n else\r\n return \"night\";\r\n }\r\n else {\r\n if ((hours >= 9 || (hours >= 8 && minutes >= 30)) && hours <= 18)\r\n return \"day\";\r\n else\r\n return \"night\";\r\n }\r\n };\r\n ;\r\n LoginPanelComponent = __decorate([\r\n core_1.Component({\r\n selector: 'login-panel',\r\n templateUrl: './app/templates/login/login.panelComponent.html'\r\n }),\r\n __metadata(\"design:paramtypes\", [http_1.Http])\r\n ], LoginPanelComponent);\r\n return LoginPanelComponent;\r\n}());\r\nexports.LoginPanelComponent = LoginPanelComponent;\r\n\n\n/***/ })\n\n},[1032]);\n\n\n// WEBPACK FOOTER //\n// login.js","import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\nimport { AppModule } from './login.module';\nconst platform = platformBrowserDynamic();\nplatform.bootstrapModule(AppModule);\n\n\n// WEBPACK FOOTER //\n// ./app/login.main.ts","import { NgModule } from '@angular/core';\r\nimport { BrowserModule } from '@angular/platform-browser';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { MaterialModule } from '@angular/material';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { HttpModule } from '@angular/http';\r\nimport 'hammerjs';\r\nimport { LoginPanelComponent } from './login.panelComponent';\r\n\r\nimport { enableProdMode } from '@angular/core';\r\nenableProdMode();\r\n\r\n@NgModule({\r\n imports: [BrowserModule, FormsModule, MaterialModule, FlexLayoutModule, BrowserAnimationsModule, HttpModule],\r\n declarations: [LoginPanelComponent],\r\n bootstrap: [LoginPanelComponent]\r\n})\r\nexport class AppModule { }\n\n\n// WEBPACK FOOTER //\n// ./app/login.module.ts","import { Component, AfterViewInit } from '@angular/core';\r\nimport { MdDialog, MdDialogRef, MdSnackBar } from '@angular/material';\r\nimport { Http, Response, Headers } from '@angular/http';\r\nimport { Guid } from './Guid';\r\nimport { DictionaryItem } from './ProxyHelper';\r\n\r\n@Component({\r\n selector: 'login-panel',\r\n templateUrl: './app/templates/login/login.panelComponent.html'\r\n})\r\nexport class LoginPanelComponent implements AfterViewInit {\r\n\r\n ngAfterViewInit() {\r\n var headers = new Headers();\r\n headers.append('Content-Type', 'application/json');\r\n\r\n this.http.get(\"./Account/GetLanguages\", { headers: headers })\r\n .map((res: Response) => res.json()\r\n ).subscribe(\r\n (res: any) => {\r\n this.LanguageId = res.languageId;\r\n this.Languages = res.languages;\r\n },\r\n (error) => {\r\n\r\n },\r\n () => {\r\n this.onChangeLanguage();\r\n }\r\n );\r\n }\r\n\r\n LS: any = {};\r\n LanguageId: string;\r\n Languages: DictionaryItem[] = [];\r\n \r\n login: any;\r\n password: any;\r\n\r\n message: string = \"\";\r\n loading: boolean = false;\r\n\r\n constructor(private http: Http) {\r\n }\r\n\r\n public enter(event: any) {\r\n\r\n if (!this.login) { return; }\r\n\r\n this.loading = true;\r\n this.message = '';\r\n\r\n var headers = new Headers();\r\n headers.append('Content-Type', 'application/json');\r\n\r\n this.http.post(\"./Account/LogOn\", JSON.stringify({ userName: this.login, password: this.password }), { headers: headers })\r\n .map((res: Response) => res.json()\r\n ).subscribe(\r\n (res: any) => {\r\n if (res.result == 'ok') {\r\n window.location.href = \"../\";\r\n } else if (res.result == 'error') {\r\n this.message = \"\".concat(...res.message.split(\"$\").map((t: any) => t in this.LS ? this.LS[t] : t));\r\n this.loading = false;\r\n }\r\n },\r\n (error) => {\r\n this.loading = false;\r\n },\r\n () => {\r\n //completed\r\n }\r\n );\r\n }\r\n\r\n onChangeLanguage() {\r\n var headers = new Headers();\r\n headers.append('Content-Type', 'application/json');\r\n\r\n this.http.post(\"./Account/GetLocalizationStrings\", JSON.stringify({ id: this.LanguageId }), { headers: headers })\r\n .map((res: Response) => res.json()\r\n ).subscribe(\r\n (res: any) => {\r\n this.LS = res;\r\n document.getElementById('bodyId').style.backgroundImage = `url('../images/${this.LS._lang}/login_bg_${this.getScreenClass()}.jpg')`;\r\n },\r\n (error) => {\r\n console.log(error);\r\n },\r\n () => {\r\n //completed\r\n }\r\n );\r\n }\r\n\r\n private getScreenClass() {\r\n var date = new Date();\r\n var day = date.getDay();\r\n var hours = date.getHours();\r\n var minutes = date.getMinutes();\r\n\r\n if (day >= 1 && day <= 5) {\r\n if (hours >= 8 && hours <= 20)\r\n return \"day\";\r\n else\r\n return \"night\";\r\n } else {\r\n if ((hours >= 9 || (hours >= 8 && minutes >= 30)) && hours <= 18)\r\n return \"day\";\r\n else\r\n return \"night\";\r\n }\r\n };\r\n}\n\n\n// WEBPACK FOOTER //\n// ./app/login.panelComponent.ts"],"sourceRoot":""}