{"version":3,"sources":["components/Common/Button/Button.js","contexts/DialogProvider.tsx","constants/identifiers.ts","components/NavMenu/util/checkExpanded.js","utils/name.js","components/NavMenu/Header.js","components/Routing/routeMap.js","components/NavMenu/Menu.js","components/Layout/Footer/index.js","components/ErrorBoundary/ErrorBoundary.js","components/Layout/Layout.js","components/Routing/ConditionalRoute.js","api/SSO.ts","components/Common/SSOHandler.js","App.js","registerServiceWorker.js","index.js","api/api.ts","Auth.js","contexts/user.tsx","contexts/config.js","api/config.js","api/user.ts","contexts/appInsight.js","components/Common/Loading.tsx","components/Logging/ApplicationInsights.js"],"names":["Button","children","className","rest","classnames","NextButton","BackButton","useStyles","makeStyles","title","display","justifyContent","padding","backgroundColor","color","alignItems","paddingLeft","fill","content","DialogContext","React","createContext","dialog","isOpen","setDialog","handleClose","useDialogContext","useContext","DialogProvider","useState","classes","onClose","contextValues","Provider","value","open","fullWidth","maxWidth","width","onClick","data-testid","USER_TYPE","FieldAgent","TeleAgent","Broker","RESOURCE_TYPE","PLAN_MATERIALS","PROVIDER_SEARCH","DRUG_SEARCH","CERTIFICATION","AHIP_YEARS","BUSINESS_STATES","LICENSE_PRE_AEP","LICENSE_AEP","RESPONSE","YES","NO","APPLICATIONS_VIEW","ALL","status","timeline","ACCEPTED_YTD","ACCEPTED_MTD","SUBMITTED_YTD","SUBMITTED_MTD","FEATURE_IDS","HRA","ENROLL_INSIGHTS","DIRECT_PAY","PLAYGROUND","RECORDING","PCP_FILTER","ASSESSMENT_STATUS","INVALID","NOT_STARTED","COMPLETED","SUBMITTED","checkExpanded","idString","toggleButtonDom","document","getElementById","getElementsByClassName","window","getComputedStyle","toUpperCaseFirstCharacterOnly","str","charAt","toUpperCase","slice","toLowerCase","Header","handleToggle","user","useUserContext","nameString","isEmpty","userType","get","split","reduce","cumu","curr","useEffect","handleResize","debounce","addEventListener","removeEventListener","Navbar","id","aria-label","collapseOnSelect","expand","onToggle","Brand","as","Link","to","src","height","alt","Toggle","aria-controls","data-target","Collapse","Nav","eventKey","Auth","logout","blockedBrokerRoutes","canUserRoute","path","isFlagged","includes","tooltipMessages","PAGE_TITLES_WIHOUT_HEADERS","WithTooltip","show","message","OverlayTrigger","delay","key","placement","overlay","Tooltip","MenuItem","withUserContextHOC","exact","text","history","useHistory","pathname","disabled","NavItem","style","flex","active","role","aria-level","Menu","expanded","initExpanded","featureFlags","useFeatureFlagContext","userIsBroker","isUserBroker","isCommissionsEnabled","allowDirectPay","setExpanded","undefined","hidden","defaultActiveKey","Footer","Row","Col","href","target","ErrorBoundary","Component","constructor","props","super","this","state","hasError","error","showError","errorStr","toString","stackIsFromEnrollment","stack","isEnrollmentMissingKeys","componentDidCatch","errorInfo","appInsights","trackException","severityLevel","SeverityLevel","Error","render","Alert","variant","ErrorBoundaryWithAppInsights","useAppInsightContext","Layout","useCallback","updatedExpandedFlag","Container","fluid","ConditionalRoute","conditionFunc","defaultPath","component","push","defaultProps","UserBasedRoute","flagId","onCheck","isAllowed","getSingleSignOnUrl","partnerAlias","relayUrl","URLSearchParams","SSOHandler","__html","setHtml","urlParams","location","search","partnerName","async","headers","getAuthHeaders","fetch","API_ENDPOINT","method","getSAMLResponse","then","response","forms","samlform","submit","Loading","dangerouslySetInnerHTML","Dashboard","lazy","SubmitApplicationWithReactHookForms","MyClients","Certification","FormsAndDocumentsExplorer","module","default","HelpfulTools","UserPage","FrequentlyAskedQuestions","ContactUs","Commissions","DeveloperPlayground","LoadingTemplate","App","isProduction","process","theme","createTheme","currentVersion","version","isEnabled","isVerboseMode","ThemeProvider","fallback","playground","displayName","name","AppWithLocation","Boolean","hostname","match","unregister","navigator","serviceWorker","ready","registration","baseUrl","getElementsByTagName","getAttribute","rootElement","createBrowserHistory","basename","ariaFixMsalIframe","iFrameList","length","iFrame","item","setAttribute","proxied","XMLHttpRequest","prototype","apply","call","arguments","startsWith","isLoggedIn","setRequestHeader","getToken","jsonData","json","instrumentationKey","initAppInsights","authentication","initialize","run","ReactDOM","unregisterServiceWorker","renderRootWithAppInsightContext","token","Authorization","getLocalTimeHeader","moment","format","getSearchParamsString","obj","b2cauth","signOut","getAccessToken","decodeJWT","exp","Date","now","UserContext","reloadUser","certifications","reloadCertifications","checkAuthorizedUser","userObj","userId","WithUserContext","setUser","setCertifications","newUser","getUserProfile","newCerts","getUserCertifications","processUserService","catch","processCertificationService","certList","Promise","all","animation","FeatureFlagContext","ConfigContext","useConfigContext","configValues","REQUEST_PLAN_MATERIALS_URL","DRUG_SEARCH_URL","PROVIDER_SEARCH_URL","CERTIFICATION_URL","LICENSE_PRE_AEP_DATE","LICENSE_AEP_DATE","WithConfigContext","setConfigValues","flagValues","setFeatureFlagValues","processResourceService","url","getURLsAndUploadConstants","urlSet","err","processFlagService","console","log","getFeatureFlags","flags","forEach","isActive","Spinner","updateUserProfile","userObject","body","JSON","stringify","getPrimaryAgentsByBrokerId","data","AppInsightContext","ChildrenHOC","ChildrenHOCWithAITracking","withAITrackingWithReactPlugin","WithAppInsightContext","SimpleBox","LoadingCircle","label","reactPlugin","ReactPlugin","withAITracking","browserHistory","ApplicationInsights","config","extensions","extensionConfig","identifier","loadAppInsights"],"mappings":"oHAAA,0JAMA,MAAMA,EAAS,QAAC,SAAEC,EAAF,UAAYC,KAAcC,GAA3B,SACX,kBAAC,IAAD,iBAAqBA,EAArB,CAA2BD,UAAWE,IAAW,SAAUF,KACtDD,IAIHI,EAAa,QAAC,UAAEH,EAAY,MAAOC,GAAtB,SACf,kBAACH,EAAD,iBAAYG,EAAZ,CAAkBD,UAAWE,IAAW,OAAQF,OAE9CI,EAAa,QAAC,UAAEJ,EAAY,MAAOC,GAAtB,SACf,kBAACH,EAAD,iBAAYG,EAAZ,CAAkBD,UAAWE,IAAW,OAAQF,Q,iCChBpD,uJAUA,MAAMK,EAAYC,YAAW,CACzBC,MAAO,QAAC,MAAEA,GAAH,QAA6B,CAChCC,QAASD,EAAQ,UAAY,OAC7BE,eAAgBF,EAAQ,UAAY,WACpCG,QAAS,SACTC,gBAAiB,iBACjBC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Q,MACRJ,YACDM,KAAMiJ,GAASA,EAAK7E,U,gCC1D3B,wGAIA,MAAM8E,EAAoB3W,IAAMC,cAAc,MAE9C,MAAM2W,UAAoB5W,IAAM8J,UAC5BC,YAAYC,GACRC,MAAMD,GAGVmB,SACI,OAAO,oCAAGjB,KAAKF,MAAMnL,WAI7B,MAAMgY,EAA4BC,YAA8BF,GAE1DG,EAAwB,IAAgC,IAA/B,SAAElY,EAAF,YAAYiM,GAAkB,EACzD,OACI,kBAAC6L,EAAkB9V,SAAnB,CAA4BC,MAAOgK,IAC7BlG,kBAAQkG,IACN,kBAAC+L,EAAD,KACKhY,KA0Bf0M,EAAuB,IACLhL,qBAAWoW,I,gCClDnC,6BAGA,MAAMK,EAAY,QAAC,SAAEnY,GAAH,SACd,6BACI,yBAAKC,UAAU,kEACVD,KAaEoY,IANO,QAAC,MAAEC,GAAH,SAClB,kBAACF,EAAD,KACI,uBAAGlY,UAAU,iBAAiBoY,GAC9B,kBAAC,IAAD,CAAS1C,UAAU,SAAS1V,UAAU,e,gCChB9C,mGAMA,MAAMqY,EAAc,IAAIC,IAClBN,EAAiC9K,GACnCqL,YAAeF,EAAanL,GAEhC,IAAIlB,EAgBJ,SAASiH,EAAgBD,EAAoBwF,GAYzC,OAXAxM,EAAc,IAAIyM,IAAoB,CAClCC,OAAQ,CACJ1F,mBAAoBA,EACpB2F,WAAY,CAACN,GACbO,gBAAiB,CACb,CAACP,EAAYQ,YAAa,CAAE1P,QAASqP,OAKjDxM,EAAY8M,kBACL9M,I","file":"static/js/main.f7e317f0.chunk.js","sourcesContent":["import React from 'react';\r\n\r\nimport { Button as ButtonBootstrap } from 'react-bootstrap';\r\nimport classnames from 'classnames';\r\nimport './button.css';\r\n\r\nconst Button = ({ children, className, ...rest }) => (\r\n \r\n {children}\r\n \r\n);\r\n\r\nconst NextButton = ({ className = '', ...rest }) => (\r\n \r\n);\r\nconst BackButton = ({ className = '', ...rest }) => (\r\n \r\n);\r\n\r\nexport { Button as default, NextButton, BackButton };\r\n","import React, { useContext, ReactNode, useState } from 'react';\r\nimport {\r\n Dialog,\r\n DialogContent,\r\n DialogTitle,\r\n IconButton,\r\n} from '@material-ui/core';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { makeStyles } from '@material-ui/styles';\r\n\r\nconst useStyles = makeStyles({\r\n title: ({ title }: DialogProps) => ({\r\n display: title ? 'initial' : 'flex',\r\n justifyContent: title ? 'initial' : 'flex-end',\r\n padding: '0.6rem',\r\n backgroundColor: 'rgb(7, 87, 91)',\r\n color: 'white',\r\n\r\n '& .MuiTypography-root': {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n paddingLeft: '1rem',\r\n },\r\n\r\n '& .MuiSvgIcon-root': {\r\n fill: 'white',\r\n },\r\n }),\r\n content: {\r\n padding: '1.2rem 1.6rem 1rem 1.6rem',\r\n },\r\n});\r\n\r\ninterface IDialogContext {\r\n dialog: DialogProps;\r\n setDialog: React.Dispatch>;\r\n handleClose: () => void;\r\n}\r\n\r\nconst DialogContext = React.createContext({\r\n dialog: {\r\n isOpen: false,\r\n },\r\n setDialog: () => {},\r\n handleClose: () => {},\r\n});\r\n\r\nconst useDialogContext = () => useContext(DialogContext);\r\n\r\ninterface DialogProviderProps {\r\n children?: ReactNode;\r\n}\r\n\r\ntype DialogProps = {\r\n id?: string;\r\n isOpen: boolean;\r\n onClose?: () => void;\r\n title?: string;\r\n content?: ReactNode;\r\n width?: false | 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n};\r\n\r\nconst DialogProvider = ({ children }: DialogProviderProps) => {\r\n const [dialog, setDialog] = useState({\r\n isOpen: false,\r\n });\r\n\r\n const classes = useStyles(dialog);\r\n\r\n const handleClose = () => {\r\n if (dialog.onClose) {\r\n dialog.onClose();\r\n }\r\n setDialog({ isOpen: false });\r\n };\r\n\r\n const contextValues = {\r\n dialog,\r\n setDialog,\r\n handleClose,\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n {dialog.title}\r\n \r\n \r\n \r\n \r\n \r\n {dialog.content}\r\n \r\n \r\n {children}\r\n \r\n );\r\n};\r\n\r\nexport { DialogProvider as default, useDialogContext };\r\n","const USER_TYPE = {\r\n FieldAgent: 'FieldAgent',\r\n TeleAgent: 'TeleAgent',\r\n Broker: 'Broker',\r\n};\r\nconst RESOURCE_TYPE = {\r\n PLAN_MATERIALS: 'RequestPlanMaterials',\r\n PROVIDER_SEARCH: 'ProviderSearch',\r\n DRUG_SEARCH: 'DrugSearch',\r\n CERTIFICATION: 'Certification',\r\n AHIP_YEARS: 'AhipYears',\r\n BUSINESS_STATES: 'BusinessStates',\r\n LICENSE_PRE_AEP: 'LicensingPreAEP',\r\n LICENSE_AEP: 'LicensingAEP',\r\n};\r\nconst RESPONSE = {\r\n YES: 'YES',\r\n NO: 'NO',\r\n};\r\nconst GENDER_CODE = {\r\n FEMALE: 'F',\r\n MALE: 'M',\r\n};\r\nconst APPLICATIONS_VIEW = {\r\n ALL: { status: '', timeline: '' },\r\n ACCEPTED_YTD: { status: 'Accepted', timeline: 'YTD' },\r\n ACCEPTED_MTD: { status: 'Accepted', timeline: 'MTD' },\r\n SUBMITTED_YTD: { status: 'Submitted', timeline: 'YTD' },\r\n SUBMITTED_MTD: { status: 'Submitted', timeline: 'MTD' },\r\n};\r\nconst FEATURE_IDS = {\r\n HRA: 'health-risk-assessment',\r\n ENROLL_INSIGHTS: 'agent-enrollment-insights',\r\n DIRECT_PAY: 'broker-direct-pay',\r\n PLAYGROUND: 'broker-playground',\r\n RECORDING: 'broker-call-session',\r\n PCP_FILTER: 'pcp-filter',\r\n};\r\n\r\nconst ASSESSMENT_STATUS = {\r\n INVALID: 'Invalid',\r\n NOT_STARTED: 'NotStarted',\r\n COMPLETED: 'Completed',\r\n SUBMITTED: 'Submitted',\r\n};\r\nexport {\r\n USER_TYPE,\r\n RESPONSE,\r\n GENDER_CODE,\r\n RESOURCE_TYPE,\r\n APPLICATIONS_VIEW,\r\n FEATURE_IDS,\r\n ASSESSMENT_STATUS,\r\n};\r\n","const checkExpanded = (idString) => {\r\n const toggleButtonDom = document\r\n .getElementById(idString)\r\n .getElementsByClassName('navbar-toggle')[0];\r\n return window.getComputedStyle(toggleButtonDom).display !== 'none';\r\n};\r\n\r\nexport default checkExpanded;\r\n","const toUpperCaseFirstCharacterOnly = (str) => {\r\n if (typeof str !== 'string') return '';\r\n return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();\r\n};\r\n\r\nexport { toUpperCaseFirstCharacterOnly };\r\n","import React, { useEffect } from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport { Nav, Navbar } from 'react-bootstrap';\r\nimport { debounce, isEmpty, reduce, get } from 'lodash';\r\nimport { useUserContext } from '../../contexts/user';\r\nimport Auth from '../../Auth';\r\nimport { USER_TYPE } from '../../constants/identifiers';\r\nimport checkExpanded from './util/checkExpanded';\r\nimport { toUpperCaseFirstCharacterOnly } from '../../utils/name';\r\nimport { NextButton } from '../Common/Button/Button';\r\n\r\nexport default function Header({ handleToggle }) {\r\n const { user } = useUserContext();\r\n let nameString = '';\r\n if (!isEmpty(user)) {\r\n nameString =\r\n user.userType !== USER_TYPE.Broker\r\n ? toUpperCaseFirstCharacterOnly(\r\n get(user, 'userName', '').split(' ')[0]\r\n )\r\n : reduce(\r\n get(user, 'userName', '').split(' '),\r\n (cumu, curr) => {\r\n return `${cumu} ${toUpperCaseFirstCharacterOnly(\r\n curr\r\n )}`;\r\n },\r\n ''\r\n );\r\n }\r\n useEffect(() => {\r\n // fire initial expanded status based on collapse situation of initial load\r\n const idString = 'main-navigation';\r\n handleToggle(checkExpanded(idString));\r\n // listen to resize as bootstrap doesn't fire anything when collapsing happens\r\n const handleResize = debounce(() => {\r\n handleToggle(checkExpanded(idString));\r\n }, 300);\r\n window.addEventListener('resize', handleResize);\r\n return () => {\r\n window.removeEventListener('resize', handleResize);\r\n };\r\n }, [handleToggle]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n Alignment Healthcare\r\n \r\n \r\n \r\n \r\n {/* TODO: Enable once implemented */}\r\n {/* */}\r\n \r\n \r\n \r\n Welcome {nameString}\r\n \r\n Auth.logout()}\r\n aria-label=\"log out\"\r\n >\r\n LOG OUT\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n","import { USER_TYPE } from '../../constants/identifiers';\r\n\r\nconst blockedBrokerRoutes = [\r\n '/submit-application',\r\n '/certification',\r\n '/certification-portal',\r\n];\r\n\r\nconst canUserRoute = (user, path, isFlagged) => {\r\n if (isFlagged) {\r\n return false;\r\n }\r\n const userType = user.userType;\r\n switch (userType) {\r\n case USER_TYPE.Broker:\r\n return !blockedBrokerRoutes.includes(path);\r\n default:\r\n return true;\r\n }\r\n};\r\n\r\nexport { canUserRoute };\r\n","import React, { useEffect, useState } from 'react';\r\nimport { Link, useHistory } from 'react-router-dom';\r\nimport { get, isEmpty } from 'lodash';\r\nimport { Nav, Navbar, NavItem, OverlayTrigger, Tooltip } from 'react-bootstrap';\r\nimport classnames from 'classnames';\r\nimport checkExpanded from './util/checkExpanded';\r\nimport { withUserContextHOC, useUserContext } from '../../contexts/user';\r\nimport { canUserRoute } from '../Routing/routeMap';\r\nimport './NavMenu.scss';\r\nimport { FEATURE_IDS, USER_TYPE } from '../../constants/identifiers';\r\nimport { useFeatureFlagContext } from 'contexts/config';\r\n\r\nconst tooltipMessages = {\r\n blockedForAgency: 'Agencies are not able to access this menu.',\r\n};\r\nconst PAGE_TITLES_WIHOUT_HEADERS = ['HOME', 'MY CLIENTS', 'FORMS & DOCUMENTS'];\r\n\r\nconst isUserBroker = ({ userType }) => userType === USER_TYPE.Broker;\r\n\r\nconst WithTooltip = ({ show, message, children }) => {\r\n if (!show) {\r\n return children;\r\n }\r\n return (\r\n {message}}\r\n >\r\n {children}\r\n \r\n );\r\n};\r\n\r\nconst MenuItem = withUserContextHOC(({ to, exact, eventKey, text, user }) => {\r\n const history = useHistory();\r\n const pathname = get(history, 'location.pathname');\r\n const disabled = isEmpty(user) || !canUserRoute(user, to);\r\n return (\r\n \r\n \r\n \r\n \r\n {text}\r\n \r\n \r\n \r\n \r\n );\r\n});\r\n\r\nconst Menu = ({ expanded: initExpanded }) => {\r\n const { user } = useUserContext();\r\n const featureFlags = useFeatureFlagContext();\r\n\r\n const userIsBroker = isUserBroker(user);\r\n const isCommissionsEnabled =\r\n user.allowDirectPay && featureFlags[FEATURE_IDS.DIRECT_PAY];\r\n\r\n const [expanded, setExpanded] = useState(initExpanded);\r\n useEffect(() => {\r\n if (!checkExpanded('page-navigation') && initExpanded) {\r\n setExpanded(initExpanded);\r\n } else {\r\n setExpanded(undefined);\r\n }\r\n }, [initExpanded]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {featureFlags[FEATURE_IDS.PLAYGROUND] && (\r\n \r\n )}\r\n \r\n \r\n\r\n \r\n {isCommissionsEnabled && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Menu;\r\n","import React from 'react';\r\nimport { Container, Row, Col } from 'react-bootstrap';\r\nimport './footer.css';\r\n\r\nconst Footer = () => {\r\n return (\r\n \r\n \r\n © 2021 Alignment Healthcare. All Rights Reserved.\r\n \r\n Privacy Policy & Terms of Use\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Footer;\r\n","import React from 'react';\r\nimport { Alert } from 'react-bootstrap';\r\nimport { useAppInsightContext } from '../../contexts/appInsight';\r\nimport { SeverityLevel } from '@microsoft/applicationinsights-web';\r\n\r\nconst isEnrollmentMissingKeys = (error) => {\r\n // This only happens when refreshing page. We will ignore it for UI display.\r\n const errorStr = error.toString();\r\n const stack = error.stack;\r\n const stackIsFromEnrollment = stack.toLowerCase().includes('enrollment');\r\n return (\r\n errorStr.toLowerCase().includes('cannot read property') &&\r\n stackIsFromEnrollment\r\n );\r\n};\r\n\r\nclass ErrorBoundary extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { hasError: false };\r\n }\r\n\r\n static getDerivedStateFromError(error) {\r\n // Update state so the next render will show the fallback UI.\r\n let showError = false;\r\n showError = showError || !isEnrollmentMissingKeys(error);\r\n return { hasError: showError };\r\n }\r\n\r\n componentDidCatch(error, errorInfo) {\r\n // You can also log the error to an error reporting service\r\n const { appInsights } = this.props;\r\n if (appInsights) {\r\n appInsights.trackException({\r\n error,\r\n severityLevel: SeverityLevel.Error,\r\n errorInfo,\r\n });\r\n }\r\n }\r\n\r\n render() {\r\n if (this.state.hasError) {\r\n // You can render any custom fallback UI\r\n return (\r\n \r\n The application faced an error. Please try again by\r\n refreshing the page or contact support.\r\n \r\n );\r\n }\r\n\r\n return this.props.children;\r\n }\r\n}\r\n\r\nconst ErrorBoundaryWithAppInsights = (props) => {\r\n const appInsights = useAppInsightContext();\r\n return ;\r\n};\r\n\r\nexport default ErrorBoundaryWithAppInsights;\r\n","import React, { useCallback, useState } from 'react';\r\nimport { Row, Col, Container } from 'react-bootstrap';\r\nimport Header from 'components/NavMenu/Header';\r\nimport Menu from 'components/NavMenu/Menu';\r\nimport Footer from 'components/Layout/Footer';\r\nimport 'components/NavMenu/NavMenu.scss';\r\nimport './layout.css';\r\nimport ErrorBoundary from 'components/ErrorBoundary/ErrorBoundary';\r\nimport DialogProvider from 'contexts/DialogProvider';\r\n\r\nexport const Layout = ({ children }) => {\r\n const [expanded, setExpanded] = useState(undefined);\r\n const handleToggle = useCallback((updatedExpandedFlag) => {\r\n setExpanded(updatedExpandedFlag);\r\n }, []);\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n","import React from 'react';\r\nimport { isEmpty } from 'lodash';\r\nimport PropTypes from 'prop-types';\r\nimport { Route, useHistory } from 'react-router-dom';\r\nimport { useUserContext } from '../../contexts/user';\r\nimport { canUserRoute } from './routeMap';\r\nimport { useFeatureFlagContext } from 'contexts/config';\r\n\r\nconst ConditionalRoute = ({\r\n conditionFunc,\r\n defaultPath,\r\n component: Component,\r\n ...rest\r\n}) => {\r\n const ConditionalComponent = (props) => {\r\n const history = useHistory();\r\n const meetsCondition =\r\n typeof conditionFunc !== 'function' || conditionFunc();\r\n\r\n if (!meetsCondition) {\r\n history.push(defaultPath);\r\n }\r\n return ;\r\n };\r\n return ;\r\n};\r\n\r\nConditionalRoute.propTypes = {\r\n conditionFunc: PropTypes.func.isRequired,\r\n defaultPath: PropTypes.string,\r\n};\r\nConditionalRoute.defaultProps = {\r\n defaultPath: '/',\r\n component: () => null,\r\n};\r\n\r\nconst UserBasedRoute = ({ path, flagId, onCheck, ...rest }) => {\r\n const { user } = useUserContext();\r\n const featureFlags = useFeatureFlagContext();\r\n const isAllowed =\r\n (isEmpty(flagId) || featureFlags[flagId]) &&\r\n (onCheck ? onCheck(user) : true);\r\n const conditionFunc = () => canUserRoute(user, path, !isAllowed);\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport { ConditionalRoute as default, UserBasedRoute };\r\n","import { API_ENDPOINT, getAuthHeaders } from './api';\r\n\r\nconst urlInitiateSingleSignOn = '/sso/initiatesinglesignonpartner';\r\n\r\nconst getSearchParamsString = (obj) => new URLSearchParams(obj).toString();\r\n\r\nconst getSingleSignOnUrl = (partnerAlias: string, relayUrl: string) => {\r\n return `${urlInitiateSingleSignOn}?${getSearchParamsString({\r\n partnerAlias,\r\n relayUrl,\r\n })}`;\r\n};\r\n\r\nconst getSAMLResponse = async (partnerAlias: string, relayUrl: string) => {\r\n const headers: HeadersInit = getAuthHeaders();\r\n\r\n const response = await fetch(\r\n `${API_ENDPOINT}${getSingleSignOnUrl(partnerAlias, relayUrl)}`,\r\n {\r\n headers,\r\n method: 'POST',\r\n }\r\n );\r\n\r\n return response;\r\n};\r\n\r\nexport { getSingleSignOnUrl, getSAMLResponse };\r\n","import React, { useEffect } from 'react';\r\nimport { useState } from 'react';\r\nimport { getSAMLResponse } from 'api/SSO';\r\nimport LoadingCircle from './Loading';\r\n\r\nconst SSOHandler = () => {\r\n const [__html, setHtml] = useState();\r\n\r\n const urlParams = new URLSearchParams(window.location.search);\r\n\r\n const partnerName = urlParams.get('partnerName');\r\n const relayUrl = urlParams.get('relayUrl');\r\n\r\n useEffect(() => {\r\n getSAMLResponse(partnerName, relayUrl)\r\n .then((response) => response.text())\r\n .then((text) => setHtml(text));\r\n }, []);\r\n\r\n useEffect(() => {\r\n document.forms.samlform && document.forms.samlform.submit();\r\n });\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n >\r\n );\r\n};\r\n\r\nexport default SSOHandler;\r\n","import React, { Component, lazy, Suspense } from 'react';\r\nimport { Redirect, Switch, useHistory } from 'react-router-dom';\r\nimport { Layout } from 'components/Layout/Layout';\r\nimport { WithUserContext } from './contexts/user';\r\nimport { WithConfigContext } from './contexts/config';\r\nimport { UserBasedRoute } from './components/Routing/ConditionalRoute';\r\nimport CacheBuster from 'react-cache-buster';\r\nimport LoadingCircle from 'components/Common/Loading';\r\nimport { version } from '../package.json';\r\nimport 'bootstrap/dist/css/bootstrap.css';\r\nimport './assets/css/animate.min.css';\r\nimport './assets/css/demo.css';\r\nimport './assets/css/enrollment.scss';\r\nimport './assets/css/pe-icon-7-stroke.css';\r\nimport './custom.css';\r\nimport './syncfusion.css';\r\nimport './contexts/config.css';\r\nimport './assets/css/avabroker.scss';\r\nimport { FEATURE_IDS } from 'constants/identifiers';\r\nimport SSOHandler from 'components/Common/SSOHandler';\r\nimport { ThemeProvider } from '@material-ui/styles';\r\nimport { createTheme } from '@material-ui/core';\r\n\r\nconst Dashboard = lazy(() => import('./components/Dashboard/Dashboard'));\r\nconst SubmitApplicationWithReactHookForms = lazy(() =>\r\n import('./components/EnrollmentV2')\r\n);\r\nconst MyClients = lazy(() => import('./components/MyClients'));\r\nconst Certification = lazy(() =>\r\n import('./components/Certification/Certification')\r\n);\r\nconst FormsAndDocumentsExplorer = lazy(() =>\r\n import('./components/FormsDocuments/FormsAndDocumentsExplorer').then(\r\n (module) => {\r\n return { default: module.FormsAndDocumentsExplorer };\r\n }\r\n )\r\n);\r\nconst HelpfulTools = lazy(() =>\r\n import('./components/HelpfulTools/HelpfulTools')\r\n);\r\nconst UserPage = lazy(() => import('./components/UserProfile/UserProfile'));\r\nconst FrequentlyAskedQuestions = lazy(() =>\r\n import('./components/HelpfulTools/Faq')\r\n);\r\nconst ContactUs = lazy(() => import('./components/HelpfulTools/ContactUs'));\r\n\r\nconst Commissions = lazy(() => import('./components/Commissions'));\r\nconst DeveloperPlayground = lazy(() =>\r\n import('./components/Playground/DevPlayground')\r\n);\r\nconst LoadingTemplate = () => (\r\n \r\n \r\n \r\n);\r\n\r\nclass App extends Component {\r\n static displayName = App.name;\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n isProduction: process.env.NODE_ENV === 'production',\r\n };\r\n }\r\n\r\n render() {\r\n const { isProduction } = this.state;\r\n const theme = createTheme();\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n }>\r\n \r\n\r\n \r\n \r\n \r\n user?.allowDirectPay\r\n }\r\n />\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n user?.allowDirectPay\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nconst AppWithLocation = (props) => {\r\n const history = useHistory();\r\n return ;\r\n};\r\n\r\nexport default AppWithLocation;\r\n","// In production, we register a service worker to serve assets from local cache.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\r\n// cached resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\r\n// This link also includes instructions on opting out of this behavior.\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport default function register () {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Lets check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl);\r\n } else {\r\n // Is not local host. Just register service worker\r\n registerValidSW(swUrl);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW (swUrl) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the old content will have been purged and\r\n // the fresh content will have been added to the cache.\r\n // It's the perfect time to display a \"New content is\r\n // available; please refresh.\" message in your web app.\r\n console.log('New content is available; please refresh.');\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker (swUrl) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n if (\r\n response.status === 404 ||\r\n response.headers.get('content-type').indexOf('javascript') === -1\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister () {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { BrowserRouter } from 'react-router-dom';\r\nimport App from './App';\r\nimport { unregister as unregisterServiceWorker } from './registerServiceWorker';\r\nimport { createBrowserHistory } from 'history';\r\nimport authentication from '@kdpw/msal-b2c-react';\r\nimport {\r\n getAppInsights,\r\n initAppInsights,\r\n} from './components/Logging/ApplicationInsights';\r\nimport { WithAppInsightContext } from './contexts/appInsight';\r\nimport Auth from './Auth';\r\n\r\nconst baseUrl = document.getElementsByTagName('base')[0].getAttribute('href');\r\nconst rootElement = document.getElementById('root');\r\nconst history = createBrowserHistory({ basename: baseUrl });\r\n\r\nconst ariaFixMsalIframe = () => {\r\n const iFrameList = document.getElementsByTagName('iframe');\r\n if (iFrameList.length > 0) {\r\n const iFrame = iFrameList.item(0);\r\n iFrame.setAttribute('title', 'msal iframe');\r\n iFrame.setAttribute('aria-hidden', 'true');\r\n }\r\n};\r\n\r\nconst renderRoot = () => {\r\n ReactDOM.render(\r\n \r\n \r\n ,\r\n rootElement\r\n );\r\n ariaFixMsalIframe();\r\n unregisterServiceWorker();\r\n};\r\n\r\nconst renderRootWithAppInsightContext = (appInsights) => () => {\r\n ReactDOM.render(\r\n \r\n \r\n \r\n \r\n ,\r\n rootElement\r\n );\r\n ariaFixMsalIframe();\r\n unregisterServiceWorker();\r\n};\r\n\r\n// temporary hack to workaround Syncfusion FileManagerComponent\r\n(function () {\r\n var proxied = window.XMLHttpRequest.prototype.open;\r\n window.XMLHttpRequest.prototype.open = function () {\r\n proxied.apply(this, [].slice.call(arguments));\r\n if (arguments[1].startsWith('/api/docs') && Auth.isLoggedIn()) {\r\n this.setRequestHeader('Authorization', `Bearer ${Auth.getToken()}`);\r\n }\r\n };\r\n})();\r\n\r\nfetch('api/Config/B2C').then(async (response) => {\r\n const jsonData = await response.json();\r\n const { instrumentationKey } = jsonData;\r\n const appInsights = initAppInsights(instrumentationKey, history);\r\n authentication.initialize(jsonData);\r\n authentication.run(renderRootWithAppInsightContext(appInsights));\r\n});\r\n","import Auth from '../Auth';\r\nimport moment from 'moment';\r\n\r\nconst API_ENDPOINT: string = 'api';\r\n\r\nconst getAuthHeaders = (): {} => {\r\n const token: string = Auth.getToken();\r\n const headers: {} = {\r\n Authorization: `Bearer ${token}`,\r\n 'Content-Type': 'application/json',\r\n };\r\n return headers;\r\n};\r\n\r\nconst getLocalTimeHeader = (): {} => {\r\n const headers: {} = {\r\n 'X-LocalTimestamp': moment().format('YYYY-MM-DDTHH:mm:ssZ'),\r\n };\r\n return headers;\r\n};\r\n\r\nconst getSearchParamsString = (obj): string =>\r\n new URLSearchParams(obj).toString();\r\n\r\nexport {\r\n API_ENDPOINT,\r\n getAuthHeaders,\r\n getLocalTimeHeader,\r\n getSearchParamsString,\r\n};\r\n","import b2cauth from '@kdpw/msal-b2c-react';\r\n\r\nimport decodeJWT from 'jwt-decode';\r\n\r\nclass Auth {\r\n isLoggedIn() {\r\n if (this.getToken()) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n logout() {\r\n b2cauth.signOut();\r\n }\r\n\r\n getToken() {\r\n const token = b2cauth.getAccessToken();\r\n if (!token) return token;\r\n // const decoded = decodeJWT(token, { header: true});\r\n const decoded = decodeJWT(token);\r\n if (decoded.exp < Date.now() / 1000) {\r\n this.logout();\r\n return;\r\n }\r\n return token;\r\n }\r\n}\r\n\r\nexport default new Auth();\r\n","import React, { useContext, useState, useEffect, useCallback } from 'react';\r\nimport { isEmpty, get } from 'lodash';\r\nimport { getUserProfile, getUserCertifications } from '../api/user';\r\nimport Auth from '../Auth';\r\nimport { USER_TYPE } from '../constants/identifiers';\r\nimport { getCertificationDocumentUrl } from '../api/certification';\r\nimport { Spinner } from 'react-bootstrap';\r\nimport './config.css';\r\nimport { User } from 'interfaces/User';\r\nimport { CertificationDocument } from 'interfaces/CertificationDocument';\r\n\r\ninterface UserContextInterface {\r\n user: User;\r\n reloadUser: () => void | Promise;\r\n certifications: CertificationDocument[];\r\n reloadCertifications: () => void | Promise;\r\n}\r\n\r\nconst UserContext = React.createContext({\r\n user: {} as User,\r\n reloadUser: () => {},\r\n certifications: [],\r\n reloadCertifications: () => {},\r\n});\r\n\r\nconst checkAuthorizedUser = (userObj: User): boolean => {\r\n const { userId, userType } = userObj;\r\n if (!(userId && get(USER_TYPE, userType))) {\r\n Auth.logout();\r\n return false;\r\n }\r\n return true;\r\n};\r\n\r\nconst WithUserContext = ({ children, ...rest }) => {\r\n const [user, setUser] = useState({} as User);\r\n const [certifications, setCertifications] = useState<\r\n CertificationDocument[]\r\n >([]);\r\n\r\n const reloadUser = useCallback(async () => {\r\n const newUser: User = await getUserProfile();\r\n if (checkAuthorizedUser(newUser)) {\r\n setUser(newUser);\r\n }\r\n }, [setUser]);\r\n\r\n const reloadCertifications = useCallback(async () => {\r\n const newCerts: CertificationDocument[] = await getUserCertifications();\r\n setCertifications(newCerts);\r\n }, [setCertifications]);\r\n\r\n useEffect(() => {\r\n const processUserService = getUserProfile()\r\n .then((newUser) => {\r\n if (checkAuthorizedUser(newUser)) {\r\n setUser(newUser);\r\n }\r\n })\r\n .catch(() => {\r\n Auth.logout();\r\n });\r\n const processCertificationService = getUserCertifications().then(\r\n (certList) => {\r\n setCertifications(certList);\r\n }\r\n );\r\n Promise.all([processUserService, processCertificationService]);\r\n }, []);\r\n\r\n if (isEmpty(user)) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n const contextValues: UserContextInterface = {\r\n user,\r\n reloadUser,\r\n certifications,\r\n reloadCertifications,\r\n };\r\n\r\n return (\r\n \r\n {!isEmpty(user) && children}\r\n \r\n );\r\n};\r\n\r\nconst useUserContext = () => {\r\n return useContext(UserContext);\r\n};\r\n\r\nconst withUserContextHOC =\r\n (Component) =>\r\n ({ children, ...rest }) => {\r\n const { user, reloadUser, certifications, reloadCertifications } =\r\n useUserContext();\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n };\r\n\r\nexport { WithUserContext, useUserContext, withUserContextHOC, UserContext };\r\n","import React, { useContext, useEffect, useState } from 'react';\r\nimport { isEmpty, get } from 'lodash';\r\nimport { getFeatureFlags, getURLsAndUploadConstants } from '../api/config';\r\nimport { RESOURCE_TYPE } from '../constants/identifiers';\r\nimport './config.css';\r\nimport { Spinner, Alert } from 'react-bootstrap';\r\n\r\nconst FeatureFlagContext = React.createContext();\r\n\r\nconst useFeatureFlagContext = () => {\r\n const featureList = useContext(FeatureFlagContext);\r\n\r\n return featureList;\r\n};\r\n\r\nconst ConfigContext = React.createContext();\r\n\r\nconst useConfigContext = () => {\r\n const configValues = useContext(ConfigContext);\r\n return {\r\n REQUEST_PLAN_MATERIALS_URL: configValues[RESOURCE_TYPE.PLAN_MATERIALS],\r\n DRUG_SEARCH_URL: configValues[RESOURCE_TYPE.DRUG_SEARCH],\r\n PROVIDER_SEARCH_URL: configValues[RESOURCE_TYPE.PROVIDER_SEARCH],\r\n CERTIFICATION_URL: configValues[RESOURCE_TYPE.CERTIFICATION],\r\n AHIP_YEARS: configValues[RESOURCE_TYPE.AHIP_YEARS],\r\n BUSINESS_STATES: configValues[RESOURCE_TYPE.BUSINESS_STATES],\r\n LICENSE_PRE_AEP_DATE: configValues[RESOURCE_TYPE.LICENSE_PRE_AEP],\r\n LICENSE_AEP_DATE: configValues[RESOURCE_TYPE.LICENSE_AEP],\r\n };\r\n};\r\n\r\nconst WithConfigContext = ({ children }) => {\r\n const [configValues, setConfigValues] = useState();\r\n const [flagValues, setFeatureFlagValues] = useState({});\r\n\r\n useEffect(() => {\r\n const processResourceService = getURLsAndUploadConstants()\r\n .then((urlSet) => {\r\n setConfigValues(urlSet);\r\n })\r\n .catch((err) => {\r\n throw err;\r\n });\r\n const processFlagService = getFeatureFlags()\r\n .then((urlSet = []) => {\r\n const flags = {};\r\n urlSet.forEach(({ name, isActive }) => {\r\n flags[name] = isActive;\r\n });\r\n setFeatureFlagValues(flags);\r\n })\r\n .catch((err) => {\r\n throw err;\r\n });\r\n Promise.all([processResourceService, processFlagService]);\r\n }, []);\r\n if (isEmpty(configValues) || isEmpty(flagValues)) {\r\n return (\r\n \r\n \r\n \r\n );\r\n } else if (\r\n get(configValues, 'status', 200) >= 400 ||\r\n get(flagValues, 'status', 200) >= 400\r\n ) {\r\n return (\r\n \r\n \r\n There was a network error.\r\n \r\n Please try refreshing or contact the system administrator.\r\n \r\n \r\n );\r\n }\r\n return (\r\n \r\n \r\n {children}\r\n \r\n \r\n );\r\n};\r\n\r\nexport { WithConfigContext, useConfigContext, useFeatureFlagContext };\r\n","import { API_ENDPOINT, getLocalTimeHeader } from './api';\r\n\r\nconst urlGetConfigAllResources = '/Config/GetURLsAndUploadConstants';\r\nconst urlGetFeatureFlags = '/Config/GetFeatureFlags';\r\n\r\nconst getURLsAndUploadConstants = async () => {\r\n const url = `${API_ENDPOINT}${urlGetConfigAllResources}`;\r\n\r\n const headers = getLocalTimeHeader();\r\n\r\n const response = fetch(url, {\r\n method: 'GET',\r\n headers,\r\n }).then((response) => response.json());\r\n\r\n return response;\r\n};\r\n\r\nconst getFeatureFlags = async () => {\r\n const url = `${API_ENDPOINT}${urlGetFeatureFlags}`;\r\n\r\n const headers = getLocalTimeHeader();\r\n\r\n const response = fetch(url, {\r\n method: 'GET',\r\n headers,\r\n })\r\n .then((response) => response?.json())\r\n .catch((err) => {\r\n console.log(err);\r\n return [];\r\n });\r\n\r\n return response;\r\n};\r\n\r\nexport { getURLsAndUploadConstants, getFeatureFlags };\r\n","import { API_ENDPOINT, getAuthHeaders } from './api';\r\nimport Auth from '../Auth';\r\nimport { User } from 'interfaces/User';\r\nimport { CertificationDocument } from 'interfaces/CertificationDocument';\r\n\r\nconst USER_PROFILE_UPDATE = '/account/UpdateUserProfile';\r\nconst USER_PROFILE_GET = '/account/GetUserProfile';\r\nconst USER_CERTIFICATIONS_GET = '/account/GetUserCertifications';\r\nconst PRIMARY_AGENTS_GET = '/account/GetPrimaryAgentsByBrokerID';\r\n\r\nconst updateUserProfile = (userObject) => {\r\n const headers: {} = getAuthHeaders();\r\n const url: string = `${API_ENDPOINT}${USER_PROFILE_UPDATE}`;\r\n const response = fetch(url, {\r\n method: 'POST',\r\n headers,\r\n body: JSON.stringify(userObject),\r\n }).then((response) => response.json());\r\n return response;\r\n};\r\n\r\nconst getUserProfile = () => {\r\n const headers: {} = getAuthHeaders();\r\n const url: string = `${API_ENDPOINT}${USER_PROFILE_GET}`;\r\n const response = fetch(url, {\r\n method: 'GET',\r\n headers,\r\n }).then((response) => {\r\n if (response.status >= 400 && response.status < 500) {\r\n Auth.logout();\r\n return {} as User;\r\n }\r\n return response.json();\r\n });\r\n return response;\r\n};\r\n\r\nconst getUserCertifications = () => {\r\n const headers: {} = getAuthHeaders();\r\n const url: string = `${API_ENDPOINT}${USER_CERTIFICATIONS_GET}`;\r\n const response = fetch(url, {\r\n method: 'GET',\r\n headers,\r\n }).then((response) => {\r\n if (response.status >= 400 && response.status < 500) {\r\n Auth.logout();\r\n return {} as CertificationDocument;\r\n }\r\n return response.json();\r\n });\r\n return response;\r\n};\r\nconst getPrimaryAgentsByBrokerId = () => {\r\n const headers: {} = getAuthHeaders();\r\n const url: string = `${API_ENDPOINT}${PRIMARY_AGENTS_GET}`;\r\n const response = fetch(url, {\r\n method: 'GET',\r\n headers,\r\n }).then((data) => data.json());\r\n return response;\r\n};\r\nexport {\r\n USER_PROFILE_UPDATE,\r\n USER_PROFILE_GET,\r\n updateUserProfile,\r\n getUserProfile,\r\n getUserCertifications,\r\n getPrimaryAgentsByBrokerId,\r\n};\r\n","import React, { useContext, useState, useEffect } from 'react';\r\nimport { isEmpty } from 'lodash';\r\nimport { withAITrackingWithReactPlugin } from '../components/Logging/ApplicationInsights';\r\n\r\nconst AppInsightContext = React.createContext(null);\r\n\r\nclass ChildrenHOC extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n }\r\n\r\n render() {\r\n return <>{this.props.children}>;\r\n }\r\n}\r\n\r\nconst ChildrenHOCWithAITracking = withAITrackingWithReactPlugin(ChildrenHOC);\r\n\r\nconst WithAppInsightContext = ({ children, appInsights }) => {\r\n return (\r\n \r\n {!isEmpty(appInsights) && (\r\n \r\n {children}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\n/*\r\nPlease refer to: https://github.com/microsoft/ApplicationInsights-JS#sending-telemetry-to-the-azure-portal\r\nfor how to design the trackEvent calls.\r\n\r\nExample for .trackEvent():\r\n const appInsights = useAppInsightContext();\r\n useEffect(() => {\r\n appInsights.trackEvent({\r\n name: 'LayoutLoaded',\r\n properties: {\r\n count,\r\n },\r\n });\r\n count++;\r\n });\r\n\r\n\r\n\r\n*/\r\nconst useAppInsightContext = () => {\r\n const appInsights = useContext(AppInsightContext);\r\n return appInsights;\r\n};\r\n\r\nexport { WithAppInsightContext, useAppInsightContext };\r\n","import React from 'react';\r\nimport { Spinner } from 'react-bootstrap';\r\n\r\nconst SimpleBox = ({ children }) => (\r\n \r\n \r\n {children}\r\n \r\n \r\n);\r\ninterface LoadingCircleProps {\r\n label: string;\r\n}\r\nconst LoadingCircle = ({ label }: Partial) => (\r\n \r\n {label}\r\n \r\n \r\n);\r\nexport default LoadingCircle;\r\n","import { ApplicationInsights } from '@microsoft/applicationinsights-web';\r\nimport {\r\n ReactPlugin,\r\n withAITracking,\r\n} from '@microsoft/applicationinsights-react-js';\r\n\r\nconst reactPlugin = new ReactPlugin();\r\nconst withAITrackingWithReactPlugin = (component) =>\r\n withAITracking(reactPlugin, component);\r\n\r\nlet appInsights;\r\n\r\nfunction getAppInsights() {\r\n if (appInsights) {\r\n return appInsights;\r\n }\r\n\r\n return {\r\n trackEvent: function (eventData) {\r\n console.log(\r\n 'Application Insights trackEvent: ' + JSON.stringify(eventData)\r\n );\r\n },\r\n };\r\n}\r\n\r\nfunction initAppInsights(instrumentationKey, browserHistory) {\r\n appInsights = new ApplicationInsights({\r\n config: {\r\n instrumentationKey: instrumentationKey,\r\n extensions: [reactPlugin],\r\n extensionConfig: {\r\n [reactPlugin.identifier]: { history: browserHistory },\r\n },\r\n },\r\n });\r\n\r\n appInsights.loadAppInsights();\r\n return appInsights;\r\n}\r\n\r\nexport {\r\n getAppInsights,\r\n initAppInsights,\r\n reactPlugin,\r\n withAITrackingWithReactPlugin,\r\n};\r\n"],"sourceRoot":""}
{label}