{"title":"Авторизация","template":"\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"/cms/css/new_design_damubpm.css?ver=2\" /\u003e\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"/cms/css/custom_primeng.css?ver=2\" /\u003e\n\u003clink *ngIf=\"dark_mode\" rel=\"stylesheet\" type=\"text/css\" href=\"/cms/css/custom_primeng_dark.css?ver=2\" /\u003e\n\n\u003crouter-outlet\u003e\u003c/router-outlet\u003e\n","json":"const vm = this; \n\n\nconst {map,take} = rxjs;\nconst {QueryOptions} = Models;\n\nreturn class GenClass extends vm.constructor {\n \n user_subs = this.accountService.user.subscribe(user =\u003e {\n this.redirect(user);\n });\n \n ngOnInit() {\n // this.redirect(this.sessioninfo)\n }\n \n\n ngOnDestroy() {\n this.user_subs.unsubscribe();\n }\n \n \n redirect(user) {\n \n // get return url from query parameters or default to home page\n if(user) {\n const returnUrl = this.route.snapshot.queryParams['returnUrl'];\n const angularjs_redirecturi = this.route.snapshot.queryParams['angularjs_redirecturi'];\n if (returnUrl) {\n this.router.navigateByUrl(returnUrl);\n } else if(angularjs_redirecturi) {\n window.location.href = '/static/#/' + angularjs_redirecturi;\n } else {\n if(this.appComponent.params) {\n this.router.navigate([this.appComponent.params['angular_start_url']],{queryParams: this.route.snapshot.queryParams});\n } else {\n this.router.navigate(['/'],{queryParams: this.route.snapshot.queryParams});\n }\n };\n }\n }\n}"}