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AAAA,MAAA,OAAKC,UAAWF,EAAQmV,eAAehV,SAAA,EACrCC,EAAAA,EAAAA,KAAA,OAAKF,UAAWF,EAAQoV,oBAAoBjV,UAC1CC,EAAAA,EAAAA,KAAA,OACEF,UAAWF,EAAQqV,aACnBI,IAAKE,EAAAA,GACLD,IAAI,qBAGRtV,EAAAA,EAAAA,KAAA,MAAIF,UAAWF,EAAQgH,UAAU7G,SAAE6G,KACnC5G,EAAAA,EAAAA,KAAA,MACEF,UAAS,GAAAnD,OAAKiD,EAAQsV,aAAY,KAAAvY,OAChCoX,GAAqBnU,EAAQwV,aAC5BrV,SAEFwG,KAEHvG,EAAAA,EAAAA,KAAA,OAAKF,UAAWF,EAAQuV,UAAUpV,SAAE8G,SAErC,C,mCCnDA,MAAMqJ,EAA2BA,CACtCsF,EACAxQ,EACAyQ,KAEA,MAAMC,EAGA,GAEN,IAAK,IAAIC,EAAI,EAAGA,EAAI,EAAGA,IAAK,CAAC,IAADC,EAAAC,EAAAC,EAAAC,EAC1BL,EAA4BC,GAAK,CAC/BK,WAAYP,EAGH,QAHuBG,EACR,OAApBH,QAAoB,IAApBA,GAEC,QAFmBI,EAApBJ,EAAsB9B,MACpB/O,IAAQ,IAAAqR,EAAA,OAAY,OAARrR,QAAQ,IAARA,OAAQ,EAARA,EAAUA,aAAmB,QAAXqR,EAAKT,EAAIG,UAAE,IAAAM,OAAA,EAANA,EAAQxR,GAAE,WAC9C,IAAAoR,OAFmB,EAApBA,EAEGpR,UAAE,IAAAmR,EAAAA,EAAI,GACH,QADKE,EACXN,EAAIG,UAAE,IAAAG,OAAA,EAANA,EAAQrR,GACZQ,OAAkB,QAAZ8Q,EAAE/Q,EAAQ2Q,UAAE,IAAAI,OAAA,EAAVA,EAAY9Q,OAExB,CACA,OAAOyQ,CAA2B,C","sources":["pages/login/styles.ts","pages/login/externalClient.ts","sharedComponents/loginEmailField/styles.ts","sharedComponents/loginEmailField/index.tsx","pages/login/loginRepresentation.tsx","pages/login/index.tsx","pages/otp/styles.ts","pages/otp/Representation.tsx","sharedComponents/label/styles.ts","sharedComponents/label/index.tsx","sharedComponents/loginPasswordField/styles.ts","sharedComponents/loginPasswordField/index.tsx","sharedComponents/loginWrapper/styles.ts","sharedComponents/loginWrapper/index.tsx","utils/mappings/submitHandlers/upsertSecurityQuestions.ts"],"sourcesContent":["import { createStyles, makeStyles, Theme } from '@material-ui/core';\nimport { customThemeModel } from '../../models';\n\nexport const styles = makeStyles((theme: Theme & customThemeModel) =>\n createStyles({\n wrapper: {\n display: 'flex',\n height: '100%',\n width: '100%',\n backgroundColor: theme.colors.background\n },\n formWrapper: {\n flex: 1,\n width: '380px'\n },\n errorMsg: {\n position: 'absolute',\n color: theme.colors.error,\n fontSize: '12px',\n whiteSpace: 'pre-line'\n },\n formSubmitBtn: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '333px',\n height: '40px',\n margin: '20px 0 24px 0',\n color: theme.colors.white,\n background: theme.colors.primary,\n border: 'none',\n borderRadius: '4px',\n fontWeight: 600,\n cursor: 'pointer',\n outline: 'none',\n '&:disabled': {\n opacity: 0.4,\n cursor: 'not-allowed'\n }\n },\n forgotPass: {\n color: theme.colors.primary,\n fontSize: '14px',\n fontWeight: 600,\n textDecoration: 'none'\n },\n endIcon: { cursor: 'pointer' },\n temporaryForm: {\n marginTop: '30px',\n '& > div:first-of-type': {\n marginBottom: '26px'\n },\n '& > div:last-of-type': {\n marginTop: '24px'\n }\n },\n checkmarkIcon: { marginLeft: 'auto' },\n securityQuestionsForm: {\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n flexDirection: 'column',\n '& > .MuiFormControl-root:nth-of-type(1), & > .MuiFormControl-root:nth-of-type(3), & > .MuiFormControl-root:nth-of-type(5)':\n { marginTop: '16px' },\n '& > .MuiFormControl-root:nth-of-type(2), & > .MuiFormControl-root:nth-of-type(4), & > .MuiFormControl-root:nth-of-type(6)':\n { marginTop: '23px' },\n '& > div': { width: '100%', marginBottom: '24px' },\n '& > div:last-of-type': { marginBottom: '0px' }\n },\n questionsContainer: {\n '& .MuiPaper-root': {\n bottom: '24px'\n }\n },\n description: {\n fontSize: '14px',\n fontWeight: 600,\n lineHeight: '23px',\n marginBottom: '5px !important'\n },\n conditionContainer: {\n display: 'flex',\n justifyContent: 'space-evenly',\n alignItems: 'flex-start',\n flexDirection: 'column',\n marginBottom: '10px',\n '& > div': { marginLeft: '6px' }\n },\n conditionLabel: {\n fontSize: '14px',\n fontWeight: 500,\n color: theme.colors.error,\n lineHeight: '23px'\n },\n link1: { lineHeight: '20px', whiteSpace: 'nowrap' },\n checkboxLabel: {\n marginLeft: '7px'\n },\n conditionalPharagraph: {\n marginBottom: '7px',\n fontSize: '12px',\n textAlign: 'justify',\n width: '89%',\n marginTop: '10px',\n lineHeight: '20px'\n }\n })\n);\n","import { Auth } from 'aws-amplify';\nimport { onError } from '@apollo/client/link/error';\nimport { RetryLink } from '@apollo/client/link/retry';\nimport { setContext } from '@apollo/client/link/context';\nimport {\n from,\n HttpLink,\n Observable,\n ApolloClient,\n InMemoryCache\n} from '@apollo/client';\n\nimport { localStates } from '../../graphQL/states';\n\nconst errorLink = onError(\n ({ forward, operation, graphQLErrors, networkError }) => {\n if (networkError) {\n const oldHeaders = operation.getContext().headers;\n\n return new Observable(observer => {\n Auth.currentSession()\n .then(res => {\n const newToken = res.getIdToken().getJwtToken();\n localStorage.setItem('token', newToken);\n\n operation.setContext(() => ({\n headers: {\n ...oldHeaders,\n authorization: `Bearer ${newToken}` || ''\n }\n }));\n })\n .then(() => {\n const subscriber = {\n next: observer.next.bind(observer),\n error: observer.error.bind(observer),\n complete: observer.complete.bind(observer)\n };\n\n forward(operation).subscribe(subscriber);\n })\n .catch(error => {\n observer.error(error);\n });\n });\n }\n\n if (graphQLErrors) {\n return new Observable(observer => {\n operation.setContext(() => ({\n uri: `${process.env.REACT_APP_GRAPHQL_URL}`\n }));\n const subscriber = {\n next: observer.next.bind(observer),\n error: observer.error.bind(observer),\n complete: observer.complete.bind(observer)\n };\n\n forward(operation).subscribe(subscriber);\n });\n }\n\n return undefined;\n }\n);\n\nconst authLink = setContext((_, { headers }) => {\n const token = localStorage.getItem('token');\n\n return {\n headers: {\n ...headers,\n authorization: token ? `Bearer ${token}` : ''\n }\n };\n});\n\nconst retryLink = new RetryLink({\n delay: {\n initial: 500,\n max: Infinity,\n jitter: true\n },\n attempts: {\n max: 3,\n retryIf: (error, _operation) => !!error\n }\n});\n\nconst httpLink = from([\n errorLink,\n retryLink,\n new HttpLink({\n uri: `${process.env.REACT_APP_GRAPHQL_URL}`\n })\n]);\n\nconst cache = new InMemoryCache({\n typePolicies: {\n Query: {\n fields: {\n localStates: {\n read() {\n return localStates();\n }\n }\n }\n }\n }\n});\n\nexport const client = new ApolloClient({\n link: authLink.concat(httpLink),\n cache\n});\n","import { createStyles, makeStyles, Theme } from '@material-ui/core';\nimport { customThemeModel } from '../../models';\n\nexport const styles = makeStyles((theme: Theme & customThemeModel) =>\n createStyles({\n formField: {\n display: 'flex',\n flexDirection: 'column'\n },\n emailInput: {\n '& .MuiInputBase-root': {\n maxWidth: '333px',\n height: '40px',\n backgroundColor: theme.colors.white,\n border: `1px solid ${theme.colors.inputBorder}`,\n borderRadius: '8px',\n transition: 'all 0.2s ease-in-out',\n '&:hover': {\n borderColor: theme.colors.inputFocus\n },\n '& .MuiInputBase-input': {\n padding: '0 16px',\n color: theme.colors.text,\n fontSize: '14px',\n textOverflow: 'ellipsis'\n },\n '& fieldset': {\n border: 'none'\n },\n '&.Mui-focused': {\n borderColor: theme.colors.inputFocus\n }\n }\n }\n })\n);\n","import TextField from '@material-ui/core/TextField';\nimport Label from '../label';\nimport { styles } from './styles';\n\ninterface Props {\n inputLabel?: string;\n field?: any;\n}\n\nconst LoginEmailField = ({ inputLabel, field }: Props) => {\n const classes = styles();\n return (\n
\n
\n );\n};\n\nexport default LoginEmailField;\n","import { Link } from 'react-router-dom';\nimport {\n DeepMap,\n Control,\n Controller,\n FieldError,\n FieldValues,\n UseFormRegister,\n UseFormWatch,\n useWatch\n} from 'react-hook-form';\n\nimport { useState } from 'react';\nimport { styles } from './styles';\nimport { loginCover } from '../../assets/images';\nimport { PATH_NAME } from '../../routes/pathNames';\nimport Dropdown from '../../sharedComponents/dropdown';\nimport CustomInput from '../../sharedComponents/customInput';\nimport DropdownItem from '../../sharedComponents/dropdownItem';\nimport { CheckmarkIcon, WarningIcon } from '../../assets/icons';\nimport ToastMessage from '../../sharedComponents/toastMessage';\nimport LoginWrapper from '../../sharedComponents/loginWrapper';\nimport CustomButton from '../../sharedComponents/customButton';\nimport { ACCOUNT_SECURITY_QUESTIONS } from '../../utils/constants';\nimport LoginEmailField from '../../sharedComponents/loginEmailField';\nimport LoginPasswordField from '../../sharedComponents/loginPasswordField';\n\ninterface ILogin {\n name?: string;\n onSubmit: any;\n handleSubmit: any;\n isLoading: boolean;\n serverError: string;\n isConfirmed: boolean;\n showPassword: boolean;\n emailRequired?: string;\n passwordRequired?: string;\n isSecurityQuestions: boolean;\n isTemporaryPassword: boolean;\n showConfirmPassword: boolean;\n handleToastClose: () => void;\n control: Control;\n handleQuestionChange: (\n e: React.ChangeEvent<{\n name?: string | undefined;\n value: unknown;\n }>,\n index: number\n ) => void;\n register: UseFormRegister;\n errors: DeepMap;\n handleSecurityQuestionsSubmit:\n | React.FormEventHandler\n | undefined;\n watchTemporaryForm: UseFormWatch;\n getEndAdornment: (type: string) => JSX.Element;\n watchSecurityQuestions: UseFormWatch;\n temporaryFormErrors: DeepMap;\n handleSecurityQuestionsRegister: (fieldName: string) => {\n [key: string]: unknown;\n };\n securityQuestionsErrors: DeepMap;\n handleRegister: (fieldName: string) => { [key: string]: unknown };\n handleTemporarySubmit: React.FormEventHandler | undefined;\n}\n\nconst LoginForm = ({\n errors,\n control,\n onSubmit,\n isLoading,\n isConfirmed,\n serverError,\n handleSubmit,\n showPassword,\n handleRegister,\n getEndAdornment,\n handleToastClose,\n watchTemporaryForm,\n isSecurityQuestions,\n isTemporaryPassword,\n temporaryFormErrors,\n showConfirmPassword,\n handleQuestionChange,\n handleTemporarySubmit,\n watchSecurityQuestions,\n securityQuestionsErrors,\n handleSecurityQuestionsSubmit,\n handleSecurityQuestionsRegister\n}: ILogin) => {\n const classes = styles();\n const email = useWatch({\n control,\n name: 'email',\n defaultValue: 'user@example.com' // Default value to ensure it's not undefined\n });\n const password = useWatch({\n control,\n name: 'password',\n defaultValue: '99999999' // Default value to ensure it's not undefined\n });\n\n const isSubmitEnabled = !!email && !!password && !isLoading;\n return isTemporaryPassword ? (\n
\n \n

{serverError}

\n
\n
\n Your Password must be atleast :\n
\n
\n
* 8 characters long
\n
* Atleast 1 uppercase
\n
\n * 1 special character and 1 number\n
\n
\n * No more than 2 characters repeated in sequence\n
\n
\n \n \n
\n\n \n Submit\n \n \n ) : (\n <>\n {isSecurityQuestions && (\n \n
\n handleQuestionChange(e, 0)}\n errorMsg={\n securityQuestionsErrors?.questions &&\n securityQuestionsErrors?.questions[0]?.id?.message\n }\n >\n {ACCOUNT_SECURITY_QUESTIONS?.map(({ id, question }) => (\n \n {question}\n {watchSecurityQuestions('questions.0.id') ===\n String(question) && (\n \n )}\n \n ))}\n \n \n handleQuestionChange(e, 1)}\n errorMsg={\n securityQuestionsErrors?.questions &&\n securityQuestionsErrors?.questions[1]?.id?.message\n }\n >\n {ACCOUNT_SECURITY_QUESTIONS?.map(({ id, question }) => (\n \n {question}\n {watchSecurityQuestions('questions.1.id') ===\n String(question) && (\n \n )}\n \n ))}\n \n \n handleQuestionChange(e, 2)}\n errorMsg={\n securityQuestionsErrors?.questions &&\n securityQuestionsErrors?.questions[2]?.id?.message\n }\n >\n {ACCOUNT_SECURITY_QUESTIONS?.map(({ id, question }) => (\n \n {question}\n {watchSecurityQuestions('questions.2.id') ===\n String(question) && (\n \n )}\n \n ))}\n \n \n
\n\n \n Save\n \n \n )}\n {!isSecurityQuestions && (\n
\n

{serverError}

\n
\n (\n \n )}\n />\n {errors?.email && (\n

\n \n {errors?.email?.message}\n

\n )}\n
\n
\n (\n \n )}\n />\n {errors?.password && (\n

\n \n {errors?.password?.message}\n

\n )}\n
\n\n

