@aws-amplify/ui-angular 3.2.19 → 4.0.1

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 (107) hide show
  1. package/{esm2015/lib/components/authenticator/authenticator.module.js → esm2020/lib/components/authenticator/authenticator.module.mjs} +5 -5
  2. package/esm2020/lib/components/authenticator/components/authenticator/authenticator.component.mjs +176 -0
  3. package/esm2020/lib/components/authenticator/components/base-form-fields/base-form-fields.component.mjs +32 -0
  4. package/esm2020/lib/components/authenticator/components/confirm-reset-password/amplify-confirm-reset-password.component.mjs +45 -0
  5. package/esm2020/lib/components/authenticator/components/confirm-sign-in/confirm-sign-in.component.mjs +49 -0
  6. package/esm2020/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.mjs +49 -0
  7. package/esm2020/lib/components/authenticator/components/confirm-verify-user/amplify-confirm-verify-user.component.mjs +44 -0
  8. package/esm2020/lib/components/authenticator/components/federated-sign-in/federated-sign-in.component.mjs +47 -0
  9. package/esm2020/lib/components/authenticator/components/federated-sign-in-button/federated-sign-in-button.component.mjs +26 -0
  10. package/esm2020/lib/components/authenticator/components/force-new-password/force-new-password-form-fields/force-new-password-form-fields.component.mjs +12 -0
  11. package/esm2020/lib/components/authenticator/components/force-new-password/force-new-password.component.mjs +44 -0
  12. package/esm2020/lib/components/authenticator/components/form-field/form-field.component.mjs +50 -0
  13. package/esm2020/lib/components/authenticator/components/reset-password/reset-password.component.mjs +44 -0
  14. package/esm2020/lib/components/authenticator/components/setup-totp/setup-totp.component.mjs +69 -0
  15. package/esm2020/lib/components/authenticator/components/sign-in/sign-in.component.mjs +41 -0
  16. package/esm2020/lib/components/authenticator/components/sign-up/sign-up-form-fields/sign-up-form-fields.component.mjs +12 -0
  17. package/esm2020/lib/components/authenticator/components/sign-up/sign-up.component.mjs +44 -0
  18. package/esm2020/lib/components/authenticator/components/verify-user/verify-user.component.mjs +56 -0
  19. package/{esm2015/lib/primitives/button/button.component.js → esm2020/lib/primitives/button/button.component.mjs} +5 -8
  20. package/esm2020/lib/primitives/checkbox/checkbox.component.mjs +37 -0
  21. package/esm2020/lib/primitives/error/error.component.mjs +21 -0
  22. package/esm2020/lib/primitives/password-field/password-field.component.mjs +64 -0
  23. package/esm2020/lib/primitives/phone-number-field/phone-number-field.component.mjs +62 -0
  24. package/esm2020/lib/primitives/select/select.component.mjs +22 -0
  25. package/esm2020/lib/primitives/tab-item/tab-item.component.mjs +29 -0
  26. package/{esm2015/lib/primitives/tabs/tabs.component.js → esm2020/lib/primitives/tabs/tabs.component.mjs} +5 -8
  27. package/esm2020/lib/primitives/text-field/text-field.component.mjs +50 -0
  28. package/esm2020/lib/services/authenticator.service.mjs +177 -0
  29. package/esm2020/lib/services/custom-components.service.mjs +25 -0
  30. package/esm2020/lib/utilities/amplify-slot/amplify-slot.component.mjs +33 -0
  31. package/{esm2015/lib/utilities/amplify-slot/amplify-slot.directive.js → esm2020/lib/utilities/amplify-slot/amplify-slot.directive.mjs} +4 -4
  32. package/{esm2015/version.js → esm2020/version.mjs} +2 -2
  33. package/fesm2015/aws-amplify-ui-angular.mjs +1432 -0
  34. package/fesm2015/aws-amplify-ui-angular.mjs.map +1 -0
  35. package/fesm2020/aws-amplify-ui-angular.mjs +1416 -0
  36. package/fesm2020/aws-amplify-ui-angular.mjs.map +1 -0
  37. package/lib/components/authenticator/components/authenticator/authenticator.component.d.ts +1 -1
  38. package/lib/components/authenticator/components/base-form-fields/base-form-fields.component.d.ts +1 -1
  39. package/lib/components/authenticator/components/confirm-reset-password/amplify-confirm-reset-password.component.d.ts +1 -1
  40. package/lib/components/authenticator/components/confirm-sign-in/confirm-sign-in.component.d.ts +1 -1
  41. package/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.d.ts +1 -1
  42. package/lib/components/authenticator/components/confirm-verify-user/amplify-confirm-verify-user.component.d.ts +1 -1
  43. package/lib/components/authenticator/components/federated-sign-in/federated-sign-in.component.d.ts +1 -1
  44. package/lib/components/authenticator/components/federated-sign-in-button/federated-sign-in-button.component.d.ts +1 -1
  45. package/lib/components/authenticator/components/force-new-password/force-new-password-form-fields/force-new-password-form-fields.component.d.ts +1 -1
  46. package/lib/components/authenticator/components/force-new-password/force-new-password.component.d.ts +1 -1
  47. package/lib/components/authenticator/components/form-field/form-field.component.d.ts +1 -1
  48. package/lib/components/authenticator/components/reset-password/reset-password.component.d.ts +1 -1
  49. package/lib/components/authenticator/components/setup-totp/setup-totp.component.d.ts +1 -1
  50. package/lib/components/authenticator/components/sign-in/sign-in.component.d.ts +1 -1
  51. package/lib/components/authenticator/components/sign-up/sign-up-form-fields/sign-up-form-fields.component.d.ts +1 -1
  52. package/lib/components/authenticator/components/sign-up/sign-up.component.d.ts +1 -1
  53. package/lib/components/authenticator/components/verify-user/verify-user.component.d.ts +1 -1
  54. package/lib/primitives/button/button.component.d.ts +1 -1
  55. package/lib/primitives/checkbox/checkbox.component.d.ts +1 -1
  56. package/lib/primitives/error/error.component.d.ts +1 -1
  57. package/lib/primitives/password-field/password-field.component.d.ts +1 -1
  58. package/lib/primitives/phone-number-field/phone-number-field.component.d.ts +1 -1
  59. package/lib/primitives/select/select.component.d.ts +1 -1
  60. package/lib/primitives/tab-item/tab-item.component.d.ts +1 -1
  61. package/lib/primitives/tabs/tabs.component.d.ts +1 -1
  62. package/lib/primitives/text-field/text-field.component.d.ts +1 -1
  63. package/lib/utilities/amplify-slot/amplify-slot.component.d.ts +1 -1
  64. package/lib/utilities/amplify-slot/amplify-slot.directive.d.ts +1 -1
  65. package/package.json +22 -8
  66. package/version.d.ts +1 -1
  67. package/aws-amplify-ui-angular.d.ts +0 -5
  68. package/bundles/aws-amplify-ui-angular.umd.js +0 -2217
  69. package/bundles/aws-amplify-ui-angular.umd.js.map +0 -1
  70. package/esm2015/lib/components/authenticator/components/authenticator/authenticator.component.js +0 -181
  71. package/esm2015/lib/components/authenticator/components/base-form-fields/base-form-fields.component.js +0 -35
  72. package/esm2015/lib/components/authenticator/components/confirm-reset-password/amplify-confirm-reset-password.component.js +0 -48
  73. package/esm2015/lib/components/authenticator/components/confirm-sign-in/confirm-sign-in.component.js +0 -52
  74. package/esm2015/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.js +0 -52
  75. package/esm2015/lib/components/authenticator/components/confirm-verify-user/amplify-confirm-verify-user.component.js +0 -47
  76. package/esm2015/lib/components/authenticator/components/federated-sign-in/federated-sign-in.component.js +0 -51
  77. package/esm2015/lib/components/authenticator/components/federated-sign-in-button/federated-sign-in-button.component.js +0 -29
  78. package/esm2015/lib/components/authenticator/components/force-new-password/force-new-password-form-fields/force-new-password-form-fields.component.js +0 -15
  79. package/esm2015/lib/components/authenticator/components/force-new-password/force-new-password.component.js +0 -47
  80. package/esm2015/lib/components/authenticator/components/form-field/form-field.component.js +0 -54
  81. package/esm2015/lib/components/authenticator/components/reset-password/reset-password.component.js +0 -47
  82. package/esm2015/lib/components/authenticator/components/setup-totp/setup-totp.component.js +0 -78
  83. package/esm2015/lib/components/authenticator/components/sign-in/sign-in.component.js +0 -45
  84. package/esm2015/lib/components/authenticator/components/sign-up/sign-up-form-fields/sign-up-form-fields.component.js +0 -15
  85. package/esm2015/lib/components/authenticator/components/sign-up/sign-up.component.js +0 -47
  86. package/esm2015/lib/components/authenticator/components/verify-user/verify-user.component.js +0 -60
  87. package/esm2015/lib/primitives/checkbox/checkbox.component.js +0 -40
  88. package/esm2015/lib/primitives/error/error.component.js +0 -24
  89. package/esm2015/lib/primitives/password-field/password-field.component.js +0 -67
  90. package/esm2015/lib/primitives/phone-number-field/phone-number-field.component.js +0 -66
  91. package/esm2015/lib/primitives/select/select.component.js +0 -25
  92. package/esm2015/lib/primitives/tab-item/tab-item.component.js +0 -32
  93. package/esm2015/lib/primitives/text-field/text-field.component.js +0 -53
  94. package/esm2015/lib/services/authenticator.service.js +0 -185
  95. package/esm2015/lib/services/custom-components.service.js +0 -25
  96. package/esm2015/lib/utilities/amplify-slot/amplify-slot.component.js +0 -36
  97. package/fesm2015/aws-amplify-ui-angular.js +0 -1517
  98. package/fesm2015/aws-amplify-ui-angular.js.map +0 -1
  99. /package/{esm2015/aws-amplify-ui-angular.js → esm2020/aws-amplify-ui-angular.mjs} +0 -0
  100. /package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  101. /package/{esm2015/lib/common/helpers.js → esm2020/lib/common/helpers.mjs} +0 -0
  102. /package/{esm2015/lib/common/index.js → esm2020/lib/common/index.mjs} +0 -0
  103. /package/{esm2015/lib/common/types/auth-types.js → esm2020/lib/common/types/auth-types.mjs} +0 -0
  104. /package/{esm2015/lib/common/types/component-types.js → esm2020/lib/common/types/component-types.mjs} +0 -0
  105. /package/{esm2015/lib/common/types/index.js → esm2020/lib/common/types/index.mjs} +0 -0
  106. /package/{esm2015/lib/components/authenticator/components/index.js → esm2020/lib/components/authenticator/components/index.mjs} +0 -0
  107. /package/{esm2015/lib/primitives/index.js → esm2020/lib/primitives/index.mjs} +0 -0
