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Scripts/site/components/license-claim/shared.less?f152","webpack://@logos/commerceweb-frontend/./Scripts/site/components/license-claim/shared.jsx","webpack://@logos/commerceweb-frontend/./Scripts/site/components/license-claim/send-button/index.jsx","webpack://@logos/commerceweb-frontend/./Scripts/site/components/license-claim/verification-code-request/index.jsx","webpack://@logos/commerceweb-frontend/./Scripts/site/components/license-claim/verification-code-request/index.less?4ca7","webpack://@logos/commerceweb-frontend/javascript/node_modules/classnames/bind.js","webpack://@logos/commerceweb-frontend/javascript/node_modules/@faithlife/command-sentence-control/dist/command-sentence.js"],"sourcesContent":["import { fetch } from './../util/fetch';\n\nexport default class LicenseClaimClient {\n\tstatic async sendLibraryClaimLink(sendLibraryClaimLinkUrl, request) {\n\t\tconst response = await fetch.postWithBody({\n\t\t\turl: sendLibraryClaimLinkUrl,\n\t\t\tbody: request,\n\t\t});\n\n\t\treturn await response.json();\n\t}\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"button\":\"shared--button--gSV9d btn btn-primary\",\"container\":\"shared--container--TWLgJ\",\"inputContainer\":\"shared--inputContainer--BxkyU\",\"inputBox\":\"shared--inputBox---a3o8\",\"inputButton\":\"shared--inputButton--sYYAi btn btn-secondary\",\"header\":\"shared--header--ob0CU\",\"subHeader\":\"shared--subHeader--JtCqo\",\"description\":\"shared--description--G4Zg1\",\"spinnerOverlay\":\"shared--spinnerOverlay--kH9I3\",\"logoContainer\":\"shared--logoContainer--K0Tjf\",\"logoSvg\":\"shared--logoSvg--E8SWV\",\"institutionSvg\":\"shared--institutionSvg--VtQNE\",\"institutionName\":\"shared--institutionName--xy7tV\",\"plus\":\"shared--plus--A0KGl\",\"errorInput\":\"shared--errorInput--dCFc4\",\"errorMessage\":\"shared--errorMessage--tofwC\"};","import React from 'react';\nimport { theme } from '@faithlife/styled-ui';\nimport { Plus } from '@faithlife/styled-ui/icons/12px';\nimport { CommandSentence } from '@faithlife/command-sentence-control';\nimport { useLocalization } from '../../localization';\nimport sharedStyles from './shared.less';\n\nexport const LogoHeader = ({ logosOrVerbum, institutionLogoUri, institutionName }) => {\n\tconst resources = useLocalization('CommerceWeb.Resources.LicenseClaim.LicenseClaim');\n\treturn (\n\t\t<div className={sharedStyles.logoContainer}>\n\t\t\t<img\n\t\t\t\tclassName={sharedStyles.logoSvg}\n\t\t\t\tsrc={\n\t\t\t\t\tlogosOrVerbum === 'Verbum'\n\t\t\t\t\t\t? 'https://files.logoscdn.com/v1/files/53603903/assets/12332695/content.svg?signature=YQUpVRlKc0ds48hPxgGWhDcgNRI'\n\t\t\t\t\t\t: 'https://files.logoscdn.com/v1/assets/14904106/optimized?share=OdlwiB5OxhoI1yI0'\n\t\t\t\t}\n\t\t\t\talt={logosOrVerbum === 'Verbum' ? resources.VerbumIcon : resources.LogosIcon}\n\t\t\t/>\n\t\t\t<Plus className={sharedStyles.plus} color={theme.colors.gray66} />\n\t\t\t{institutionLogoUri ? (\n\t\t\t\t<img className={sharedStyles.institutionSvg} src={institutionLogoUri} alt={resources.InstitutionIcon} />\n\t\t\t) : (\n\t\t\t\t<p className={sharedStyles.institutionName}>{institutionName}</p>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport const PageHeader = ({ logoHeader, logosOrVerbum, pageDescription, pageSubHeader, header, headingRef }) => {\n\tconst resources = useLocalization('CommerceWeb.Resources.LicenseClaim.LicenseClaim');\n\tconst descriptionComponent =\n\t\tpageDescription === undefined ? null : typeof pageDescription === 'string' ? (\n\t\t\t<p className={sharedStyles.description}>{pageDescription}</p>\n\t\t) : (\n\t\t\t<div className={sharedStyles.description}>{pageDescription}</div>\n\t\t);\n\treturn (\n\t\t<>\n\t\t\t{logoHeader === undefined ? null : logoHeader}\n\t\t\t<h1 ref={headingRef} className={sharedStyles.header}>\n\t\t\t\t{header ?? (\n\t\t\t\t\t<CommandSentence Container={React.Fragment} template={resources.PageHeader}>\n\t\t\t\t\t\t<CommandSentence.Field name=\"BRAND_NAME\">{logosOrVerbum}</CommandSentence.Field>\n\t\t\t\t\t</CommandSentence>\n\t\t\t\t)}\n\t\t\t</h1>\n\t\t\t{pageSubHeader === undefined ? null : <p className={sharedStyles.subHeader}>{pageSubHeader}</p>}\n\t\t\t{descriptionComponent}\n\t\t</>\n\t);\n};\n","import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport classNamesBind from 'classnames/bind';\nimport sharedStyles from '../shared.less';\n\nconst cx = classNamesBind.bind(sharedStyles);\n\nconst confirmationDisplayTimeMs = 3000;\n\nexport const SendButton = ({ isLoading, buttonText, loadingText, confirmationText, actionComplete, onClick }) => {\n\tconst [shouldShowConfirmation, setShouldShowConfirmation] = useState(false);\n\tconst confirmationEndTimeout = useRef(null);\n\n\tconst handleClick = () => {\n\t\tif (!isLoading) {\n\t\t\tonClick();\n\t\t}\n\t};\n\n\tconst handlePointerMove = useCallback(() => {\n\t\tif (confirmationEndTimeout.current) {\n\t\t\tclearTimeout(confirmationEndTimeout.current);\n\t\t}\n\t\tif (shouldShowConfirmation) {\n\t\t\tsetShouldShowConfirmation(false);\n\t\t}\n\t}, [shouldShowConfirmation]);\n\n\tuseEffect(() => {\n\t\tif (!actionComplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetShouldShowConfirmation(true);\n\t\tconfirmationEndTimeout.current = setTimeout(() => {\n\t\t\tsetShouldShowConfirmation(false);\n\t\t}, confirmationDisplayTimeMs);\n\n\t\treturn () => {\n\t\t\tif (confirmationEndTimeout.current) {\n\t\t\t\tclearTimeout(confirmationEndTimeout.current);\n\t\t\t}\n\t\t};\n\t}, [actionComplete]);\n\n\treturn (\n\t\t<button\n\t\t\tclassName={cx(sharedStyles.inputButton)}\n\t\t\tonClick={handleClick}\n\t\t\tdisabled={isLoading || shouldShowConfirmation}\n\t\t\tonPointerMove={handlePointerMove}\n\t\t>\n\t\t\t{isLoading ? loadingText : actionComplete ? (shouldShowConfirmation ? confirmationText : buttonText) : buttonText}\n\t\t</button>\n\t);\n};\n","import React, { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { Input, LoadingSpinner } from '@faithlife/styled-ui';\nimport classNamesBind from 'classnames/bind';\nimport { CommandSentence } from '@faithlife/command-sentence-control';\nimport { useLocalization } from '../../../localization';\nimport LicenseClaimClient from '../../../clients/license-claim-client';\nimport { validateEmailAddress } from '../../../util/email';\nimport sharedStyles from '../shared.less';\nimport { LogoHeader, PageHeader } from '../shared';\nimport { SendButton } from '../send-button';\nimport styles from './index.less';\n\nconst cx = classNamesBind.bind(sharedStyles);\n\nconst getInstitutionKindPossessive = (institutionKind, resources) => {\n\tswitch (institutionKind?.toLowerCase()) {\n\t\tcase 'academic':\n\t\t\treturn resources.AcademicInstitutionPossessive;\n\t\tcase 'church':\n\t\t\treturn resources.ChurchInstitutionPossessive;\n\t\tdefault:\n\t\t\treturn resources.OrganizationInstitutionPossessive;\n\t}\n};\n\nconst VerificationCodeRequest = ({\n\tinstitutionCode,\n\tinstitutionKind,\n\tinstitutionName,\n\tinstitutionLogoUri,\n\tisAcademicInstitution,\n\tlogosOrVerbum,\n\tinitialEmail,\n\troutes,\n\tverificationError: verificationErrorFromProps,\n}) => {\n\tconst resources = useLocalization('CommerceWeb.Resources.LicenseClaim.LicenseClaim');\n\tconst institutionKindPossessive = getInstitutionKindPossessive(institutionKind, resources);\n\tconst [email, setEmail] = useState(initialEmail ?? '');\n\tconst [isLoading, setIsLoading] = useState(false);\n\tconst [emailSentCount, setEmailSentCount] = useState(0);\n\tconst [isActionComplete, setIsActionComplete] = useState(false);\n\tconst [inputErrorMessage, setInputErrorMessage] = useState(null);\n\tconst [verificationError, setVerificationError] = useState(verificationErrorFromProps);\n\tconst headingRef = useRef(null);\n\n\tconst handleEmailChange = useCallback(\n\t\tevent => {\n\t\t\tsetEmail(event.target.value);\n\t\t\tif (verificationError) {\n\t\t\t\tsetVerificationError(null);\n\t\t\t}\n\t\t},\n\t\t[verificationError]\n\t);\n\n\tconst verificationErrorMessageTemplate = useMemo(() => {\n\t\tif (!verificationError) {\n\t\t\treturn null;\n\t\t}\n\n\t\tswitch (verificationError.toLowerCase()) {\n\t\t\tcase 'expired':\n\t\t\t\treturn resources.VerificationCodeExpired;\n\t\t\tcase 'redeemed':\n\t\t\t\treturn resources.VerificationCodeClaimed;\n\t\t\tcase 'invalid':\n\t\t\t\treturn resources.InvalidVerificationCode;\n\t\t\tdefault:\n\t\t\t\treturn resources.UnknownValidationError;\n\t\t}\n\t}, [resources, verificationError]);\n\n\tconst sendLibraryClaimLink = useCallback(async () => {\n\t\tsetIsActionComplete(false);\n\t\tsetIsLoading(true);\n\t\tsetInputErrorMessage(null);\n\n\t\tconst validationError = validateEmailAddress(email, resources.EmptyEmail, resources.InvalidEmail);\n\t\tif (validationError) {\n\t\t\tsetInputErrorMessage(validationError);\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tconst libraryClaimLinkResult = await LicenseClaimClient.sendLibraryClaimLink(routes.SendLibraryClaimLinkUrl, {\n\t\t\t\t\temail: email,\n\t\t\t\t\tinstitutionCode: institutionCode,\n\t\t\t\t});\n\n\t\t\t\tif (!libraryClaimLinkResult?.success) {\n\t\t\t\t\tthrow new Error('Library claim link request failed.');\n\t\t\t\t}\n\n\t\t\t\tsetEmailSentCount(emailSentCount + 1);\n\t\t\t\tsetIsActionComplete(true);\n\t\t\t} catch {\n\t\t\t\tsetInputErrorMessage(resources.FailedToSendVerificationCode);\n\t\t\t}\n\t\t}\n\t\tsetIsLoading(false);\n\t}, [email, emailSentCount, institutionCode, resources, routes.SendLibraryClaimLinkUrl]);\n\n\tconst handleFormSubmitted = useCallback(\n\t\tasync event => {\n\t\t\tevent.preventDefault();\n\t\t\tawait sendLibraryClaimLink();\n\t\t},\n\t\t[sendLibraryClaimLink]\n\t);\n\n\tconst { firstBodyTemplate, secondBodyTemplate } = useMemo(() => {\n\t\tconst firstBodyTemplate = emailSentCount\n\t\t\t? resources.VerificationCodeValidationDescription\n\t\t\t: resources.PageDescription;\n\t\tconst secondBodyTemplate =\n\t\t\temailSentCount > 1\n\t\t\t\t? resources.VerificationCodeValidationResendDescription2\n\t\t\t\t: emailSentCount\n\t\t\t\t\t? resources.VerificationCodeValidationResendDescription\n\t\t\t\t\t: resources.EmailVerificationDescription;\n\n\t\treturn { firstBodyTemplate, secondBodyTemplate };\n\t}, [emailSentCount, resources]);\n\tconst headerTemplate =\n\t\temailSentCount > 1 ? resources.LinkResent : emailSentCount ? resources.AlmostDone : resources.PageHeader;\n\n\tuseLayoutEffect(() => {\n\t\tif (!emailSentCount || !headingRef.current) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { top, bottom } = headingRef.current.getBoundingClientRect();\n\t\tconst isHeadingVisible = top >= 0 && bottom <= window.innerHeight;\n\n\t\tif (!isHeadingVisible) {\n\t\t\theadingRef.current.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n\t\t}\n\t}, [emailSentCount]);\n\n\treturn (\n\t\t<>\n\t\t\t{isLoading && (\n\t\t\t\t<div aria-label={resources.LoadingAriaLabel} className={sharedStyles.spinnerOverlay}>\n\t\t\t\t\t<LoadingSpinner variant=\"medium\" />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<div className={sharedStyles.container}>\n\t\t\t\t<div className={sharedStyles.inputContainer}>\n\t\t\t\t\t<PageHeader\n\t\t\t\t\t\theadingRef={headingRef}\n\t\t\t\t\t\tlogoHeader={\n\t\t\t\t\t\t\t<LogoHeader\n\t\t\t\t\t\t\t\tinstitutionLogoUri={institutionLogoUri}\n\t\t\t\t\t\t\t\tlogosOrVerbum={logosOrVerbum}\n\t\t\t\t\t\t\t\tinstitutionName={institutionName}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\theader={\n\t\t\t\t\t\t\t<CommandSentence key={headerTemplate} Container=\"span\" template={headerTemplate}>\n\t\t\t\t\t\t\t\t<CommandSentence.Field name=\"BRAND_NAME\">{logosOrVerbum}</CommandSentence.Field>\n\t\t\t\t\t\t\t</CommandSentence>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpageDescription={\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\tmarginBottom: '32px',\n\t\t\t\t\t\t\t\t\t\tlineHeight: '135%',\n\t\t\t\t\t\t\t\t\t\t...(emailSentCount ? { fontSize: '24px', lineHeight: '125%' } : {}),\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<CommandSentence key={firstBodyTemplate} Container=\"span\" template={firstBodyTemplate}>\n\t\t\t\t\t\t\t\t\t\t<CommandSentence.Field name=\"INSTITUTION_KIND_POSSESSIVE\">\n\t\t\t\t\t\t\t\t\t\t\t{institutionKindPossessive}\n\t\t\t\t\t\t\t\t\t\t</CommandSentence.Field>\n\t\t\t\t\t\t\t\t\t\t<CommandSentence.Field name=\"BRAND_NAME\">{logosOrVerbum}</CommandSentence.Field>\n\t\t\t\t\t\t\t\t\t\t<CommandSentence.Field name=\"EMAIL_ADDRESS\">\n\t\t\t\t\t\t\t\t\t\t\t<strong>{email}</strong>\n\t\t\t\t\t\t\t\t\t\t</CommandSentence.Field>\n\t\t\t\t\t\t\t\t\t</CommandSentence>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div style={{ ...(emailSentCount ? {} : { fontSize: '24px', lineHeight: '125%' }) }}>\n\t\t\t\t\t\t\t\t\t<CommandSentence key={secondBodyTemplate} Container=\"span\" template={secondBodyTemplate}>\n\t\t\t\t\t\t\t\t\t\t<CommandSentence.Field name=\"INSTITUTION_NAME\">\n\t\t\t\t\t\t\t\t\t\t\t<strong>{institutionName}</strong>\n\t\t\t\t\t\t\t\t\t\t</CommandSentence.Field>\n\t\t\t\t\t\t\t\t\t\t<CommandSentence.Field name=\"BRAND_NAME\">{logosOrVerbum}</CommandSentence.Field>\n\t\t\t\t\t\t\t\t\t\t<CommandSentence.Field name=\"RESEND_BUTTON_TEXT\">{resources.ResendButton}</CommandSentence.Field>\n\t\t\t\t\t\t\t\t\t\t<CommandSentence.Field name=\"EMAIL_ADDRESS\">\n\t\t\t\t\t\t\t\t\t\t\t<strong>{email}</strong>\n\t\t\t\t\t\t\t\t\t\t</CommandSentence.Field>\n\t\t\t\t\t\t\t\t\t</CommandSentence>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlogosOrVerbum={logosOrVerbum}\n\t\t\t\t\t/>\n\t\t\t\t\t<form onSubmit={handleFormSubmitted}>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tclassName={cx(sharedStyles.inputBox, {\n\t\t\t\t\t\t\t\terrorInput: inputErrorMessage !== null,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tvariant=\"medium\"\n\t\t\t\t\t\t\ttype={emailSentCount ? 'hidden' : 'email'}\n\t\t\t\t\t\t\tvalue={email}\n\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\tisAcademicInstitution ? resources.AcademicEmailPlaceholder : resources.EnterpriseEmailPlaceholder\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonChange={handleEmailChange}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{inputErrorMessage && <div className={sharedStyles.errorMessage}>{inputErrorMessage}</div>}\n\t\t\t\t\t\t{verificationErrorMessageTemplate && (\n\t\t\t\t\t\t\t<p className={cx(sharedStyles.errorMessage, styles.verificationError)}>\n\t\t\t\t\t\t\t\t<CommandSentence\n\t\t\t\t\t\t\t\t\tkey={verificationErrorMessageTemplate}\n\t\t\t\t\t\t\t\t\tContainer=\"span\"\n\t\t\t\t\t\t\t\t\ttemplate={verificationErrorMessageTemplate}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<CommandSentence.Field name=\"INSTITUTION_NAME\">{institutionName}</CommandSentence.Field>\n\t\t\t\t\t\t\t\t\t<CommandSentence.Field name=\"GET_MY_CODE_BUTTON_TEXT\">\n\t\t\t\t\t\t\t\t\t\t{resources.GetMyCodeButton}\n\t\t\t\t\t\t\t\t\t</CommandSentence.Field>\n\t\t\t\t\t\t\t\t</CommandSentence>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<SendButton\n\t\t\t\t\t\t\tbuttonText={emailSentCount ? resources.ResendButton : resources.GetMyCodeButton}\n\t\t\t\t\t\t\tactionComplete={isActionComplete}\n\t\t\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\t\t\tonClick={sendLibraryClaimLink}\n\t\t\t\t\t\t\tloadingText={resources.SendingCodeButtonText}\n\t\t\t\t\t\t\tconfirmationText={resources.SentCodeButtonText}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n\nexport default VerificationCodeRequest;\n","// extracted by mini-css-extract-plugin\nexport default {\"verificationError\":\"index--verificationError--NJnxD\"};","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue.call(this, arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn this && this[arg] || arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(this, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, this && this[key] || key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import { jsx as u } from \"react/jsx-runtime\";\nimport { useMemo as c, Children as x, isValidElement as l } from \"react\";\nfunction m({ template: e, children: s, Container: n = \"div\", className: t }) {\n  const d = c(() => p(e), [e]), i = {};\n  return x.forEach(s || [], (r) => {\n    l(r) && r.type === f && r.props.name && (i[r.props.name] = r.props.children);\n  }), u(n, { className: t, children: d.map((r) => r.text || i[r.field]) });\n}\nm.Field = f;\nfunction f({ children: e }) {\n  return u(\"span\", { children: e });\n}\nconst o = /%([A-Z0-9_]+)%/g;\nfunction p(e) {\n  if (!e)\n    return [];\n  const s = [];\n  let n = 0;\n  for (let t = o.exec(e); t !== null; t = o.exec(e))\n    n !== t.index && s.push({ text: e.substr(n, t.index - n) }), n = o.lastIndex, s.push({ field: t[1] });\n  return n !== e.length && s.push({ text: e.substr(n, e.length - n) }), s;\n}\nexport {\n  m as CommandSentence\n};\n//# sourceMappingURL=command-sentence.js.map\n"],"names":["LicenseClaimClient","sendLibraryClaimLink","sendLibraryClaimLinkUrl","request","response","fetch","postWithBody","url","body","json","shared","button","container","inputContainer","inputBox","inputButton","header","subHeader","description","spinnerOverlay","logoContainer","logoSvg","institutionSvg","institutionName","plus","errorInput","errorMessage","LogoHeader","_ref","logosOrVerbum","institutionLogoUri","resources","useLocalization","React","className","sharedStyles","src","alt","VerbumIcon","LogosIcon","Plus","color","theme","colors","gray66","InstitutionIcon","PageHeader","_ref2","logoHeader","pageDescription","pageSubHeader","headingRef","descriptionComponent","undefined","ref","CommandSentence","Container","template","Field","name","cx","classNamesBind","SendButton","isLoading","buttonText","loadingText","confirmationText","actionComplete","onClick","_useState","useState","_useState2","_slicedToArray","shouldShowConfirmation","setShouldShowConfirmation","confirmationEndTimeout","useRef","handlePointerMove","useCallback","current","clearTimeout","useEffect","setTimeout","handleClick","disabled","onPointerMove","license_claim_verification_code_request","institutionCode","institutionKind","isAcademicInstitution","initialEmail","routes","verificationErrorFromProps","verificationError","institutionKindPossessive","getInstitutionKindPossessive","toLowerCase","AcademicInstitutionPossessive","ChurchInstitutionPossessive","OrganizationInstitutionPossessive","email","setEmail","_useState3","_useState4","setIsLoading","_useState5","_useState6","emailSentCount","setEmailSentCount","_useState7","_useState8","isActionComplete","setIsActionComplete","_useState9","_useState0","inputErrorMessage","setInputErrorMessage","_useState1","_useState10","setVerificationError","handleEmailChange","event","target","value","verificationErrorMessageTemplate","useMemo","VerificationCodeExpired","VerificationCodeClaimed","InvalidVerificationCode","UnknownValidationError","async","validationError","validateEmailAddress","EmptyEmail","InvalidEmail","libraryClaimLinkResult","SendLibraryClaimLinkUrl","success","Error","_unused","FailedToSendVerificationCode","handleFormSubmitted","preventDefault","_useMemo","firstBodyTemplate","VerificationCodeValidationDescription","PageDescription","secondBodyTemplate","VerificationCodeValidationResendDescription2","VerificationCodeValidationResendDescription","EmailVerificationDescription","headerTemplate","LinkResent","AlmostDone","useLayoutEffect","_headingRef$current$g","getBoundingClientRect","top","bottom","window","innerHeight","scrollIntoView","behavior","block","LoadingAriaLabel","LoadingSpinner","variant","key","style","_objectSpread","marginBottom","lineHeight","fontSize","ResendButton","onSubmit","Input","type","placeholder","AcademicEmailPlaceholder","EnterpriseEmailPlaceholder","onChange","GetMyCodeButton","SendingCodeButtonText","SentCodeButtonText","__WEBPACK_AMD_DEFINE_RESULT__","hasOwn","hasOwnProperty","classNames","classes","i","arguments","length","arg","appendClass","parseValue","call","this","Array","isArray","apply","toString","Object","prototype","includes","newClass","module","exports","default","m","e","children","s","n","t","d","react__WEBPACK_IMPORTED_MODULE_1__","o","exec","index","push","text","substr","lastIndex","field","p","Children","forEach","r","isValidElement","f","props","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","map"],"sourceRoot":""}