@firebase-oss/ui-core 0.0.2-exp.760e5af โ 0.0.2-exp.779b039
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +32 -32
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../package.json","../src/register-framework.ts","../src/translations.ts","../src/errors.ts","../src/behaviors/anonymous-upgrade.ts","../src/behaviors/auto-anonymous-login.ts","../src/behaviors/recaptcha.ts","../src/behaviors/provider-strategy.ts","../src/behaviors/one-tap.ts","../src/behaviors/require-display-name.ts","../src/country-data.ts","../src/behaviors/country-codes.ts","../src/behaviors/utils.ts","../src/behaviors/index.ts","../src/auth.ts","../src/config.ts","../src/schemas.ts","../src/index.ts"],"names":["package_default","registerFramework","framework","version","registerVersion","getTranslation","ui","category","key","replacements","_getTranslation","FirebaseUIError","_FirebaseUIError","FirebaseError","error","message","ERROR_CODE_MAP","handleFirebaseError","isFirebaseError","errorContainsCredential","resolver","getMultiFactorResolver","autoUpgradeAnonymousCredentialHandler","credential","onUpgrade","currentUser","oldUserId","result","linkWithCredential","autoUpgradeAnonymousProviderHandler","provider","getBehavior","autoUpgradeAnonymousUserRedirectHandler","autoAnonymousLoginHandler","auth","signInAnonymously","recaptchaVerificationHandler","element","options","RecaptchaVerifier","signInWithRediectHandler","signInWithRedirect","signInWithPopupHandler","signInWithPopup","linkWithRedirectHandler","_ui","user","linkWithRedirect","linkWithPopupHandler","linkWithPopup","oneTapSignInHandler","script","response","GoogleAuthProvider","signInWithCredential","requireDisplayNameHandler","_","displayName","updateProfile","countryData","formatPhoneNumber","phoneNumber","parsedNumber","parsePhoneNumberWithError","formatIncompletePhoneNumber","cleaned","countryCodesHandler","allowedCountries","country","defaultCountry","callableBehavior","handler","redirectBehavior","initBehavior","autoAnonymousLogin","autoUpgradeAnonymousUsers","recaptchaVerification","providerRedirectStrategy","providerPopupStrategy","oneTapSignIn","requireDisplayName","countryCodes","hasBehavior","defaultBehaviors","handlePendingCredential","pendingCredString","pendingCred","setPendingState","signInWithEmailAndPassword","email","password","EmailAuthProvider","_signInWithCredential","createUserWithEmailAndPassword","_createUserWithEmailAndPassword","verifyPhoneNumber","appVerifier","mfaUser","mfaHint","PhoneAuthProvider","session","confirmPhoneNumber","verificationId","verificationCode","sendPasswordResetEmail","_sendPasswordResetEmail","sendSignInLinkToEmail","actionCodeSettings","_sendSignInLinkToEmail","signInWithEmailLink","link","userCredential","signInWithCustomToken","customToken","_signInWithCustomToken","_signInAnonymously","signInWithProvider","completeEmailLinkSignIn","currentUrl","_isSignInWithEmailLink","generateTotpQrCode","secret","accountName","issuer","uri","qr","QRCode","signInWithMultiFactorAssertion","assertion","enrollWithMultiFactorAssertion","multiFactor","generateTotpSecret","TotpMultiFactorGenerator","$config","map","initializeUI","config","name","behaviors","acc","behavior","deepMap","getAuth","enUs","locale","state","store","initBehaviors","redirectBehaviors","getRedirectResult","createSignInAuthFormSchema","createSignUpAuthFormSchema","displayNameRequiredMessage","createForgotPasswordAuthFormSchema","createEmailLinkAuthFormSchema","createPhoneAuthNumberFormSchema","createPhoneAuthVerifyFormSchema","val","createMultiFactorPhoneAuthNumberFormSchema","createMultiFactorPhoneAuthAssertionFormSchema","createMultiFactorPhoneAuthVerifyFormSchema","createMultiFactorTotpAuthNumberFormSchema","createMultiFactorTotpAuthVerifyFormSchema"],"mappings":"uvBAAA,IAAAA,CAAAA,CAAA,CAEE,QAAW,mBAoEb,CAAA,CC9CO,SAASC,CAAAA,CAAkBC,CAAAA,CAAmBC,CAAAA,CAAiB,CACpEC,eAAAA,CAAgB,iBAAA,CAAmBD,CAAAA,CAASD,CAAS,EACvD,CCWO,SAASG,EACdC,CAAAA,CACAC,CAA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CAAA,MAAA,GAAS,MAAA,CAAQuJ,CAAAA,EAAQA,CAAAA,CAAI,MAAA,GAAW,EAAG,CAC7D,KAAA,CAAOxJ,CAAAA,CAAeC,CAAAA,CAAI,SAAU,yBAAyB,CAC/D,CAAC,CACH,CAAC,CACH,CC7JEL,CAAAA,CAAkB,MAAA,CAAQD,EAAQ,OAAO,CAAA","file":"index.js","sourcesContent":["{\n \"name\": \"@firebase-oss/ui-core\",\n \"version\": \"0.0.2-exp.760e5af\",\n \"description\": \"Core authentication service for Firebase UI\",\n \"type\": \"module\",\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./brands/*\": \"./brands/*\"\n },\n \"files\": [\n \"dist\",\n \"brands\"\n ],\n \"scripts\": {\n \"prepare\": \"pnpm run build\",\n \"emulators:start\": \"firebase emulators:start -P demo-firebaseui\",\n \"build\": \"tsup --env.PROD=true\",\n \"build:local\": \"pnpm run build && pnpm pack\",\n \"dev\": \"tsup --watch\",\n \"lint\": \"eslint . --ext .ts\",\n \"lint:fix\": \"eslint . --ext .ts --fix\",\n \"format\": \"prettier --write \\\"src/**/*.ts\\\" \\\"tests/**/*.ts\\\"\",\n \"format:check\": \"prettier --check \\\"src/**/*.ts\\\" \\\"tests/**/*.ts\\\"\",\n \"clean\": \"rimraf dist\",\n \"test:unit\": \"vitest run src\",\n \"test:unit:watch\": \"vitest tests\",\n \"test:integration\": \"vitest run tests\",\n \"test:integration:watch\": \"vitest integration\",\n \"test\": \"vitest run\",\n \"version:bump\": \"pnpm version patch\",\n \"publish:tags\": \"sh -c 'TAG=\\\"${npm_package_name}@${npm_package_version}\\\"; git tag --list \\\"$TAG\\\" | grep . || git tag \\\"$TAG\\\"; git push origin \\\"$TAG\\\"'\",\n \"publish:npm\": \"../../publish.sh\",\n \"release\": \"pnpm run build && pnpm pack --pack-destination --pack-destination ../../releases/\"\n },\n \"keywords\": [\n \"firebase\",\n \"auth\",\n \"authentication\",\n \"firebaseui\"\n ],\n \"author\": \"TODO\",\n \"license\": \"MIT\",\n \"peerDependencies\": {\n \"firebase\": \"catalog:peerDependencies\"\n },\n \"dependencies\": {\n \"@firebase-oss/ui-translations\": \"workspace:*\",\n \"libphonenumber-js\": \"^1.12.23\",\n \"nanostores\": \"catalog:\",\n \"qrcode-generator\": \"^2.0.4\",\n \"zod\": \"catalog:\"\n },\n \"devDependencies\": {\n \"@types/google-one-tap\": \"^1.2.6\",\n \"@types/jsdom\": \"catalog:\",\n \"firebase\": \"catalog:\",\n \"jsdom\": \"catalog:\",\n \"rimraf\": \"catalog:\",\n \"tsup\": \"catalog:\",\n \"typescript\": \"catalog:\",\n \"vite\": \"catalog:\",\n \"vitest\": \"catalog:\"\n }\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { registerVersion } from \"firebase/app\";\n\n/**\n * Register a framework with the FirebaseUI configuration.\n * @internal\n * @param framework The type of framework being registered.\n * @param version The version of the framework being registered.\n */\nexport function registerFramework(framework: string, version: string) {\n registerVersion(\"firebase-ui-web\", version, framework);\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport {\n getTranslation as _getTranslation,\n type TranslationCategory,\n type TranslationKey,\n} from \"@firebase-oss/ui-translations\";\nimport { type FirebaseUI } from \"./config\";\n\n/**\n * Gets a translated string for a given category and key.\n *\n * Example:\n * ```typescript\n * const translation = getTranslation(ui, \"errors\", \"userNotFound\");\n * ```\n *\n * @param ui - The FirebaseUI instance.\n * @param category - The translation category.\n * @param key - The translation key.\n * @param replacements - Optional replacements for placeholders.\n * @returns The translated string.\n */\nexport function getTranslation<T extends TranslationCategory>(\n ui: FirebaseUI,\n category: T,\n key: TranslationKey<T>,\n replacements?: Record<string, string>\n) {\n return _getTranslation(ui.locale, category, key, replacements);\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { ERROR_CODE_MAP, type ErrorCode } from \"@firebase-oss/ui-translations\";\nimport { FirebaseError } from \"firebase/app\";\nimport { type AuthCredential, getMultiFactorResolver, type MultiFactorError } from \"firebase/auth\";\nimport { type FirebaseUI } from \"./config\";\nimport { getTranslation } from \"./translations\";\n\n/**\n * A custom error class that extends FirebaseError and provides a translated error message based on the configured locale.\n */\nexport class FirebaseUIError extends FirebaseError {\n constructor(ui: FirebaseUI, error: FirebaseError) {\n const message = getTranslation(ui, \"errors\", ERROR_CODE_MAP[error.code as ErrorCode]);\n super(error.code, message || error.message);\n\n // Ensures that `instanceof FirebaseUIError` works, alongside `instanceof FirebaseError`\n Object.setPrototypeOf(this, FirebaseUIError.prototype);\n }\n}\n\n/**\n * Handles a Firebase error and throws a FirebaseUIError if it is a Firebase error.\n *\n * Addtionally, handles the following error codes:\n * - auth/account-exists-with-different-credential - stores the credential in sessionStorage.\n * - auth/multi-factor-auth-required - updates the UI instance with the multi-factor resolver.\n *\n * @param ui - The FirebaseUI instance.\n * @param error - The error to handle.\n * @returns {never} A never type.\n */\nexport function handleFirebaseError(ui: FirebaseUI, error: unknown): never {\n // If it's not a Firebase error, then we just throw it and preserve the original error.\n if (!isFirebaseError(error)) {\n throw error;\n }\n\n // TODO(ehesp): Type error as unknown, check instance of FirebaseError\n // TODO(ehesp): Support via behavior\n if (error.code === \"auth/account-exists-with-different-credential\" && errorContainsCredential(error)) {\n window.sessionStorage.setItem(\"pendingCred\", JSON.stringify(error.credential.toJSON()));\n }\n\n // Update the UI with the multi-factor resolver if the error is thrown.\n if (error.code === \"auth/multi-factor-auth-required\") {\n const resolver = getMultiFactorResolver(ui.auth, error as MultiFactorError);\n ui.setMultiFactorResolver(resolver);\n }\n\n throw new FirebaseUIError(ui, error);\n}\n\n// Utility to obtain whether something is a FirebaseError\nfunction isFirebaseError(error: unknown): error is FirebaseError {\n // Calling instanceof FirebaseError is not working - not sure why yet.\n return !!error && typeof error === \"object\" && \"code\" in error && \"message\" in error;\n}\n\n// Utility to obtain whether something is a FirebaseError that contains a credential - doesn't seemed to be typed?\nfunction errorContainsCredential(error: FirebaseError): error is FirebaseError & { credential: AuthCredential } {\n return \"credential\" in error;\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { type AuthCredential, type AuthProvider, linkWithCredential, type UserCredential } from \"firebase/auth\";\nimport { type FirebaseUI } from \"~/config\";\nimport { getBehavior } from \"~/behaviors\";\n\nexport type OnUpgradeCallback = (ui: FirebaseUI, oldUserId: string, credential: UserCredential) => Promise<void> | void;\n\nexport const autoUpgradeAnonymousCredentialHandler = async (\n ui: FirebaseUI,\n credential: AuthCredential,\n onUpgrade?: OnUpgradeCallback\n) => {\n const currentUser = ui.auth.currentUser;\n\n if (!currentUser?.isAnonymous) {\n return;\n }\n\n const oldUserId = currentUser.uid;\n\n const result = await linkWithCredential(currentUser, credential);\n\n if (onUpgrade) {\n await onUpgrade(ui, oldUserId, result);\n }\n\n return result;\n};\n\nexport const autoUpgradeAnonymousProviderHandler = async (\n ui: FirebaseUI,\n provider: AuthProvider,\n onUpgrade?: OnUpgradeCallback\n) => {\n const currentUser = ui.auth.currentUser;\n\n if (!currentUser?.isAnonymous) {\n return;\n }\n\n const oldUserId = currentUser.uid;\n\n window.localStorage.setItem(\"fbui:upgrade:oldUserId\", oldUserId);\n\n const result = await getBehavior(ui, \"providerLinkStrategy\")(ui, currentUser, provider);\n\n // If we got here, the user has been linked via a popup, so we need to call the onUpgrade callback\n // and delete the oldUserId from localStorage.\n // If we didn't get here, they'll be redirected and we'll handle the result inside of the autoUpgradeAnonymousUserRedirectHandler.\n\n window.localStorage.removeItem(\"fbui:upgrade:oldUserId\");\n\n if (onUpgrade) {\n await onUpgrade(ui, oldUserId, result);\n }\n\n return result;\n};\n\nexport const autoUpgradeAnonymousUserRedirectHandler = async (\n ui: FirebaseUI,\n credential: UserCredential | null,\n onUpgrade?: OnUpgradeCallback\n) => {\n const oldUserId = window.localStorage.getItem(\"fbui:upgrade:oldUserId\");\n\n // Always clean up localStorage once we've retrieved the oldUserId\n if (oldUserId) {\n window.localStorage.removeItem(\"fbui:upgrade:oldUserId\");\n }\n\n if (!onUpgrade || !oldUserId || !credential) {\n return;\n }\n\n await onUpgrade(ui, oldUserId, credential);\n};\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { signInAnonymously } from \"firebase/auth\";\nimport { type InitHandler } from \"./utils\";\n\nexport const autoAnonymousLoginHandler: InitHandler = async (ui) => {\n const auth = ui.auth;\n\n if (!auth.currentUser) {\n await signInAnonymously(auth);\n }\n};\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { RecaptchaVerifier } from \"firebase/auth\";\nimport { type FirebaseUI } from \"~/config\";\n\nexport type RecaptchaVerificationOptions = {\n size?: \"normal\" | \"invisible\" | \"compact\";\n theme?: \"light\" | \"dark\";\n tabindex?: number;\n};\n\nexport const recaptchaVerificationHandler = (\n ui: FirebaseUI,\n element: HTMLElement,\n options?: RecaptchaVerificationOptions\n) => {\n return new RecaptchaVerifier(ui.auth, element, {\n size: options?.size ?? \"invisible\",\n theme: options?.theme ?? \"light\",\n tabindex: options?.tabindex ?? 0,\n });\n};\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport {\n type AuthProvider,\n linkWithPopup,\n linkWithRedirect,\n signInWithPopup,\n signInWithRedirect,\n type User,\n type UserCredential,\n} from \"firebase/auth\";\nimport { type FirebaseUI } from \"~/config\";\n\nexport type ProviderSignInStrategyHandler = (ui: FirebaseUI, provider: AuthProvider) => Promise<never | UserCredential>;\nexport type ProviderLinkStrategyHandler = (\n ui: FirebaseUI,\n user: User,\n provider: AuthProvider\n) => Promise<never | UserCredential>;\n\nexport const signInWithRediectHandler: ProviderSignInStrategyHandler = async (ui, provider) => {\n return signInWithRedirect(ui.auth, provider);\n};\n\nexport const signInWithPopupHandler: ProviderSignInStrategyHandler = async (ui, provider) => {\n return signInWithPopup(ui.auth, provider);\n};\n\nexport const linkWithRedirectHandler: ProviderLinkStrategyHandler = async (_ui, user, provider) => {\n return linkWithRedirect(user, provider);\n};\n\nexport const linkWithPopupHandler: ProviderLinkStrategyHandler = async (_ui, user, provider) => {\n return linkWithPopup(user, provider);\n};\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { GoogleAuthProvider } from \"firebase/auth\";\nimport type { IdConfiguration } from \"google-one-tap\";\nimport type { FirebaseUI } from \"~/config\";\nimport { signInWithCredential } from \"~/auth\";\n\nexport type OneTapSignInOptions = {\n clientId: IdConfiguration[\"client_id\"];\n autoSelect?: IdConfiguration[\"auto_select\"];\n cancelOnTapOutside?: IdConfiguration[\"cancel_on_tap_outside\"];\n context?: IdConfiguration[\"context\"];\n uxMode?: IdConfiguration[\"ux_mode\"];\n logLevel?: IdConfiguration[\"log_level\"];\n};\n\nexport const oneTapSignInHandler = async (ui: FirebaseUI, options: OneTapSignInOptions) => {\n // Only show one-tap if user is not signed in OR if they are anonymous.\n // Don't show if user is already signed in with a real account.\n if (ui.auth.currentUser && !ui.auth.currentUser.isAnonymous) {\n return;\n }\n\n // Prevent multiple instances of the script from being loaded, e.g. hot reload.\n if (document.querySelector(\"script[data-one-tap-sign-in]\")) {\n return;\n }\n\n const script = document.createElement(\"script\");\n script.setAttribute(\"data-one-tap-sign-in\", \"true\");\n script.src = \"https://accounts.google.com/gsi/client\";\n script.async = true;\n\n script.onload = () => {\n window.google.accounts.id.initialize({\n client_id: options.clientId,\n auto_select: options.autoSelect,\n cancel_on_tap_outside: options.cancelOnTapOutside,\n context: options.context,\n ux_mode: options.uxMode,\n log_level: options.logLevel,\n callback: async (response) => {\n const credential = GoogleAuthProvider.credential(response.credential);\n await signInWithCredential(ui, credential);\n },\n });\n\n window.google.accounts.id.prompt();\n };\n\n document.body.appendChild(script);\n};\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { updateProfile, type User } from \"firebase/auth\";\nimport { type FirebaseUI } from \"~/config\";\n\nexport const requireDisplayNameHandler = async (_: FirebaseUI, user: User, displayName: string) => {\n await updateProfile(user, { displayName });\n};\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { formatIncompletePhoneNumber, parsePhoneNumberWithError, type CountryCode } from \"libphonenumber-js\";\n\n/**\n * An array of country data objects containing name, dial code, country code, and emoji for all supported countries.\n */\nexport const countryData = [\n { name: \"Afghanistan\", dialCode: \"+93\", code: \"AF\", emoji: \"๐ฆ๐ซ\" },\n { name: \"Albania\", dialCode: \"+355\", code: \"AL\", emoji: \"๐ฆ๐ฑ\" },\n { name: \"Algeria\", dialCode: \"+213\", code: \"DZ\", emoji: \"๐ฉ๐ฟ\" },\n { name: \"American Samoa\", dialCode: \"+1\", code: \"AS\", emoji: \"๐ฆ๐ธ\" },\n { name: \"Andorra\", dialCode: \"+376\", code: \"AD\", emoji: \"๐ฆ๐ฉ\" },\n { name: \"Angola\", dialCode: \"+244\", code: \"AO\", emoji: \"๐ฆ๐ด\" },\n { name: \"Anguilla\", dialCode: \"+1\", code: \"AI\", emoji: \"๐ฆ๐ฎ\" },\n { name: \"Antigua and Barbuda\", dialCode: \"+1\", code: \"AG\", emoji: \"๐ฆ๐ฌ\" },\n { name: \"Argentina\", dialCode: \"+54\", code: \"AR\", emoji: \"๐ฆ๐ท\" },\n { name: \"Armenia\", dialCode: \"+374\", code: \"AM\", emoji: \"๐ฆ๐ฒ\" },\n { name: \"Aruba\", dialCode: \"+297\", code: \"AW\", emoji: \"๐ฆ๐ผ\" },\n { name: \"Ascension Island\", dialCode: \"+247\", code: \"AC\", emoji: \"๐ฆ๐จ\" },\n { name: \"Australia\", dialCode: \"+61\", code: \"AU\", emoji: \"๐ฆ๐บ\" },\n { name: \"Austria\", dialCode: \"+43\", code: \"AT\", emoji: \"๐ฆ๐น\" },\n { name: \"Azerbaijan\", dialCode: \"+994\", code: \"AZ\", emoji: \"๐ฆ๐ฟ\" },\n { name: \"Bahamas\", dialCode: \"+1\", code: \"BS\", emoji: \"๐ง๐ธ\" },\n { name: \"Bahrain\", dialCode: \"+973\", code: \"BH\", emoji: \"๐ง๐ญ\" },\n { name: \"Bangladesh\", dialCode: \"+880\", code: \"BD\", emoji: \"๐ง๐ฉ\" },\n { name: \"Barbados\", dialCode: \"+1\", code: \"BB\", emoji: \"๐ง๐ง\" },\n { name: \"Belarus\", dialCode: \"+375\", code: \"BY\", emoji: \"๐ง๐พ\" },\n { name: \"Belgium\", dialCode: \"+32\", code: \"BE\", emoji: \"๐ง๐ช\" },\n { name: \"Belize\", dialCode: \"+501\", code: \"BZ\", emoji: \"๐ง๐ฟ\" },\n { name: \"Benin\", dialCode: \"+229\", code: \"BJ\", emoji: \"๐ง๐ฏ\" },\n { name: \"Bermuda\", dialCode: \"+1\", code: \"BM\", emoji: \"๐ง๐ฒ\" },\n { name: \"Bhutan\", dialCode: \"+975\", code: \"BT\", emoji: \"๐ง๐น\" },\n { name: \"Bolivia\", dialCode: \"+591\", code: \"BO\", emoji: \"๐ง๐ด\" },\n { name: \"Bosnia and Herzegovina\", dialCode: \"+387\", code: \"BA\", emoji: \"๐ง๐ฆ\" },\n { name: \"Botswana\", dialCode: \"+267\", code: \"BW\", emoji: \"๐ง๐ผ\" },\n { name: \"Brazil\", dialCode: \"+55\", code: \"BR\", emoji: \"๐ง๐ท\" },\n { name: \"British Indian Ocean Territory\", dialCode: \"+246\", code: \"IO\", emoji: \"๐ฎ๐ด\" },\n { name: \"British Virgin Islands\", dialCode: \"+1\", code: \"VG\", emoji: \"๐ป๐ฌ\" },\n { name: \"Brunei\", dialCode: \"+673\", code: \"BN\", emoji: \"๐ง๐ณ\" },\n { name: \"Bulgaria\", dialCode: \"+359\", code: \"BG\", emoji: \"๐ง๐ฌ\" },\n { name: \"Burkina Faso\", dialCode: \"+226\", code: \"BF\", emoji: \"๐ง๐ซ\" },\n { name: \"Burundi\", dialCode: \"+257\", code: \"BI\", emoji: \"๐ง๐ฎ\" },\n { name: \"Cambodia\", dialCode: \"+855\", code: \"KH\", emoji: \"๐ฐ๐ญ\" },\n { name: \"Cameroon\", dialCode: \"+237\", code: \"CM\", emoji: \"๐จ๐ฒ\" },\n { name: \"Canada\", dialCode: \"+1\", code: \"CA\", emoji: \"๐จ๐ฆ\" },\n { name: \"Cape Verde\", dialCode: \"+238\", code: \"CV\", emoji: \"๐จ๐ป\" },\n { name: \"Caribbean Netherlands\", dialCode: \"+599\", code: \"BQ\", emoji: \"๐ง๐ถ\" },\n { name: \"Cayman Islands\", dialCode: \"+1\", code: \"KY\", emoji: \"๐ฐ๐พ\" },\n { name: \"Central African Republic\", dialCode: \"+236\", code: \"CF\", emoji: \"๐จ๐ซ\" },\n { name: \"Chad\", dialCode: \"+235\", code: \"TD\", emoji: \"๐น๐ฉ\" },\n { name: \"Chile\", dialCode: \"+56\", code: \"CL\", emoji: \"๐จ๐ฑ\" },\n { name: \"China\", dialCode: \"+86\", code: \"CN\", emoji: \"๐จ๐ณ\" },\n { name: \"Christmas Island\", dialCode: \"+61\", code: \"CX\", emoji: \"๐จ๐ฝ\" },\n { name: \"Cocos [Keeling] Islands\", dialCode: \"+61\", code: \"CC\", emoji: \"๐จ๐จ\" },\n { name: \"Colombia\", dialCode: \"+57\", code: \"CO\", emoji: \"๐จ๐ด\" },\n { name: \"Comoros\", dialCode: \"+269\", code: \"KM\", emoji: \"๐ฐ๐ฒ\" },\n { name: \"Democratic Republic Congo\", dialCode: \"+243\", code: \"CD\", emoji: \"๐จ๐ฉ\" },\n { name: \"Republic of Congo\", dialCode: \"+242\", code: \"CG\", emoji: \"๐จ๐ฌ\" },\n { name: \"Cook Islands\", dialCode: \"+682\", code: \"CK\", emoji: \"๐จ๐ฐ\" },\n { name: \"Costa Rica\", dialCode: \"+506\", code: \"CR\", emoji: \"๐จ๐ท\" },\n { name: \"Cรดte d'Ivoire\", dialCode: \"+225\", code: \"CI\", emoji: \"๐จ๐ฎ\" },\n { name: \"Croatia\", dialCode: \"+385\", code: \"HR\", emoji: \"๐ญ๐ท\" },\n { name: \"Cuba\", dialCode: \"+53\", code: \"CU\", emoji: \"๐จ๐บ\" },\n { name: \"Curaรงao\", dialCode: \"+599\", code: \"CW\", emoji: \"๐จ๐ผ\" },\n { name: \"Cyprus\", dialCode: \"+357\", code: \"CY\", emoji: \"๐จ๐พ\" },\n { name: \"Czech Republic\", dialCode: \"+420\", code: \"CZ\", emoji: \"๐จ๐ฟ\" },\n { name: \"Denmark\", dialCode: \"+45\", code: \"DK\", emoji: \"๐ฉ๐ฐ\" },\n { name: \"Djibouti\", dialCode: \"+253\", code: \"DJ\", emoji: \"๐ฉ๐ฏ\" },\n { name: \"Dominica\", dialCode: \"+1\", code: \"DM\", emoji: \"๐ฉ๐ฒ\" },\n { name: \"Dominican Republic\", dialCode: \"+1\", code: \"DO\", emoji: \"๐ฉ๐ด\" },\n { name: \"East Timor\", dialCode: \"+670\", code: \"TL\", emoji: \"๐น๐ฑ\" },\n { name: \"Ecuador\", dialCode: \"+593\", code: \"EC\", emoji: \"๐ช๐จ\" },\n { name: \"Egypt\", dialCode: \"+20\", code: \"EG\", emoji: \"๐ช๐ฌ\" },\n { name: \"El Salvador\", dialCode: \"+503\", code: \"SV\", emoji: \"๐ธ๐ป\" },\n { name: \"Equatorial Guinea\", dialCode: \"+240\", code: \"GQ\", emoji: \"๐ฌ๐ถ\" },\n { name: \"Eritrea\", dialCode: \"+291\", code: \"ER\", emoji: \"๐ช๐ท\" },\n { name: \"Estonia\", dialCode: \"+372\", code: \"EE\", emoji: \"๐ช๐ช\" },\n { name: \"Ethiopia\", dialCode: \"+251\", code: \"ET\", emoji: \"๐ช๐น\" },\n { name: \"Falkland Islands [Islas Malvinas]\", dialCode: \"+500\", code: \"FK\", emoji: \"๐ซ๐ฐ\" },\n { name: \"Faroe Islands\", dialCode: \"+298\", code: \"FO\", emoji: \"๐ซ๐ด\" },\n { name: \"Fiji\", dialCode: \"+679\", code: \"FJ\", emoji: \"๐ซ๐ฏ\" },\n { name: \"Finland\", dialCode: \"+358\", code: \"FI\", emoji: \"๐ซ๐ฎ\" },\n { name: \"France\", dialCode: \"+33\", code: \"FR\", emoji: \"๐ซ๐ท\" },\n { name: \"French Guiana\", dialCode: \"+594\", code: \"GF\", emoji: \"๐ฌ๐ซ\" },\n { name: \"French Polynesia\", dialCode: \"+689\", code: \"PF\", emoji: \"๐ต๐ซ\" },\n { name: \"Gabon\", dialCode: \"+241\", code: \"GA\", emoji: \"๐ฌ๐ฆ\" },\n { name: \"Gambia\", dialCode: \"+220\", code: \"GM\", emoji: \"๐ฌ๐ฒ\" },\n { name: \"Georgia\", dialCode: \"+995\", code: \"GE\", emoji: \"๐ฌ๐ช\" },\n { name: \"Germany\", dialCode: \"+49\", code: \"DE\", emoji: \"๐ฉ๐ช\" },\n { name: \"Ghana\", dialCode: \"+233\", code: \"GH\", emoji: \"๐ฌ๐ญ\" },\n { name: \"Gibraltar\", dialCode: \"+350\", code: \"GI\", emoji: \"๐ฌ๐ฎ\" },\n { name: \"Greece\", dialCode: \"+30\", code: \"GR\", emoji: \"๐ฌ๐ท\" },\n { name: \"Greenland\", dialCode: \"+299\", code: \"GL\", emoji: \"๐ฌ๐ฑ\" },\n { name: \"Grenada\", dialCode: \"+1\", code: \"GD\", emoji: \"๐ฌ๐ฉ\" },\n { name: \"Guadeloupe\", dialCode: \"+590\", code: \"GP\", emoji: \"๐ฌ๐ต\" },\n { name: \"Guam\", dialCode: \"+1\", code: \"GU\", emoji: \"๐ฌ๐บ\" },\n { name: \"Guatemala\", dialCode: \"+502\", code: \"GT\", emoji: \"๐ฌ๐น\" },\n { name: \"Guernsey\", dialCode: \"+44\", code: \"GG\", emoji: \"๐ฌ๐ฌ\" },\n { name: \"Guinea Conakry\", dialCode: \"+224\", code: \"GN\", emoji: \"๐ฌ๐ณ\" },\n { name: \"Guinea-Bissau\", dialCode: \"+245\", code: \"GW\", emoji: \"๐ฌ๐ผ\" },\n { name: \"Guyana\", dialCode: \"+592\", code: \"GY\", emoji: \"๐ฌ๐พ\" },\n { name: \"Haiti\", dialCode: \"+509\", code: \"HT\", emoji: \"๐ญ๐น\" },\n { name: \"Honduras\", dialCode: \"+504\", code: \"HN\", emoji: \"๐ญ๐ณ\" },\n { name: \"Hong Kong\", dialCode: \"+852\", code: \"HK\", emoji: \"๐ญ๐ฐ\" },\n { name: \"Hungary\", dialCode: \"+36\", code: \"HU\", emoji: \"๐ญ๐บ\" },\n { name: \"Iceland\", dialCode: \"+354\", code: \"IS\", emoji: \"๐ฎ๐ธ\" },\n { name: \"India\", dialCode: \"+91\", code: \"IN\", emoji: \"๐ฎ๐ณ\" },\n { name: \"Indonesia\", dialCode: \"+62\", code: \"ID\", emoji: \"๐ฎ๐ฉ\" },\n { name: \"Iran\", dialCode: \"+98\", code: \"IR\", emoji: \"๐ฎ๐ท\" },\n { name: \"Iraq\", dialCode: \"+964\", code: \"IQ\", emoji: \"๐ฎ๐ถ\" },\n { name: \"Ireland\", dialCode: \"+353\", code: \"IE\", emoji: \"๐ฎ๐ช\" },\n { name: \"Isle of Man\", dialCode: \"+44\", code: \"IM\", emoji: \"๐ฎ๐ฒ\" },\n { name: \"Israel\", dialCode: \"+972\", code: \"IL\", emoji: \"๐ฎ๐ฑ\" },\n { name: \"Italy\", dialCode: \"+39\", code: \"IT\", emoji: \"๐ฎ๐น\" },\n { name: \"Jamaica\", dialCode: \"+1\", code: \"JM\", emoji: \"๐ฏ๐ฒ\" },\n { name: \"Japan\", dialCode: \"+81\", code: \"JP\", emoji: \"๐ฏ๐ต\" },\n { name: \"Jersey\", dialCode: \"+44\", code: \"JE\", emoji: \"๐ฏ๐ช\" },\n { name: \"Jordan\", dialCode: \"+962\", code: \"JO\", emoji: \"๐ฏ๐ด\" },\n { name: \"Kazakhstan\", dialCode: \"+7\", code: \"KZ\", emoji: \"๐ฐ๐ฟ\" },\n { name: \"Kenya\", dialCode: \"+254\", code: \"KE\", emoji: \"๐ฐ๐ช\" },\n { name: \"Kiribati\", dialCode: \"+686\", code: \"KI\", emoji: \"๐ฐ๐ฎ\" },\n { name: \"Kosovo\", dialCode: \"+377\", code: \"XK\", emoji: \"๐ฝ๐ฐ\" },\n { name: \"Kosovo\", dialCode: \"+381\", code: \"XK\", emoji: \"๐ฝ๐ฐ\" },\n { name: \"Kosovo\", dialCode: \"+386\", code: \"XK\", emoji: \"๐ฝ๐ฐ\" },\n { name: \"Kuwait\", dialCode: \"+965\", code: \"KW\", emoji: \"๐ฐ๐ผ\" },\n { name: \"Kyrgyzstan\", dialCode: \"+996\", code: \"KG\", emoji: \"๐ฐ๐ฌ\" },\n { name: \"Laos\", dialCode: \"+856\", code: \"LA\", emoji: \"๐ฑ๐ฆ\" },\n { name: \"Latvia\", dialCode: \"+371\", code: \"LV\", emoji: \"๐ฑ๐ป\" },\n { name: \"Lebanon\", dialCode: \"+961\", code: \"LB\", emoji: \"๐ฑ๐ง\" },\n { name: \"Lesotho\", dialCode: \"+266\", code: \"LS\", emoji: \"๐ฑ๐ธ\" },\n { name: \"Liberia\", dialCode: \"+231\", code: \"LR\", emoji: \"๐ฑ๐ท\" },\n { name: \"Libya\", dialCode: \"+218\", code: \"LY\", emoji: \"๐ฑ๐พ\" },\n { name: \"Liechtenstein\", dialCode: \"+423\", code: \"LI\", emoji: \"๐ฑ๐ฎ\" },\n { name: \"Lithuania\", dialCode: \"+370\", code: \"LT\", emoji: \"๐ฑ๐น\" },\n { name: \"Luxembourg\", dialCode: \"+352\", code: \"LU\", emoji: \"๐ฑ๐บ\" },\n { name: \"Macau\", dialCode: \"+853\", code: \"MO\", emoji: \"๐ฒ๐ด\" },\n { name: \"Macedonia\", dialCode: \"+389\", code: \"MK\", emoji: \"๐ฒ๐ฐ\" },\n { name: \"Madagascar\", dialCode: \"+261\", code: \"MG\", emoji: \"๐ฒ๐ฌ\" },\n { name: \"Malawi\", dialCode: \"+265\", code: \"MW\", emoji: \"๐ฒ๐ผ\" },\n { name: \"Malaysia\", dialCode: \"+60\", code: \"MY\", emoji: \"๐ฒ๐พ\" },\n { name: \"Maldives\", dialCode: \"+960\", code: \"MV\", emoji: \"๐ฒ๐ป\" },\n { name: \"Mali\", dialCode: \"+223\", code: \"ML\", emoji: \"๐ฒ๐ฑ\" },\n { name: \"Malta\", dialCode: \"+356\", code: \"MT\", emoji: \"๐ฒ๐น\" },\n { name: \"Marshall Islands\", dialCode: \"+692\", code: \"MH\", emoji: \"๐ฒ๐ญ\" },\n { name: \"Martinique\", dialCode: \"+596\", code: \"MQ\", emoji: \"๐ฒ๐ถ\" },\n { name: \"Mauritania\", dialCode: \"+222\", code: \"MR\", emoji: \"๐ฒ๐ท\" },\n { name: \"Mauritius\", dialCode: \"+230\", code: \"MU\", emoji: \"๐ฒ๐บ\" },\n { name: \"Mayotte\", dialCode: \"+262\", code: \"YT\", emoji: \"๐พ๐น\" },\n { name: \"Mexico\", dialCode: \"+52\", code: \"MX\", emoji: \"๐ฒ๐ฝ\" },\n { name: \"Micronesia\", dialCode: \"+691\", code: \"FM\", emoji: \"๐ซ๐ฒ\" },\n { name: \"Moldova\", dialCode: \"+373\", code: \"MD\", emoji: \"๐ฒ๐ฉ\" },\n { name: \"Monaco\", dialCode: \"+377\", code: \"MC\", emoji: \"๐ฒ๐จ\" },\n { name: \"Mongolia\", dialCode: \"+976\", code: \"MN\", emoji: \"๐ฒ๐ณ\" },\n { name: \"Montenegro\", dialCode: \"+382\", code: \"ME\", emoji: \"๐ฒ๐ช\" },\n { name: \"Montserrat\", dialCode: \"+1\", code: \"MS\", emoji: \"๐ฒ๐ธ\" },\n { name: \"Morocco\", dialCode: \"+212\", code: \"MA\", emoji: \"๐ฒ๐ฆ\" },\n { name: \"Mozambique\", dialCode: \"+258\", code: \"MZ\", emoji: \"๐ฒ๐ฟ\" },\n { name: \"Myanmar [Burma]\", dialCode: \"+95\", code: \"MM\", emoji: \"๐ฒ๐ฒ\" },\n { name: \"Namibia\", dialCode: \"+264\", code: \"NA\", emoji: \"๐ณ๐ฆ\" },\n { name: \"Nauru\", dialCode: \"+674\", code: \"NR\", emoji: \"๐ณ๐ท\" },\n { name: \"Nepal\", dialCode: \"+977\", code: \"NP\", emoji: \"๐ณ๐ต\" },\n { name: \"Netherlands\", dialCode: \"+31\", code: \"NL\", emoji: \"๐ณ๐ฑ\" },\n { name: \"New Caledonia\", dialCode: \"+687\", code: \"NC\", emoji: \"๐ณ๐จ\" },\n { name: \"New Zealand\", dialCode: \"+64\", code: \"NZ\", emoji: \"๐ณ๐ฟ\" },\n { name: \"Nicaragua\", dialCode: \"+505\", code: \"NI\", emoji: \"๐ณ๐ฎ\" },\n { name: \"Niger\", dialCode: \"+227\", code: \"NE\", emoji: \"๐ณ๐ช\" },\n { name: \"Nigeria\", dialCode: \"+234\", code: \"NG\", emoji: \"๐ณ๐ฌ\" },\n { name: \"Niue\", dialCode: \"+683\", code: \"NU\", emoji: \"๐ณ๐บ\" },\n { name: \"Norfolk Island\", dialCode: \"+672\", code: \"NF\", emoji: \"๐ณ๐ซ\" },\n { name: \"North Korea\", dialCode: \"+850\", code: \"KP\", emoji: \"๐ฐ๐ต\" },\n { name: \"Northern Mariana Islands\", dialCode: \"+1\", code: \"MP\", emoji: \"๐ฒ๐ต\" },\n { name: \"Norway\", dialCode: \"+47\", code: \"NO\", emoji: \"๐ณ๐ด\" },\n { name: \"Oman\", dialCode: \"+968\", code: \"OM\", emoji: \"๐ด๐ฒ\" },\n { name: \"Pakistan\", dialCode: \"+92\", code: \"PK\", emoji: \"๐ต๐ฐ\" },\n { name: \"Palau\", dialCode: \"+680\", code: \"PW\", emoji: \"๐ต๐ผ\" },\n { name: \"Palestinian Territories\", dialCode: \"+970\", code: \"PS\", emoji: \"๐ต๐ธ\" },\n { name: \"Panama\", dialCode: \"+507\", code: \"PA\", emoji: \"๐ต๐ฆ\" },\n { name: \"Papua New Guinea\", dialCode: \"+675\", code: \"PG\", emoji: \"๐ต๐ฌ\" },\n { name: \"Paraguay\", dialCode: \"+595\", code: \"PY\", emoji: \"๐ต๐พ\" },\n { name: \"Peru\", dialCode: \"+51\", code: \"PE\", emoji: \"๐ต๐ช\" },\n { name: \"Philippines\", dialCode: \"+63\", code: \"PH\", emoji: \"๐ต๐ญ\" },\n { name: \"Poland\", dialCode: \"+48\", code: \"PL\", emoji: \"๐ต๐ฑ\" },\n { name: \"Portugal\", dialCode: \"+351\", code: \"PT\", emoji: \"๐ต๐น\" },\n { name: \"Puerto Rico\", dialCode: \"+1\", code: \"PR\", emoji: \"๐ต๐ท\" },\n { name: \"Qatar\", dialCode: \"+974\", code: \"QA\", emoji: \"๐ถ๐ฆ\" },\n { name: \"Rรฉunion\", dialCode: \"+262\", code: \"RE\", emoji: \"๐ท๐ช\" },\n { name: \"Romania\", dialCode: \"+40\", code: \"RO\", emoji: \"๐ท๐ด\" },\n { name: \"Russia\", dialCode: \"+7\", code: \"RU\", emoji: \"๐ท๐บ\" },\n { name: \"Rwanda\", dialCode: \"+250\", code: \"RW\", emoji: \"๐ท๐ผ\" },\n { name: \"Saint Barthรฉlemy\", dialCode: \"+590\", code: \"BL\", emoji: \"๐ง๐ฑ\" },\n { name: \"Saint Helena\", dialCode: \"+290\", code: \"SH\", emoji: \"๐ธ๐ญ\" },\n { name: \"St. Kitts\", dialCode: \"+1\", code: \"KN\", emoji: \"๐ฐ๐ณ\" },\n { name: \"St. Lucia\", dialCode: \"+1\", code: \"LC\", emoji: \"๐ฑ๐จ\" },\n { name: \"Saint Martin\", dialCode: \"+590\", code: \"MF\", emoji: \"๐ฒ๐ซ\" },\n { name: \"Saint Pierre and Miquelon\", dialCode: \"+508\", code: \"PM\", emoji: \"๐ต๐ฒ\" },\n { name: \"St. Vincent\", dialCode: \"+1\", code: \"VC\", emoji: \"๐ป๐จ\" },\n { name: \"Samoa\", dialCode: \"+685\", code: \"WS\", emoji: \"๐ผ๐ธ\" },\n { name: \"San Marino\", dialCode: \"+378\", code: \"SM\", emoji: \"๐ธ๐ฒ\" },\n { name: \"Sรฃo Tomรฉ and Prรญncipe\", dialCode: \"+239\", code: \"ST\", emoji: \"๐ธ๐น\" },\n { name: \"Saudi Arabia\", dialCode: \"+966\", code: \"SA\", emoji: \"๐ธ๐ฆ\" },\n { name: \"Senegal\", dialCode: \"+221\", code: \"SN\", emoji: \"๐ธ๐ณ\" },\n { name: \"Serbia\", dialCode: \"+381\", code: \"RS\", emoji: \"๐ท๐ธ\" },\n { name: \"Seychelles\", dialCode: \"+248\", code: \"SC\", emoji: \"๐ธ๐จ\" },\n { name: \"Sierra Leone\", dialCode: \"+232\", code: \"SL\", emoji: \"๐ธ๐ฑ\" },\n { name: \"Singapore\", dialCode: \"+65\", code: \"SG\", emoji: \"๐ธ๐ฌ\" },\n { name: \"Sint Maarten\", dialCode: \"+1\", code: \"SX\", emoji: \"๐ธ๐ฝ\" },\n { name: \"Slovakia\", dialCode: \"+421\", code: \"SK\", emoji: \"๐ธ๐ฐ\" },\n { name: \"Slovenia\", dialCode: \"+386\", code: \"SI\", emoji: \"๐ธ๐ฎ\" },\n { name: \"Solomon Islands\", dialCode: \"+677\", code: \"SB\", emoji: \"๐ธ๐ง\" },\n { name: \"Somalia\", dialCode: \"+252\", code: \"SO\", emoji: \"๐ธ๐ด\" },\n { name: \"South Africa\", dialCode: \"+27\", code: \"ZA\", emoji: \"๐ฟ๐ฆ\" },\n { name: \"South Korea\", dialCode: \"+82\", code: \"KR\", emoji: \"๐ฐ๐ท\" },\n { name: \"South Sudan\", dialCode: \"+211\", code: \"SS\", emoji: \"๐ธ๐ธ\" },\n { name: \"Spain\", dialCode: \"+34\", code: \"ES\", emoji: \"๐ช๐ธ\" },\n { name: \"Sri Lanka\", dialCode: \"+94\", code: \"LK\", emoji: \"๐ฑ๐ฐ\" },\n { name: \"Sudan\", dialCode: \"+249\", code: \"SD\", emoji: \"๐ธ๐ฉ\" },\n { name: \"Suriname\", dialCode: \"+597\", code: \"SR\", emoji: \"๐ธ๐ท\" },\n { name: \"Svalbard and Jan Mayen\", dialCode: \"+47\", code: \"SJ\", emoji: \"๐ธ๐ฏ\" },\n { name: \"Swaziland\", dialCode: \"+268\", code: \"SZ\", emoji: \"๐ธ๐ฟ\" },\n { name: \"Sweden\", dialCode: \"+46\", code: \"SE\", emoji: \"๐ธ๐ช\" },\n { name: \"Switzerland\", dialCode: \"+41\", code: \"CH\", emoji: \"๐จ๐ญ\" },\n { name: \"Syria\", dialCode: \"+963\", code: \"SY\", emoji: \"๐ธ๐พ\" },\n { name: \"Taiwan\", dialCode: \"+886\", code: \"TW\", emoji: \"๐น๐ผ\" },\n { name: \"Tajikistan\", dialCode: \"+992\", code: \"TJ\", emoji: \"๐น๐ฏ\" },\n { name: \"Tanzania\", dialCode: \"+255\", code: \"TZ\", emoji: \"๐น๐ฟ\" },\n { name: \"Thailand\", dialCode: \"+66\", code: \"TH\", emoji: \"๐น๐ญ\" },\n { name: \"Togo\", dialCode: \"+228\", code: \"TG\", emoji: \"๐น๐ฌ\" },\n { name: \"Tokelau\", dialCode: \"+690\", code: \"TK\", emoji: \"๐น๐ฐ\" },\n { name: \"Tonga\", dialCode: \"+676\", code: \"TO\", emoji: \"๐น๐ด\" },\n { name: \"Trinidad/Tobago\", dialCode: \"+1\", code: \"TT\", emoji: \"๐น๐น\" },\n { name: \"Tunisia\", dialCode: \"+216\", code: \"TN\", emoji: \"๐น๐ณ\" },\n { name: \"Turkey\", dialCode: \"+90\", code: \"TR\", emoji: \"๐น๐ท\" },\n { name: \"Turkmenistan\", dialCode: \"+993\", code: \"TM\", emoji: \"๐น๐ฒ\" },\n { name: \"Turks and Caicos Islands\", dialCode: \"+1\", code: \"TC\", emoji: \"๐น๐จ\" },\n { name: \"Tuvalu\", dialCode: \"+688\", code: \"TV\", emoji: \"๐น๐ป\" },\n { name: \"U.S. Virgin Islands\", dialCode: \"+1\", code: \"VI\", emoji: \"๐ป๐ฎ\" },\n { name: \"Uganda\", dialCode: \"+256\", code: \"UG\", emoji: \"๐บ๐ฌ\" },\n { name: \"Ukraine\", dialCode: \"+380\", code: \"UA\", emoji: \"๐บ๐ฆ\" },\n { name: \"United Arab Emirates\", dialCode: \"+971\", code: \"AE\", emoji: \"๐ฆ๐ช\" },\n { name: \"United Kingdom\", dialCode: \"+44\", code: \"GB\", emoji: \"๐ฌ๐ง\" },\n { name: \"United States\", dialCode: \"+1\", code: \"US\", emoji: \"๐บ๐ธ\" },\n { name: \"Uruguay\", dialCode: \"+598\", code: \"UY\", emoji: \"๐บ๐พ\" },\n { name: \"Uzbekistan\", dialCode: \"+998\", code: \"UZ\", emoji: \"๐บ๐ฟ\" },\n { name: \"Vanuatu\", dialCode: \"+678\", code: \"VU\", emoji: \"๐ป๐บ\" },\n { name: \"Vatican City\", dialCode: \"+379\", code: \"VA\", emoji: \"๐ป๐ฆ\" },\n { name: \"Venezuela\", dialCode: \"+58\", code: \"VE\", emoji: \"๐ป๐ช\" },\n { name: \"Vietnam\", dialCode: \"+84\", code: \"VN\", emoji: \"๐ป๐ณ\" },\n { name: \"Wallis and Futuna\", dialCode: \"+681\", code: \"WF\", emoji: \"๐ผ๐ซ\" },\n { name: \"Western Sahara\", dialCode: \"+212\", code: \"EH\", emoji: \"๐ช๐ญ\" },\n { name: \"Yemen\", dialCode: \"+967\", code: \"YE\", emoji: \"๐พ๐ช\" },\n { name: \"Zambia\", dialCode: \"+260\", code: \"ZM\", emoji: \"๐ฟ๐ฒ\" },\n { name: \"Zimbabwe\", dialCode: \"+263\", code: \"ZW\", emoji: \"๐ฟ๐ผ\" },\n { name: \"ร
land Islands\", dialCode: \"+358\", code: \"AX\", emoji: \"๐ฆ๐ฝ\" },\n] as const satisfies CountryData[];\n\n/**\n * A country data object containing name, dial code, country code, and emoji for a supported country.\n */\nexport type CountryData = {\n /** The name of the country. */\n name: string;\n /** The dial code of the country. */\n dialCode: string;\n /** The country code of the country. */\n code: CountryCode;\n /** The emoji of the country. */\n emoji: string;\n};\n\nexport type { CountryCode };\n\n/**\n * Formats a phone number according to the specified country data.\n *\n * @param phoneNumber - The phone number to format.\n * @param countryData - The country data to use for formatting.\n * @returns {string} The formatted phone number in E164 format.\n */\nexport function formatPhoneNumber(phoneNumber: string, countryData: CountryData): string {\n try {\n const parsedNumber = parsePhoneNumberWithError(phoneNumber, countryData.code);\n\n if (parsedNumber && parsedNumber.isValid()) {\n // Return the E164 format.\n return parsedNumber.number;\n }\n } catch {\n // If parsing fails, try to format as incomplete number\n }\n\n try {\n // Try to format as incomplete number with country\n const formatted = formatIncompletePhoneNumber(phoneNumber, countryData.code);\n // Remove spaces from the formatted result.\n return formatted.replace(/\\s/g, \"\");\n } catch {\n // If all else fails, just clean the number and prepend country code\n const cleaned = phoneNumber.replace(/[^\\d+]/g, \"\").trim();\n if (cleaned.startsWith(\"+\")) {\n return cleaned;\n }\n\n return `${countryData.dialCode}${cleaned}`;\n }\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { type CountryCode, countryData } from \"../country-data\";\n\nexport type CountryCodesOptions = {\n // The allowed countries are the countries that will be shown in the country selector\n // or `getCountries` is called.\n allowedCountries?: CountryCode[];\n // The default country is the country that will be selected by default when\n // the country selector is rendered, or `getDefaultCountry` is called.\n defaultCountry?: CountryCode;\n};\n\nexport const countryCodesHandler = (options?: CountryCodesOptions) => {\n // Determine allowed countries\n let allowedCountries = options?.allowedCountries?.length\n ? countryData.filter((country) => options.allowedCountries!.includes(country.code))\n : countryData;\n\n // If no countries match, fall back to all countries\n if (options?.allowedCountries?.length && allowedCountries.length === 0) {\n console.warn(`No countries matched the \"allowedCountries\" list, falling back to all countries`);\n allowedCountries = countryData;\n }\n\n // Determine default country\n let defaultCountry = options?.defaultCountry\n ? countryData.find((country) => country.code === options.defaultCountry)!\n : countryData.find((country) => country.code === \"US\")!;\n\n // If default country is not in allowed countries, use first allowed country\n if (!allowedCountries.some((country) => country.code === defaultCountry.code)) {\n defaultCountry = allowedCountries[0]!;\n console.warn(\n `The \"defaultCountry\" option is not in the \"allowedCountries\" list, the default country has been set to ${defaultCountry.code}`\n );\n }\n\n return {\n allowedCountries,\n defaultCountry,\n };\n};\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport type { UserCredential } from \"firebase/auth\";\nimport type { FirebaseUI } from \"~/config\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type CallableHandler<T extends (...args: any[]) => any = (...args: any[]) => any> = T;\nexport type InitHandler = (ui: FirebaseUI) => Promise<void> | void;\nexport type RedirectHandler = (ui: FirebaseUI, result: UserCredential | null) => Promise<void> | void;\n\nexport type CallableBehavior<T extends CallableHandler = CallableHandler> = {\n type: \"callable\";\n handler: T;\n};\n\nexport type RedirectBehavior<T extends RedirectHandler = RedirectHandler> = {\n type: \"redirect\";\n handler: T;\n};\n\nexport type InitBehavior<T extends InitHandler = InitHandler> = {\n type: \"init\";\n handler: T;\n};\n\nexport function callableBehavior<T extends CallableHandler>(handler: T): CallableBehavior<T> {\n return { type: \"callable\" as const, handler };\n}\n\nexport function redirectBehavior<T extends RedirectHandler = RedirectHandler>(handler: T): RedirectBehavior<T> {\n return { type: \"redirect\" as const, handler };\n}\n\nexport function initBehavior<T extends InitHandler = InitHandler>(handler: T): InitBehavior<T> {\n return { type: \"init\" as const, handler };\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport type { FirebaseUI } from \"~/config\";\nimport type { RecaptchaVerifier, UserCredential } from \"firebase/auth\";\nimport * as anonymousUpgradeHandlers from \"./anonymous-upgrade\";\nimport * as autoAnonymousLoginHandlers from \"./auto-anonymous-login\";\nimport * as recaptchaHandlers from \"./recaptcha\";\nimport * as providerStrategyHandlers from \"./provider-strategy\";\nimport * as oneTapSignInHandlers from \"./one-tap\";\nimport * as requireDisplayNameHandlers from \"./require-display-name\";\nimport * as countryCodesHandlers from \"./country-codes\";\nimport {\n callableBehavior,\n initBehavior,\n redirectBehavior,\n type CallableBehavior,\n type InitBehavior,\n type RedirectBehavior,\n} from \"./utils\";\n\ntype Registry = {\n autoAnonymousLogin: InitBehavior<typeof autoAnonymousLoginHandlers.autoAnonymousLoginHandler>;\n autoUpgradeAnonymousCredential: CallableBehavior<\n typeof anonymousUpgradeHandlers.autoUpgradeAnonymousCredentialHandler\n >;\n autoUpgradeAnonymousProvider: CallableBehavior<typeof anonymousUpgradeHandlers.autoUpgradeAnonymousProviderHandler>;\n autoUpgradeAnonymousUserRedirectHandler: RedirectBehavior<\n (\n ui: FirebaseUI,\n credential: UserCredential | null,\n onUpgrade?: anonymousUpgradeHandlers.OnUpgradeCallback\n ) => ReturnType<typeof anonymousUpgradeHandlers.autoUpgradeAnonymousUserRedirectHandler>\n >;\n recaptchaVerification: CallableBehavior<(ui: FirebaseUI, element: HTMLElement) => RecaptchaVerifier>;\n providerSignInStrategy: CallableBehavior<providerStrategyHandlers.ProviderSignInStrategyHandler>;\n providerLinkStrategy: CallableBehavior<providerStrategyHandlers.ProviderLinkStrategyHandler>;\n oneTapSignIn: InitBehavior<(ui: FirebaseUI) => ReturnType<typeof oneTapSignInHandlers.oneTapSignInHandler>>;\n requireDisplayName: CallableBehavior<typeof requireDisplayNameHandlers.requireDisplayNameHandler>;\n countryCodes: CallableBehavior<typeof countryCodesHandlers.countryCodesHandler>;\n};\n\n/** A behavior or set of behaviors from the registry. */\nexport type Behavior<T extends keyof Registry = keyof Registry> = Pick<Registry, T>;\n/** All available behaviors, with each behavior being optional. */\nexport type Behaviors = Partial<Registry>;\n\n/**\n * Enables automatic anonymous login when the app initializes.\n *\n * @returns A behavior that automatically signs in users anonymously on app initialization.\n */\nexport function autoAnonymousLogin(): Behavior<\"autoAnonymousLogin\"> {\n return {\n autoAnonymousLogin: initBehavior(autoAnonymousLoginHandlers.autoAnonymousLoginHandler),\n };\n}\n\n/** Options for the auto-upgrade anonymous users behavior. */\nexport type AutoUpgradeAnonymousUsersOptions = {\n /** Optional callback function that is called when an anonymous user is upgraded. */\n onUpgrade?: anonymousUpgradeHandlers.OnUpgradeCallback;\n};\n\n/**\n * Automatically upgrades anonymous users to regular users when they sign in with a credential or provider.\n *\n * This behavior handles upgrading anonymous users for credential-based sign-ins, provider-based sign-ins,\n * and redirect-based authentication flows.\n *\n * @param options - Optional configuration including an upgrade callback.\n * @returns Behaviors for automatically upgrading anonymous users.\n */\nexport function autoUpgradeAnonymousUsers(\n options?: AutoUpgradeAnonymousUsersOptions\n): Behavior<\n \"autoUpgradeAnonymousCredential\" | \"autoUpgradeAnonymousProvider\" | \"autoUpgradeAnonymousUserRedirectHandler\"\n> {\n return {\n autoUpgradeAnonymousCredential: callableBehavior((ui, credential) =>\n anonymousUpgradeHandlers.autoUpgradeAnonymousCredentialHandler(ui, credential, options?.onUpgrade)\n ),\n autoUpgradeAnonymousProvider: callableBehavior((ui, provider) =>\n anonymousUpgradeHandlers.autoUpgradeAnonymousProviderHandler(ui, provider, options?.onUpgrade)\n ),\n autoUpgradeAnonymousUserRedirectHandler: redirectBehavior((ui, credential) =>\n anonymousUpgradeHandlers.autoUpgradeAnonymousUserRedirectHandler(ui, credential, options?.onUpgrade)\n ),\n };\n}\n\n/** Options for reCAPTCHA verification behavior. */\nexport type RecaptchaVerificationOptions = recaptchaHandlers.RecaptchaVerificationOptions;\n\n/**\n * Configures reCAPTCHA verification for phone authentication.\n *\n * @param options - Optional reCAPTCHA verification options.\n * @returns A behavior that handles reCAPTCHA verification for phone authentication.\n */\nexport function recaptchaVerification(options?: RecaptchaVerificationOptions): Behavior<\"recaptchaVerification\"> {\n return {\n recaptchaVerification: callableBehavior((ui, element) =>\n recaptchaHandlers.recaptchaVerificationHandler(ui, element, options)\n ),\n };\n}\n\n/**\n * Configures provider authentication to use redirect strategy instead of popup.\n *\n * @returns Behaviors for provider sign-in and linking using redirect strategy.\n */\nexport function providerRedirectStrategy(): Behavior<\"providerSignInStrategy\" | \"providerLinkStrategy\"> {\n return {\n providerSignInStrategy: callableBehavior(providerStrategyHandlers.signInWithRediectHandler),\n providerLinkStrategy: callableBehavior(providerStrategyHandlers.linkWithRedirectHandler),\n };\n}\n\n/**\n * Configures provider authentication to use popup strategy instead of redirect.\n *\n * This is the default strategy for provider authentication.\n *\n * @returns Behaviors for provider sign-in and linking using popup strategy.\n */\nexport function providerPopupStrategy(): Behavior<\"providerSignInStrategy\" | \"providerLinkStrategy\"> {\n return {\n providerSignInStrategy: callableBehavior(providerStrategyHandlers.signInWithPopupHandler),\n providerLinkStrategy: callableBehavior(providerStrategyHandlers.linkWithPopupHandler),\n };\n}\n\n/** Options for Google One Tap sign-in behavior. */\nexport type OneTapSignInOptions = oneTapSignInHandlers.OneTapSignInOptions;\n\n/**\n * Enables Google One Tap sign-in functionality.\n *\n * @param options - Configuration options for Google One Tap sign-in.\n * @returns A behavior that handles Google One Tap sign-in initialization.\n */\nexport function oneTapSignIn(options: OneTapSignInOptions): Behavior<\"oneTapSignIn\"> {\n return {\n oneTapSignIn: initBehavior((ui) => oneTapSignInHandlers.oneTapSignInHandler(ui, options)),\n };\n}\n\n/**\n * Requires users to provide a display name when creating an account.\n *\n * @returns A behavior that enforces display name requirement during user registration.\n */\nexport function requireDisplayName(): Behavior<\"requireDisplayName\"> {\n return {\n requireDisplayName: callableBehavior(requireDisplayNameHandlers.requireDisplayNameHandler),\n };\n}\n\n/**\n * Configures country code selection for phone number input.\n *\n * @param options - Optional configuration for country code behavior.\n * @returns A behavior that provides country code functionality for phone authentication.\n */\nexport function countryCodes(options?: countryCodesHandlers.CountryCodesOptions): Behavior<\"countryCodes\"> {\n return {\n countryCodes: callableBehavior(() => countryCodesHandlers.countryCodesHandler(options)),\n };\n}\n\n/**\n * Checks if a specific behavior is enabled for the given FirebaseUI instance.\n *\n * @param ui - The FirebaseUI instance.\n * @param key - The behavior key to check.\n * @returns True if the behavior is enabled, false otherwise.\n */\nexport function hasBehavior<T extends keyof Registry>(ui: FirebaseUI, key: T): boolean {\n return !!ui.behaviors[key];\n}\n\n/**\n * Gets the handler function for a specific behavior.\n *\n * @param ui - The FirebaseUI instance.\n * @param key - The behavior key to retrieve.\n * @returns The handler function for the specified behavior.\n * @throws {Error} Throws an error if the behavior is not found.\n */\nexport function getBehavior<T extends keyof Registry>(ui: FirebaseUI, key: T): Registry[T][\"handler\"] {\n if (!hasBehavior(ui, key)) {\n throw new Error(`Behavior ${key} not found`);\n }\n\n return (ui.behaviors[key] as Registry[T]).handler;\n}\n\n/** Default behaviors that are enabled by default for all FirebaseUI instances. */\nexport const defaultBehaviors: Behavior<\"recaptchaVerification\"> = {\n ...recaptchaVerification(),\n ...providerPopupStrategy(),\n ...countryCodes(),\n};\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport {\n createUserWithEmailAndPassword as _createUserWithEmailAndPassword,\n isSignInWithEmailLink as _isSignInWithEmailLink,\n sendPasswordResetEmail as _sendPasswordResetEmail,\n sendSignInLinkToEmail as _sendSignInLinkToEmail,\n signInAnonymously as _signInAnonymously,\n signInWithCredential as _signInWithCredential,\n signInWithCustomToken as _signInWithCustomToken,\n EmailAuthProvider,\n linkWithCredential,\n PhoneAuthProvider,\n TotpMultiFactorGenerator,\n multiFactor,\n type ActionCodeSettings,\n type ApplicationVerifier,\n type AuthProvider,\n type UserCredential,\n type AuthCredential,\n type TotpSecret,\n type MultiFactorAssertion,\n type MultiFactorUser,\n type MultiFactorInfo,\n} from \"firebase/auth\";\nimport QRCode from \"qrcode-generator\";\nimport { type FirebaseUI } from \"./config\";\nimport { handleFirebaseError } from \"./errors\";\nimport { hasBehavior, getBehavior } from \"./behaviors/index\";\nimport { FirebaseError } from \"firebase/app\";\nimport { getTranslation } from \"./translations\";\n\nasync function handlePendingCredential(_ui: FirebaseUI, user: UserCredential): Promise<UserCredential> {\n const pendingCredString = window.sessionStorage.getItem(\"pendingCred\");\n if (!pendingCredString) return user;\n\n try {\n const pendingCred = JSON.parse(pendingCredString);\n const result = await linkWithCredential(user.user, pendingCred);\n window.sessionStorage.removeItem(\"pendingCred\");\n return result;\n } catch {\n window.sessionStorage.removeItem(\"pendingCred\");\n return user;\n }\n}\n\nfunction setPendingState(ui: FirebaseUI) {\n ui.setRedirectError(undefined);\n ui.setState(\"pending\");\n}\n\n/**\n * Signs in with an email and password.\n *\n * If the `autoUpgradeAnonymousUsers` behavior is enabled, it will attempt to upgrade an anonymous user to a regular user.\n *\n * @param ui - The FirebaseUI instance.\n * @param email - The email to sign in with.\n * @param password - The password to sign in with.\n * @returns {Promise<UserCredential>} A promise containing the user credential.\n */\nexport async function signInWithEmailAndPassword(\n ui: FirebaseUI,\n email: string,\n password: string\n): Promise<UserCredential> {\n try {\n setPendingState(ui);\n const credential = EmailAuthProvider.credential(email, password);\n\n if (hasBehavior(ui, \"autoUpgradeAnonymousCredential\")) {\n const result = await getBehavior(ui, \"autoUpgradeAnonymousCredential\")(ui, credential);\n\n if (result) {\n return handlePendingCredential(ui, result);\n }\n }\n\n const result = await _signInWithCredential(ui.auth, credential);\n return handlePendingCredential(ui, result);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Creates a new user account with an email and password.\n *\n * If the `requireDisplayName` behavior is enabled, a display name must be provided.\n * If the `autoUpgradeAnonymousUsers` behavior is enabled, it will attempt to upgrade an anonymous user to a regular user.\n *\n * @param ui - The FirebaseUI instance.\n * @param email - The email address for the new account.\n * @param password - The password for the new account.\n * @param displayName - Optional display name for the user.\n * @returns {Promise<UserCredential>} A promise containing the user credential.\n */\nexport async function createUserWithEmailAndPassword(\n ui: FirebaseUI,\n email: string,\n password: string,\n displayName?: string\n): Promise<UserCredential> {\n try {\n setPendingState(ui);\n const credential = EmailAuthProvider.credential(email, password);\n\n if (hasBehavior(ui, \"requireDisplayName\") && !displayName) {\n throw new FirebaseError(\"auth/display-name-required\", getTranslation(ui, \"errors\", \"displayNameRequired\"));\n }\n\n if (hasBehavior(ui, \"autoUpgradeAnonymousCredential\")) {\n const result = await getBehavior(ui, \"autoUpgradeAnonymousCredential\")(ui, credential);\n\n if (result) {\n if (hasBehavior(ui, \"requireDisplayName\")) {\n await getBehavior(ui, \"requireDisplayName\")(ui, result.user, displayName!);\n }\n\n return handlePendingCredential(ui, result);\n }\n }\n\n const result = await _createUserWithEmailAndPassword(ui.auth, email, password);\n\n if (hasBehavior(ui, \"requireDisplayName\")) {\n await getBehavior(ui, \"requireDisplayName\")(ui, result.user, displayName!);\n }\n\n return handlePendingCredential(ui, result);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Verifies a phone number for authentication.\n *\n * Supports regular phone authentication, MFA enrollment, and MFA assertion flows.\n *\n * @param ui - The FirebaseUI instance.\n * @param phoneNumber - The phone number to verify.\n * @param appVerifier - The application verifier (reCAPTCHA).\n * @param mfaUser - Optional multi-factor user for MFA enrollment flow.\n * @param mfaHint - Optional multi-factor info hint for MFA assertion flow.\n * @returns {Promise<string>} A promise containing the verification ID.\n */\nexport async function verifyPhoneNumber(\n ui: FirebaseUI,\n phoneNumber: string,\n appVerifier: ApplicationVerifier,\n mfaUser?: MultiFactorUser,\n mfaHint?: MultiFactorInfo\n): Promise<string> {\n try {\n setPendingState(ui);\n const provider = new PhoneAuthProvider(ui.auth);\n\n if (mfaHint && ui.multiFactorResolver) {\n // MFA assertion flow\n return await provider.verifyPhoneNumber(\n {\n multiFactorHint: mfaHint,\n session: ui.multiFactorResolver.session,\n },\n appVerifier\n );\n } else if (mfaUser) {\n // MFA enrollment flow\n const session = await mfaUser.getSession();\n return await provider.verifyPhoneNumber(\n {\n phoneNumber,\n session,\n },\n appVerifier\n );\n } else {\n // Regular phone auth flow\n return await provider.verifyPhoneNumber(phoneNumber, appVerifier);\n }\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Confirms a phone number verification code and signs in the user.\n *\n * If the `autoUpgradeAnonymousUsers` behavior is enabled and the current user is anonymous, it will attempt to upgrade the anonymous user to a regular user.\n *\n * @param ui - The FirebaseUI instance.\n * @param verificationId - The verification ID from the phone verification process.\n * @param verificationCode - The verification code sent to the phone.\n * @returns {Promise<UserCredential>} A promise containing the user credential.\n */\nexport async function confirmPhoneNumber(\n ui: FirebaseUI,\n verificationId: string,\n verificationCode: string\n): Promise<UserCredential> {\n try {\n setPendingState(ui);\n const currentUser = ui.auth.currentUser;\n const credential = PhoneAuthProvider.credential(verificationId, verificationCode);\n\n if (currentUser?.isAnonymous && hasBehavior(ui, \"autoUpgradeAnonymousCredential\")) {\n const result = await getBehavior(ui, \"autoUpgradeAnonymousCredential\")(ui, credential);\n\n if (result) {\n return handlePendingCredential(ui, result);\n }\n }\n\n const result = await _signInWithCredential(ui.auth, credential);\n return handlePendingCredential(ui, result);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Sends a password reset email to the specified email address.\n *\n * @param ui - The FirebaseUI instance.\n * @param email - The email address to send the password reset email to.\n * @returns {Promise<void>} A promise that resolves when the email is sent.\n */\nexport async function sendPasswordResetEmail(ui: FirebaseUI, email: string): Promise<void> {\n try {\n setPendingState(ui);\n await _sendPasswordResetEmail(ui.auth, email);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Sends a sign-in link to the specified email address.\n *\n * The email address is stored in localStorage for later use during the sign-in process.\n *\n * @param ui - The FirebaseUI instance.\n * @param email - The email address to send the sign-in link to.\n * @returns {Promise<void>} A promise that resolves when the email is sent.\n */\nexport async function sendSignInLinkToEmail(ui: FirebaseUI, email: string): Promise<void> {\n try {\n setPendingState(ui);\n const actionCodeSettings = {\n url: window.location.href,\n // TODO(ehesp): Check this...\n handleCodeInApp: true,\n } satisfies ActionCodeSettings;\n\n await _sendSignInLinkToEmail(ui.auth, email, actionCodeSettings);\n // TODO: Should this be a behavior (\"storageStrategy\")?\n window.localStorage.setItem(\"emailForSignIn\", email);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Signs in a user using an email link.\n *\n * @param ui - The FirebaseUI instance.\n * @param email - The email address associated with the sign-in link.\n * @param link - The sign-in link from the email.\n * @returns {Promise<UserCredential>} A promise containing the user credential.\n */\nexport async function signInWithEmailLink(ui: FirebaseUI, email: string, link: string): Promise<UserCredential> {\n const credential = EmailAuthProvider.credentialWithLink(email, link);\n return signInWithCredential(ui, credential);\n}\n\n/**\n * Signs in a user with an authentication credential.\n *\n * If the `autoUpgradeAnonymousUsers` behavior is enabled, it will attempt to upgrade an anonymous user to a regular user.\n *\n * @param ui - The FirebaseUI instance.\n * @param credential - The authentication credential to sign in with.\n * @returns {Promise<UserCredential>} A promise containing the user credential.\n */\nexport async function signInWithCredential(ui: FirebaseUI, credential: AuthCredential): Promise<UserCredential> {\n try {\n setPendingState(ui);\n if (hasBehavior(ui, \"autoUpgradeAnonymousCredential\")) {\n const userCredential = await getBehavior(ui, \"autoUpgradeAnonymousCredential\")(ui, credential);\n\n // If they got here, they're either not anonymous or they've been linked.\n // If the credential has been linked, we don't need to sign them in, so return early.\n if (userCredential) {\n return handlePendingCredential(ui, userCredential);\n }\n }\n\n const result = await _signInWithCredential(ui.auth, credential);\n return handlePendingCredential(ui, result);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Signs in a user with a custom token.\n *\n * @param ui - The FirebaseUI instance.\n * @param customToken - The custom token to sign in with.\n * @returns {Promise<UserCredential>} A promise containing the user credential.\n */\nexport async function signInWithCustomToken(ui: FirebaseUI, customToken: string): Promise<UserCredential> {\n try {\n setPendingState(ui);\n const result = await _signInWithCustomToken(ui.auth, customToken);\n return handlePendingCredential(ui, result);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Signs in a user anonymously.\n *\n * @param ui - The FirebaseUI instance.\n * @returns {Promise<UserCredential>} A promise containing the user credential.\n */\nexport async function signInAnonymously(ui: FirebaseUI): Promise<UserCredential> {\n try {\n setPendingState(ui);\n const result = await _signInAnonymously(ui.auth);\n return handlePendingCredential(ui, result);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Signs in a user with an authentication provider (e.g., Google, Facebook, etc.).\n *\n * If the `autoUpgradeAnonymousProvider` behavior is enabled, it will attempt to upgrade an anonymous user to a regular user.\n * The sign-in strategy (popup or redirect) is determined by the `providerSignInStrategy` behavior.\n *\n * @param ui - The FirebaseUI instance.\n * @param provider - The authentication provider to sign in with.\n * @returns {Promise<UserCredential | never>} A promise containing the user credential, or never if using redirect strategy.\n */\nexport async function signInWithProvider(ui: FirebaseUI, provider: AuthProvider): Promise<UserCredential | never> {\n try {\n setPendingState(ui);\n if (hasBehavior(ui, \"autoUpgradeAnonymousProvider\")) {\n const credential = await getBehavior(ui, \"autoUpgradeAnonymousProvider\")(ui, provider);\n\n // If we got here, the user is either not anonymous, or they have been linked\n // via a popup, and the credential has been created.\n if (credential) {\n return handlePendingCredential(ui, credential);\n }\n }\n\n const strategy = getBehavior(ui, \"providerSignInStrategy\");\n const result = await strategy(ui, provider);\n\n // If we got here, the user has been signed in via a popup.\n // Otherwise, they will have been redirected.\n return handlePendingCredential(ui, result);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Completes the email link sign-in process using the current URL.\n *\n * Checks if the current URL is a valid email link sign-in URL and retrieves the email from localStorage.\n * Returns null if the URL is not a valid email link or if no email is found in localStorage.\n *\n * @param ui - The FirebaseUI instance.\n * @param currentUrl - The current URL to check for email link sign-in.\n * @returns {Promise<UserCredential | null>} A promise containing the user credential, or null if the sign-in cannot be completed.\n */\nexport async function completeEmailLinkSignIn(ui: FirebaseUI, currentUrl: string): Promise<UserCredential | null> {\n try {\n if (!_isSignInWithEmailLink(ui.auth, currentUrl)) {\n return null;\n }\n\n const email = window.localStorage.getItem(\"emailForSignIn\");\n if (!email) return null;\n\n // signInWithEmailLink handles behavior checks, credential creation, and error handling\n const result = await signInWithEmailLink(ui, email, currentUrl);\n return handlePendingCredential(ui, result);\n } finally {\n window.localStorage.removeItem(\"emailForSignIn\");\n }\n}\n\n/**\n * Generates a QR code data URL for TOTP (Time-based One-Time Password) multi-factor authentication.\n *\n * The QR code can be scanned by an authenticator app to set up TOTP MFA for the user.\n *\n * @param ui - The FirebaseUI instance.\n * @param secret - The TOTP secret to generate the QR code for.\n * @param accountName - Optional account name for the QR code. Defaults to the user's email if not provided.\n * @param issuer - Optional issuer name for the QR code.\n * @returns {string} A data URL containing the QR code image.\n * @throws {Error} Throws an error if the user is not authenticated.\n */\nexport function generateTotpQrCode(ui: FirebaseUI, secret: TotpSecret, accountName?: string, issuer?: string): string {\n const currentUser = ui.auth.currentUser;\n\n if (!currentUser) {\n throw new Error(\"User must be authenticated to generate a TOTP QR code\");\n }\n\n const uri = secret.generateQrCodeUrl(accountName || currentUser.email || \"\", issuer);\n\n const qr = QRCode(0, \"L\");\n qr.addData(uri);\n qr.make();\n return qr.createDataURL();\n}\n\n/**\n * Signs in a user using a multi-factor assertion.\n *\n * Resolves the multi-factor challenge using the provided assertion and clears the multi-factor resolver from the UI state.\n *\n * @param ui - The FirebaseUI instance.\n * @param assertion - The multi-factor assertion to use for sign-in.\n * @returns {Promise<UserCredential>} A promise containing the user credential.\n */\nexport async function signInWithMultiFactorAssertion(ui: FirebaseUI, assertion: MultiFactorAssertion) {\n try {\n setPendingState(ui);\n const result = await ui.multiFactorResolver!.resolveSignIn(assertion);\n ui.setMultiFactorResolver(undefined);\n return result;\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Enrolls a multi-factor authentication method for the current user.\n *\n * @param ui - The FirebaseUI instance.\n * @param assertion - The multi-factor assertion to enroll.\n * @param displayName - Optional display name for the enrolled MFA method.\n * @returns {Promise<void>} A promise that resolves when the enrollment is complete.\n */\nexport async function enrollWithMultiFactorAssertion(\n ui: FirebaseUI,\n assertion: MultiFactorAssertion,\n displayName?: string\n): Promise<void> {\n try {\n setPendingState(ui);\n await multiFactor(ui.auth.currentUser!).enroll(assertion, displayName);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Generates a TOTP (Time-based One-Time Password) secret for multi-factor authentication enrollment.\n *\n * @param ui - The FirebaseUI instance.\n * @returns {Promise<TotpSecret>} A promise containing the TOTP secret.\n */\nexport async function generateTotpSecret(ui: FirebaseUI): Promise<TotpSecret> {\n try {\n setPendingState(ui);\n const mfaUser = multiFactor(ui.auth.currentUser!);\n const session = await mfaUser.getSession();\n return await TotpMultiFactorGenerator.generateSecret(session);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { enUs, type RegisteredLocale } from \"@firebase-oss/ui-translations\";\nimport type { FirebaseApp } from \"firebase/app\";\nimport { type Auth, getAuth, getRedirectResult, type MultiFactorResolver } from \"firebase/auth\";\nimport { deepMap, type DeepMapStore, map } from \"nanostores\";\nimport { type Behavior, type Behaviors, defaultBehaviors } from \"./behaviors\";\nimport type { InitBehavior, RedirectBehavior } from \"./behaviors/utils\";\nimport { type FirebaseUIState } from \"./state\";\nimport { handleFirebaseError } from \"./errors\";\n\n/**\n * Configuration options for initializing FirebaseUI.\n */\nexport type FirebaseUIOptions = {\n /** A required Firebase App instance, e.g. from `initializeApp`. */\n app: FirebaseApp;\n /** An optional Firebase Auth instance, e.g. from `getAuth`. If not provided, it will be created using the app instance. */\n auth?: Auth;\n /** A default locale to use. Defaults to `enUs`. */\n locale?: RegisteredLocale;\n /** An optional array of behaviors, e.g. from `requireDisplayName`. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n behaviors?: Behavior<any>[];\n};\n\n/**\n * The main FirebaseUI instance that provides access to Firebase Auth and UI state management.\n *\n * This type encapsulates all the necessary components for managing authentication UI state,\n * including Firebase app and auth instances, locale settings, behaviors, and multi-factor\n * authentication state.\n */\nexport type FirebaseUI = {\n /** The Firebase App instance. */\n app: FirebaseApp;\n /** The Firebase Auth instance. */\n auth: Auth;\n /** Sets the locale for translations. */\n setLocale: (locale: RegisteredLocale) => void;\n /** The current UI state (e.g., \"idle\", \"pending\", \"loading\"). */\n state: FirebaseUIState;\n /** Sets the UI state. */\n setState: (state: FirebaseUIState) => void;\n /** The current locale for translations. */\n locale: RegisteredLocale;\n /** The configured behaviors that customize authentication flows. */\n behaviors: Behaviors;\n /** The multi-factor resolver, if a multi-factor challenge is in progress. */\n multiFactorResolver?: MultiFactorResolver;\n /** Sets the multi-factor resolver. */\n setMultiFactorResolver: (multiFactorResolver?: MultiFactorResolver) => void;\n /** Any error that occurred during a redirect-based authentication flow. */\n redirectError?: Error;\n /** Sets the redirect error. */\n setRedirectError: (error?: Error) => void;\n};\n\nexport const $config = map<Record<string, DeepMapStore<FirebaseUI>>>({});\n\n/**\n * A reactive store containing a FirebaseUI instance.\n *\n * This store allows for reactive updates to the FirebaseUI state, enabling UI components\n * to automatically update when the authentication state or configuration changes.\n */\nexport type FirebaseUIStore = DeepMapStore<FirebaseUI>;\n\n/**\n * Initializes a FirebaseUI instance with the provided configuration.\n *\n * Creates a reactive store containing the FirebaseUI instance, sets up behaviors,\n * and handles initialization and redirect flows if running client-side.\n *\n * Example:\n * ```typescript\n * const ui = initializeUI({\n * app: firebaseApp,\n * locale: enUs,\n * behaviors: [requireDisplayName()],\n * });\n * ```\n *\n * @param config - The configuration options for FirebaseUI.\n * @param name - Optional name for the FirebaseUI instance. Defaults to \"[DEFAULT]\".\n * @returns {FirebaseUIStore} A reactive store containing the initialized FirebaseUI instance.\n */\nexport function initializeUI(config: FirebaseUIOptions, name: string = \"[DEFAULT]\"): FirebaseUIStore {\n // Reduce the behaviors to a single object.\n const behaviors = config.behaviors?.reduce<Behavior>((acc, behavior) => {\n return {\n ...acc,\n ...behavior,\n };\n }, defaultBehaviors as Behavior);\n\n $config.setKey(\n name,\n deepMap<FirebaseUI>({\n app: config.app,\n auth: config.auth || getAuth(config.app),\n locale: config.locale ?? enUs,\n setLocale: (locale: RegisteredLocale) => {\n const current = $config.get()[name]!;\n current.setKey(`locale`, locale);\n },\n state: \"idle\",\n setState: (state: FirebaseUIState) => {\n const current = $config.get()[name]!;\n current.setKey(`state`, state);\n },\n // Since we've got config.behaviors?.reduce above, we need to default to defaultBehaviors\n // if no behaviors are provided, as they wont be in the reducer.\n behaviors: behaviors ?? (defaultBehaviors as Behavior),\n multiFactorResolver: undefined,\n setMultiFactorResolver: (resolver?: MultiFactorResolver) => {\n const current = $config.get()[name]!;\n current.setKey(`multiFactorResolver`, resolver);\n },\n redirectError: undefined,\n setRedirectError: (error?: Error) => {\n const current = $config.get()[name]!;\n current.setKey(`redirectError`, error);\n },\n })\n );\n\n const store = $config.get()[name]!;\n const ui = store.get();\n\n // If we're client-side, execute the init and redirect behaviors.\n if (typeof window !== \"undefined\") {\n const initBehaviors: InitBehavior[] = [];\n const redirectBehaviors: RedirectBehavior[] = [];\n\n for (const behavior of Object.values(ui.behaviors)) {\n if (behavior.type === \"redirect\") {\n redirectBehaviors.push(behavior);\n } else if (behavior.type === \"init\") {\n initBehaviors.push(behavior);\n }\n }\n\n if (initBehaviors.length > 0) {\n store.setKey(\"state\", \"loading\");\n ui.auth.authStateReady().then(() => {\n Promise.all(initBehaviors.map((behavior) => behavior.handler(ui))).then(() => {\n store.setKey(\"state\", \"idle\");\n });\n });\n }\n\n getRedirectResult(ui.auth)\n .then((result) => {\n return Promise.all(redirectBehaviors.map((behavior) => behavior.handler(ui, result)));\n })\n .catch((error) => {\n try {\n handleFirebaseError(ui, error);\n } catch (error) {\n ui.setRedirectError(error instanceof Error ? error : new Error(String(error)));\n }\n });\n }\n\n return store;\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport * as z from \"zod\";\nimport { getTranslation } from \"./translations\";\nimport { type FirebaseUI } from \"./config\";\nimport { hasBehavior } from \"./behaviors\";\n\n/**\n * Creates a Zod schema for sign-in form validation.\n *\n * Validates email format and password minimum length (6 characters).\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for sign-in form validation.\n */\nexport function createSignInAuthFormSchema(ui: FirebaseUI) {\n return z.object({\n email: z.email(getTranslation(ui, \"errors\", \"invalidEmail\")),\n password: z.string().min(6, getTranslation(ui, \"errors\", \"weakPassword\")),\n });\n}\n\n/**\n * Creates a Zod schema for sign-up form validation.\n *\n * Validates email format, password minimum length (6 characters), and optionally requires a display name\n * if the `requireDisplayName` behavior is enabled.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for sign-up form validation.\n */\nexport function createSignUpAuthFormSchema(ui: FirebaseUI) {\n const requireDisplayName = hasBehavior(ui, \"requireDisplayName\");\n const displayNameRequiredMessage = getTranslation(ui, \"errors\", \"displayNameRequired\");\n\n return z.object({\n email: z.email(getTranslation(ui, \"errors\", \"invalidEmail\")),\n password: z.string().min(6, getTranslation(ui, \"errors\", \"weakPassword\")),\n displayName: requireDisplayName\n ? z.string().min(1, displayNameRequiredMessage)\n : z.string().min(1, displayNameRequiredMessage).optional(),\n });\n}\n\n/**\n * Creates a Zod schema for forgot password form validation.\n *\n * Validates email format.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for forgot password form validation.\n */\nexport function createForgotPasswordAuthFormSchema(ui: FirebaseUI) {\n return z.object({\n email: z.email(getTranslation(ui, \"errors\", \"invalidEmail\")),\n });\n}\n\n/**\n * Creates a Zod schema for email link authentication form validation.\n *\n * Validates email format.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for email link authentication form validation.\n */\nexport function createEmailLinkAuthFormSchema(ui: FirebaseUI) {\n return z.object({\n email: z.email(getTranslation(ui, \"errors\", \"invalidEmail\")),\n });\n}\n\n/**\n * Creates a Zod schema for phone number form validation.\n *\n * Validates that the phone number is provided and has a maximum length of 10 characters.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for phone number form validation.\n */\nexport function createPhoneAuthNumberFormSchema(ui: FirebaseUI) {\n return z.object({\n phoneNumber: z\n .string()\n .min(1, getTranslation(ui, \"errors\", \"missingPhoneNumber\"))\n .max(10, getTranslation(ui, \"errors\", \"invalidPhoneNumber\")),\n });\n}\n\n/**\n * Creates a Zod schema for phone verification code form validation.\n *\n * Validates that the verification ID is provided and the verification code is at least 6 characters long.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for phone verification form validation.\n */\nexport function createPhoneAuthVerifyFormSchema(ui: FirebaseUI) {\n return z.object({\n verificationId: z.string().min(1, getTranslation(ui, \"errors\", \"missingVerificationId\")),\n verificationCode: z.string().refine((val) => !val || val.length >= 6, {\n error: getTranslation(ui, \"errors\", \"invalidVerificationCode\"),\n }),\n });\n}\n\n/**\n * Creates a Zod schema for multi-factor phone authentication number form validation.\n *\n * Extends the phone number schema with a required display name field.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for multi-factor phone authentication number form validation.\n */\nexport function createMultiFactorPhoneAuthNumberFormSchema(ui: FirebaseUI) {\n const base = createPhoneAuthNumberFormSchema(ui);\n return base.extend({\n displayName: z.string().min(1, getTranslation(ui, \"errors\", \"displayNameRequired\")),\n });\n}\n\n/**\n * Creates a Zod schema for multi-factor phone authentication assertion form validation.\n *\n * Uses the same validation as the phone number form schema.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for multi-factor phone authentication assertion form validation.\n */\nexport function createMultiFactorPhoneAuthAssertionFormSchema(ui: FirebaseUI) {\n return createPhoneAuthNumberFormSchema(ui);\n}\n\n/**\n * Creates a Zod schema for multi-factor phone authentication verification form validation.\n *\n * Uses the same validation as the phone verification form schema.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for multi-factor phone authentication verification form validation.\n */\nexport function createMultiFactorPhoneAuthVerifyFormSchema(ui: FirebaseUI) {\n return createPhoneAuthVerifyFormSchema(ui);\n}\n\n/**\n * Creates a Zod schema for multi-factor TOTP authentication number form validation.\n *\n * Validates that a display name is provided.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for multi-factor TOTP authentication number form validation.\n */\nexport function createMultiFactorTotpAuthNumberFormSchema(ui: FirebaseUI) {\n return z.object({\n displayName: z.string().min(1, getTranslation(ui, \"errors\", \"displayNameRequired\")),\n });\n}\n\n/**\n * Creates a Zod schema for multi-factor TOTP authentication verification form validation.\n *\n * Validates that the verification code is exactly 6 characters long.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for multi-factor TOTP authentication verification form validation.\n */\nexport function createMultiFactorTotpAuthVerifyFormSchema(ui: FirebaseUI) {\n return z.object({\n verificationCode: z.string().refine((val) => val.length === 6, {\n error: getTranslation(ui, \"errors\", \"invalidVerificationCode\"),\n }),\n });\n}\n\n/** The inferred type for the sign-in authentication form schema. */\nexport type SignInAuthFormSchema = z.infer<ReturnType<typeof createSignInAuthFormSchema>>;\n/** The inferred type for the sign-up authentication form schema. */\nexport type SignUpAuthFormSchema = z.infer<ReturnType<typeof createSignUpAuthFormSchema>>;\n/** The inferred type for the forgot password authentication form schema. */\nexport type ForgotPasswordAuthFormSchema = z.infer<ReturnType<typeof createForgotPasswordAuthFormSchema>>;\n/** The inferred type for the email link authentication form schema. */\nexport type EmailLinkAuthFormSchema = z.infer<ReturnType<typeof createEmailLinkAuthFormSchema>>;\n/** The inferred type for the phone authentication number form schema. */\nexport type PhoneAuthNumberFormSchema = z.infer<ReturnType<typeof createPhoneAuthNumberFormSchema>>;\n/** The inferred type for the phone authentication verification form schema. */\nexport type PhoneAuthVerifyFormSchema = z.infer<ReturnType<typeof createPhoneAuthVerifyFormSchema>>;\n/** The inferred type for the multi-factor phone authentication number form schema. */\nexport type MultiFactorPhoneAuthNumberFormSchema = z.infer<\n ReturnType<typeof createMultiFactorPhoneAuthNumberFormSchema>\n>;\n/** The inferred type for the multi-factor TOTP authentication number form schema. */\nexport type MultiFactorTotpAuthNumberFormSchema = z.infer<ReturnType<typeof createMultiFactorTotpAuthNumberFormSchema>>;\n/** The inferred type for the multi-factor TOTP authentication verification form schema. */\nexport type MultiFactorTotpAuthVerifyFormSchema = z.infer<ReturnType<typeof createMultiFactorTotpAuthVerifyFormSchema>>;\n","/// <reference types=\"vite/client\" />\n/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport pkgJson from \"../package.json\";\nimport { registerFramework } from \"./register-framework\";\n\nexport * from \"./auth\";\nexport * from \"./behaviors\";\nexport * from \"./config\";\nexport * from \"./country-data\";\nexport * from \"./errors\";\nexport * from \"./register-framework\";\nexport * from \"./schemas\";\nexport * from \"./translations\";\n\nif (import.meta.env?.PROD) {\n registerFramework(\"core\", pkgJson.version);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../package.json","../src/register-framework.ts","../src/translations.ts","../src/errors.ts","../src/behaviors/anonymous-upgrade.ts","../src/behaviors/auto-anonymous-login.ts","../src/behaviors/recaptcha.ts","../src/behaviors/provider-strategy.ts","../src/behaviors/one-tap.ts","../src/behaviors/require-display-name.ts","../src/country-data.ts","../src/behaviors/country-codes.ts","../src/behaviors/utils.ts","../src/behaviors/index.ts","../src/auth.ts","../src/config.ts","../src/schemas.ts","../src/index.ts"],"names":["package_default","registerFramework","framework","version","registerVersion","getTranslation","ui","category","key","replacements","_getTranslation","FirebaseUIError","_FirebaseUIError","FirebaseError","error","message","ERROR_CODE_MAP","handleFirebaseError","isFirebaseError","errorContainsCredential","resolver","getMultiFactorResolver","autoUpgradeAnonymousCredentialHandler","credential","onUpgrade","currentUser","oldUserId","result","linkWithCredential","autoUpgradeAnonymousProviderHandler","provider","getBehavior","autoUpgradeAnonymousUserRedirectHandler","autoAnonymousLoginHandler","auth","signInAnonymously","recaptchaVerificationHandler","element","options","RecaptchaVerifier","signInWithRediectHandler","signInWithRedirect","signInWithPopupHandler","signInWithPopup","linkWithRedirectHandler","_ui","user","linkWithRedirect","linkWithPopupHandler","linkWithPopup","oneTapSignInHandler","script","response","GoogleAuthProvider","signInWithCredential","requireDisplayNameHandler","_","displayName","updateProfile","countryData","formatPhoneNumber","phoneNumber","parsedNumber","parsePhoneNumberWithError","formatIncompletePhoneNumber","cleaned","countryCodesHandler","allowedCountries","country","defaultCountry","callableBehavior","handler","redirectBehavior","initBehavior","autoAnonymousLogin","autoUpgradeAnonymousUsers","recaptchaVerification","providerRedirectStrategy","providerPopupStrategy","oneTapSignIn","requireDisplayName","countryCodes","hasBehavior","defaultBehaviors","handlePendingCredential","pendingCredString","pendingCred","setPendingState","signInWithEmailAndPassword","email","password","EmailAuthProvider","_signInWithCredential","createUserWithEmailAndPassword","_createUserWithEmailAndPassword","verifyPhoneNumber","appVerifier","mfaUser","mfaHint","PhoneAuthProvider","session","confirmPhoneNumber","verificationId","verificationCode","sendPasswordResetEmail","_sendPasswordResetEmail","sendSignInLinkToEmail","actionCodeSettings","_sendSignInLinkToEmail","signInWithEmailLink","link","userCredential","signInWithCustomToken","customToken","_signInWithCustomToken","_signInAnonymously","signInWithProvider","completeEmailLinkSignIn","currentUrl","_isSignInWithEmailLink","generateTotpQrCode","secret","accountName","issuer","uri","qr","QRCode","signInWithMultiFactorAssertion","assertion","enrollWithMultiFactorAssertion","multiFactor","generateTotpSecret","TotpMultiFactorGenerator","$config","map","initializeUI","config","name","behaviors","acc","behavior","deepMap","getAuth","enUs","locale","state","store","initBehaviors","redirectBehaviors","getRedirectResult","createSignInAuthFormSchema","createSignUpAuthFormSchema","displayNameRequiredMessage","createForgotPasswordAuthFormSchema","createEmailLinkAuthFormSchema","createPhoneAuthNumberFormSchema","createPhoneAuthVerifyFormSchema","val","createMultiFactorPhoneAuthNumberFormSchema","createMultiFactorPhoneAuthAssertionFormSchema","createMultiFactorPhoneAuthVerifyFormSchema","createMultiFactorTotpAuthNumberFormSchema","createMultiFactorTotpAuthVerifyFormSchema"],"mappings":"yxBAAA,IAAAA,CAAAA,CAAA,CAEE,QAAW,mBAqEb,CAAA,CC/CO,SAASC,CAAAA,CAAkBC,EAAmBC,CAAAA,CAAiB,CACpEC,eAAAA,CAAgB,iBAAA,CAAmBD,EAASD,CAAS,EACvD,CCWO,SAASG,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACA,CACA,OAAOC,eAAgBJ,CAAAA,CAAG,MAAA,CAAQC,CAAAA,CAAUC,CAAAA,CAAKC,CAAY,CAC/D,CCnBO,IAAME,CAAAA,CAAN,MAAMC,CAAAA,SAAwBC,aAAc,CACjD,WAAA,CAAYP,EAAgBQ,CAAAA,CAAsB,CAChD,IAAMC,CAAAA,CAAUV,EAAeC,CAAAA,CAAI,QAAA,CAAUU,cAAAA,CAAeF,CAAAA,CAAM,IAAiB,CAAC,CAAA,CACpF,KAAA,CAAMA,CAAAA,CAAM,KAAMC,CAAAA,EAAWD,CAAAA,CAAM,OAAO,CAAA,CAG1C,MAAA,CAAO,cAAA,CAAe,IAAA,CAAMF,CAAAA,CAAgB,SAAS,EACvD,CACF,EAaO,SAASK,EAAoBX,CAAAA,CAAgBQ,CAAAA,CAAuB,CAEzE,GAAI,CAACI,CAAAA,CAAgBJ,CAAK,CAAA,CACxB,MAAMA,EAUR,GALIA,CAAAA,CAAM,IAAA,GAAS,+CAAA,EAAmDK,EAAwBL,CAAK,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C,CACH,CAUO,SAASwJ,EAAAA,CAA2CxJ,CAAAA,CAAgB,CAEzE,OADaqJ,CAAAA,CAAgCrJ,CAAE,CAAA,CACnC,MAAA,CAAO,CACjB,WAAA,CAAe,CAAA,CAAA,MAAA,EAAO,CAAE,GAAA,CAAI,EAAGD,CAAAA,CAAeC,CAAAA,CAAI,QAAA,CAAU,qBAAqB,CAAC,CACpF,CAAC,CACH,CAUO,SAASyJ,EAAAA,CAA8CzJ,CAAAA,CAAgB,CAC5E,OAAOqJ,CAAAA,CAAgCrJ,CAAE,CAC3C,CAUO,SAAS0J,EAAAA,CAA2C1J,CAAAA,CAAgB,CACzE,OAAOsJ,GAAgCtJ,CAAE,CAC3C,CAUO,SAAS2J,GAA0C3J,CAAAA,CAAgB,CACxE,OAAS,CAAA,CAAA,MAAA,CAAO,CACd,WAAA,CAAe,CAAA,CAAA,MAAA,EAAO,CAAE,GAAA,CAAI,EAAGD,CAAAA,CAAeC,CAAAA,CAAI,QAAA,CAAU,qBAAqB,CAAC,CACpF,CAAC,CACH,CAUO,SAAS4J,EAAAA,CAA0C5J,CAAAA,CAAgB,CACxE,OAAS,CAAA,CAAA,MAAA,CAAO,CACd,gBAAA,CAAoB,CAAA,CAAA,MAAA,GAAS,MAAA,CAAQuJ,CAAAA,EAAQA,CAAAA,CAAI,MAAA,GAAW,EAAG,CAC7D,KAAA,CAAOxJ,CAAAA,CAAeC,CAAAA,CAAI,SAAU,yBAAyB,CAC/D,CAAC,CACH,CAAC,CACH,CC7JEL,CAAAA,CAAkB,MAAA,CAAQD,EAAQ,OAAO,CAAA","file":"index.js","sourcesContent":["{\n \"name\": \"@firebase-oss/ui-core\",\n \"version\": \"0.0.2-exp.779b039\",\n \"description\": \"Core authentication service for Firebase UI\",\n \"type\": \"module\",\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./brands/*\": \"./brands/*\"\n },\n \"files\": [\n \"dist\",\n \"brands\"\n ],\n \"scripts\": {\n \"prepare\": \"pnpm run build\",\n \"emulators:start\": \"firebase emulators:start -P demo-firebaseui\",\n \"build\": \"tsup --env.PROD=true\",\n \"build:local\": \"pnpm run build && pnpm pack\",\n \"dev\": \"tsup --watch\",\n \"lint\": \"eslint . --ext .ts\",\n \"lint:fix\": \"eslint . --ext .ts --fix\",\n \"format\": \"prettier --write \\\"src/**/*.ts\\\" \\\"tests/**/*.ts\\\"\",\n \"format:check\": \"prettier --check \\\"src/**/*.ts\\\" \\\"tests/**/*.ts\\\"\",\n \"clean\": \"rimraf dist\",\n \"test:unit\": \"vitest run src\",\n \"test:unit:watch\": \"vitest tests\",\n \"test:integration\": \"vitest run tests\",\n \"test:integration:watch\": \"vitest integration\",\n \"test\": \"vitest run\",\n \"version:bump\": \"pnpm version patch\",\n \"publish:tags\": \"sh -c 'TAG=\\\"${npm_package_name}@${npm_package_version}\\\"; git tag --list \\\"$TAG\\\" | grep . || git tag \\\"$TAG\\\"; git push origin \\\"$TAG\\\"'\",\n \"publish:npm\": \"../../publish.sh\",\n \"release\": \"pnpm run build && pnpm pack --pack-destination --pack-destination ../../releases/\"\n },\n \"keywords\": [\n \"firebase\",\n \"auth\",\n \"authentication\",\n \"firebaseui\"\n ],\n \"author\": \"TODO\",\n \"license\": \"MIT\",\n \"peerDependencies\": {\n \"firebase\": \"catalog:peerDependencies\"\n },\n \"dependencies\": {\n \"@firebase-oss/ui-translations\": \"workspace:*\",\n \"@nanostores/deepmap\": \"catalog:\",\n \"libphonenumber-js\": \"^1.12.23\",\n \"nanostores\": \"catalog:\",\n \"qrcode-generator\": \"^2.0.4\",\n \"zod\": \"catalog:\"\n },\n \"devDependencies\": {\n \"@types/google-one-tap\": \"^1.2.6\",\n \"@types/jsdom\": \"catalog:\",\n \"firebase\": \"catalog:\",\n \"jsdom\": \"catalog:\",\n \"rimraf\": \"catalog:\",\n \"tsup\": \"catalog:\",\n \"typescript\": \"catalog:\",\n \"vite\": \"catalog:\",\n \"vitest\": \"catalog:\"\n }\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { registerVersion } from \"firebase/app\";\n\n/**\n * Register a framework with the FirebaseUI configuration.\n * @internal\n * @param framework The type of framework being registered.\n * @param version The version of the framework being registered.\n */\nexport function registerFramework(framework: string, version: string) {\n registerVersion(\"firebase-ui-web\", version, framework);\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport {\n getTranslation as _getTranslation,\n type TranslationCategory,\n type TranslationKey,\n} from \"@firebase-oss/ui-translations\";\nimport { type FirebaseUI } from \"./config\";\n\n/**\n * Gets a translated string for a given category and key.\n *\n * Example:\n * ```typescript\n * const translation = getTranslation(ui, \"errors\", \"userNotFound\");\n * ```\n *\n * @param ui - The FirebaseUI instance.\n * @param category - The translation category.\n * @param key - The translation key.\n * @param replacements - Optional replacements for placeholders.\n * @returns The translated string.\n */\nexport function getTranslation<T extends TranslationCategory>(\n ui: FirebaseUI,\n category: T,\n key: TranslationKey<T>,\n replacements?: Record<string, string>\n) {\n return _getTranslation(ui.locale, category, key, replacements);\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { ERROR_CODE_MAP, type ErrorCode } from \"@firebase-oss/ui-translations\";\nimport { FirebaseError } from \"firebase/app\";\nimport { type AuthCredential, getMultiFactorResolver, type MultiFactorError } from \"firebase/auth\";\nimport { type FirebaseUI } from \"./config\";\nimport { getTranslation } from \"./translations\";\n\n/**\n * A custom error class that extends FirebaseError and provides a translated error message based on the configured locale.\n */\nexport class FirebaseUIError extends FirebaseError {\n constructor(ui: FirebaseUI, error: FirebaseError) {\n const message = getTranslation(ui, \"errors\", ERROR_CODE_MAP[error.code as ErrorCode]);\n super(error.code, message || error.message);\n\n // Ensures that `instanceof FirebaseUIError` works, alongside `instanceof FirebaseError`\n Object.setPrototypeOf(this, FirebaseUIError.prototype);\n }\n}\n\n/**\n * Handles a Firebase error and throws a FirebaseUIError if it is a Firebase error.\n *\n * Addtionally, handles the following error codes:\n * - auth/account-exists-with-different-credential - stores the credential in sessionStorage.\n * - auth/multi-factor-auth-required - updates the UI instance with the multi-factor resolver.\n *\n * @param ui - The FirebaseUI instance.\n * @param error - The error to handle.\n * @returns {never} A never type.\n */\nexport function handleFirebaseError(ui: FirebaseUI, error: unknown): never {\n // If it's not a Firebase error, then we just throw it and preserve the original error.\n if (!isFirebaseError(error)) {\n throw error;\n }\n\n // TODO(ehesp): Type error as unknown, check instance of FirebaseError\n // TODO(ehesp): Support via behavior\n if (error.code === \"auth/account-exists-with-different-credential\" && errorContainsCredential(error)) {\n window.sessionStorage.setItem(\"pendingCred\", JSON.stringify(error.credential.toJSON()));\n }\n\n // Update the UI with the multi-factor resolver if the error is thrown.\n if (error.code === \"auth/multi-factor-auth-required\") {\n const resolver = getMultiFactorResolver(ui.auth, error as MultiFactorError);\n ui.setMultiFactorResolver(resolver);\n }\n\n throw new FirebaseUIError(ui, error);\n}\n\n// Utility to obtain whether something is a FirebaseError\nfunction isFirebaseError(error: unknown): error is FirebaseError {\n // Calling instanceof FirebaseError is not working - not sure why yet.\n return !!error && typeof error === \"object\" && \"code\" in error && \"message\" in error;\n}\n\n// Utility to obtain whether something is a FirebaseError that contains a credential - doesn't seemed to be typed?\nfunction errorContainsCredential(error: FirebaseError): error is FirebaseError & { credential: AuthCredential } {\n return \"credential\" in error;\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { type AuthCredential, type AuthProvider, linkWithCredential, type UserCredential } from \"firebase/auth\";\nimport { type FirebaseUI } from \"~/config\";\nimport { getBehavior } from \"~/behaviors\";\n\nexport type OnUpgradeCallback = (ui: FirebaseUI, oldUserId: string, credential: UserCredential) => Promise<void> | void;\n\nexport const autoUpgradeAnonymousCredentialHandler = async (\n ui: FirebaseUI,\n credential: AuthCredential,\n onUpgrade?: OnUpgradeCallback\n) => {\n const currentUser = ui.auth.currentUser;\n\n if (!currentUser?.isAnonymous) {\n return;\n }\n\n const oldUserId = currentUser.uid;\n\n const result = await linkWithCredential(currentUser, credential);\n\n if (onUpgrade) {\n await onUpgrade(ui, oldUserId, result);\n }\n\n return result;\n};\n\nexport const autoUpgradeAnonymousProviderHandler = async (\n ui: FirebaseUI,\n provider: AuthProvider,\n onUpgrade?: OnUpgradeCallback\n) => {\n const currentUser = ui.auth.currentUser;\n\n if (!currentUser?.isAnonymous) {\n return;\n }\n\n const oldUserId = currentUser.uid;\n\n window.localStorage.setItem(\"fbui:upgrade:oldUserId\", oldUserId);\n\n const result = await getBehavior(ui, \"providerLinkStrategy\")(ui, currentUser, provider);\n\n // If we got here, the user has been linked via a popup, so we need to call the onUpgrade callback\n // and delete the oldUserId from localStorage.\n // If we didn't get here, they'll be redirected and we'll handle the result inside of the autoUpgradeAnonymousUserRedirectHandler.\n\n window.localStorage.removeItem(\"fbui:upgrade:oldUserId\");\n\n if (onUpgrade) {\n await onUpgrade(ui, oldUserId, result);\n }\n\n return result;\n};\n\nexport const autoUpgradeAnonymousUserRedirectHandler = async (\n ui: FirebaseUI,\n credential: UserCredential | null,\n onUpgrade?: OnUpgradeCallback\n) => {\n const oldUserId = window.localStorage.getItem(\"fbui:upgrade:oldUserId\");\n\n // Always clean up localStorage once we've retrieved the oldUserId\n if (oldUserId) {\n window.localStorage.removeItem(\"fbui:upgrade:oldUserId\");\n }\n\n if (!onUpgrade || !oldUserId || !credential) {\n return;\n }\n\n await onUpgrade(ui, oldUserId, credential);\n};\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { signInAnonymously } from \"firebase/auth\";\nimport { type InitHandler } from \"./utils\";\n\nexport const autoAnonymousLoginHandler: InitHandler = async (ui) => {\n const auth = ui.auth;\n\n if (!auth.currentUser) {\n await signInAnonymously(auth);\n }\n};\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { RecaptchaVerifier } from \"firebase/auth\";\nimport { type FirebaseUI } from \"~/config\";\n\nexport type RecaptchaVerificationOptions = {\n size?: \"normal\" | \"invisible\" | \"compact\";\n theme?: \"light\" | \"dark\";\n tabindex?: number;\n};\n\nexport const recaptchaVerificationHandler = (\n ui: FirebaseUI,\n element: HTMLElement,\n options?: RecaptchaVerificationOptions\n) => {\n return new RecaptchaVerifier(ui.auth, element, {\n size: options?.size ?? \"invisible\",\n theme: options?.theme ?? \"light\",\n tabindex: options?.tabindex ?? 0,\n });\n};\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport {\n type AuthProvider,\n linkWithPopup,\n linkWithRedirect,\n signInWithPopup,\n signInWithRedirect,\n type User,\n type UserCredential,\n} from \"firebase/auth\";\nimport { type FirebaseUI } from \"~/config\";\n\nexport type ProviderSignInStrategyHandler = (ui: FirebaseUI, provider: AuthProvider) => Promise<never | UserCredential>;\nexport type ProviderLinkStrategyHandler = (\n ui: FirebaseUI,\n user: User,\n provider: AuthProvider\n) => Promise<never | UserCredential>;\n\nexport const signInWithRediectHandler: ProviderSignInStrategyHandler = async (ui, provider) => {\n return signInWithRedirect(ui.auth, provider);\n};\n\nexport const signInWithPopupHandler: ProviderSignInStrategyHandler = async (ui, provider) => {\n return signInWithPopup(ui.auth, provider);\n};\n\nexport const linkWithRedirectHandler: ProviderLinkStrategyHandler = async (_ui, user, provider) => {\n return linkWithRedirect(user, provider);\n};\n\nexport const linkWithPopupHandler: ProviderLinkStrategyHandler = async (_ui, user, provider) => {\n return linkWithPopup(user, provider);\n};\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { GoogleAuthProvider } from \"firebase/auth\";\nimport type { IdConfiguration } from \"google-one-tap\";\nimport type { FirebaseUI } from \"~/config\";\nimport { signInWithCredential } from \"~/auth\";\n\nexport type OneTapSignInOptions = {\n clientId: IdConfiguration[\"client_id\"];\n autoSelect?: IdConfiguration[\"auto_select\"];\n cancelOnTapOutside?: IdConfiguration[\"cancel_on_tap_outside\"];\n context?: IdConfiguration[\"context\"];\n uxMode?: IdConfiguration[\"ux_mode\"];\n logLevel?: IdConfiguration[\"log_level\"];\n};\n\nexport const oneTapSignInHandler = async (ui: FirebaseUI, options: OneTapSignInOptions) => {\n // Only show one-tap if user is not signed in OR if they are anonymous.\n // Don't show if user is already signed in with a real account.\n if (ui.auth.currentUser && !ui.auth.currentUser.isAnonymous) {\n return;\n }\n\n // Prevent multiple instances of the script from being loaded, e.g. hot reload.\n if (document.querySelector(\"script[data-one-tap-sign-in]\")) {\n return;\n }\n\n const script = document.createElement(\"script\");\n script.setAttribute(\"data-one-tap-sign-in\", \"true\");\n script.src = \"https://accounts.google.com/gsi/client\";\n script.async = true;\n\n script.onload = () => {\n window.google.accounts.id.initialize({\n client_id: options.clientId,\n auto_select: options.autoSelect,\n cancel_on_tap_outside: options.cancelOnTapOutside,\n context: options.context,\n ux_mode: options.uxMode,\n log_level: options.logLevel,\n callback: async (response) => {\n const credential = GoogleAuthProvider.credential(response.credential);\n await signInWithCredential(ui, credential);\n },\n });\n\n window.google.accounts.id.prompt();\n };\n\n document.body.appendChild(script);\n};\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { updateProfile, type User } from \"firebase/auth\";\nimport { type FirebaseUI } from \"~/config\";\n\nexport const requireDisplayNameHandler = async (_: FirebaseUI, user: User, displayName: string) => {\n await updateProfile(user, { displayName });\n};\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { formatIncompletePhoneNumber, parsePhoneNumberWithError, type CountryCode } from \"libphonenumber-js\";\n\n/**\n * An array of country data objects containing name, dial code, country code, and emoji for all supported countries.\n */\nexport const countryData = [\n { name: \"Afghanistan\", dialCode: \"+93\", code: \"AF\", emoji: \"๐ฆ๐ซ\" },\n { name: \"Albania\", dialCode: \"+355\", code: \"AL\", emoji: \"๐ฆ๐ฑ\" },\n { name: \"Algeria\", dialCode: \"+213\", code: \"DZ\", emoji: \"๐ฉ๐ฟ\" },\n { name: \"American Samoa\", dialCode: \"+1\", code: \"AS\", emoji: \"๐ฆ๐ธ\" },\n { name: \"Andorra\", dialCode: \"+376\", code: \"AD\", emoji: \"๐ฆ๐ฉ\" },\n { name: \"Angola\", dialCode: \"+244\", code: \"AO\", emoji: \"๐ฆ๐ด\" },\n { name: \"Anguilla\", dialCode: \"+1\", code: \"AI\", emoji: \"๐ฆ๐ฎ\" },\n { name: \"Antigua and Barbuda\", dialCode: \"+1\", code: \"AG\", emoji: \"๐ฆ๐ฌ\" },\n { name: \"Argentina\", dialCode: \"+54\", code: \"AR\", emoji: \"๐ฆ๐ท\" },\n { name: \"Armenia\", dialCode: \"+374\", code: \"AM\", emoji: \"๐ฆ๐ฒ\" },\n { name: \"Aruba\", dialCode: \"+297\", code: \"AW\", emoji: \"๐ฆ๐ผ\" },\n { name: \"Ascension Island\", dialCode: \"+247\", code: \"AC\", emoji: \"๐ฆ๐จ\" },\n { name: \"Australia\", dialCode: \"+61\", code: \"AU\", emoji: \"๐ฆ๐บ\" },\n { name: \"Austria\", dialCode: \"+43\", code: \"AT\", emoji: \"๐ฆ๐น\" },\n { name: \"Azerbaijan\", dialCode: \"+994\", code: \"AZ\", emoji: \"๐ฆ๐ฟ\" },\n { name: \"Bahamas\", dialCode: \"+1\", code: \"BS\", emoji: \"๐ง๐ธ\" },\n { name: \"Bahrain\", dialCode: \"+973\", code: \"BH\", emoji: \"๐ง๐ญ\" },\n { name: \"Bangladesh\", dialCode: \"+880\", code: \"BD\", emoji: \"๐ง๐ฉ\" },\n { name: \"Barbados\", dialCode: \"+1\", code: \"BB\", emoji: \"๐ง๐ง\" },\n { name: \"Belarus\", dialCode: \"+375\", code: \"BY\", emoji: \"๐ง๐พ\" },\n { name: \"Belgium\", dialCode: \"+32\", code: \"BE\", emoji: \"๐ง๐ช\" },\n { name: \"Belize\", dialCode: \"+501\", code: \"BZ\", emoji: \"๐ง๐ฟ\" },\n { name: \"Benin\", dialCode: \"+229\", code: \"BJ\", emoji: \"๐ง๐ฏ\" },\n { name: \"Bermuda\", dialCode: \"+1\", code: \"BM\", emoji: \"๐ง๐ฒ\" },\n { name: \"Bhutan\", dialCode: \"+975\", code: \"BT\", emoji: \"๐ง๐น\" },\n { name: \"Bolivia\", dialCode: \"+591\", code: \"BO\", emoji: \"๐ง๐ด\" },\n { name: \"Bosnia and Herzegovina\", dialCode: \"+387\", code: \"BA\", emoji: \"๐ง๐ฆ\" },\n { name: \"Botswana\", dialCode: \"+267\", code: \"BW\", emoji: \"๐ง๐ผ\" },\n { name: \"Brazil\", dialCode: \"+55\", code: \"BR\", emoji: \"๐ง๐ท\" },\n { name: \"British Indian Ocean Territory\", dialCode: \"+246\", code: \"IO\", emoji: \"๐ฎ๐ด\" },\n { name: \"British Virgin Islands\", dialCode: \"+1\", code: \"VG\", emoji: \"๐ป๐ฌ\" },\n { name: \"Brunei\", dialCode: \"+673\", code: \"BN\", emoji: \"๐ง๐ณ\" },\n { name: \"Bulgaria\", dialCode: \"+359\", code: \"BG\", emoji: \"๐ง๐ฌ\" },\n { name: \"Burkina Faso\", dialCode: \"+226\", code: \"BF\", emoji: \"๐ง๐ซ\" },\n { name: \"Burundi\", dialCode: \"+257\", code: \"BI\", emoji: \"๐ง๐ฎ\" },\n { name: \"Cambodia\", dialCode: \"+855\", code: \"KH\", emoji: \"๐ฐ๐ญ\" },\n { name: \"Cameroon\", dialCode: \"+237\", code: \"CM\", emoji: \"๐จ๐ฒ\" },\n { name: \"Canada\", dialCode: \"+1\", code: \"CA\", emoji: \"๐จ๐ฆ\" },\n { name: \"Cape Verde\", dialCode: \"+238\", code: \"CV\", emoji: \"๐จ๐ป\" },\n { name: \"Caribbean Netherlands\", dialCode: \"+599\", code: \"BQ\", emoji: \"๐ง๐ถ\" },\n { name: \"Cayman Islands\", dialCode: \"+1\", code: \"KY\", emoji: \"๐ฐ๐พ\" },\n { name: \"Central African Republic\", dialCode: \"+236\", code: \"CF\", emoji: \"๐จ๐ซ\" },\n { name: \"Chad\", dialCode: \"+235\", code: \"TD\", emoji: \"๐น๐ฉ\" },\n { name: \"Chile\", dialCode: \"+56\", code: \"CL\", emoji: \"๐จ๐ฑ\" },\n { name: \"China\", dialCode: \"+86\", code: \"CN\", emoji: \"๐จ๐ณ\" },\n { name: \"Christmas Island\", dialCode: \"+61\", code: \"CX\", emoji: \"๐จ๐ฝ\" },\n { name: \"Cocos [Keeling] Islands\", dialCode: \"+61\", code: \"CC\", emoji: \"๐จ๐จ\" },\n { name: \"Colombia\", dialCode: \"+57\", code: \"CO\", emoji: \"๐จ๐ด\" },\n { name: \"Comoros\", dialCode: \"+269\", code: \"KM\", emoji: \"๐ฐ๐ฒ\" },\n { name: \"Democratic Republic Congo\", dialCode: \"+243\", code: \"CD\", emoji: \"๐จ๐ฉ\" },\n { name: \"Republic of Congo\", dialCode: \"+242\", code: \"CG\", emoji: \"๐จ๐ฌ\" },\n { name: \"Cook Islands\", dialCode: \"+682\", code: \"CK\", emoji: \"๐จ๐ฐ\" },\n { name: \"Costa Rica\", dialCode: \"+506\", code: \"CR\", emoji: \"๐จ๐ท\" },\n { name: \"Cรดte d'Ivoire\", dialCode: \"+225\", code: \"CI\", emoji: \"๐จ๐ฎ\" },\n { name: \"Croatia\", dialCode: \"+385\", code: \"HR\", emoji: \"๐ญ๐ท\" },\n { name: \"Cuba\", dialCode: \"+53\", code: \"CU\", emoji: \"๐จ๐บ\" },\n { name: \"Curaรงao\", dialCode: \"+599\", code: \"CW\", emoji: \"๐จ๐ผ\" },\n { name: \"Cyprus\", dialCode: \"+357\", code: \"CY\", emoji: \"๐จ๐พ\" },\n { name: \"Czech Republic\", dialCode: \"+420\", code: \"CZ\", emoji: \"๐จ๐ฟ\" },\n { name: \"Denmark\", dialCode: \"+45\", code: \"DK\", emoji: \"๐ฉ๐ฐ\" },\n { name: \"Djibouti\", dialCode: \"+253\", code: \"DJ\", emoji: \"๐ฉ๐ฏ\" },\n { name: \"Dominica\", dialCode: \"+1\", code: \"DM\", emoji: \"๐ฉ๐ฒ\" },\n { name: \"Dominican Republic\", dialCode: \"+1\", code: \"DO\", emoji: \"๐ฉ๐ด\" },\n { name: \"East Timor\", dialCode: \"+670\", code: \"TL\", emoji: \"๐น๐ฑ\" },\n { name: \"Ecuador\", dialCode: \"+593\", code: \"EC\", emoji: \"๐ช๐จ\" },\n { name: \"Egypt\", dialCode: \"+20\", code: \"EG\", emoji: \"๐ช๐ฌ\" },\n { name: \"El Salvador\", dialCode: \"+503\", code: \"SV\", emoji: \"๐ธ๐ป\" },\n { name: \"Equatorial Guinea\", dialCode: \"+240\", code: \"GQ\", emoji: \"๐ฌ๐ถ\" },\n { name: \"Eritrea\", dialCode: \"+291\", code: \"ER\", emoji: \"๐ช๐ท\" },\n { name: \"Estonia\", dialCode: \"+372\", code: \"EE\", emoji: \"๐ช๐ช\" },\n { name: \"Ethiopia\", dialCode: \"+251\", code: \"ET\", emoji: \"๐ช๐น\" },\n { name: \"Falkland Islands [Islas Malvinas]\", dialCode: \"+500\", code: \"FK\", emoji: \"๐ซ๐ฐ\" },\n { name: \"Faroe Islands\", dialCode: \"+298\", code: \"FO\", emoji: \"๐ซ๐ด\" },\n { name: \"Fiji\", dialCode: \"+679\", code: \"FJ\", emoji: \"๐ซ๐ฏ\" },\n { name: \"Finland\", dialCode: \"+358\", code: \"FI\", emoji: \"๐ซ๐ฎ\" },\n { name: \"France\", dialCode: \"+33\", code: \"FR\", emoji: \"๐ซ๐ท\" },\n { name: \"French Guiana\", dialCode: \"+594\", code: \"GF\", emoji: \"๐ฌ๐ซ\" },\n { name: \"French Polynesia\", dialCode: \"+689\", code: \"PF\", emoji: \"๐ต๐ซ\" },\n { name: \"Gabon\", dialCode: \"+241\", code: \"GA\", emoji: \"๐ฌ๐ฆ\" },\n { name: \"Gambia\", dialCode: \"+220\", code: \"GM\", emoji: \"๐ฌ๐ฒ\" },\n { name: \"Georgia\", dialCode: \"+995\", code: \"GE\", emoji: \"๐ฌ๐ช\" },\n { name: \"Germany\", dialCode: \"+49\", code: \"DE\", emoji: \"๐ฉ๐ช\" },\n { name: \"Ghana\", dialCode: \"+233\", code: \"GH\", emoji: \"๐ฌ๐ญ\" },\n { name: \"Gibraltar\", dialCode: \"+350\", code: \"GI\", emoji: \"๐ฌ๐ฎ\" },\n { name: \"Greece\", dialCode: \"+30\", code: \"GR\", emoji: \"๐ฌ๐ท\" },\n { name: \"Greenland\", dialCode: \"+299\", code: \"GL\", emoji: \"๐ฌ๐ฑ\" },\n { name: \"Grenada\", dialCode: \"+1\", code: \"GD\", emoji: \"๐ฌ๐ฉ\" },\n { name: \"Guadeloupe\", dialCode: \"+590\", code: \"GP\", emoji: \"๐ฌ๐ต\" },\n { name: \"Guam\", dialCode: \"+1\", code: \"GU\", emoji: \"๐ฌ๐บ\" },\n { name: \"Guatemala\", dialCode: \"+502\", code: \"GT\", emoji: \"๐ฌ๐น\" },\n { name: \"Guernsey\", dialCode: \"+44\", code: \"GG\", emoji: \"๐ฌ๐ฌ\" },\n { name: \"Guinea Conakry\", dialCode: \"+224\", code: \"GN\", emoji: \"๐ฌ๐ณ\" },\n { name: \"Guinea-Bissau\", dialCode: \"+245\", code: \"GW\", emoji: \"๐ฌ๐ผ\" },\n { name: \"Guyana\", dialCode: \"+592\", code: \"GY\", emoji: \"๐ฌ๐พ\" },\n { name: \"Haiti\", dialCode: \"+509\", code: \"HT\", emoji: \"๐ญ๐น\" },\n { name: \"Honduras\", dialCode: \"+504\", code: \"HN\", emoji: \"๐ญ๐ณ\" },\n { name: \"Hong Kong\", dialCode: \"+852\", code: \"HK\", emoji: \"๐ญ๐ฐ\" },\n { name: \"Hungary\", dialCode: \"+36\", code: \"HU\", emoji: \"๐ญ๐บ\" },\n { name: \"Iceland\", dialCode: \"+354\", code: \"IS\", emoji: \"๐ฎ๐ธ\" },\n { name: \"India\", dialCode: \"+91\", code: \"IN\", emoji: \"๐ฎ๐ณ\" },\n { name: \"Indonesia\", dialCode: \"+62\", code: \"ID\", emoji: \"๐ฎ๐ฉ\" },\n { name: \"Iran\", dialCode: \"+98\", code: \"IR\", emoji: \"๐ฎ๐ท\" },\n { name: \"Iraq\", dialCode: \"+964\", code: \"IQ\", emoji: \"๐ฎ๐ถ\" },\n { name: \"Ireland\", dialCode: \"+353\", code: \"IE\", emoji: \"๐ฎ๐ช\" },\n { name: \"Isle of Man\", dialCode: \"+44\", code: \"IM\", emoji: \"๐ฎ๐ฒ\" },\n { name: \"Israel\", dialCode: \"+972\", code: \"IL\", emoji: \"๐ฎ๐ฑ\" },\n { name: \"Italy\", dialCode: \"+39\", code: \"IT\", emoji: \"๐ฎ๐น\" },\n { name: \"Jamaica\", dialCode: \"+1\", code: \"JM\", emoji: \"๐ฏ๐ฒ\" },\n { name: \"Japan\", dialCode: \"+81\", code: \"JP\", emoji: \"๐ฏ๐ต\" },\n { name: \"Jersey\", dialCode: \"+44\", code: \"JE\", emoji: \"๐ฏ๐ช\" },\n { name: \"Jordan\", dialCode: \"+962\", code: \"JO\", emoji: \"๐ฏ๐ด\" },\n { name: \"Kazakhstan\", dialCode: \"+7\", code: \"KZ\", emoji: \"๐ฐ๐ฟ\" },\n { name: \"Kenya\", dialCode: \"+254\", code: \"KE\", emoji: \"๐ฐ๐ช\" },\n { name: \"Kiribati\", dialCode: \"+686\", code: \"KI\", emoji: \"๐ฐ๐ฎ\" },\n { name: \"Kosovo\", dialCode: \"+377\", code: \"XK\", emoji: \"๐ฝ๐ฐ\" },\n { name: \"Kosovo\", dialCode: \"+381\", code: \"XK\", emoji: \"๐ฝ๐ฐ\" },\n { name: \"Kosovo\", dialCode: \"+386\", code: \"XK\", emoji: \"๐ฝ๐ฐ\" },\n { name: \"Kuwait\", dialCode: \"+965\", code: \"KW\", emoji: \"๐ฐ๐ผ\" },\n { name: \"Kyrgyzstan\", dialCode: \"+996\", code: \"KG\", emoji: \"๐ฐ๐ฌ\" },\n { name: \"Laos\", dialCode: \"+856\", code: \"LA\", emoji: \"๐ฑ๐ฆ\" },\n { name: \"Latvia\", dialCode: \"+371\", code: \"LV\", emoji: \"๐ฑ๐ป\" },\n { name: \"Lebanon\", dialCode: \"+961\", code: \"LB\", emoji: \"๐ฑ๐ง\" },\n { name: \"Lesotho\", dialCode: \"+266\", code: \"LS\", emoji: \"๐ฑ๐ธ\" },\n { name: \"Liberia\", dialCode: \"+231\", code: \"LR\", emoji: \"๐ฑ๐ท\" },\n { name: \"Libya\", dialCode: \"+218\", code: \"LY\", emoji: \"๐ฑ๐พ\" },\n { name: \"Liechtenstein\", dialCode: \"+423\", code: \"LI\", emoji: \"๐ฑ๐ฎ\" },\n { name: \"Lithuania\", dialCode: \"+370\", code: \"LT\", emoji: \"๐ฑ๐น\" },\n { name: \"Luxembourg\", dialCode: \"+352\", code: \"LU\", emoji: \"๐ฑ๐บ\" },\n { name: \"Macau\", dialCode: \"+853\", code: \"MO\", emoji: \"๐ฒ๐ด\" },\n { name: \"Macedonia\", dialCode: \"+389\", code: \"MK\", emoji: \"๐ฒ๐ฐ\" },\n { name: \"Madagascar\", dialCode: \"+261\", code: \"MG\", emoji: \"๐ฒ๐ฌ\" },\n { name: \"Malawi\", dialCode: \"+265\", code: \"MW\", emoji: \"๐ฒ๐ผ\" },\n { name: \"Malaysia\", dialCode: \"+60\", code: \"MY\", emoji: \"๐ฒ๐พ\" },\n { name: \"Maldives\", dialCode: \"+960\", code: \"MV\", emoji: \"๐ฒ๐ป\" },\n { name: \"Mali\", dialCode: \"+223\", code: \"ML\", emoji: \"๐ฒ๐ฑ\" },\n { name: \"Malta\", dialCode: \"+356\", code: \"MT\", emoji: \"๐ฒ๐น\" },\n { name: \"Marshall Islands\", dialCode: \"+692\", code: \"MH\", emoji: \"๐ฒ๐ญ\" },\n { name: \"Martinique\", dialCode: \"+596\", code: \"MQ\", emoji: \"๐ฒ๐ถ\" },\n { name: \"Mauritania\", dialCode: \"+222\", code: \"MR\", emoji: \"๐ฒ๐ท\" },\n { name: \"Mauritius\", dialCode: \"+230\", code: \"MU\", emoji: \"๐ฒ๐บ\" },\n { name: \"Mayotte\", dialCode: \"+262\", code: \"YT\", emoji: \"๐พ๐น\" },\n { name: \"Mexico\", dialCode: \"+52\", code: \"MX\", emoji: \"๐ฒ๐ฝ\" },\n { name: \"Micronesia\", dialCode: \"+691\", code: \"FM\", emoji: \"๐ซ๐ฒ\" },\n { name: \"Moldova\", dialCode: \"+373\", code: \"MD\", emoji: \"๐ฒ๐ฉ\" },\n { name: \"Monaco\", dialCode: \"+377\", code: \"MC\", emoji: \"๐ฒ๐จ\" },\n { name: \"Mongolia\", dialCode: \"+976\", code: \"MN\", emoji: \"๐ฒ๐ณ\" },\n { name: \"Montenegro\", dialCode: \"+382\", code: \"ME\", emoji: \"๐ฒ๐ช\" },\n { name: \"Montserrat\", dialCode: \"+1\", code: \"MS\", emoji: \"๐ฒ๐ธ\" },\n { name: \"Morocco\", dialCode: \"+212\", code: \"MA\", emoji: \"๐ฒ๐ฆ\" },\n { name: \"Mozambique\", dialCode: \"+258\", code: \"MZ\", emoji: \"๐ฒ๐ฟ\" },\n { name: \"Myanmar [Burma]\", dialCode: \"+95\", code: \"MM\", emoji: \"๐ฒ๐ฒ\" },\n { name: \"Namibia\", dialCode: \"+264\", code: \"NA\", emoji: \"๐ณ๐ฆ\" },\n { name: \"Nauru\", dialCode: \"+674\", code: \"NR\", emoji: \"๐ณ๐ท\" },\n { name: \"Nepal\", dialCode: \"+977\", code: \"NP\", emoji: \"๐ณ๐ต\" },\n { name: \"Netherlands\", dialCode: \"+31\", code: \"NL\", emoji: \"๐ณ๐ฑ\" },\n { name: \"New Caledonia\", dialCode: \"+687\", code: \"NC\", emoji: \"๐ณ๐จ\" },\n { name: \"New Zealand\", dialCode: \"+64\", code: \"NZ\", emoji: \"๐ณ๐ฟ\" },\n { name: \"Nicaragua\", dialCode: \"+505\", code: \"NI\", emoji: \"๐ณ๐ฎ\" },\n { name: \"Niger\", dialCode: \"+227\", code: \"NE\", emoji: \"๐ณ๐ช\" },\n { name: \"Nigeria\", dialCode: \"+234\", code: \"NG\", emoji: \"๐ณ๐ฌ\" },\n { name: \"Niue\", dialCode: \"+683\", code: \"NU\", emoji: \"๐ณ๐บ\" },\n { name: \"Norfolk Island\", dialCode: \"+672\", code: \"NF\", emoji: \"๐ณ๐ซ\" },\n { name: \"North Korea\", dialCode: \"+850\", code: \"KP\", emoji: \"๐ฐ๐ต\" },\n { name: \"Northern Mariana Islands\", dialCode: \"+1\", code: \"MP\", emoji: \"๐ฒ๐ต\" },\n { name: \"Norway\", dialCode: \"+47\", code: \"NO\", emoji: \"๐ณ๐ด\" },\n { name: \"Oman\", dialCode: \"+968\", code: \"OM\", emoji: \"๐ด๐ฒ\" },\n { name: \"Pakistan\", dialCode: \"+92\", code: \"PK\", emoji: \"๐ต๐ฐ\" },\n { name: \"Palau\", dialCode: \"+680\", code: \"PW\", emoji: \"๐ต๐ผ\" },\n { name: \"Palestinian Territories\", dialCode: \"+970\", code: \"PS\", emoji: \"๐ต๐ธ\" },\n { name: \"Panama\", dialCode: \"+507\", code: \"PA\", emoji: \"๐ต๐ฆ\" },\n { name: \"Papua New Guinea\", dialCode: \"+675\", code: \"PG\", emoji: \"๐ต๐ฌ\" },\n { name: \"Paraguay\", dialCode: \"+595\", code: \"PY\", emoji: \"๐ต๐พ\" },\n { name: \"Peru\", dialCode: \"+51\", code: \"PE\", emoji: \"๐ต๐ช\" },\n { name: \"Philippines\", dialCode: \"+63\", code: \"PH\", emoji: \"๐ต๐ญ\" },\n { name: \"Poland\", dialCode: \"+48\", code: \"PL\", emoji: \"๐ต๐ฑ\" },\n { name: \"Portugal\", dialCode: \"+351\", code: \"PT\", emoji: \"๐ต๐น\" },\n { name: \"Puerto Rico\", dialCode: \"+1\", code: \"PR\", emoji: \"๐ต๐ท\" },\n { name: \"Qatar\", dialCode: \"+974\", code: \"QA\", emoji: \"๐ถ๐ฆ\" },\n { name: \"Rรฉunion\", dialCode: \"+262\", code: \"RE\", emoji: \"๐ท๐ช\" },\n { name: \"Romania\", dialCode: \"+40\", code: \"RO\", emoji: \"๐ท๐ด\" },\n { name: \"Russia\", dialCode: \"+7\", code: \"RU\", emoji: \"๐ท๐บ\" },\n { name: \"Rwanda\", dialCode: \"+250\", code: \"RW\", emoji: \"๐ท๐ผ\" },\n { name: \"Saint Barthรฉlemy\", dialCode: \"+590\", code: \"BL\", emoji: \"๐ง๐ฑ\" },\n { name: \"Saint Helena\", dialCode: \"+290\", code: \"SH\", emoji: \"๐ธ๐ญ\" },\n { name: \"St. Kitts\", dialCode: \"+1\", code: \"KN\", emoji: \"๐ฐ๐ณ\" },\n { name: \"St. Lucia\", dialCode: \"+1\", code: \"LC\", emoji: \"๐ฑ๐จ\" },\n { name: \"Saint Martin\", dialCode: \"+590\", code: \"MF\", emoji: \"๐ฒ๐ซ\" },\n { name: \"Saint Pierre and Miquelon\", dialCode: \"+508\", code: \"PM\", emoji: \"๐ต๐ฒ\" },\n { name: \"St. Vincent\", dialCode: \"+1\", code: \"VC\", emoji: \"๐ป๐จ\" },\n { name: \"Samoa\", dialCode: \"+685\", code: \"WS\", emoji: \"๐ผ๐ธ\" },\n { name: \"San Marino\", dialCode: \"+378\", code: \"SM\", emoji: \"๐ธ๐ฒ\" },\n { name: \"Sรฃo Tomรฉ and Prรญncipe\", dialCode: \"+239\", code: \"ST\", emoji: \"๐ธ๐น\" },\n { name: \"Saudi Arabia\", dialCode: \"+966\", code: \"SA\", emoji: \"๐ธ๐ฆ\" },\n { name: \"Senegal\", dialCode: \"+221\", code: \"SN\", emoji: \"๐ธ๐ณ\" },\n { name: \"Serbia\", dialCode: \"+381\", code: \"RS\", emoji: \"๐ท๐ธ\" },\n { name: \"Seychelles\", dialCode: \"+248\", code: \"SC\", emoji: \"๐ธ๐จ\" },\n { name: \"Sierra Leone\", dialCode: \"+232\", code: \"SL\", emoji: \"๐ธ๐ฑ\" },\n { name: \"Singapore\", dialCode: \"+65\", code: \"SG\", emoji: \"๐ธ๐ฌ\" },\n { name: \"Sint Maarten\", dialCode: \"+1\", code: \"SX\", emoji: \"๐ธ๐ฝ\" },\n { name: \"Slovakia\", dialCode: \"+421\", code: \"SK\", emoji: \"๐ธ๐ฐ\" },\n { name: \"Slovenia\", dialCode: \"+386\", code: \"SI\", emoji: \"๐ธ๐ฎ\" },\n { name: \"Solomon Islands\", dialCode: \"+677\", code: \"SB\", emoji: \"๐ธ๐ง\" },\n { name: \"Somalia\", dialCode: \"+252\", code: \"SO\", emoji: \"๐ธ๐ด\" },\n { name: \"South Africa\", dialCode: \"+27\", code: \"ZA\", emoji: \"๐ฟ๐ฆ\" },\n { name: \"South Korea\", dialCode: \"+82\", code: \"KR\", emoji: \"๐ฐ๐ท\" },\n { name: \"South Sudan\", dialCode: \"+211\", code: \"SS\", emoji: \"๐ธ๐ธ\" },\n { name: \"Spain\", dialCode: \"+34\", code: \"ES\", emoji: \"๐ช๐ธ\" },\n { name: \"Sri Lanka\", dialCode: \"+94\", code: \"LK\", emoji: \"๐ฑ๐ฐ\" },\n { name: \"Sudan\", dialCode: \"+249\", code: \"SD\", emoji: \"๐ธ๐ฉ\" },\n { name: \"Suriname\", dialCode: \"+597\", code: \"SR\", emoji: \"๐ธ๐ท\" },\n { name: \"Svalbard and Jan Mayen\", dialCode: \"+47\", code: \"SJ\", emoji: \"๐ธ๐ฏ\" },\n { name: \"Swaziland\", dialCode: \"+268\", code: \"SZ\", emoji: \"๐ธ๐ฟ\" },\n { name: \"Sweden\", dialCode: \"+46\", code: \"SE\", emoji: \"๐ธ๐ช\" },\n { name: \"Switzerland\", dialCode: \"+41\", code: \"CH\", emoji: \"๐จ๐ญ\" },\n { name: \"Syria\", dialCode: \"+963\", code: \"SY\", emoji: \"๐ธ๐พ\" },\n { name: \"Taiwan\", dialCode: \"+886\", code: \"TW\", emoji: \"๐น๐ผ\" },\n { name: \"Tajikistan\", dialCode: \"+992\", code: \"TJ\", emoji: \"๐น๐ฏ\" },\n { name: \"Tanzania\", dialCode: \"+255\", code: \"TZ\", emoji: \"๐น๐ฟ\" },\n { name: \"Thailand\", dialCode: \"+66\", code: \"TH\", emoji: \"๐น๐ญ\" },\n { name: \"Togo\", dialCode: \"+228\", code: \"TG\", emoji: \"๐น๐ฌ\" },\n { name: \"Tokelau\", dialCode: \"+690\", code: \"TK\", emoji: \"๐น๐ฐ\" },\n { name: \"Tonga\", dialCode: \"+676\", code: \"TO\", emoji: \"๐น๐ด\" },\n { name: \"Trinidad/Tobago\", dialCode: \"+1\", code: \"TT\", emoji: \"๐น๐น\" },\n { name: \"Tunisia\", dialCode: \"+216\", code: \"TN\", emoji: \"๐น๐ณ\" },\n { name: \"Turkey\", dialCode: \"+90\", code: \"TR\", emoji: \"๐น๐ท\" },\n { name: \"Turkmenistan\", dialCode: \"+993\", code: \"TM\", emoji: \"๐น๐ฒ\" },\n { name: \"Turks and Caicos Islands\", dialCode: \"+1\", code: \"TC\", emoji: \"๐น๐จ\" },\n { name: \"Tuvalu\", dialCode: \"+688\", code: \"TV\", emoji: \"๐น๐ป\" },\n { name: \"U.S. Virgin Islands\", dialCode: \"+1\", code: \"VI\", emoji: \"๐ป๐ฎ\" },\n { name: \"Uganda\", dialCode: \"+256\", code: \"UG\", emoji: \"๐บ๐ฌ\" },\n { name: \"Ukraine\", dialCode: \"+380\", code: \"UA\", emoji: \"๐บ๐ฆ\" },\n { name: \"United Arab Emirates\", dialCode: \"+971\", code: \"AE\", emoji: \"๐ฆ๐ช\" },\n { name: \"United Kingdom\", dialCode: \"+44\", code: \"GB\", emoji: \"๐ฌ๐ง\" },\n { name: \"United States\", dialCode: \"+1\", code: \"US\", emoji: \"๐บ๐ธ\" },\n { name: \"Uruguay\", dialCode: \"+598\", code: \"UY\", emoji: \"๐บ๐พ\" },\n { name: \"Uzbekistan\", dialCode: \"+998\", code: \"UZ\", emoji: \"๐บ๐ฟ\" },\n { name: \"Vanuatu\", dialCode: \"+678\", code: \"VU\", emoji: \"๐ป๐บ\" },\n { name: \"Vatican City\", dialCode: \"+379\", code: \"VA\", emoji: \"๐ป๐ฆ\" },\n { name: \"Venezuela\", dialCode: \"+58\", code: \"VE\", emoji: \"๐ป๐ช\" },\n { name: \"Vietnam\", dialCode: \"+84\", code: \"VN\", emoji: \"๐ป๐ณ\" },\n { name: \"Wallis and Futuna\", dialCode: \"+681\", code: \"WF\", emoji: \"๐ผ๐ซ\" },\n { name: \"Western Sahara\", dialCode: \"+212\", code: \"EH\", emoji: \"๐ช๐ญ\" },\n { name: \"Yemen\", dialCode: \"+967\", code: \"YE\", emoji: \"๐พ๐ช\" },\n { name: \"Zambia\", dialCode: \"+260\", code: \"ZM\", emoji: \"๐ฟ๐ฒ\" },\n { name: \"Zimbabwe\", dialCode: \"+263\", code: \"ZW\", emoji: \"๐ฟ๐ผ\" },\n { name: \"ร
land Islands\", dialCode: \"+358\", code: \"AX\", emoji: \"๐ฆ๐ฝ\" },\n] as const satisfies CountryData[];\n\n/**\n * A country data object containing name, dial code, country code, and emoji for a supported country.\n */\nexport type CountryData = {\n /** The name of the country. */\n name: string;\n /** The dial code of the country. */\n dialCode: string;\n /** The country code of the country. */\n code: CountryCode;\n /** The emoji of the country. */\n emoji: string;\n};\n\nexport type { CountryCode };\n\n/**\n * Formats a phone number according to the specified country data.\n *\n * @param phoneNumber - The phone number to format.\n * @param countryData - The country data to use for formatting.\n * @returns {string} The formatted phone number in E164 format.\n */\nexport function formatPhoneNumber(phoneNumber: string, countryData: CountryData): string {\n try {\n const parsedNumber = parsePhoneNumberWithError(phoneNumber, countryData.code);\n\n if (parsedNumber && parsedNumber.isValid()) {\n // Return the E164 format.\n return parsedNumber.number;\n }\n } catch {\n // If parsing fails, try to format as incomplete number\n }\n\n try {\n // Try to format as incomplete number with country\n const formatted = formatIncompletePhoneNumber(phoneNumber, countryData.code);\n // Remove spaces from the formatted result.\n return formatted.replace(/\\s/g, \"\");\n } catch {\n // If all else fails, just clean the number and prepend country code\n const cleaned = phoneNumber.replace(/[^\\d+]/g, \"\").trim();\n if (cleaned.startsWith(\"+\")) {\n return cleaned;\n }\n\n return `${countryData.dialCode}${cleaned}`;\n }\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { type CountryCode, countryData } from \"../country-data\";\n\nexport type CountryCodesOptions = {\n // The allowed countries are the countries that will be shown in the country selector\n // or `getCountries` is called.\n allowedCountries?: CountryCode[];\n // The default country is the country that will be selected by default when\n // the country selector is rendered, or `getDefaultCountry` is called.\n defaultCountry?: CountryCode;\n};\n\nexport const countryCodesHandler = (options?: CountryCodesOptions) => {\n // Determine allowed countries\n let allowedCountries = options?.allowedCountries?.length\n ? countryData.filter((country) => options.allowedCountries!.includes(country.code))\n : countryData;\n\n // If no countries match, fall back to all countries\n if (options?.allowedCountries?.length && allowedCountries.length === 0) {\n console.warn(`No countries matched the \"allowedCountries\" list, falling back to all countries`);\n allowedCountries = countryData;\n }\n\n // Determine default country\n let defaultCountry = options?.defaultCountry\n ? countryData.find((country) => country.code === options.defaultCountry)!\n : countryData.find((country) => country.code === \"US\")!;\n\n // If default country is not in allowed countries, use first allowed country\n if (!allowedCountries.some((country) => country.code === defaultCountry.code)) {\n defaultCountry = allowedCountries[0]!;\n console.warn(\n `The \"defaultCountry\" option is not in the \"allowedCountries\" list, the default country has been set to ${defaultCountry.code}`\n );\n }\n\n return {\n allowedCountries,\n defaultCountry,\n };\n};\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport type { UserCredential } from \"firebase/auth\";\nimport type { FirebaseUI } from \"~/config\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type CallableHandler<T extends (...args: any[]) => any = (...args: any[]) => any> = T;\nexport type InitHandler = (ui: FirebaseUI) => Promise<void> | void;\nexport type RedirectHandler = (ui: FirebaseUI, result: UserCredential | null) => Promise<void> | void;\n\nexport type CallableBehavior<T extends CallableHandler = CallableHandler> = {\n type: \"callable\";\n handler: T;\n};\n\nexport type RedirectBehavior<T extends RedirectHandler = RedirectHandler> = {\n type: \"redirect\";\n handler: T;\n};\n\nexport type InitBehavior<T extends InitHandler = InitHandler> = {\n type: \"init\";\n handler: T;\n};\n\nexport function callableBehavior<T extends CallableHandler>(handler: T): CallableBehavior<T> {\n return { type: \"callable\" as const, handler };\n}\n\nexport function redirectBehavior<T extends RedirectHandler = RedirectHandler>(handler: T): RedirectBehavior<T> {\n return { type: \"redirect\" as const, handler };\n}\n\nexport function initBehavior<T extends InitHandler = InitHandler>(handler: T): InitBehavior<T> {\n return { type: \"init\" as const, handler };\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport type { FirebaseUI } from \"~/config\";\nimport type { RecaptchaVerifier, UserCredential } from \"firebase/auth\";\nimport * as anonymousUpgradeHandlers from \"./anonymous-upgrade\";\nimport * as autoAnonymousLoginHandlers from \"./auto-anonymous-login\";\nimport * as recaptchaHandlers from \"./recaptcha\";\nimport * as providerStrategyHandlers from \"./provider-strategy\";\nimport * as oneTapSignInHandlers from \"./one-tap\";\nimport * as requireDisplayNameHandlers from \"./require-display-name\";\nimport * as countryCodesHandlers from \"./country-codes\";\nimport {\n callableBehavior,\n initBehavior,\n redirectBehavior,\n type CallableBehavior,\n type InitBehavior,\n type RedirectBehavior,\n} from \"./utils\";\n\ntype Registry = {\n autoAnonymousLogin: InitBehavior<typeof autoAnonymousLoginHandlers.autoAnonymousLoginHandler>;\n autoUpgradeAnonymousCredential: CallableBehavior<\n typeof anonymousUpgradeHandlers.autoUpgradeAnonymousCredentialHandler\n >;\n autoUpgradeAnonymousProvider: CallableBehavior<typeof anonymousUpgradeHandlers.autoUpgradeAnonymousProviderHandler>;\n autoUpgradeAnonymousUserRedirectHandler: RedirectBehavior<\n (\n ui: FirebaseUI,\n credential: UserCredential | null,\n onUpgrade?: anonymousUpgradeHandlers.OnUpgradeCallback\n ) => ReturnType<typeof anonymousUpgradeHandlers.autoUpgradeAnonymousUserRedirectHandler>\n >;\n recaptchaVerification: CallableBehavior<(ui: FirebaseUI, element: HTMLElement) => RecaptchaVerifier>;\n providerSignInStrategy: CallableBehavior<providerStrategyHandlers.ProviderSignInStrategyHandler>;\n providerLinkStrategy: CallableBehavior<providerStrategyHandlers.ProviderLinkStrategyHandler>;\n oneTapSignIn: InitBehavior<(ui: FirebaseUI) => ReturnType<typeof oneTapSignInHandlers.oneTapSignInHandler>>;\n requireDisplayName: CallableBehavior<typeof requireDisplayNameHandlers.requireDisplayNameHandler>;\n countryCodes: CallableBehavior<typeof countryCodesHandlers.countryCodesHandler>;\n};\n\n/** A behavior or set of behaviors from the registry. */\nexport type Behavior<T extends keyof Registry = keyof Registry> = Pick<Registry, T>;\n/** All available behaviors, with each behavior being optional. */\nexport type Behaviors = Partial<Registry>;\n\n/**\n * Enables automatic anonymous login when the app initializes.\n *\n * @returns A behavior that automatically signs in users anonymously on app initialization.\n */\nexport function autoAnonymousLogin(): Behavior<\"autoAnonymousLogin\"> {\n return {\n autoAnonymousLogin: initBehavior(autoAnonymousLoginHandlers.autoAnonymousLoginHandler),\n };\n}\n\n/** Options for the auto-upgrade anonymous users behavior. */\nexport type AutoUpgradeAnonymousUsersOptions = {\n /** Optional callback function that is called when an anonymous user is upgraded. */\n onUpgrade?: anonymousUpgradeHandlers.OnUpgradeCallback;\n};\n\n/**\n * Automatically upgrades anonymous users to regular users when they sign in with a credential or provider.\n *\n * This behavior handles upgrading anonymous users for credential-based sign-ins, provider-based sign-ins,\n * and redirect-based authentication flows.\n *\n * @param options - Optional configuration including an upgrade callback.\n * @returns Behaviors for automatically upgrading anonymous users.\n */\nexport function autoUpgradeAnonymousUsers(\n options?: AutoUpgradeAnonymousUsersOptions\n): Behavior<\n \"autoUpgradeAnonymousCredential\" | \"autoUpgradeAnonymousProvider\" | \"autoUpgradeAnonymousUserRedirectHandler\"\n> {\n return {\n autoUpgradeAnonymousCredential: callableBehavior((ui, credential) =>\n anonymousUpgradeHandlers.autoUpgradeAnonymousCredentialHandler(ui, credential, options?.onUpgrade)\n ),\n autoUpgradeAnonymousProvider: callableBehavior((ui, provider) =>\n anonymousUpgradeHandlers.autoUpgradeAnonymousProviderHandler(ui, provider, options?.onUpgrade)\n ),\n autoUpgradeAnonymousUserRedirectHandler: redirectBehavior((ui, credential) =>\n anonymousUpgradeHandlers.autoUpgradeAnonymousUserRedirectHandler(ui, credential, options?.onUpgrade)\n ),\n };\n}\n\n/** Options for reCAPTCHA verification behavior. */\nexport type RecaptchaVerificationOptions = recaptchaHandlers.RecaptchaVerificationOptions;\n\n/**\n * Configures reCAPTCHA verification for phone authentication.\n *\n * @param options - Optional reCAPTCHA verification options.\n * @returns A behavior that handles reCAPTCHA verification for phone authentication.\n */\nexport function recaptchaVerification(options?: RecaptchaVerificationOptions): Behavior<\"recaptchaVerification\"> {\n return {\n recaptchaVerification: callableBehavior((ui, element) =>\n recaptchaHandlers.recaptchaVerificationHandler(ui, element, options)\n ),\n };\n}\n\n/**\n * Configures provider authentication to use redirect strategy instead of popup.\n *\n * @returns Behaviors for provider sign-in and linking using redirect strategy.\n */\nexport function providerRedirectStrategy(): Behavior<\"providerSignInStrategy\" | \"providerLinkStrategy\"> {\n return {\n providerSignInStrategy: callableBehavior(providerStrategyHandlers.signInWithRediectHandler),\n providerLinkStrategy: callableBehavior(providerStrategyHandlers.linkWithRedirectHandler),\n };\n}\n\n/**\n * Configures provider authentication to use popup strategy instead of redirect.\n *\n * This is the default strategy for provider authentication.\n *\n * @returns Behaviors for provider sign-in and linking using popup strategy.\n */\nexport function providerPopupStrategy(): Behavior<\"providerSignInStrategy\" | \"providerLinkStrategy\"> {\n return {\n providerSignInStrategy: callableBehavior(providerStrategyHandlers.signInWithPopupHandler),\n providerLinkStrategy: callableBehavior(providerStrategyHandlers.linkWithPopupHandler),\n };\n}\n\n/** Options for Google One Tap sign-in behavior. */\nexport type OneTapSignInOptions = oneTapSignInHandlers.OneTapSignInOptions;\n\n/**\n * Enables Google One Tap sign-in functionality.\n *\n * @param options - Configuration options for Google One Tap sign-in.\n * @returns A behavior that handles Google One Tap sign-in initialization.\n */\nexport function oneTapSignIn(options: OneTapSignInOptions): Behavior<\"oneTapSignIn\"> {\n return {\n oneTapSignIn: initBehavior((ui) => oneTapSignInHandlers.oneTapSignInHandler(ui, options)),\n };\n}\n\n/**\n * Requires users to provide a display name when creating an account.\n *\n * @returns A behavior that enforces display name requirement during user registration.\n */\nexport function requireDisplayName(): Behavior<\"requireDisplayName\"> {\n return {\n requireDisplayName: callableBehavior(requireDisplayNameHandlers.requireDisplayNameHandler),\n };\n}\n\n/**\n * Configures country code selection for phone number input.\n *\n * @param options - Optional configuration for country code behavior.\n * @returns A behavior that provides country code functionality for phone authentication.\n */\nexport function countryCodes(options?: countryCodesHandlers.CountryCodesOptions): Behavior<\"countryCodes\"> {\n return {\n countryCodes: callableBehavior(() => countryCodesHandlers.countryCodesHandler(options)),\n };\n}\n\n/**\n * Checks if a specific behavior is enabled for the given FirebaseUI instance.\n *\n * @param ui - The FirebaseUI instance.\n * @param key - The behavior key to check.\n * @returns True if the behavior is enabled, false otherwise.\n */\nexport function hasBehavior<T extends keyof Registry>(ui: FirebaseUI, key: T): boolean {\n return !!ui.behaviors[key];\n}\n\n/**\n * Gets the handler function for a specific behavior.\n *\n * @param ui - The FirebaseUI instance.\n * @param key - The behavior key to retrieve.\n * @returns The handler function for the specified behavior.\n * @throws {Error} Throws an error if the behavior is not found.\n */\nexport function getBehavior<T extends keyof Registry>(ui: FirebaseUI, key: T): Registry[T][\"handler\"] {\n if (!hasBehavior(ui, key)) {\n throw new Error(`Behavior ${key} not found`);\n }\n\n return (ui.behaviors[key] as Registry[T]).handler;\n}\n\n/** Default behaviors that are enabled by default for all FirebaseUI instances. */\nexport const defaultBehaviors: Behavior<\"recaptchaVerification\"> = {\n ...recaptchaVerification(),\n ...providerPopupStrategy(),\n ...countryCodes(),\n};\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport {\n createUserWithEmailAndPassword as _createUserWithEmailAndPassword,\n isSignInWithEmailLink as _isSignInWithEmailLink,\n sendPasswordResetEmail as _sendPasswordResetEmail,\n sendSignInLinkToEmail as _sendSignInLinkToEmail,\n signInAnonymously as _signInAnonymously,\n signInWithCredential as _signInWithCredential,\n signInWithCustomToken as _signInWithCustomToken,\n EmailAuthProvider,\n linkWithCredential,\n PhoneAuthProvider,\n TotpMultiFactorGenerator,\n multiFactor,\n type ActionCodeSettings,\n type ApplicationVerifier,\n type AuthProvider,\n type UserCredential,\n type AuthCredential,\n type TotpSecret,\n type MultiFactorAssertion,\n type MultiFactorUser,\n type MultiFactorInfo,\n} from \"firebase/auth\";\nimport QRCode from \"qrcode-generator\";\nimport { type FirebaseUI } from \"./config\";\nimport { handleFirebaseError } from \"./errors\";\nimport { hasBehavior, getBehavior } from \"./behaviors/index\";\nimport { FirebaseError } from \"firebase/app\";\nimport { getTranslation } from \"./translations\";\n\nasync function handlePendingCredential(_ui: FirebaseUI, user: UserCredential): Promise<UserCredential> {\n const pendingCredString = window.sessionStorage.getItem(\"pendingCred\");\n if (!pendingCredString) return user;\n\n try {\n const pendingCred = JSON.parse(pendingCredString);\n const result = await linkWithCredential(user.user, pendingCred);\n window.sessionStorage.removeItem(\"pendingCred\");\n return result;\n } catch {\n window.sessionStorage.removeItem(\"pendingCred\");\n return user;\n }\n}\n\nfunction setPendingState(ui: FirebaseUI) {\n ui.setRedirectError(undefined);\n ui.setState(\"pending\");\n}\n\n/**\n * Signs in with an email and password.\n *\n * If the `autoUpgradeAnonymousUsers` behavior is enabled, it will attempt to upgrade an anonymous user to a regular user.\n *\n * @param ui - The FirebaseUI instance.\n * @param email - The email to sign in with.\n * @param password - The password to sign in with.\n * @returns {Promise<UserCredential>} A promise containing the user credential.\n */\nexport async function signInWithEmailAndPassword(\n ui: FirebaseUI,\n email: string,\n password: string\n): Promise<UserCredential> {\n try {\n setPendingState(ui);\n const credential = EmailAuthProvider.credential(email, password);\n\n if (hasBehavior(ui, \"autoUpgradeAnonymousCredential\")) {\n const result = await getBehavior(ui, \"autoUpgradeAnonymousCredential\")(ui, credential);\n\n if (result) {\n return handlePendingCredential(ui, result);\n }\n }\n\n const result = await _signInWithCredential(ui.auth, credential);\n return handlePendingCredential(ui, result);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Creates a new user account with an email and password.\n *\n * If the `requireDisplayName` behavior is enabled, a display name must be provided.\n * If the `autoUpgradeAnonymousUsers` behavior is enabled, it will attempt to upgrade an anonymous user to a regular user.\n *\n * @param ui - The FirebaseUI instance.\n * @param email - The email address for the new account.\n * @param password - The password for the new account.\n * @param displayName - Optional display name for the user.\n * @returns {Promise<UserCredential>} A promise containing the user credential.\n */\nexport async function createUserWithEmailAndPassword(\n ui: FirebaseUI,\n email: string,\n password: string,\n displayName?: string\n): Promise<UserCredential> {\n try {\n setPendingState(ui);\n const credential = EmailAuthProvider.credential(email, password);\n\n if (hasBehavior(ui, \"requireDisplayName\") && !displayName) {\n throw new FirebaseError(\"auth/display-name-required\", getTranslation(ui, \"errors\", \"displayNameRequired\"));\n }\n\n if (hasBehavior(ui, \"autoUpgradeAnonymousCredential\")) {\n const result = await getBehavior(ui, \"autoUpgradeAnonymousCredential\")(ui, credential);\n\n if (result) {\n if (hasBehavior(ui, \"requireDisplayName\")) {\n await getBehavior(ui, \"requireDisplayName\")(ui, result.user, displayName!);\n }\n\n return handlePendingCredential(ui, result);\n }\n }\n\n const result = await _createUserWithEmailAndPassword(ui.auth, email, password);\n\n if (hasBehavior(ui, \"requireDisplayName\")) {\n await getBehavior(ui, \"requireDisplayName\")(ui, result.user, displayName!);\n }\n\n return handlePendingCredential(ui, result);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Verifies a phone number for authentication.\n *\n * Supports regular phone authentication, MFA enrollment, and MFA assertion flows.\n *\n * @param ui - The FirebaseUI instance.\n * @param phoneNumber - The phone number to verify.\n * @param appVerifier - The application verifier (reCAPTCHA).\n * @param mfaUser - Optional multi-factor user for MFA enrollment flow.\n * @param mfaHint - Optional multi-factor info hint for MFA assertion flow.\n * @returns {Promise<string>} A promise containing the verification ID.\n */\nexport async function verifyPhoneNumber(\n ui: FirebaseUI,\n phoneNumber: string,\n appVerifier: ApplicationVerifier,\n mfaUser?: MultiFactorUser,\n mfaHint?: MultiFactorInfo\n): Promise<string> {\n try {\n setPendingState(ui);\n const provider = new PhoneAuthProvider(ui.auth);\n\n if (mfaHint && ui.multiFactorResolver) {\n // MFA assertion flow\n return await provider.verifyPhoneNumber(\n {\n multiFactorHint: mfaHint,\n session: ui.multiFactorResolver.session,\n },\n appVerifier\n );\n } else if (mfaUser) {\n // MFA enrollment flow\n const session = await mfaUser.getSession();\n return await provider.verifyPhoneNumber(\n {\n phoneNumber,\n session,\n },\n appVerifier\n );\n } else {\n // Regular phone auth flow\n return await provider.verifyPhoneNumber(phoneNumber, appVerifier);\n }\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Confirms a phone number verification code and signs in the user.\n *\n * If the `autoUpgradeAnonymousUsers` behavior is enabled and the current user is anonymous, it will attempt to upgrade the anonymous user to a regular user.\n *\n * @param ui - The FirebaseUI instance.\n * @param verificationId - The verification ID from the phone verification process.\n * @param verificationCode - The verification code sent to the phone.\n * @returns {Promise<UserCredential>} A promise containing the user credential.\n */\nexport async function confirmPhoneNumber(\n ui: FirebaseUI,\n verificationId: string,\n verificationCode: string\n): Promise<UserCredential> {\n try {\n setPendingState(ui);\n const currentUser = ui.auth.currentUser;\n const credential = PhoneAuthProvider.credential(verificationId, verificationCode);\n\n if (currentUser?.isAnonymous && hasBehavior(ui, \"autoUpgradeAnonymousCredential\")) {\n const result = await getBehavior(ui, \"autoUpgradeAnonymousCredential\")(ui, credential);\n\n if (result) {\n return handlePendingCredential(ui, result);\n }\n }\n\n const result = await _signInWithCredential(ui.auth, credential);\n return handlePendingCredential(ui, result);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Sends a password reset email to the specified email address.\n *\n * @param ui - The FirebaseUI instance.\n * @param email - The email address to send the password reset email to.\n * @returns {Promise<void>} A promise that resolves when the email is sent.\n */\nexport async function sendPasswordResetEmail(ui: FirebaseUI, email: string): Promise<void> {\n try {\n setPendingState(ui);\n await _sendPasswordResetEmail(ui.auth, email);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Sends a sign-in link to the specified email address.\n *\n * The email address is stored in localStorage for later use during the sign-in process.\n *\n * @param ui - The FirebaseUI instance.\n * @param email - The email address to send the sign-in link to.\n * @returns {Promise<void>} A promise that resolves when the email is sent.\n */\nexport async function sendSignInLinkToEmail(ui: FirebaseUI, email: string): Promise<void> {\n try {\n setPendingState(ui);\n const actionCodeSettings = {\n url: window.location.href,\n // TODO(ehesp): Check this...\n handleCodeInApp: true,\n } satisfies ActionCodeSettings;\n\n await _sendSignInLinkToEmail(ui.auth, email, actionCodeSettings);\n // TODO: Should this be a behavior (\"storageStrategy\")?\n window.localStorage.setItem(\"emailForSignIn\", email);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Signs in a user using an email link.\n *\n * @param ui - The FirebaseUI instance.\n * @param email - The email address associated with the sign-in link.\n * @param link - The sign-in link from the email.\n * @returns {Promise<UserCredential>} A promise containing the user credential.\n */\nexport async function signInWithEmailLink(ui: FirebaseUI, email: string, link: string): Promise<UserCredential> {\n const credential = EmailAuthProvider.credentialWithLink(email, link);\n return signInWithCredential(ui, credential);\n}\n\n/**\n * Signs in a user with an authentication credential.\n *\n * If the `autoUpgradeAnonymousUsers` behavior is enabled, it will attempt to upgrade an anonymous user to a regular user.\n *\n * @param ui - The FirebaseUI instance.\n * @param credential - The authentication credential to sign in with.\n * @returns {Promise<UserCredential>} A promise containing the user credential.\n */\nexport async function signInWithCredential(ui: FirebaseUI, credential: AuthCredential): Promise<UserCredential> {\n try {\n setPendingState(ui);\n if (hasBehavior(ui, \"autoUpgradeAnonymousCredential\")) {\n const userCredential = await getBehavior(ui, \"autoUpgradeAnonymousCredential\")(ui, credential);\n\n // If they got here, they're either not anonymous or they've been linked.\n // If the credential has been linked, we don't need to sign them in, so return early.\n if (userCredential) {\n return handlePendingCredential(ui, userCredential);\n }\n }\n\n const result = await _signInWithCredential(ui.auth, credential);\n return handlePendingCredential(ui, result);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Signs in a user with a custom token.\n *\n * @param ui - The FirebaseUI instance.\n * @param customToken - The custom token to sign in with.\n * @returns {Promise<UserCredential>} A promise containing the user credential.\n */\nexport async function signInWithCustomToken(ui: FirebaseUI, customToken: string): Promise<UserCredential> {\n try {\n setPendingState(ui);\n const result = await _signInWithCustomToken(ui.auth, customToken);\n return handlePendingCredential(ui, result);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Signs in a user anonymously.\n *\n * @param ui - The FirebaseUI instance.\n * @returns {Promise<UserCredential>} A promise containing the user credential.\n */\nexport async function signInAnonymously(ui: FirebaseUI): Promise<UserCredential> {\n try {\n setPendingState(ui);\n const result = await _signInAnonymously(ui.auth);\n return handlePendingCredential(ui, result);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Signs in a user with an authentication provider (e.g., Google, Facebook, etc.).\n *\n * If the `autoUpgradeAnonymousProvider` behavior is enabled, it will attempt to upgrade an anonymous user to a regular user.\n * The sign-in strategy (popup or redirect) is determined by the `providerSignInStrategy` behavior.\n *\n * @param ui - The FirebaseUI instance.\n * @param provider - The authentication provider to sign in with.\n * @returns {Promise<UserCredential | never>} A promise containing the user credential, or never if using redirect strategy.\n */\nexport async function signInWithProvider(ui: FirebaseUI, provider: AuthProvider): Promise<UserCredential | never> {\n try {\n setPendingState(ui);\n if (hasBehavior(ui, \"autoUpgradeAnonymousProvider\")) {\n const credential = await getBehavior(ui, \"autoUpgradeAnonymousProvider\")(ui, provider);\n\n // If we got here, the user is either not anonymous, or they have been linked\n // via a popup, and the credential has been created.\n if (credential) {\n return handlePendingCredential(ui, credential);\n }\n }\n\n const strategy = getBehavior(ui, \"providerSignInStrategy\");\n const result = await strategy(ui, provider);\n\n // If we got here, the user has been signed in via a popup.\n // Otherwise, they will have been redirected.\n return handlePendingCredential(ui, result);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Completes the email link sign-in process using the current URL.\n *\n * Checks if the current URL is a valid email link sign-in URL and retrieves the email from localStorage.\n * Returns null if the URL is not a valid email link or if no email is found in localStorage.\n *\n * @param ui - The FirebaseUI instance.\n * @param currentUrl - The current URL to check for email link sign-in.\n * @returns {Promise<UserCredential | null>} A promise containing the user credential, or null if the sign-in cannot be completed.\n */\nexport async function completeEmailLinkSignIn(ui: FirebaseUI, currentUrl: string): Promise<UserCredential | null> {\n try {\n if (!_isSignInWithEmailLink(ui.auth, currentUrl)) {\n return null;\n }\n\n const email = window.localStorage.getItem(\"emailForSignIn\");\n if (!email) return null;\n\n // signInWithEmailLink handles behavior checks, credential creation, and error handling\n const result = await signInWithEmailLink(ui, email, currentUrl);\n return handlePendingCredential(ui, result);\n } finally {\n window.localStorage.removeItem(\"emailForSignIn\");\n }\n}\n\n/**\n * Generates a QR code data URL for TOTP (Time-based One-Time Password) multi-factor authentication.\n *\n * The QR code can be scanned by an authenticator app to set up TOTP MFA for the user.\n *\n * @param ui - The FirebaseUI instance.\n * @param secret - The TOTP secret to generate the QR code for.\n * @param accountName - Optional account name for the QR code. Defaults to the user's email if not provided.\n * @param issuer - Optional issuer name for the QR code.\n * @returns {string} A data URL containing the QR code image.\n * @throws {Error} Throws an error if the user is not authenticated.\n */\nexport function generateTotpQrCode(ui: FirebaseUI, secret: TotpSecret, accountName?: string, issuer?: string): string {\n const currentUser = ui.auth.currentUser;\n\n if (!currentUser) {\n throw new Error(\"User must be authenticated to generate a TOTP QR code\");\n }\n\n const uri = secret.generateQrCodeUrl(accountName || currentUser.email || \"\", issuer);\n\n const qr = QRCode(0, \"L\");\n qr.addData(uri);\n qr.make();\n return qr.createDataURL();\n}\n\n/**\n * Signs in a user using a multi-factor assertion.\n *\n * Resolves the multi-factor challenge using the provided assertion and clears the multi-factor resolver from the UI state.\n *\n * @param ui - The FirebaseUI instance.\n * @param assertion - The multi-factor assertion to use for sign-in.\n * @returns {Promise<UserCredential>} A promise containing the user credential.\n */\nexport async function signInWithMultiFactorAssertion(ui: FirebaseUI, assertion: MultiFactorAssertion) {\n try {\n setPendingState(ui);\n const result = await ui.multiFactorResolver!.resolveSignIn(assertion);\n ui.setMultiFactorResolver(undefined);\n return result;\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Enrolls a multi-factor authentication method for the current user.\n *\n * @param ui - The FirebaseUI instance.\n * @param assertion - The multi-factor assertion to enroll.\n * @param displayName - Optional display name for the enrolled MFA method.\n * @returns {Promise<void>} A promise that resolves when the enrollment is complete.\n */\nexport async function enrollWithMultiFactorAssertion(\n ui: FirebaseUI,\n assertion: MultiFactorAssertion,\n displayName?: string\n): Promise<void> {\n try {\n setPendingState(ui);\n await multiFactor(ui.auth.currentUser!).enroll(assertion, displayName);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n\n/**\n * Generates a TOTP (Time-based One-Time Password) secret for multi-factor authentication enrollment.\n *\n * @param ui - The FirebaseUI instance.\n * @returns {Promise<TotpSecret>} A promise containing the TOTP secret.\n */\nexport async function generateTotpSecret(ui: FirebaseUI): Promise<TotpSecret> {\n try {\n setPendingState(ui);\n const mfaUser = multiFactor(ui.auth.currentUser!);\n const session = await mfaUser.getSession();\n return await TotpMultiFactorGenerator.generateSecret(session);\n } catch (error) {\n handleFirebaseError(ui, error);\n } finally {\n ui.setState(\"idle\");\n }\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport { enUs, type RegisteredLocale } from \"@firebase-oss/ui-translations\";\nimport type { FirebaseApp } from \"firebase/app\";\nimport { type Auth, getAuth, getRedirectResult, type MultiFactorResolver } from \"firebase/auth\";\nimport { map } from \"nanostores\";\nimport { deepMap, type DeepMapStore } from \"@nanostores/deepmap\";\nimport { type Behavior, type Behaviors, defaultBehaviors } from \"./behaviors\";\nimport type { InitBehavior, RedirectBehavior } from \"./behaviors/utils\";\nimport { type FirebaseUIState } from \"./state\";\nimport { handleFirebaseError } from \"./errors\";\n\n/**\n * Configuration options for initializing FirebaseUI.\n */\nexport type FirebaseUIOptions = {\n /** A required Firebase App instance, e.g. from `initializeApp`. */\n app: FirebaseApp;\n /** An optional Firebase Auth instance, e.g. from `getAuth`. If not provided, it will be created using the app instance. */\n auth?: Auth;\n /** A default locale to use. Defaults to `enUs`. */\n locale?: RegisteredLocale;\n /** An optional array of behaviors, e.g. from `requireDisplayName`. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n behaviors?: Behavior<any>[];\n};\n\n/**\n * The main FirebaseUI instance that provides access to Firebase Auth and UI state management.\n *\n * This type encapsulates all the necessary components for managing authentication UI state,\n * including Firebase app and auth instances, locale settings, behaviors, and multi-factor\n * authentication state.\n */\nexport type FirebaseUI = {\n /** The Firebase App instance. */\n app: FirebaseApp;\n /** The Firebase Auth instance. */\n auth: Auth;\n /** Sets the locale for translations. */\n setLocale: (locale: RegisteredLocale) => void;\n /** The current UI state (e.g., \"idle\", \"pending\", \"loading\"). */\n state: FirebaseUIState;\n /** Sets the UI state. */\n setState: (state: FirebaseUIState) => void;\n /** The current locale for translations. */\n locale: RegisteredLocale;\n /** The configured behaviors that customize authentication flows. */\n behaviors: Behaviors;\n /** The multi-factor resolver, if a multi-factor challenge is in progress. */\n multiFactorResolver?: MultiFactorResolver;\n /** Sets the multi-factor resolver. */\n setMultiFactorResolver: (multiFactorResolver?: MultiFactorResolver) => void;\n /** Any error that occurred during a redirect-based authentication flow. */\n redirectError?: Error;\n /** Sets the redirect error. */\n setRedirectError: (error?: Error) => void;\n};\n\nexport const $config = map<Record<string, DeepMapStore<FirebaseUI>>>({});\n\n/**\n * A reactive store containing a FirebaseUI instance.\n *\n * This store allows for reactive updates to the FirebaseUI state, enabling UI components\n * to automatically update when the authentication state or configuration changes.\n */\nexport type FirebaseUIStore = DeepMapStore<FirebaseUI>;\n\n/**\n * Initializes a FirebaseUI instance with the provided configuration.\n *\n * Creates a reactive store containing the FirebaseUI instance, sets up behaviors,\n * and handles initialization and redirect flows if running client-side.\n *\n * Example:\n * ```typescript\n * const ui = initializeUI({\n * app: firebaseApp,\n * locale: enUs,\n * behaviors: [requireDisplayName()],\n * });\n * ```\n *\n * @param config - The configuration options for FirebaseUI.\n * @param name - Optional name for the FirebaseUI instance. Defaults to \"[DEFAULT]\".\n * @returns {FirebaseUIStore} A reactive store containing the initialized FirebaseUI instance.\n */\nexport function initializeUI(config: FirebaseUIOptions, name: string = \"[DEFAULT]\"): FirebaseUIStore {\n // Reduce the behaviors to a single object.\n const behaviors = config.behaviors?.reduce<Behavior>((acc, behavior) => {\n return {\n ...acc,\n ...behavior,\n };\n }, defaultBehaviors as Behavior);\n\n $config.setKey(\n name,\n deepMap<FirebaseUI>({\n app: config.app,\n auth: config.auth || getAuth(config.app),\n locale: config.locale ?? enUs,\n setLocale: (locale: RegisteredLocale) => {\n const current = $config.get()[name]!;\n current.setKey(`locale`, locale);\n },\n state: \"idle\",\n setState: (state: FirebaseUIState) => {\n const current = $config.get()[name]!;\n current.setKey(`state`, state);\n },\n // Since we've got config.behaviors?.reduce above, we need to default to defaultBehaviors\n // if no behaviors are provided, as they wont be in the reducer.\n behaviors: behaviors ?? (defaultBehaviors as Behavior),\n multiFactorResolver: undefined,\n setMultiFactorResolver: (resolver?: MultiFactorResolver) => {\n const current = $config.get()[name]!;\n current.setKey(`multiFactorResolver`, resolver);\n },\n redirectError: undefined,\n setRedirectError: (error?: Error) => {\n const current = $config.get()[name]!;\n current.setKey(`redirectError`, error);\n },\n })\n );\n\n const store = $config.get()[name]!;\n const ui = store.get();\n\n // If we're client-side, execute the init and redirect behaviors.\n if (typeof window !== \"undefined\") {\n const initBehaviors: InitBehavior[] = [];\n const redirectBehaviors: RedirectBehavior[] = [];\n\n for (const behavior of Object.values(ui.behaviors)) {\n if (behavior.type === \"redirect\") {\n redirectBehaviors.push(behavior);\n } else if (behavior.type === \"init\") {\n initBehaviors.push(behavior);\n }\n }\n\n if (initBehaviors.length > 0) {\n store.setKey(\"state\", \"loading\");\n ui.auth.authStateReady().then(() => {\n Promise.all(initBehaviors.map((behavior) => behavior.handler(ui))).then(() => {\n store.setKey(\"state\", \"idle\");\n });\n });\n }\n\n getRedirectResult(ui.auth)\n .then((result) => {\n return Promise.all(redirectBehaviors.map((behavior) => behavior.handler(ui, result)));\n })\n .catch((error) => {\n try {\n handleFirebaseError(ui, error);\n } catch (error) {\n ui.setRedirectError(error instanceof Error ? error : new Error(String(error)));\n }\n });\n }\n\n return store;\n}\n","/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport * as z from \"zod\";\nimport { getTranslation } from \"./translations\";\nimport { type FirebaseUI } from \"./config\";\nimport { hasBehavior } from \"./behaviors\";\n\n/**\n * Creates a Zod schema for sign-in form validation.\n *\n * Validates email format and password minimum length (6 characters).\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for sign-in form validation.\n */\nexport function createSignInAuthFormSchema(ui: FirebaseUI) {\n return z.object({\n email: z.email(getTranslation(ui, \"errors\", \"invalidEmail\")),\n password: z.string().min(6, getTranslation(ui, \"errors\", \"weakPassword\")),\n });\n}\n\n/**\n * Creates a Zod schema for sign-up form validation.\n *\n * Validates email format, password minimum length (6 characters), and optionally requires a display name\n * if the `requireDisplayName` behavior is enabled.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for sign-up form validation.\n */\nexport function createSignUpAuthFormSchema(ui: FirebaseUI) {\n const requireDisplayName = hasBehavior(ui, \"requireDisplayName\");\n const displayNameRequiredMessage = getTranslation(ui, \"errors\", \"displayNameRequired\");\n\n return z.object({\n email: z.email(getTranslation(ui, \"errors\", \"invalidEmail\")),\n password: z.string().min(6, getTranslation(ui, \"errors\", \"weakPassword\")),\n displayName: requireDisplayName\n ? z.string().min(1, displayNameRequiredMessage)\n : z.string().min(1, displayNameRequiredMessage).optional(),\n });\n}\n\n/**\n * Creates a Zod schema for forgot password form validation.\n *\n * Validates email format.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for forgot password form validation.\n */\nexport function createForgotPasswordAuthFormSchema(ui: FirebaseUI) {\n return z.object({\n email: z.email(getTranslation(ui, \"errors\", \"invalidEmail\")),\n });\n}\n\n/**\n * Creates a Zod schema for email link authentication form validation.\n *\n * Validates email format.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for email link authentication form validation.\n */\nexport function createEmailLinkAuthFormSchema(ui: FirebaseUI) {\n return z.object({\n email: z.email(getTranslation(ui, \"errors\", \"invalidEmail\")),\n });\n}\n\n/**\n * Creates a Zod schema for phone number form validation.\n *\n * Validates that the phone number is provided and has a maximum length of 10 characters.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for phone number form validation.\n */\nexport function createPhoneAuthNumberFormSchema(ui: FirebaseUI) {\n return z.object({\n phoneNumber: z\n .string()\n .min(1, getTranslation(ui, \"errors\", \"missingPhoneNumber\"))\n .max(10, getTranslation(ui, \"errors\", \"invalidPhoneNumber\")),\n });\n}\n\n/**\n * Creates a Zod schema for phone verification code form validation.\n *\n * Validates that the verification ID is provided and the verification code is at least 6 characters long.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for phone verification form validation.\n */\nexport function createPhoneAuthVerifyFormSchema(ui: FirebaseUI) {\n return z.object({\n verificationId: z.string().min(1, getTranslation(ui, \"errors\", \"missingVerificationId\")),\n verificationCode: z.string().refine((val) => !val || val.length >= 6, {\n error: getTranslation(ui, \"errors\", \"invalidVerificationCode\"),\n }),\n });\n}\n\n/**\n * Creates a Zod schema for multi-factor phone authentication number form validation.\n *\n * Extends the phone number schema with a required display name field.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for multi-factor phone authentication number form validation.\n */\nexport function createMultiFactorPhoneAuthNumberFormSchema(ui: FirebaseUI) {\n const base = createPhoneAuthNumberFormSchema(ui);\n return base.extend({\n displayName: z.string().min(1, getTranslation(ui, \"errors\", \"displayNameRequired\")),\n });\n}\n\n/**\n * Creates a Zod schema for multi-factor phone authentication assertion form validation.\n *\n * Uses the same validation as the phone number form schema.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for multi-factor phone authentication assertion form validation.\n */\nexport function createMultiFactorPhoneAuthAssertionFormSchema(ui: FirebaseUI) {\n return createPhoneAuthNumberFormSchema(ui);\n}\n\n/**\n * Creates a Zod schema for multi-factor phone authentication verification form validation.\n *\n * Uses the same validation as the phone verification form schema.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for multi-factor phone authentication verification form validation.\n */\nexport function createMultiFactorPhoneAuthVerifyFormSchema(ui: FirebaseUI) {\n return createPhoneAuthVerifyFormSchema(ui);\n}\n\n/**\n * Creates a Zod schema for multi-factor TOTP authentication number form validation.\n *\n * Validates that a display name is provided.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for multi-factor TOTP authentication number form validation.\n */\nexport function createMultiFactorTotpAuthNumberFormSchema(ui: FirebaseUI) {\n return z.object({\n displayName: z.string().min(1, getTranslation(ui, \"errors\", \"displayNameRequired\")),\n });\n}\n\n/**\n * Creates a Zod schema for multi-factor TOTP authentication verification form validation.\n *\n * Validates that the verification code is exactly 6 characters long.\n *\n * @param ui - The FirebaseUI instance.\n * @returns A Zod schema for multi-factor TOTP authentication verification form validation.\n */\nexport function createMultiFactorTotpAuthVerifyFormSchema(ui: FirebaseUI) {\n return z.object({\n verificationCode: z.string().refine((val) => val.length === 6, {\n error: getTranslation(ui, \"errors\", \"invalidVerificationCode\"),\n }),\n });\n}\n\n/** The inferred type for the sign-in authentication form schema. */\nexport type SignInAuthFormSchema = z.infer<ReturnType<typeof createSignInAuthFormSchema>>;\n/** The inferred type for the sign-up authentication form schema. */\nexport type SignUpAuthFormSchema = z.infer<ReturnType<typeof createSignUpAuthFormSchema>>;\n/** The inferred type for the forgot password authentication form schema. */\nexport type ForgotPasswordAuthFormSchema = z.infer<ReturnType<typeof createForgotPasswordAuthFormSchema>>;\n/** The inferred type for the email link authentication form schema. */\nexport type EmailLinkAuthFormSchema = z.infer<ReturnType<typeof createEmailLinkAuthFormSchema>>;\n/** The inferred type for the phone authentication number form schema. */\nexport type PhoneAuthNumberFormSchema = z.infer<ReturnType<typeof createPhoneAuthNumberFormSchema>>;\n/** The inferred type for the phone authentication verification form schema. */\nexport type PhoneAuthVerifyFormSchema = z.infer<ReturnType<typeof createPhoneAuthVerifyFormSchema>>;\n/** The inferred type for the multi-factor phone authentication number form schema. */\nexport type MultiFactorPhoneAuthNumberFormSchema = z.infer<\n ReturnType<typeof createMultiFactorPhoneAuthNumberFormSchema>\n>;\n/** The inferred type for the multi-factor TOTP authentication number form schema. */\nexport type MultiFactorTotpAuthNumberFormSchema = z.infer<ReturnType<typeof createMultiFactorTotpAuthNumberFormSchema>>;\n/** The inferred type for the multi-factor TOTP authentication verification form schema. */\nexport type MultiFactorTotpAuthVerifyFormSchema = z.infer<ReturnType<typeof createMultiFactorTotpAuthVerifyFormSchema>>;\n","/// <reference types=\"vite/client\" />\n/**\n * Copyright 2025 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0\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 */\n\nimport pkgJson from \"../package.json\";\nimport { registerFramework } from \"./register-framework\";\n\nexport * from \"./auth\";\nexport * from \"./behaviors\";\nexport * from \"./config\";\nexport * from \"./country-data\";\nexport * from \"./errors\";\nexport * from \"./register-framework\";\nexport * from \"./schemas\";\nexport * from \"./translations\";\n\nif (import.meta.env?.PROD) {\n registerFramework(\"core\", pkgJson.version);\n}\n"]}
|