{"version":3,"sources":["webpack:///$_lazy_route_resource lazy namespace object","webpack:///src/app/app.component.html","webpack:///src/app/app-routing.module.ts","webpack:///src/app/app.component.scss","webpack:///src/app/app.component.ts","webpack:///src/app/app.module.ts","webpack:///src/app/core/guards/auth.guard.ts","webpack:///src/app/core/interceptor/httpconfig.interceptor.ts","webpack:///src/app/services/notification.service.ts","webpack:///src/app/services/user.service.ts","webpack:///src/environments/environment.ts","webpack:///src/main.ts"],"names":["webpackEmptyAsyncContext","req","Promise","resolve","then","e","Error","code","keys","module","exports","id","routes","path","data","title","children","loadChildren","m","AuthModule","DashboardModule","canActivateChild","redirectTo","AppRoutingModule","imports","forRoot","AppComponent","selector","template","AppModule","declarations","positionClass","providers","provide","useClass","multi","bootstrap","AuthGuard","router","userService","helper","next","state","token","userValue","decodedToken","decodeToken","validity","isTokenExpired","accessToken","localStorage","removeItem","userSubject","navigate","providedIn","HttpConfigInterceptor","user","notificationService","authToken","JSON","parse","getItem","newHeaders","headers","append","userId","authReq","clone","handle","pipe","err","console","log","status","logout","location","reload","errorMessage","setError","profilingMsg","method","urlWithParams","error","ErrorEvent","message","NotificationService","toastr","success","timeOut","info","warning","UserService","http","asObservable","post","url","value","environment","production","bootstrapModule"],"mappings":";;;;;;;;;AAAA,aAASA,wBAAT,CAAkCC,GAAlC,EAAuC;AACtC;AACA;AACA,aAAOC,OAAO,CAACC,OAAR,GAAkBC,IAAlB,CAAuB,YAAW;AACxC,YAAIC,CAAC,GAAG,IAAIC,KAAJ,CAAU,yBAAyBL,GAAzB,GAA+B,GAAzC,CAAR;AACAI,SAAC,CAACE,IAAF,GAAS,kBAAT;AACA,cAAMF,CAAN;AACA,OAJM,CAAP;AAKA;;AACDL,4BAAwB,CAACQ,IAAzB,GAAgC,YAAW;AAAE,aAAO,EAAP;AAAY,KAAzD;;AACAR,4BAAwB,CAACG,OAAzB,GAAmCH,wBAAnC;AACAS,UAAM,CAACC,OAAP,GAAiBV,wBAAjB;AACAA,4BAAwB,CAACW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KAAxB;AACD;AAxDqB;AAAA;AAAA,eAyDtB,qBAAYrD,KAAZ,EAAwB;AACtB,eAAKS,WAAL,CAAiBX,IAAjB,CAAsBE,KAAtB;AACD;AA3DqB;AAAA;AAAA,eA4DtB,kBAAS;AACPO,sBAAY,CAACC,UAAb,CAAwB,MAAxB;AACA,eAAKC,WAAL,CAAiBX,IAAjB,CAAsB,IAAtB;AACA,eAAKH,MAAL,CAAYe,QAAZ,CAAqB,CAAC,QAAD,CAArB,EAHO,CAIP;AACD;AAjEqB;AAAA;AAAA,eAmEtB,uBAAc;AACZH,sBAAY,CAACC,UAAb,CAAwB,MAAxB;AACA,eAAKC,WAAL,CAAiBX,IAAjB,CAAsB,IAAtB;AACA,eAAKH,MAAL,CAAYe,QAAZ,CAAqB,CAAC,QAAD,CAArB,EAHY,CAIZ;AACD;AAxEqB;;AAAA;AAAA,OAAxB;;;;cAG4B;;cACR;;;;AAJPsC,eAAW,6DAHvB,iEAAW;AACVrC,gBAAU,EAAE;AADF,KAAX,CAGuB,GAAXqC,WAAW,CAAX;;;;;;;;ACVb;AAAA;;;AAAA;AAAA;AAAA,O,CAAA;AACA;AACA;;;AAEO,QAAMM,WAAW,GAAG;AAC1B;AACAF,SAAG,EAAG,4DAFoB;AAGzBG,gBAAU,EAAE;AAHa,KAApB;AAMP;;;;;;;AAOA;;;;;;;;;ACjBA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;;AAMA,QAAI,sEAAYA,UAAhB,EAA4B;AAC1B;AACD;;AAED,uGAAyBC,eAAzB,CAAyC,yDAAzC,WACS,UAAA7B,GAAG;AAAA,aAAIC,OAAO,CAACW,KAAR,CAAcZ,GAAd,CAAJ;AAAA,KADZ","file":"main-es5.js","sourcesContent":["function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"./$$_lazy_route_resource lazy recursive\";","export default \"\";","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { AuthGuard } from './core/guards/auth.guard';\n\nconst routes: Routes = [\n {\n path: '',\n data: {\n title: 'Login'\n },\n children: [\n {\n path: '',\n loadChildren: () => import('./auth/auth.module').then(m => m.AuthModule),\n },\n {\n path: 'dashboard',\n loadChildren: () => import('./container/dashboard/dashboard.module').then(m => m.DashboardModule),\n canActivateChild: [AuthGuard]\n }\n ]\n },\n { path: '**', redirectTo: '' }\n];\n\n@NgModule({\n imports: [RouterModule.forRoot(routes)],\n exports: [RouterModule]\n})\nexport class AppRoutingModule { }\n","export default \"\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2FwcC5jb21wb25lbnQuc2NzcyJ9 */\";","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.scss']\n})\nexport class AppComponent {\n title = 'newsletter';\n}\n","import { BrowserModule } from '@angular/platform-browser';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { NgModule, ErrorHandler, Injectable } from '@angular/core';\nimport { LocationStrategy, HashLocationStrategy } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';\n\nimport { AppRoutingModule } from './app-routing.module';\nimport { AppComponent } from './app.component';\n\nimport { HttpConfigInterceptor } from './core/interceptor/httpconfig.interceptor';\n\nimport { ToastrModule } from 'ngx-toastr';\nimport {NgbModule} from '@ng-bootstrap/ng-bootstrap';\nimport { NgSelectModule } from '@ng-select/ng-select'; \nimport { NgMultiSelectDropDownModule } from 'ng-multiselect-dropdown';\nimport { NgxCaptchaModule } from 'ngx-captcha';\n\n@NgModule({\n declarations: [\n AppComponent,\n ],\n imports: [\n BrowserModule,\n BrowserAnimationsModule,\n FormsModule,\n ReactiveFormsModule,\n AppRoutingModule,\n NgxCaptchaModule,\n HttpClientModule,\n ToastrModule.forRoot({\n positionClass: 'toast-top-right'\n }),\n NgMultiSelectDropDownModule.forRoot(),\n NgbModule,\n NgSelectModule\n ],\n providers: [\n {\n provide: HTTP_INTERCEPTORS,\n useClass: HttpConfigInterceptor,\n multi: true\n },\n ],\n bootstrap: [AppComponent]\n})\nexport class AppModule { }\n","import { Injectable } from '@angular/core';\nimport { CanActivate, CanActivateChild, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree, Router } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { JwtHelperService } from \"@auth0/angular-jwt\";\n\nimport { UserService } from '../../services/user.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthGuard implements CanActivate, CanActivateChild {\n constructor(private router: Router,\n private userService: UserService) { }\n\n helper = new JwtHelperService();\n canActivate(\n next: ActivatedRouteSnapshot,\n state: RouterStateSnapshot): boolean {\n let token = this.userService.userValue;\n const decodedToken = this.helper.decodeToken(token.token);\n let validity = this.helper.isTokenExpired(token?.accessToken);\n if (token != null && validity == true) {\n return true;\n }\n else {\n localStorage.removeItem('user');\n this.userService.userSubject.next(null);\n this.router.navigate(['/login']);\n return false;\n }\n }\n canActivateChild(\n next: ActivatedRouteSnapshot,\n state: RouterStateSnapshot): boolean {\n let token = this.userService.userValue;\n const decodedToken = this.helper.decodeToken(token?.token);\n let validity = this.helper.isTokenExpired(token?.accessToken);\n if (token != null && validity == true) {\n return true;\n }\n else {\n localStorage.removeItem('user');\n this.userService.userSubject.next(null);\n this.router.navigate(['/login']);\n return false;\n }\n }\n\n}\n","import { Injectable } from '@angular/core';\r\nimport { HttpErrorResponse, HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\r\nimport { catchError, finalize, retry } from 'rxjs/operators';\r\nimport { Observable, throwError } from 'rxjs';\r\nimport { Router } from '@angular/router';\r\n\r\nimport { UserService } from '../../services/user.service';\r\nimport { NotificationService } from '../../services/notification.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class HttpConfigInterceptor implements HttpInterceptor {\r\n constructor(\r\n private user: UserService,\r\n private notificationService: NotificationService,\r\n private router: Router) { }\r\n intercept(req: HttpRequest, next: HttpHandler) {\r\n // Get the auth token from localstorage.\r\n const authToken: any = JSON.parse(localStorage.getItem('user'));\r\n let newHeaders = req.headers;\r\n if (authToken) {\r\n // If we have a token, we append it to our new headers\r\n newHeaders = newHeaders.append('Authorization', authToken.token);\r\n newHeaders = newHeaders.append('macaddress', \"\");\r\n newHeaders = newHeaders.append('userId', authToken.userId);\r\n }\r\n const authReq = req.clone({ headers: newHeaders });\r\n // Clone the request and replace the original headers with\r\n // cloned headers, updated with the authorization.\r\n // const authReq = req.clone({\r\n // headers: req.headers.set('x-auth-token', authToken)\r\n // });\r\n\r\n // send cloned request with header to the next handler.\r\n return next.handle(authReq)\r\n .pipe(\r\n // retry on failure\r\n retry(0),\r\n\r\n // handle errors\r\n catchError((err: HttpErrorResponse) => {\r\n console.log(err);\r\n if(err.status == 401){\r\n this.user.logout();\r\n location.reload();\r\n }\r\n \r\n const errorMessage = this.setError(err);\r\n return throwError(err);\r\n }),\r\n // profiling\r\n finalize(() => {\r\n const profilingMsg = `${req.method} \"${req.urlWithParams}\"`;\r\n // console.log(profilingMsg);\r\n })\r\n // return next.handle(authReq);\r\n\r\n );\r\n }\r\n\r\n setError(error: HttpErrorResponse): string {\r\n let errorMessage = 'Unknown error occured';\r\n if (error.error instanceof ErrorEvent) {\r\n // Client side error\r\n errorMessage = error.error.message;\r\n } else {\r\n // server side error\r\n if (error.status !== 0) {\r\n errorMessage = error.error.message;\r\n }\r\n }\r\n return errorMessage;\r\n }\r\n\r\n\r\n}\r\n\r\n","import { Injectable } from '@angular/core';\nimport { ToastrService } from 'ngx-toastr';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NotificationService {\n\n constructor(private toastr: ToastrService) { }\n\n showSuccess(message, title) {\n // this.toastr.success(message, title)\n this.toastr.success(message, title, {\n timeOut: 1000,\n });\n }\n\n showError(message, title) {\n this.toastr.error(message, title)\n }\n\n showInfo(message, title) {\n this.toastr.info(message, title)\n }\n\n showWarning(message, title) {\n this.toastr.warning(message, title)\n }\n \n\n\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { Router } from '@angular/router';\n\nimport { environment } from '../../environments/environment'\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UserService {\n public userSubject: BehaviorSubject;\n public user: Observable;\n constructor(private http: HttpClient,\n private router: Router) {\n this.userSubject = new BehaviorSubject(JSON.parse(localStorage.getItem('user')));\n this.user = this.userSubject.asObservable();\n }\n\n login(data) {\n return this.http.post(`${environment.url}/SendOTP`, data);\n }\n\n signup(data) {\n return this.http.post(`${environment.url}/SignUp`, data);\n }\n\n confirmOTP(data) {\n return this.http.post(`${environment.url}/verifyOTP`, data);\n }\n\n generateToken(data) {\n return this.http.post(`${environment.url}/GenerateToken`, data);\n }\n\n getUserDetails(data) {\n return this.http.post(`${environment.url}/UserRegDetails`, data);\n }\n\n sendOTPForSignup(data) {\n return this.http.post(`${environment.url}/SendOTP`, data);\n }\n\n confirmOTPForSignup(data) {\n return this.http.post(`${environment.url}/SignupVerifyOTP`, data);\n }\n\n getAllProfessions(data) {\n return this.http.post(`${environment.url}/DisplayProfession`, data);\n }\n\n getUserSubscription(data) {\n return this.http.post(`${environment.url}/SubscriptionData`, data);\n }\n addSubscriptionData(data) {\n return this.http.post(`${environment.url}/AddSubscriptionData`, data);\n }\n\n getNavigator(data){\n return this.http.post(`${environment.url}/Navigators`, data);\n }\n getUnsubscribe(data){\n return this.http.post(`${environment.url}/Unsubscribe`, data);\n }\n public get userValue(): any {\n return this.userSubject.value;\n }\n changeToken(token: any) {\n this.userSubject.next(token);\n }\n logout() {\n localStorage.removeItem('user');\n this.userSubject.next(null);\n this.router.navigate(['/login']);\n // location.reload(true);\n }\n\n unsubscribe() {\n localStorage.removeItem('user');\n this.userSubject.next(null);\n this.router.navigate(['/login']);\n // location.reload(true);\n }\n}\n","// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.\n// The list of file replacements can be found in `angular.json`.\n\nexport const environment = {\n // url : \"http://newsletterapi.manupatra.com/API/Newsletter\",\n url : \"https://updates.manupatra.com/newsletterapi/api/newsletter\",\n production: false\n};\n\n/*\n * For easier debugging in development mode, you can import the following file\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\n *\n * This import should be commented out in production mode because it will have a negative impact\n * on performance if an error is thrown.\n */\n// import 'zone.js/dist/zone-error'; // Included with Angular CLI.\n","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n .catch(err => console.error(err));\n"]}