{"version":3,"file":"login.obs.js","sources":["../../src/Security/types.partial.ts","../../src/Security/breakpointObserver.partial.obs","../../src/Security/Login/htmlRenderer.partial.obs","../../src/Security/Login/credentialLogin.partial.obs","../../src/Security/Login/divider.partial.obs","../../../Rock.JavaScript.Obsidian/node_modules/style-inject/dist/style-inject.es.js","../../src/Security/Login/externalLogin.partial.obs","../../src/Security/Login/loginMethodPicker.partial.obs","../../src/Security/Login/passwordlessLoginStartStep.partial.obs","../../src/Security/Login/passwordlessLoginVerifyStep.partial.obs","../../src/Security/Login/passwordlessLogin.partial.obs","../../src/Security/login.obs"],"sourcesContent":["// <copyright>\n// Copyright by the Spark Development Network\n//\n// Licensed under the Rock Community License (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.rockrms.com/license\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// </copyright>\n//\n\nimport { InjectionKey, Ref, inject, provide } from \"vue\";\n\nexport type CodeBoxCharacterController = {\n focus(): void;\n clear(): void;\n boxIndex: number;\n};\n\nexport type Breakpoint = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"unknown\";\n\n/**\n * An injection key to provide a reactive bootstrap breakpoint to descendent components.\n */\nconst bootstrapBreakpointInjectionKey: InjectionKey<Ref<Breakpoint>> = Symbol(\"bootstrap-breakpoint\");\n\n/**\n * Provides the reactive breakpoint that can be used by child components.\n */\nexport function provideBreakpoint(breakpoint: Ref<Breakpoint>): void {\n provide(bootstrapBreakpointInjectionKey, breakpoint);\n}\n\n/**\n * Gets the breakpoint that can be used to provide responsive behavior.\n */\nexport function useBreakpoint(): Ref<Breakpoint> {\n const breakpoint = inject(bootstrapBreakpointInjectionKey);\n\n if (!breakpoint) {\n throw \"provideBreakpoint must be invoked before useBreakpoint can be used. If useBreakpoint is in a component where <BreakpointObserver> is used in the template, then use the @breakpoint output binding to get the breakpoint.\";\n }\n\n return breakpoint;\n}","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\n<template>\n <slot></slot>\n\n <div ref=\"breakpointHelperDiv\"\n style=\"visibility: collapse !important;\"\n :class=\"classes\"></div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onBeforeUnmount, onMounted, ref } from \"vue\";\n import { Breakpoint, provideBreakpoint } from \"./types.partial\";\n\n defineProps();\n\n const emit = defineEmits<{\n (e: \"breakpoint\", value: Breakpoint): void\n }>();\n\n const breakpointDisplays: Partial<Record<Breakpoint, string>> = {\n \"xs\": \"none\",\n \"sm\": \"inline\",\n \"md\": \"inline-block\",\n \"lg\": \"block\",\n \"xl\": \"table\"\n };\n\n const displayBreakpoints: Record<string, Breakpoint> = Object.entries(breakpointDisplays).reduce((swapped, [key, value]) => ({\n ...swapped,\n [value]: key\n }), {});\n\n const classes: string[] = Object.keys(breakpointDisplays)\n .map((breakpoint: string) => breakpoint as Breakpoint)\n .map((breakpoint: Breakpoint) => breakpoint === \"xs\" ? `d-${breakpointDisplays[breakpoint]}` : `d-${breakpoint}-${breakpointDisplays[breakpoint]}`);\n\n //#region Values\n\n /**\n * This div helps determine the responsive breakpoint based on CSS rules.\n *\n * The element has `class=\"d-none d-sm-inline d-md-inline-block d-lg-block d-xl-table\"`\n * so whenever the screen is a specific width, the div's `display` property will be updated.\n * We can efficiently re-check the breakpoint by listening to the window \"resize\" event\n * and examining the current `display` property.\n *\n * Lastly, we need `visibility: collapse !important` in the div's inline style\n * because we want to keep the element invisible while the `display` is being updated.\n */\n const breakpointHelperDiv = ref<HTMLElement | undefined>();\n const breakpoint = ref<Breakpoint>(\"unknown\");\n const internalBreakpoint = computed<Breakpoint>({\n get() {\n return breakpoint.value;\n },\n set(newValue: Breakpoint) {\n breakpoint.value = newValue;\n\n // Emit so client code can use output binding\n // if unable to use the provide/inject pattern.\n emit(\"breakpoint\", breakpoint.value);\n }\n });\n\n //#endregion\n\n //#region Functions\n\n /** Checks if the breakpoint changed */\n function checkBreakpoint(): void {\n // Skip if the div element is not set (this could happen if this component isn't mounted).\n if (!breakpointHelperDiv.value) {\n return;\n }\n\n // Get the breakpoint that is mapped to the `display` style property.\n const display = getComputedStyle(breakpointHelperDiv.value).display;\n const newBreakpoint: Breakpoint = displayBreakpoints[display] ?? \"unknown\";\n internalBreakpoint.value = newBreakpoint;\n }\n\n //#endregion\n\n //#region Event Handlers\n\n /** Event handler for the window \"resize\" event. */\n function onWindowResized(): void {\n checkBreakpoint();\n }\n\n //#endregion\n\n // Provide the reactive breakpoint to child components.\n provideBreakpoint(breakpoint);\n\n onMounted(() => {\n // Check the breakpoint initially and wire up the window \"resize\" event handler.\n checkBreakpoint();\n addEventListener(\"resize\", onWindowResized);\n });\n\n onBeforeUnmount(() => {\n // Remove the window \"resize\" event handler when this component is unmounted.\n removeEventListener(\"resize\", onWindowResized);\n });\n</script>","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\n<template>\n <div :id=\"id\" style=\"display: none;\">\n <!-- This will be removed once the component is mounted. -->\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { onMounted, PropType, ref, watch } from \"vue\";\n import { newGuid } from \"@Obsidian/Utility/guid\";\n\n const props = defineProps({\n html: {\n type: String as PropType<string>\n }\n });\n\n const id = newGuid();\n\n const mountPoint = ref<Node | undefined>();\n const mountedWrapper = ref<HTMLElement | undefined>();\n const mountedNodes = ref<Node[]>([]);\n\n /**\n * Mounts the supplied HTML onto the DOM between the mount points.\n *\n * If the supplied HTML has not been converted to HTMLElement objects\n * or if the mount points are not in the DOM, then this method does nothing.\n */\n function mountHtml(): void {\n const mountedWrapperElement = mountedWrapper.value;\n const mountPointElement = mountPoint.value;\n\n if (!mountedWrapperElement || !mountPointElement) {\n // Cannot mount because the mount point or element to be mounted are not defined yet.\n return;\n }\n\n const parentElement = mountPointElement.parentElement;\n\n if (!parentElement) {\n // Cannot mount because this component hasn't fully been mounted onto a parent element.\n return;\n }\n\n if (mountedWrapperElement.childNodes.length === 0) {\n // Nothing to mount.\n return;\n }\n\n mountedNodes.value = [];\n for (let i = 0; i < mountedWrapperElement.childNodes.length; i++) {\n // Insert the HTML before the mount point element.\n const childNode = mountedWrapperElement.childNodes[i];\n parentElement.insertBefore(childNode, mountPointElement);\n mountedNodes.value.push(childNode);\n }\n\n // Remove the comment node from the DOM (this will be added back when unmount is called);\n parentElement.removeChild(mountPointElement);\n }\n\n /**\n * Unmounts the supplied HTML from the DOM between the mount points.\n *\n * If the mount points are not in the DOM or if there is nothing to\n * unmount, then this method does nothing.\n */\n function unmountHtml(): void {\n const nodesToRemove = mountedNodes.value;\n\n if (nodesToRemove.length === 0) {\n // Nothing to unmount.\n return;\n }\n\n const mountPointElement = mountPoint.value;\n\n if (!mountPointElement) {\n // Nothing to unmount because the mount point is not defined yet.\n return;\n }\n\n // Clear mounted nodes.\n const parentElement = nodesToRemove[0].parentElement;\n if (!parentElement) {\n // Nothing to unmount because this component hasn't fully been mounted, itself.\n return;\n }\n\n // Add the comment before removing child nodes.\n parentElement.insertBefore(mountPointElement, nodesToRemove[0]);\n\n // Remove the child nodes.\n for (const node of nodesToRemove) {\n parentElement.removeChild(node);\n }\n }\n\n watch([() => props.html, mountPoint], ([newHtml, newMount], [oldHtml, _oldMount]) => {\n // If any changes are made, unmount the old HTML.\n unmountHtml();\n\n if (newHtml !== oldHtml) {\n // Reset the mounted wrapper if the HTML was changed.\n mountedWrapper.value = undefined;\n }\n\n // Create a new element to be mounted, if necessary.\n if (!mountedWrapper.value && newHtml) {\n const tempDiv = document.createElement(\"div\");\n tempDiv.innerHTML = newHtml;\n mountedWrapper.value = tempDiv;\n }\n\n if (newMount) {\n mountHtml();\n }\n });\n\n onMounted(() => {\n // Swap out the div placeholder for mount point comment node.\n // The comment node is what will be used to dynamically insert the HTML\n // into the correct location in the DOM without adding any rendered HTML elements.\n const div = document.getElementById(id);\n mountPoint.value = document.createComment(\"\");\n div?.parentElement?.insertBefore(mountPoint.value, div);\n div?.remove();\n });\n</script>","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\n<template>\n <RockForm @submit=\"onCredentialLoginSubmitted\">\n <HtmlRenderer v-if=\"promptMessage\" :html=\"promptMessage\" />\n\n <TextBox v-model=\"username\"\n :disabled=\"disabled\"\n :isRequiredIndicatorHidden=\"true\"\n :label=\"usernameFieldLabel\"\n rules=\"required\"\n type=\"text\" />\n\n <TextBox v-model=\"password\"\n :disabled=\"disabled\"\n :isRequiredIndicatorHidden=\"true\"\n label=\"Password\"\n rules=\"required\"\n type=\"password\" />\n\n <InlineCheckBox v-if=\"!isRememberMeHidden\"\n v-model=\"rememberMe\"\n :disabled=\"disabled\"\n label=\"Keep me logged in\" />\n\n <RockButton autoDisable\n :btnType=\"BtnType.Primary\"\n :class=\"isMobile ? 'btn-block' : 'd-inline-block'\"\n :disabled=\"disabled\"\n type=\"submit\">Log In</RockButton>\n\n <RockButton v-if=\"!isNewAccountHidden\"\n autoDisable\n :btnType=\"BtnType.Action\"\n :class=\"isMobile ? 'btn-block mt-2' : 'ml-1 d-inline-block'\"\n :disabled=\"disabled\"\n type=\"button\"\n @click=\"onRegisterClicked\">{{ newAccountButtonText }}</RockButton>\n\n <RockButton autoDisable\n :btnType=\"BtnType.Link\"\n :class=\"isMobile ? 'btn-block mt-2' : 'ml-1 d-inline-block'\"\n :disabled=\"disabled\"\n type=\"button\"\n @click=\"onForgotAccountClicked\">Forgot Account</RockButton>\n </RockForm>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, ref } from \"vue\";\n import HtmlRenderer from \"./htmlRenderer.partial.obs\";\n import { useBreakpoint } from \"../types.partial\";\n import InlineCheckBox from \"@Obsidian/Controls/inlineCheckBox.obs\";\n import RockButton from \"@Obsidian/Controls/rockButton.obs\";\n import RockForm from \"@Obsidian/Controls/rockForm.obs\";\n import TextBox from \"@Obsidian/Controls/textBox.obs\";\n import { BtnType } from \"@Obsidian/Enums/Controls/btnType\";\n import { CredentialLoginRequestBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/credentialLoginRequestBag\";\n\n const props = defineProps({\n disabled: {\n type: Boolean as PropType<boolean>,\n required: false,\n default: false\n },\n isMobileForced: {\n type: Boolean as PropType<boolean>,\n required: false,\n default: false\n },\n isNewAccountHidden: {\n type: Boolean as PropType<boolean>,\n required: false,\n default: false\n },\n isRememberMeHidden: {\n type: Boolean as PropType<boolean>,\n required: false,\n default: false\n },\n newAccountButtonText: {\n type: String as PropType<string | null | undefined>,\n required: false\n },\n promptMessage: {\n type: String as PropType<string | null | undefined>,\n required: false\n },\n usernameFieldLabel: {\n type: String as PropType<string | null | undefined>,\n required: false\n }\n });\n\n const emit = defineEmits<{\n (e: \"forgotAccount\"): void,\n (e: \"login\", _value: CredentialLoginRequestBag): void,\n (e: \"register\"): void\n }>();\n\n // #region Values\n\n const breakpoint = useBreakpoint();\n const username = ref<string>(\"\");\n const password = ref<string>(\"\");\n const rememberMe = ref<boolean>(false);\n\n // #endregion\n\n // #region Computed Values\n\n const usernameFieldLabel = computed(() => props.usernameFieldLabel || \"Username\");\n const newAccountButtonText = computed(() => props.newAccountButtonText || \"Register\");\n const isMobile = computed<boolean>(() => props.isMobileForced || breakpoint.value === \"xs\");\n\n // #endregion\n\n // #region Event Handlers\n\n /**\n * Event handler for the credential login form being submitted.\n */\n function onCredentialLoginSubmitted(): void {\n emit(\"login\", {\n username: username.value,\n password: password.value,\n rememberMe: rememberMe.value\n });\n }\n\n /**\n * Event handler for the Forgot Account button being clicked.\n */\n function onForgotAccountClicked(): void {\n emit(\"forgotAccount\");\n }\n\n /**\n * Event handler for the Register button being clicked.\n */\n function onRegisterClicked(): void {\n emit(\"register\");\n }\n\n // #endregion\n</script>","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\n<template>\n <div :class=\"dividerClassRef\">\n <div class=\"rock-divider-line\"></div><div v-if=\"isContentVisible\" class=\"rock-divider-content\" v-html=\"content\"></div><div v-if=\"isContentVisible\" class=\"rock-divider-line\"></div>\n </div>\n</template>\n\n\n<style scoped>\n* {\n --var-divider-color: #a4a4a4;\n}\n\n.rock-divider {\n display: flex;\n flex-direction: row;\n align-items: center;\n margin: 2rem 0;\n}\n\n.rock-divider-line {\n flex: 1;\n border-top: 1px solid var(--var-divider-color);\n}\n\n.rock-divider-content {\n padding: 0 1rem;\n color: var(--var-divider-color);\n}\n\n.rock-divider-vertical {\n flex-direction: column;\n margin: 0;\n}\n\n.rock-divider-vertical .rock-divider-line {\n border: 0;\n border-left: 1px solid var(--var-divider-color);\n}\n\n</style>\n\n<script setup lang=\"ts\">\n import { computed, PropType } from \"vue\";\n\n const props = defineProps({\n isVertical: {\n type: Object as PropType<boolean>,\n required: false,\n default: () => false\n },\n\n content: {\n type: Object as PropType<string>,\n required: false,\n default: () => null\n }\n });\n\n // #region Values\n\n // #endregion\n\n // #region Computed Values\n\n const isContentVisible = computed(() => !!props.content);\n const dividerClassRef = computed(() => `rock-divider${props.isVertical ? \" rock-divider-vertical\" : \"\"}`);\n\n // #endregion\n\n // #region Functions\n\n // #endregion\n\n // #region Event Handlers\n\n // #endregion\n</script>\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\n<template>\n <p v-if=\"hasExternalLogins && isCaptionNotEmpty\" v-html=\"caption\"></p>\n\n <RockButton v-for=\"login in externalLogins\"\n :btnType=\"BtnType.Authentication\"\n :class=\"login.cssClass + ' btn-authentication-v2'\"\n :disabled=\"disabled\"\n @click=\"onExternalLoginClick(login)\"><span>{{ login.text }}</span></RockButton>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType } from \"vue\";\n import RockButton from \"@Obsidian/Controls/rockButton.obs\";\n import { BtnType } from \"@Obsidian/Enums/Controls/btnType\";\n import { ExternalAuthenticationButtonBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/externalAuthenticationButtonBag\";\n\n const props = defineProps({\n modelValue: {\n type: Array as PropType<ExternalAuthenticationButtonBag[]>,\n required: true,\n default: []\n },\n disabled: {\n type: Boolean as PropType<boolean>,\n required: false,\n default: false\n },\n caption: {\n type: String as PropType<string>,\n required: false,\n default: \"\"\n }\n });\n\n const emit = defineEmits<{\n (e: \"login\", value: ExternalAuthenticationButtonBag): void\n }>();\n\n // #endregion\n\n // #region Computed Values\n\n const externalLogins = computed<ExternalAuthenticationButtonBag[]>(() => {\n return props.modelValue?.filter(l => !!l.authenticationType) ?? [];\n });\n\n const hasExternalLogins = computed<boolean>(() => !!externalLogins.value.length);\n\n const isCaptionNotEmpty = computed<boolean>(() => !!props.caption);\n\n // #endregion\n\n // #region Event Handlers\n\n /**\n * Handles the event when an external login button is clicked.\n */\n function onExternalLoginClick(externalLogin: ExternalAuthenticationButtonBag): void {\n emit(\"login\", externalLogin);\n }\n\n // #endregion\n</script>","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\n<template>\n\n <RockButton\n v-if=\"isCredentialLoginSupported && internalLoginMethod !== LoginMethod.InternalDatabase\"\n :btnType=\"BtnType.Default\"\n class=\"btn-block\"\n :disabled=\"disabled\"\n type=\"button\"\n @click=\"onSignInWithAccountClicked()\">Sign in with Account</RockButton>\n\n <RockButton\n v-else-if=\"isPasswordlessLoginSupported && internalLoginMethod !== LoginMethod.Passwordless\"\n :btnType=\"BtnType.Default\"\n class=\"btn-block\"\n :disabled=\"disabled\"\n type=\"button\"\n @click=\"onSignInWithEmailOrPhoneClicked()\">Sign in with Email or Phone</RockButton>\n</template>\n\n<script setup lang=\"ts\">\n import { PropType } from \"vue\";\n import RockButton from \"@Obsidian/Controls/rockButton.obs\";\n import { LoginMethod } from \"@Obsidian/Enums/Blocks/Security/Login/loginMethod\";\n import { BtnType } from \"@Obsidian/Enums/Controls/btnType\";\n import { useVModelPassthrough } from \"@Obsidian/Utility/component\";\n\n const props = defineProps({\n modelValue: {\n type: Object as PropType<LoginMethod | undefined>,\n required: true\n },\n isCredentialLoginSupported: {\n type: Boolean as PropType<boolean>,\n required: true\n },\n isPasswordlessLoginSupported: {\n type: Boolean as PropType<boolean>,\n required: true\n },\n disabled: {\n type: Boolean as PropType<boolean>,\n required: false,\n default: false\n }\n });\n\n const emit = defineEmits<{\n (e: \"update:modelValue\", _value: LoginMethod | undefined): void\n }>();\n\n //#region Values\n\n //#endregion\n\n //#region Computed Values\n\n const internalLoginMethod = useVModelPassthrough(props, \"modelValue\", emit);\n\n //#endregion\n\n //#region Event Handlers\n\n function onSignInWithAccountClicked(): void {\n internalLoginMethod.value = LoginMethod.InternalDatabase;\n }\n\n function onSignInWithEmailOrPhoneClicked(): void {\n internalLoginMethod.value = LoginMethod.Passwordless;\n }\n\n //#endregion\n\n</script>","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\n<template>\n <RockValidation :errors=\"validationErrors\" />\n\n <RockForm @submit=\"onPasswordlessLoginStartSubmitted\" >\n <TextBox\n v-model=\"emailOrPhoneNumber\"\n :disabled=\"disabled\"\n :isRequiredIndicatorHidden=\"true\"\n :label=\"label\"\n :rules=\"['required']\"></TextBox>\n\n <RockButton\n :btnType=\"BtnType.Primary\"\n :class=\"isMobileForced ? 'btn-block' : 'btn-block d-sm-none'\"\n :disabled=\"disabled\"\n type=\"submit\">Continue</RockButton>\n <RockButton\n v-if=\"!isMobileForced\"\n :btnType=\"BtnType.Primary\"\n class=\"d-none d-sm-inline-block\"\n :disabled=\"disabled\"\n type=\"submit\">Continue</RockButton>\n </RockForm>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, ref } from \"vue\";\n import RockValidation from \"@Obsidian/Controls/rockValidation.obs\";\n import RockButton from \"@Obsidian/Controls/rockButton.obs\";\n import RockForm from \"@Obsidian/Controls/rockForm.obs\";\n import TextBox from \"@Obsidian/Controls/textBox.obs\";\n import { BtnType } from \"@Obsidian/Enums/Controls/btnType\";\n import { isEmail } from \"@Obsidian/Utility/email\";\n import { FormError } from \"@Obsidian/Utility/form\";\n import { formatPhoneNumber, getPhoneNumberConfiguration, stripPhoneNumber } from \"@Obsidian/Utility/phone\";\n import { validateValue } from \"@Obsidian/ValidationRules\";\n import { PasswordlessLoginStartRequestBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginStartRequestBag\";\n import { PhoneNumberBoxGetConfigurationResultsBag } from \"@Obsidian/ViewModels/Rest/Controls/phoneNumberBoxGetConfigurationResultsBag\";\n import { PhoneNumberCountryCodeRulesConfigurationBag } from \"@Obsidian/ViewModels/Rest/Controls/phoneNumberCountryCodeRulesConfigurationBag\";\n\n const props = defineProps({\n modelValue: {\n type: Object as PropType<PasswordlessLoginStartRequestBag>,\n required: true\n },\n disabled: {\n type: Boolean as PropType<boolean>,\n required: false,\n default: false\n },\n isMobileForced: {\n type: Boolean as PropType<boolean>,\n required: false,\n default: false\n }\n });\n\n const emit = defineEmits<{\n (e: \"start\"): void,\n (e: \"update:modelValue\", _value: PasswordlessLoginStartRequestBag): void\n }>();\n\n //#region Values\n\n const label = \"Email or Phone\";\n const validationErrors = ref<FormError[]>([]);\n const phoneNumberConfig = ref<PhoneNumberBoxGetConfigurationResultsBag>();\n const emailOrPhoneNumberRaw = ref<string>(\"\");\n\n //#endregion\n\n //#region Computed Values\n\n const emailOrPhoneNumber = computed<string>({\n get() {\n return emailOrPhoneNumberRaw.value;\n },\n set(newValue: string) {\n emailOrPhoneNumberRaw.value = newValue;\n validateEmailOrPhoneNumber(newValue);\n }\n });\n\n //#endregion\n\n //#region Event Handlers\n\n /**\n * Handles the event where the passwordless login start form is submitted.\n */\n function onPasswordlessLoginStartSubmitted(): void {\n validateForm();\n\n if (validationErrors.value.length === 0) {\n emit(\"start\");\n }\n }\n\n //#endregion\n\n //#region Functions\n\n /** Get all rules for any country code */\n function getConfiguredRules(): PhoneNumberCountryCodeRulesConfigurationBag[] {\n const rules = phoneNumberConfig.value?.rules;\n const configuredRules: PhoneNumberCountryCodeRulesConfigurationBag[] = [];\n if (rules) {\n for (const key in rules) {\n const bag = rules[key];\n configuredRules.push(...bag);\n }\n }\n return configuredRules;\n }\n\n /**\n * Loads the phone number configuration for validation.\n */\n async function loadPhoneNumberConfig(): Promise<void> {\n phoneNumberConfig.value = await getPhoneNumberConfiguration();\n }\n\n /**\n *\n */\n function validateForm(): void {\n const errorMessages = validateValue(emailOrPhoneNumber.value, validateEmailOrPhoneNumber);\n\n if (errorMessages && errorMessages.length) {\n validationErrors.value = errorMessages.map(\n errorMessage => ({\n name: label,\n text: errorMessage\n })\n );\n }\n else {\n validationErrors.value = [];\n }\n }\n\n /**\n * Validates the \"Email or Phone\" field and emits modelValue updates depending on validity.\n *\n * @param value the value to validate.\n */\n function validateEmailOrPhoneNumber(value: unknown): string | boolean {\n if (!value) {\n return true;\n }\n\n let errors = validateEmail(value);\n if (errors === \"\") {\n emit(\"update:modelValue\", {\n ...props.modelValue,\n email: value as string,\n phoneNumber: null,\n shouldSendEmailCode: true,\n shouldSendEmailLink: true,\n shouldSendSmsCode: false\n });\n return true;\n }\n\n const formattedNumber = formatPhoneNumber(stripPhoneNumber(value as string));\n if (formattedNumber) {\n errors = validatePhoneNumber(stripPhoneNumber(formattedNumber));\n if (errors === \"\") {\n emailOrPhoneNumberRaw.value = formattedNumber;\n emit(\"update:modelValue\", {\n ...props.modelValue,\n email: null,\n phoneNumber: formattedNumber,\n shouldSendEmailCode: false,\n shouldSendEmailLink: false,\n shouldSendSmsCode: true\n });\n return true;\n }\n }\n\n // Clear modelValue when invalid.\n emit(\"update:modelValue\", {\n ...props.modelValue,\n email: null,\n phoneNumber: null,\n shouldSendEmailCode: false,\n shouldSendEmailLink: false,\n shouldSendSmsCode: false\n });\n return \"must be a valid email or phone number\";\n }\n\n /**\n * Validates a value as an email address.\n *\n * @param value The value to validate.\n */\n function validateEmail(value: unknown): string {\n if (!value) {\n return \"\";\n }\n\n if (isEmail(value)) {\n return \"\";\n }\n\n return \"Email must be a valid email address.\";\n }\n\n /**\n * Validates a value as a phone number using the configuration retrieved from the server.\n *\n * @param value The value to validate.\n */\n function validatePhoneNumber(value: string): string {\n const rules = getConfiguredRules();\n\n if (!value) {\n return \"\";\n }\n\n if (rules.length === 0) {\n return \"\";\n }\n\n for (let rule of rules) {\n const regex = new RegExp(rule.match ?? \"\");\n\n if (regex.test(value)) {\n return \"\";\n }\n }\n\n return `Phone number '${value}' must be a valid phone number.`;\n }\n\n //#endregion\n\n loadPhoneNumberConfig();\n</script>","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\n<template>\n <RockForm v-model:submit=\"internalSubmitPasswordlessLoginVerification\"\n @submit=\"onPasswordlessLoginVerifySubmitted\">\n\n <div class=\"mb-2\" ref=\"instructionsDiv\">Please enter your confirmation code below.</div>\n\n <CodeBox v-model.capitalize=\"internalCode\"\n :disabled=\"disabled\"\n :maxLength=\"6\"\n rules=\"required\"\n validationTitle=\"Code\"\n @complete=\"onCodeCompleted\" />\n\n <template v-if=\"modelValue.isPersonSelectionRequired\">\n <p>The {{ internalCommunicationType }} you provided is matched to several different individuals. Please select the one that is you.</p>\n <RadioButtonList v-model=\"internalMatchingPersonValue\"\n v-model:items=\"internalMatchingPeople\" />\n </template>\n\n <RockButton :btnType=\"BtnType.Primary\"\n :class=\"['complete-sign-in-btn', isMobile ? 'btn-block' : '']\"\n :disabled=\"disabled\"\n type=\"submit\">Complete Sign In</RockButton>\n\n <RockButton autoDisable\n :btnType=\"BtnType.Action\"\n :class=\"isMobile ? 'btn-block mt-2' : 'ml-1'\"\n :disabled=\"disabled\"\n type=\"button\"\n @click=\"onResendCodeClicked\">Resend code</RockButton>\n </RockForm>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, ref } from \"vue\";\n import { PasswordlessCommunicationType } from \"./types.partial\";\n import CodeBox from \"../codeBox.obs\";\n import { useBreakpoint } from \"../types.partial\";\n import RadioButtonList from \"@Obsidian/Controls/radioButtonList.obs\";\n import RockButton from \"@Obsidian/Controls/rockButton.obs\";\n import RockForm from \"@Obsidian/Controls/rockForm.obs\";\n import { BtnType } from \"@Obsidian/Enums/Controls/btnType\";\n import { useVModelPassthrough } from \"@Obsidian/Utility/component\";\n import { PasswordlessLoginVerifyOptionsBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginVerifyOptionsBag\";\n import { ListItemBag } from \"@Obsidian/ViewModels/Utility/listItemBag\";\n\n const props = defineProps({\n modelValue: {\n type: Object as PropType<PasswordlessLoginVerifyOptionsBag>,\n required: true\n },\n communicationType: {\n type: String as PropType<PasswordlessCommunicationType>,\n required: false,\n default: \"data\"\n },\n disabled: {\n type: Boolean as PropType<boolean>,\n required: false,\n default: false\n },\n isMobileForced: {\n type: Boolean as PropType<boolean>,\n required: false,\n default: false\n },\n submitPasswordlessLoginVerification: {\n type: Boolean as PropType<boolean>,\n required: false,\n default: false\n }\n });\n\n const emit = defineEmits<{\n (e: \"resendCode\"): void,\n (e: \"update:submitPasswordlessLoginVerification\", _value: boolean): void\n (e: \"update:modelValue\", _value: PasswordlessLoginVerifyOptionsBag),\n (e: \"verify\"): void,\n }>();\n\n //#region Values\n\n const internalSubmitPasswordlessLoginVerification = useVModelPassthrough(props, \"submitPasswordlessLoginVerification\", emit);\n const instructionsDiv = ref<HTMLElement | undefined>();\n const breakpoint = useBreakpoint();\n\n //#endregion\n\n //#region Computed Values\n\n const internalCode = computed({\n get() {\n return props.modelValue.code || \"\";\n },\n set(newValue: string) {\n emit(\"update:modelValue\", {\n ...props.modelValue,\n code: newValue\n });\n }\n });\n\n const internalCommunicationType = computed(() => props.communicationType || \"data\");\n\n const internalMatchingPeople = computed({\n get() {\n return props.modelValue.matchingPeople ?? [];\n },\n set(newValue: ListItemBag[]) {\n emit(\"update:modelValue\", {\n ...props.modelValue,\n matchingPeople: newValue\n });\n }\n });\n\n const internalMatchingPersonValue = computed({\n get() {\n return props.modelValue.matchingPersonValue || \"\";\n },\n set(newValue: string) {\n emit(\"update:modelValue\", {\n ...props.modelValue,\n matchingPersonValue: newValue\n });\n }\n });\n\n const isMobile = computed<boolean>(() => props.isMobileForced || breakpoint.value === \"xs\");\n\n //#endregion\n\n //#region Event Handlers\n\n function onPasswordlessLoginVerifySubmitted(): void {\n emit(\"verify\");\n }\n\n function onResendCodeClicked(): void {\n internalCode.value = \"\";\n internalMatchingPersonValue.value = \"\";\n internalMatchingPeople.value = [];\n emit(\"resendCode\");\n }\n\n function onCodeCompleted(): void {\n const signInButton = instructionsDiv.value?.parentElement?.querySelector<HTMLButtonElement>(\"button.complete-sign-in-btn\");\n\n if (signInButton) {\n signInButton.focus();\n }\n }\n\n //#endregion\n</script>","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\n<template>\n <PasswordlessLoginStartStep v-if=\"passwordlessLoginStep.isStart\"\n v-model=\"passwordlessLoginStartRequest\"\n :disabled=\"disabled\"\n :isMobileForced=\"isMobileForced\"\n @start=\"onStartPasswordlessLogin\" />\n\n <PasswordlessLoginVerifyStep v-else-if=\"passwordlessLoginStep.isVerify\"\n v-model=\"passwordlessLoginVerifyOptions\"\n v-model:submitPasswordlessLoginVerification=\"submitPasswordlessLoginVerification\"\n :communicationType=\"communicationType\"\n :disabled=\"disabled\"\n :isMobileForced=\"isMobileForced\"\n @resendCode=\"onResendCode\"\n @verify=\"onVerifyPasswordlessLogin\" />\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, onUnmounted, PropType, ref, watch } from \"vue\";\n import { PasswordlessCommunicationType } from \"./types.partial\";\n import PasswordlessLoginStartStep from \"./passwordlessLoginStartStep.partial.obs\";\n import PasswordlessLoginVerifyStep from \"./passwordlessLoginVerifyStep.partial.obs\";\n import { PasswordlessLoginStep } from \"@Obsidian/Enums/Blocks/Security/Login/passwordlessLoginStep\";\n import { LoginInitializationBox } from \"@Obsidian/ViewModels/Blocks/Security/Login/loginInitializationBox\";\n import { PasswordlessLoginOptionsBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginOptionsBag\";\n import { PasswordlessLoginStartRequestBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginStartRequestBag\";\n import { PasswordlessLoginVerifyOptionsBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginVerifyOptionsBag\";\n import { PasswordlessLoginVerifyRequestBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginVerifyRequestBag\";\n\n const props = defineProps({\n modelValue: {\n type: Object as PropType<PasswordlessLoginOptionsBag>,\n required: true\n },\n config: {\n type: Object as PropType<LoginInitializationBox>,\n required: true\n },\n disabled: {\n type: Boolean as PropType<boolean>,\n required: false,\n default: false\n },\n isMobileForced: {\n type: Boolean as PropType<boolean>,\n required: false,\n default: false\n }\n });\n\n const emit = defineEmits<{\n (e: \"start\", value: PasswordlessLoginStartRequestBag): void,\n (e: \"update:modelValue\", value: PasswordlessLoginOptionsBag): void,\n (e: \"verify\", value: PasswordlessLoginVerifyRequestBag): void,\n }>();\n\n // #region Values\n\n const passwordlessLoginStartRequest = ref<PasswordlessLoginStartRequestBag>({\n shouldSendEmailCode: false,\n shouldSendEmailLink: false,\n shouldSendSmsCode: false,\n email: null,\n phoneNumber: null\n });\n\n const passwordlessLoginVerifyOptions = ref<PasswordlessLoginVerifyOptionsBag>({\n code: props.modelValue?.code,\n isPersonSelectionRequired: props.modelValue?.isPersonSelectionRequired,\n matchingPeople: props.modelValue?.matchingPeople,\n matchingPersonValue: null,\n state: props.modelValue?.state\n });\n\n /**\n * Enables programmatic submission of the Passwordless Login Verify form.\n */\n const submitPasswordlessLoginVerification = ref(false);\n\n /**\n * Initialize with Start step unless we need to automatically submit the verification code.\n */\n const passwordlessLoginStep = computed(() => ({\n isStart: internalStep.value === PasswordlessLoginStep.Start,\n isVerify: internalStep.value === PasswordlessLoginStep.Verify\n }));\n\n // #endregion\n\n // #region Computed Values\n\n const internalCode = computed<string>({\n get() {\n return props.modelValue.code ?? \"\";\n },\n set(newValue) {\n emit(\"update:modelValue\", {\n ...props.modelValue,\n code: newValue\n });\n }\n });\n\n const internalState = computed<string>({\n get() {\n return props.modelValue.state ?? \"\";\n },\n set(newValue) {\n emit(\"update:modelValue\", {\n ...props.modelValue,\n state: newValue\n });\n }\n });\n\n const internalStep = computed<PasswordlessLoginStep>({\n get() {\n return props.modelValue.step;\n },\n set(newValue: PasswordlessLoginStep) {\n emit(\"update:modelValue\", {\n ...props.modelValue,\n step: newValue\n });\n }\n });\n\n const communicationType = computed<PasswordlessCommunicationType>(() => passwordlessLoginStartRequest.value.email ? \"email\" : passwordlessLoginStartRequest.value.phoneNumber ? \"phone number\" : \"data\");\n\n // #endregion\n\n // #region Event Handlers\n\n /**\n * Event handler for the \"Resend code\" button being clicked.\n *\n * @param passwordlessLoginStepValue\n */\n function onResendCode(): void {\n internalCode.value = \"\";\n passwordlessLoginVerifyOptions.value.code = \"\";\n internalStep.value = PasswordlessLoginStep.Start;\n }\n\n /**\n * Event handler for the Passwordless Login Start form being submitted.\n */\n function onStartPasswordlessLogin(): void {\n // Make sure the code and state are cleared before starting a new passwordless authentication session.\n internalCode.value = \"\";\n passwordlessLoginVerifyOptions.value.code = \"\";\n internalState.value = \"\";\n\n emit(\"start\", passwordlessLoginStartRequest.value);\n }\n\n /**\n * Event handler for the Passwordless Login Verify form being submitted.\n * Handles the redirect to the return URL if authentication is successful.\n */\n async function onVerifyPasswordlessLogin(): Promise<void> {\n emit(\"verify\", {\n code: passwordlessLoginVerifyOptions.value.code,\n matchingPersonValue: passwordlessLoginVerifyOptions.value.matchingPersonValue,\n state: passwordlessLoginVerifyOptions.value.state,\n });\n }\n\n // #endregion\n\n // #region Watchers\n\n // Update the child passwordless verify options when the parent passwordless options are updated.\n watch(() => props.modelValue, (newPasswordlessLoginOptions, oldPasswordlessLoginOptions) => {\n // Only update the fields that were changed so we don't overwrite everything on the child options.\n if (newPasswordlessLoginOptions.code !== oldPasswordlessLoginOptions.code) {\n passwordlessLoginVerifyOptions.value.code = newPasswordlessLoginOptions.code;\n }\n\n if (newPasswordlessLoginOptions.isPersonSelectionRequired !== oldPasswordlessLoginOptions.isPersonSelectionRequired) {\n passwordlessLoginVerifyOptions.value.isPersonSelectionRequired = newPasswordlessLoginOptions.isPersonSelectionRequired;\n }\n\n if (newPasswordlessLoginOptions.matchingPeople !== oldPasswordlessLoginOptions.matchingPeople) {\n passwordlessLoginVerifyOptions.value.matchingPeople = newPasswordlessLoginOptions.matchingPeople;\n }\n\n if (newPasswordlessLoginOptions.state !== oldPasswordlessLoginOptions.state) {\n passwordlessLoginVerifyOptions.value.state = newPasswordlessLoginOptions.state;\n }\n });\n\n // #endregion\n\n // If the page was loaded as a result of clicking a passwordless login link,\n // then automatically submit the form.\n onMounted(() => {\n if (props.modelValue.isAutomaticVerificationRequired) {\n submitPasswordlessLoginVerification.value = true;\n }\n });\n\n onUnmounted(() => {\n // Reset to the start step when this component is unmounted.\n // We don't want to do this after mounting because the\n // step can be externally overridden.\n internalStep.value = PasswordlessLoginStep.Start;\n });\n</script>","<!-- Copyright by the Spark Development Network; Licensed under the Rock Community License -->\n<template>\n <BreakpointObserver @breakpoint=\"value => breakpoint = value\">\n <div>\n <div v-if=\"criticalErrorMessage\">\n <NotificationBox alertType=\"danger\" v-html=\"criticalErrorMessage\" />\n </div>\n <div v-else-if=\"isCompleted\">\n <NotificationBox alertType=\"warning\" v-html=\"completedCaption\" />\n </div>\n <div v-else class=\"login-block\">\n <fieldset>\n <legend>Log In</legend>\n\n <template v-if=\"config.configurationErrors?.length\">\n <NotificationBox v-for=\"configError in config.configurationErrors\"\n alertType=\"warning\"\n v-text=\"configError\" />\n </template>\n\n <div v-if=\"config.errorMessage\" class=\"row\">\n <NotificationBox alertType=\"danger\"\n class=\"col-sm-12\"\n v-html=\"config.errorMessage\" />\n </div>\n\n <div :class=\"['login-container', 'row', isMobile ? 'mobile-layout' : 'd-flex']\">\n <div v-if=\"isAnyExternalAuthProviderVisible || areBothInternalAuthProvidersVisible\"\n :class=\"['login-methods', isMobileForced ? 'col-sm-12' : 'col-sm-5', 'remote-logins']\">\n <ExternalLogin v-if=\"isAnyExternalAuthProviderVisible\"\n :modelValue=\"config.externalAuthProviderButtons || []\"\n :caption=\"config.remoteAuthorizationPromptMessage ?? ''\"\n :disabled=\"isAuthenticating || isNavigating\"\n @login=\"onExternalLogin($event)\" />\n\n <LoginMethodPicker v-if=\"areBothInternalAuthProvidersVisible\"\n :modelValue=\"loginMethod\"\n :disabled=\"isAuthenticating || isNavigating\"\n :isCredentialLoginSupported=\"config.isInternalDatabaseLoginSupported\"\n :isPasswordlessLoginSupported=\"config.isPasswordlessLoginSupported\"\n @update:modelValue=\"onLoginMethodPickerChanged\" />\n </div>\n\n <Divider v-if=\"areSecondaryAndPrimaryAuthVisible\"\n :class=\"isMobileForced ? 'col-sm-12' : 'col-sm-1'\"\n content=\"or\"\n :isVertical=\"!isMobile\" />\n\n <div :class=\"['login-entry', isMobileForced || (!isAnyExternalAuthProviderVisible && !areBothInternalAuthProvidersVisible) ? 'col-sm-12' : 'col-sm-6']\">\n <div v-if=\"mfaMessage\" v-html=\"mfaMessage\"></div>\n\n <CredentialLogin v-if=\"loginMethod === LoginMethod.InternalDatabase\n && ((config.isInternalDatabaseLoginSupported && !mfa?.credentialLogin) || mfa?.credentialLogin?.isError === false)\"\n :disabled=\"isAuthenticating || isNavigating\"\n :isMobileForced=\"isMobileForced\"\n :isNewAccountHidden=\"currentMfaFactor === LoginMethod.InternalDatabase || config.hideNewAccountOption\"\n :isRememberMeHidden=\"currentMfaFactor === LoginMethod.InternalDatabase\"\n :newAccountButtonText=\"config.newAccountButtonText\"\n :promptMessage=\"config.promptMessage\"\n :usernameFieldLabel=\"config.usernameFieldLabel\"\n @forgotAccount=\"onForgotAccount()\"\n @login=\"onCredentialLogin($event)\"\n @register=\"onRegister()\" />\n\n <PasswordlessLogin v-else-if=\"loginMethod !== LoginMethod.InternalDatabase\n && ((config.isPasswordlessLoginSupported && !mfa?.passwordless) || mfa?.passwordless?.isError === false)\"\n v-model=\"passwordlessLoginOptions\"\n :config=\"config\"\n :disabled=\"isAuthenticating || isNavigating\"\n :isMobileForced=\"isMobileForced\"\n @start=\"onPasswordlessLoginStart($event)\"\n @verify=\"onPasswordlessLoginVerify($event)\" />\n\n <NotificationBox v-if=\"errorMessage\"\n alertType=\"warning\"\n class=\"block-message margin-t-md\"\n v-html=\"errorMessage\" />\n </div>\n </div>\n </fieldset>\n\n <div v-if=\"config.contentText\" class=\"mt-3\" v-html=\"config.contentText\"></div>\n </div>\n </div>\n </BreakpointObserver>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, ref } from \"vue\";\n import BreakpointObserver from \"./breakpointObserver.partial.obs\";\n import CredentialLogin from \"./Login/credentialLogin.partial.obs\";\n import Divider from \"./Login/divider.partial.obs\";\n import ExternalLogin from \"./Login/externalLogin.partial.obs\";\n import LoginMethodPicker from \"./Login/loginMethodPicker.partial.obs\";\n import PasswordlessLogin from \"./Login/passwordlessLogin.partial.obs\";\n import { Breakpoint } from \"./types.partial\";\n import NotificationBox from \"@Obsidian/Controls/notificationBox.obs\";\n import { LoginMethod } from \"@Obsidian/Enums/Blocks/Security/Login/loginMethod\";\n import { onConfigurationValuesChanged, useConfigurationValues, useInvokeBlockAction, useReloadBlock } from \"@Obsidian/Utility/block\";\n import { removeCurrentUrlQueryParams } from \"@Obsidian/Utility/url\";\n import { CredentialLoginMfaBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/credentialLoginMfaBag\";\n import { CredentialLoginRequestBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/credentialLoginRequestBag\";\n import { CredentialLoginResponseBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/credentialLoginResponseBag\";\n import { ExternalAuthenticationButtonBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/externalAuthenticationButtonBag\";\n import { LoginInitializationBox } from \"@Obsidian/ViewModels/Blocks/Security/Login/loginInitializationBox\";\n import { PasswordlessLoginMfaBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginMfaBag\";\n import { PasswordlessLoginOptionsBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginOptionsBag\";\n import { PasswordlessLoginStartRequestBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginStartRequestBag\";\n import { PasswordlessLoginStartResponseBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginStartResponseBag\";\n import { PasswordlessLoginStep } from \"@Obsidian/Enums/Blocks/Security/Login/passwordlessLoginStep\";\n import { PasswordlessLoginVerifyRequestBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginVerifyRequestBag\";\n import { PasswordlessLoginVerifyResponseBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/passwordlessLoginVerifyResponseBag\";\n import { RemoteLoginStartRequestBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/remoteLoginStartRequestBag\";\n import { RemoteLoginStartResponseBag } from \"@Obsidian/ViewModels/Blocks/Security/Login/remoteLoginStartResponseBag\";\n\n const config = useConfigurationValues<LoginInitializationBox>();\n const invokeBlockAction = useInvokeBlockAction();\n\n // #region Types\n\n type Mfa = {\n passwordless?: Omit<PasswordlessLoginMfaBag, \"ticket\"> | null | undefined;\n credentialLogin?: Omit<CredentialLoginMfaBag, \"ticket\"> | null | undefined;\n ticket: string | null;\n is2FANotSupportedForAuthenticationFactor?: boolean | undefined;\n };\n\n // #endregion\n\n // #region Values\n\n const breakpoint = ref<Breakpoint>(\"unknown\");\n const isMobileForced = !!document.getElementById(\"splash\");\n\n const isAuthenticating = ref(config.shouldRedirect);\n const completedCaption = ref<string | null>(null);\n const errorMessage = ref<string | null>(config.errorMessage || null);\n const criticalErrorMessage = ref<string | null>(null);\n const isNavigating = ref(false);\n\n const passwordlessLoginOptions = ref<PasswordlessLoginOptionsBag>({\n code: config.passwordlessAutoVerifyOptions?.code,\n state: config.passwordlessAutoVerifyOptions?.state,\n isAutomaticVerificationRequired: !!config.passwordlessAutoVerifyOptions,\n isPersonSelectionRequired: false,\n matchingPeople: null,\n step: config.passwordlessAutoVerifyOptions ? PasswordlessLoginStep.Verify : PasswordlessLoginStep.Start\n });\n\n const isCompleted = ref<boolean>(false);\n\n const mfa = ref<Mfa | null | undefined>();\n const twoFactorEmailPhoneNotAvailableMessage = ref<string>(config.twoFactorEmailPhoneNotAvailableMessage ?? \"\");\n const twoFactorEmailPhoneRequiredMessage = ref<string>(config.twoFactorEmailPhoneRequiredMessage ?? \"\");\n const twoFactorLoginNotAvailableMessage = ref<string>(config.twoFactorLoginNotAvailableMessage ?? \"\");\n const twoFactorLoginRequiredMessage = ref<string>(config.twoFactorLoginRequiredMessage ?? \"\");\n const twoFactorNotSupportedByAuthenticationMethodMessage = ref<string>(config.twoFactorNotSupportedByAuthenticationMethodMessage ?? \"\");\n\n // #endregion\n\n // #region Computed Values\n\n const areBothInternalAuthProvidersVisible = computed<boolean>(() =>\n config.isInternalDatabaseLoginSupported && config.isPasswordlessLoginSupported\n );\n\n const isAnyExternalAuthProviderVisible = computed<boolean>(() =>\n !!config.externalAuthProviderButtons?.length\n );\n\n const areSecondaryAndPrimaryAuthVisible = computed<boolean>(() => {\n const isAnyInternalAuthProviderVisible = config.isInternalDatabaseLoginSupported || config.isPasswordlessLoginSupported;\n return (isAnyExternalAuthProviderVisible.value && isAnyInternalAuthProviderVisible) || areBothInternalAuthProvidersVisible.value;\n });\n\n const loginMethod = ref<LoginMethod | undefined>();\n\n const isMobile = computed<boolean>(() => isMobileForced || breakpoint.value === \"xs\");\n\n const mfaMessage = computed<string | null>(() => {\n if (!mfa.value) {\n return null;\n }\n else if (mfa.value.passwordless && !mfa.value.passwordless.isError) {\n return twoFactorEmailPhoneRequiredMessage.value;\n }\n else if (mfa.value.passwordless?.isEmailAndMobilePhoneMissing) {\n return twoFactorEmailPhoneNotAvailableMessage.value;\n }\n else if (mfa.value.credentialLogin && !mfa.value.credentialLogin.isError) {\n return twoFactorLoginRequiredMessage.value;\n }\n else if (mfa.value.credentialLogin?.isUsernameAndPasswordMissing) {\n return twoFactorLoginNotAvailableMessage.value;\n }\n else if (mfa.value.is2FANotSupportedForAuthenticationFactor) {\n return twoFactorNotSupportedByAuthenticationMethodMessage.value;\n }\n else {\n return null;\n }\n });\n\n const currentMfaFactor = computed<LoginMethod | null>(() => {\n const mfaDetails = mfa.value;\n\n if (!mfaDetails) {\n return null;\n }\n\n if (mfaDetails.credentialLogin) {\n return LoginMethod.InternalDatabase;\n }\n\n if (mfaDetails.passwordless) {\n return LoginMethod.Passwordless;\n }\n\n // This would only occur if a new auth factor if block is not added here.\n console.error(\"Unknown MFA factor\");\n return null;\n });\n\n // #endregion\n\n // #region Event Handlers\n\n /**\n * Event handler for the credential login form being submitted.\n * Handles the redirect to the return URL if authentication is successful.\n */\n async function onCredentialLogin(bag: CredentialLoginRequestBag): Promise<void> {\n isAuthenticating.value = true;\n\n try {\n // Attach the MFA state to the request.\n bag.mfaTicket = mfa.value?.ticket;\n const response = await invokeBlockAction<CredentialLoginResponseBag>(\"CredentialLogin\", { bag });\n const responseBag = response?.data;\n\n if (!response?.isSuccess || !responseBag) {\n uiState.error({\n errorMessage: response?.errorMessage || \"Something went wrong. Please try again.\"\n });\n return;\n }\n\n if (responseBag.isLockedOut) {\n uiState.criticalError({\n errorMessage: responseBag.errorMessage ?? null\n });\n return;\n }\n\n if (responseBag.isAuthenticated) {\n uiState.valid();\n await navigate(responseBag.redirectUrl || \"/\");\n return;\n }\n\n if (responseBag.isConfirmationRequired) {\n uiState.confirmationRequired({\n caption: responseBag.errorMessage || response.errorMessage\n });\n return;\n }\n\n if (responseBag.mfa) {\n uiState.initMfaFactor({\n mfa: {\n passwordless: responseBag.mfa,\n ticket: responseBag.mfa.ticket ?? null\n },\n loginMethod: LoginMethod.Passwordless,\n });\n return;\n }\n\n uiState.error({\n errorMessage: responseBag.errorMessage || \"Authentication failed. Please try again.\"\n });\n }\n finally {\n // Reset isAuthenticating in the event there is an error so the user can resubmit.\n isAuthenticating.value = false;\n }\n }\n\n /**\n * Handles the event when an external login button is clicked.\n */\n async function onExternalLogin(externalLogin: ExternalAuthenticationButtonBag): Promise<void> {\n isAuthenticating.value = true;\n const bag: RemoteLoginStartRequestBag = {\n authenticationType: externalLogin.authenticationType,\n route: location.pathname\n };\n\n try {\n const response = await invokeBlockAction<RemoteLoginStartResponseBag>(\"RemoteLoginStart\", { bag });\n\n if (response?.isSuccess && response?.data?.redirectUrl) {\n await navigate(response.data.redirectUrl);\n return;\n }\n\n uiState.error({\n errorMessage: response?.errorMessage\n });\n return;\n }\n finally {\n isAuthenticating.value = false;\n }\n }\n\n /**\n * Event handler for the forgot account button being clicked.\n */\n async function onForgotAccount(): Promise<void> {\n await navigate(config.helpPageUrl ?? \"/\");\n }\n\n /**\n * Event handler for the login method picker being changed.\n */\n function onLoginMethodPickerChanged(value: LoginMethod | undefined): void {\n if (typeof value !== \"undefined\") {\n uiState.init({\n loginMethod: value\n });\n }\n }\n\n /**\n * Event handler for the Passwordless Login being started.\n */\n async function onPasswordlessLoginStart(bag: PasswordlessLoginStartRequestBag): Promise<void> {\n isAuthenticating.value = true;\n\n uiState.valid();\n\n try {\n // Attach the MFA state to the request.\n bag.mfaTicket = mfa.value?.ticket;\n const response = await invokeBlockAction<PasswordlessLoginStartResponseBag>(\"PasswordlessLoginStart\", { bag });\n\n if (!response?.isSuccess || !response.data) {\n uiState.error({\n errorMessage: response?.errorMessage || \"Something went wrong. Please try again.\"\n });\n return;\n }\n\n if (response.data.isSuccessful) {\n passwordlessLoginOptions.value = {\n ...passwordlessLoginOptions.value,\n state: response.data.state || \"\",\n step: PasswordlessLoginStep.Verify\n };\n loginMethod.value = LoginMethod.Passwordless;\n return;\n }\n\n passwordlessLoginOptions.value = {\n ...passwordlessLoginOptions.value,\n step: PasswordlessLoginStep.Start\n };\n loginMethod.value = LoginMethod.Passwordless;\n\n uiState.error({\n errorMessage: response?.data?.errorMessage || response?.errorMessage || \"An unknown error occurred. Please submit email or phone number again.\"\n });\n return;\n }\n finally {\n isAuthenticating.value = false;\n }\n }\n\n /**\n * Event handler for the Passwordless Login being verified.\n * Handles the redirect to the return URL if authentication is successful.\n */\n async function onPasswordlessLoginVerify(bag: PasswordlessLoginVerifyRequestBag): Promise<void> {\n isAuthenticating.value = true;\n uiState.valid();\n\n try {\n // Attach the MFA state to the request.\n bag.mfaTicket = mfa.value?.ticket;\n var response = await invokeBlockAction<PasswordlessLoginVerifyResponseBag>(\"PasswordlessLoginVerify\", { bag });\n\n if (!response || !response.isSuccess || !response.data) {\n uiState.error({\n errorMessage: \"Something went wrong. Please try again.\",\n });\n return;\n }\n\n if (response.data.isAuthenticated) {\n uiState.valid();\n await navigate(config.redirectUrl || \"/\");\n return;\n }\n\n if (response.data.mfa) {\n uiState.initMfaFactor({\n mfa: {\n credentialLogin: response.data.mfa,\n ticket: response.data.mfa.ticket ?? null,\n },\n loginMethod: LoginMethod.InternalDatabase,\n });\n return;\n }\n\n if (response.data.isRegistrationRequired) {\n if (!response.data.registrationUrl) {\n uiState.error({ errorMessage: \"Redirecting to default registration page\" });\n }\n await navigate(response.data.registrationUrl || \"/NewAccount\");\n return;\n }\n\n if (response.data.isPersonSelectionRequired) {\n passwordlessLoginOptions.value = {\n ...passwordlessLoginOptions.value,\n isPersonSelectionRequired: true,\n matchingPeople: response.data.matchingPeople || []\n };\n loginMethod.value = LoginMethod.Passwordless;\n return;\n }\n\n uiState.error({\n errorMessage: response.data.errorMessage ?? \"Authentication failed. Please try again.\"\n });\n }\n finally {\n // Reset isAuthenticating in the event there is an error so the user can resubmit.\n isAuthenticating.value = false;\n }\n }\n\n /**\n * Event handler for the register button being clicked.\n */\n async function onRegister(): Promise<void> {\n await navigate(config.newAccountPageUrl ?? \"/\");\n }\n\n // #endregion\n\n //#region Functions\n\n /**\n * Gets the initial login method to display.\n */\n function getInitialLoginMethod(): LoginMethod {\n const configuredDefaultLoginMethod = config.defaultLoginMethod;\n\n // If the block loaded as a response to a passwordless verification,\n // then the initial login method should be passwordless.\n if (config.passwordlessAutoVerifyOptions) {\n return LoginMethod.Passwordless;\n }\n\n switch (configuredDefaultLoginMethod) {\n case LoginMethod.InternalDatabase: {\n // If block setting default is internal database but only passwordless is supported,\n // then initial login method should be passwordless.\n if (!config.isInternalDatabaseLoginSupported && config.isPasswordlessLoginSupported) {\n return LoginMethod.Passwordless;\n }\n break;\n }\n\n case LoginMethod.Passwordless: {\n // If block setting default is passwordless but only internal database is supported,\n // then initial login method should be internal database.\n if (!config.isPasswordlessLoginSupported && config.isInternalDatabaseLoginSupported) {\n return LoginMethod.InternalDatabase;\n }\n break;\n }\n\n default: {\n break;\n }\n }\n\n // Return the block setting value.\n return configuredDefaultLoginMethod;\n }\n\n /**\n * Handles the event when a component triggers navigation.\n *\n * @param url The URL to navigate to.\n * @returns an unresolving promise so the page/form remains unusable until the redirect is complete.\n */\n async function navigate(url: string): Promise<void> {\n isNavigating.value = true;\n window.location.href = url;\n return new Promise((_resolve, _reject) => {\n // Return an unresolving promise so the page/form remains unusable until the redirect is complete.\n });\n }\n\n /**\n * Displays a completed message to the user.\n * If caption is provided, then a generic error is displayed.\n *\n * @param error The optional error message.\n */\n function showCompleted(caption?: string | null | undefined): void {\n completedCaption.value = caption || \"An unknown error occurred\";\n isCompleted.value = true;\n }\n\n function getErrorOrDefault(error?: string | null | undefined): string {\n return error || \"An unknown error occurred\";\n }\n\n const uiState = {\n init(state: { loginMethod: LoginMethod }): void {\n // Clear the error, switch the login method, and set the MFA state.\n errorMessage.value = null;\n loginMethod.value = state.loginMethod;\n mfa.value = null;\n },\n\n initMfaFactor(state: { loginMethod: LoginMethod, mfa: Mfa }): void {\n // Clear the error, switch the login method, and set the MFA state.\n errorMessage.value = null;\n loginMethod.value = state.loginMethod;\n mfa.value = state.mfa;\n },\n\n criticalError(state: { errorMessage: string | null }): void {\n // Set the critical error message and leave everything else untouched.\n criticalErrorMessage.value = state.errorMessage;\n },\n\n error(state: { errorMessage: string | null }): void {\n // Set the error but do not modify the login method or MFA state.\n errorMessage.value = getErrorOrDefault(state.errorMessage);\n },\n\n valid(): void {\n // Clear the error but do not modify the login method or MFA state.\n errorMessage.value = null;\n },\n\n confirmationRequired(state: { caption: string | null }): void {\n // Clear the error and MFA state even though\n // this will transition to the completed state\n // where those fields are hidden.\n errorMessage.value = null;\n mfa.value = null;\n showCompleted(state.caption);\n },\n\n passwordlessCodeSent(): void {\n // Clear the error but do not modify the MFA state.\n errorMessage.value = null;\n },\n\n passwordlessResendCode(): void {\n // Clear the error but do not modify the MFA state.\n errorMessage.value = null;\n },\n\n unsupportedMfaFactor(): void {\n errorMessage.value = null;\n mfa.value = {\n is2FANotSupportedForAuthenticationFactor: true,\n ticket: null,\n credentialLogin: null,\n passwordless: null\n };\n }\n };\n\n //#endregion\n\n onMounted(() => {\n // Redirect since already authenticated.\n if (config.shouldRedirect) {\n // If the redirect URL is not set, then redirect to the default route.\n navigate(config.redirectUrl ? config.redirectUrl : \"/\");\n return;\n }\n\n if (mfaParameter) {\n uiState.initMfaFactor({\n mfa: {\n credentialLogin: null,\n passwordless: {\n isEmailAndMobilePhoneMissing: false,\n isError: false\n },\n ticket: mfaParameter,\n },\n loginMethod: LoginMethod.Passwordless\n });\n }\n else if (config.is2FANotSupportedForAuthenticationFactor) {\n uiState.unsupportedMfaFactor();\n }\n else {\n uiState.init({\n loginMethod: getInitialLoginMethod()\n });\n }\n });\n\n const [ mfaParameter, ..._ ] = removeCurrentUrlQueryParams(\"Mfa\", \"State\", \"Code\", \"IsPasswordless\", \"state\", \"code\", \"scope\", \"authuser\", \"prompt\");\n\n onConfigurationValuesChanged(useReloadBlock());\n</script>"],"names":["bootstrapBreakpointInjectionKey","Symbol","provideBreakpoint","breakpoint","provide","useBreakpoint","inject","emit","__emit","breakpointDisplays","displayBreakpoints","Object","entries","reduce","swapped","_ref2","_ref3","_slicedToArray","key","value","_objectSpread","classes","keys","map","concat","breakpointHelperDiv","ref","internalBreakpoint","computed","get","set","newValue","checkBreakpoint","_displayBreakpoints$d","display","getComputedStyle","newBreakpoint","onWindowResized","onMounted","addEventListener","onBeforeUnmount","removeEventListener","props","__props","id","newGuid","mountPoint","mountedWrapper","mountedNodes","mountHtml","mountedWrapperElement","mountPointElement","parentElement","childNodes","length","i","childNode","insertBefore","push","removeChild","unmountHtml","nodesToRemove","_iterator","_createForOfIteratorHelper","_step","s","n","done","node","err","e","f","watch","html","_ref","newHtml","newMount","_ref4","oldHtml","_oldMount","undefined","tempDiv","document","createElement","innerHTML","_div$parentElement","div","getElementById","createComment","remove","username","password","rememberMe","usernameFieldLabel","newAccountButtonText","isMobile","isMobileForced","onCredentialLoginSubmitted","onForgotAccountClicked","onRegisterClicked","isContentVisible","content","dividerClassRef","isVertical","styleInject","css","insertAt","head","getElementsByTagName","style","type","firstChild","appendChild","styleSheet","cssText","createTextNode","externalLogins","_props$modelValue$fil","_props$modelValue","modelValue","filter","l","authenticationType","hasExternalLogins","isCaptionNotEmpty","caption","onExternalLoginClick","externalLogin","internalLoginMethod","useVModelPassthrough","onSignInWithAccountClicked","LoginMethod","InternalDatabase","onSignInWithEmailOrPhoneClicked","Passwordless","label","validationErrors","phoneNumberConfig","emailOrPhoneNumberRaw","emailOrPhoneNumber","validateEmailOrPhoneNumber","onPasswordlessLoginStartSubmitted","validateForm","getConfiguredRules","_phoneNumberConfig$va","rules","configuredRules","bag","loadPhoneNumberConfig","_loadPhoneNumberConfig","apply","arguments","_asyncToGenerator","getPhoneNumberConfiguration","errorMessages","validateValue","errorMessage","name","text","errors","validateEmail","email","phoneNumber","shouldSendEmailCode","shouldSendEmailLink","shouldSendSmsCode","formattedNumber","formatPhoneNumber","stripPhoneNumber","validatePhoneNumber","isEmail","_rule$match","rule","regex","RegExp","match","test","internalSubmitPasswordlessLoginVerification","instructionsDiv","internalCode","code","internalCommunicationType","communicationType","internalMatchingPeople","_props$modelValue$mat","matchingPeople","internalMatchingPersonValue","matchingPersonValue","onPasswordlessLoginVerifySubmitted","onResendCodeClicked","onCodeCompleted","_instructionsDiv$valu","signInButton","querySelector","focus","passwordlessLoginStartRequest","passwordlessLoginVerifyOptions","isPersonSelectionRequired","_props$modelValue2","_props$modelValue3","state","_props$modelValue4","submitPasswordlessLoginVerification","passwordlessLoginStep","isStart","internalStep","PasswordlessLoginStep","Start","isVerify","Verify","_props$modelValue$cod","internalState","_props$modelValue$sta","step","onResendCode","onStartPasswordlessLogin","onVerifyPasswordlessLogin","_onVerifyPasswordlessLogin","newPasswordlessLoginOptions","oldPasswordlessLoginOptions","isAutomaticVerificationRequired","onUnmounted","config","useConfigurationValues","invokeBlockAction","useInvokeBlockAction","isAuthenticating","shouldRedirect","completedCaption","criticalErrorMessage","isNavigating","passwordlessLoginOptions","_config$passwordlessA","passwordlessAutoVerifyOptions","_config$passwordlessA2","isCompleted","mfa","twoFactorEmailPhoneNotAvailableMessage","_config$twoFactorEmai","twoFactorEmailPhoneRequiredMessage","_config$twoFactorEmai2","twoFactorLoginNotAvailableMessage","_config$twoFactorLogi","twoFactorLoginRequiredMessage","_config$twoFactorLogi2","twoFactorNotSupportedByAuthenticationMethodMessage","_config$twoFactorNotS","areBothInternalAuthProvidersVisible","isInternalDatabaseLoginSupported","isPasswordlessLoginSupported","isAnyExternalAuthProviderVisible","_config$externalAuthP","externalAuthProviderButtons","areSecondaryAndPrimaryAuthVisible","isAnyInternalAuthProviderVisible","loginMethod","mfaMessage","_mfa$value$passwordle","_mfa$value$credential","passwordless","isError","isEmailAndMobilePhoneMissing","credentialLogin","isUsernameAndPasswordMissing","is2FANotSupportedForAuthenticationFactor","currentMfaFactor","mfaDetails","console","error","onCredentialLogin","_x","_onCredentialLogin","_mfa$value5","mfaTicket","ticket","response","responseBag","data","isSuccess","uiState","isLockedOut","_responseBag$errorMes","criticalError","isAuthenticated","valid","navigate","redirectUrl","isConfirmationRequired","confirmationRequired","_responseBag$mfa$tick","initMfaFactor","onExternalLogin","_x2","_onExternalLogin","route","location","pathname","_response$data","onForgotAccount","_onForgotAccount","_config$helpPageUrl","helpPageUrl","onLoginMethodPickerChanged","init","onPasswordlessLoginStart","_x3","_onPasswordlessLoginStart","_mfa$value6","_response$data2","isSuccessful","onPasswordlessLoginVerify","_x4","_onPasswordlessLoginVerify","_mfa$value7","_response$data$errorM","_response$data$mfa$ti","isRegistrationRequired","registrationUrl","onRegister","_onRegister","_config$newAccountPag","newAccountPageUrl","getInitialLoginMethod","configuredDefaultLoginMethod","defaultLoginMethod","_x5","_navigate","url","window","href","Promise","_resolve","_reject","showCompleted","getErrorOrDefault","passwordlessCodeSent","passwordlessResendCode","unsupportedMfaFactor","mfaParameter","_removeCurrentUrlQuer","removeCurrentUrlQueryParams","_removeCurrentUrlQuer2","_toArray","slice","onConfigurationValuesChanged","useReloadBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA8BA,IAAMA,+BAA8D,GAAGC,MAAM,CAAC,sBAAsB,CAAC,CAAA;MAK9F,SAASC,iBAAiBA,CAACC,UAA2B,EAAQ;MACjEC,EAAAA,OAAO,CAACJ,+BAA+B,EAAEG,UAAU,CAAC,CAAA;MACxD,CAAA;MAKO,SAAS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