{ "version": 3, "sources": ["../../src/flow/stages/password/PasswordStage.ts"], "sourcesContent": ["import \"@goauthentik/elements/EmptyState\";\nimport \"@goauthentik/elements/forms/FormElement\";\nimport \"@goauthentik/flow/FormStatic\";\nimport \"@goauthentik/flow/components/ak-flow-password-input.js\";\nimport { BaseStage } from \"@goauthentik/flow/stages/base\";\nimport { PasswordManagerPrefill } from \"@goauthentik/flow/stages/identification/IdentificationStage\";\n\nimport { msg } from \"@lit/localize\";\nimport { CSSResult, TemplateResult, html } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\n\nimport PFButton from \"@patternfly/patternfly/components/Button/button.css\";\nimport PFForm from \"@patternfly/patternfly/components/Form/form.css\";\nimport PFFormControl from \"@patternfly/patternfly/components/FormControl/form-control.css\";\nimport PFInputGroup from \"@patternfly/patternfly/components/InputGroup/input-group.css\";\nimport PFLogin from \"@patternfly/patternfly/components/Login/login.css\";\nimport PFTitle from \"@patternfly/patternfly/components/Title/title.css\";\nimport PFBase from \"@patternfly/patternfly/patternfly-base.css\";\n\nimport { PasswordChallenge, PasswordChallengeResponseRequest } from \"@goauthentik/api\";\n\n@customElement(\"ak-stage-password\")\nexport class PasswordStage extends BaseStage {\n static get styles(): CSSResult[] {\n return [PFBase, PFLogin, PFInputGroup, PFForm, PFFormControl, PFButton, PFTitle];\n }\n\n hasError(field: string): boolean {\n const errors = (this.challenge?.responseErrors || {})[field];\n return (errors || []).length > 0;\n }\n\n render(): TemplateResult {\n if (!this.challenge) {\n return html` `;\n }\n return html`
\n

${this.challenge.flowInfo?.title}

\n
\n
\n {\n this.submitForm(e);\n }}\n >\n \n
\n ${msg(\"Not you?\")}\n
\n \n \n \n\n ${this.challenge.recoveryUrl\n ? html`\n ${msg(\"Forgot password?\")}`\n : \"\"}\n\n
\n \n
\n \n
\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ak-stage-password\": PasswordStage;\n }\n}\n"], "mappings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"form_control_default", "button_default", "title_default", "field", "ke", "e", "to", "msg", "PasswordManagerPrefill", "__decorateClass", "t"] }