@@ -0,0 +1,1432 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, Input, Injectable, Component, HostBinding, EventEmitter, Output, ViewEncapsulation, ContentChildren, NgModule } from '@angular/core';
3
+ import * as i2 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import { createAuthenticatorMachine, translate, listenToAuthHub, defaultAuthHubHandler, getServiceFacade, ComponentClassName, countryDialCodes, getErrors, getSortedFormFields, authenticatorTextUtil, getFormDataFromEvent, getActorContext, getTotpCodeURL, FederatedIdentityProviders, defaultFormFieldOptions, getActorState, configureComponent } from '@aws-amplify/ui';
6
+ export { translations } from '@aws-amplify/ui';
7
+ import { __awaiter } from 'tslib';
8
+ import { Subject } from 'rxjs';
9
+ import { interpret } from 'xstate';
10
+ import { Auth, Logger as Logger$1 } from 'aws-amplify';
11
+ import { Logger } from '@aws-amplify/core';
12
+ import { nanoid } from 'nanoid';
13
+ import classnames from 'classnames';
14
+ import QRCode from 'qrcode';
15
+
16
+ class AmplifySlotDirective {
17
+ constructor(template) {
18
+ this.template = template;
19
+ }
20
+ set amplifySlot(component) {
21
+ this.name = component;
22
+ }
23
+ }
24
+ AmplifySlotDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifySlotDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
25
+ AmplifySlotDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AmplifySlotDirective, selector: "[amplifySlot]", inputs: { amplifySlot: "amplifySlot" }, ngImport: i0 });
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifySlotDirective, decorators: [{
27
+ type: Directive,
28
+ args: [{
29
+ selector: '[amplifySlot]',
30
+ }]
31
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { amplifySlot: [{
32
+ type: Input
33
+ }] } });
34
+
35
+ /**
36
+ * Stores and provides custom components that users provide with `amplify-slot`.
37
+ */
38
+ class CustomComponentsService {
39
+ constructor() {
40
+ this._customComponents = {};
41
+ }
42
+ get customComponents() {
43
+ return this._customComponents;
44
+ }
45
+ set customComponents(customComponents) {
46
+ this._customComponents = Object.assign(Object.assign({}, this._customComponents), customComponents);
47
+ }
48
+ }
49
+ CustomComponentsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CustomComponentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
50
+ CustomComponentsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CustomComponentsService, providedIn: 'root' });
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CustomComponentsService, decorators: [{
52
+ type: Injectable,
53
+ args: [{
54
+ providedIn: 'root',
55
+ }]
56
+ }] });
57
+
58
+ const VERSION = '4.0.1';
59
+
60
+ const logger$1 = new Logger('state-machine');
61
+ /**
62
+ * AuthenticatorService provides access to the authenticator state and context.
63
+ */
64
+ class AuthenticatorService {
65
+ constructor() {
66
+ this._authStatus = 'configuring';
67
+ const machine = createAuthenticatorMachine();
68
+ this._authService = interpret(machine).start();
69
+ this.setupMachineSubscription();
70
+ this.setupHubListener();
71
+ this.getInitialAuthStatus();
72
+ }
73
+ /**
74
+ * Context facades
75
+ */
76
+ get error() {
77
+ var _a;
78
+ return translate((_a = this._facade) === null || _a === void 0 ? void 0 : _a.error);
79
+ }
80
+ get hasValidationErrors() {
81
+ var _a;
82
+ return (_a = this._facade) === null || _a === void 0 ? void 0 : _a.hasValidationErrors;
83
+ }
84
+ get isPending() {
85
+ var _a;
86
+ return (_a = this._facade) === null || _a === void 0 ? void 0 : _a.isPending;
87
+ }
88
+ get route() {
89
+ var _a;
90
+ return (_a = this._facade) === null || _a === void 0 ? void 0 : _a.route;
91
+ }
92
+ get authStatus() {
93
+ return this._authStatus;
94
+ }
95
+ get user() {
96
+ var _a;
97
+ return (_a = this._facade) === null || _a === void 0 ? void 0 : _a.user;
98
+ }
99
+ get validationErrors() {
100
+ var _a;
101
+ return (_a = this._facade) === null || _a === void 0 ? void 0 : _a.validationErrors;
102
+ }
103
+ get codeDeliveryDetails() {
104
+ var _a;
105
+ return (_a = this._facade) === null || _a === void 0 ? void 0 : _a.codeDeliveryDetails;
106
+ }
107
+ get totpSecretCode() {
108
+ var _a;
109
+ return (_a = this._facade) === null || _a === void 0 ? void 0 : _a.totpSecretCode;
110
+ }
111
+ /**
112
+ * Service facades
113
+ */
114
+ get initializeMachine() {
115
+ return this._facade.initializeMachine;
116
+ }
117
+ get updateForm() {
118
+ return this._facade.updateForm;
119
+ }
120
+ get updateBlur() {
121
+ return this._facade.updateBlur;
122
+ }
123
+ get resendCode() {
124
+ return this._facade.resendCode;
125
+ }
126
+ get signOut() {
127
+ return this._facade.signOut;
128
+ }
129
+ get submitForm() {
130
+ return this._facade.submitForm;
131
+ }
132
+ /**
133
+ * Transition facades
134
+ */
135
+ get toFederatedSignIn() {
136
+ return this._facade.toFederatedSignIn;
137
+ }
138
+ get toResetPassword() {
139
+ return this._facade.toResetPassword;
140
+ }
141
+ get toSignIn() {
142
+ return this._facade.toSignIn;
143
+ }
144
+ get toSignUp() {
145
+ return this._facade.toSignUp;
146
+ }
147
+ get skipVerification() {
148
+ return this._facade.skipVerification;
149
+ }
150
+ /**
151
+ * Internal utility functions
152
+ */
153
+ /** @deprecated For internal use only */
154
+ get authState() {
155
+ return this._authState;
156
+ }
157
+ /** @deprecated For internal use only */
158
+ get authService() {
159
+ return this._authService;
160
+ }
161
+ /** @deprecated For internal use only */
162
+ get context() {
163
+ return this._authState.context;
164
+ }
165
+ /** @deprecated For internal use only */
166
+ get slotContext() {
167
+ return Object.assign(Object.assign({}, this._facade), { $implicit: this._facade });
168
+ }
169
+ /** @deprecated For internal use only */
170
+ get hubSubject() {
171
+ return this._hubSubject;
172
+ }
173
+ subscribe(callback) {
174
+ if (!this._authService) {
175
+ logger$1.error('Subscription attempted before machine was created. This is likely a bug on the library, please consider filing a bug.');
176
+ }
177
+ const subscription = this._authService.subscribe(() => {
178
+ callback(this._facade);
179
+ });
180
+ return subscription;
181
+ }
182
+ ngOnDestroy() {
183
+ if (this._machineSubscription)
184
+ this._machineSubscription.unsubscribe();
185
+ if (this._unsubscribeHub)
186
+ this._unsubscribeHub();
187
+ }
188
+ /** @deprecated For internal use only */
189
+ send(event) {
190
+ this.authService.send(event);
191
+ }
192
+ getInitialAuthStatus() {
193
+ return __awaiter(this, void 0, void 0, function* () {
194
+ try {
195
+ yield Auth.currentAuthenticatedUser();
196
+ this._authStatus = 'authenticated';
197
+ }
198
+ catch (e) {
199
+ this._authStatus = 'unauthenticated';
200
+ }
201
+ });
202
+ }
203
+ setupHubListener() {
204
+ this._hubSubject = new Subject();
205
+ const onSignIn = () => {
206
+ this._authStatus = 'authenticated';
207
+ };
208
+ const onSignOut = () => {
209
+ this._authStatus = 'unauthenticated';
210
+ };
211
+ this._unsubscribeHub = listenToAuthHub(this._authService, (data, service) => __awaiter(this, void 0, void 0, function* () {
212
+ yield defaultAuthHubHandler(data, service, { onSignIn, onSignOut });
213
+ this._hubSubject.next();
214
+ }));
215
+ }
216
+ setupMachineSubscription() {
217
+ this._machineSubscription = this._authService.subscribe((state) => {
218
+ const newState = state;
219
+ this._authState = newState;
220
+ this._facade = getServiceFacade({
221
+ send: this._authService.send,
222
+ state: newState,
223
+ });
224
+ });
225
+ }
226
+ }
227
+ AuthenticatorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthenticatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
228
+ AuthenticatorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthenticatorService, providedIn: 'root' });
229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthenticatorService, decorators: [{
230
+ type: Injectable,
231
+ args: [{
232
+ providedIn: 'root', // ensure we have a singleton service
233
+ }]
234
+ }], ctorParameters: function () { return []; } });
235
+
236
+ class AmplifySlotComponent {
237
+ constructor(propService) {
238
+ this.propService = propService;
239
+ this.display = 'contents';
240
+ this.isOverriden = false;
241
+ }
242
+ ngAfterContentInit() {
243
+ const { customComponents } = this.propService;
244
+ const overridingComponent = customComponents[this.name];
245
+ if (overridingComponent) {
246
+ this.overridingComponent = overridingComponent;
247
+ this.isOverriden = true;
248
+ }
249
+ }
250
+ }
251
+ AmplifySlotComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifySlotComponent, deps: [{ token: CustomComponentsService }], target: i0.ɵɵFactoryTarget.Component });
252
+ AmplifySlotComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: AmplifySlotComponent, selector: "amplify-slot", inputs: { name: "name", context: "context" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0, template: "<!-- \n if slot isn't overwritten, we display the the default coponent, which is the \n children passed onto this component.\n-->\n<ng-content *ngIf=\"!isOverriden\"></ng-content>\n\n<!-- If slot is overwritten, we render that instead. -->\n<ng-container\n *ngIf=\"isOverriden\"\n [ngTemplateOutlet]=\"overridingComponent\"\n [ngTemplateOutletContext]=\"context\"\n></ng-container>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifySlotComponent, decorators: [{
254
+ type: Component,
255
+ args: [{ selector: 'amplify-slot', template: "<!-- \n if slot isn't overwritten, we display the the default coponent, which is the \n children passed onto this component.\n-->\n<ng-content *ngIf=\"!isOverriden\"></ng-content>\n\n<!-- If slot is overwritten, we render that instead. -->\n<ng-container\n *ngIf=\"isOverriden\"\n [ngTemplateOutlet]=\"overridingComponent\"\n [ngTemplateOutletContext]=\"context\"\n></ng-container>\n" }]
256
+ }], ctorParameters: function () { return [{ type: CustomComponentsService }]; }, propDecorators: { name: [{
257
+ type: Input
258
+ }], context: [{
259
+ type: Input
260
+ }], display: [{
261
+ type: HostBinding,
262
+ args: ['style.display']
263
+ }] } });
264
+
265
+ class ButtonComponent {
266
+ constructor() {
267
+ this.type = 'button';
268
+ this.fullWidth = false;
269
+ this.isDisabled = false;
270
+ this.size = 'medium';
271
+ this.variation = 'default';
272
+ this.fontWeight = 'normal';
273
+ }
274
+ get getDisabled() {
275
+ return this.isDisabled ? '' : null;
276
+ }
277
+ get classNames() {
278
+ let className = 'amplify-button';
279
+ if (this.variation) {
280
+ className += ` amplify-button--${this.variation}`;
281
+ }
282
+ if (this.size) {
283
+ className += ` amplify-button--${this.size}`;
284
+ }
285
+ if (this.fullWidth) {
286
+ className += ` amplify-button--fullwidth`;
287
+ }
288
+ if (this.isDisabled) {
289
+ className += ` amplify-button--disabled amplify-button--loading`;
290
+ }
291
+ return className;
292
+ }
293
+ ngOnInit() {
294
+ this.typeAttr = this.type;
295
+ this.fullWidthAttr = this.fullWidth;
296
+ this.sizeAttr = this.size;
297
+ this.variationAttr = this.variation;
298
+ this.fontWeightAttr = this.fontWeight;
299
+ }
300
+ }
301
+ ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
302
+ ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ButtonComponent, selector: "button[amplify-button]", inputs: { type: "type", fullWidth: "fullWidth", isDisabled: "isDisabled", size: "size", variation: "variation", fontWeight: "fontWeight" }, host: { properties: { "type": "this.typeAttr", "attr.data-fullwidth": "this.fullWidthAttr", "attr.data-size": "this.sizeAttr", "attr.data-variation": "this.variationAttr", "style.font-weight": "this.fontWeightAttr", "attr.disabled": "this.getDisabled", "class": "this.classNames" } }, ngImport: i0, template: "<ng-content></ng-content>\n" });
303
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonComponent, decorators: [{
304
+ type: Component,
305
+ args: [{ selector: 'button[amplify-button]', template: "<ng-content></ng-content>\n" }]
306
+ }], propDecorators: { type: [{
307
+ type: Input
308
+ }], fullWidth: [{
309
+ type: Input
310
+ }], isDisabled: [{
311
+ type: Input
312
+ }], size: [{
313
+ type: Input
314
+ }], variation: [{
315
+ type: Input
316
+ }], fontWeight: [{
317
+ type: Input
318
+ }], typeAttr: [{
319
+ type: HostBinding,
320
+ args: ['type']
321
+ }], fullWidthAttr: [{
322
+ type: HostBinding,
323
+ args: ['attr.data-fullwidth']
324
+ }], sizeAttr: [{
325
+ type: HostBinding,
326
+ args: ['attr.data-size']
327
+ }], variationAttr: [{
328
+ type: HostBinding,
329
+ args: ['attr.data-variation']
330
+ }], fontWeightAttr: [{
331
+ type: HostBinding,
332
+ args: ['style.font-weight']
333
+ }], getDisabled: [{
334
+ type: HostBinding,
335
+ args: ['attr.disabled']
336
+ }], classNames: [{
337
+ type: HostBinding,
338
+ args: ['class']
339
+ }] } });
340
+
341
+ class PasswordFieldComponent {
342
+ constructor() {
343
+ this.autocomplete = 'new-password';
344
+ this.disabled = false;
345
+ this.fieldId = `amplify-field-${nanoid(12)}`;
346
+ this.initialValue = '';
347
+ this.label = '';
348
+ this.placeholder = '';
349
+ this.required = true;
350
+ this.labelHidden = false;
351
+ this.setBlur = new EventEmitter();
352
+ this.type = 'password';
353
+ this.showPassword = false;
354
+ this.showPasswordButtonlabel = translate('Show password');
355
+ // re-export utilities so that template html can use them
356
+ this.classnames = classnames;
357
+ this.ComponentClassName = ComponentClassName;
358
+ }
359
+ togglePasswordText() {
360
+ this.showPassword = !this.showPassword;
361
+ this.showPasswordButtonlabel = this.showPassword
362
+ ? translate('Hide password')
363
+ : translate('Show password');
364
+ this.type = this.showPassword ? 'text' : 'password';
365
+ }
366
+ }
367
+ PasswordFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PasswordFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
368
+ PasswordFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PasswordFieldComponent, selector: "amplify-password-field", inputs: { autocomplete: "autocomplete", disabled: "disabled", fieldId: "fieldId", initialValue: "initialValue", label: "label", name: "name", placeholder: "placeholder", required: "required", labelHidden: "labelHidden", hasError: "hasError", describedBy: "describedBy" }, outputs: { setBlur: "setBlur" }, ngImport: i0, template: "<div\n [class]=\"\n classnames(\n ComponentClassName.Flex,\n ComponentClassName.Field,\n ComponentClassName.TextField,\n ComponentClassName.PasswordField\n )\n \"\n>\n <label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"fieldId\"\n >\n {{ label }}\n </label>\n <div\n [class]=\"classnames(ComponentClassName.Flex, ComponentClassName.FieldGroup)\"\n >\n <div [class]=\"ComponentClassName.FieldGroupFieldWrapper\">\n <input\n [class]=\"\n classnames(\n ComponentClassName.Input,\n ComponentClassName.FieldGroupControl,\n ComponentClassName.FieldShowPassword\n )\n \"\n [id]=\"fieldId\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n (blur)=\"setBlur.emit($event)\"\n />\n </div>\n <div [class]=\"ComponentClassName.FieldGroupOuterEnd\">\n <button\n amplify-button\n role=\"switch\"\n (click)=\"togglePasswordText()\"\n [attr.aria-checked]=\"type !== 'password'\"\n [attr.aria-label]=\"showPasswordButtonlabel\"\n [class]=\"\n classnames(\n ComponentClassName.Input,\n ComponentClassName.FieldGroupControl\n )\n \"\n >\n <svg\n *ngIf=\"!showPassword\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n class=\"amplify-icon\"\n >\n <path\n d=\"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z\"\n ></path>\n </svg>\n <svg\n *ngIf=\"showPassword\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n class=\"amplify-icon\"\n >\n <path\n d=\"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z\"\n fill=\"none\"\n ></path>\n <path\n d=\"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z\"\n ></path>\n </svg>\n </button>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }] });
369
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PasswordFieldComponent, decorators: [{
370
+ type: Component,
371
+ args: [{ selector: 'amplify-password-field', template: "<div\n [class]=\"\n classnames(\n ComponentClassName.Flex,\n ComponentClassName.Field,\n ComponentClassName.TextField,\n ComponentClassName.PasswordField\n )\n \"\n>\n <label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"fieldId\"\n >\n {{ label }}\n </label>\n <div\n [class]=\"classnames(ComponentClassName.Flex, ComponentClassName.FieldGroup)\"\n >\n <div [class]=\"ComponentClassName.FieldGroupFieldWrapper\">\n <input\n [class]=\"\n classnames(\n ComponentClassName.Input,\n ComponentClassName.FieldGroupControl,\n ComponentClassName.FieldShowPassword\n )\n \"\n [id]=\"fieldId\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n (blur)=\"setBlur.emit($event)\"\n />\n </div>\n <div [class]=\"ComponentClassName.FieldGroupOuterEnd\">\n <button\n amplify-button\n role=\"switch\"\n (click)=\"togglePasswordText()\"\n [attr.aria-checked]=\"type !== 'password'\"\n [attr.aria-label]=\"showPasswordButtonlabel\"\n [class]=\"\n classnames(\n ComponentClassName.Input,\n ComponentClassName.FieldGroupControl\n )\n \"\n >\n <svg\n *ngIf=\"!showPassword\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n class=\"amplify-icon\"\n >\n <path\n d=\"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z\"\n ></path>\n </svg>\n <svg\n *ngIf=\"showPassword\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n class=\"amplify-icon\"\n >\n <path\n d=\"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z\"\n fill=\"none\"\n ></path>\n <path\n d=\"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z\"\n ></path>\n </svg>\n </button>\n </div>\n </div>\n</div>\n" }]
372
+ }], propDecorators: { autocomplete: [{
373
+ type: Input
374
+ }], disabled: [{
375
+ type: Input
376
+ }], fieldId: [{
377
+ type: Input
378
+ }], initialValue: [{
379
+ type: Input
380
+ }], label: [{
381
+ type: Input
382
+ }], name: [{
383
+ type: Input
384
+ }], placeholder: [{
385
+ type: Input
386
+ }], required: [{
387
+ type: Input
388
+ }], labelHidden: [{
389
+ type: Input
390
+ }], hasError: [{
391
+ type: Input
392
+ }], describedBy: [{
393
+ type: Input
394
+ }], setBlur: [{
395
+ type: Output
396
+ }] } });
397
+
398
+ class SelectComponent {
399
+ }
400
+ SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
401
+ SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SelectComponent, selector: "amplify-form-select", inputs: { items: "items", name: "name", label: "label", id: "id", defaultValue: "defaultValue" }, ngImport: i0, template: "<label class=\"amplify-label amplify-visually-hidden\" [for]=\"id\">{{\n label\n}}</label>\n<div class=\"amplify-select__wrapper\">\n <select\n class=\"amplify-select amplify-field-group__control\"\n autocomplete=\"tel-country-code\"\n [id]=\"id\"\n [name]=\"name\"\n >\n <option\n *ngFor=\"let item of items\"\n [value]=\"item\"\n [selected]=\"item === defaultValue\"\n >\n {{ item }}\n </option>\n </select>\n <div\n class=\"amplify-flex amplify-select__icon-wrapper\"\n style=\"align-items: center; justify-content: center\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon amplify-icon--large\"\n viewBox=\"0 0 24 24\"\n data-size=\"large\"\n fill=\"currentColor\"\n >\n <path d=\"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z\"></path>\n </svg>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
402
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SelectComponent, decorators: [{
403
+ type: Component,
404
+ args: [{ selector: 'amplify-form-select', template: "<label class=\"amplify-label amplify-visually-hidden\" [for]=\"id\">{{\n label\n}}</label>\n<div class=\"amplify-select__wrapper\">\n <select\n class=\"amplify-select amplify-field-group__control\"\n autocomplete=\"tel-country-code\"\n [id]=\"id\"\n [name]=\"name\"\n >\n <option\n *ngFor=\"let item of items\"\n [value]=\"item\"\n [selected]=\"item === defaultValue\"\n >\n {{ item }}\n </option>\n </select>\n <div\n class=\"amplify-flex amplify-select__icon-wrapper\"\n style=\"align-items: center; justify-content: center\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon amplify-icon--large\"\n viewBox=\"0 0 24 24\"\n data-size=\"large\"\n fill=\"currentColor\"\n >\n <path d=\"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z\"></path>\n </svg>\n </div>\n</div>\n" }]
405
+ }], propDecorators: { items: [{
406
+ type: Input
407
+ }], name: [{
408
+ type: Input
409
+ }], label: [{
410
+ type: Input
411
+ }], id: [{
412
+ type: Input
413
+ }], defaultValue: [{
414
+ type: Input
415
+ }] } });
416
+
417
+ class PhoneNumberFieldComponent {
418
+ constructor() {
419
+ this.autocomplete = 'new-password';
420
+ this.disabled = false;
421
+ this.selectFieldId = `amplify-field-${nanoid(12)}`;
422
+ this.textFieldId = `amplify-field-${nanoid(12)}`;
423
+ this.initialValue = '';
424
+ this.label = '';
425
+ this.placeholder = '';
426
+ this.required = true;
427
+ this.labelHidden = false;
428
+ this.display = 'contents';
429
+ }
430
+ ngOnInit() {
431
+ var _a;
432
+ this.countryDialCodesValues = (_a = this.dialCodeList) !== null && _a !== void 0 ? _a : countryDialCodes;
433
+ }
434
+ }
435
+ PhoneNumberFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PhoneNumberFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
436
+ PhoneNumberFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PhoneNumberFieldComponent, selector: "amplify-phone-number-field", inputs: { autocomplete: "autocomplete", disabled: "disabled", defaultCountryCode: "defaultCountryCode", selectFieldId: "selectFieldId", textFieldId: "textFieldId", initialValue: "initialValue", label: "label", name: "name", placeholder: "placeholder", required: "required", type: "type", labelHidden: "labelHidden", dialCodeList: "dialCodeList", hasError: "hasError", describedBy: "describedBy" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0, template: "<label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"textFieldId\"\n>\n {{ label }}\n</label>\n<div\n class=\"amplify-flex amplify-phonenumberfield\"\n amplify-field-group\n style=\"gap: 0px\"\n>\n <div class=\"amplify-field-group__outer-start\">\n <div\n class=\"\n amplify-flex\n amplify-field\n amplify-selectfield\n amplify-countrycodeselect\n amplify-dialcodeselect\n \"\n style=\"flex-direction: column\"\n >\n <amplify-form-select\n name=\"country_code\"\n label=\"Country Code\"\n [id]=\"selectFieldId\"\n [items]=\"countryDialCodesValues\"\n [defaultValue]=\"defaultCountryCode\"\n ></amplify-form-select>\n </div>\n </div>\n\n <input\n class=\"amplify-input\"\n [id]=\"textFieldId\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n />\n</div>\n", dependencies: [{ kind: "component", type: SelectComponent, selector: "amplify-form-select", inputs: ["items", "name", "label", "id", "defaultValue"] }] });
437
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PhoneNumberFieldComponent, decorators: [{
438
+ type: Component,
439
+ args: [{ selector: 'amplify-phone-number-field', template: "<label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"textFieldId\"\n>\n {{ label }}\n</label>\n<div\n class=\"amplify-flex amplify-phonenumberfield\"\n amplify-field-group\n style=\"gap: 0px\"\n>\n <div class=\"amplify-field-group__outer-start\">\n <div\n class=\"\n amplify-flex\n amplify-field\n amplify-selectfield\n amplify-countrycodeselect\n amplify-dialcodeselect\n \"\n style=\"flex-direction: column\"\n >\n <amplify-form-select\n name=\"country_code\"\n label=\"Country Code\"\n [id]=\"selectFieldId\"\n [items]=\"countryDialCodesValues\"\n [defaultValue]=\"defaultCountryCode\"\n ></amplify-form-select>\n </div>\n </div>\n\n <input\n class=\"amplify-input\"\n [id]=\"textFieldId\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n />\n</div>\n" }]
440
+ }], propDecorators: { autocomplete: [{
441
+ type: Input
442
+ }], disabled: [{
443
+ type: Input
444
+ }], defaultCountryCode: [{
445
+ type: Input
446
+ }], selectFieldId: [{
447
+ type: Input
448
+ }], textFieldId: [{
449
+ type: Input
450
+ }], initialValue: [{
451
+ type: Input
452
+ }], label: [{
453
+ type: Input
454
+ }], name: [{
455
+ type: Input
456
+ }], placeholder: [{
457
+ type: Input
458
+ }], required: [{
459
+ type: Input
460
+ }], type: [{
461
+ type: Input
462
+ }], labelHidden: [{
463
+ type: Input
464
+ }], dialCodeList: [{
465
+ type: Input
466
+ }], hasError: [{
467
+ type: Input
468
+ }], describedBy: [{
469
+ type: Input
470
+ }], display: [{
471
+ type: HostBinding,
472
+ args: ['style.display']
473
+ }] } });
474
+
475
+ class TextFieldComponent {
476
+ constructor() {
477
+ this.autocomplete = 'new-password';
478
+ this.disabled = false;
479
+ this.fieldId = `amplify-field-${nanoid(12)}`;
480
+ this.initialValue = '';
481
+ this.label = '';
482
+ this.placeholder = '';
483
+ this.required = true;
484
+ this.labelHidden = false;
485
+ this.display = 'contents';
486
+ }
487
+ }
488
+ TextFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TextFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
489
+ TextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TextFieldComponent, selector: "amplify-text-field", inputs: { autocomplete: "autocomplete", disabled: "disabled", fieldId: "fieldId", initialValue: "initialValue", label: "label", name: "name", placeholder: "placeholder", required: "required", type: "type", labelHidden: "labelHidden", hasError: "hasError", describedBy: "describedBy" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0, template: "<label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"fieldId\"\n>\n {{ label }}\n</label>\n<input\n class=\"amplify-input\"\n [id]=\"fieldId\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n/>\n" });
490
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TextFieldComponent, decorators: [{
491
+ type: Component,
492
+ args: [{ selector: 'amplify-text-field', template: "<label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"fieldId\"\n>\n {{ label }}\n</label>\n<input\n class=\"amplify-input\"\n [id]=\"fieldId\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n/>\n" }]
493
+ }], propDecorators: { autocomplete: [{
494
+ type: Input
495
+ }], disabled: [{
496
+ type: Input
497
+ }], fieldId: [{
498
+ type: Input
499
+ }], initialValue: [{
500
+ type: Input
501
+ }], label: [{
502
+ type: Input
503
+ }], name: [{
504
+ type: Input
505
+ }], placeholder: [{
506
+ type: Input
507
+ }], required: [{
508
+ type: Input
509
+ }], type: [{
510
+ type: Input
511
+ }], labelHidden: [{
512
+ type: Input
513
+ }], hasError: [{
514
+ type: Input
515
+ }], describedBy: [{
516
+ type: Input
517
+ }], display: [{
518
+ type: HostBinding,
519
+ args: ['style.display']
520
+ }] } });
521
+
522
+ class FormFieldComponent {
523
+ constructor(authenticator) {
524
+ this.authenticator = authenticator;
525
+ this.countryDialCodesValue = countryDialCodes;
526
+ this.errorId = nanoid(12);
527
+ }
528
+ get ariaDescribedBy() {
529
+ return this.hasError() ? this.errorId : undefined;
530
+ }
531
+ get errors() {
532
+ const { validationErrors } = this.authenticator;
533
+ return getErrors(validationErrors[this.name]);
534
+ }
535
+ onBlur($event) {
536
+ const { name } = $event.target;
537
+ this.authenticator.updateBlur({ name });
538
+ }
539
+ isPasswordField() {
540
+ return this.formField.type === 'password';
541
+ }
542
+ isPhoneField() {
543
+ return this.formField.type === 'tel';
544
+ }
545
+ hasError() {
546
+ var _a;
547
+ return ((_a = this.errors) === null || _a === void 0 ? void 0 : _a.length) > 0;
548
+ }
549
+ translate(phrase) {
550
+ return translate(phrase);
551
+ }
552
+ }
553
+ FormFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormFieldComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
554
+ FormFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FormFieldComponent, selector: "amplify-form-field", inputs: { name: "name", formField: "formField" }, ngImport: i0, template: "<div class=\"amplify-flex amplify-field amplify-authenticator__column\">\n <!-- Country code field -->\n <amplify-phone-number-field\n *ngIf=\"isPhoneField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [defaultCountryCode]=\"formField.dialCode\"\n [dialCodeList]=\"formField.dialCodeList\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n type=\"tel\"\n ></amplify-phone-number-field>\n\n <amplify-password-field\n *ngIf=\"isPasswordField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n (setBlur)=\"onBlur($event)\"\n ></amplify-password-field>\n\n <amplify-text-field\n *ngIf=\"!isPasswordField() && !isPhoneField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [type]=\"formField.type\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n ></amplify-text-field>\n\n <div data-amplify-sign-up-errors *ngIf=\"hasError()\" [id]=\"errorId\">\n <div\n class=\"amplify-text amplify-text--error\"\n data-variation=\"error\"\n *ngFor=\"let error of errors\"\n >\n {{ translate(error) }}\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PasswordFieldComponent, selector: "amplify-password-field", inputs: ["autocomplete", "disabled", "fieldId", "initialValue", "label", "name", "placeholder", "required", "labelHidden", "hasError", "describedBy"], outputs: ["setBlur"] }, { kind: "component", type: PhoneNumberFieldComponent, selector: "amplify-phone-number-field", inputs: ["autocomplete", "disabled", "defaultCountryCode", "selectFieldId", "textFieldId", "initialValue", "label", "name", "placeholder", "required", "type", "labelHidden", "dialCodeList", "hasError", "describedBy"] }, { kind: "component", type: TextFieldComponent, selector: "amplify-text-field", inputs: ["autocomplete", "disabled", "fieldId", "initialValue", "label", "name", "placeholder", "required", "type", "labelHidden", "hasError", "describedBy"] }] });
555
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormFieldComponent, decorators: [{
556
+ type: Component,
557
+ args: [{ selector: 'amplify-form-field', template: "<div class=\"amplify-flex amplify-field amplify-authenticator__column\">\n <!-- Country code field -->\n <amplify-phone-number-field\n *ngIf=\"isPhoneField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [defaultCountryCode]=\"formField.dialCode\"\n [dialCodeList]=\"formField.dialCodeList\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n type=\"tel\"\n ></amplify-phone-number-field>\n\n <amplify-password-field\n *ngIf=\"isPasswordField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n (setBlur)=\"onBlur($event)\"\n ></amplify-password-field>\n\n <amplify-text-field\n *ngIf=\"!isPasswordField() && !isPhoneField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [type]=\"formField.type\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n ></amplify-text-field>\n\n <div data-amplify-sign-up-errors *ngIf=\"hasError()\" [id]=\"errorId\">\n <div\n class=\"amplify-text amplify-text--error\"\n data-variation=\"error\"\n *ngFor=\"let error of errors\"\n >\n {{ translate(error) }}\n </div>\n </div>\n</div>\n" }]
558
+ }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { name: [{
559
+ type: Input
560
+ }], formField: [{
561
+ type: Input
562
+ }] } });
563
+
564
+ /**
565
+ * Sorts the given formFields, then renders them in order.
566
+ */
567
+ class BaseFormFieldsComponent {
568
+ constructor(authenticator) {
569
+ this.authenticator = authenticator;
570
+ this.display = 'contents';
571
+ this.formFields = [];
572
+ }
573
+ ngOnInit() {
574
+ const state = this.authenticator.authState;
575
+ this.formFields = getSortedFormFields(this.route, state);
576
+ }
577
+ }
578
+ BaseFormFieldsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseFormFieldsComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
579
+ BaseFormFieldsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: { route: "route" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0, template: "<ng-container *ngFor=\"let formField of formFields\">\n <amplify-form-field\n [name]=\"formField[0]\"\n [formField]=\"formField[1]\"\n ></amplify-form-field>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: FormFieldComponent, selector: "amplify-form-field", inputs: ["name", "formField"] }] });
580
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseFormFieldsComponent, decorators: [{
581
+ type: Component,
582
+ args: [{ selector: 'amplify-base-form-fields', template: "<ng-container *ngFor=\"let formField of formFields\">\n <amplify-form-field\n [name]=\"formField[0]\"\n [formField]=\"formField[1]\"\n ></amplify-form-field>\n</ng-container>\n" }]
583
+ }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { route: [{
584
+ type: Input
585
+ }], display: [{
586
+ type: HostBinding,
587
+ args: ['style.display']
588
+ }] } });
589
+
590
+ class ErrorComponent {
591
+ constructor() {
592
+ this.isVisible = true;
593
+ this.dismissAriaLabel = translate('Dismiss alert');
594
+ }
595
+ close() {
596
+ this.isVisible = false;
597
+ }
598
+ }
599
+ ErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
600
+ ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ErrorComponent, selector: "amplify-error", ngImport: i0, template: "<div\n class=\"amplify-flex amplify-alert amplify-alert--error\"\n data-variation=\"error\"\n style=\"align-items: center; justify-content: space-between\"\n *ngIf=\"isVisible\"\n role=\"alert\"\n>\n <div class=\"amplify-flex\" style=\"align-items: center\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon\"\n [attr.aria-hidden]=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <path\n d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z\"\n ></path>\n </svg>\n <div><ng-content></ng-content></div>\n </div>\n <button\n amplify-button\n [attr.aria-label]=\"dismissAriaLabel\"\n variation=\"link\"\n [fullWidth]=\"false\"\n (click)=\"close()\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon\"\n [attr.aria-hidden]=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n ></path>\n </svg>\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }] });
601
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorComponent, decorators: [{
602
+ type: Component,
603
+ args: [{ selector: 'amplify-error', template: "<div\n class=\"amplify-flex amplify-alert amplify-alert--error\"\n data-variation=\"error\"\n style=\"align-items: center; justify-content: space-between\"\n *ngIf=\"isVisible\"\n role=\"alert\"\n>\n <div class=\"amplify-flex\" style=\"align-items: center\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon\"\n [attr.aria-hidden]=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <path\n d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z\"\n ></path>\n </svg>\n <div><ng-content></ng-content></div>\n </div>\n <button\n amplify-button\n [attr.aria-label]=\"dismissAriaLabel\"\n variation=\"link\"\n [fullWidth]=\"false\"\n (click)=\"close()\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon\"\n [attr.aria-hidden]=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n ></path>\n </svg>\n </button>\n</div>\n" }]
604
+ }] });
605
+
606
+ const { getBackToSignInText: getBackToSignInText$4, getResendCodeText: getResendCodeText$1, getSubmitText: getSubmitText$1, getResetYourPasswordText: getResetYourPasswordText$1, } = authenticatorTextUtil;
607
+ class ConfirmResetPasswordComponent {
608
+ constructor(authenticator) {
609
+ this.authenticator = authenticator;
610
+ this.dataAttr = '';
611
+ this.headerText = getResetYourPasswordText$1();
612
+ // translated strings
613
+ this.backToSignInText = getBackToSignInText$4();
614
+ this.resendCodeText = getResendCodeText$1();
615
+ this.submitText = getSubmitText$1();
616
+ }
617
+ get context() {
618
+ return this.authenticator.slotContext;
619
+ }
620
+ onInput(event) {
621
+ event.preventDefault();
622
+ const { name, value } = event.target;
623
+ this.authenticator.updateForm({ name, value });
624
+ }
625
+ onSubmit(event) {
626
+ event.preventDefault();
627
+ this.authenticator.submitForm(getFormDataFromEvent(event));
628
+ }
629
+ }
630
+ ConfirmResetPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmResetPasswordComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
631
+ ConfirmResetPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConfirmResetPasswordComponent, selector: "amplify-confirm-reset-password", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-confirmsignin": "this.dataAttr" } }, ngImport: i0, template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"confirm-reset-password-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ headerText }}</h3>\n </amplify-slot>\n\n <amplify-base-form-fields\n route=\"confirmResetPassword\"\n ></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ submitText }}\n </button>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n type=\"button\"\n (click)=\"authenticator.resendCode()\"\n >\n {{ resendCodeText }}\n </button>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"confirm-reset-password-footer\" [context]=\"context\">\n </amplify-slot>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
632
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmResetPasswordComponent, decorators: [{
633
+ type: Component,
634
+ args: [{ selector: 'amplify-confirm-reset-password', template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"confirm-reset-password-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ headerText }}</h3>\n </amplify-slot>\n\n <amplify-base-form-fields\n route=\"confirmResetPassword\"\n ></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ submitText }}\n </button>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n type=\"button\"\n (click)=\"authenticator.resendCode()\"\n >\n {{ resendCodeText }}\n </button>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"confirm-reset-password-footer\" [context]=\"context\">\n </amplify-slot>\n</form>\n" }]
635
+ }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
636
+ type: HostBinding,
637
+ args: ['attr.data-amplify-authenticator-confirmsignin']
638
+ }], headerText: [{
639
+ type: Input
640
+ }] } });
641
+
642
+ const { getConfirmText: getConfirmText$2, getBackToSignInText: getBackToSignInText$3, getChallengeText } = authenticatorTextUtil;
643
+ class ConfirmSignInComponent {
644
+ constructor(authenticator) {
645
+ this.authenticator = authenticator;
646
+ this.dataAttr = '';
647
+ this.confirmText = getConfirmText$2();
648
+ this.backToSignInText = getBackToSignInText$3();
649
+ }
650
+ get context() {
651
+ return this.authenticator.slotContext;
652
+ }
653
+ ngOnInit() {
654
+ this.setHeaderText();
655
+ }
656
+ setHeaderText() {
657
+ const state = this.authenticator.authState;
658
+ const actorContext = getActorContext(state);
659
+ const { challengeName } = actorContext;
660
+ this.headerText = getChallengeText(challengeName);
661
+ }
662
+ onInput(event) {
663
+ event.preventDefault();
664
+ const { name, value } = event.target;
665
+ this.authenticator.updateForm({ name, value });
666
+ }
667
+ onSubmit(event) {
668
+ event.preventDefault();
669
+ this.authenticator.submitForm(getFormDataFromEvent(event));
670
+ }
671
+ }
672
+ ConfirmSignInComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmSignInComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
673
+ ConfirmSignInComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConfirmSignInComponent, selector: "amplify-confirm-sign-in", host: { properties: { "attr.data-amplify-authenticator-confirmsignin": "this.dataAttr" } }, ngImport: i0, template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"confirm-sign-in-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ headerText }}</h3>\n </amplify-slot>\n <amplify-base-form-fields route=\"confirmSignIn\"></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ confirmText }}\n </button>\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.toSignIn()\"\n >\n {{ backToSignInText }}\n </button>\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot\n name=\"confirm-sign-in-footer\"\n [context]=\"context\"\n ></amplify-slot>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
674
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmSignInComponent, decorators: [{
675
+ type: Component,
676
+ args: [{ selector: 'amplify-confirm-sign-in', template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"confirm-sign-in-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ headerText }}</h3>\n </amplify-slot>\n <amplify-base-form-fields route=\"confirmSignIn\"></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ confirmText }}\n </button>\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.toSignIn()\"\n >\n {{ backToSignInText }}\n </button>\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot\n name=\"confirm-sign-in-footer\"\n [context]=\"context\"\n ></amplify-slot>\n</form>\n" }]
677
+ }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
678
+ type: HostBinding,
679
+ args: ['attr.data-amplify-authenticator-confirmsignin']
680
+ }] } });
681
+
682
+ const { getResendCodeText, getConfirmText: getConfirmText$1, getDeliveryMethodText, getDeliveryMessageText, } = authenticatorTextUtil;
683
+ class ConfirmSignUpComponent {
684
+ constructor(authenticator) {
685
+ this.authenticator = authenticator;
686
+ this.dataAttr = '';
687
+ // translated texts
688
+ this.resendCodeText = getResendCodeText();
689
+ this.confirmText = getConfirmText$1();
690
+ }
691
+ get context() {
692
+ return this.authenticator.slotContext;
693
+ }
694
+ get confirmSignUpHeading() {
695
+ const { codeDeliveryDetails } = this.authenticator;
696
+ return getDeliveryMethodText(codeDeliveryDetails);
697
+ }
698
+ get subtitleText() {
699
+ const { codeDeliveryDetails } = this.authenticator;
700
+ return getDeliveryMessageText(codeDeliveryDetails);
701
+ }
702
+ onInput(event) {
703
+ event.preventDefault();
704
+ const { name, value } = event.target;
705
+ this.authenticator.updateForm({ name, value });
706
+ }
707
+ onSubmit(event) {
708
+ event.preventDefault();
709
+ this.authenticator.submitForm(getFormDataFromEvent(event));
710
+ }
711
+ }
712
+ ConfirmSignUpComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmSignUpComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
713
+ ConfirmSignUpComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConfirmSignUpComponent, selector: "amplify-confirm-sign-up", host: { properties: { "attr.data-amplify-authenticator-confirmsignup": "this.dataAttr" } }, ngImport: i0, template: "<ng-container>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"context.isPending\"\n >\n <amplify-slot name=\"confirm-sign-up-header\" [context]=\"context\">\n <h3\n class=\"amplify-heading amplify-authenticator__heading\"\n style=\"font-size: 1.5rem\"\n >\n {{ confirmSignUpHeading }}\n </h3>\n </amplify-slot>\n <span class=\"amplify-authenticator__subtitle\">\n {{ subtitleText }}\n </span>\n <amplify-base-form-fields\n route=\"confirmSignUp\"\n ></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ confirmText }}\n </button>\n <button\n amplify-button\n fontWeight=\"normal\"\n (click)=\"authenticator.resendCode()\"\n >\n {{ resendCodeText }}\n </button>\n </fieldset>\n\n <amplify-error *ngIf=\"context.error\">\n {{ authenticator.error }}\n </amplify-error>\n <amplify-slot\n name=\"confirm-sign-up-footer\"\n [context]=\"context\"\n ></amplify-slot>\n </form>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
714
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmSignUpComponent, decorators: [{
715
+ type: Component,
716
+ args: [{ selector: 'amplify-confirm-sign-up', template: "<ng-container>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"context.isPending\"\n >\n <amplify-slot name=\"confirm-sign-up-header\" [context]=\"context\">\n <h3\n class=\"amplify-heading amplify-authenticator__heading\"\n style=\"font-size: 1.5rem\"\n >\n {{ confirmSignUpHeading }}\n </h3>\n </amplify-slot>\n <span class=\"amplify-authenticator__subtitle\">\n {{ subtitleText }}\n </span>\n <amplify-base-form-fields\n route=\"confirmSignUp\"\n ></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ confirmText }}\n </button>\n <button\n amplify-button\n fontWeight=\"normal\"\n (click)=\"authenticator.resendCode()\"\n >\n {{ resendCodeText }}\n </button>\n </fieldset>\n\n <amplify-error *ngIf=\"context.error\">\n {{ authenticator.error }}\n </amplify-error>\n <amplify-slot\n name=\"confirm-sign-up-footer\"\n [context]=\"context\"\n ></amplify-slot>\n </form>\n</ng-container>\n" }]
717
+ }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
718
+ type: HostBinding,
719
+ args: ['attr.data-amplify-authenticator-confirmsignup']
720
+ }] } });
721
+
722
+ const { getAccountRecoveryInfoText: getAccountRecoveryInfoText$1, getSkipText: getSkipText$1, getSubmitText } = authenticatorTextUtil;
723
+ class ConfirmVerifyUserComponent {
724
+ constructor(authenticator) {
725
+ this.authenticator = authenticator;
726
+ this.dataAttr = '';
727
+ this.headerText = getAccountRecoveryInfoText$1();
728
+ // translated texts
729
+ this.skipText = getSkipText$1();
730
+ this.submitText = getSubmitText();
731
+ }
732
+ get context() {
733
+ return this.authenticator.slotContext;
734
+ }
735
+ onInput(event) {
736
+ event.preventDefault();
737
+ const { name, value } = event.target;
738
+ this.authenticator.updateForm({ name, value });
739
+ }
740
+ onSubmit(event) {
741
+ event.preventDefault();
742
+ this.authenticator.submitForm(getFormDataFromEvent(event));
743
+ }
744
+ }
745
+ ConfirmVerifyUserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmVerifyUserComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
746
+ ConfirmVerifyUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConfirmVerifyUserComponent, selector: "amplify-confirm-verify-user", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-confirmverifyuser": "this.dataAttr" } }, ngImport: i0, template: "<form data-amplify-form (input)=\"onInput($event)\" (submit)=\"onSubmit($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"confirm-verify-user-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n <amplify-base-form-fields\n route=\"confirmVerifyUser\"\n ></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ submitText }}\n </button>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.skipVerification()\"\n >\n {{ skipText }}\n </button>\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"confirm-verify-user-footer\" [context]=\"context\">\n </amplify-slot>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
747
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmVerifyUserComponent, decorators: [{
748
+ type: Component,
749
+ args: [{ selector: 'amplify-confirm-verify-user', template: "<form data-amplify-form (input)=\"onInput($event)\" (submit)=\"onSubmit($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"confirm-verify-user-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n <amplify-base-form-fields\n route=\"confirmVerifyUser\"\n ></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ submitText }}\n </button>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.skipVerification()\"\n >\n {{ skipText }}\n </button>\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"confirm-verify-user-footer\" [context]=\"context\">\n </amplify-slot>\n</form>\n" }]
750
+ }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
751
+ type: HostBinding,
752
+ args: ['attr.data-amplify-authenticator-confirmverifyuser']
753
+ }], headerText: [{
754
+ type: Input
755
+ }] } });
756
+
757
+ class ForceNewPasswordFormFieldsComponent {
758
+ }
759
+ ForceNewPasswordFormFieldsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ForceNewPasswordFormFieldsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
760
+ ForceNewPasswordFormFieldsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ForceNewPasswordFormFieldsComponent, selector: "amplify-force-new-password-form-fields", ngImport: i0, template: "<div class=\"amplify-flex amplify-authenticator__column\" data-amplify-fieldset>\n <amplify-base-form-fields route=\"forceNewPassword\"></amplify-base-form-fields>\n</div>\n", dependencies: [{ kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }] });
761
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ForceNewPasswordFormFieldsComponent, decorators: [{
762
+ type: Component,
763
+ args: [{ selector: 'amplify-force-new-password-form-fields', template: "<div class=\"amplify-flex amplify-authenticator__column\" data-amplify-fieldset>\n <amplify-base-form-fields route=\"forceNewPassword\"></amplify-base-form-fields>\n</div>\n" }]
764
+ }] });
765
+
766
+ const { getChangePasswordText, getBackToSignInText: getBackToSignInText$2 } = authenticatorTextUtil;
767
+ class ForceNewPasswordComponent {
768
+ constructor(authenticator) {
769
+ this.authenticator = authenticator;
770
+ this.dataAttr = '';
771
+ this.headerText = getChangePasswordText();
772
+ // translated texts
773
+ this.changePasswordText = getChangePasswordText();
774
+ this.backToSignInText = getBackToSignInText$2();
775
+ }
776
+ get context() {
777
+ return this.authenticator.slotContext;
778
+ }
779
+ onInput(event) {
780
+ event.preventDefault();
781
+ const { name, value } = event.target;
782
+ this.authenticator.updateForm({ name, value });
783
+ }
784
+ onSubmit(event) {
785
+ event.preventDefault();
786
+ this.authenticator.submitForm(getFormDataFromEvent(event));
787
+ }
788
+ }
789
+ ForceNewPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ForceNewPasswordComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
790
+ ForceNewPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ForceNewPasswordComponent, selector: "amplify-force-new-password", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-forcenewpassword": "this.dataAttr" } }, ngImport: i0, template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"force-new-password-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n\n <amplify-slot name=\"force-new-form-fields\" [context]=\"context\">\n <amplify-force-new-password-form-fields></amplify-force-new-password-form-fields>\n </amplify-slot>\n\n <button amplify-button variation=\"primary\" fullWidth=\"true\" type=\"submit\">\n {{ changePasswordText }}\n </button>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.toSignIn()\"\n >\n {{ backToSignInText }}\n </button>\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"force-new-password-footer\" [context]=\"context\">\n </amplify-slot>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }, { kind: "component", type: ForceNewPasswordFormFieldsComponent, selector: "amplify-force-new-password-form-fields" }] });
791
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ForceNewPasswordComponent, decorators: [{
792
+ type: Component,
793
+ args: [{ selector: 'amplify-force-new-password', template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"force-new-password-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n\n <amplify-slot name=\"force-new-form-fields\" [context]=\"context\">\n <amplify-force-new-password-form-fields></amplify-force-new-password-form-fields>\n </amplify-slot>\n\n <button amplify-button variation=\"primary\" fullWidth=\"true\" type=\"submit\">\n {{ changePasswordText }}\n </button>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.toSignIn()\"\n >\n {{ backToSignInText }}\n </button>\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"force-new-password-footer\" [context]=\"context\">\n </amplify-slot>\n</form>\n" }]
794
+ }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
795
+ type: HostBinding,
796
+ args: ['attr.data-amplify-authenticator-forcenewpassword']
797
+ }], headerText: [{
798
+ type: Input
799
+ }] } });
800
+
801
+ const { getResetYourPasswordText, getSendCodeText, getBackToSignInText: getBackToSignInText$1 } = authenticatorTextUtil;
802
+ class ResetPasswordComponent {
803
+ constructor(authenticator) {
804
+ this.authenticator = authenticator;
805
+ this.dataAttr = '';
806
+ this.headerText = getResetYourPasswordText();
807
+ // translated texts
808
+ this.sendCodeText = getSendCodeText();
809
+ this.backToSignInText = getBackToSignInText$1();
810
+ }
811
+ get context() {
812
+ return this.authenticator.slotContext;
813
+ }
814
+ onInput(event) {
815
+ event.preventDefault();
816
+ const { name, value } = event.target;
817
+ this.authenticator.updateForm({ name, value });
818
+ }
819
+ onSubmit(event) {
820
+ event.preventDefault();
821
+ this.authenticator.submitForm(getFormDataFromEvent(event));
822
+ }
823
+ }
824
+ ResetPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ResetPasswordComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
825
+ ResetPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ResetPasswordComponent, selector: "amplify-reset-password", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-resetPassword": "this.dataAttr" } }, ngImport: i0, template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot\n class=\"amplify-flex\"\n name=\"reset-password-header\"\n [context]=\"context\"\n >\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n\n <amplify-base-form-fields route=\"resetPassword\"></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ sendCodeText }}\n </button>\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.toSignIn()\"\n >\n {{ backToSignInText }}\n </button>\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n\n <amplify-slot name=\"reset-password-footer\" [context]=\"context\">\n </amplify-slot>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
826
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ResetPasswordComponent, decorators: [{
827
+ type: Component,
828
+ args: [{ selector: 'amplify-reset-password', template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot\n class=\"amplify-flex\"\n name=\"reset-password-header\"\n [context]=\"context\"\n >\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n\n <amplify-base-form-fields route=\"resetPassword\"></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ sendCodeText }}\n </button>\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.toSignIn()\"\n >\n {{ backToSignInText }}\n </button>\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n\n <amplify-slot name=\"reset-password-footer\" [context]=\"context\">\n </amplify-slot>\n</form>\n" }]
829
+ }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
830
+ type: HostBinding,
831
+ args: ['attr.data-amplify-authenticator-resetPassword']
832
+ }], headerText: [{
833
+ type: Input
834
+ }] } });
835
+
836
+ const logger = new Logger$1('SetupTotp');
837
+ const { getSetupTOTPText, getCopyText, getBackToSignInText, getConfirmText, getCopiedText, } = authenticatorTextUtil;
838
+ class SetupTotpComponent {
839
+ constructor(authenticator) {
840
+ this.authenticator = authenticator;
841
+ this.dataAttr = '';
842
+ this.headerText = getSetupTOTPText();
843
+ this.qrCodeSource = '';
844
+ this.totpSecretCode = '';
845
+ this.copyTextLabel = getCopyText();
846
+ // translated texts
847
+ this.backToSignInText = getBackToSignInText();
848
+ this.confirmText = getConfirmText();
849
+ }
850
+ get context() {
851
+ return this.authenticator.slotContext;
852
+ }
853
+ ngOnInit() {
854
+ return __awaiter(this, void 0, void 0, function* () {
855
+ yield this.generateQRCode();
856
+ });
857
+ }
858
+ generateQRCode() {
859
+ var _a, _b;
860
+ return __awaiter(this, void 0, void 0, function* () {
861
+ const { authState: state, totpSecretCode, user } = this.authenticator;
862
+ const { formFields } = getActorContext(state);
863
+ const { totpIssuer = 'AWSCognito', totpUsername = user === null || user === void 0 ? void 0 : user.username } = (_b = (_a = formFields === null || formFields === void 0 ? void 0 : formFields.setupTOTP) === null || _a === void 0 ? void 0 : _a.QR) !== null && _b !== void 0 ? _b : {};
864
+ this.totpSecretCode = totpSecretCode;
865
+ try {
866
+ const totpCode = getTotpCodeURL(totpIssuer, totpUsername, this.totpSecretCode);
867
+ logger.info('totp code was generated:', totpCode);
868
+ this.qrCodeSource = yield QRCode.toDataURL(totpCode);
869
+ }
870
+ catch (err) {
871
+ logger.error(err);
872
+ }
873
+ });
874
+ }
875
+ onInput(event) {
876
+ event.preventDefault();
877
+ const { name, value } = event.target;
878
+ this.authenticator.updateForm({ name, value });
879
+ }
880
+ onSubmit(event) {
881
+ event.preventDefault();
882
+ this.authenticator.submitForm(getFormDataFromEvent(event));
883
+ }
884
+ copyText() {
885
+ navigator.clipboard.writeText(this.totpSecretCode);
886
+ this.copyTextLabel = getCopiedText();
887
+ }
888
+ }
889
+ SetupTotpComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SetupTotpComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
890
+ SetupTotpComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SetupTotpComponent, selector: "amplify-setup-totp", host: { properties: { "attr.data-amplify-authenticator-setup-totp": "this.dataAttr" } }, ngImport: i0, template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"setup-totp-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n <p *ngIf=\"!qrCodeSource\">Loading...</p>\n <img\n *ngIf=\"qrCodeSource\"\n [src]=\"qrCodeSource\"\n alt=\"qr code\"\n data-amplify-qrcode\n width=\"228\"\n height=\"228\"\n />\n <div class=\"amplify-flex\" data-amplify-copy>\n <div>{{ totpSecretCode }}</div>\n <div data-amplify-copy-svg (click)=\"copyText()\">\n <div data-amplify-copy-tooltip>{{ copyTextLabel }}</div>\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5H8C6.9 5 6.01 5.9 6.01 7L6 21C6 22.1 6.89 23 7.99 23H19C20.1 23 21 22.1 21 21V11L15 5ZM8 21V7H14V12H19V21H8Z\"\n />\n </svg>\n </div>\n </div>\n\n <amplify-base-form-fields route=\"setupTOTP\"></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ confirmText }}\n </button>\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.toSignIn()\"\n >\n {{ backToSignInText }}\n </button>\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"setup-totp-footer\" [context]=\"context\"> </amplify-slot>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
891
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SetupTotpComponent, decorators: [{
892
+ type: Component,
893
+ args: [{ selector: 'amplify-setup-totp', template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"setup-totp-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n <p *ngIf=\"!qrCodeSource\">Loading...</p>\n <img\n *ngIf=\"qrCodeSource\"\n [src]=\"qrCodeSource\"\n alt=\"qr code\"\n data-amplify-qrcode\n width=\"228\"\n height=\"228\"\n />\n <div class=\"amplify-flex\" data-amplify-copy>\n <div>{{ totpSecretCode }}</div>\n <div data-amplify-copy-svg (click)=\"copyText()\">\n <div data-amplify-copy-tooltip>{{ copyTextLabel }}</div>\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5H8C6.9 5 6.01 5.9 6.01 7L6 21C6 22.1 6.89 23 7.99 23H19C20.1 23 21 22.1 21 21V11L15 5ZM8 21V7H14V12H19V21H8Z\"\n />\n </svg>\n </div>\n </div>\n\n <amplify-base-form-fields route=\"setupTOTP\"></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ confirmText }}\n </button>\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.toSignIn()\"\n >\n {{ backToSignInText }}\n </button>\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"setup-totp-footer\" [context]=\"context\"> </amplify-slot>\n</form>\n" }]
894
+ }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
895
+ type: HostBinding,
896
+ args: ['attr.data-amplify-authenticator-setup-totp']
897
+ }] } });
898
+
899
+ class FederatedSignInButtonComponent {
900
+ constructor(authenticator) {
901
+ this.authenticator = authenticator;
902
+ this.onClick = () => {
903
+ this.authenticator.send({
904
+ type: 'FEDERATED_SIGN_IN',
905
+ data: { provider: this.provider },
906
+ });
907
+ };
908
+ }
909
+ }
910
+ FederatedSignInButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FederatedSignInButtonComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
911
+ FederatedSignInButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FederatedSignInButtonComponent, selector: "amplify-federated-sign-in-button", inputs: { provider: "provider", text: "text" }, ngImport: i0, template: "<button\n amplify-button\n class=\"amplify-field-group__control federated-sign-in-button\"\n fullWidth=\"true\"\n fontWeight=\"normal\"\n (click)=\"onClick()\"\n>\n <div class=\"amplify-flex federated-sign-in-button-row\">\n <ng-content></ng-content>\n </div>\n</button>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }] });
912
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FederatedSignInButtonComponent, decorators: [{
913
+ type: Component,
914
+ args: [{ selector: 'amplify-federated-sign-in-button', template: "<button\n amplify-button\n class=\"amplify-field-group__control federated-sign-in-button\"\n fullWidth=\"true\"\n fontWeight=\"normal\"\n (click)=\"onClick()\"\n>\n <div class=\"amplify-flex federated-sign-in-button-row\">\n <ng-content></ng-content>\n </div>\n</button>\n" }]
915
+ }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { provider: [{
916
+ type: Input
917
+ }], text: [{
918
+ type: Input
919
+ }] } });
920
+
921
+ const { getSignInWithFederationText, getOrText } = authenticatorTextUtil;
922
+ class FederatedSignInComponent {
923
+ constructor(authenticator) {
924
+ this.authenticator = authenticator;
925
+ this.FederatedProviders = FederatedIdentityProviders;
926
+ this.includeAmazon = false;
927
+ this.includeApple = false;
928
+ this.includeFacebook = false;
929
+ this.includeGoogle = false;
930
+ this.shouldShowFederatedSignIn = false;
931
+ }
932
+ ngOnInit() {
933
+ var _a, _b;
934
+ const socialProviders = (_b = (_a = this.authenticator.context) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.socialProviders;
935
+ this.setFederatedTexts();
936
+ this.includeAmazon = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('amazon');
937
+ this.includeApple = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('apple');
938
+ this.includeGoogle = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('google');
939
+ this.includeFacebook = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('facebook');
940
+ this.shouldShowFederatedSignIn =
941
+ this.includeAmazon ||
942
+ this.includeApple ||
943
+ this.includeFacebook ||
944
+ this.includeGoogle;
945
+ }
946
+ setFederatedTexts() {
947
+ const { route } = this.authenticator;
948
+ this.orText = getOrText();
949
+ this.signInAmazonText = getSignInWithFederationText(route, 'amazon');
950
+ this.signInAppleText = getSignInWithFederationText(route, 'apple');
951
+ this.signInFacebookText = getSignInWithFederationText(route, 'facebook');
952
+ this.signInGoogleText = getSignInWithFederationText(route, 'google');
953
+ }
954
+ }
955
+ FederatedSignInComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FederatedSignInComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
956
+ FederatedSignInComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FederatedSignInComponent, selector: "amplify-federated-sign-in", ngImport: i0, template: "<div\n class=\"amplify-flex federated-sign-in-container\"\n *ngIf=\"shouldShowFederatedSignIn\"\n data-orientation=\"horizontal\"\n data-size=\"small\"\n>\n <amplify-federated-sign-in-button\n *ngIf=\"includeAmazon\"\n [text]=\"signInAmazonText\"\n [provider]=\"FederatedProviders.Amazon\"\n >\n <svg\n aria-label=\"Amazon icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n viewBox=\"0 0 248 268\"\n >\n <path\n d=\"M139.056521,147.024612 C133.548808,156.744524 124.782731,162.726926 115.087401,162.726926 C101.790721,162.726926 93.9937779,152.612964 93.9937779,137.68681 C93.9937779,108.224571 120.447551,102.879017 145.533369,102.879017 L145.533369,110.365976 C145.533369,123.831358 145.876354,135.063787 139.056521,147.024612 M207.206992,162.579655 C209.400505,165.692256 209.887066,169.437725 207.063416,171.770186 C199.996315,177.653081 187.429476,188.590967 180.513926,194.716661 L180.46208,194.621133 C178.176838,196.663031 174.862638,196.810303 172.27828,195.445057 C160.780281,185.9162 158.686473,181.494078 152.405048,172.403055 C133.405233,191.751331 119.909143,197.534719 95.309886,197.534719 C66.1281801,197.534719 43.4791563,179.599451 43.4791563,143.669212 C43.4791563,115.616003 58.6782107,96.5105248 80.4019706,87.1727225 C99.2063636,78.9096034 125.464714,77.4528107 145.533369,75.1641337 L145.533369,70.694248 C145.533369,62.4749122 146.167493,52.7510201 141.297893,45.6541312 C137.110277,39.2856386 129.018206,36.6586354 121.859376,36.6586354 C108.658413,36.6586354 96.9171331,43.4171982 94.0416364,57.4199213 C93.4593582,60.532522 91.1701278,63.5933787 88.003492,63.7406501 L54.4387473,60.1424518 C51.6150972,59.5095829 48.4484614,57.2248862 49.2740201,52.8982915 C56.9712583,12.2553679 93.7983558,0 126.732964,0 C143.587124,0 165.606011,4.47386604 178.902691,17.2148315 C195.760839,32.917146 194.149604,53.8694866 194.149604,76.6726704 L194.149604,130.542157 C194.149604,146.734049 200.87372,153.830938 207.206992,162.579655 Z M233.826346,208.038962 C230.467669,203.683255 211.550709,205.9821 203.056405,206.998432 C200.470662,207.321077 200.076227,205.042397 202.406981,203.404973 C217.475208,192.664928 242.201125,195.766353 245.081698,199.363845 C247.966255,202.981502 244.336653,228.071183 230.172839,240.049379 C228.001452,241.888455 225.929671,240.904388 226.89783,238.468418 C230.077218,230.430525 237.204944,212.418868 233.826346,208.038962 Z M126.768855,264 C74.0234043,264 42.0764048,241.955028 17.7852554,217.541992 C12.9733903,212.705982 6.71799208,206.295994 3.31151296,200.690918 C1.90227474,198.372135 5.59096074,195.021875 8.0442063,196.84375 C38.2390146,219.267578 82.1011654,239.538304 125.529506,239.538304 C154.819967,239.538304 191.046475,227.469543 220.66851,214.867659 C225.146771,212.966167 225.146771,219.180222 224.511585,221.060516 C224.183264,222.03242 209.514625,236.221149 189.247207,247.047411 C170.304273,257.166172 146.397132,264 126.768855,264 Z\"\n fill=\"#FF9900\"\n ></path>\n </svg>\n\n <p class=\"amplify-text amplify-authenticator__federated-text\">\n {{ signInAmazonText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <amplify-federated-sign-in-button\n *ngIf=\"includeApple\"\n [provider]=\"FederatedProviders.Apple\"\n >\n <svg\n aria-label=\"Apple icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n fill=\"#000\"\n preserveAspectRatio=\"xMidYMid\"\n stroke=\"#000\"\n strokeWidth=\"0\"\n viewBox=\"0 0 1024 1024\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z\"\n ></path>\n </svg>\n <p class=\"amplify-text amplify-authenticator__federated-text\">\n {{ signInAppleText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <amplify-federated-sign-in-button\n *ngIf=\"includeFacebook\"\n [text]=\"signInFacebookText\"\n [provider]=\"FederatedProviders.Facebook\"\n >\n <svg\n aria-label=\"Facebook icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n viewBox=\"0 0 279 538\"\n >\n <path\n d=\"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z\"\n fill=\"#1877F2\"\n ></path>\n </svg>\n <p class=\"amplify-text amplify-authenticator__federated-text\">\n {{ signInFacebookText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <amplify-federated-sign-in-button\n *ngIf=\"includeGoogle\"\n [provider]=\"FederatedProviders.Google\"\n >\n <svg\n aria-label=\"Google icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n viewBox=\"0 0 256 262\"\n xmlns=\"http://www.w3.org/2000/svg\"\n preserveAspectRatio=\"xMidYMid\"\n >\n <path\n d=\"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027\"\n fill=\"#4285F4\"\n ></path>\n <path\n d=\"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1\"\n fill=\"#34A853\"\n ></path>\n <path\n d=\"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782\"\n fill=\"#FBBC05\"\n ></path>\n <path\n d=\"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251\"\n fill=\"#EB4335\"\n ></path>\n </svg>\n <p class=\"amplify-text amplify-authenticator__federated-text\">\n {{ signInGoogleText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <hr\n class=\"amplify-divider amplify-divider--label amplify-divider--small\"\n aria-orientation=\"horizontal\"\n data-size=\"small\"\n [attr.data-label]=\"orText\"\n />\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FederatedSignInButtonComponent, selector: "amplify-federated-sign-in-button", inputs: ["provider", "text"] }] });
957
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FederatedSignInComponent, decorators: [{
958
+ type: Component,
959
+ args: [{ selector: 'amplify-federated-sign-in', template: "<div\n class=\"amplify-flex federated-sign-in-container\"\n *ngIf=\"shouldShowFederatedSignIn\"\n data-orientation=\"horizontal\"\n data-size=\"small\"\n>\n <amplify-federated-sign-in-button\n *ngIf=\"includeAmazon\"\n [text]=\"signInAmazonText\"\n [provider]=\"FederatedProviders.Amazon\"\n >\n <svg\n aria-label=\"Amazon icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n viewBox=\"0 0 248 268\"\n >\n <path\n d=\"M139.056521,147.024612 C133.548808,156.744524 124.782731,162.726926 115.087401,162.726926 C101.790721,162.726926 93.9937779,152.612964 93.9937779,137.68681 C93.9937779,108.224571 120.447551,102.879017 145.533369,102.879017 L145.533369,110.365976 C145.533369,123.831358 145.876354,135.063787 139.056521,147.024612 M207.206992,162.579655 C209.400505,165.692256 209.887066,169.437725 207.063416,171.770186 C199.996315,177.653081 187.429476,188.590967 180.513926,194.716661 L180.46208,194.621133 C178.176838,196.663031 174.862638,196.810303 172.27828,195.445057 C160.780281,185.9162 158.686473,181.494078 152.405048,172.403055 C133.405233,191.751331 119.909143,197.534719 95.309886,197.534719 C66.1281801,197.534719 43.4791563,179.599451 43.4791563,143.669212 C43.4791563,115.616003 58.6782107,96.5105248 80.4019706,87.1727225 C99.2063636,78.9096034 125.464714,77.4528107 145.533369,75.1641337 L145.533369,70.694248 C145.533369,62.4749122 146.167493,52.7510201 141.297893,45.6541312 C137.110277,39.2856386 129.018206,36.6586354 121.859376,36.6586354 C108.658413,36.6586354 96.9171331,43.4171982 94.0416364,57.4199213 C93.4593582,60.532522 91.1701278,63.5933787 88.003492,63.7406501 L54.4387473,60.1424518 C51.6150972,59.5095829 48.4484614,57.2248862 49.2740201,52.8982915 C56.9712583,12.2553679 93.7983558,0 126.732964,0 C143.587124,0 165.606011,4.47386604 178.902691,17.2148315 C195.760839,32.917146 194.149604,53.8694866 194.149604,76.6726704 L194.149604,130.542157 C194.149604,146.734049 200.87372,153.830938 207.206992,162.579655 Z M233.826346,208.038962 C230.467669,203.683255 211.550709,205.9821 203.056405,206.998432 C200.470662,207.321077 200.076227,205.042397 202.406981,203.404973 C217.475208,192.664928 242.201125,195.766353 245.081698,199.363845 C247.966255,202.981502 244.336653,228.071183 230.172839,240.049379 C228.001452,241.888455 225.929671,240.904388 226.89783,238.468418 C230.077218,230.430525 237.204944,212.418868 233.826346,208.038962 Z M126.768855,264 C74.0234043,264 42.0764048,241.955028 17.7852554,217.541992 C12.9733903,212.705982 6.71799208,206.295994 3.31151296,200.690918 C1.90227474,198.372135 5.59096074,195.021875 8.0442063,196.84375 C38.2390146,219.267578 82.1011654,239.538304 125.529506,239.538304 C154.819967,239.538304 191.046475,227.469543 220.66851,214.867659 C225.146771,212.966167 225.146771,219.180222 224.511585,221.060516 C224.183264,222.03242 209.514625,236.221149 189.247207,247.047411 C170.304273,257.166172 146.397132,264 126.768855,264 Z\"\n fill=\"#FF9900\"\n ></path>\n </svg>\n\n <p class=\"amplify-text amplify-authenticator__federated-text\">\n {{ signInAmazonText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <amplify-federated-sign-in-button\n *ngIf=\"includeApple\"\n [provider]=\"FederatedProviders.Apple\"\n >\n <svg\n aria-label=\"Apple icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n fill=\"#000\"\n preserveAspectRatio=\"xMidYMid\"\n stroke=\"#000\"\n strokeWidth=\"0\"\n viewBox=\"0 0 1024 1024\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z\"\n ></path>\n </svg>\n <p class=\"amplify-text amplify-authenticator__federated-text\">\n {{ signInAppleText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <amplify-federated-sign-in-button\n *ngIf=\"includeFacebook\"\n [text]=\"signInFacebookText\"\n [provider]=\"FederatedProviders.Facebook\"\n >\n <svg\n aria-label=\"Facebook icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n viewBox=\"0 0 279 538\"\n >\n <path\n d=\"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z\"\n fill=\"#1877F2\"\n ></path>\n </svg>\n <p class=\"amplify-text amplify-authenticator__federated-text\">\n {{ signInFacebookText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <amplify-federated-sign-in-button\n *ngIf=\"includeGoogle\"\n [provider]=\"FederatedProviders.Google\"\n >\n <svg\n aria-label=\"Google icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n viewBox=\"0 0 256 262\"\n xmlns=\"http://www.w3.org/2000/svg\"\n preserveAspectRatio=\"xMidYMid\"\n >\n <path\n d=\"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027\"\n fill=\"#4285F4\"\n ></path>\n <path\n d=\"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1\"\n fill=\"#34A853\"\n ></path>\n <path\n d=\"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782\"\n fill=\"#FBBC05\"\n ></path>\n <path\n d=\"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251\"\n fill=\"#EB4335\"\n ></path>\n </svg>\n <p class=\"amplify-text amplify-authenticator__federated-text\">\n {{ signInGoogleText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <hr\n class=\"amplify-divider amplify-divider--label amplify-divider--small\"\n aria-orientation=\"horizontal\"\n data-size=\"small\"\n [attr.data-label]=\"orText\"\n />\n</div>\n" }]
960
+ }], ctorParameters: function () { return [{ type: AuthenticatorService }]; } });
961
+
962
+ const { getForgotPasswordText, getSignInText } = authenticatorTextUtil;
963
+ class SignInComponent {
964
+ constructor(authenticator) {
965
+ this.authenticator = authenticator;
966
+ this.dataAttr = '';
967
+ this.forgotPasswordText = getForgotPasswordText();
968
+ this.signInButtonText = getSignInText();
969
+ }
970
+ get context() {
971
+ return this.authenticator.slotContext;
972
+ }
973
+ onInput(event) {
974
+ event.preventDefault();
975
+ const { name, value } = event.target;
976
+ this.authenticator.updateForm({ name, value });
977
+ }
978
+ onSubmit(event) {
979
+ event.preventDefault();
980
+ this.authenticator.submitForm(getFormDataFromEvent(event));
981
+ }
982
+ }
983
+ SignInComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignInComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
984
+ SignInComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SignInComponent, selector: "amplify-sign-in", host: { properties: { "attr.data-amplify-authenticator-signin": "this.dataAttr" } }, ngImport: i0, template: "<amplify-slot name=\"sign-in-header\" [context]=\"context\"></amplify-slot>\n\n<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <amplify-federated-sign-in></amplify-federated-sign-in>\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <legend class=\"amplify-visually-hidden\">Sign in</legend>\n <amplify-base-form-fields route=\"signIn\"></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ signInButtonText }}\n </button>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n</form>\n\n<amplify-slot name=\"sign-in-footer\" [context]=\"context\">\n <div data-amplify-footer>\n <button\n amplify-button\n fontWeight=\"normal\"\n size=\"small\"\n variation=\"link\"\n fullWidth=\"true\"\n (click)=\"authenticator.toResetPassword()\"\n >\n {{ forgotPasswordText }}\n </button>\n </div>\n</amplify-slot>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }, { kind: "component", type: FederatedSignInComponent, selector: "amplify-federated-sign-in" }], encapsulation: i0.ViewEncapsulation.None });
985
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignInComponent, decorators: [{
986
+ type: Component,
987
+ args: [{ selector: 'amplify-sign-in', encapsulation: ViewEncapsulation.None, template: "<amplify-slot name=\"sign-in-header\" [context]=\"context\"></amplify-slot>\n\n<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <amplify-federated-sign-in></amplify-federated-sign-in>\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <legend class=\"amplify-visually-hidden\">Sign in</legend>\n <amplify-base-form-fields route=\"signIn\"></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ signInButtonText }}\n </button>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n</form>\n\n<amplify-slot name=\"sign-in-footer\" [context]=\"context\">\n <div data-amplify-footer>\n <button\n amplify-button\n fontWeight=\"normal\"\n size=\"small\"\n variation=\"link\"\n fullWidth=\"true\"\n (click)=\"authenticator.toResetPassword()\"\n >\n {{ forgotPasswordText }}\n </button>\n </div>\n</amplify-slot>\n" }]
988
+ }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
989
+ type: HostBinding,
990
+ args: ['attr.data-amplify-authenticator-signin']
991
+ }] } });
992
+
993
+ class SignUpFormFieldsComponent {
994
+ }
995
+ SignUpFormFieldsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignUpFormFieldsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
996
+ SignUpFormFieldsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SignUpFormFieldsComponent, selector: "amplify-sign-up-form-fields", ngImport: i0, template: "<div class=\"amplify-flex amplify-authenticator__column\" data-amplify-fieldset>\n <amplify-base-form-fields route=\"signUp\"></amplify-base-form-fields>\n</div>\n", dependencies: [{ kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }] });
997
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignUpFormFieldsComponent, decorators: [{
998
+ type: Component,
999
+ args: [{ selector: 'amplify-sign-up-form-fields', template: "<div class=\"amplify-flex amplify-authenticator__column\" data-amplify-fieldset>\n <amplify-base-form-fields route=\"signUp\"></amplify-base-form-fields>\n</div>\n" }]
1000
+ }] });
1001
+
1002
+ const { getCreateAccountText } = authenticatorTextUtil;
1003
+ class SignUpComponent {
1004
+ constructor(authenticator) {
1005
+ this.authenticator = authenticator;
1006
+ this.dataAttr = '';
1007
+ // translated texts
1008
+ this.createAccountText = getCreateAccountText();
1009
+ }
1010
+ get context() {
1011
+ return this.authenticator.slotContext;
1012
+ }
1013
+ onInput(event) {
1014
+ const { checked, name, type, value } = event.target;
1015
+ const isUncheckedCheckbox = type === 'checkbox' && !checked;
1016
+ this.authenticator.updateForm({
1017
+ name,
1018
+ value: isUncheckedCheckbox ? undefined : value,
1019
+ });
1020
+ }
1021
+ onSubmit(event) {
1022
+ event.preventDefault();
1023
+ this.authenticator.submitForm(getFormDataFromEvent(event));
1024
+ }
1025
+ }
1026
+ SignUpComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignUpComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
1027
+ SignUpComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SignUpComponent, selector: "amplify-sign-up", host: { properties: { "attr.data-amplify-authenticator-signup": "this.dataAttr" } }, ngImport: i0, template: "<amplify-slot name=\"sign-up-header\" [context]=\"context\"></amplify-slot>\n\n<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <amplify-federated-sign-in></amplify-federated-sign-in>\n <div class=\"amplify-flex amplify-authenticator__column\">\n <div class=\"amplify-flex amplify-authenticator__column\">\n <amplify-slot name=\"sign-up-form-fields\" [context]=\"context\">\n <amplify-sign-up-form-fields></amplify-sign-up-form-fields>\n </amplify-slot>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </div>\n\n <amplify-slot name=\"sign-up-button\" [context]=\"context\">\n <button\n [isDisabled]=\"\n authenticator.isPending || authenticator.hasValidationErrors\n \"\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n >\n {{ createAccountText }}\n </button>\n </amplify-slot>\n </div>\n</form>\n\n<amplify-slot name=\"sign-up-footer\" [context]=\"context\"> </amplify-slot>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }, { kind: "component", type: FederatedSignInComponent, selector: "amplify-federated-sign-in" }, { kind: "component", type: SignUpFormFieldsComponent, selector: "amplify-sign-up-form-fields" }] });
1028
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignUpComponent, decorators: [{
1029
+ type: Component,
1030
+ args: [{ selector: 'amplify-sign-up', template: "<amplify-slot name=\"sign-up-header\" [context]=\"context\"></amplify-slot>\n\n<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <amplify-federated-sign-in></amplify-federated-sign-in>\n <div class=\"amplify-flex amplify-authenticator__column\">\n <div class=\"amplify-flex amplify-authenticator__column\">\n <amplify-slot name=\"sign-up-form-fields\" [context]=\"context\">\n <amplify-sign-up-form-fields></amplify-sign-up-form-fields>\n </amplify-slot>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </div>\n\n <amplify-slot name=\"sign-up-button\" [context]=\"context\">\n <button\n [isDisabled]=\"\n authenticator.isPending || authenticator.hasValidationErrors\n \"\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n >\n {{ createAccountText }}\n </button>\n </amplify-slot>\n </div>\n</form>\n\n<amplify-slot name=\"sign-up-footer\" [context]=\"context\"> </amplify-slot>\n" }]
1031
+ }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
1032
+ type: HostBinding,
1033
+ args: ['attr.data-amplify-authenticator-signup']
1034
+ }] } });
1035
+
1036
+ class TabItemComponent {
1037
+ constructor() {
1038
+ this.active = false;
1039
+ this.display = 'block'; // emulate div behavior
1040
+ }
1041
+ }
1042
+ TabItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1043
+ TabItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TabItemComponent, selector: "amplify-tab-item", inputs: { title: "title", active: "active", id: "id", labelledById: "labelledById", tabIndex: "tabIndex" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0, template: "<div\n data-orientation=\"horizontal\"\n role=\"tabpanel\"\n [id]=\"id\"\n [attr.aria-labelledby]=\"labelledById\"\n [attr.data-state]=\"active ? 'active' : 'inactive'\"\n [attr.tabindex]=\"tabIndex\"\n>\n <ng-content *ngIf=\"active\"></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1044
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabItemComponent, decorators: [{
1045
+ type: Component,
1046
+ args: [{ selector: 'amplify-tab-item', template: "<div\n data-orientation=\"horizontal\"\n role=\"tabpanel\"\n [id]=\"id\"\n [attr.aria-labelledby]=\"labelledById\"\n [attr.data-state]=\"active ? 'active' : 'inactive'\"\n [attr.tabindex]=\"tabIndex\"\n>\n <ng-content *ngIf=\"active\"></ng-content>\n</div>\n" }]
1047
+ }], propDecorators: { title: [{
1048
+ type: Input
1049
+ }], active: [{
1050
+ type: Input
1051
+ }], id: [{
1052
+ type: Input
1053
+ }], labelledById: [{
1054
+ type: Input
1055
+ }], tabIndex: [{
1056
+ type: Input
1057
+ }], display: [{
1058
+ type: HostBinding,
1059
+ args: ['style.display']
1060
+ }] } });
1061
+
1062
+ class TabsComponent {
1063
+ constructor() {
1064
+ this.tabChange = new EventEmitter();
1065
+ }
1066
+ ngAfterContentInit() {
1067
+ // assign ids
1068
+ this.tabs.forEach((tab, index) => {
1069
+ tab.id = `radix-id-${nanoid(12)}-1-content-${index}`;
1070
+ tab.labelledById = `radix-id-${nanoid(12)}-1-trigger-${index}`;
1071
+ });
1072
+ // find active tab
1073
+ // TODO(enhancement): more declarative way for choosing the initial tab to render
1074
+ const activeTabs = this.tabs.filter((tab) => tab.active);
1075
+ // set active tab
1076
+ if (activeTabs.length !== 1) {
1077
+ this.selectTab(this.tabs.first);
1078
+ }
1079
+ }
1080
+ selectTab(tab) {
1081
+ this.tabs.forEach((tab) => {
1082
+ tab.active = false;
1083
+ });
1084
+ tab.active = true;
1085
+ }
1086
+ handleTabClick(tab) {
1087
+ if (tab.active)
1088
+ return; // don't do anything if clicks the current active tab
1089
+ this.tabChange.emit();
1090
+ this.selectTab(tab);
1091
+ }
1092
+ }
1093
+ TabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1094
+ TabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TabsComponent, selector: "amplify-tabs", outputs: { tabChange: "tabChange" }, queries: [{ propertyName: "tabs", predicate: TabItemComponent }], ngImport: i0, template: "<div\n tabindex=\"0\"\n aria-orientation=\"horizontal\"\n data-orientation=\"horizontal\"\n role=\"tablist\"\n style=\"outline: none\"\n>\n <div\n class=\"amplify-flex amplify-tabs\"\n data-indicator-position=\"top\"\n style=\"gap: 0px; justify-content: center\"\n >\n <div\n *ngFor=\"let tab of tabs\"\n class=\"amplify-tabs-item\"\n data-spacing=\"equal\"\n data-orientation=\"horizontal\"\n role=\"tab\"\n [id]=\"tab.labelledById\"\n [tabindex]=\"tab.active ? '0' : '1'\"\n [attr.aria-selected]=\"tab.active\"\n [attr.aria-controls]=\"tab.id\"\n [attr.data-state]=\"tab.active ? 'active' : 'inactive'\"\n (click)=\"handleTabClick(tab)\"\n >\n {{ tab.title }}\n </div>\n </div>\n</div>\n\n<ng-content></ng-content>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1095
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabsComponent, decorators: [{
1096
+ type: Component,
1097
+ args: [{ selector: 'amplify-tabs', template: "<div\n tabindex=\"0\"\n aria-orientation=\"horizontal\"\n data-orientation=\"horizontal\"\n role=\"tablist\"\n style=\"outline: none\"\n>\n <div\n class=\"amplify-flex amplify-tabs\"\n data-indicator-position=\"top\"\n style=\"gap: 0px; justify-content: center\"\n >\n <div\n *ngFor=\"let tab of tabs\"\n class=\"amplify-tabs-item\"\n data-spacing=\"equal\"\n data-orientation=\"horizontal\"\n role=\"tab\"\n [id]=\"tab.labelledById\"\n [tabindex]=\"tab.active ? '0' : '1'\"\n [attr.aria-selected]=\"tab.active\"\n [attr.aria-controls]=\"tab.id\"\n [attr.data-state]=\"tab.active ? 'active' : 'inactive'\"\n (click)=\"handleTabClick(tab)\"\n >\n {{ tab.title }}\n </div>\n </div>\n</div>\n\n<ng-content></ng-content>\n" }]
1098
+ }], propDecorators: { tabs: [{
1099
+ type: ContentChildren,
1100
+ args: [TabItemComponent]
1101
+ }], tabChange: [{
1102
+ type: Output
1103
+ }] } });
1104
+
1105
+ const getAttributeMap = () => defaultFormFieldOptions;
1106
+
1107
+ const { getSkipText, getVerifyText, getAccountRecoveryInfoText } = authenticatorTextUtil;
1108
+ class VerifyUserComponent {
1109
+ constructor(authenticator) {
1110
+ this.authenticator = authenticator;
1111
+ this.dataAttr = '';
1112
+ this.headerText = getAccountRecoveryInfoText();
1113
+ this.unverifiedContactMethods = {};
1114
+ this.labelId = nanoid(12);
1115
+ // translated texts
1116
+ this.skipText = getSkipText();
1117
+ this.verifyText = getVerifyText();
1118
+ }
1119
+ get context() {
1120
+ return this.authenticator.slotContext;
1121
+ }
1122
+ ngOnInit() {
1123
+ const actorState = getActorState(this.authenticator.authState);
1124
+ this.unverifiedContactMethods = actorState.context.unverifiedContactMethods;
1125
+ }
1126
+ getLabel(attr) {
1127
+ const attributeMap = getAttributeMap();
1128
+ const { label } = attributeMap[attr];
1129
+ return translate(label);
1130
+ }
1131
+ onInput(event) {
1132
+ event.preventDefault();
1133
+ const { name, value } = event.target;
1134
+ this.authenticator.updateForm({ name, value });
1135
+ }
1136
+ onSubmit(event) {
1137
+ event.preventDefault();
1138
+ this.authenticator.submitForm(getFormDataFromEvent(event));
1139
+ }
1140
+ }
1141
+ VerifyUserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: VerifyUserComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
1142
+ VerifyUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: VerifyUserComponent, selector: "amplify-verify-user", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-verifyuser": "this.dataAttr" } }, ngImport: i0, template: "<form data-amplify-form (input)=\"onInput($event)\" (submit)=\"onSubmit($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"verify-user-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n\n <div\n *ngFor=\"\n let unverifiedContactMethod of unverifiedContactMethods | keyvalue\n \"\n >\n <input\n name=\"unverifiedAttr\"\n type=\"radio\"\n [value]=\"unverifiedContactMethod.key\"\n [id]=\"labelId\"\n />\n <label [for]=\"labelId\">{{ getLabel(unverifiedContactMethod.key) }}</label>\n </div>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ verifyText }}\n </button>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.skipVerification()\"\n >\n {{ skipText }}\n </button>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"verify-user-footer\" [context]=\"context\"> </amplify-slot>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }, { kind: "pipe", type: i2.KeyValuePipe, name: "keyvalue" }], encapsulation: i0.ViewEncapsulation.None });
1143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: VerifyUserComponent, decorators: [{
1144
+ type: Component,
1145
+ args: [{ selector: 'amplify-verify-user', encapsulation: ViewEncapsulation.None, template: "<form data-amplify-form (input)=\"onInput($event)\" (submit)=\"onSubmit($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"verify-user-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n\n <div\n *ngFor=\"\n let unverifiedContactMethod of unverifiedContactMethods | keyvalue\n \"\n >\n <input\n name=\"unverifiedAttr\"\n type=\"radio\"\n [value]=\"unverifiedContactMethod.key\"\n [id]=\"labelId\"\n />\n <label [for]=\"labelId\">{{ getLabel(unverifiedContactMethod.key) }}</label>\n </div>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ verifyText }}\n </button>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.skipVerification()\"\n >\n {{ skipText }}\n </button>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"verify-user-footer\" [context]=\"context\"> </amplify-slot>\n</form>\n" }]
1146
+ }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
1147
+ type: HostBinding,
1148
+ args: ['attr.data-amplify-authenticator-verifyuser']
1149
+ }], headerText: [{
1150
+ type: Input
1151
+ }] } });
1152
+
1153
+ const { getSignInTabText, getSignUpTabText } = authenticatorTextUtil;
1154
+ class AuthenticatorComponent {
1155
+ constructor(authenticator, contextService, changeDetector) {
1156
+ this.authenticator = authenticator;
1157
+ this.contextService = contextService;
1158
+ this.changeDetector = changeDetector;
1159
+ this.customComponentQuery = null;
1160
+ // translated texts
1161
+ this.signInTitle = getSignInTabText();
1162
+ this.signUpTitle = getSignUpTabText();
1163
+ this.hasInitialized = false;
1164
+ this.isHandlingHubEvent = false;
1165
+ }
1166
+ // context passed to "authenticated" slot
1167
+ get context() {
1168
+ return this.authenticator.slotContext;
1169
+ }
1170
+ get route() {
1171
+ return this.authenticator.route;
1172
+ }
1173
+ ngOnInit() {
1174
+ const { initialState, loginMechanisms, services, signUpAttributes, socialProviders, formFields, } = this;
1175
+ configureComponent({
1176
+ packageName: '@aws-amplify/ui-angular',
1177
+ version: VERSION,
1178
+ });
1179
+ const { initializeMachine } = this.authenticator;
1180
+ this.authenticator.hubSubject.subscribe(() => {
1181
+ /*
1182
+ * Hub events aren't properly caught by Angular, because they are
1183
+ * synchronous events. Angular tracks async network events and
1184
+ * html events, but not synchronous events like hub.
1185
+ *
1186
+ * On any notable hub events, we run change detection manually.
1187
+ */
1188
+ this.changeDetector.detectChanges();
1189
+ /*
1190
+ * Hub events that we handle can lead to multiple state changes:
1191
+ * e.g. `authenticated` -> `signOut` -> initialState.
1192
+ *
1193
+ * We want to ensure change detection runs all the way, until
1194
+ * we reach back to the initial state. Setting the below flag
1195
+ * to true to until we reach initial state.
1196
+ */
1197
+ this.isHandlingHubEvent = true;
1198
+ });
1199
+ /**
1200
+ * Subscribes to state machine changes and sends INIT event
1201
+ * once machine reaches 'setup' state.
1202
+ */
1203
+ this.unsubscribeMachine = this.authenticator.subscribe(() => {
1204
+ const { route } = this.authenticator;
1205
+ if (this.isHandlingHubEvent) {
1206
+ this.changeDetector.detectChanges();
1207
+ const initialStateWithDefault = initialState !== null && initialState !== void 0 ? initialState : 'signIn';
1208
+ // We can stop manual change detection if we're back to the initial state
1209
+ if (route === initialStateWithDefault) {
1210
+ this.isHandlingHubEvent = false;
1211
+ }
1212
+ }
1213
+ if (!this.hasInitialized && route === 'setup') {
1214
+ initializeMachine({
1215
+ initialState,
1216
+ loginMechanisms,
1217
+ services,
1218
+ signUpAttributes,
1219
+ socialProviders,
1220
+ formFields,
1221
+ });
1222
+ this.hasInitialized = true;
1223
+ }
1224
+ }).unsubscribe;
1225
+ /**
1226
+ * handling translations after content init, because authenticator and its
1227
+ * translations might be initialized before the main app's `ngOnInit` is run.
1228
+ */
1229
+ this.signInTitle = getSignInTabText();
1230
+ this.signUpTitle = getSignUpTabText();
1231
+ }
1232
+ /**
1233
+ * Lifecycle Methods
1234
+ */
1235
+ ngAfterContentInit() {
1236
+ this.contextService.customComponents = this.mapCustomComponents(this.customComponentQuery);
1237
+ }
1238
+ ngOnDestroy() {
1239
+ if (this.unsubscribeMachine)
1240
+ this.unsubscribeMachine();
1241
+ }
1242
+ /**
1243
+ * Class Functions
1244
+ */
1245
+ onTabChange() {
1246
+ const { route } = this.authenticator;
1247
+ if (route === 'signIn') {
1248
+ this.authenticator.toSignUp();
1249
+ }
1250
+ else {
1251
+ this.authenticator.toSignIn();
1252
+ }
1253
+ }
1254
+ hasTabs() {
1255
+ const { route } = this.authenticator;
1256
+ return route === 'signIn' || route === 'signUp';
1257
+ }
1258
+ hasRouteComponent() {
1259
+ const { route } = this.authenticator;
1260
+ switch (route) {
1261
+ case 'authenticated':
1262
+ case 'idle':
1263
+ case 'setup':
1264
+ case 'signOut':
1265
+ case 'transition':
1266
+ return false;
1267
+ default:
1268
+ return true;
1269
+ }
1270
+ }
1271
+ mapCustomComponents(componentQuery) {
1272
+ if (!componentQuery)
1273
+ return {};
1274
+ const customComponents = {};
1275
+ componentQuery.forEach((component) => {
1276
+ customComponents[component.name] = component.template;
1277
+ });
1278
+ return customComponents;
1279
+ }
1280
+ }
1281
+ AuthenticatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthenticatorComponent, deps: [{ token: AuthenticatorService }, { token: CustomComponentsService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1282
+ AuthenticatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: AuthenticatorComponent, selector: "amplify-authenticator", inputs: { formFields: "formFields", initialState: "initialState", loginMechanisms: "loginMechanisms", services: "services", signUpAttributes: "signUpAttributes", socialProviders: "socialProviders", variation: "variation", hideSignUp: "hideSignUp" }, providers: [CustomComponentsService], queries: [{ propertyName: "customComponentQuery", predicate: AmplifySlotDirective }], ngImport: i0, template: "<div\n data-amplify-authenticator\n [attr.data-variation]=\"variation\"\n *ngIf=\"hasRouteComponent()\"\n>\n <div data-amplify-container>\n <amplify-slot name=\"header\" [context]=\"context\"></amplify-slot>\n <div\n data-amplify-router\n [attr.data-amplify-router-content]=\"hasTabs() ? undefined : ''\"\n >\n <amplify-tabs\n (tabChange)=\"onTabChange()\"\n *ngIf=\"(route === 'signIn' || route === 'signUp') && !hideSignUp\"\n >\n <amplify-tab-item\n [title]=\"signInTitle\"\n [active]=\"route === 'signIn'\"\n data-amplify-router-content\n >\n <!-- signIn component -->\n <amplify-slot\n name=\"sign-in\"\n [context]=\"context\"\n *ngIf=\"route === 'signIn'\"\n >\n <amplify-sign-in></amplify-sign-in>\n </amplify-slot>\n </amplify-tab-item>\n <amplify-tab-item\n [title]=\"signUpTitle\"\n [active]=\"route === 'signUp'\"\n data-amplify-router-content\n >\n <!-- signUp component -->\n <amplify-slot\n name=\"sign-up\"\n [context]=\"context\"\n *ngIf=\"route === 'signUp'\"\n >\n <amplify-sign-up></amplify-sign-up>\n </amplify-slot>\n </amplify-tab-item>\n </amplify-tabs>\n\n <amplify-slot\n name=\"sign-in\"\n [context]=\"context\"\n *ngIf=\"route === 'signIn' && hideSignUp\"\n >\n <amplify-sign-in></amplify-sign-in>\n </amplify-slot>\n\n <!-- confirmSignUp content -->\n <amplify-slot\n name=\"confirm-sign-up\"\n [context]=\"context\"\n *ngIf=\"route === 'confirmSignUp'\"\n >\n <amplify-confirm-sign-up></amplify-confirm-sign-up>\n </amplify-slot>\n\n <!-- confirmSignIn content -->\n <amplify-slot\n name=\"confirm-sign-in\"\n [context]=\"context\"\n *ngIf=\"route === 'confirmSignIn'\"\n >\n <amplify-confirm-sign-in></amplify-confirm-sign-in>\n </amplify-slot>\n\n <!-- setupTotp content -->\n <amplify-slot\n name=\"setup-totp\"\n [context]=\"context\"\n *ngIf=\"route === 'setupTOTP'\"\n >\n <amplify-setup-totp></amplify-setup-totp>\n </amplify-slot>\n\n <!-- forceNewPassword content -->\n <amplify-slot\n name=\"force-new-password\"\n [context]=\"context\"\n *ngIf=\"route === 'forceNewPassword'\"\n >\n <amplify-force-new-password></amplify-force-new-password>\n </amplify-slot>\n\n <!-- resetPassword content -->\n <amplify-slot\n name=\"reset-password\"\n [context]=\"context\"\n *ngIf=\"route === 'resetPassword'\"\n >\n <amplify-reset-password></amplify-reset-password>\n </amplify-slot>\n\n <!-- confirmResetPassword content -->\n <amplify-slot\n name=\"confirm-reset-password\"\n [context]=\"context\"\n *ngIf=\"route === 'confirmResetPassword'\"\n >\n <amplify-confirm-reset-password></amplify-confirm-reset-password>\n </amplify-slot>\n\n <!-- verifyUser content -->\n <amplify-slot\n name=\"verify-user\"\n [context]=\"context\"\n *ngIf=\"route === 'verifyUser'\"\n >\n <amplify-verify-user></amplify-verify-user>\n </amplify-slot>\n\n <!-- confirmVerifyUser content -->\n <amplify-slot\n name=\"confirm-verify-user\"\n [context]=\"context\"\n *ngIf=\"route === 'confirmVerifyUser'\"\n >\n <amplify-confirm-verify-user></amplify-confirm-verify-user>\n </amplify-slot>\n </div>\n\n <amplify-slot name=\"footer\" [context]=\"context\"></amplify-slot>\n </div>\n</div>\n\n<!-- signedIn content is rendered outside authenticator so it's not styled by authenticator -->\n<amplify-slot\n name=\"authenticated\"\n [context]=\"context\"\n *ngIf=\"route === 'authenticated'\"\n>\n <ng-content></ng-content>\n</amplify-slot>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: ConfirmResetPasswordComponent, selector: "amplify-confirm-reset-password", inputs: ["headerText"] }, { kind: "component", type: ConfirmSignInComponent, selector: "amplify-confirm-sign-in" }, { kind: "component", type: ConfirmSignUpComponent, selector: "amplify-confirm-sign-up" }, { kind: "component", type: ConfirmVerifyUserComponent, selector: "amplify-confirm-verify-user", inputs: ["headerText"] }, { kind: "component", type: ForceNewPasswordComponent, selector: "amplify-force-new-password", inputs: ["headerText"] }, { kind: "component", type: ResetPasswordComponent, selector: "amplify-reset-password", inputs: ["headerText"] }, { kind: "component", type: SetupTotpComponent, selector: "amplify-setup-totp" }, { kind: "component", type: SignInComponent, selector: "amplify-sign-in" }, { kind: "component", type: SignUpComponent, selector: "amplify-sign-up" }, { kind: "component", type: TabItemComponent, selector: "amplify-tab-item", inputs: ["title", "active", "id", "labelledById", "tabIndex"] }, { kind: "component", type: TabsComponent, selector: "amplify-tabs", outputs: ["tabChange"] }, { kind: "component", type: VerifyUserComponent, selector: "amplify-verify-user", inputs: ["headerText"] }], encapsulation: i0.ViewEncapsulation.None });
1283
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthenticatorComponent, decorators: [{
1284
+ type: Component,
1285
+ args: [{ selector: 'amplify-authenticator', providers: [CustomComponentsService], encapsulation: ViewEncapsulation.None, template: "<div\n data-amplify-authenticator\n [attr.data-variation]=\"variation\"\n *ngIf=\"hasRouteComponent()\"\n>\n <div data-amplify-container>\n <amplify-slot name=\"header\" [context]=\"context\"></amplify-slot>\n <div\n data-amplify-router\n [attr.data-amplify-router-content]=\"hasTabs() ? undefined : ''\"\n >\n <amplify-tabs\n (tabChange)=\"onTabChange()\"\n *ngIf=\"(route === 'signIn' || route === 'signUp') && !hideSignUp\"\n >\n <amplify-tab-item\n [title]=\"signInTitle\"\n [active]=\"route === 'signIn'\"\n data-amplify-router-content\n >\n <!-- signIn component -->\n <amplify-slot\n name=\"sign-in\"\n [context]=\"context\"\n *ngIf=\"route === 'signIn'\"\n >\n <amplify-sign-in></amplify-sign-in>\n </amplify-slot>\n </amplify-tab-item>\n <amplify-tab-item\n [title]=\"signUpTitle\"\n [active]=\"route === 'signUp'\"\n data-amplify-router-content\n >\n <!-- signUp component -->\n <amplify-slot\n name=\"sign-up\"\n [context]=\"context\"\n *ngIf=\"route === 'signUp'\"\n >\n <amplify-sign-up></amplify-sign-up>\n </amplify-slot>\n </amplify-tab-item>\n </amplify-tabs>\n\n <amplify-slot\n name=\"sign-in\"\n [context]=\"context\"\n *ngIf=\"route === 'signIn' && hideSignUp\"\n >\n <amplify-sign-in></amplify-sign-in>\n </amplify-slot>\n\n <!-- confirmSignUp content -->\n <amplify-slot\n name=\"confirm-sign-up\"\n [context]=\"context\"\n *ngIf=\"route === 'confirmSignUp'\"\n >\n <amplify-confirm-sign-up></amplify-confirm-sign-up>\n </amplify-slot>\n\n <!-- confirmSignIn content -->\n <amplify-slot\n name=\"confirm-sign-in\"\n [context]=\"context\"\n *ngIf=\"route === 'confirmSignIn'\"\n >\n <amplify-confirm-sign-in></amplify-confirm-sign-in>\n </amplify-slot>\n\n <!-- setupTotp content -->\n <amplify-slot\n name=\"setup-totp\"\n [context]=\"context\"\n *ngIf=\"route === 'setupTOTP'\"\n >\n <amplify-setup-totp></amplify-setup-totp>\n </amplify-slot>\n\n <!-- forceNewPassword content -->\n <amplify-slot\n name=\"force-new-password\"\n [context]=\"context\"\n *ngIf=\"route === 'forceNewPassword'\"\n >\n <amplify-force-new-password></amplify-force-new-password>\n </amplify-slot>\n\n <!-- resetPassword content -->\n <amplify-slot\n name=\"reset-password\"\n [context]=\"context\"\n *ngIf=\"route === 'resetPassword'\"\n >\n <amplify-reset-password></amplify-reset-password>\n </amplify-slot>\n\n <!-- confirmResetPassword content -->\n <amplify-slot\n name=\"confirm-reset-password\"\n [context]=\"context\"\n *ngIf=\"route === 'confirmResetPassword'\"\n >\n <amplify-confirm-reset-password></amplify-confirm-reset-password>\n </amplify-slot>\n\n <!-- verifyUser content -->\n <amplify-slot\n name=\"verify-user\"\n [context]=\"context\"\n *ngIf=\"route === 'verifyUser'\"\n >\n <amplify-verify-user></amplify-verify-user>\n </amplify-slot>\n\n <!-- confirmVerifyUser content -->\n <amplify-slot\n name=\"confirm-verify-user\"\n [context]=\"context\"\n *ngIf=\"route === 'confirmVerifyUser'\"\n >\n <amplify-confirm-verify-user></amplify-confirm-verify-user>\n </amplify-slot>\n </div>\n\n <amplify-slot name=\"footer\" [context]=\"context\"></amplify-slot>\n </div>\n</div>\n\n<!-- signedIn content is rendered outside authenticator so it's not styled by authenticator -->\n<amplify-slot\n name=\"authenticated\"\n [context]=\"context\"\n *ngIf=\"route === 'authenticated'\"\n>\n <ng-content></ng-content>\n</amplify-slot>\n" }]
1286
+ }], ctorParameters: function () { return [{ type: AuthenticatorService }, { type: CustomComponentsService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { formFields: [{
1287
+ type: Input
1288
+ }], initialState: [{
1289
+ type: Input
1290
+ }], loginMechanisms: [{
1291
+ type: Input
1292
+ }], services: [{
1293
+ type: Input
1294
+ }], signUpAttributes: [{
1295
+ type: Input
1296
+ }], socialProviders: [{
1297
+ type: Input
1298
+ }], variation: [{
1299
+ type: Input
1300
+ }], hideSignUp: [{
1301
+ type: Input
1302
+ }], customComponentQuery: [{
1303
+ type: ContentChildren,
1304
+ args: [AmplifySlotDirective]
1305
+ }] } });
1306
+
1307
+ class CheckboxComponent {
1308
+ constructor() {
1309
+ this.defaultChecked = false;
1310
+ this.hasError = false;
1311
+ this.isChecked = false;
1312
+ }
1313
+ ngOnInit() {
1314
+ if (this.defaultChecked) {
1315
+ this.isChecked = true;
1316
+ }
1317
+ }
1318
+ handleClick() {
1319
+ this.isChecked = !this.isChecked;
1320
+ }
1321
+ }
1322
+ CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1323
+ CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CheckboxComponent, selector: "amplify-checkbox", inputs: { defaultChecked: "defaultChecked", errorMessage: "errorMessage", hasError: "hasError", label: "label", name: "name", value: "value" }, ngImport: i0, template: "<div class=\"amplify-flex amplify-field amplify-checkboxfield\">\n <label class=\"amplify-flex amplify-checkbox\">\n <span class=\"amplify-visually-hidden\">\n <input\n (click)=\"handleClick()\"\n class=\"\n amplify-input\n amplify-field-group__control\n amplify-checkbox__input\n \"\n aria-invalid=\"false\"\n type=\"checkbox\"\n [name]=\"name\"\n [value]=\"value\"\n />\n </span>\n <span\n class=\"amplify-flex amplify-checkbox__button\"\n aria-hidden=\"true\"\n data-focus=\"false\"\n [ngClass]=\"{\n 'amplify-checkbox__button--error': hasError\n }\"\n [attr.data-error]=\"hasError\"\n [attr.data-checked]=\"isChecked\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon amplify-checkbox__icon\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [attr.data-checked]=\"isChecked\"\n [ngClass]=\"{\n 'amplify-checkbox__icon--checked': isChecked\n }\"\n >\n <path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"></path>\n </svg>\n </span>\n <span class=\"amplify-text amplify-checkbox__label\">\n <ng-content></ng-content>\n </span>\n </label>\n <p *ngIf=\"hasError\" class=\"amplify-text amplify-field__error-message\">\n {{ errorMessage }}\n </p>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1324
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CheckboxComponent, decorators: [{
1325
+ type: Component,
1326
+ args: [{ selector: 'amplify-checkbox', template: "<div class=\"amplify-flex amplify-field amplify-checkboxfield\">\n <label class=\"amplify-flex amplify-checkbox\">\n <span class=\"amplify-visually-hidden\">\n <input\n (click)=\"handleClick()\"\n class=\"\n amplify-input\n amplify-field-group__control\n amplify-checkbox__input\n \"\n aria-invalid=\"false\"\n type=\"checkbox\"\n [name]=\"name\"\n [value]=\"value\"\n />\n </span>\n <span\n class=\"amplify-flex amplify-checkbox__button\"\n aria-hidden=\"true\"\n data-focus=\"false\"\n [ngClass]=\"{\n 'amplify-checkbox__button--error': hasError\n }\"\n [attr.data-error]=\"hasError\"\n [attr.data-checked]=\"isChecked\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon amplify-checkbox__icon\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [attr.data-checked]=\"isChecked\"\n [ngClass]=\"{\n 'amplify-checkbox__icon--checked': isChecked\n }\"\n >\n <path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"></path>\n </svg>\n </span>\n <span class=\"amplify-text amplify-checkbox__label\">\n <ng-content></ng-content>\n </span>\n </label>\n <p *ngIf=\"hasError\" class=\"amplify-text amplify-field__error-message\">\n {{ errorMessage }}\n </p>\n</div>\n" }]
1327
+ }], propDecorators: { defaultChecked: [{
1328
+ type: Input
1329
+ }], errorMessage: [{
1330
+ type: Input
1331
+ }], hasError: [{
1332
+ type: Input
1333
+ }], label: [{
1334
+ type: Input
1335
+ }], name: [{
1336
+ type: Input
1337
+ }], value: [{
1338
+ type: Input
1339
+ }] } });
1340
+
1341
+ class AmplifyAuthenticatorModule {
1342
+ }
1343
+ AmplifyAuthenticatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifyAuthenticatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1344
+ AmplifyAuthenticatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: AmplifyAuthenticatorModule, declarations: [AmplifySlotComponent,
1345
+ AmplifySlotDirective,
1346
+ AuthenticatorComponent,
1347
+ BaseFormFieldsComponent,
1348
+ ButtonComponent,
1349
+ CheckboxComponent,
1350
+ ConfirmResetPasswordComponent,
1351
+ ConfirmSignInComponent,
1352
+ ConfirmSignUpComponent,
1353
+ ConfirmVerifyUserComponent,
1354
+ ErrorComponent,
1355
+ FederatedSignInButtonComponent,
1356
+ FederatedSignInComponent,
1357
+ ForceNewPasswordComponent,
1358
+ ForceNewPasswordFormFieldsComponent,
1359
+ FormFieldComponent,
1360
+ PasswordFieldComponent,
1361
+ PhoneNumberFieldComponent,
1362
+ ResetPasswordComponent,
1363
+ SelectComponent,
1364
+ SetupTotpComponent,
1365
+ SignInComponent,
1366
+ SignUpComponent,
1367
+ SignUpFormFieldsComponent,
1368
+ TabItemComponent,
1369
+ TabsComponent,
1370
+ TextFieldComponent,
1371
+ VerifyUserComponent], imports: [CommonModule], exports: [AmplifySlotDirective,
1372
+ AuthenticatorComponent,
1373
+ CheckboxComponent,
1374
+ SignUpFormFieldsComponent,
1375
+ ForceNewPasswordFormFieldsComponent,
1376
+ TextFieldComponent] });
1377
+ AmplifyAuthenticatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifyAuthenticatorModule, imports: [CommonModule] });
1378
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifyAuthenticatorModule, decorators: [{
1379
+ type: NgModule,
1380
+ args: [{
1381
+ declarations: [
1382
+ AmplifySlotComponent,
1383
+ AmplifySlotDirective,
1384
+ AuthenticatorComponent,
1385
+ BaseFormFieldsComponent,
1386
+ ButtonComponent,
1387
+ CheckboxComponent,
1388
+ ConfirmResetPasswordComponent,
1389
+ ConfirmSignInComponent,
1390
+ ConfirmSignUpComponent,
1391
+ ConfirmVerifyUserComponent,
1392
+ ErrorComponent,
1393
+ FederatedSignInButtonComponent,
1394
+ FederatedSignInComponent,
1395
+ ForceNewPasswordComponent,
1396
+ ForceNewPasswordFormFieldsComponent,
1397
+ FormFieldComponent,
1398
+ PasswordFieldComponent,
1399
+ PhoneNumberFieldComponent,
1400
+ ResetPasswordComponent,
1401
+ SelectComponent,
1402
+ SetupTotpComponent,
1403
+ SignInComponent,
1404
+ SignUpComponent,
1405
+ SignUpFormFieldsComponent,
1406
+ TabItemComponent,
1407
+ TabsComponent,
1408
+ TextFieldComponent,
1409
+ VerifyUserComponent,
1410
+ ],
1411
+ imports: [CommonModule],
1412
+ exports: [
1413
+ AmplifySlotDirective,
1414
+ AuthenticatorComponent,
1415
+ CheckboxComponent,
1416
+ SignUpFormFieldsComponent,
1417
+ ForceNewPasswordFormFieldsComponent,
1418
+ TextFieldComponent,
1419
+ ],
1420
+ }]
1421
+ }] });
1422
+
1423
+ /*
1424
+ * Public API Surface of ui-angular
1425
+ */
1426
+
1427
+ /**
1428
+ * Generated bundle index. Do not edit.
1429
+ */
1430
+
1431
+ export { AmplifyAuthenticatorModule, AmplifySlotDirective, AuthenticatorComponent, AuthenticatorService, BaseFormFieldsComponent, ButtonComponent, CheckboxComponent, ConfirmResetPasswordComponent, ConfirmSignInComponent, ConfirmSignUpComponent, ConfirmVerifyUserComponent, CustomComponentsService, ErrorComponent, FederatedSignInButtonComponent, FederatedSignInComponent, ForceNewPasswordComponent, ForceNewPasswordFormFieldsComponent, FormFieldComponent, PasswordFieldComponent, PhoneNumberFieldComponent, ResetPasswordComponent, SelectComponent, SetupTotpComponent, SignInComponent, SignUpComponent, SignUpFormFieldsComponent, TabItemComponent, TabsComponent, TextFieldComponent, VerifyUserComponent, getAttributeMap };
1432
+ //# sourceMappingURL=aws-amplify-ui-angular.mjs.map