\n By using our services, you agree to our{' '}\n \n Terms & Conditions\n {' '}\n and{' '}\n \n Privacy Policy\n {' '}\n and consent to receive SMS messages, including OTPs. Standard\n carrier charges may apply.\n

\n \n Submit\n \n\n \n Forgot Password?\n \n \n )}\n \n );\n};\n\nconst Login = (props: ILogin) => {\n const classes = styles();\n const { isTemporaryPassword, isSecurityQuestions } = props;\n let pageSubtitle = '';\n if (!isSecurityQuestions)\n pageSubtitle = isTemporaryPassword ? 'Create a password' : 'Sign In Below';\n return (\n
\n }\n />\n
\n );\n};\n\nexport default Login;\n","import { useEffect, useState } from 'react';\n\nimport * as yup from 'yup';\nimport { Auth } from 'aws-amplify';\nimport { useHistory } from 'react-router-dom';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { useForm, SubmitHandler, FieldValues } from 'react-hook-form';\nimport { useMutation, useLazyQuery, useQuery } from '@apollo/client';\n\nimport { styles } from './styles';\nimport { client } from './externalClient';\nimport Representation from './loginRepresentation';\nimport OTPRepresentation from '../otp/Representation';\nimport {\n GET_ALL_SECURITY_QUESTIONS,\n GET_ALL_SITES,\n GET_LOCAL_STATES,\n GET_USER\n} from '../../graphQL/queries';\nimport { ShowPasswordIcon, HidePasswordIcon } from '../../assets/icons';\nimport { localStates, useLocalStates } from '../../graphQL/states/localStates';\nimport { UPSERT_USER_SECURITY_QUESTIONS_ANSWERS } from '../../graphQL/mutations';\nimport { prepareSecurityQuestions } from '../../utils/mappings/submitHandlers/upsertSecurityQuestions';\nimport { PATH_NAME } from '../../routes/pathNames';\nimport { roleModel } from '../../models';\nimport { ROLES } from '../../utils/constants';\n\ninterface ILogin {\n email?: string;\n password?: string;\n}\n\ninterface TemporaryInputs {\n newPassword: string;\n confirmPassword: string;\n}\n\ninterface SecurityQuestionsInputs {\n questions: { id: string }[];\n answers: { answer: string }[];\n}\n\ninterface Error {\n code?: string;\n message?: string;\n}\n\ninterface Inputs {\n otp: string[];\n}\n\nconst schema = yup.object().shape({\n email: yup\n .string()\n .email('Incorrect Email or password')\n .required('Incorrect Email or password'),\n password: yup\n .string()\n .required('Incorrect Email or password')\n .matches(\n /^((?=.*\\d)(?=.*[A-Z])(?=.*[><;!:@#\\$%\\^\\&*\\)\\(+=._\\-{}'\",±§?`~\\/\\\\\\[\\]\\|]).{8,})$/,\n {\n message: 'Incorrect Email or password',\n excludeEmptyString: false\n }\n )\n});\n\nconst temporaryPasswordSchema = yup.object().shape({\n newPassword: yup\n .string()\n .required('New password is required')\n .matches(\n /^((?=.*\\d)(?=.*[A-Z])(?=.*[><;!:@#\\$%\\^\\&*\\)\\(+=._\\-{}'\",±§?`~\\/\\\\\\[\\]\\|]).{8,})$/,\n {\n message: 'Incorrect password format',\n excludeEmptyString: false\n }\n )\n .matches(\n /^(?!.*(\\w|[><;!:@#\\$%\\^\\&*\\)\\(+=._\\-{}'\",±§?`~\\/\\\\\\[\\]\\|])\\1{2,}).+$/,\n {\n message: 'Incorrect password format',\n excludeEmptyString: false\n }\n ),\n confirmPassword: yup\n .string()\n .required('Please confirm your new password')\n .oneOf([yup.ref('newPassword'), null], 'Passwords must match')\n});\n\nconst securityQuestionsSchema = yup.object().shape({\n questions: yup\n .array()\n .of(\n yup.object().shape({\n id: yup.string().required('Please select a security question')\n })\n )\n .required('Security questions are required')\n .min(3, 'Please enter 3 security questions'),\n answers: yup\n .array()\n .of(\n yup.object().shape({\n answer: yup\n .string()\n .required('Please provide an answer to the security question')\n })\n )\n .required('Answers are required')\n .min(3, 'Please enter 3 answers')\n});\n\nconst Login = (props: any) => {\n const redirectUrl = props?.location?.state?.redirectUrl;\n const setPreviousPageUrl = (url: string) => {\n sessionStorage.setItem('previousPageUrl', url);\n };\n\n useEffect(() => {\n if (redirectUrl) {\n setPreviousPageUrl(redirectUrl);\n }\n }, [redirectUrl]);\n\n const classes = styles();\n const {\n watch,\n register,\n handleSubmit,\n formState: { errors },\n control\n } = useForm({ resolver: yupResolver(schema) });\n\n const initialValues = {\n newPassword: '',\n confirmPassword: ''\n };\n const {\n watch: watchTemporaryForm,\n register: temporaryFormRegister,\n handleSubmit: handleTemporarySubmit,\n formState: { errors: temporaryFormErrors }\n } = useForm({\n mode: 'onChange',\n defaultValues: initialValues,\n resolver: yupResolver(temporaryPasswordSchema)\n });\n const initialSecurityQuesionsValues = {\n questions: [{ id: '' }, { id: '' }, { id: '' }],\n answers: [{ answer: '' }, { answer: '' }, { answer: '' }]\n };\n const {\n register: registerSecurityQuestions,\n handleSubmit: handleSecurityQuestionsSubmit,\n watch: watchSecurityQuestions,\n formState: { errors: securityQuestionsErrors, isDirty, isSubmitted },\n setError: setSecurityQuestionsError,\n setValue: setSecurityQuestionsValue,\n clearErrors: clearSecurityQuestionsErrors\n } = useForm({\n mode: 'onChange',\n defaultValues: initialSecurityQuesionsValues,\n resolver: yupResolver(securityQuestionsSchema)\n });\n const [\n mutateUpsertSecurityQuestions,\n { data: mutationData, error: mutationError }\n ] = useMutation(UPSERT_USER_SECURITY_QUESTIONS_ANSWERS, {\n client\n });\n\n const {\n register: otpRegister,\n watch: otpWatch,\n handleSubmit: otpHandleSubmit,\n formState: { errors: otpErrors, isValid },\n control: otpControl,\n setFocus\n } = useForm({\n defaultValues: {\n otp: ['']\n },\n mode: 'onChange'\n });\n\n const history = useHistory();\n const [error, setError] = useState({});\n const { editIsLoggedIn, editSites, editUserRole } =\n useLocalStates(localStates);\n const [loading, setLoading] = useState(false);\n const [isConfirmed, setIsConfirmed] = useState(false);\n const [showPassword, setShowPassword] = useState(false);\n const [showOtpPage, setShowOtpPage] = useState(false);\n const [showConfirmPassword, setShowConfirmPassword] =\n useState(false);\n const [isTemporaryPassword, setIsTemporaryPassword] =\n useState(false);\n const [isSecurityQuestions, setIsSecurityQuestions] =\n useState(false);\n const [codeSent, setCodeSent] = useState(false);\n const [signInRes, setSignRes] = useState();\n const [timeLeft, setTimeLeft] = useState(180);\n\n useEffect(() => {\n if (codeSent) setTimeout(() => setCodeSent(false), 5000);\n }, [codeSent]);\n\n useEffect(() => {\n if (timeLeft === 0) {\n setTimeLeft(null);\n }\n if (!timeLeft) return;\n const intervalId = setInterval(() => {\n setTimeLeft(timeLeft - 1);\n }, 1000);\n return () => clearInterval(intervalId);\n }, [timeLeft]);\n\n useEffect(() => {\n if (isDirty && !isSubmitted) {\n window.addEventListener('beforeunload', onUnload);\n }\n return () => window.removeEventListener('beforeunload', onUnload);\n }, [isDirty, isSubmitted]);\n\n const onUnload = (e: BeforeUnloadEvent) => {\n e.preventDefault();\n e.returnValue = '';\n };\n const handleRegister = (fieldName: any) => {\n const { ref: inputRef, ...rest } = temporaryFormRegister(fieldName);\n return { inputRef, ...rest };\n };\n\n const handleSecurityQuestionsRegister = (fieldName: any) => {\n const { ref: inputRef, ...rest } = registerSecurityQuestions(fieldName);\n return { inputRef, ...rest };\n };\n\n const handleQuestionChange = (\n e: React.ChangeEvent<{\n name?: string | undefined;\n value: unknown;\n }>,\n index: number\n ) => {\n if (\n watchSecurityQuestions('questions').some(\n object => object?.id === (e.target.value as string)\n )\n )\n setSecurityQuestionsError(`questions.${index}.id`, {\n type: 'manual',\n message: 'You have already selected this question before'\n });\n else {\n clearSecurityQuestionsErrors(`questions.${index}.id`);\n setSecurityQuestionsValue(\n `questions.${index}.id`,\n e.target.value as string,\n {\n shouldDirty: true,\n shouldValidate: true\n }\n );\n }\n };\n\n const getEndAdornment = (type: string) => {\n if (type === 'password') {\n return showPassword ? (\n setShowPassword(!showPassword)}\n />\n ) : (\n setShowPassword(!showPassword)}\n />\n );\n }\n return showConfirmPassword ? (\n setShowConfirmPassword(!showConfirmPassword)}\n />\n ) : (\n setShowConfirmPassword(!showConfirmPassword)}\n />\n );\n };\n\n const handleToastClose = () => {\n setIsConfirmed(false);\n setIsSecurityQuestions(true);\n setIsTemporaryPassword(false);\n };\n\n const {\n data: {\n localStates: { userRole, isLoggedIn }\n },\n refetch: getUserRole\n } = useQuery(GET_LOCAL_STATES, {});\n\n const { data: allSiteData, refetch: getAllSites } = useQuery(GET_ALL_SITES, {\n fetchPolicy: 'network-only',\n skip: !isLoggedIn,\n onCompleted: data => updateSites(data)\n });\n\n const updateSites = data => {\n const sites = data?.getAllSites;\n\n if (sites) {\n let siteIdCheck = false;\n let role = localStorage.getItem('role') as roleModel;\n const defaultSiteId = localStorage.getItem('defaultSiteId');\n\n if (defaultSiteId) {\n if (defaultSiteId === 'all_sites' && userRole === ROLES.GLOBAL_ADMIN) {\n role = ROLES.GLOBAL_ADMIN;\n siteIdCheck = true;\n } else {\n sites.map(({ id, children, role: parentRole }) => {\n if (id === defaultSiteId) {\n role = parentRole;\n siteIdCheck = true;\n }\n if (children) {\n children.map(({ id: childId, role: childRole }) => {\n if (childId === defaultSiteId) {\n role = childRole;\n siteIdCheck = true;\n }\n });\n }\n });\n }\n } else {\n role = sites[0]?.role;\n let siteId = sites[0]?.id;\n if (role === ROLES.GLOBAL_ADMIN) siteId = 'all_sites';\n localStorage.setItem('defaultSiteId', siteId);\n }\n\n if (defaultSiteId && !siteIdCheck) {\n localStorage.removeItem('role');\n localStorage.removeItem('defaultSiteId');\n window.location.reload();\n }\n\n localStorage.setItem('sites', JSON.stringify(sites));\n editSites(sites);\n\n localStorage.setItem('role', role);\n const localRole = localStorage.getItem('role') as roleModel;\n const roleCheck = Object.values(ROLES).includes(localRole);\n\n editUserRole((roleCheck && localRole) || ROLES.GUEST);\n }\n };\n\n const handleLogIn = async (token: string) => {\n setError({});\n localStorage.setItem('token', token);\n editIsLoggedIn(true);\n await getUserRole();\n await getAllSites();\n };\n\n useEffect(() => {\n if (isLoggedIn && userRole) {\n if (redirectUrl && redirectUrl !== PATH_NAME.DASHBOARD) {\n } else if (userRole === ROLES.ANALYST) {\n window.location.replace(PATH_NAME.REPORTING);\n } else {\n window.location.replace(PATH_NAME.DASHBOARD);\n }\n }\n }, [userRole, allSiteData, isLoggedIn]);\n\n const onSubmit: SubmitHandler = async data => {\n setError({});\n setLoading(true);\n const { email, password } = data;\n if (email && password) {\n try {\n const res = await Auth.signIn(email, password);\n if (\n res.challengeName === 'SMS_MFA' ||\n res.challengeName === 'SOFTWARE_TOKEN_MFA'\n ) {\n setShowOtpPage(true);\n // SETS TIME LEFT TO 180S\n setTimeLeft(180);\n setSignRes(res);\n } else if (res.challengeName === 'NEW_PASSWORD_REQUIRED') {\n setIsTemporaryPassword(true);\n } else if (res.signInUserSession) {\n handleLogIn(res.signInUserSession.idToken.jwtToken);\n } else {\n console.error('Unexpected response:', res);\n }\n } catch (exception: any) {\n console.error('Error during sign-in:', exception);\n setError(exception);\n } finally {\n setLoading(false);\n }\n }\n };\n\n const handleCodeChange = (\n e: React.ChangeEvent,\n index: number,\n onChange: (event: React.ChangeEvent) => void\n ) => {\n if (\n /^\\d+$|^$/.test(e.target.value as string) &&\n (e.target.value as string).length <= 1\n ) {\n setError({});\n onChange(e);\n if (index < 5 && otpWatch(`otp.${index}`)) setFocus(`otp.${index + 1}`);\n // if (!otpWatch(`otp.${index}`) && index > 0) setFocus(`otp.${index - 1}`);\n }\n };\n\n const handleKeyDown = (\n e: React.KeyboardEvent,\n index: number\n ) => {\n if (e.key === 'Backspace' && index > 0 && !otpWatch(`otp.${index}`)) {\n setFocus(`otp.${index - 1}`);\n }\n };\n\n const handleResendCode = async () => {\n const email = watch('email');\n const password = watch('password');\n if (email && password) {\n await onSubmit({ email, password }).then(() => {\n setCodeSent(true);\n setTimeLeft(180);\n });\n }\n };\n\n const onSubmitOtp: SubmitHandler = data => {\n handleSubmitOtp(data);\n };\n\n const handleSubmitOtp = async (data: Inputs, res?: any) => {\n const otp = data?.otp?.join('');\n const cognitoUser = signInRes;\n if (otp && cognitoUser) {\n setLoading(true);\n try {\n const user = await Auth.confirmSignIn(cognitoUser, otp, 'SMS_MFA');\n handleLogIn(user.signInUserSession.idToken.jwtToken);\n } catch (error: any) {\n setLoading(false);\n setError(error);\n console.error('Error with MFA', error);\n }\n }\n };\n\n const handleNewPasswordChallenge = async (showSecurityQuestions = true) => {\n setLoading(true);\n const { email, password } = watch();\n\n await Auth.signIn(email, password)\n .then(user => {\n if (user?.challengeName === 'NEW_PASSWORD_REQUIRED') {\n Auth.completeNewPassword(user, watchTemporaryForm('newPassword'))\n .then(() => {\n Auth.currentSession()\n .then(res => {\n showSecurityQuestions\n ? localStorage.setItem(\n 'token',\n res.getIdToken().getJwtToken()\n )\n : handleLogIn(res.getIdToken().getJwtToken());\n })\n .catch(exception => {\n setError({ message: exception });\n })\n .finally(() => setLoading(false));\n })\n .catch(exception => {\n setError({ message: exception });\n })\n .finally(() => setLoading(false));\n }\n })\n .catch(exception => {\n setError({ message: exception });\n })\n .finally(() => setLoading(false));\n };\n\n const onTemporarySubmit: SubmitHandler = async data => {\n // To restore the security questions flow\n // setIsConfirmed(true); // 1. Uncomment this line\n await handleNewPasswordChallenge(false); // 2. Comment or remove this line\n };\n\n const onSecurityQuestionsSubmit: SubmitHandler =\n async formData => {\n await handleNewPasswordChallenge();\n getAllSecurityQuestions();\n };\n\n const refineAndSignIn = async data => {\n const formData = watchSecurityQuestions();\n\n await mutateUpsertSecurityQuestions({\n variables: {\n data: prepareSecurityQuestions(\n formData?.questions,\n formData?.answers,\n data?.getAllSecurityQuestions\n )\n }\n })\n .then(() => {\n Auth.currentSession()\n .then(res => {\n handleLogIn(res.getIdToken().getJwtToken());\n })\n .catch(exception => {\n setError({ message: exception });\n })\n .finally(() => setLoading(false));\n })\n .catch(e => {\n setSecurityQuestionsError('answers.2.answer', {\n type: 'manual',\n message: mutationError || (e as any)?.message\n });\n });\n };\n\n const [getAllSecurityQuestions, { data: allSecurityQuestionsData }] =\n useLazyQuery(GET_ALL_SECURITY_QUESTIONS, {\n client,\n onCompleted: refineAndSignIn\n });\n\n return showOtpPage ? (\n \n ) : (\n \n );\n};\n\nexport default Login;\n","import { createStyles, makeStyles, Theme } from '@material-ui/core';\nimport { customThemeModel } from '../../models';\n\nexport const styles = makeStyles((theme: Theme & customThemeModel) =>\n createStyles({\n wrapper: {\n display: 'flex',\n height: '100%',\n width: '100%',\n backgroundColor: theme.colors.background\n },\n formWrapper: {\n flex: 1,\n width: '333px'\n },\n errorMsg: {\n position: 'absolute',\n color: theme.colors.error,\n fontSize: '12px',\n whiteSpace: 'pre-line'\n },\n codeError: {\n marginTop: '84px',\n marginRight: '168px'\n },\n formSubmitBtn: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '333px',\n height: '40px',\n margin: '35px 0 24px 0',\n color: theme.colors.white,\n background: theme.colors.primary,\n border: 'none',\n borderRadius: '4px',\n fontWeight: 600,\n cursor: 'pointer',\n outline: 'none',\n '&:disabled': {\n opacity: 0.4,\n cursor: 'not-allowed'\n }\n },\n resendContainer: {\n fontSize: '14px',\n lineHeight: '20px',\n marginTop: '28px',\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center'\n },\n resendCode: {\n color: theme.colors.primary,\n fontWeight: 600,\n cursor: 'pointer'\n },\n codeResent: { fontWeight: 400, marginLeft: '17px' },\n fieldContainer: {\n height: '65px',\n marginTop: '24px',\n width: '333px',\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center'\n },\n codeContainer: {\n '& .MuiOutlinedInput-root': {\n minWidth: 'unset !important',\n width: '47px !important',\n marginRight: '5px',\n height: `${theme.lengths.elementsHeight}px`,\n marginBottom: '16px'\n }\n },\n resendErrorContainer: {\n marginBottom: '32px'\n },\n seperator: {\n marginRight: '5px',\n color: theme.colors.greyText,\n opacity: 0.3\n },\n seperatorError: { marginBottom: '32px' },\n seperatorContainer: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center'\n },\n topCode: {\n marginTop: `calc(${theme.lengths.labelHeight}px + ${theme.spacing(\n 0.75\n )}px)`\n },\n otpInput: {\n '& .MuiOutlinedInput-input': {\n textAlign: 'center'\n }\n }\n })\n);\n","import classNames from 'classnames';\nimport { DeepMap, Controller, FieldError } from 'react-hook-form';\n\nimport { styles } from './styles';\nimport { CODE_STRUCTURE } from '../../utils/constants';\nimport { WarningIcon } from '../../assets/icons';\nimport CustomInput from '../../sharedComponents/customInput';\nimport CustomButton from '../../sharedComponents/customButton';\nimport LoginWrapper from '../../sharedComponents/loginWrapper';\nimport LoginPasswordField from '../../sharedComponents/loginPasswordField';\nimport { createNewPasswordCover } from '../../assets/images';\n\ninterface ISetNewPassword {\n watch?: any;\n name?: string;\n register: any;\n control?: any;\n onSubmit?: any;\n isValid?: boolean;\n codeSent?: boolean;\n otpLoading?: boolean;\n timeLeft?: number | null;\n handleSubmit?: any;\n serverError?: string;\n otp?: string[];\n passwordRequired?: string;\n handleResendCode?: () => void;\n confirmPasswordRequired?: string;\n errors?: any;\n handleCodeChange: (\n e: React.ChangeEvent,\n index: number,\n onChange: (event: React.ChangeEvent) => void\n ) => void;\n handleKeyDown?: (e: any, index: number) => void;\n}\n\nconst OtpForm = ({\n watch,\n errors,\n isValid,\n control,\n onSubmit,\n codeSent,\n serverError,\n handleSubmit,\n otpLoading,\n timeLeft,\n handleCodeChange,\n handleResendCode,\n handleKeyDown\n}: ISetNewPassword) => {\n const classes = styles();\n\n return (\n
\n <>\n
\n {CODE_STRUCTURE.map(({ id }, index) => (\n \n {/* {index === 3 && (\n \n —\n
\n )} */}\n \n \n (!Number.isNaN(value) && value.length === 1) ||\n 'Please enter a valid code'\n }}\n render={({ field: { onChange, onBlur, ref: inputRef } }) => (\n handleCodeChange(e, index, onChange)}\n onKeyDown={e => handleKeyDown && handleKeyDown(e, index)}\n onBlur={onBlur}\n value={watch(`otp.${index}`, '')}\n name={`otp.${index}`}\n label={index === 0 ? 'Code' : ''}\n customInputClass={classes.otpInput}\n />\n )}\n />\n \n \n ))}\n {(errors?.otp || serverError) && (\n

\n \n {errors?.otp?.find(code => code)?.message || serverError}\n

\n )}\n \n
\n {timeLeft ? (\n \n Remaining Time: {timeLeft}s\n \n ) : (\n \n Resend Code\n \n )}\n {codeSent &&
Code resent!
}\n
\n \n \n Sign In\n \n \n );\n};\n\nconst Representation = (props: ISetNewPassword) => {\n const classes = styles();\n return (\n
\n }\n />\n
\n );\n};\n\nexport default Representation;\n","import { createStyles, makeStyles, Theme } from '@material-ui/core';\nimport { customThemeModel } from '../../models';\n\nexport const styles = makeStyles((theme: Theme & customThemeModel) =>\n createStyles({\n label: {\n margin: '24px 0 8px 0',\n color: theme.colors.text,\n fontSize: '15px'\n }\n })\n);\n","import React from 'react';\nimport { styles } from './styles';\n\ninterface Props {\n label?: string;\n}\n\nconst LoginEmailField = ({ label }: Props) => {\n const classes = styles();\n return
{label}
;\n};\nexport default LoginEmailField;\n","import { createStyles, makeStyles, Theme } from '@material-ui/core';\nimport { customThemeModel } from '../../models';\n\nexport const styles = makeStyles((theme: Theme & customThemeModel) =>\n createStyles({\n FormField: { display: 'flex', flexDirection: 'column', hight:'500%' },\n PasswordInput: {\n maxWidth: '333px',\n height: '35px',\n padding: '0 !important',\n backgroundColor: theme.colors.white,\n border: `1px solid ${theme.colors.inputBorder}`,\n borderRadius: '8px !important',\n transition: 'all 0.2s ease-in-out',\n '&:hover': {\n borderColor: theme.colors.inputFocus\n },\n '& .MuiInputBase-input': {\n padding: '0 0 0 10px',\n color: theme.colors.text,\n fontSize: '12px',\n textOverflow: 'ellipsis'\n },\n '& fieldset': {\n border: 'none'\n },\n '&.Mui-focused': {\n borderColor: theme.colors.inputFocus\n }\n }\n })\n);\n","import { useState } from 'react';\nimport { IconButton, OutlinedInput, InputAdornment } from '@material-ui/core';\n\nimport { ShowPasswordIcon, HidePasswordIcon } from '../../assets/icons';\nimport { styles } from './styles';\nimport Label from '../label';\n\ninterface State {\n password: string;\n showPassword: boolean;\n field?: any;\n}\n\ninterface props {\n inputLabel?: string;\n field?: any;\n}\n\nconst LoginPasswordField = ({ inputLabel, field }: props) => {\n const [values, setValues] = useState({\n password: '',\n showPassword: false\n });\n\n const handleChange =\n (prop: keyof State) => (event: React.ChangeEvent) => {\n setValues({ ...values, [prop]: event.target.value });\n };\n\n const handleClickShowPassword = () => {\n setValues({ ...values, showPassword: !values.showPassword });\n };\n\n const handleMouseDownPassword = (\n event: React.MouseEvent\n ) => {\n event.preventDefault();\n };\n\n const classes = styles();\n\n return (\n
\n
\n );\n};\n\nexport default LoginPasswordField;\n","import { createStyles, makeStyles, Theme } from '@material-ui/core';\nimport { customThemeModel } from '../../models';\n\nexport const styles = makeStyles((theme: Theme & customThemeModel) =>\n createStyles({\n loginImgWrapper: { width: '50%' },\n loginImg: {\n width: '100%',\n height: '99%',\n objectFit: 'cover',\n objectPosition: 'center'\n },\n loginRightSide: {\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n width: '50%',\n padding: '10px 10px 10px 118px',\n height:'99%'\n },\n homemedsLogoWrapper: {\n width: '131px',\n height: '50px',\n margin: '6px 0 15px -3px'\n },\n homemedsLogo: { width: '100%', height: '100%' },\n pageTitle: {\n margin: '0 0 16px 0',\n color: theme.colors.text,\n fontSize: '30px',\n lineHeight: '24px'\n },\n pageSubTitle: {\n color: theme.colors.text,\n lineHeight: '24px',\n margin: '0 0 6px 0',\n fontSize: '18px',\n fontWeight: 600\n },\n loginForm: {\n display: 'flex',\n flexDirection: 'column'\n \n },\n altSubTitle: {\n fontSize: '14px',\n fontWeight: 400,\n lineHeight: '20px',\n width: '327px'\n }\n })\n);\n","import React from 'react';\nimport { headerLogoSm } from '../../assets/images';\nimport { styles } from './styles';\n\ninterface Props {\n imgSrc?: string;\n imgAlt?: string;\n pageTitle?: string;\n lightPageSubTitle?: boolean;\n pageSubtitle?:\n | string\n | React.DetailedHTMLProps<\n React.HTMLAttributes,\n HTMLDivElement\n >;\n form?: any;\n}\n\nconst login = ({\n imgSrc,\n imgAlt,\n pageTitle,\n lightPageSubTitle,\n pageSubtitle,\n form\n}: Props) => {\n const classes = styles();\n return (\n <>\n
\n {imgAlt}\n
\n\n
\n
\n \n
\n

{pageTitle}

\n \n {pageSubtitle}\n \n
{form}
\n
\n \n );\n};\n\nexport default login;\n","export const prepareSecurityQuestions = (\n ids: { id: string }[],\n answers: { answer: string }[],\n allSecurityQuestions?: { id: string; question: string }[]\n) => {\n const userMappedSecurityQuestions: {\n questionId: string;\n answer: string;\n }[] = [];\n\n for (let i = 0; i < 3; i++) {\n userMappedSecurityQuestions[i] = {\n questionId: allSecurityQuestions\n ? allSecurityQuestions?.find(\n question => question?.question === ids[i]?.id\n )?.id ?? ''\n : ids[i]?.id,\n answer: answers[i]?.answer\n };\n }\n return userMappedSecurityQuestions;\n};\n"],"names":["styles","makeStyles","theme","createStyles","wrapper","display","height","width","backgroundColor","colors","background","formWrapper","flex","errorMsg","position","color","error","fontSize","whiteSpace","formSubmitBtn","alignItems","justifyContent","margin","white","primary","border","borderRadius","fontWeight","cursor","outline","opacity","forgotPass","textDecoration","endIcon","temporaryForm","marginTop","marginBottom","checkmarkIcon","marginLeft","securityQuestionsForm","flexDirection","questionsContainer","bottom","description","lineHeight","conditionContainer","conditionLabel","link1","checkboxLabel","conditionalPharagraph","textAlign","errorLink","onError","_ref","forward","operation","graphQLErrors","networkError","oldHeaders","getContext","headers","Observable","observer","Auth","currentSession","then","res","newToken","getIdToken","getJwtToken","localStorage","setItem","setContext","_objectSpread","authorization","concat","subscriber","next","bind","complete","subscribe","catch","uri","process","authLink","_","_ref2","token","getItem","retryLink","RetryLink","delay","initial","max","Infinity","jitter","attempts","retryIf","_operation","httpLink","from","HttpLink","cache","InMemoryCache","typePolicies","Query","fields","localStates","read","client","ApolloClient","link","formField","emailInput","maxWidth","inputBorder","transition","borderColor","inputFocus","padding","text","textOverflow","inputLabel","field","classes","_jsxs","className","children","_jsx","Label","label","TextField","variant","name","LoginForm","_temporaryFormErrors$","_temporaryFormErrors$2","_securityQuestionsErr","_securityQuestionsErr2","_securityQuestionsErr3","_securityQuestionsErr4","_securityQuestionsErr5","_securityQuestionsErr6","_securityQuestionsErr7","_securityQuestionsErr8","_securityQuestionsErr9","_securityQuestionsErr10","_securityQuestionsErr11","_securityQuestionsErr12","_errors$email","_errors$password","errors","control","onSubmit","isLoading","isConfirmed","serverError","handleSubmit","showPassword","handleRegister","getEndAdornment","handleToastClose","watchTemporaryForm","isSecurityQuestions","isTemporaryPassword","temporaryFormErrors","showConfirmPassword","handleQuestionChange","handleTemporarySubmit","watchSecurityQuestions","securityQuestionsErrors","handleSecurityQuestionsSubmit","handleSecurityQuestionsRegister","email","useWatch","defaultValue","password","isSubmitEnabled","ToastMessage","open","handleClose","message","CustomInput","fullWidth","styleGreyBorder","value","type","endAdornment","newPassword","confirmPassword","CustomButton","customClass","disabled","_Fragment","Dropdown","multiple","fullWidthItems","selectedItem","handleItems","e","questions","id","ACCOUNT_SECURITY_QUESTIONS","map","question","DropdownItem","String","CheckmarkIcon","answers","answer","_ref3","customMenuClass","_ref4","Controller","rules","required","pattern","render","_ref5","LoginEmailField","WarningIcon","_ref6","LoginPasswordField","href","target","rel","Link","to","PATH_NAME","SECURITY_QUESTIONS","props","pageSubtitle","LoginWrapper","imgSrc","loginCover","imgAlt","pageTitle","form","schema","yup","shape","matches","excludeEmptyString","temporaryPasswordSchema","oneOf","securityQuestionsSchema","of","min","_props$location","_props$location$state","redirectUrl","location","state","useEffect","url","sessionStorage","watch","register","formState","useForm","resolver","yupResolver","temporaryFormRegister","mode","defaultValues","registerSecurityQuestions","isDirty","isSubmitted","setError","setSecurityQuestionsError","setValue","setSecurityQuestionsValue","clearErrors","clearSecurityQuestionsErrors","mutateUpsertSecurityQuestions","data","mutationData","mutationError","useMutation","UPSERT_USER_SECURITY_QUESTIONS_ANSWERS","otpRegister","otpWatch","otpHandleSubmit","otpErrors","isValid","otpControl","setFocus","otp","useHistory","useState","editIsLoggedIn","editSites","editUserRole","useLocalStates","loading","setLoading","setIsConfirmed","setShowPassword","showOtpPage","setShowOtpPage","setShowConfirmPassword","setIsTemporaryPassword","setIsSecurityQuestions","codeSent","setCodeSent","signInRes","setSignRes","timeLeft","setTimeLeft","setTimeout","intervalId","setInterval","clearInterval","window","addEventListener","onUnload","removeEventListener","preventDefault","returnValue","userRole","isLoggedIn","refetch","getUserRole","useQuery","GET_LOCAL_STATES","allSiteData","getAllSites","GET_ALL_SITES","fetchPolicy","skip","onCompleted","updateSites","sites","siteIdCheck","role","defaultSiteId","ROLES","GLOBAL_ADMIN","parentRole","childId","childRole","_sites$","_sites$2","siteId","removeItem","reload","JSON","stringify","localRole","roleCheck","Object","values","includes","GUEST","handleLogIn","async","DASHBOARD","ANALYST","replace","REPORTING","signIn","challengeName","signInUserSession","idToken","jwtToken","console","exception","handleSubmitOtp","_data$otp","join","cognitoUser","user","confirmSignIn","handleNewPasswordChallenge","showSecurityQuestions","arguments","length","undefined","completeNewPassword","finally","getAllSecurityQuestions","allSecurityQuestionsData","useLazyQuery","GET_ALL_SECURITY_QUESTIONS","formData","variables","prepareSecurityQuestions","OTPRepresentation","otpLoading","handleResendCode","handleCodeChange","index","onChange","test","handleKeyDown","key","Representation","fieldName","_temporaryFormRegiste","ref","inputRef","rest","_objectWithoutProperties","_excluded","HidePasswordIcon","onClick","ShowPasswordIcon","some","object","shouldDirty","shouldValidate","_registerSecurityQues","_excluded2","codeError","marginRight","resendContainer","resendCode","codeResent","fieldContainer","codeContainer","minWidth","lengths","elementsHeight","resendErrorContainer","seperator","greyText","seperatorError","seperatorContainer","topCode","labelHeight","spacing","otpInput","OtpForm","_errors$otp","_errors$otp$find","CODE_STRUCTURE","classNames","validate","Number","isNaN","onBlur","onKeyDown","customInputClass","find","code","Boolean","createNewPasswordCover","lightPageSubTitle","FormField","hight","PasswordInput","setValues","OutlinedInput","prop","event","InputAdornment","IconButton","handleClickShowPassword","onMouseDown","loginImgWrapper","loginImg","objectFit","objectPosition","loginRightSide","homemedsLogoWrapper","homemedsLogo","pageSubTitle","loginForm","altSubTitle","src","alt","headerLogoSm","ids","allSecurityQuestions","userMappedSecurityQuestions","i","_allSecurityQuestions","_allSecurityQuestions2","_ids$i2","_answers$i","questionId","_ids$i"],"sourceRoot":""}