@firestitch/2fa 12.0.8 → 12.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.
Files changed (72) hide show
  1. package/app/modules/code-input/code-input.module.d.ts +8 -0
  2. package/app/modules/code-input/components/code-input/code-input.component.d.ts +13 -0
  3. package/app/modules/code-input/components/code-input/index.d.ts +1 -0
  4. package/app/modules/code-input/index.d.ts +1 -0
  5. package/app/modules/manage/components/2fa-manage/2fa-manage.component.d.ts +26 -0
  6. package/app/modules/manage/components/2fa-manage/index.d.ts +1 -0
  7. package/app/modules/manage/components/app/app.component.d.ts +31 -0
  8. package/app/modules/manage/components/app/index.d.ts +1 -0
  9. package/app/modules/manage/components/defaulted/defaulted.component.d.ts +5 -0
  10. package/app/modules/manage/components/defaulted/index.d.ts +1 -0
  11. package/app/modules/manage/components/email/email.component.d.ts +25 -0
  12. package/app/modules/manage/components/email/index.d.ts +1 -0
  13. package/app/modules/manage/components/emails/emails.component.d.ts +17 -0
  14. package/app/modules/manage/components/emails/index.d.ts +1 -0
  15. package/app/modules/manage/components/manage-methods/index.d.ts +1 -0
  16. package/app/modules/manage/components/manage-methods/manage-methods.component.d.ts +31 -0
  17. package/app/modules/manage/components/number/index.d.ts +1 -0
  18. package/app/modules/manage/components/number/number.component.d.ts +26 -0
  19. package/app/modules/manage/components/numbers/index.d.ts +1 -0
  20. package/app/modules/manage/components/numbers/numbers.component.d.ts +18 -0
  21. package/app/modules/manage/components/verification-methods/index.d.ts +1 -0
  22. package/app/modules/manage/components/verification-methods/verification-methods.component.d.ts +18 -0
  23. package/app/modules/manage/fs-2f-manage.module.d.ts +31 -0
  24. package/app/modules/manage/services/index.d.ts +1 -0
  25. package/app/modules/manage/services/two-factor-manage.service.d.ts +39 -0
  26. package/app/modules/verification/components/2fa-verification/2fa-verification.component.d.ts +31 -0
  27. package/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.d.ts +17 -0
  28. package/app/{components → modules/verification/components}/2fa-verification-methods/2fa-verification-methods.component.d.ts +7 -7
  29. package/app/modules/verification/fs-2fa-verification.module.d.ts +23 -0
  30. package/bundles/firestitch-2fa.umd.js +975 -127
  31. package/bundles/firestitch-2fa.umd.js.map +1 -1
  32. package/esm2015/app/modules/code-input/code-input.module.js +26 -0
  33. package/esm2015/app/modules/code-input/components/code-input/code-input.component.js +36 -0
  34. package/esm2015/app/modules/code-input/components/code-input/index.js +2 -0
  35. package/esm2015/app/modules/code-input/index.js +2 -0
  36. package/esm2015/app/modules/manage/components/2fa-manage/2fa-manage.component.js +92 -0
  37. package/esm2015/app/modules/manage/components/2fa-manage/index.js +2 -0
  38. package/esm2015/app/modules/manage/components/app/app.component.js +82 -0
  39. package/esm2015/app/modules/manage/components/app/index.js +2 -0
  40. package/esm2015/app/modules/manage/components/defaulted/defaulted.component.js +16 -0
  41. package/esm2015/app/modules/manage/components/defaulted/index.js +2 -0
  42. package/esm2015/app/modules/manage/components/email/email.component.js +79 -0
  43. package/esm2015/app/modules/manage/components/email/index.js +2 -0
  44. package/esm2015/app/modules/manage/components/emails/emails.component.js +43 -0
  45. package/esm2015/app/modules/manage/components/emails/index.js +2 -0
  46. package/esm2015/app/modules/manage/components/manage-methods/index.js +2 -0
  47. package/esm2015/app/modules/manage/components/manage-methods/manage-methods.component.js +118 -0
  48. package/esm2015/app/modules/manage/components/number/index.js +2 -0
  49. package/esm2015/app/modules/manage/components/number/number.component.js +81 -0
  50. package/esm2015/app/modules/manage/components/numbers/index.js +2 -0
  51. package/esm2015/app/modules/manage/components/numbers/numbers.component.js +44 -0
  52. package/esm2015/app/modules/manage/components/verification-methods/index.js +2 -0
  53. package/esm2015/app/modules/manage/components/verification-methods/verification-methods.component.js +63 -0
  54. package/esm2015/app/modules/manage/fs-2f-manage.module.js +108 -0
  55. package/esm2015/app/modules/manage/services/index.js +2 -0
  56. package/esm2015/app/modules/manage/services/two-factor-manage.service.js +123 -0
  57. package/esm2015/app/modules/verification/components/2fa-verification/2fa-verification.component.js +109 -0
  58. package/esm2015/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.js +57 -0
  59. package/esm2015/app/modules/verification/components/2fa-verification-methods/2fa-verification-methods.component.js +73 -0
  60. package/esm2015/app/modules/verification/fs-2fa-verification.module.js +88 -0
  61. package/esm2015/public_api.js +5 -7
  62. package/fesm2015/firestitch-2fa.js +841 -75
  63. package/fesm2015/firestitch-2fa.js.map +1 -1
  64. package/package.json +1 -1
  65. package/public_api.d.ts +4 -2
  66. package/app/components/2fa-verification/2fa-verification.component.d.ts +0 -32
  67. package/app/components/2fa-verification-code/2fa-verification-code.component.d.ts +0 -18
  68. package/app/fs-2fa.module.d.ts +0 -23
  69. package/esm2015/app/components/2fa-verification/2fa-verification.component.js +0 -106
  70. package/esm2015/app/components/2fa-verification-code/2fa-verification-code.component.js +0 -60
  71. package/esm2015/app/components/2fa-verification-methods/2fa-verification-methods.component.js +0 -73
  72. package/esm2015/app/fs-2fa.module.js +0 -88
