-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---packages-gatsby-plugin-jaen-src-pages-login-tsx-b5af4ae7914ac855ab81.js.map
1 lines (1 loc) · 29.1 KB
/
component---packages-gatsby-plugin-jaen-src-pages-login-tsx-b5af4ae7914ac855ab81.js.map
1
{"version":3,"file":"component---packages-gatsby-plugin-jaen-src-pages-login-tsx-b5af4ae7914ac855ab81.js","mappings":"+eAeO,MAAMA,GAAgBC,EAAAA,EAAAA,aAC3B,CAAAC,EAAoCC,KAAS,IAA5C,UAACC,EAAS,WAAEC,KAAeC,GAAMJ,EAChC,MAAM,OAACK,EAAM,SAAEC,IAAYC,EAAAA,EAAAA,KACrBC,GAAWC,EAAAA,EAAAA,QAAyB,MAEpCC,GAAWC,EAAAA,EAAAA,GAAaH,EAAUP,GAQxC,OACEW,EAAAA,EAAAA,IAACC,EAAAA,GAAW,CACVC,GAAG,sBACHZ,UAAWA,EACXC,WAAYA,EAAWY,SAAA,EACvBC,EAAAA,EAAAA,IAACC,EAAAA,EAAS,CAACC,QAAQ,WAAUH,SAAC,cAC9BH,EAAAA,EAAAA,IAACO,EAAAA,EAAU,CAAAJ,SAAA,EACTC,EAAAA,EAAAA,IAACI,EAAAA,EAAK,CACJN,GAAG,WACHb,IAAKS,EACLW,KAAK,WACLC,KAAMjB,EAAS,OAAS,WACxBkB,aAAa,mBACbC,UAAQ,KACJpB,KAENY,EAAAA,EAAAA,IAACS,EAAAA,EAAiB,CAAAV,UAChBC,EAAAA,EAAAA,IAACU,EAAAA,EAAU,CACTC,QAAQ,OACRC,MAAM,YACN,aAAYvB,EAAS,gBAAkB,kBACvCwB,KAAMxB,GAASW,EAAAA,EAAAA,IAACc,EAAAA,WAAU,KAAMd,EAAAA,EAAAA,IAACe,EAAAA,MAAK,IACtCC,QA7BYC,KACpB3B,IACIE,EAAS0B,SACX1B,EAAS0B,QAAQC,MAAM,CAACC,eAAe,GACzC,UA6BEpB,EAAAA,EAAAA,IAACqB,EAAAA,GAAgB,CAA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AEHH,EACL,C","sources":["webpack://photonq/../packages/gatsby-plugin-jaen/src/components/JaenLogin/components/PasswordField.tsx","webpack://photonq/../packages/gatsby-plugin-jaen/src/components/JaenLogin/JaenLogin.tsx","webpack://photonq/../packages/gatsby-plugin-jaen/src/components/shared/JaenLogo/JaenLogo.tsx","webpack://photonq/../packages/gatsby-plugin-jaen/src/pages/login.tsx","webpack://photonq/../node_modules/@chakra-ui/hooks/dist/chunk-QJA5SDDN.mjs"],"sourcesContent":["import {\n FormControl,\n FormErrorMessage,\n FormLabel,\n IconButton,\n Input,\n InputGroup,\n InputProps,\n InputRightElement,\n useDisclosure,\n useMergeRefs\n} from '@chakra-ui/react'\nimport {forwardRef, useRef} from 'react'\nimport {FaEye, FaEyeSlash} from 'react-icons/fa'\n\nexport const PasswordField = forwardRef<HTMLInputElement, InputProps>(\n ({isInvalid, isRequired, ...props}, ref) => {\n const {isOpen, onToggle} = useDisclosure()\n const inputRef = useRef<HTMLInputElement>(null)\n\n const mergeRef = useMergeRefs(inputRef, ref)\n const onClickReveal = () => {\n onToggle()\n if (inputRef.current) {\n inputRef.current.focus({preventScroll: true})\n }\n }\n\n return (\n <FormControl\n id=\"login_form_password\"\n isInvalid={isInvalid}\n isRequired={isRequired}>\n <FormLabel htmlFor=\"password\">Password</FormLabel>\n <InputGroup>\n <Input\n id=\"password\"\n ref={mergeRef}\n name=\"password\"\n type={isOpen ? 'text' : 'password'}\n autoComplete=\"current-password\"\n required\n {...props}\n />\n <InputRightElement>\n <IconButton\n variant=\"text\"\n color=\"brand.500\"\n aria-label={isOpen ? 'Mask password' : 'Reveal password'}\n icon={isOpen ? <FaEyeSlash /> : <FaEye />}\n onClick={onClickReveal}\n />\n </InputRightElement>\n </InputGroup>\n <FormErrorMessage>\n {props.name === 'password' && 'Password is required'}\n </FormErrorMessage>\n </FormControl>\n )\n }\n)\n\nPasswordField.displayName = 'PasswordField'\n","/* eslint-disable @typescript-eslint/no-misused-promises */\nimport {\n Alert,\n AlertDescription,\n AlertIcon,\n AlertTitle,\n Box,\n Button,\n Checkbox,\n CloseButton,\n Container,\n FormControl,\n FormErrorMessage,\n FormLabel,\n Heading,\n HStack,\n Input,\n Modal,\n ModalContent,\n Stack,\n Text\n} from '@chakra-ui/react'\nimport {useState} from 'react'\nimport {SubmitHandler, useForm} from 'react-hook-form'\nimport {FaArrowLeft} from 'react-icons/fa'\n\nimport Logo from '../Logo'\nimport {JaenFullLogo} from '../shared/JaenLogo/JaenLogo'\nimport {Link} from '../shared/Link/Link'\nimport {PasswordField} from './components/PasswordField'\n\nexport interface JaenLoginProps {\n onSignIn: (values: FormData) => Promise<void>\n goBackPath?: string\n onGoBack?: () => void\n forgotPasswordPath?: string\n onForgotPassword?: () => void\n signUpPath?: string\n onSignUp?: () => void\n isModal?: boolean\n}\n\ninterface FormData {\n login: string\n password: string\n logMeOut: boolean\n}\n\nexport const JaenLogin: React.FC<JaenLoginProps> = props => {\n const {\n handleSubmit,\n register,\n formState: {errors, isSubmitting}\n } = useForm<FormData>()\n\n console.log(errors)\n\n const [alert, setAlert] = useState<{\n status: 'error' | 'success' | 'info'\n message: string | JSX.Element\n description?: string\n } | null>(null)\n\n const resetAlert = () => {\n setAlert(null)\n }\n\n const onSubmit: SubmitHandler<FormData> = async (data: FormData, e) => {\n e?.preventDefault()\n\n console.log(data)\n\n try {\n await props.onSignIn(data)\n } catch (e) {\n setAlert({\n status: 'error',\n message: 'Unable to sign in',\n description: e.message\n })\n }\n }\n\n const content = (\n <Box\n id=\"coco\"\n minH=\"100dvh\"\n bg={props.isModal ? 'bg.translucent' : undefined}>\n <Container maxW=\"lg\" py={{base: '6', md: '12'}} px={{base: '0', sm: '8'}}>\n <Stack spacing=\"8\">\n <Stack spacing=\"6\">\n <HStack justify=\"center\">\n <Link\n as={Button}\n variant=\"outline\"\n leftIcon={<FaArrowLeft />}\n to={props.goBackPath}\n onClick={props.onGoBack}>\n Back to website\n </Link>\n </HStack>\n\n <Stack spacing={{base: '2', md: '3'}} textAlign=\"center\">\n <Heading size={{base: 'xs', md: 'sm'}}>\n Log in to your account\n </Heading>\n <Text color=\"fg.muted\">\n Don't have an account?{' '}\n <Link to={props.signUpPath} onClick={props.onSignUp}>\n Sign up\n </Link>\n </Text>\n </Stack>\n </Stack>\n\n {alert && (\n <Alert status={alert.status}>\n <AlertIcon />\n <Box w=\"full\">\n <AlertTitle>{alert.message}</AlertTitle>\n <AlertDescription>{alert.description}</AlertDescription>\n </Box>\n <CloseButton\n alignSelf=\"flex-start\"\n position=\"relative\"\n right={-1}\n top={-1}\n onClick={resetAlert}\n />\n </Alert>\n )}\n\n <form onSubmit={handleSubmit(onSubmit) as any} autoComplete=\"off\">\n <Box\n py={{base: '0', sm: '8'}}\n px={{base: '4', sm: '10'}}\n bg=\"bg.surface\"\n boxShadow={{base: 'none', sm: 'md'}}\n borderRadius={{base: 'none', sm: 'xl'}}>\n <Stack spacing=\"6\">\n <HStack justify=\"center\" py=\"4\">\n <Box maxW=\"64\">\n <Logo />\n </Box>\n </HStack>\n <Stack spacing=\"5\">\n <FormControl\n id=\"login_form_login\"\n isRequired\n isInvalid={!!errors.login}>\n <FormLabel htmlFor=\"login\">\n Username or email address\n </FormLabel>\n <Input\n id=\"login\"\n {...register('login', {required: true})}\n />\n <FormErrorMessage>\n {errors.login && 'Username or email address'}\n </FormErrorMessage>\n </FormControl>\n <PasswordField\n {...register('password', {required: true})}\n isRequired\n isInvalid={!!errors.password?.message}\n />\n </Stack>\n <HStack justify=\"space-between\">\n <Checkbox id=\"logMeOutAfterwards\" {...register('logMeOut')}>\n Log me out after\n </Checkbox>\n <Link\n size=\"sm\"\n to={props.forgotPasswordPath}\n onClick={props.onForgotPassword}>\n Forgot password?\n </Link>\n </HStack>\n <Stack spacing=\"6\">\n <Button\n type=\"submit\"\n variant=\"primary\"\n size=\"lg\"\n isLoading={isSubmitting}>\n Sign in\n </Button>\n </Stack>\n </Stack>\n </Box>\n </form>\n\n <JaenFullLogo height=\"12\" width=\"auto\" />\n </Stack>\n </Container>\n </Box>\n )\n\n if (props.isModal) {\n return (\n <Modal\n size=\"full\"\n isOpen={true}\n onClose={() => {\n props.onGoBack?.()\n }}>\n <ModalContent\n bg=\"transparent\"\n backdropFilter=\"blur(8px) saturate(180%) contrast(46%) brightness(120%)\">\n {content}\n </ModalContent>\n </Modal>\n )\n }\n\n return content\n}\n\nexport default JaenLogin\n","import {createIcon} from '@chakra-ui/react'\n\nexport const JaenLogo = createIcon({\n displayName: 'JaenLogo',\n viewBox: '0 0 512 512',\n path: (\n <svg\n fill=\"var(--chakra-colors-pink-500)\"\n version=\"1.1\"\n id=\"Ebene_1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 475 475\"\n xmlSpace=\"preserve\">\n <style type=\"text/css\">\n {`.st0{fill-rule:evenodd;clip-rule:evenodd;}\n .st1{fill:#FFFFFF;}\n .st2{fill:none;}\n .st3{fill:#C1C1C1;}`}\n </style>\n <g id=\"layer1\" transform=\"translate(-41.732056,-64.283038)\">\n <path\n id=\"Fill_1\"\n className=\"st0\"\n d=\"M467,114.2c-44.8-44.6-109.2-49.6-187.9-49.6c-78.8,0-143.2,5-188,49.8S41.8,223.5,41.8,302.2\n S46.3,445.3,91.1,490s109.2,49.3,188,49.3s143.2-4.5,188-49.3s49.3-109.1,49.3-187.9C516.5,223.4,511.9,158.9,467,114.2L467,114.2z\n \"\n />\n </g>\n <path\n className=\"st1\"\n d=\"M115.9,344.8c6.1,2.2,9.4,5.7,12.9,8.7c29.6,24.4,63.4,38.9,101.9,39.7c72.8,1.6,136.2-46.3,149.9-117.8\n c11.6-60.2-8.1-110.1-58-145.8c-60.1-43-143.5-29.9-188,28.6c-29.3,38.5-35.7,81.5-20.3,127.4c3.6,10.9,3.8,20.7-3.6,29.9\n c-6.3,7.8-14.7,10.8-24.5,9.5c-11-1.5-18.5-7.9-22.1-18.3c-5.3-15.4-8.9-31.3-9.8-47.5C51,199.9,70,148.8,114,108.6\n c39.7-36.4,87.2-52.9,141.3-47.5c80.5,8.1,144.1,64.6,159.8,142.9c19.4,96.8-40.6,189-136.9,207c-60.2,11.2-113.3-5.1-154.4-53\n c-2.1-2.5-3.8-5.4-5.6-8.1C117.5,348.7,117.1,347.4,115.9,344.8L115.9,344.8z\"\n />\n <g transform=\"translate(0.000000,860.000000) scale(0.100000,-0.100000)\">\n <path\n className=\"st1\"\n d=\"M2046.4,5333.6c118,107.8,236.6,168.3,394.4,201.2c84.8,17.4,162.4,25.5,301.2,30.1c56.2,2.2,102.8,4,103.1,4\n c0.3,0.3,5.6,23.3,11.8,51.2c54,243.1,175.5,656.2,323,1096.2c17.7,53.7,32,98.1,31.7,98.4c-0.6,0.6-144.4-142.5-319.5-318\n l-318.9-318.9l5.3-19.3c13.7-52.2-19.9-114.9-76.1-141.6c-19.9-9.3-23.3-9.9-55.6-9.9c-33.2,0-34.8,0.3-57.8,11.8\n c-83.8,41.3-101.9,148.4-36.3,214.3c32.3,32.3,77,46,117.7,36.3l16.1-4l318,318c174.8,174.8,317.4,318,317.1,318.6\n c-0.6,0.3-60.2-18.9-132.6-42.9c-450.9-148.4-832.5-260.5-1052.7-308.7c-28.3-6.2-53.4-11.8-56.2-12.7c-4.3-1.2-5.3-12.7-6.8-93.8\n c-6.8-334.8-66.1-521.7-219.9-693.1l-28.6-31.7l201.5-201.2l201.5-201.5L2046.4,5333.6z\"\n />\n </g>\n </svg>\n )\n})\n\nexport const JaenFullLogo = createIcon({\n displayName: 'JaenFullLogo',\n viewBox: '0 0 1112 475',\n path: (\n <svg\n fill=\"var(--chakra-colors-pink-500)\"\n version=\"1.1\"\n id=\"Ebene_1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 1112 475\"\n enableBackground=\"new 0 0 1112 475;\"\n xmlSpace=\"preserve\">\n <style type=\"text/css\">\n {`.st0{fill-rule:evenodd;clip-rule:evenodd;}\n.st1{fill:#FFFFFF;}\n.st2{fill:none;}\n.st3{fill:#C1C1C1;}`}\n </style>\n <g id=\"layer1\" transform=\"translate(-41.732056,-64.283038)\">\n <path\n id=\"Fill_1\"\n className=\"st0\"\n d=\"M467,114.2c-44.8-44.6-109.2-49.6-187.9-49.6c-78.8,0-143.2,5-188,49.8S41.8,223.5,41.8,302.2\nS46.3,445.3,91.1,490s109.2,49.3,188,49.3s143.2-4.5,188-49.3s49.3-109.1,49.3-187.9C516.5,223.4,511.9,158.9,467,114.2L467,114.2z\n\"\n />\n </g>\n <path\n className=\"st1\"\n d=\"M115.9,344.8c6.1,2.2,9.4,5.7,12.9,8.7c29.6,24.4,63.4,38.9,101.9,39.7c72.8,1.6,136.2-46.3,149.9-117.8\nc11.6-60.2-8.1-110.1-58-145.8c-60.1-43-143.5-29.9-188,28.6c-29.3,38.5-35.7,81.5-20.3,127.4c3.6,10.9,3.8,20.7-3.6,29.9\nc-6.3,7.8-14.7,10.8-24.5,9.5c-11-1.5-18.5-7.9-22.1-18.3c-5.3-15.4-8.9-31.3-9.8-47.5C51,199.9,70,148.8,114,108.6\nc39.7-36.4,87.2-52.9,141.3-47.5c80.5,8.1,144.1,64.6,159.8,142.9c19.4,96.8-40.6,189-136.9,207c-60.2,11.2-113.3-5.1-154.4-53\nc-2.1-2.5-3.8-5.4-5.6-8.1C117.5,348.7,117.1,347.4,115.9,344.8L115.9,344.8z\"\n />\n <g>\n <rect\n x=\"542.8\"\n y=\"132.9\"\n className=\"st2\"\n width=\"582.2\"\n height=\"209.3\"\n />\n <path\n className=\"st3\"\n d=\"M542.8,366.5c11.2,0,17.4-7.9,17.4-23.2V194.9h32.7v151.5c0,31.8-17.7,49.7-47.7,49.7c-2.6,0-5.9,0-9.7-0.6\nl2.6-29.7C539.9,366.2,541.3,366.5,542.8,366.5z M597.5,149c0,11.8-9.7,21.2-21.2,21.2s-20.9-9.4-20.9-21.2\nc0-11.2,9.4-20.9,20.9-20.9S597.5,137.9,597.5,149z\"\n />\n <path\n className=\"st3\"\n d=\"M772.9,194.9v143.9h-33v-25.3c-10.3,17.9-28,28.2-50.9,28.2c-38.3,0-68.9-33.5-68.9-75\nc0-41.5,30.6-74.7,68.9-74.7c23,0,40.6,10.3,50.9,28.2v-25.3H772.9z M739.9,266.7c0-24.7-18.8-43.5-43.8-43.5\nc-24.4,0-43.8,19.4-43.8,43.5c0,24.4,19.4,43.8,43.8,43.8C721.1,310.6,739.9,291.7,739.9,266.7z\"\n />\n <path\n className=\"st3\"\n d=\"M942.4,274.7H832.9c3.5,23.2,19.4,37.4,42.7,37.4c16.2,0,30.9-7.1,37.7-18.2l26.2,16.8\nc-10.6,19.4-34.7,31.2-64.4,31.2c-41.5,0-74.7-32.7-74.7-75.6c0-41.8,32.7-74.1,74.1-74.1c38.8,0,69.1,30,69.1,68.6\nC943.5,264.4,943.2,270.3,942.4,274.7z M909.1,249.7c-1.8-17.9-16.8-30.6-36.5-30.6s-33.5,11.8-38.5,30.6H909.1z\"\n />\n <path\n className=\"st3\"\n d=\"M1106.8,256.7v82.1h-33v-78c0-22.7-13.8-37.4-34.7-37.4c-21.5,0-35.6,14.7-35.6,37.4v78h-32.7V194.9h32.7v22.7\nc9.1-16.2,24.4-25.6,43.5-25.6C1083.9,192,1106.8,216.7,1106.8,256.7z\"\n />\n </g>\n <g transform=\"translate(0.000000,860.000000) scale(0.100000,-0.100000)\">\n <path\n className=\"st1\"\n d=\"M2046.4,5333.6c118,107.8,236.6,168.3,394.4,201.2c84.8,17.4,162.4,25.5,301.2,30.1c56.2,2.2,102.8,4,103.1,4\nc0.3,0.3,5.6,23.3,11.8,51.2c54,243.1,175.5,656.2,323,1096.2c17.7,53.7,32,98.1,31.7,98.4c-0.6,0.6-144.4-142.5-319.5-318\nl-318.9-318.9l5.3-19.3c13.7-52.2-19.9-114.9-76.1-141.6c-19.9-9.3-23.3-9.9-55.6-9.9c-33.2,0-34.8,0.3-57.8,11.8\nc-83.8,41.3-101.9,148.4-36.3,214.3c32.3,32.3,77,46,117.7,36.3l16.1-4l318,318c174.8,174.8,317.4,318,317.1,318.6\nc-0.6,0.3-60.2-18.9-132.6-42.9c-450.9-148.4-832.5-260.5-1052.7-308.7c-28.3-6.2-53.4-11.8-56.2-12.7c-4.3-1.2-5.3-12.7-6.8-93.8\nc-6.8-334.8-66.1-521.7-219.9-693.1l-28.6-31.7l201.5-201.2l201.5-201.5L2046.4,5333.6z\"\n />\n </g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n <g></g>\n </svg>\n )\n})\n\nexport const JaenFullLogoWhite = createIcon({\n displayName: 'JaenFullLogoWhite',\n viewBox: '0 0 512 512',\n path: (\n <svg\n version=\"1.1\"\n id=\"Ebene_1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 1112 475\"\n enableBackground=\"new 0 0 1112 475\"\n xmlSpace=\"preserve\">\n <style type=\"text/css\">\n {` .st0{fill:#FFFFFF;}\n .st1{fill:none;}`}\n </style>\n <g>\n <path\n className=\"st0\"\n d=\"M542.8,366.5c11.2,0,17.4-7.9,17.4-23.2V194.9h32.7v151.5c0,31.8-17.7,49.7-47.7,49.7c-2.6,0-5.9,0-9.7-0.6\n l2.6-29.7C539.9,366.2,541.3,366.5,542.8,366.5z M597.5,149c0,11.8-9.7,21.2-21.2,21.2s-20.9-9.4-20.9-21.2\n c0-11.2,9.4-20.9,20.9-20.9S597.5,137.9,597.5,149z\"\n />\n <path\n className=\"st0\"\n d=\"M772.9,194.9v143.9h-33v-25.3c-10.3,17.9-28,28.2-50.9,28.2c-38.3,0-68.9-33.5-68.9-75S650.7,192,689,192\n c23,0,40.6,10.3,50.9,28.2v-25.3L772.9,194.9L772.9,194.9z M739.9,266.7c0-24.7-18.8-43.5-43.8-43.5c-24.4,0-43.8,19.4-43.8,43.5\n c0,24.4,19.4,43.8,43.8,43.8C721.1,310.6,739.9,291.7,739.9,266.7z\"\n />\n <path\n className=\"st0\"\n d=\"M942.4,274.7H832.9c3.5,23.2,19.4,37.4,42.7,37.4c16.2,0,30.9-7.1,37.7-18.2l26.2,16.8\n c-10.6,19.4-34.7,31.2-64.4,31.2c-41.5,0-74.7-32.7-74.7-75.6c0-41.8,32.7-74.1,74.1-74.1c38.8,0,69.1,30,69.1,68.6\n C943.5,264.4,943.2,270.3,942.4,274.7z M909.1,249.7c-1.8-17.9-16.8-30.6-36.5-30.6s-33.5,11.8-38.5,30.6H909.1z\"\n />\n <path\n className=\"st0\"\n d=\"M1106.8,256.7v82.1h-33v-78c0-22.7-13.8-37.4-34.7-37.4c-21.5,0-35.6,14.7-35.6,37.4v78h-32.7V194.9h32.7v22.7\n c9.1-16.2,24.4-25.6,43.5-25.6C1083.9,192,1106.8,216.7,1106.8,256.7z\"\n />\n </g>\n <g>\n <path\n className=\"st1\"\n d=\"M255.3,61.1c-54.1-5.4-101.6,11.1-141.3,47.5c-44,40.2-63,91.3-59.7,150.6c0.9,16.2,4.5,32.1,9.8,47.5\n c3.6,10.4,11.1,16.8,22.1,18.3c9.8,1.3,18.2-1.7,24.5-9.5c7.4-9.2,7.2-19,3.6-29.9c-15.4-45.9-9-88.9,20.3-127.4\n c44.5-58.5,127.9-71.6,188-28.6c49.9,35.7,69.6,85.6,58,145.8c-13.7,71.5-77.1,119.4-149.9,117.8c-38.5-0.8-72.3-15.3-101.9-39.7\n c-3.5-3-6.8-6.5-12.9-8.7c1.2,2.6,1.6,3.9,2.3,5.1c1.8,2.7,3.5,5.6,5.6,8.1c41.1,47.9,94.2,64.2,154.4,53\n c96.3-18,156.3-110.2,136.9-207C399.4,125.7,335.8,69.2,255.3,61.1z\"\n />\n <path\n className=\"st0\"\n d=\"M425.3,49.9C380.5,5.3,316.1,0.3,237.4,0.3c-78.8,0-143.2,5-188,49.8C4.6,94.9,0.1,159.2,0.1,237.9\n S4.6,381,49.4,425.7c44.8,44.7,109.2,49.3,188,49.3s143.2-4.5,188-49.3c44.8-44.8,49.3-109.1,49.3-187.9\n C474.8,159.1,470.2,94.6,425.3,49.9z M278.2,411c-60.2,11.2-113.3-5.1-154.4-53c-2.1-2.5-3.8-5.4-5.6-8.1c-0.7-1.2-1.1-2.5-2.3-5.1\n c6.1,2.2,9.4,5.7,12.9,8.7c29.6,24.4,63.4,38.9,101.9,39.7c72.8,1.6,136.2-46.3,149.9-117.8c11.6-60.2-8.1-110.1-58-145.8\n c-60.1-43-143.5-29.9-188,28.6c-29.3,38.5-35.7,81.5-20.3,127.4c3.6,10.9,3.8,20.7-3.6,29.9c-6.3,7.8-14.7,10.8-24.5,9.5\n c-11-1.5-18.5-7.9-22.1-18.3c-5.3-15.4-8.9-31.3-9.8-47.5C51,199.9,70,148.8,114,108.6c39.7-36.4,87.2-52.9,141.3-47.5\n c80.5,8.1,144.1,64.6,159.8,142.9C434.5,300.8,374.5,393,278.2,411z M238.9,258.1c2.3,1.1,2.5,1.2,5.8,1.2c3.2,0,3.6-0.1,5.6-1\n c5.6-2.7,9-8.9,7.6-14.2l-0.5-1.9l31.9-31.9c17.5-17.5,31.9-31.9,32-31.8c0,0-1.4,4.5-3.2,9.8c-14.8,44-26.9,85.3-32.3,109.6\n c-0.6,2.8-1.1,5.1-1.2,5.1c0,0-4.7,0.2-10.3,0.4c-13.9,0.5-21.6,1.3-30.1,3c-15.8,3.3-27.6,9.3-39.4,20.1l-1.9,1.7l-20.2-20.1\n l-20.2-20.1l2.9-3.2c15.4-17.1,21.3-35.8,22-69.3c0.1-8.1,0.2-9.3,0.7-9.4c0.3-0.1,2.8-0.7,5.6-1.3c22-4.8,60.2-16,105.3-30.9\n c7.2-2.4,13.2-4.3,13.3-4.3c0,0.1-14.2,14.4-31.7,31.9l-31.8,31.8l-1.6-0.4c-4.1-1-8.5,0.4-11.8,3.6\n C228.7,243.3,230.5,254,238.9,258.1z\"\n />\n </g>\n </svg>\n )\n})\n","import {PageConfig, useAuthenticationContext} from 'jaen'\nimport {navigate, PageProps} from 'gatsby'\nimport React from 'react'\n\nimport {JaenLogin} from '../components/JaenLogin/JaenLogin'\n\nconst LoginPage: React.FC<PageProps> = () => {\n const {login, isAuthenticated, isLoading} = useAuthenticationContext()\n\n React.useEffect(() => {\n if (isAuthenticated) {\n void navigate('/')\n }\n }, [isAuthenticated])\n\n if (isLoading || isAuthenticated) {\n return null\n }\n\n return (\n <JaenLogin\n signUpPath=\"/signup\"\n forgotPasswordPath=\"/password_reset\"\n onSignIn={async data => {\n await login(data.login, data.password, data.logMeOut)\n }}\n goBackPath=\"/\"\n />\n )\n}\n\nexport default LoginPage\n\nexport const pageConfig: PageConfig = {\n label: 'Login',\n withoutJaenFrame: true,\n layout: {\n name: 'jaen',\n type: 'form'\n }\n}\n\nexport {Head} from 'jaen'\n","// src/use-merge-refs.ts\nimport { useMemo } from \"react\";\nfunction assignRef(ref, value) {\n if (ref == null)\n return;\n if (typeof ref === \"function\") {\n ref(value);\n return;\n }\n try {\n ref.current = value;\n } catch (error) {\n throw new Error(`Cannot assign value '${value}' to ref '${ref}'`);\n }\n}\nfunction useMergeRefs(...refs) {\n return useMemo(() => {\n if (refs.every((ref) => ref == null)) {\n return null;\n }\n return (node) => {\n refs.forEach((ref) => {\n if (ref)\n assignRef(ref, node);\n });\n };\n }, refs);\n}\n\nexport {\n assignRef,\n useMergeRefs\n};\n"],"names":["PasswordField","forwardRef","_ref","ref","isInvalid","isRequired","props","isOpen","onToggle","useDisclosure","inputRef","useRef","mergeRef","useMergeRefs","_jsxs","FormControl","id","children","_jsx","FormLabel","htmlFor","InputGroup","Input","name","type","autoComplete","required","InputRightElement","IconButton","variant","color","icon","FaEyeSlash","FaEye","onClick","onClickReveal","current","focus","preventScroll","FormErrorMessage","displayName","JaenLogin","_errors$password","handleSubmit","register","formState","errors","isSubmitting","useForm","console","log","alert","setAlert","useState","content","Box","minH","bg","isModal","undefined","Container","maxW","py","base","md","px","sm","Stack","spacing","HStack","justify","Link","as","Button","leftIcon","FaArrowLeft","to","goBackPath","onGoBack","textAlign","Heading","size","Text","signUpPath","onSignUp","Alert","status","AlertIcon","w","AlertTitle","message","AlertDescription","description","CloseButton","alignSelf","position","right","top","resetAlert","onSubmit","async","data","e","preventDefault","onSignIn","boxShadow","borderRadius","Logo","login","password","Checkbox","forgotPasswordPath","onForgotPassword","isLoading","JaenFullLogo","height","width","Modal","onClose","_props$onGoBack","call","ModalContent","backdropFilter","JaenLogo","createIcon","viewBox","path","fill","version","xmlns","xmlnsXlink","x","y","xmlSpace","transform","className","d","enableBackground","LoginPage","isAuthenticated","useAuthenticationContext","React","navigate","logMeOut","pageConfig","label","withoutJaenFrame","layout","refs","useMemo","every","node","forEach","value","error","Error","assignRef"],"sourceRoot":""}