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EAAW,CAAArE,SAAA,EACVoD,EAAAA,EAAAA,KAACkB,EAAAA,EAAU,CAACC,cAAY,EAACC,QAAQ,KAAKC,MAAM,SAAQzE,SAAC,wBAGrDoD,EAAAA,EAAAA,KAACkB,EAAAA,EAAU,CAACG,MAAM,SAAQzE,SAAC,gDAI7BoD,EAAAA,EAAAA,KAACsB,EAAAA,EAAW,CAAA1E,UACVoD,EAAAA,EAAAA,KAACuB,EAAAA,EAAM,CACLC,MAAM,UACNpE,MAAO,CAAEqE,WAAY,QACrBC,QAAS3C,EAAOnC,SACjB,gBAIHgE,EAAAA,EAAAA,MAACe,EAAAA,EAAS,CAAA/E,SAAA,EACRoD,EAAAA,EAAAA,KAAC4B,EAAAA,EAAgB,CAACC,YAAY7B,EAAAA,EAAAA,KAAC8B,EAAAA,EAAU,IAAIlF,UAC3CoD,EAAAA,EAAAA,KAACkB,EAAAA,EAAU,CAAAtE,SAAC,2BAEdoD,EAAAA,EAAAA,KAAC+B,EAAAA,EAAgB,CAAAnF,UACfoD,EAAAA,EAAAA,KAAA,OAAK5C,MAAO,CAAE4E,SAAU,QAASpF,UAC/BoD,EAAAA,EAAAA,KAACiC,EAAAA,EAAK,CACJb,QAAQ,WACRhE,MAAO,CAAE0D,QAASnC,EAAMoC,QAAQ,IAAKnE,UAErCoD,EAAAA,EAAAA,KAAA,QACE5C,MAAO,CAAEe,QAAS,OAAQ+D,cAAe,UAAWtF,SAEnDsC,EAAOiD,KAAI,CAACC,EAAOC,KAClBrC,EAAAA,EAAAA,KAAA,QAAApD,SAAmB0F,OAAOF,IAAfC,yBAW1B,ICnHX,G","sources":["../node_modules/@material-ui/core/esm/CardMedia/CardMedia.js","pages/login/login.tsx","pages/login/index.ts"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { chainPropTypes } from '@material-ui/utils';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n backgroundSize: 'cover',\n backgroundRepeat: 'no-repeat',\n backgroundPosition: 'center'\n },\n\n /* Styles applied to the root element if `component=\"video, audio, picture, iframe, or img\"`. */\n media: {\n width: '100%'\n },\n\n /* Styles applied to the root element if `component=\"picture or img\"`. */\n img: {\n // ⚠️ object-fit is not supported by IE 11.\n objectFit: 'cover'\n }\n};\nvar MEDIA_COMPONENTS = ['video', 'audio', 'picture', 'iframe', 'img'];\nvar CardMedia = /*#__PURE__*/React.forwardRef(function CardMedia(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n image = props.image,\n src = props.src,\n style = props.style,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"component\", \"image\", \"src\", \"style\"]);\n\n var isMediaComponent = MEDIA_COMPONENTS.indexOf(Component) !== -1;\n var composedStyle = !isMediaComponent && image ? _extends({\n backgroundImage: \"url(\\\"\".concat(image, \"\\\")\")\n }, style) : style;\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, isMediaComponent && classes.media, \"picture img\".indexOf(Component) !== -1 && classes.img),\n ref: ref,\n style: composedStyle,\n src: isMediaComponent ? image || src : undefined\n }, other), children);\n});\nprocess.env.NODE_ENV !== \"production\" ? CardMedia.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: chainPropTypes(PropTypes.node, function (props) {\n if (!props.children && !props.image && !props.src && !props.component) {\n return new Error('Material-UI: Either `children`, `image`, `src` or `component` prop must be specified.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Image to be displayed as a background image.\n * Either `image` or `src` prop must be specified.\n * Note that caller must specify height otherwise the image will not be visible.\n */\n image: PropTypes.string,\n\n /**\n * An alias for `image` property.\n * Available only with media components.\n * Media components: `video`, `audio`, `picture`, `iframe`, `img`.\n */\n src: PropTypes.string,\n\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardMedia'\n})(CardMedia);","import React, { useCallback, useContext, useMemo } from 'react';\nimport { Redirect } from 'react-router-dom';\n\nimport {\n Accordion,\n AccordionDetails,\n AccordionSummary,\n Button,\n Card,\n CardActions,\n CardContent,\n CardMedia,\n Grid,\n Paper,\n Typography,\n useTheme,\n} from '@material-ui/core';\nimport { ExpandMore } from '@material-ui/icons';\n\nimport { useRequiredContext } from '../../common/hooks-util';\nimport { AuthContext } from '../../contexts/auth-context';\nimport { ErrorsContext } from '../../contexts/errors-context';\n\nexport const Login: React.VFC = React.memo(() => {\n const theme = useTheme();\n\n const { isAuthenticated, login, logout } = useRequiredContext(AuthContext);\n\n const errors = useContext(ErrorsContext);\n\n const redirectPath = useMemo(\n () => new URLSearchParams(window.location.search).get('path') ?? '/',\n []\n );\n\n const handleLogin = useCallback(() => {\n login({ path: redirectPath });\n }, [login, redirectPath]);\n\n if (isAuthenticated && errors == null) {\n return ;\n }\n\n return (\n \n \n \n \n\n {errors == null ? (\n <>\n \n \n Välkommen!\n \n \n Logga in för att fortsätta.\n \n \n \n \n Logga In\n \n \n >\n ) : (\n <>\n \n \n Något gick fel.\n \n \n Logga ut för att försöka igen.\n \n \n \n \n Logga Ut\n \n \n \n }>\n Teknisk beskrivning\n \n \n \n \n \n {errors.map((error, index) => (\n {String(error)}\n ))}\n \n \n \n \n \n >\n )}\n \n \n \n );\n});\n","import { Login } from './login';\n\nexport default Login;\n"],"names":["MEDIA_COMPONENTS","CardMedia","React","props","ref","children","classes","className","_props$component","component","Component","image","src","style","other","_objectWithoutProperties","isMediaComponent","indexOf","composedStyle","_extends","backgroundImage","concat","clsx","root","media","img","undefined","withStyles","display","backgroundSize","backgroundRepeat","backgroundPosition","width","objectFit","name","Login","theme","useTheme","isAuthenticated","login","logout","useRequiredContext","AuthContext","errors","useContext","ErrorsContext","redirectPath","useMemo","_URLSearchParams$get","URLSearchParams","window","location","search","get","handleLogin","useCallback","path","_jsx","Redirect","push","to","Grid","container","justifyContent","alignItems","item","xs","sm","md","_jsxs","Card","padding","spacing","_Fragment","CardContent","Typography","gutterBottom","variant","align","CardActions","Button","color","marginLeft","onClick","Accordion","AccordionSummary","expandIcon","ExpandMore","AccordionDetails","overflow","Paper","flexDirection","map","error","index","String"],"sourceRoot":""}
\n \n \n {errors.map((error, index) => (\n {String(error)}\n ))}\n \n \n
\n {errors.map((error, index) => (\n {String(error)}\n ))}\n