@@ -1 +1 @@
1
- {"version":3,"file":"firestitch-2fa.umd.js","sources":["../../src/app/tokens/verification.token.ts","../../src/app/enums/verification-method-type.enum.ts","../../src/app/components/2fa-verification-methods/2fa-verification-methods.component.ts","../../src/app/components/2fa-verification-methods/2fa-verification-methods.component.html","../../src/app/components/2fa-verification-code/2fa-verification-code.component.ts","../../src/app/components/2fa-verification-code/2fa-verification-code.component.html","../../src/app/components/2fa-verification/2fa-verification.component.ts","../../src/app/components/2fa-verification/2fa-verification.component.html","../../src/app/fs-2fa.module.ts","../../src/public_api.ts","../../src/firestitch-2fa.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nimport { IFsVerificationProvider } from '../interfaces/verification-provider.interface';\n\nexport const FS_2FA_VERIFICATION_PROVIDER = new InjectionToken<IFsVerificationProvider>(\n 'Provider for Verification service',\n);\n","export enum FsVerificationMethodType {\n Sms = 'sms',\n Email = 'email',\n App = 'app',\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n} from '@angular/core';\n\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { Observable } from 'rxjs';\nimport { map, shareReplay, tap } from 'rxjs/operators';\n\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../tokens/verification.token';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\nimport { IFsVerificationProvider } from '../../interfaces/verification-provider.interface';\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\n\n\n@Component({\n templateUrl: './2fa-verification-methods.component.html',\n styleUrls: [\n './2fa-verification-methods.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FaVerificationMethodsComponent {\n\n public method: IFsVerificationMethod;\n public phone: string;\n public code: string;\n public methods$: Observable<Record<string, IFsVerificationMethod[]>>;\n public readonly verificationMethodType = FsVerificationMethodType;\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n private _verificationProvider: IFsVerificationProvider,\n @Inject(MAT_DIALOG_DATA)\n private _dialogData: any,\n private _dialogRef: MatDialogRef<Fs2FaVerificationMethodsComponent>,\n ) {\n this._setActiveMethod();\n this._initMethods();\n }\n\n public compareWith(o1, o2) {\n return o1 && o2 && o1.id === o2.id\n }\n\n public setVerificationMethod = () => {\n return this._verificationProvider\n .updateVerificationMethod(this.method.id)\n .pipe(\n tap((method: IFsVerificationMethod) => {\n this._dialogRef.close(method);\n })\n );\n };\n\n private _setActiveMethod(): void {\n this.method = this._dialogData?.method;\n }\n\n private _initMethods(): void {\n this.methods$ = this._verificationProvider\n .methods()\n .pipe(\n map((methods) => {\n return methods\n .reduce((acc, method) => {\n if (!acc[method.type]) {\n acc[method.type] = [];\n }\n\n acc[method.type].push(method);\n\n return acc;\n }, {});\n }),\n shareReplay(1),\n );\n }\n}\n","<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container *fsSkeleton=\"methods$ | async as methods\">\n <fs-radio-group [(ngModel)]=\"method\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of methods | keyvalue\">\n <div class=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n textsms\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following email\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n phone_iphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Authenticator App</div>\n <div class=\"method-subtitle\">\n Verification code generated by an authenticator app\n </div>\n </div>\n </div>\n </ng-container> \n </ng-container>\n\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n {{ method.phoneNumber }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n {{ method.email }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n Authenticator App\n </ng-container> \n </ng-container>\n </mat-radio-button>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { ControlContainer, NgForm } from '@angular/forms';\nimport { MatInput } from '@angular/material/input';\nimport { CodeInputComponent } from 'angular-code-input';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\n\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\n\n\n@Component({\n selector: 'fs-2fa-verification-code',\n templateUrl: './2fa-verification-code.component.html',\n styleUrls: [\n './2fa-verification-code.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [\n {\n provide: ControlContainer,\n useExisting: NgForm,\n },\n ],\n})\nexport class Fs2FAVerificationCodeComponent {\n\n @ViewChild(CodeInputComponent)\n public codeInputComponent: CodeInputComponent;\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Input()\n public code;\n\n @Output()\n public codeChange = new EventEmitter<string>();\n\n @Output()\n public codeComplete = new EventEmitter<void>();\n\n public FsVerificationMethodType = FsVerificationMethodType;\n\n public codeChanged(code): void {\n this.code = code;\n this.codeChange.emit(this.code);\n }\n\n public codeCompleted(): void {\n this.codeComplete.emit();\n }\n\n public focus(): void {\n this.codeInputComponent.focusOnField(0);\n }\n\n}\n","<ng-container *ngIf=\"method.phoneNumber && method.type === FsVerificationMethodType.Sms\">\n <p class=\"description\">\n A text message with a verification code was just\n sent to <span style=\"white-space: nowrap;\">{{ method.phoneNumber }}</span> to verify it's you.\n </p>\n\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"method.type === FsVerificationMethodType.Email\">\n <p class=\"description\">\n A email with a verification code was just sent to {{ method.email }} to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"method.type === FsVerificationMethodType.App\">\n <p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator app to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n\n<ng-template #input> \n <code-input \n [code]=\"code\"\n [initialFocusField]=\"0\"\n [codeLength]=\"6\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\n </code-input> \n</ng-template> ","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport { FsDialog } from '@firestitch/dialog';\n\nimport { filter, takeUntil, tap } from 'rxjs/operators';\n\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\nimport { Fs2FaVerificationMethodsComponent } from '../2fa-verification-methods/2fa-verification-methods.component';\nimport { Subject } from 'rxjs';\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../tokens/verification.token';\nimport { IFsVerificationProvider } from '../../interfaces/verification-provider.interface';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\nimport { Fs2FAVerificationCodeComponent } from '../2fa-verification-code/2fa-verification-code.component';\nimport { NgControl, NgForm } from '@angular/forms';\n\n\n@Component({\n selector: 'fs-2fa-verification',\n templateUrl: './2fa-verification.component.html',\n styleUrls: [\n './2fa-verification.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FAVerificationComponent implements OnDestroy, AfterViewInit {\n\n @ViewChild(Fs2FAVerificationCodeComponent)\n public verificationCodeComponent: Fs2FAVerificationCodeComponent;\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public verified = new EventEmitter<unknown>();\n\n public resendInProgress = false;\n public code = '';\n public trustedDevice = true;\n public FsVerificationMethodType = FsVerificationMethodType;\n\n private _destroy$ = new Subject<void>();\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n public verificationProvider: IFsVerificationProvider,\n private _cdRef: ChangeDetectorRef,\n private _dialog: FsDialog,\n @Optional() private _form: NgForm,\n ) {\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public verify = () => {\n return this.verificationProvider\n .verify(this.code, this.trustedDevice)\n .pipe(\n tap((response) => {\n this.verified.emit(response);\n }),\n );\n };\n\n public ngAfterViewInit(): void {\n this.verificationCodeComponent.focus(); \n }\n\n public codeChange(code: string): void {\n this.code = code;\n }\n\n public codeComplete(): void {\n if(this._form) {\n this._form.ngSubmit.next();\n }\n }\n\n public resend(): void {\n this.resendInProgress = true;\n this.code = '';\n \n this.verificationProvider\n .resend()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.resendInProgress = false; \n this._cdRef.markForCheck();\n })\n }\n\n public showVerificationMethods(): void {\n this._dialog.open(\n Fs2FaVerificationMethodsComponent,\n {\n data: {\n method: this.method,\n }\n }\n )\n .afterClosed()\n .pipe(\n filter((method) => !!method),\n )\n .subscribe((method) => {\n this.method = method;\n this.code = '';\n\n this._cdRef.markForCheck();\n\n setTimeout(() => {\n this.verificationCodeComponent.focus();\n });\n });\n }\n\n}\n","<div class=\"code-container\">\n <fs-2fa-verification-code\n [method]=\"method\"\n [code]=\"code\"\n (codeChange)=\"codeChange($event)\"\n (codeComplete)=\"codeComplete()\">\n </fs-2fa-verification-code>\n</div>\n\n<div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n <a (click)=\"resend()\">\n Resend Code\n </a>\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </span>\n</div>","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { FsFormModule } from '@firestitch/form';\nimport { FsSkeletonModule } from '@firestitch/skeleton';\nimport { FsRadioGroupModule } from '@firestitch/radiogroup';\nimport { FsDialogModule } from '@firestitch/dialog';\n\nimport { CodeInputModule } from 'angular-code-input';\n\nimport { Fs2FAVerificationComponent } from './components/2fa-verification/2fa-verification.component';\nimport { Fs2FAVerificationCodeComponent } from './components/2fa-verification-code/2fa-verification-code.component';\nimport { Fs2FaVerificationMethodsComponent } from './components/2fa-verification-methods/2fa-verification-methods.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n\n MatFormFieldModule,\n MatInputModule,\n MatButtonModule,\n\n FsFormModule,\n FsRadioGroupModule,\n FsDialogModule,\n\n CodeInputModule,\n MatCheckboxModule,\n MatProgressSpinnerModule,\n FsSkeletonModule,\n FsSkeletonModule,\n MatIconModule,\n MatRadioModule,\n ],\n declarations: [\n Fs2FAVerificationComponent,\n Fs2FAVerificationCodeComponent,\n Fs2FaVerificationMethodsComponent,\n ],\n exports: [\n Fs2FAVerificationComponent,\n ],\n providers: [],\n})\nexport class Fs2FaModule {}\n","/*\n * Public API Surface of fs-2fa\n */\n\nexport { Fs2FaModule } from './app/fs-2fa.module';\n\n// Components\nexport { Fs2FAVerificationComponent } from './app/components/2fa-verification/2fa-verification.component';\n\nexport { IFsVerificationProvider } from './app/interfaces/verification-provider.interface';\nexport { IFsVerificationMethod } from './app/interfaces/verification-method.interface';\n\nexport { FsVerificationMethodType } from './app/enums/verification-method-type.enum';\n\nexport { FS_2FA_VERIFICATION_PROVIDER } from './app/tokens/verification.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["InjectionToken","FsVerificationMethodType","tap","map","shareReplay","MAT_DIALOG_DATA","Component","ChangeDetectionStrategy","Inject","EventEmitter","CodeInputComponent","ControlContainer","NgForm","ViewChild","Input","Output","Subject","takeUntil","filter","Optional","CommonModule","FormsModule","MatFormFieldModule","MatInputModule","MatButtonModule","FsFormModule","FsRadioGroupModule","FsDialogModule","CodeInputModule","MatCheckboxModule","MatProgressSpinnerModule","FsSkeletonModule","MatIconModule","MatRadioModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAIa,4BAA4B,GAAG,IAAIA,iBAAc,CAC5D,mCAAmC;;ACLzBC;IAAZ,WAAY,wBAAwB;QAClC,uCAAW,CAAA;QACX,2CAAe,CAAA;QACf,uCAAW,CAAA;IACb,CAAC,EAJWA,gCAAwB,KAAxBA,gCAAwB;;ICwBpC;QAQE,2CAEU,qBAA8C,EAE9C,WAAgB,EAChB,UAA2D;YALrE,iBASC;YAPS,0BAAqB,GAArB,qBAAqB,CAAyB;YAE9C,gBAAW,GAAX,WAAW,CAAK;YAChB,eAAU,GAAV,UAAU,CAAiD;YAPrD,2BAAsB,GAAGA,gCAAwB,CAAC;YAiB3D,0BAAqB,GAAG;gBAC7B,OAAO,KAAI,CAAC,qBAAqB;qBAC9B,wBAAwB,CAAC,KAAI,CAAC,MAAM,CAAC,EAAE,CAAC;qBACxC,IAAI,CACHC,aAAG,CAAC,UAAC,MAA6B;oBAChC,KAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;iBAC/B,CAAC,CACH,CAAC;aACL,CAAC;YAhBA,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACxB,IAAI,CAAC,YAAY,EAAE,CAAC;SACrB;QAEM,uDAAW,GAAX,UAAY,EAAE,EAAE,EAAE;YACvB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAA;SACnC;QAYO,4DA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BACxBC,mBAAgB;gBAChBA,mBAAgB;gBAChBC,gBAAa;gBACbC,iBAAc;aACf;sHAWU,WAAW;sBA/BvBC,WAAQ;uBAAC;wBACR,OAAO,EAAE;4BACPd,gBAAY;4BACZC,cAAW;4BAEXC,4BAAkB;4BAClBC,oBAAc;4BACdC,kBAAe;4BAEfC,eAAY;4BACZC,qBAAkB;4BAClBC,mBAAc;4BAEdC,oBAAe;4BACfC,sBAAiB;4BACjBC,6BAAwB;4BACxBC,mBAAgB;4BAChBA,mBAAgB;4BAChBC,gBAAa;4BACbC,iBAAc;yBACf;wBACD,YAAY,EAAE;4BACZ,0BAA0B;4BAC1B,8BAA8B;4BAC9B,iCAAiC;yBAClC;wBACD,OAAO,EAAE;4BACP,0BAA0B;yBAC3B;wBACD,SAAS,EAAE,EAAE;qBACd;;;ICtDD;;;;ICAA;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"firestitch-2fa.umd.js","sources":["../../src/app/tokens/verification.token.ts","../../src/app/enums/verification-method-type.enum.ts","../../src/app/modules/verification/components/2fa-verification-methods/2fa-verification-methods.component.ts","../../src/app/modules/verification/components/2fa-verification-methods/2fa-verification-methods.component.html","../../src/app/modules/code-input/components/code-input/code-input.component.ts","../../src/app/modules/code-input/components/code-input/code-input.component.html","../../src/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.ts","../../src/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.html","../../src/app/modules/verification/components/2fa-verification/2fa-verification.component.ts","../../src/app/modules/verification/components/2fa-verification/2fa-verification.component.html","../../src/app/modules/code-input/code-input.module.ts","../../src/app/modules/verification/fs-2fa-verification.module.ts","../../src/app/modules/manage/components/app/app.component.ts","../../src/app/modules/manage/components/app/app.component.html","../../src/app/modules/manage/components/email/email.component.ts","../../src/app/modules/manage/components/email/email.component.html","../../src/app/modules/manage/components/number/number.component.ts","../../src/app/modules/manage/components/number/number.component.html","../../src/app/modules/manage/services/two-factor-manage.service.ts","../../src/app/modules/manage/components/defaulted/defaulted.component.ts","../../src/app/modules/manage/components/defaulted/defaulted.component.html","../../src/app/modules/manage/components/verification-methods/verification-methods.component.ts","../../src/app/modules/manage/components/verification-methods/verification-methods.component.html","../../src/app/modules/manage/components/numbers/numbers.component.ts","../../src/app/modules/manage/components/numbers/numbers.component.html","../../src/app/modules/manage/components/emails/emails.component.ts","../../src/app/modules/manage/components/emails/emails.component.html","../../src/app/modules/manage/components/manage-methods/manage-methods.component.ts","../../src/app/modules/manage/components/manage-methods/manage-methods.component.html","../../src/app/modules/manage/components/2fa-manage/2fa-manage.component.ts","../../src/app/modules/manage/components/2fa-manage/2fa-manage.component.html","../../src/app/modules/manage/fs-2f-manage.module.ts","../../src/firestitch-2fa.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nimport { IFsVerificationProvider } from '../interfaces/verification-provider.interface';\n\nexport const FS_2FA_VERIFICATION_PROVIDER = new InjectionToken<IFsVerificationProvider>(\n 'Provider for Verification service',\n);\n","export enum FsVerificationMethodType {\n Sms = 'sms',\n Email = 'email',\n App = 'app',\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n} from '@angular/core';\n\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { Observable } from 'rxjs';\nimport { map, shareReplay, tap } from 'rxjs/operators';\n\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../../../tokens/verification.token';\nimport { FsVerificationMethodType } from '../../../../enums/verification-method-type.enum';\nimport { IFsVerificationProvider } from '../../../../interfaces/verification-provider.interface';\nimport { IFsVerificationMethod } from '../../../../interfaces/verification-method.interface';\n\n\n@Component({\n templateUrl: './2fa-verification-methods.component.html',\n styleUrls: [\n './2fa-verification-methods.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2faVerificationMethodsComponent {\n\n public method: IFsVerificationMethod;\n public phone: string;\n public code: string;\n public methods$: Observable<Record<string, IFsVerificationMethod[]>>;\n public readonly verificationMethodType = FsVerificationMethodType;\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n private _verificationProvider: IFsVerificationProvider,\n @Inject(MAT_DIALOG_DATA)\n private _dialogData: any,\n private _dialogRef: MatDialogRef<Fs2faVerificationMethodsComponent>,\n ) {\n this._setActiveMethod();\n this._initMethods();\n }\n\n public compareWith(o1, o2) {\n return o1 && o2 && o1.id === o2.id\n }\n\n public setVerificationMethod = () => {\n return this._verificationProvider\n .updateVerificationMethod(this.method.id)\n .pipe(\n tap((method: IFsVerificationMethod) => {\n this._dialogRef.close(method);\n })\n );\n };\n\n private _setActiveMethod(): void {\n this.method = this._dialogData?.method;\n }\n\n private _initMethods(): void {\n this.methods$ = this._verificationProvider\n .methods()\n .pipe(\n map((methods) => {\n return methods\n .reduce((acc, method) => {\n if (!acc[method.type]) {\n acc[method.type] = [];\n }\n\n acc[method.type].push(method);\n\n return acc;\n }, {});\n }),\n shareReplay(1),\n );\n }\n}\n","<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container *fsSkeleton=\"methods$ | async as methods\">\n <fs-radio-group [(ngModel)]=\"method\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of methods | keyvalue\">\n <div class=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n textsms\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following email\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n phone_iphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Authenticator App</div>\n <div class=\"method-subtitle\">\n Verification code generated by an authenticator app\n </div>\n </div>\n </div>\n </ng-container> \n </ng-container>\n\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n {{ method.phoneNumber }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n {{ method.email }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n Authenticator App\n </ng-container> \n </ng-container>\n </mat-radio-button>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n","import { Component, ChangeDetectionStrategy, Output, EventEmitter, Input, ViewChild } from '@angular/core';\n\nimport { CodeInputComponent as AngularCodeInputComponent } from 'angular-code-input';\n\n\n@Component({\n selector: 'app-code-input',\n templateUrl: './code-input.component.html',\n styleUrls: ['./code-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CodeInputComponent {\n\n @ViewChild(AngularCodeInputComponent)\n public angularCodeInputComponent: AngularCodeInputComponent;\n\n @Input() public codeLength: number;\n @Input() public code;\n\n @Output() public codeCompleted = new EventEmitter();\n @Output() public codeChanged = new EventEmitter();\n \n public focus(): void {\n this.angularCodeInputComponent.focusOnField(0);\n }\n}","<code-input\r\n [initialFocusField]=\"0\"\r\n [codeLength]=\"6\"\r\n [code]=\"code\"\r\n (codeCompleted)=\"codeCompleted.emit($event)\"\r\n (codeChanged)=\"codeChanged.emit($event)\">\r\n</code-input>","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { ControlContainer, NgForm } from '@angular/forms';\nimport { CodeInputComponent } from '../../../../modules/code-input/components/code-input';\nimport { FsVerificationMethodType } from '../../../../enums/verification-method-type.enum';\n\nimport { IFsVerificationMethod } from '../../../../interfaces/verification-method.interface';\n\n\n@Component({\n selector: 'fs-2fa-verification-code',\n templateUrl: './2fa-verification-code.component.html',\n styleUrls: [\n './2fa-verification-code.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [\n {\n provide: ControlContainer,\n useExisting: NgForm,\n },\n ],\n})\nexport class Fs2faVerificationCodeComponent {\n\n @ViewChild(CodeInputComponent)\n public codeInputComponent: CodeInputComponent;\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Input()\n public code;\n\n @Output()\n public codeChanged = new EventEmitter<string>();\n\n @Output()\n public codeCompleted = new EventEmitter<void>();\n\n public FsVerificationMethodType = FsVerificationMethodType;\n\n public codeChange(code): void {\n this.code = code;\n this.codeChanged.emit(this.code);\n }\n\n public focus(): void {\n this.codeInputComponent.focus();\n }\n\n}\n","<ng-container *ngIf=\"method.phoneNumber && method.type === FsVerificationMethodType.Sms\">\n <p class=\"description\">\n A text message with a verification code was just\n sent to <span style=\"white-space: nowrap;\">{{ method.phoneNumber }}</span> to verify it's you.\n </p>\n\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"method.type === FsVerificationMethodType.Email\">\n <p class=\"description\">\n A email with a verification code was just sent to {{ method.email }} to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"method.type === FsVerificationMethodType.App\">\n <p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator app to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-template #input> \n <app-code-input \n [code]=\"code\"\n (codeChanged)=\"codeChange($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\n </app-code-input> \n</ng-template> ","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport { FsDialog } from '@firestitch/dialog';\n\nimport { filter, takeUntil, tap } from 'rxjs/operators';\n\nimport { IFsVerificationMethod } from '../../../../interfaces/verification-method.interface';\nimport { Fs2faVerificationMethodsComponent } from '../2fa-verification-methods/2fa-verification-methods.component';\nimport { Subject } from 'rxjs';\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../../../tokens/verification.token';\nimport { IFsVerificationProvider } from '../../../../interfaces/verification-provider.interface';\nimport { FsVerificationMethodType } from '../../../../enums/verification-method-type.enum';\nimport { Fs2faVerificationCodeComponent } from '../2fa-verification-code/2fa-verification-code.component';\n\n\n@Component({\n selector: 'fs-2fa-verification',\n templateUrl: './2fa-verification.component.html',\n styleUrls: [\n './2fa-verification.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2faVerificationComponent implements OnDestroy, AfterViewInit, OnInit {\n\n @ViewChild(Fs2faVerificationCodeComponent)\n public verificationCodeComponent: Fs2faVerificationCodeComponent;\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public verified = new EventEmitter<unknown>();\n\n @Output()\n public codeChanged = new EventEmitter<unknown>();\n\n @Output()\n public codeCompleted = new EventEmitter<unknown>();\n\n public resendInProgress = false;\n public code = '';\n public trustedDevice = true;\n public FsVerificationMethodType = FsVerificationMethodType;\n\n private _destroy$ = new Subject<void>();\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n public verificationProvider: IFsVerificationProvider,\n private _cdRef: ChangeDetectorRef,\n private _dialog: FsDialog,\n ) {\n }\n\n public ngOnInit(): void {\n this.codeChanged\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe((code: string) => {\n this.code = code;\n });\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public verify() {\n this.verificationProvider\n .verify(this.code, this.trustedDevice)\n .subscribe((response) => {\n this.verified.emit(response);\n });\n };\n\n public ngAfterViewInit(): void {\n this.verificationCodeComponent.focus(); \n }\n\n public resend(): void {\n this.resendInProgress = true;\n this.code = '';\n\n this.verificationProvider\n .resend()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.resendInProgress = false; \n this.verificationCodeComponent.focus(); \n this._cdRef.markForCheck();\n })\n }\n\n public showVerificationMethods(): void {\n this._dialog.open(\n Fs2faVerificationMethodsComponent,\n {\n data: {\n method: this.method,\n }\n }\n )\n .afterClosed()\n .pipe(\n filter((method) => !!method),\n )\n .subscribe((method) => {\n this.method = method;\n this.code = '';\n\n this._cdRef.markForCheck();\n\n setTimeout(() => {\n this.verificationCodeComponent.focus();\n });\n });\n }\n\n}\n","<div class=\"code-container\">\n <fs-2fa-verification-code\n [method]=\"method\"\n [code]=\"code\"\n (codeChanged)=\"codeChanged.emit($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\n </fs-2fa-verification-code>\n</div>\n\n<div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n <a (click)=\"resend()\">\n Resend Code\n </a>\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </span>\n</div>","import { NgModule } from '@angular/core';\n\nimport { CodeInputModule as AngularCodeInputModule } from 'angular-code-input';\n\nimport { CodeInputComponent } from './components/code-input';\n\n\n@NgModule({\n imports: [\n AngularCodeInputModule,\n ],\n declarations: [\n CodeInputComponent,\n ],\n exports: [\n CodeInputComponent,\n ],\n})\nexport class CodeInputModule {\n}\n","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { FsFormModule } from '@firestitch/form';\nimport { FsSkeletonModule } from '@firestitch/skeleton';\nimport { FsRadioGroupModule } from '@firestitch/radiogroup';\nimport { FsDialogModule } from '@firestitch/dialog';\n\nimport { Fs2faVerificationComponent } from './components/2fa-verification/2fa-verification.component';\nimport { Fs2faVerificationCodeComponent } from './components/2fa-verification-code/2fa-verification-code.component';\nimport { Fs2faVerificationMethodsComponent } from './components/2fa-verification-methods/2fa-verification-methods.component';\n\nimport { CodeInputModule } from '../code-input';\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n\n MatFormFieldModule,\n MatInputModule,\n MatButtonModule,\n\n FsFormModule,\n FsRadioGroupModule,\n FsDialogModule,\n\n CodeInputModule,\n MatCheckboxModule,\n MatProgressSpinnerModule,\n FsSkeletonModule,\n FsSkeletonModule,\n MatIconModule,\n MatRadioModule,\n ],\n declarations: [\n Fs2faVerificationComponent,\n Fs2faVerificationCodeComponent,\n Fs2faVerificationMethodsComponent,\n ],\n exports: [\n Fs2faVerificationComponent,\n ],\n providers: [],\n})\nexport class Fs2faVerificationModule {}\n","import {\n Component, Inject, ChangeDetectionStrategy, ChangeDetectorRef, OnInit, ViewChild,\n} from '@angular/core';\n\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { FsFormDirective } from '@firestitch/form';\nimport { FsMessage } from '@firestitch/message';\n\nimport { tap } from 'rxjs/operators';\nimport { TwoFactorManageService } from '../../services';\n\n\n@Component({\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AppComponent implements OnInit {\n\n @ViewChild(FsFormDirective)\n public form: FsFormDirective;\n\n public twoFactorManageService: TwoFactorManageService;\n public mode: 'qr-code' | 'code-input' = 'qr-code';\n public accountId;\n public qrCodeUrl;\n public code;\n public default;\n public appType: 'google' | 'authy';\n\n constructor(\n @Inject(MAT_DIALOG_DATA) private _data: any,\n private _dialogRef: MatDialogRef<AppComponent>,\n private _cdRef: ChangeDetectorRef,\n private _message: FsMessage,\n ) {}\n\n public ngOnInit(): void {\n this.twoFactorManageService = this._data.twoFactorManageService;\n this.accountId = this._data.accountId;\n this.default = !this.twoFactorManageService.hasVerificationMethods;\n }\n\n public appTypeGoogle(): void {\n this.appTypeSelect('google');\n }\n\n public appTypeAuthy(): void {\n this.appTypeSelect('authy');\n }\n\n public appTypeSelect(appType): void {\n this.appType = appType;\n this.twoFactorManageService.verificationMethodCreate({\n type: 'app',\n default: this.default,\n })\n .subscribe((response) => {\n this.qrCodeUrl = response.qrCodeUrl;\n this._cdRef.markForCheck();\n });\n }\n\n public codeCompleted(): void {\n this.form.triggerSubmit();\n }\n\n public codeChanged(code): void {\n this.code = code;\n this.form.dirty();\n }\n\n public next(): void {\n this.mode = 'code-input';\n }\n\n public verify = () => {\n return this.twoFactorManageService.verificationMethodVerify(this.code)\n .pipe(\n tap(() => {\n this._message.success('Created app authenticator verification method');\n this._dialogRef.close(true);\n }),\n );\n };\n\n}\n","<form fsForm [submit]=\"verify\">\n <fs-dialog>\n <h1 mat-dialog-title>Authenticator App Setup</h1>\n <mat-dialog-content>\n\n <div *ngIf=\"mode === 'qr-code'\" class=\"qr-code\">\n <ng-container *ngIf=\"appType\">\n <ol>\n <li>\n <ng-container *ngIf=\"appType === 'authy'\">\n Install the Authy Authenticator App from the <a href=\"https://apps.apple.com/us/app/authy/id494168017\" target=\"_blank\">App Store</a> or\n the <a href=\"https://play.google.com/store/apps/details?id=com.authy.authy\" target=\"_blank\">Google Play Store</a>.\n </ng-container>\n\n <ng-container *ngIf=\"appType === 'google'\">\n Install the Google Authenticator App from the <a href=\"https://apps.apple.com/us/app/google-authenticator/id388497605\" target=\"_blank\">App Store</a> or\n the <a href=\"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en_US&gl=US\" target=\"_blank\">Google Play Store</a>.\n </ng-container>\n </li>\n <ng-container *ngIf=\"appType === 'authy'\">\n <li>\n Open the Authy app and select <b>Add Account</b>.\n </li>\n <li>\n Select <b>Scan QR Code</b> and scan the QR code below.\n </li>\n </ng-container> \n <ng-container *ngIf=\"appType === 'google'\">\n <li>\n Open the Google Authentictor app and click the <b>Plus icon</b> in the lower right corner.\n </li>\n <li>\n Select <b>Scan a QR code</b> and scan the QR code below.\n </li>\n </ng-container>\n </ol>\n\n <qr-code \n *fsSkeleton=\"qrCodeUrl\"\n [value]=\"qrCodeUrl\"\n size=\"200\"\n errorCorrectionLevel=\"H\"\n [margin]=\"0\">\n </qr-code> \n </ng-container>\n\n <div class=\"app-types\" *ngIf=\"!appType\">\n <p>Select the Authenticator App you prefer</p>\n\n <div class=\"row\">\n <span>\n <a (click)=\"appTypeAuthy()\">\n <svg width=\"50\" height=\"50\" viewBox=\"0 0 256 256\" xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"xMidYMid\"><path d=\"M256 127.998C256 198.696 198.694 256 127.997 256 57.304 256 0 198.696 0 127.998 0 57.305 57.304 0 127.997 0 198.694 0 256 57.305 256 127.998z\" fill=\"#EC1C24\"/><path d=\"M117.024 100.89l30.691 30.68c4.43 4.436 11.623 4.436 16.064 0 4.431-4.435 4.441-11.622 0-16.058L133.086 84.82C111.125 62.854 75.631 62.5 53.204 83.704a9.536 9.536 0 0 0-.605.548c-.098.098-.178.202-.275.29-.1.096-.202.182-.297.278-.194.193-.371.396-.54.597-21.215 22.437-20.85 57.932 1.113 79.897L83.292 196c4.44 4.433 11.623 4.433 16.062 0 4.442-4.437 4.442-11.633.011-16.06l-30.693-30.691c-13.398-13.393-13.488-35.129-.278-48.637 13.506-13.21 35.23-13.114 48.63.279zm39.612-40.873c-4.435 4.437-4.435 11.623.012 16.059l30.681 30.693c13.39 13.392 13.477 35.125.268 48.636-13.51 13.2-35.227 13.112-48.623-.282l-30.692-30.689c-4.438-4.437-11.633-4.437-16.066 0-4.443 4.433-4.443 11.642 0 16.065l30.682 30.694c21.968 21.965 57.458 22.322 79.889 1.116.208-.184.404-.355.61-.549.094-.095.182-.192.273-.29.1-.095.197-.183.29-.289.197-.183.365-.384.54-.594 21.215-22.428 20.86-57.911-1.102-79.889l-30.692-30.682c-4.436-4.443-11.638-4.443-16.07.001z\" fill=\"#FFF\"/></svg>\n </a>\n Authy\n </span>\n \n <span>\n <a (click)=\"appTypeGoogle()\"> \n <svg width=\"50\" height=\"50\" viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m457.07 45.92c73.67-8.62 149.41.22 218.93 26.24 62.75 23.47 120.59 60.41 167.72 108.09-40.31 39.97-80.25 80.31-120.51 120.33-25.95-25.45-56.19-46.65-89.47-61.37-44.22-19.82-93.39-28.54-141.72-25.2-54.6 3.52-108.11 22.49-152.63 54.3-55.24 38.95-96.61 97.22-114.8 162.35-13.64 47.78-14.77 98.97-3.76 147.4 8.85 39.61 26.09 77.29 50.05 110.03 22.24 30.45 50.3 56.64 82.22 76.71 36.79 23.24 78.76 38.22 121.96 43.48 37.02 4.65 74.9 2.23 111.05-7 3.97-1.91 6.24 2.61 8.73 4.86 40.74 40.95 81.68 81.7 122.43 122.63-73.31 35.6-155.99 51.86-237.3 46.12-68.05-4.51-135.07-24.08-194.71-57.18-24.87-13.6-48.23-29.82-70.33-47.54-17.46-14.81-34.71-30.01-49.72-47.35-25.41-27.39-47.21-58.11-65.17-90.87-4-7.72-8.64-15.12-11.9-23.2-4.47-9.05-8.37-18.36-12.25-27.67-4.96-13.27-10.26-26.44-13.88-40.15-.43-1.81-1.53-3.33-2.52-4.85-8.3-28.66-12.95-58.33-15.44-88.04-2.62-37.36-1.33-75.05 4.78-112.03 12.18-75.48 43.41-147.74 89.86-208.44 30.12-39.5 66.53-74.21 107.46-102.35 62.44-43.11 135.53-70.69 210.92-79.3m49.18 50.48c-5.7.99-10.96 3.76-15.38 7.43-10.4 8.93-14.14 24.81-8.17 37.28 6.33 15.02 25.16 23.1 40.36 17 15.43-5.24 24.78-23.51 19.74-39.06-4.1-15.43-20.92-25.79-36.55-22.65m-267.96 111.99c-5.33.28-10.59 1.92-15.16 4.68-11.47 7.03-17.88 21.74-14.36 34.86 3.09 14.08 16.78 25.06 31.26 24.61 15.03.41 29.08-11.39 31.54-26.17 2.24-10.33-1.61-21.55-9.14-28.85-6.24-6.33-15.3-9.62-24.14-9.13m-115.96 272c-6.62 1.23-12.84 4.58-17.54 9.4-9.45 9.72-11.72 25.57-5.02 37.42 7.16 13.96 25.48 20.86 39.98 14.62 15.02-5.51 23.99-23.42 19.06-38.71-4.04-15.41-20.86-25.96-36.48-22.73m111.98 272.05c-11.49 1.95-21.48 10.72-24.84 21.88-3.87 11.63-.13 25.16 8.9 33.36 6.15 5.48 14.4 8.7 22.67 8.32 11.16-.25 21.98-6.87 27.12-16.8 4.93-8.83 5.15-20.02.71-29.1-5.82-12.78-20.81-20.33-34.56-17.66m272.06 112.03c-11.76 2.02-21.92 11.07-25.09 22.6-3.87 12.57 1.13 27.25 11.91 34.79 7.86 5.79 18.42 7.67 27.77 4.86 9.61-2.77 17.7-10.24 21.07-19.68 4.97-12.74.36-28.32-10.58-36.46-7.02-5.45-16.35-7.67-25.08-6.11z\" fill=\"#a0a0a0\"/>\n <g fill=\"#c1c1c1\">\n <path d=\"m506.25 96.4c15.63-3.14 32.45 7.22 36.55 22.65 5.04 15.55-4.31 33.82-19.74 39.06-15.2 6.1-34.03-1.98-40.36-17-5.97-12.47-2.23-28.35 8.17-37.28 4.42-3.67 9.68-6.44 15.38-7.43z\"/>\n <path d=\"m122.33 480.39c15.62-3.23 32.44 7.32 36.48 22.73 4.93 15.29-4.04 33.2-19.06 38.71-14.5 6.24-32.82-.66-39.98-14.62-6.7-11.85-4.43-27.7 5.02-37.42 4.7-4.82 10.92-8.17 17.54-9.4z\"/>\n </g>\n <path d=\"m843.72 180.25.11-.11c24.64 25.12 46.96 52.6 65.61 82.47 36.01 57.16 59.38 122.22 67.87 189.25 5.67 44.88 5.27 90.6-2.05 135.27-12.7 80.01-46.94 156.41-97.9 219.36-42.3 52.48-95.87 96.04-156.41 125.76l-.63-.26c-1.01-1.1-2.03-2.16-3.05-3.22-40.75-40.93-81.69-81.68-122.43-122.63-2.49-2.25-4.76-6.77-8.73-4.86-36.15 9.23-74.03 11.65-111.05 7-43.2-5.26-85.17-20.24-121.96-43.48-31.92-20.07-59.98-46.26-82.22-76.71-23.96-32.74-41.2-70.42-50.05-110.03-11.01-48.43-9.88-99.62 3.76-147.4 18.19-65.13 59.56-123.4 114.8-162.35 44.52-31.81 98.03-50.78 152.63-54.3 48.33-3.34 97.5 5.38 141.72 25.2 33.28 14.72 63.52 35.92 89.47 61.37 40.26-40.02 80.2-80.36 120.51-120.33m-351.75 183.97c-21.23 2.85-41.89 10.28-59.88 21.94-23.08 14.45-41.76 35.58-53.9 59.91-14.58 29.2-18.64 63.21-12.5 95.17 3.93 19.85 12.03 38.88 23.56 55.51 7.93 11.52 17.65 21.66 27.65 31.38 57.33 57.41 114.61 114.86 171.99 172.21 49.09-13.07 94.67-38.94 131.05-74.4 45.11-43.34 75.66-101.44 86.31-163.06.24-1.04.22-2.91 1.85-2.6 29.63.04 59.26-.01 88.9.05 19.04-.3 36.87-14.77 40.76-33.46.22-1.21 0-2.32-.67-3.35 1.22-5.71 2.08-11.58 1.38-17.43l-.24.4c-2.05-20.34-20.84-37.12-41.25-37.17-80.64-.07-161.28-.01-241.93-.07-6.44-22.08-18.5-42.33-34.03-59.23-25.8-27.5-62.26-45.01-100.02-46.82-9.68.02-19.44-.54-29.03 1.02m286.37 388.31c-12.64 2.06-23.37 12.59-25.7 25.18-1.48 8.14-.14 17.02 4.73 23.85 5.76 9.2 16.8 14.76 27.61 14.25 8.32.03 16.28-3.95 22.16-9.66 4.87-5.6 8.45-12.67 8.67-20.2.86-11.37-5.06-23.1-14.87-28.96-6.52-4.46-14.89-5.75-22.6-4.46z\" fill=\"#686868\"/>\n <path d=\"m238.29 208.39c8.84-.49 17.9 2.8 24.14 9.13 7.53 7.3 11.38 18.52 9.14 28.85-2.46 14.78-16.51 26.58-31.54 26.17-14.48.45-28.17-10.53-31.26-24.61-3.52-13.12 2.89-27.83 14.36-34.86 4.57-2.76 9.83-4.4 15.16-4.68z\" fill=\"#c3c3c3\"/>\n <path d=\"m491.97 364.22c9.59-1.56 19.35-1 29.03-1.02 37.76 1.81 74.22 19.32 100.02 46.82 15.53 16.9 27.59 37.15 34.03 59.23-47.67-.01-95.35-.01-143.03-.01-12.19-.11-24.23 5.42-32.21 14.61-6.01 6.85-9.74 15.65-10.44 24.74-1.19 14.17 5.36 28.7 16.69 37.28 7.62 5.91 17.28 9 26.92 8.8 126.69-.04 253.39-.06 380.08.03 4.76.04 9.59-.15 14.2-1.48 14.21-3.82 26.02-15.47 29.83-29.7.67 1.03.89 2.14.67 3.35-3.89 18.69-21.72 33.16-40.76 33.46-29.64-.06-59.27-.01-88.9-.05-1.63-.31-1.61 1.56-1.85 2.6-10.65 61.62-41.2 119.72-86.31 163.06-36.38 35.46-81.96 61.33-131.05 74.4-57.38-57.35-114.66-114.8-171.99-172.21-10-9.72-19.72-19.86-27.65-31.38-11.53-16.63-19.63-35.66-23.56-55.51-6.14-31.96-2.08-65.97 12.5-95.17 12.14-24.33 30.82-45.46 53.9-59.91 17.99-11.66 38.65-19.09 59.88-21.94z\" fill=\"#474747\"/>\n <g fill=\"#bfbfbf\">\n <path d=\"m479.81 483.85c7.98-9.19 20.02-14.72 32.21-14.61 47.68 0 95.36 0 143.03.01 80.65.06 161.29 0 241.93.07 20.41.05 39.2 16.83 41.25 37.17-.19.33-.58.97-.78 1.29-3.68-18.51-21.57-33.16-40.47-33.05-124.97.1-249.94.12-374.91.17-7.73.13-15.74-.8-23.15 1.96-9.06 2.84-16.73 9.1-22.27 16.7-3.34 4.55-4.39 10.24-7.28 15.03.7-9.09 4.43-17.89 10.44-24.74z\"/>\n <path d=\"m234.31 752.44c13.75-2.67 28.74 4.88 34.56 17.66 4.44 9.08 4.22 20.27-.71 29.1-5.14 9.93-15.96 16.55-27.12 16.8-8.27.38-16.52-2.84-22.67-8.32-9.03-8.2-12.77-21.73-8.9-33.36 3.36-11.16 13.35-19.93 24.84-21.88z\"/>\n </g>\n <path d=\"m498.92 476.86c7.41-2.76 15.42-1.83 23.15-1.96 124.97-.05 249.94-.07 374.91-.17 18.9-.11 36.79 14.54 40.47 33.05.2-.32.59-.96.78-1.29l.24-.4c.7 5.85-.16 11.72-1.38 17.43-3.81 14.23-15.62 25.88-29.83 29.7-4.61 1.33-9.44 1.52-14.2 1.48-126.69-.09-253.39-.07-380.08-.03-9.64.2-19.3-2.89-26.92-8.8-11.33-8.58-17.88-23.11-16.69-37.28 2.89-4.79 3.94-10.48 7.28-15.03 5.54-7.6 13.21-13.86 22.27-16.7z\" fill=\"#b0b0b0\"/>\n <path d=\"m59.49 636.08c.99 1.52 2.09 3.04 2.52 4.85 3.62 13.71 8.92 26.88 13.88 40.15 3.88 9.31 7.78 18.62 12.25 27.67 3.26 8.08 7.9 15.48 11.9 23.2 17.96 32.76 39.76 63.48 65.17 90.87 15.01 17.34 32.26 32.54 49.72 47.35 22.1 17.72 45.46 33.94 70.33 47.54 59.64 33.1 126.66 52.67 194.71 57.18 81.31 5.74 163.99-10.52 237.3-46.12 1.02 1.06 2.04 2.12 3.05 3.22l.03.61c-42.32 21.03-87.88 35.53-134.56 42.91-56.91 8.9-115.46 7.49-171.82-4.5-67.89-14.35-132.42-44.21-187.42-86.51-63.52-48.63-114.32-113.73-145.86-187.27-8.42-19.87-15.93-40.22-21.2-61.15z\" fill=\"#939393\"/>\n <path d=\"m778.34 752.53c7.71-1.29 16.08 0 22.6 4.46 9.81 5.86 15.73 17.59 14.87 28.96-.22 7.53-3.8 14.6-8.67 20.2-5.88 5.71-13.84 9.69-22.16 9.66-10.81.51-21.85-5.05-27.61-14.25-4.87-6.83-6.21-15.71-4.73-23.85 2.33-12.59 13.06-23.12 25.7-25.18z\" fill=\"#767676\"/>\n <path d=\"m506.37 864.47c8.73-1.56 18.06.66 25.08 6.11 10.94 8.14 15.55 23.72 10.58 36.46-3.37 9.44-11.46 16.91-21.07 19.68-9.35 2.81-19.91.93-27.77-4.86-10.78-7.54-15.78-22.22-11.91-34.79 3.17-11.53 13.33-20.58 25.09-22.6z\" fill=\"#bebebe\"/>\n </svg>\n </a>\n Google Authenticator\n </span>\n </div>\n\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default 2-step vertification method\n </mat-checkbox>\n </div>\n \n </div>\n\n <div *ngIf=\"mode === 'code-input'\" class=\"code-input\">\n <div>\n Enter the 6-digit code you see in the App.\n </div>\n\n <app-code-input\n [codeLength]=\"6\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\n </app-code-input>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <ng-container *ngIf=\"appType\">\n <button\n *ngIf=\"mode === 'qr-code'\"\n type=\"button\"\n mat-button\n color=\"primary\"\n (click)=\"next()\">\n Next\n </button>\n <button\n *ngIf=\"mode === 'code-input'\"\n type=\"submit\"\n mat-button\n color=\"primary\"\n (click)=\"next()\">\n Verify\n </button> \n </ng-container>\n <button\n type=\"button\"\n mat-button\n [mat-dialog-close]=\"null\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n","import {\n Component, Inject, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild,\n} from '@angular/core';\n\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\n\nimport { FsMessage } from '@firestitch/message';\nimport { FsFormDirective } from '@firestitch/form';\n\nimport { of } from 'rxjs';\nimport { switchMap, tap } from 'rxjs/operators';\nimport { TwoFactorManageService } from '../../services';\n\n\n@Component({\n templateUrl: './email.component.html',\n styleUrls: ['./email.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EmailComponent {\n\n @ViewChild(FsFormDirective, { static: false })\n public form: FsFormDirective;\n\n public email;\n public code;\n public default;\n public verificationMethod = null;\n public twoFactorManageService: TwoFactorManageService;\n\n constructor(\n @Inject(MAT_DIALOG_DATA) private _data: any,\n private _dialogRef: MatDialogRef<EmailComponent>,\n private _cdRef: ChangeDetectorRef,\n private _message: FsMessage,\n ) {\n this.twoFactorManageService = _data.twoFactorManageService;\n this.default = !this.twoFactorManageService.hasVerificationMethods;\n }\n\n public resend(): void {\n this.twoFactorManageService.verificationMethodResend()\n .subscribe(() => {\n this._message.success('Resent verification code');\n });\n }\n\n public submit = () => {\n return of(true)\n .pipe(\n switchMap(() => {\n return this.verificationMethod ?\n this.twoFactorManageService.verificationMethodVerify(this.code)\n .pipe(\n tap((verificationMethod) => {\n this._message.success('Created email verification method');\n this._dialogRef.close(verificationMethod);\n }),\n ) :\n this.twoFactorManageService.verificationMethodCreate({\n type: 'email',\n email: this.email,\n default: this.default,\n })\n .pipe(\n tap((verificationMethod) => {\n this.verificationMethod = verificationMethod;\n this.form.clear();\n this._cdRef.markForCheck();\n }),\n );\n }),\n );\n };\n\n public codeCompleted(): void {\n this.form.triggerSubmit();\n }\n\n public codeChanged(code): void {\n this.code = code;\n }\n\n}\n","<form fsForm [submit]=\"submit\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Email Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <p>The app just sent you an email with a verification code.</p>\n \n <app-code-input \n [code]=\"code\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\n </app-code-input> \n\n <div>Did't get the code? <a (click)=\"resend()\">Resend Code</a></div>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this email for verifying your account security. </p>\n <mat-form-field>\n <mat-label>Email</mat-label>\n <input\n matInput\n [required]=\"true\"\n [(ngModel)]=\"email\"\n name=\"email\">\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default 2-step vertification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n","import {\n Component, Inject, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild,\n} from '@angular/core';\n\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { FsMessage } from '@firestitch/message';\nimport { FsFormDirective } from '@firestitch/form';\n\nimport { of } from 'rxjs';\nimport { switchMap, tap } from 'rxjs/operators';\nimport { TwoFactorManageService } from '../../services';\n\n\n@Component({\n templateUrl: './number.component.html',\n styleUrls: ['./number.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NumberComponent {\n\n @ViewChild(FsFormDirective, { static: false })\n public form: FsFormDirective;\n\n public phone;\n public code;\n public default;\n public verificationMethod = null;\n public defaultCountry;\n public twoFactorManageService: TwoFactorManageService;\n\n constructor(\n @Inject(MAT_DIALOG_DATA) private _data: any,\n private _dialogRef: MatDialogRef<NumberComponent>,\n private _cdRef: ChangeDetectorRef,\n private _message: FsMessage,\n ) {\n this.twoFactorManageService = _data.twoFactorManageService;\n this.defaultCountry = _data.defaultCountry;\n this.default = !this.twoFactorManageService.hasVerificationMethods;\n }\n\n public resend(): void {\n this.twoFactorManageService.verificationMethodResend()\n .subscribe(() => {\n this._message.success('Resent verification code');\n });\n }\n\n public submit = () => {\n return of(true)\n .pipe(\n switchMap(() => {\n return this.verificationMethod ?\n this.twoFactorManageService.verificationMethodVerify(this.code)\n .pipe(\n tap((verificationMethod) => {\n this._message.success('Created text message verification method');\n this._dialogRef.close(verificationMethod);\n }),\n ) :\n this.twoFactorManageService.verificationMethodCreate({\n type: 'sms',\n phoneNumber: this.phone.number,\n phoneCode: this.phone.countryCode,\n phoneCountry: this.phone.isoCode,\n default: this.default,\n }).pipe(\n tap((verificationMethod) => {\n this.verificationMethod = verificationMethod;\n this.form.clear();\n this._cdRef.markForCheck();\n }),\n );\n }),\n );\n };\n\n public codeCompleted(): void {\n this.form.triggerSubmit();\n }\n\n public codeChanged(code): void {\n this.code = code;\n }\n\n}\n","<form fsForm [submit]=\"submit\" autocomplete=\"off\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Text Message Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <p>The app just sent you a text message with a verification code.</p>\n\n <app-code-input \n [code]=\"code\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\n </app-code-input> \n \n <div>Did't get the code? <a (click)=\"resend()\">Resend Code</a></div>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this number for verifying your account security. Message and data rates may apply by your cell phone provider.</p>\n <mat-form-field>\n <mat-label>Phone number</mat-label>\n <fs-phone-field\n [(ngModel)]=\"phone\"\n [country]=\"defaultCountry\"\n name=\"phone\"\n autocomplete=\"off\"\n [required]=\"true\">\n </fs-phone-field>\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default 2-step vertification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n","import { Injectable, OnDestroy } from '@angular/core';\n\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\nimport { switchMap, takeUntil, tap } from 'rxjs/operators';\n\nimport { AppComponent } from '../components/app';\nimport { EmailComponent } from '../components/email';\nimport { NumberComponent } from '../components/number';\n\n\n@Injectable()\nexport class TwoFactorManageService implements OnDestroy {\n\n private _destroy$ = new Subject();\n\n private _verificationMethodFetch: () => Observable<any[]>;\n private _verificationMethodCreate: (verificationMethod) => Observable<any>;\n private _verificationMethodDelete: (verificationMethod) => Observable<any>;\n private _verificationMethodVerify: (verificationMethod) => Observable<any>;\n private _verificationMethodResend: () => Observable<any>;\n private _accountVerify: () => Observable<any[]>;\n private _verificationMethods$ = new BehaviorSubject<any[]>([]);\n\n constructor(\n private _dialog: MatDialog,\n ) {}\n\n public get verificationMethods$() {\n return this._verificationMethods$\n .pipe(\n takeUntil(this._destroy$),\n );\n }\n \n public get verificationMethods() {\n return this._verificationMethods$.getValue();\n }\n\n public get hasVerificationMethods(): boolean {\n return !!this._verificationMethods$.getValue().length;\n }\n \n public getVerificationMethods(type) {\n return this.verificationMethods\n .filter((verificationMethod) => {\n return verificationMethod.type === type;\n });\n }\n \n public hasVerificationMethod(type) {\n return this.verificationMethods\n .some((verificationMethod) => {\n return verificationMethod.type === type;\n });\n }\n\n public registerVerificationMethodResend(value) {\n this._verificationMethodResend = value;\n }\n\n public registerVerificationMethodFetch(value) {\n this._verificationMethodFetch = value;\n }\n\n public registerVerificationMethodDelete(value) {\n this._verificationMethodDelete = value;\n }\n\n public registerVerificationMethodCreate(value) {\n this._verificationMethodCreate = value;\n }\n\n public registerVerificationMethodVerify(value) {\n this._verificationMethodVerify = value;\n }\n\n public registerAccountVerify(value) {\n this._accountVerify = value;\n }\n\n public verificationMethodDelete(verificationMethod): Observable<any> {\n return this._verificationMethodDelete(verificationMethod)\n .pipe(\n tap(() => {\n this.verificationMethodFetch();\n }),\n );\n }\n\n public verificationMethodVerify(verificationMethod): Observable<any> {\n return this._verificationMethodVerify(verificationMethod)\n .pipe(\n tap(() => {\n this.verificationMethodFetch();\n }),\n );\n }\n\n public verificationMethodCreate(verificationMethod): Observable<any> {\n return this._verificationMethodCreate(verificationMethod);\n }\n\n public verificationMethodResend(): Observable<any> {\n return this._verificationMethodResend();\n }\n\n public verificationMethodFetch() {\n this._verificationMethodFetch()\n .subscribe((verificationMethods) => {\n this._verificationMethods$.next(verificationMethods);\n });\n }\n\n public accountVerify(): Observable<any> {\n return this._accountVerify();\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public addSms(defaultCountry): Observable<any>{\n return this.accountVerify()\n .pipe(\n switchMap(() => this._dialog.open(NumberComponent, {\n data: {\n defaultCountry,\n twoFactorManageService: this,\n },\n })\n .afterClosed(),\n ),\n tap(() => {\n this.verificationMethodFetch();\n }),\n takeUntil(this._destroy$),\n );\n }\n\n public addEmail(): Observable<any>{\n return this.accountVerify()\n .pipe(\n switchMap(() => this._dialog.open(EmailComponent, {\n data: { twoFactorManageService: this },\n })\n .afterClosed(),\n ),\n tap(() => {\n this.verificationMethodFetch();\n }),\n takeUntil(this._destroy$),\n );\n }\n\n public addApp(): Observable<any>{\n return this.accountVerify()\n .pipe(\n switchMap(() => this._dialog.open(AppComponent, {\n data: { twoFactorManageService: this },\n })\n .afterClosed(),\n ),\n tap(() => {\n this.verificationMethodFetch();\n }),\n takeUntil(this._destroy$),\n );\n }\n}\n","import {\n Component, ChangeDetectionStrategy,\n} from '@angular/core';\n\n\n@Component({\n selector: 'app-defaulted',\n templateUrl: './defaulted.component.html',\n styleUrls: ['./defaulted.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DefaultedComponent {\n\n}\n","<span>Default</span>","import {\n Component, ChangeDetectionStrategy, OnInit, Input, Output, EventEmitter,\n} from '@angular/core';\n\nimport { FsListConfig } from '@firestitch/list';\nimport { FsPrompt } from '@firestitch/prompt';\nimport { IFsVerificationMethod } from '../../../../interfaces/verification-method.interface';\n\nimport { map, switchMap } from 'rxjs/operators';\nimport { TwoFactorManageService } from '../../services';\n\n\n@Component({\n selector: 'app-verification-methods',\n templateUrl: './verification-methods.component.html',\n styleUrls: ['./verification-methods.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class VerificationMethodsComponent implements OnInit {\n\n @Input() public twoFactorManageService: TwoFactorManageService;\n @Input() public type;\n \n @Output() public deleted = new EventEmitter<IFsVerificationMethod>();\n\n public listConfig: FsListConfig;\n public textMessageAdd: () => void;\n\n constructor(\n private _prompt: FsPrompt,\n ) {\n }\n\n public ngOnInit(): void {\n this.listConfig = {\n rowActions: [\n {\n click: (verificationMethod) => {\n this._prompt.confirm({\n title: 'Confirm',\n template: 'Would you like to delete this verification method?',\n })\n .pipe(\n switchMap(() => this.twoFactorManageService\n .verificationMethodDelete(verificationMethod)),\n )\n .subscribe(() => {\n this.deleted.emit(verificationMethod);\n });\n },\n label: 'Delete',\n },\n ],\n fetch: () => {\n return this.twoFactorManageService.verificationMethods$\n .pipe(\n map((verificationMethods) => ({\n data: verificationMethods.filter((verificationMethod) => {\n return verificationMethod.type === this.type;\n }),\n }),\n ),\n );\n },\n };\n }\n}\n","<fs-list [config]=\"listConfig\">\n <fs-list-column class=\"col-name\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"row\">\n <ng-container *ngIf=\"row.type === 'sms'\">\n <fs-country [code]=\"row.phoneCountry\" [showName]=\"false\"></fs-country> {{row.phoneNumber | fsPhone}}\n </ng-container>\n\n <ng-container *ngIf=\"row.type === 'email'\">\n {{row.email}}\n </ng-container>\n \n <app-defaulted *ngIf=\"row.default\"></app-defaulted>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>","import {\n Component, Inject, ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { FsMessage } from '@firestitch/message';\nimport { FsVerificationMethodType } from '../../../../enums/verification-method-type.enum';\nimport { TwoFactorManageService } from '../../services';\n\n\n@Component({\n templateUrl: './numbers.component.html',\n styleUrls: ['./numbers.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NumbersComponent {\n\n public defaultCountry;\n public twoFactorManageService: TwoFactorManageService;\n public FsVerificationMethodType = FsVerificationMethodType;\n\n constructor(\n @Inject(MAT_DIALOG_DATA) private _data: any, \n private _dialogRef: MatDialogRef<NumbersComponent>,\n private _message: FsMessage,\n ) {\n this.twoFactorManageService = _data.twoFactorManageService;\n this.defaultCountry = _data.defaultCountry;\n }\n\n public add(): void {\n this.twoFactorManageService.addSms(this.defaultCountry)\n .subscribe();\n }\n\n public deleted(): void {\n this._message.success('Deleted text message verification method');\n if(!this.twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.Sms)) {\n this._dialogRef.close();\n }\n }\n\n}\n","<fs-dialog>\n <h1 mat-dialog-title>\n Text Message Numbers\n </h1>\n <mat-dialog-content>\n <app-verification-methods\n [type]=\"FsVerificationMethodType.Sms\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </app-verification-methods>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Number\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n","import {\n Component, Inject, ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { FsMessage } from '@firestitch/message';\nimport { FsVerificationMethodType } from '../../../../enums/verification-method-type.enum';\nimport { TwoFactorManageService } from '../../services';\n\n\n@Component({\n templateUrl: './emails.component.html',\n styleUrls: ['./emails.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EmailsComponent {\n\n public twoFactorManageService: TwoFactorManageService;\n public FsVerificationMethodType = FsVerificationMethodType;\n\n constructor(\n @Inject(MAT_DIALOG_DATA) private _data: any,\n private _dialogRef: MatDialogRef<EmailsComponent>,\n private _message: FsMessage,\n ) {\n this.twoFactorManageService = _data.twoFactorManageService;\n }\n\n public add(): void {\n this.twoFactorManageService.addEmail()\n .subscribe();\n }\n\n public deleted(): void {\n this._message.success('Deleted email verification method');\n if(!this.twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.Email)) {\n this._dialogRef.close();\n }\n }\n\n}\n","<fs-dialog>\n <h1 mat-dialog-title>\n Emails\n </h1>\n <mat-dialog-content>\n <app-verification-methods\n [type]=\"FsVerificationMethodType.Email\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </app-verification-methods>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Email\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n","import {\n Component, Inject, ChangeDetectionStrategy, ChangeDetectorRef, OnInit, OnDestroy,\n} from '@angular/core';\n\nimport { MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';\n\nimport { Subject } from 'rxjs';\n\nimport { NumbersComponent } from '../numbers';\nimport { EmailsComponent } from '../emails';\nimport { TwoFactorManageService } from '../../services';\nimport { FsVerificationMethodType } from '../../../../enums/verification-method-type.enum';\nimport { FsMessage } from '@firestitch/message';\n\n\n@Component({\n templateUrl: './manage-methods.component.html',\n styleUrls: ['./manage-methods.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ManageMethodsComponent implements OnInit, OnDestroy {\n\n public verificationMethods;\n private _destroy$ = new Subject();\n private _defaultCountry: string;\n private _twoFactorManageService: TwoFactorManageService;\n\n constructor(\n @Inject(MAT_DIALOG_DATA) private _data: any,\n private _cdRef: ChangeDetectorRef,\n private _dialog: MatDialog,\n private _message: FsMessage,\n ) {}\n\n public ngOnInit(): void {\n this._defaultCountry = this._data.defaultCountry;\n this._twoFactorManageService = this._data.twoFactorManageService;\n\n this._twoFactorManageService.verificationMethods$\n .subscribe((verificationMethods) => {\n this.verificationMethods = verificationMethods;\n this._cdRef.markForCheck();\n });\n }\n\n public get defaultSms(): boolean {\n return this._twoFactorManageService.getVerificationMethods(FsVerificationMethodType.Sms)\n .some((verificationMethod) => {\n return verificationMethod.default;\n });\n }\n\n public get defaultApp(): boolean {\n return this._twoFactorManageService.getVerificationMethods(FsVerificationMethodType.App)\n .some((verificationMethod) => {\n return verificationMethod.default;\n });\n }\n\n public get defaultEmail(): boolean {\n return this._twoFactorManageService.getVerificationMethods(FsVerificationMethodType.Email)\n .some((verificationMethod) => {\n return verificationMethod.default;\n });\n }\n\n public get textHasVerificationMethod(): boolean {\n return this._twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.Sms);\n }\n\n public get appHasVerificationMethod(): boolean {\n return this._twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.App);\n }\n\n public get emailHasVerificationMethod(): boolean {\n return this._twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.Email);\n }\n\n public textMessageManage(): void {\n this._dialog.open(NumbersComponent, {\n data: {\n twoFactorManageService: this._twoFactorManageService,\n defaultCountry: this._defaultCountry,\n },\n });\n }\n\n public textMessageAdd(): void {\n this._twoFactorManageService.addSms(this._defaultCountry)\n .subscribe();\n }\n\n public emailMessageManage(): void {\n this._dialog.open(EmailsComponent, {\n data: {\n twoFactorManageService: this._twoFactorManageService,\n },\n });\n }\n\n public emailMessageAdd(): void {\n this._twoFactorManageService.addEmail()\n .subscribe();\n }\n\n public appRemove(): void {\n this._message.success('Removed App Authenticator verification method');\n\n const verificationMethod = this.verificationMethods\n .find((_verificationMethod) => {\n return _verificationMethod.type === FsVerificationMethodType.App;\n });\n\n if(verificationMethod) {\n this._twoFactorManageService.verificationMethodDelete(verificationMethod)\n .subscribe(() => {\n this._cdRef.markForCheck();\n });\n }\n }\n\n public appAdd(): void {\n this._twoFactorManageService.addApp()\n .subscribe();\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n}\n","<fs-dialog>\n <h1 mat-dialog-title>2-Step Verification Methods</h1>\n <mat-dialog-content>\n <table>\n <tr>\n <td>\n <mat-icon>textsms</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Text Message</span>\n <app-defaulted *ngIf=\"defaultSms\"></app-defaulted>\n </div>\n <div class=\"small\">Verification codes are sent by text message</div>\n </td>\n <td>\n <button \n *ngIf=\"textHasVerificationMethod; else textMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"textMessageManage()\">\n Manage\n </button>\n <ng-template #textMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"textMessageAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr>\n <tr>\n <td>\n <mat-icon>email</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Email</span> \n <app-defaulted *ngIf=\"defaultEmail\"></app-defaulted>\n </div>\n <div class=\"small\">Verification codes are sent by text message</div>\n </td>\n <td>\n <button \n *ngIf=\"emailHasVerificationMethod; else emailMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"emailMessageManage()\">\n Manage\n </button>\n <ng-template #emailMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"emailMessageAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr>\n <tr>\n <td>\n <mat-icon>phone_iphone</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Authenticator App</span>\n <app-defaulted *ngIf=\"defaultApp\"></app-defaulted>\n </div>\n <div class=\"small\">Verification code is generatede by an authenticator app such as Authy or Google Authenticator</div>\n </td>\n <td>\n <button \n *ngIf=\"appHasVerificationMethod; else appMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"appRemove()\">\n Remove\n </button>\n <ng-template #appMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"appAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr> \n </table> \n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n","import {\n Component,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n OnDestroy,\n Input,\n OnInit,\n} from '@angular/core';\n\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { Observable, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { TwoFactorManageService } from '../../services';\n\nimport { ManageMethodsComponent } from '../manage-methods';\n\n\n@Component({\n selector: 'fs-2fa-manage',\n templateUrl: './2fa-manage.component.html',\n styleUrls: ['./2fa-manage.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TwoFactorManageService],\n})\nexport class Fs2faManageComponent implements OnDestroy, OnInit {\n\n @Input() public accountVerify: () => Observable<any>;\n @Input() public defaultCountry: string;\n @Input() public verificationMethodsFetch: () => Observable<any[]>;\n @Input() public verificationMethodDelete: (verificationMethod: any) => Observable<any>;\n @Input() public verificationMethodCreate: (verificationMethod: any) => Observable<any>;\n @Input() public verificationMethodVerify: (verificationMethod: any) => Observable<any>;\n @Input() public verificationMethodResend: () => Observable<any>;\n\n public statuses;\n\n private _destroy$ = new Subject();\n\n constructor(\n private _cdRef: ChangeDetectorRef,\n private _dialog: MatDialog,\n private _twoFactorManageService: TwoFactorManageService,\n ) {}\n\n public ngOnInit(): void {\n this._twoFactorManageService.registerVerificationMethodFetch(this.verificationMethodsFetch);\n this._twoFactorManageService.registerVerificationMethodDelete(this.verificationMethodDelete);\n this._twoFactorManageService.registerVerificationMethodCreate(this.verificationMethodCreate);\n this._twoFactorManageService.registerVerificationMethodVerify(this.verificationMethodVerify);\n this._twoFactorManageService.registerVerificationMethodResend(this.verificationMethodResend);\n this._twoFactorManageService.registerAccountVerify(this.accountVerify);\n\n\n this._twoFactorManageService.verificationMethods$\n .subscribe((verificationMethods) => {\n const types = {\n sms: 'Text Message',\n email: 'Email',\n app: 'Authenticator App',\n };\n\n this.statuses = Object.keys(\n verificationMethods.reduce((accum, verificationMethod) => {\n accum[verificationMethod.type] = true;\n\n return accum;\n }, {}),\n )\n .map((type) => {\n return types[type];\n });\n\n this._cdRef.markForCheck();\n });\n\n this._twoFactorManageService.verificationMethodFetch();\n }\n\n public manage() {\n const dialogRef = this._dialog.open(ManageMethodsComponent, {\n autoFocus: false,\n data: {\n defaultCountry: this.defaultCountry,\n twoFactorManageService: this._twoFactorManageService,\n },\n });\n\n dialogRef.afterClosed()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this._cdRef.markForCheck();\n });\n }\n\n public reload(): void {\n this._twoFactorManageService.verificationMethodFetch();\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n\n}\n","<fs-label-field>\n <fs-label>Status</fs-label>\n <ng-container *ngIf=\"statuses\">\n <ng-container *ngIf=\"statuses.length === 1\">\n {{statuses[0]}} verification is enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length > 1\">\n {{statuses.join(', ')}} verifications are enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length === 0\">\n No verification methods are enabled\n </ng-container>\n </ng-container>\n</fs-label-field>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\nimport { FsListModule } from '@firestitch/list';\nimport { FsDialogModule } from '@firestitch/dialog';\nimport { FsFormModule } from '@firestitch/form';\nimport { FsSkeletonModule } from '@firestitch/skeleton';\nimport { FsLabelModule } from '@firestitch/label';\nimport { FsPhoneModule } from '@firestitch/phone';\nimport { FsCountryModule } from '@firestitch/country';\n\nimport { QrCodeModule } from 'ng-qrcode';\n\n\nimport { CodeInputModule } from '../code-input';\nimport { Fs2faManageComponent } from './components/2fa-manage';\nimport { ManageMethodsComponent } from './components/manage-methods';\nimport { NumbersComponent } from './components/numbers';\nimport { AppComponent } from './components/app';\nimport { EmailComponent } from './components/email';\nimport { VerificationMethodsComponent } from './components/verification-methods';\nimport { NumberComponent } from './components/number';\nimport { EmailsComponent } from './components/emails';\nimport { DefaultedComponent } from './components/defaulted';\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n\n MatButtonModule,\n MatDialogModule,\n MatInputModule,\n MatIconModule,\n MatCheckboxModule,\n\n FsDialogModule,\n FsListModule,\n FsFormModule,\n FsLabelModule,\n FsPhoneModule,\n FsSkeletonModule,\n FsCountryModule,\n\n CodeInputModule,\n\n QrCodeModule,\n ],\n declarations: [\n Fs2faManageComponent,\n ManageMethodsComponent,\n NumbersComponent,\n AppComponent,\n EmailComponent,\n VerificationMethodsComponent,\n NumberComponent,\n EmailsComponent,\n DefaultedComponent,\n ],\n exports: [Fs2faManageComponent],\n})\nexport class Fs2faManageModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["InjectionToken","FsVerificationMethodType","tap","map","shareReplay","MAT_DIALOG_DATA","Component","ChangeDetectionStrategy","Inject","EventEmitter","AngularCodeInputComponent","ViewChild","Input","Output","ControlContainer","NgForm","Subject","takeUntil","filter","AngularCodeInputModule","NgModule","CommonModule","FormsModule","MatFormFieldModule","MatInputModule","MatButtonModule","FsFormModule","FsRadioGroupModule","FsDialogModule","MatCheckboxModule","MatProgressSpinnerModule","FsSkeletonModule","MatIconModule","MatRadioModule","FsFormDirective","of","switchMap","BehaviorSubject","Injectable","MatDialogModule","FsListModule","FsLabelModule","FsPhoneModule","FsCountryModule","QrCodeModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAIa,4BAA4B,GAAG,IAAIA,iBAAc,CAC5D,mCAAmC;;ACLzBC;IAAZ,WAAY,wBAAwB;QAClC,uCAAW,CAAA;QACX,2CAAe,CAAA;QACf,uCAAW,CAAA;IACb,CAAC,EAJWA,gCAAwB,KAAxBA,gCAAwB;;ICwBpC;QAQE,2CAEU,qBAA8C,EAE9C,WAAgB,EAChB,UAA2D;YALrE,iBASC;YAPS,0BAAqB,GAArB,qBAAqB,CAAyB;YAE9C,gBAAW,GAAX,WAAW,CAAK;YAChB,eAAU,GAAV,UAAU,CAAiD;YAPrD,2BAAsB,GAAGA,gCAAwB,CAAC;YAiB3D,0BAAqB,GAAG;gBAC7B,OAAO,KAAI,CAAC,qBAAqB;qBAC9B,wBAAwB,CAAC,KAAI,CAAC,MAAM,CAAC,EAAE,CAAC;qBACxC,IAAI,CACHC,aAAG,CAAC,UAAC,MAA6B;oBAChC,KAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;iBAC/B,CAAC,CACH,CAAC;aACL,CAAC;YAhBA,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACxB,IAAI,CAAC,YAAY,EAAE,CAAC;SACrB;QAEM,uDAAW,GAAX,UAAY,EAAE,EAAE,EAAE;YACvB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAA;SACnC;QAYO,4DAAgB,GAAhB;;YACN,IAAI,CAAC,MAAM,GAAG,MAAA,IAAI,CAAC,WAAW,0CAAE,MAAM,CAAC;SACxC;QAEO,wDAAY,GAAZ;YACN,IAAI,CAAC,QAAQ,GA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ularCodeInputModule } from 'angular-code-input';
3
+ import { CodeInputComponent } from './components/code-input';
4
+ import * as i0 from "@angular/core";
5
+ export class CodeInputModule {
6
+ }
7
+ CodeInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
8
+ CodeInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputModule, declarations: [CodeInputComponent], imports: [AngularCodeInputModule], exports: [CodeInputComponent] });
9
+ CodeInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputModule, imports: [[
10
+ AngularCodeInputModule,
11
+ ]] });
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputModule, decorators: [{
13
+ type: NgModule,
14
+ args: [{
15
+ imports: [
16
+ AngularCodeInputModule,
17
+ ],
18
+ declarations: [
19
+ CodeInputComponent,
20
+ ],
21
+ exports: [
22
+ CodeInputComponent,
23
+ ],
24
+ }]
25
+ }] });
26
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29kZS1pbnB1dC5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvY29kZS1pbnB1dC9jb2RlLWlucHV0Lm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRXpDLE9BQU8sRUFBRSxlQUFlLElBQUksc0JBQXNCLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUUvRSxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQzs7QUFjN0QsTUFBTSxPQUFPLGVBQWU7OzZHQUFmLGVBQWU7OEdBQWYsZUFBZSxpQkFOeEIsa0JBQWtCLGFBSGxCLHNCQUFzQixhQU10QixrQkFBa0I7OEdBR1QsZUFBZSxZQVZqQjtZQUNQLHNCQUFzQjtTQUN2Qjs0RkFRVSxlQUFlO2tCQVgzQixRQUFRO21CQUFDO29CQUNSLE9BQU8sRUFBRTt3QkFDUCxzQkFBc0I7cUJBQ3ZCO29CQUNELFlBQVksRUFBRTt3QkFDWixrQkFBa0I7cUJBQ25CO29CQUNELE9BQU8sRUFBRTt3QkFDUCxrQkFBa0I7cUJBQ25CO2lCQUNGIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuaW1wb3J0IHsgQ29kZUlucHV0TW9kdWxlIGFzIEFuZ3VsYXJDb2RlSW5wdXRNb2R1bGUgfSBmcm9tICdhbmd1bGFyLWNvZGUtaW5wdXQnO1xuXG5pbXBvcnQgeyBDb2RlSW5wdXRDb21wb25lbnQgfSBmcm9tICcuL2NvbXBvbmVudHMvY29kZS1pbnB1dCc7XG5cblxuQE5nTW9kdWxlKHtcbiAgaW1wb3J0czogW1xuICAgIEFuZ3VsYXJDb2RlSW5wdXRNb2R1bGUsXG4gIF0sXG4gIGRlY2xhcmF0aW9uczogW1xuICAgIENvZGVJbnB1dENvbXBvbmVudCxcbiAgXSxcbiAgZXhwb3J0czogW1xuICAgIENvZGVJbnB1dENvbXBvbmVudCxcbiAgXSxcbn0pXG5leHBvcnQgY2xhc3MgQ29kZUlucHV0TW9kdWxlIHtcbn1cbiJdfQ==
@@ -0,0 +1,36 @@
1
+ import { Component, ChangeDetectionStrategy, Output, EventEmitter, Input, ViewChild } from '@angular/core';
2
+ import { CodeInputComponent as AngularCodeInputComponent } from 'angular-code-input';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "angular-code-input";
5
+ export class CodeInputComponent {
6
+ constructor() {
7
+ this.codeCompleted = new EventEmitter();
8
+ this.codeChanged = new EventEmitter();
9
+ }
10
+ focus() {
11
+ this.angularCodeInputComponent.focusOnField(0);
12
+ }
13
+ }
14
+ CodeInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15
+ CodeInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CodeInputComponent, selector: "app-code-input", inputs: { codeLength: "codeLength", code: "code" }, outputs: { codeCompleted: "codeCompleted", codeChanged: "codeChanged" }, viewQueries: [{ propertyName: "angularCodeInputComponent", first: true, predicate: AngularCodeInputComponent, descendants: true }], ngImport: i0, template: "<code-input\r\n [initialFocusField]=\"0\"\r\n [codeLength]=\"6\"\r\n [code]=\"code\"\r\n (codeCompleted)=\"codeCompleted.emit($event)\"\r\n (codeChanged)=\"codeChanged.emit($event)\">\r\n</code-input>", styles: ["code-input{--item-spacing: 10px;--item-height: 20px;--item-border: none;--item-border-bottom: 2px solid #949494;--item-border-has-value: none;--item-border-bottom-has-value: 2px solid #949494;--item-border-focused: none;--item-border-bottom-focused: 2px solid #0061AF;--item-shadow-focused: none;--item-border-radius: 0px}code-input ::ng-deep span:first-child{padding-left:0!important}code-input ::ng-deep span:last-child{padding-right:0!important}code-input ::ng-deep input{font-size:20px!important;height:40px!important;padding:0!important}\n"], components: [{ type: i1.CodeInputComponent, selector: "code-input", inputs: ["isNonDigitsCode", "codeLength", "inputType", "initialFocusField", "isCharsCode", "isCodeHidden", "isPrevFocusableAfterClearing", "isFocusingOnLastByClickIfFilled", "code", "disabled", "autocapitalize"], outputs: ["codeChanged", "codeCompleted"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CodeInputComponent, decorators: [{
17
+ type: Component,
18
+ args: [{
19
+ selector: 'app-code-input',
20
+ templateUrl: './code-input.component.html',
21
+ styleUrls: ['./code-input.component.scss'],
22
+ changeDetection: ChangeDetectionStrategy.OnPush,
23
+ }]
24
+ }], propDecorators: { angularCodeInputComponent: [{
25
+ type: ViewChild,
26
+ args: [AngularCodeInputComponent]
27
+ }], codeLength: [{
28
+ type: Input
29
+ }], code: [{
30
+ type: Input
31
+ }], codeCompleted: [{
32
+ type: Output
33
+ }], codeChanged: [{
34
+ type: Output
35
+ }] } });
36
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29kZS1pbnB1dC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvY29kZS1pbnB1dC9jb21wb25lbnRzL2NvZGUtaW5wdXQvY29kZS1pbnB1dC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvY29kZS1pbnB1dC9jb21wb25lbnRzL2NvZGUtaW5wdXQvY29kZS1pbnB1dC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLHVCQUF1QixFQUFFLE1BQU0sRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUzRyxPQUFPLEVBQUUsa0JBQWtCLElBQUkseUJBQXlCLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQzs7O0FBU3JGLE1BQU0sT0FBTyxrQkFBa0I7SUFOL0I7UUFjbUIsa0JBQWEsR0FBRyxJQUFJLFlBQVksRUFBRSxDQUFDO1FBQ25DLGdCQUFXLEdBQUcsSUFBSSxZQUFZLEVBQUUsQ0FBQztLQUtuRDtJQUhRLEtBQUs7UUFDVixJ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TdHJhdGVneS5PblB1c2gsXG59KVxuZXhwb3J0IGNsYXNzIENvZGVJbnB1dENvbXBvbmVudCB7XG5cbiAgQFZpZXdDaGlsZChBbmd1bGFyQ29kZUlucHV0Q29tcG9uZW50KVxuICBwdWJsaWMgYW5ndWxhckNvZGVJbnB1dENvbXBvbmVudDogQW5ndWxhckNvZGVJbnB1dENvbXBvbmVudDtcblxuICBASW5wdXQoKSBwdWJsaWMgY29kZUxlbmd0aDogbnVtYmVyO1xuICBASW5wdXQoKSBwdWJsaWMgY29kZTtcblxuICBAT3V0cHV0KCkgcHVibGljIGNvZGVDb21wbGV0ZWQgPSBuZXcgRXZlbnRFbWl0dGVyKCk7XG4gIEBPdXRwdXQoKSBwdWJsaWMgY29kZUNoYW5nZWQgPSBuZXcgRXZlbnRFbWl0dGVyKCk7XG4gIFxuICBwdWJsaWMgZm9jdXMoKTogdm9pZCB7XG4gICAgdGhpcy5hbmd1bGFyQ29kZUlucHV0Q29tcG9uZW50LmZvY3VzT25GaWVsZCgwKTtcbiAgfVxufSIsIjxjb2RlLWlucHV0XHJcbiAgW2luaXRpYWxGb2N1c0ZpZWxkXT1cIjBcIlxyXG4gIFtjb2RlTGVuZ3RoXT1cIjZcIlxyXG4gIFtjb2RlXT1cImNvZGVcIlxyXG4gIChjb2RlQ29tcGxldGVkKT1cImNvZGVDb21wbGV0ZWQuZW1pdCgkZXZlbnQpXCJcclxuICAoY29kZUNoYW5nZWQpPVwiY29kZUNoYW5nZWQuZW1pdCgkZXZlbnQpXCI+XHJcbjwvY29kZS1pbnB1dD4iXX0=
@@ -0,0 +1,2 @@
1
+ export * from './code-input.component';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvY29kZS1pbnB1dC9jb21wb25lbnRzL2NvZGUtaW5wdXQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx3QkFBd0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY29kZS1pbnB1dC5jb21wb25lbnQnO1xuIl19
@@ -0,0 +1,2 @@
1
+ export * from './code-input.module';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvY29kZS1pbnB1dC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHFCQUFxQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9jb2RlLWlucHV0Lm1vZHVsZSc7XG4iXX0=
@@ -0,0 +1,92 @@
1
+ import { Component, ChangeDetectionStrategy, ChangeDetectorRef, Input, } from '@angular/core';
2
+ import { MatDialog } from '@angular/material/dialog';
3
+ import { Subject } from 'rxjs';
4
+ import { takeUntil } from 'rxjs/operators';
5
+ import { TwoFactorManageService } from '../../services';
6
+ import { ManageMethodsComponent } from '../manage-methods';
7
+ import * as i0 from "@angular/core";
8
+ import * as i1 from "@angular/material/dialog";
9
+ import * as i2 from "../../services";
10
+ import * as i3 from "@firestitch/label";
11
+ import * as i4 from "@angular/common";
12
+ export class Fs2faManageComponent {
13
+ constructor(_cdRef, _dialog, _twoFactorManageService) {
14
+ this._cdRef = _cdRef;
15
+ this._dialog = _dialog;
16
+ this._twoFactorManageService = _twoFactorManageService;
17
+ this._destroy$ = new Subject();
18
+ }
19
+ ngOnInit() {
20
+ this._twoFactorManageService.registerVerificationMethodFetch(this.verificationMethodsFetch);
21
+ this._twoFactorManageService.registerVerificationMethodDelete(this.verificationMethodDelete);
22
+ this._twoFactorManageService.registerVerificationMethodCreate(this.verificationMethodCreate);
23
+ this._twoFactorManageService.registerVerificationMethodVerify(this.verificationMethodVerify);
24
+ this._twoFactorManageService.registerVerificationMethodResend(this.verificationMethodResend);
25
+ this._twoFactorManageService.registerAccountVerify(this.accountVerify);
26
+ this._twoFactorManageService.verificationMethods$
27
+ .subscribe((verificationMethods) => {
28
+ const types = {
29
+ sms: 'Text Message',
30
+ email: 'Email',
31
+ app: 'Authenticator App',
32
+ };
33
+ this.statuses = Object.keys(verificationMethods.reduce((accum, verificationMethod) => {
34
+ accum[verificationMethod.type] = true;
35
+ return accum;
36
+ }, {}))
37
+ .map((type) => {
38
+ return types[type];
39
+ });
40
+ this._cdRef.markForCheck();
41
+ });
42
+ this._twoFactorManageService.verificationMethodFetch();
43
+ }
44
+ manage() {
45
+ const dialogRef = this._dialog.open(ManageMethodsComponent, {
46
+ autoFocus: false,
47
+ data: {
48
+ defaultCountry: this.defaultCountry,
49
+ twoFactorManageService: this._twoFactorManageService,
50
+ },
51
+ });
52
+ dialogRef.afterClosed()
53
+ .pipe(takeUntil(this._destroy$))
54
+ .subscribe(() => {
55
+ this._cdRef.markForCheck();
56
+ });
57
+ }
58
+ reload() {
59
+ this._twoFactorManageService.verificationMethodFetch();
60
+ }
61
+ ngOnDestroy() {
62
+ this._destroy$.next();
63
+ this._destroy$.complete();
64
+ }
65
+ }
66
+ Fs2faManageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.MatDialog }, { token: i2.TwoFactorManageService }], target: i0.ɵɵFactoryTarget.Component });
67
+ Fs2faManageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faManageComponent, selector: "fs-2fa-manage", inputs: { accountVerify: "accountVerify", defaultCountry: "defaultCountry", verificationMethodsFetch: "verificationMethodsFetch", verificationMethodDelete: "verificationMethodDelete", verificationMethodCreate: "verificationMethodCreate", verificationMethodVerify: "verificationMethodVerify", verificationMethodResend: "verificationMethodResend" }, providers: [TwoFactorManageService], ngImport: i0, template: "<fs-label-field>\n <fs-label>Status</fs-label>\n <ng-container *ngIf=\"statuses\">\n <ng-container *ngIf=\"statuses.length === 1\">\n {{statuses[0]}} verification is enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length > 1\">\n {{statuses.join(', ')}} verifications are enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length === 0\">\n No verification methods are enabled\n </ng-container>\n </ng-container>\n</fs-label-field>", styles: [""], components: [{ type: i3.ɵb, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3.ɵa, selector: "fs-label" }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2faManageComponent, decorators: [{
69
+ type: Component,
70
+ args: [{
71
+ selector: 'fs-2fa-manage',
72
+ templateUrl: './2fa-manage.component.html',
73
+ styleUrls: ['./2fa-manage.component.scss'],
74
+ changeDetection: ChangeDetectionStrategy.OnPush,
75
+ providers: [TwoFactorManageService],
76
+ }]
77
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.MatDialog }, { type: i2.TwoFactorManageService }]; }, propDecorators: { accountVerify: [{
78
+ type: Input
79
+ }], defaultCountry: [{
80
+ type: Input
81
+ }], verificationMethodsFetch: [{
82
+ type: Input
83
+ }], verificationMethodDelete: [{
84
+ type: Input
85
+ }], verificationMethodCreate: [{
86
+ type: Input
87
+ }], verificationMethodVerify: [{
88
+ type: Input
89
+ }], verificationMethodResend: [{
90
+ type: Input
91
+ }] } });
92
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMmZhLW1hbmFnZS5jb21wb25lbn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wic3RhdHVzZXMubGVuZ3RoICA9PT0gMFwiPlxuICAgICAgTm8gdmVyaWZpY2F0aW9uIG1ldGhvZHMgYXJlIGVuYWJsZWRcbiAgICA8L25nLWNvbnRhaW5lcj5cbiAgPC9uZy1jb250YWluZXI+XG48L2ZzLWxhYmVsLWZpZWxkPiJdfQ==
@@ -0,0 +1,2 @@
1
+ export * from './2fa-manage.component';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvbWFuYWdlL2NvbXBvbmVudHMvMmZhLW1hbmFnZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHdCQUF3QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi8yZmEtbWFuYWdlLmNvbXBvbmVudCc7XG4iXX0=