{"version":3,"sources":["../node_modules/@aws-amplify/ui-react/node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-authenticator.entry.js","../node_modules/@aws-amplify/ui-react/node_modules/@aws-amplify/ui-components/dist/esm-es5/Translations-108d469f.js","../node_modules/@aws-amplify/ui-react/node_modules/@aws-amplify/ui-components/dist/esm-es5/constants-c8ecaa24.js","../node_modules/@aws-amplify/ui-react/node_modules/@aws-amplify/ui-components/dist/esm-es5/auth-types-78df304e.js","../node_modules/@aws-amplify/ui-react/node_modules/@aws-amplify/ui-components/dist/esm-es5/helpers-14fcb50c.js","../node_modules/@aws-amplify/ui-react/node_modules/@aws-amplify/ui-components/dist/esm-es5/auth-helpers-557b83fc.js"],"names":["_a","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","Symbol","iterator","this","n","v","op","TypeError","call","pop","length","push","authSlotNames","AuthState","SignIn","ConfirmSignIn","SignUp","ConfirmSignUp","ForgotPassword","ResetPassword","VerifyContact","TOTPSetup","Loading","logger","Logger","AmplifyAuthenticator","class_1","hostRef","_this","registerInstance","initialAuthState","handleAuthStateChange","hideToast","authState","toastMessage","handleExternalAuthEvent","payload","event","checkContact","data","dispatchAuthStateChangeEvent","handleToastEvent","TOAST_AUTH_ERROR_EVENT","message","prototype","componentWillLoad","onAuthUIStateChange","authData","onAuthStateChange","Hub","listen","UI_AUTH_CHANNEL","AUTH_CHANNEL","appendToCognitoUserAgent","checkUser","Auth","currentAuthenticatedUser","Error","NO_AUTH_MODULE_FOUND","user","SignedIn","catch","nextAuthState","undefined","error","info","SignedOut","log","getAuthComponent","h","federated","usernameAlias","getSlotWithAuthComponent","authComponent","slotName","slotIsEmpty","el","querySelector","name","disconnectedCallback","remove","render","Host","handleClose","class","Object","defineProperty","get","getElement","enumerable","configurable","style","AuthStrings","InteractionsStrings","Translations","assign","AuthErrorStrings","USERNAME_SUFFIX","EMAIL_SUFFIX","CODE_SUFFIX","PHONE_SUFFIX","PASSWORD_SUFFIX","COUNTRY_DIAL_CODE_SUFFIX","COUNTRY_DIAL_CODE_DEFAULT","AUTH_SOURCE_KEY","PHONE_EMPTY_ERROR_MESSAGE","NO_STORAGE_MODULE_FOUND","NO_INTERACTIONS_MODULE_FOUND","USER_NOT_SETUP_SOFTWARE_TOKEN_MFA","USER_NOT_VERIFIED_SOFTWARE_TOKEN_MFA","AUTH_STATE_CHANGE_EVENT","MfaOption","ChallengeName","AuthFormField","UsernameAlias","closestElement","selector","base","_closestFrom","document","window","matches","assignedSlot","found","closest","getRootNode","host","dispatchToastHubEvent","dispatch","I18n","composePhoneNumberInput","phoneNumber","phoneNumberValue","sanitizedPhoneNumberValue","replace","countryDialCodeValue","checkUsernameAlias","values","authStateHandler","authUIStateHandler","_b","isHintValid","field","getRequiredAttributesMap","address","ADDRESS_LABEL","placeholder","ADDRESS_PLACEHOLDER","nickname","NICKNAME_LABEL","NICKNAME_PLACEHOLDER","birthdate","BIRTHDATE_LABEL","BIRTHDATE_PLACEHOLDER","phone_number","PHONE_LABEL","PHONE_PLACEHOLDER","email","lable","EMAIL_LABEL","EMAIL_PLACEHOLDER","picture","PICTURE_LABEL","PICTURE_PLACEHOLDER","family_name","FAMILY_NAME_LABEL","FAMILY_NAME_PLACEHOLDER","preferred_username","PREFERRED_USERNAME_LABEL","PREFERRED_USERNAME_PLACEHOLDER","gender","GENDER_LABEL","GENDER_PLACEHOLDER","profile","PROFILE_LABEL","PROFILE_PLACEHOLDER","given_name","GIVEN_NAME_LABEL","GIVEN_NAME_PLACEHOLDER","zoneinfo","ZONEINFO_LABEL","ZONEINFO_PLACEHOLDER","locale","LOCALE_LABEL","LOCALE_PLACEHOLDER","updated_at","UPDATED_AT_LABEL","UPDATED_AT_PLACEHOLDER","middle_name","MIDDLE_NAME_LABEL","MIDDLE_NAME_PLACEHOLDER","website","WEBSITE_LABEL","WEBSITE_PLACEHOLDER","NAME_LABEL","NAME_PLACEHOLDER","handlePhoneNumberChange","target","newUser","error_1","verifiedContact","isCognitoUser","isEmpty","verified","unverified","handleSignIn","username","password","error_2","signIn","debug","challengeName","SMSMFA","SoftwareTokenMFA","NewPasswordRequired","challengeParam","MFASetup","CustomChallenge","trigger","CustomConfirmSignIn","code","EMPTY_PASSWORD","EMPTY_USERNAME","EMPTY_EMAIL","EMPTY_PHONE","CognitoUser"],"mappings":"4FAAA,iEAoCIA,EApCJ,wFAAIC,EAAwC,SAAUC,EAASC,EAAYC,EAAGC,GAE1E,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAS,CAAE,MAAOG,GAAKL,EAAOK,EAAI,CAAE,CAC1F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAS,CAAE,MAAOG,GAAKL,EAAOK,EAAI,CAAE,CAC7F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK,EAAOL,MAJhDA,aAAiBN,EAAIM,EAAQ,IAAIN,GAAE,SAAUG,GAAWA,EAAQG,EAAQ,KAIjBO,KAAKR,EAAWK,EAAW,CAC7GH,GAAMN,EAAYA,EAAUa,MAAMhB,EAASC,GAAc,KAAKS,OAClE,GACJ,EACIO,EAA4C,SAAUjB,EAASkB,GAC/D,IAAsGC,EAAGC,EAAGC,EAAGC,EAA3GC,EAAI,CAAEC,MAAO,EAAGC,KAAM,WAAa,GAAW,EAAPJ,EAAE,GAAQ,MAAMA,EAAE,GAAI,OAAOA,EAAE,EAAI,EAAGK,KAAM,GAAIC,IAAK,IAChG,OAAOL,EAAI,CAAEZ,KAAMkB,EAAK,GAAI,MAASA,EAAK,GAAI,OAAUA,EAAK,IAAwB,oBAAXC,SAA0BP,EAAEO,OAAOC,UAAY,WAAa,OAAOC,IAAM,GAAIT,EACvJ,SAASM,EAAKI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,KAAbb,GACrDxL,EAAO2L,MAAM,4BACbF,EAAQrK,QAAUmD,IAAa+H,gBAE1Bb,EAAQrK,UAAYmD,IAAagI,iBAClCvJ,IAAkB2C,IAAc2C,QAChCmD,EAAQrK,QAAUmD,IAAaiI,aAE/BxJ,IAAkB2C,IAAcwC,eAChCsD,EAAQrK,QAAUmD,IAAakI,cAGvCjG,YAAsBiF,GACf,CAAC,EAAa,IACzB,KAAK,GAAI,MAAO,CAAC,GAEzB,GACJ,GAAI,EACAP,EAAgB,SAAU9I,GAC1B,OAAOA,aAAgBsK,GAC3B,C","file":"static/js/6.e34cd6d3.chunk.js","sourcesContent":["var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar _a;\nimport { r as registerInstance, h, H as Host, g as getElement } from './index-83f2275b.js';\nimport { Logger, Hub } from '@aws-amplify/core';\nimport { A as AuthState } from './auth-types-78df304e.js';\nimport { appendToCognitoUserAgent, Auth } from '@aws-amplify/auth';\nimport './Translations-108d469f.js';\nimport { T as TOAST_AUTH_ERROR_EVENT, U as UI_AUTH_CHANNEL, A as AUTH_CHANNEL, N as NO_AUTH_MODULE_FOUND } from './constants-c8ecaa24.js';\nimport { d as dispatchAuthStateChangeEvent, o as onAuthUIStateChange } from './helpers-14fcb50c.js';\nimport { c as checkContact } from './auth-helpers-557b83fc.js';\nvar authSlotNames = (_a = {},\n _a[AuthState.SignIn] = 'sign-in',\n _a[AuthState.ConfirmSignIn] = 'confirm-sign-in',\n _a[AuthState.SignUp] = 'sign-up',\n _a[AuthState.ConfirmSignUp] = 'confirm-sign-up',\n _a[AuthState.ForgotPassword] = 'forgot-password',\n _a[AuthState.ResetPassword] = 'require-new-password',\n _a[AuthState.VerifyContact] = 'verify-contact',\n _a[AuthState.TOTPSetup] = 'totp-setup',\n _a[AuthState.Loading] = 'loading',\n _a);\nvar amplifyAuthenticatorCss = \":host{--background-color:var(--amplify-background-color);--width:28.75rem;--min-width:20rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--box-shadow:1px 1px 4px 0 rgba(0, 0, 0, 0.15);--border-radius:6px;--padding:35px 40px;--margin-bottom:20px;--container-height:100vh;--container-display:flex;--container-justify:center;--container-align:center}.auth-container{display:var(--container-display);-ms-flex-pack:var(--container-justify);justify-content:var(--container-justify);-ms-flex-align:var(--container-align);align-items:var(--container-align);min-height:var(--container-height)}\";\nvar logger = new Logger('Authenticator');\nvar AmplifyAuthenticator = /** @class */ (function () {\n function class_1(hostRef) {\n var _this = this;\n registerInstance(this, hostRef);\n /** Initial starting state of the Authenticator component. E.g. If `signup` is passed the default component is set to AmplifySignUp */\n this.initialAuthState = AuthState.SignIn;\n /** Callback for Authenticator state machine changes */\n this.handleAuthStateChange = function () { };\n /** Hide amplify-toast for auth errors */\n this.hideToast = false;\n this.authState = AuthState.Loading;\n this.toastMessage = '';\n this.handleExternalAuthEvent = function (_a) {\n var payload = _a.payload;\n switch (payload.event) {\n case 'cognitoHostedUI':\n case 'signIn':\n checkContact(payload.data, dispatchAuthStateChangeEvent);\n break;\n case 'cognitoHostedUI_failure':\n case 'parsingUrl_failure':\n case 'signOut':\n case 'customGreetingSignOut':\n return dispatchAuthStateChangeEvent(_this.initialAuthState);\n }\n };\n this.handleToastEvent = function (_a) {\n var payload = _a.payload;\n switch (payload.event) {\n case TOAST_AUTH_ERROR_EVENT:\n if (payload.message)\n _this.toastMessage = payload.message;\n break;\n }\n };\n }\n class_1.prototype.componentWillLoad = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n onAuthUIStateChange(function (authState, authData) {\n _this.onAuthStateChange(authState, authData);\n _this.toastMessage = '';\n });\n if (!this.hideToast)\n Hub.listen(UI_AUTH_CHANNEL, this.handleToastEvent);\n Hub.listen(AUTH_CHANNEL, this.handleExternalAuthEvent);\n appendToCognitoUserAgent('amplify-authenticator');\n return [4 /*yield*/, this.checkUser()];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n class_1.prototype.checkUser = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n if (!Auth || typeof Auth.currentAuthenticatedUser !== 'function') {\n throw new Error(NO_AUTH_MODULE_FOUND);\n }\n return [2 /*return*/, Auth.currentAuthenticatedUser()\n .then(function (user) {\n dispatchAuthStateChangeEvent(AuthState.SignedIn, user);\n })\n .catch(function () {\n dispatchAuthStateChangeEvent(_this.initialAuthState);\n })];\n });\n });\n };\n class_1.prototype.onAuthStateChange = function (nextAuthState, data) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (nextAuthState === undefined)\n return [2 /*return*/, logger.error('nextAuthState cannot be undefined')];\n logger.info('Inside onAuthStateChange Method current authState:', this.authState);\n if (nextAuthState === AuthState.SignedOut) {\n this.authState = this.initialAuthState;\n }\n else {\n this.authState = nextAuthState;\n }\n this.authData = data;\n if (this.authData)\n logger.log('Auth Data was set:', this.authData);\n if (this.authState === nextAuthState) {\n this.handleAuthStateChange(this.authState, this.authData);\n logger.info(\"authState has been updated to \" + this.authState);\n }\n return [2 /*return*/];\n });\n });\n };\n // Returns the auth component corresponding to the given authState.\n class_1.prototype.getAuthComponent = function (authState) {\n switch (authState) {\n case AuthState.SignIn:\n return (h(\"amplify-sign-in\", { federated: this.federated, usernameAlias: this.usernameAlias }));\n case AuthState.ConfirmSignIn:\n return h(\"amplify-confirm-sign-in\", { user: this.authData });\n case AuthState.SignUp:\n return h(\"amplify-sign-up\", { usernameAlias: this.usernameAlias });\n case AuthState.ConfirmSignUp:\n return (h(\"amplify-confirm-sign-up\", { user: this.authData, usernameAlias: this.usernameAlias }));\n case AuthState.ForgotPassword:\n return h(\"amplify-forgot-password\", { usernameAlias: this.usernameAlias });\n case AuthState.ResetPassword:\n return h(\"amplify-require-new-password\", { user: this.authData });\n case AuthState.VerifyContact:\n return h(\"amplify-verify-contact\", { user: this.authData });\n case AuthState.TOTPSetup:\n return h(\"amplify-totp-setup\", { user: this.authData });\n case AuthState.Loading:\n return h(\"div\", null, \"Loading...\");\n default:\n throw new Error(\"Unhandled auth state: \" + authState);\n }\n };\n // Returns a slot containing the Auth component corresponding to the given authState\n class_1.prototype.getSlotWithAuthComponent = function (authState) {\n var authComponent = this.getAuthComponent(authState);\n var slotName = authSlotNames[authState];\n var slotIsEmpty = this.el.querySelector(\"[slot=\\\"\" + slotName + \"\\\"]\") === null; // true if no element has been inserted to the slot\n /**\n * Connect the inner auth component to DOM only if the slot hasn't been overwritten. This prevents\n * the overwritten component from calling its lifecycle methods.\n */\n return h(\"slot\", { name: slotName }, slotIsEmpty && authComponent);\n };\n class_1.prototype.disconnectedCallback = function () {\n Hub.remove(AUTH_CHANNEL, this.handleExternalAuthEvent);\n if (!this.hideToast)\n Hub.remove(UI_AUTH_CHANNEL, this.handleToastEvent);\n return onAuthUIStateChange;\n };\n class_1.prototype.render = function () {\n var _this = this;\n return (h(Host, null, !this.hideToast && this.toastMessage && (h(\"amplify-toast\", { message: this.toastMessage, handleClose: function () {\n _this.toastMessage = '';\n }, \"data-test\": \"authenticator-error\" })), this.authState === AuthState.SignedIn ? ([h(\"slot\", { name: \"greetings\" }), h(\"slot\", null)]) : (h(\"div\", { class: \"auth-container\" }, this.getSlotWithAuthComponent(this.authState)))));\n };\n Object.defineProperty(class_1.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: false,\n configurable: true\n });\n return class_1;\n}());\nAmplifyAuthenticator.style = amplifyAuthenticatorCss;\nexport { AmplifyAuthenticator as amplify_authenticator };\n","import { AuthErrorStrings } from '@aws-amplify/auth';\nvar AuthStrings;\n(function (AuthStrings) {\n AuthStrings[\"BACK_TO_SIGN_IN\"] = \"Back to Sign In\";\n AuthStrings[\"CHANGE_PASSWORD_ACTION\"] = \"Change\";\n AuthStrings[\"CHANGE_PASSWORD\"] = \"Change Password\";\n AuthStrings[\"CODE_LABEL\"] = \"Verification code\";\n AuthStrings[\"CODE_PLACEHOLDER\"] = \"Enter code\";\n AuthStrings[\"CONFIRM_SIGN_UP_CODE_LABEL\"] = \"Confirmation Code\";\n AuthStrings[\"CONFIRM_SIGN_UP_CODE_PLACEHOLDER\"] = \"Enter your code\";\n AuthStrings[\"CONFIRM_SIGN_UP_HEADER_TEXT\"] = \"Confirm Sign up\";\n AuthStrings[\"CONFIRM_SIGN_UP_LOST_CODE\"] = \"Lost your code?\";\n AuthStrings[\"CONFIRM_SIGN_UP_RESEND_CODE\"] = \"Resend Code\";\n AuthStrings[\"CONFIRM_SIGN_UP_SUBMIT_BUTTON_TEXT\"] = \"Confirm\";\n AuthStrings[\"CONFIRM_SMS_CODE\"] = \"Confirm SMS Code\";\n AuthStrings[\"CONFIRM_TOTP_CODE\"] = \"Confirm TOTP Code\";\n AuthStrings[\"CONFIRM\"] = \"Confirm\";\n AuthStrings[\"CREATE_ACCOUNT_TEXT\"] = \"Create account\";\n AuthStrings[\"EMAIL_LABEL\"] = \"Email Address *\";\n AuthStrings[\"EMAIL_PLACEHOLDER\"] = \"Enter your email address\";\n AuthStrings[\"FORGOT_PASSWORD_TEXT\"] = \"Forgot your password?\";\n AuthStrings[\"LESS_THAN_TWO_MFA_VALUES_MESSAGE\"] = \"Less than two MFA types available\";\n AuthStrings[\"NEW_PASSWORD_LABEL\"] = \"New password\";\n AuthStrings[\"NEW_PASSWORD_PLACEHOLDER\"] = \"Enter your new password\";\n AuthStrings[\"NO_ACCOUNT_TEXT\"] = \"No account?\";\n AuthStrings[\"USERNAME_REMOVE_WHITESPACE\"] = \"Username cannot contain whitespace\";\n AuthStrings[\"PASSWORD_REMOVE_WHITESPACE\"] = \"Password cannot start or end with whitespace\";\n AuthStrings[\"PASSWORD_LABEL\"] = \"Password *\";\n AuthStrings[\"PASSWORD_PLACEHOLDER\"] = \"Enter your password\";\n AuthStrings[\"PHONE_LABEL\"] = \"Phone Number *\";\n AuthStrings[\"PHONE_PLACEHOLDER\"] = \"(555) 555-1212\";\n AuthStrings[\"QR_CODE_ALT\"] = \"qrcode\";\n AuthStrings[\"RESET_PASSWORD_TEXT\"] = \"Reset password\";\n AuthStrings[\"RESET_YOUR_PASSWORD\"] = \"Reset your password\";\n AuthStrings[\"SELECT_MFA_TYPE_HEADER_TEXT\"] = \"Select MFA Type\";\n AuthStrings[\"SELECT_MFA_TYPE_SUBMIT_BUTTON_TEXT\"] = \"Verify\";\n AuthStrings[\"SEND_CODE\"] = \"Send Code\";\n AuthStrings[\"SUBMIT\"] = \"Submit\";\n AuthStrings[\"SETUP_TOTP_REQUIRED\"] = \"TOTP needs to be configured\";\n AuthStrings[\"SIGN_IN_ACTION\"] = \"Sign In\";\n AuthStrings[\"SIGN_IN_HEADER_TEXT\"] = \"Sign in to your account\";\n AuthStrings[\"SIGN_IN_TEXT\"] = \"Sign in\";\n AuthStrings[\"SIGN_IN_WITH_AMAZON\"] = \"Sign in with Amazon\";\n AuthStrings[\"SIGN_IN_WITH_AUTH0\"] = \"Sign in with Auth0\";\n AuthStrings[\"SIGN_IN_WITH_AWS\"] = \"Sign in with AWS\";\n AuthStrings[\"SIGN_IN_WITH_FACEBOOK\"] = \"Sign in with Facebook\";\n AuthStrings[\"SIGN_IN_WITH_GOOGLE\"] = \"Sign in with Google\";\n AuthStrings[\"SIGN_OUT\"] = \"Sign Out\";\n AuthStrings[\"SIGN_UP_EMAIL_PLACEHOLDER\"] = \"Email\";\n AuthStrings[\"SIGN_UP_HAVE_ACCOUNT_TEXT\"] = \"Have an account?\";\n AuthStrings[\"SIGN_UP_HEADER_TEXT\"] = \"Create a new account\";\n AuthStrings[\"SIGN_UP_PASSWORD_PLACEHOLDER\"] = \"Password\";\n AuthStrings[\"SIGN_UP_SUBMIT_BUTTON_TEXT\"] = \"Create Account\";\n AuthStrings[\"SIGN_UP_USERNAME_PLACEHOLDER\"] = \"Username\";\n AuthStrings[\"SKIP\"] = \"Skip\";\n AuthStrings[\"SUCCESS_MFA_TYPE\"] = \"Success! Your MFA Type is now:\";\n AuthStrings[\"TOTP_HEADER_TEXT\"] = \"Scan then enter verification code\";\n AuthStrings[\"TOTP_LABEL\"] = \"Enter Security Code:\";\n AuthStrings[\"TOTP_ISSUER\"] = \"AWSCognito\";\n AuthStrings[\"TOTP_SETUP_FAILURE\"] = \"TOTP Setup has failed\";\n AuthStrings[\"TOTP_SUBMIT_BUTTON_TEXT\"] = \"Verify Security Token\";\n AuthStrings[\"TOTP_SUCCESS_MESSAGE\"] = \"Setup TOTP successfully!\";\n AuthStrings[\"UNABLE_TO_SETUP_MFA_AT_THIS_TIME\"] = \"Failed! Unable to configure MFA at this time\";\n AuthStrings[\"USERNAME_LABEL\"] = \"Username *\";\n AuthStrings[\"USERNAME_PLACEHOLDER\"] = \"Enter your username\";\n AuthStrings[\"VERIFY_CONTACT_EMAIL_LABEL\"] = \"Email\";\n AuthStrings[\"VERIFY_CONTACT_HEADER_TEXT\"] = \"Account recovery requires verified contact information\";\n AuthStrings[\"VERIFY_CONTACT_PHONE_LABEL\"] = \"Phone Number\";\n AuthStrings[\"VERIFY_CONTACT_SUBMIT_LABEL\"] = \"Submit\";\n AuthStrings[\"VERIFY_CONTACT_VERIFY_LABEL\"] = \"Verify\";\n AuthStrings[\"ADDRESS_LABEL\"] = \"Address\";\n AuthStrings[\"ADDRESS_PLACEHOLDER\"] = \"Enter your address\";\n AuthStrings[\"NICKNAME_LABEL\"] = \"Nickname\";\n AuthStrings[\"NICKNAME_PLACEHOLDER\"] = \"Enter your nickname\";\n AuthStrings[\"BIRTHDATE_LABEL\"] = \"Birthday\";\n AuthStrings[\"BIRTHDATE_PLACEHOLDER\"] = \"Enter your birthday\";\n AuthStrings[\"PICTURE_LABEL\"] = \"Picture URL\";\n AuthStrings[\"PICTURE_PLACEHOLDER\"] = \"Enter your picture URL\";\n AuthStrings[\"FAMILY_NAME_LABEL\"] = \"Family Name\";\n AuthStrings[\"FAMILY_NAME_PLACEHOLDER\"] = \"Enter your family name\";\n AuthStrings[\"PREFERRED_USERNAME_LABEL\"] = \"Preferred Username\";\n AuthStrings[\"PREFERRED_USERNAME_PLACEHOLDER\"] = \"Enter your preferred username\";\n AuthStrings[\"GENDER_LABEL\"] = \"Gender\";\n AuthStrings[\"GENDER_PLACEHOLDER\"] = \"Enter your gender\";\n AuthStrings[\"PROFILE_LABEL\"] = \"Profile URL\";\n AuthStrings[\"PROFILE_PLACEHOLDER\"] = \"Enter your profile URL\";\n AuthStrings[\"GIVEN_NAME_LABEL\"] = \"First Name\";\n AuthStrings[\"GIVEN_NAME_PLACEHOLDER\"] = \"Enter your first name\";\n AuthStrings[\"ZONEINFO_LABEL\"] = \"Time zone\";\n AuthStrings[\"ZONEINFO_PLACEHOLDER\"] = \"Enter your time zone\";\n AuthStrings[\"LOCALE_LABEL\"] = \"Locale\";\n AuthStrings[\"LOCALE_PLACEHOLDER\"] = \"Enter your locale\";\n AuthStrings[\"UPDATED_AT_LABEL\"] = \"Updated At\";\n AuthStrings[\"UPDATED_AT_PLACEHOLDER\"] = \"Enter the time the information was last updated\";\n AuthStrings[\"MIDDLE_NAME_LABEL\"] = \"Middle Name\";\n AuthStrings[\"MIDDLE_NAME_PLACEHOLDER\"] = \"Enter your middle name\";\n AuthStrings[\"WEBSITE_LABEL\"] = \"Website\";\n AuthStrings[\"WEBSITE_PLACEHOLDER\"] = \"Enter your website\";\n AuthStrings[\"NAME_LABEL\"] = \"Full Name\";\n AuthStrings[\"NAME_PLACEHOLDER\"] = \"Enter your full name\";\n AuthStrings[\"PHOTO_PICKER_TITLE\"] = \"Picker Title\";\n AuthStrings[\"PHOTO_PICKER_HINT\"] = \"Ancillary text or content may occupy this space here\";\n AuthStrings[\"PHOTO_PICKER_PLACEHOLDER_HINT\"] = \"Placeholder hint\";\n AuthStrings[\"PHOTO_PICKER_BUTTON_TEXT\"] = \"Button\";\n AuthStrings[\"IMAGE_PICKER_TITLE\"] = \"Add Profile Photo\";\n AuthStrings[\"IMAGE_PICKER_HINT\"] = \"Preview the image before upload\";\n AuthStrings[\"IMAGE_PICKER_PLACEHOLDER_HINT\"] = \"Tap to image select\";\n AuthStrings[\"IMAGE_PICKER_BUTTON_TEXT\"] = \"Upload\";\n AuthStrings[\"PICKER_TEXT\"] = \"Pick a file\";\n AuthStrings[\"TEXT_FALLBACK_CONTENT\"] = \"Fallback Content\";\n AuthStrings[\"CONFIRM_SIGN_UP_FAILED\"] = \"Confirm Sign Up Failed\";\n AuthStrings[\"SIGN_UP_FAILED\"] = \"Sign Up Failed\";\n})(AuthStrings || (AuthStrings = {}));\nvar InteractionsStrings;\n(function (InteractionsStrings) {\n InteractionsStrings[\"CHATBOT_TITLE\"] = \"ChatBot Lex\";\n InteractionsStrings[\"TEXT_INPUT_PLACEHOLDER\"] = \"Write a message\";\n InteractionsStrings[\"VOICE_INPUT_PLACEHOLDER\"] = \"Click mic to speak\";\n InteractionsStrings[\"CHAT_DISABLED_ERROR\"] = \"Error: Either voice or text must be enabled for the chatbot\";\n InteractionsStrings[\"NO_BOT_NAME_ERROR\"] = \"Error: Bot name must be provided to ChatBot\";\n})(InteractionsStrings || (InteractionsStrings = {}));\nvar Translations = Object.assign(Object.assign(Object.assign({}, AuthStrings), AuthErrorStrings), InteractionsStrings);\nexport { Translations as T };\n","// Dictionaries\n// fieldId constants\nvar USERNAME_SUFFIX = 'username';\nvar EMAIL_SUFFIX = 'email';\nvar CODE_SUFFIX = 'code';\nvar PHONE_SUFFIX = 'phone';\nvar PASSWORD_SUFFIX = 'password';\n// Country Dial Code common constants\nvar COUNTRY_DIAL_CODE_SUFFIX = 'country-dial-code-select';\nvar COUNTRY_DIAL_CODE_DEFAULT = '+1';\n// Auth Keys\nvar AUTH_SOURCE_KEY = 'amplify-auth-source';\n// Error message Common Constants\nvar PHONE_EMPTY_ERROR_MESSAGE = 'Phone number can not be empty';\nvar NO_AUTH_MODULE_FOUND = 'No Auth module found, please ensure @aws-amplify/auth is imported';\nvar NO_STORAGE_MODULE_FOUND = 'No Storage module found, please ensure @aws-amplify/storage is imported';\nvar NO_INTERACTIONS_MODULE_FOUND = 'No Interactions module found, please ensure @aws-amplify/interactions is imported';\n// Select MFA Types Messages\nvar USER_NOT_SETUP_SOFTWARE_TOKEN_MFA = 'User has not set up software token mfa';\nvar USER_NOT_VERIFIED_SOFTWARE_TOKEN_MFA = 'User has not verified software token mfa';\n// Hub Events and Channels\nvar AUTH_CHANNEL = 'auth';\nvar UI_AUTH_CHANNEL = 'UI Auth';\nvar TOAST_AUTH_ERROR_EVENT = 'ToastAuthError';\nvar AUTH_STATE_CHANGE_EVENT = 'AuthStateChange';\nexport { AUTH_CHANNEL as A, COUNTRY_DIAL_CODE_SUFFIX as C, EMAIL_SUFFIX as E, NO_AUTH_MODULE_FOUND as N, PHONE_EMPTY_ERROR_MESSAGE as P, TOAST_AUTH_ERROR_EVENT as T, UI_AUTH_CHANNEL as U, AUTH_STATE_CHANGE_EVENT as a, PHONE_SUFFIX as b, NO_INTERACTIONS_MODULE_FOUND as c, NO_STORAGE_MODULE_FOUND as d, USER_NOT_SETUP_SOFTWARE_TOKEN_MFA as e, USER_NOT_VERIFIED_SOFTWARE_TOKEN_MFA as f, COUNTRY_DIAL_CODE_DEFAULT as g, AUTH_SOURCE_KEY as h, CODE_SUFFIX as i, PASSWORD_SUFFIX as j, USERNAME_SUFFIX as k };\n","// TODO: Move these values to or extract them from the Cognito Provider in the Auth category for Auth V2\nvar AuthState;\n(function (AuthState) {\n AuthState[\"SignUp\"] = \"signup\";\n AuthState[\"SignOut\"] = \"signout\";\n AuthState[\"SignIn\"] = \"signin\";\n AuthState[\"Loading\"] = \"loading\";\n AuthState[\"SignedOut\"] = \"signedout\";\n AuthState[\"SignedIn\"] = \"signedin\";\n AuthState[\"SigningUp\"] = \"signingup\";\n AuthState[\"ConfirmSignUp\"] = \"confirmSignUp\";\n AuthState[\"confirmingSignUpCustomFlow\"] = \"confirmsignupcustomflow\";\n AuthState[\"ConfirmSignIn\"] = \"confirmSignIn\";\n AuthState[\"confirmingSignInCustomFlow\"] = \"confirmingsignincustomflow\";\n AuthState[\"VerifyingAttributes\"] = \"verifyingattributes\";\n AuthState[\"ForgotPassword\"] = \"forgotpassword\";\n AuthState[\"ResetPassword\"] = \"resettingpassword\";\n AuthState[\"SettingMFA\"] = \"settingMFA\";\n AuthState[\"TOTPSetup\"] = \"TOTPSetup\";\n AuthState[\"CustomConfirmSignIn\"] = \"customConfirmSignIn\";\n AuthState[\"VerifyContact\"] = \"verifyContact\";\n})(AuthState || (AuthState = {}));\nvar MfaOption;\n(function (MfaOption) {\n MfaOption[\"TOTP\"] = \"TOTP\";\n MfaOption[\"SMS\"] = \"SMS\";\n MfaOption[\"NOMFA\"] = \"NOMFA\";\n})(MfaOption || (MfaOption = {}));\nvar ChallengeName;\n(function (ChallengeName) {\n ChallengeName[\"SoftwareTokenMFA\"] = \"SOFTWARE_TOKEN_MFA\";\n ChallengeName[\"SMSMFA\"] = \"SMS_MFA\";\n ChallengeName[\"NewPasswordRequired\"] = \"NEW_PASSWORD_REQUIRED\";\n ChallengeName[\"MFASetup\"] = \"MFA_SETUP\";\n ChallengeName[\"CustomChallenge\"] = \"CUSTOM_CHALLENGE\";\n})(ChallengeName || (ChallengeName = {}));\nvar AuthFormField;\n(function (AuthFormField) {\n AuthFormField[\"Password\"] = \"password\";\n})(AuthFormField || (AuthFormField = {}));\nvar UsernameAlias;\n(function (UsernameAlias) {\n UsernameAlias[\"username\"] = \"username\";\n UsernameAlias[\"email\"] = \"email\";\n UsernameAlias[\"phone_number\"] = \"phone_number\";\n})(UsernameAlias || (UsernameAlias = {}));\nexport { AuthState as A, ChallengeName as C, MfaOption as M, UsernameAlias as U, AuthFormField as a };\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { Logger, Hub, I18n } from '@aws-amplify/core';\nimport { U as UsernameAlias, A as AuthState } from './auth-types-78df304e.js';\nimport Auth from '@aws-amplify/auth';\nimport { T as Translations } from './Translations-108d469f.js';\nimport { U as UI_AUTH_CHANNEL, T as TOAST_AUTH_ERROR_EVENT, a as AUTH_STATE_CHANGE_EVENT, P as PHONE_EMPTY_ERROR_MESSAGE, C as COUNTRY_DIAL_CODE_SUFFIX, b as PHONE_SUFFIX } from './constants-c8ecaa24.js';\nvar logger = new Logger('helpers');\n/**\n * Finds closest element that matches the selector from the ancestor tree.\n * Trasverses through shadow DOM and slots.\n *\n * Adpated from: https://stackoverflow.com/a/56105394\n */\nvar closestElement = function (selector, base) {\n function _closestFrom(el) {\n if (!el || el === document || el === window)\n return null;\n if (el.matches(selector))\n return base; // return if current element matches the selector\n if (el.assignedSlot)\n el = el.assignedSlot; // traverse up slots if slotted\n var found = el.closest(selector);\n return found ? found : _closestFrom(el.getRootNode().host); // try to traverse up shadows\n }\n return _closestFrom(base);\n};\nvar dispatchToastHubEvent = function (error) {\n Hub.dispatch(UI_AUTH_CHANNEL, {\n event: TOAST_AUTH_ERROR_EVENT,\n message: I18n.get(error.message),\n });\n};\nvar dispatchAuthStateChangeEvent = function (nextAuthState, data) {\n Hub.dispatch(UI_AUTH_CHANNEL, {\n event: AUTH_STATE_CHANGE_EVENT,\n message: nextAuthState,\n data: data,\n });\n};\nvar composePhoneNumberInput = function (phoneNumber) {\n if (!phoneNumber.phoneNumberValue) {\n throw new Error(PHONE_EMPTY_ERROR_MESSAGE);\n }\n var sanitizedPhoneNumberValue = phoneNumber.phoneNumberValue.replace(/[-()\\s]/g, '');\n return \"\" + phoneNumber.countryDialCodeValue + sanitizedPhoneNumberValue;\n};\nvar checkUsernameAlias = function (usernameAlias) {\n if (!(usernameAlias in UsernameAlias)) {\n throw new Error(\"Invalid username Alias - \" + usernameAlias + \". Instead use \" + Object.values(UsernameAlias));\n }\n};\nvar onAuthUIStateChange = function (authStateHandler) {\n var authUIStateHandler = function (data) { return __awaiter(void 0, void 0, void 0, function () {\n var payload, _a, user, e_1;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n payload = data.payload;\n _a = payload.event;\n switch (_a) {\n case AUTH_STATE_CHANGE_EVENT: return [3 /*break*/, 1];\n }\n return [3 /*break*/, 8];\n case 1:\n if (!payload.message) return [3 /*break*/, 7];\n if (!(payload.message === AuthState.SignedIn)) return [3 /*break*/, 6];\n _b.label = 2;\n case 2:\n _b.trys.push([2, 4, , 5]);\n return [4 /*yield*/, Auth.currentAuthenticatedUser()];\n case 3:\n user = _b.sent();\n authStateHandler(payload.message, user);\n return [3 /*break*/, 5];\n case 4:\n e_1 = _b.sent();\n logger.error('User is not authenticated');\n return [3 /*break*/, 5];\n case 5: return [3 /*break*/, 7];\n case 6:\n authStateHandler(payload.message, payload.data);\n _b.label = 7;\n case 7: return [3 /*break*/, 8];\n case 8: return [2 /*return*/];\n }\n });\n }); };\n Hub.listen(UI_AUTH_CHANNEL, authUIStateHandler);\n var unsubscribe = function () {\n // Replace user's `authStateHandler` with a noop so that we don't trigger side-effects during the async `authUIStateHandler` when unsubscribed\n authStateHandler = function () { };\n Hub.remove(UI_AUTH_CHANNEL, authUIStateHandler);\n };\n return unsubscribe;\n};\nvar isHintValid = function (field) {\n return !(field['hint'] === null || typeof field['hint'] === 'string');\n};\n// Required attributes come from https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims\nvar getRequiredAttributesMap = function () { return ({\n address: {\n label: I18n.get(Translations.ADDRESS_LABEL),\n placeholder: I18n.get(Translations.ADDRESS_PLACEHOLDER),\n },\n nickname: {\n label: I18n.get(Translations.NICKNAME_LABEL),\n placeholder: I18n.get(Translations.NICKNAME_PLACEHOLDER),\n },\n birthdate: {\n label: I18n.get(Translations.BIRTHDATE_LABEL),\n placeholder: I18n.get(Translations.BIRTHDATE_PLACEHOLDER),\n },\n phone_number: {\n label: I18n.get(Translations.PHONE_LABEL),\n placeholder: I18n.get(Translations.PHONE_PLACEHOLDER),\n },\n email: {\n lable: I18n.get(Translations.EMAIL_LABEL),\n placeholder: I18n.get(Translations.EMAIL_PLACEHOLDER),\n },\n picture: {\n label: I18n.get(Translations.PICTURE_LABEL),\n placeholder: I18n.get(Translations.PICTURE_PLACEHOLDER),\n },\n family_name: {\n label: I18n.get(Translations.FAMILY_NAME_LABEL),\n placeholder: I18n.get(Translations.FAMILY_NAME_PLACEHOLDER),\n },\n preferred_username: {\n label: I18n.get(Translations.PREFERRED_USERNAME_LABEL),\n placeholder: I18n.get(Translations.PREFERRED_USERNAME_PLACEHOLDER),\n },\n gender: {\n label: I18n.get(Translations.GENDER_LABEL),\n placeholder: I18n.get(Translations.GENDER_PLACEHOLDER),\n },\n profile: {\n label: I18n.get(Translations.PROFILE_LABEL),\n placeholder: I18n.get(Translations.PROFILE_PLACEHOLDER),\n },\n given_name: {\n label: I18n.get(Translations.GIVEN_NAME_LABEL),\n placeholder: I18n.get(Translations.GIVEN_NAME_PLACEHOLDER),\n },\n zoneinfo: {\n label: I18n.get(Translations.ZONEINFO_LABEL),\n placeholder: I18n.get(Translations.ZONEINFO_PLACEHOLDER),\n },\n locale: {\n label: I18n.get(Translations.LOCALE_LABEL),\n placeholder: I18n.get(Translations.LOCALE_PLACEHOLDER),\n },\n updated_at: {\n label: I18n.get(Translations.UPDATED_AT_LABEL),\n placeholder: I18n.get(Translations.UPDATED_AT_PLACEHOLDER),\n },\n middle_name: {\n label: I18n.get(Translations.MIDDLE_NAME_LABEL),\n placeholder: I18n.get(Translations.MIDDLE_NAME_PLACEHOLDER),\n },\n website: {\n label: I18n.get(Translations.WEBSITE_LABEL),\n placeholder: I18n.get(Translations.WEBSITE_PLACEHOLDER),\n },\n name: {\n label: I18n.get(Translations.NAME_LABEL),\n placeholder: I18n.get(Translations.NAME_PLACEHOLDER),\n },\n}); };\nfunction handlePhoneNumberChange(event, phoneNumber) {\n var name = event.target.name;\n var value = event.target.value;\n /** Cognito expects to have a string be passed when signing up. Since the Select input is separate\n * input from the phone number input, we need to first capture both components values and combined\n * them together.\n */\n if (name === COUNTRY_DIAL_CODE_SUFFIX) {\n phoneNumber.countryDialCodeValue = value;\n }\n if (name === PHONE_SUFFIX) {\n phoneNumber.phoneNumberValue = value;\n }\n}\nexport { dispatchToastHubEvent as a, composePhoneNumberInput as b, checkUsernameAlias as c, dispatchAuthStateChangeEvent as d, closestElement as e, getRequiredAttributesMap as g, handlePhoneNumberChange as h, isHintValid as i, onAuthUIStateChange as o };\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { Logger, isEmpty } from '@aws-amplify/core';\nimport { A as AuthState, C as ChallengeName, U as UsernameAlias } from './auth-types-78df304e.js';\nimport { Auth, CognitoUser } from '@aws-amplify/auth';\nimport { T as Translations } from './Translations-108d469f.js';\nimport { N as NO_AUTH_MODULE_FOUND } from './constants-c8ecaa24.js';\nimport { a as dispatchToastHubEvent } from './helpers-14fcb50c.js';\nvar logger = new Logger('auth-helpers');\nfunction checkContact(user, handleAuthStateChange) {\n return __awaiter(this, void 0, void 0, function () {\n var data, newUser, error_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!Auth || typeof Auth.verifiedContact !== 'function') {\n throw new Error(NO_AUTH_MODULE_FOUND);\n }\n // If `user` is a federated user, we shouldn't call `verifiedContact`\n // since `user` isn't `CognitoUser`\n if (!isCognitoUser(user)) {\n handleAuthStateChange(AuthState.SignedIn, user);\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, Auth.verifiedContact(user)];\n case 2:\n data = _a.sent();\n if (!isEmpty(data.verified) || isEmpty(data.unverified)) {\n handleAuthStateChange(AuthState.SignedIn, user);\n }\n else {\n newUser = Object.assign(user, data);\n handleAuthStateChange(AuthState.VerifyContact, newUser);\n }\n return [3 /*break*/, 4];\n case 3:\n error_1 = _a.sent();\n dispatchToastHubEvent(error_1);\n return [3 /*break*/, 4];\n case 4: return [2 /*return*/];\n }\n });\n });\n}\nvar handleSignIn = function (username, password, handleAuthStateChange, usernameAlias) { return __awaiter(void 0, void 0, void 0, function () {\n var user, error_2;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!Auth || typeof Auth.signIn !== 'function') {\n throw new Error(NO_AUTH_MODULE_FOUND);\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 9, , 10]);\n return [4 /*yield*/, Auth.signIn(username, password)];\n case 2:\n user = _a.sent();\n logger.debug(user);\n if (!(user.challengeName === ChallengeName.SMSMFA ||\n user.challengeName === ChallengeName.SoftwareTokenMFA)) return [3 /*break*/, 3];\n logger.debug('confirm user with ' + user.challengeName);\n handleAuthStateChange(AuthState.ConfirmSignIn, user);\n return [3 /*break*/, 8];\n case 3:\n if (!(user.challengeName === ChallengeName.NewPasswordRequired)) return [3 /*break*/, 4];\n logger.debug('require new password', user.challengeParam);\n handleAuthStateChange(AuthState.ResetPassword, user);\n return [3 /*break*/, 8];\n case 4:\n if (!(user.challengeName === ChallengeName.MFASetup)) return [3 /*break*/, 5];\n logger.debug('TOTP setup', user.challengeParam);\n handleAuthStateChange(AuthState.TOTPSetup, user);\n return [3 /*break*/, 8];\n case 5:\n if (!(user.challengeName === ChallengeName.CustomChallenge &&\n user.challengeParam &&\n user.challengeParam.trigger === 'true')) return [3 /*break*/, 6];\n logger.debug('custom challenge', user.challengeParam);\n handleAuthStateChange(AuthState.CustomConfirmSignIn, user);\n return [3 /*break*/, 8];\n case 6: return [4 /*yield*/, checkContact(user, handleAuthStateChange)];\n case 7:\n _a.sent();\n _a.label = 8;\n case 8: return [3 /*break*/, 10];\n case 9:\n error_2 = _a.sent();\n if (error_2.code === 'UserNotConfirmedException') {\n logger.debug('the user is not confirmed');\n handleAuthStateChange(AuthState.ConfirmSignUp, { username: username });\n }\n else if (error_2.code === 'PasswordResetRequiredException') {\n logger.debug('the user requires a new password');\n handleAuthStateChange(AuthState.ForgotPassword, { username: username });\n }\n else if (error_2.code === 'InvalidParameterException' && password === '') {\n logger.debug('Password cannot be empty');\n error_2.message = Translations.EMPTY_PASSWORD;\n }\n else if (error_2.message === Translations.EMPTY_USERNAME) {\n if (usernameAlias === UsernameAlias.email) {\n error_2.message = Translations.EMPTY_EMAIL;\n }\n if (usernameAlias === UsernameAlias.phone_number) {\n error_2.message = Translations.EMPTY_PHONE;\n }\n }\n dispatchToastHubEvent(error_2);\n return [3 /*break*/, 10];\n case 10: return [2 /*return*/];\n }\n });\n}); };\nvar isCognitoUser = function (user) {\n return user instanceof CognitoUser;\n};\nexport { checkContact as c, handleSignIn as h };\n"],"sourceRoot":""}