1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="04ca5195-a2f7-d727-c8d0-c3efbb8babe9")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,433925,799243,296678,e=>{"use strict";var t,i=e.i(886565),n=e.i(729602),r=e.i(275057),s=e.i(797660);function a(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}let o=new n.ErrorFactory("auth","Firebase",a()),c=new r.Logger("@firebase/auth");function l(e,...t){c.logLevel<=r.LogLevel.ERROR&&c.error(`Auth (${i.SDK_VERSION}): ${e}`,...t)}function u(e,...t){throw f(e,...t)}function h(e,...t){return f(e,...t)}function d(e,t,i){let r={...a(),[t]:i};return new n.ErrorFactory("auth","Firebase",r).create(t,{appName:e.name})}function p(e){return d(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function m(e,t,i){if(!(t instanceof i))throw i.name!==t.constructor.name&&u(e,"argument-error"),d(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function f(e,...t){if("string"!=typeof e){let i=t[0],n=[...t.slice(1)];return n[0]&&(n[0].appName=e.name),e._errorFactory.create(i,...n)}return o.create(e,...t)}function g(e,t,...i){if(!e)throw f(t,...i)}function I(e){let t="INTERNAL ASSERTION FAILED: "+e;throw l(t),Error(t)}function _(){return"u">typeof self&&self.location?.href||""}function v(){return"http:"===T()||"https:"===T()}function T(){return"u">typeof self&&self.location?.protocol||null}class E{constructor(e,t){this.shortDelay=e,this.longDelay=t,function(e,t){e||I(t)}(t>e,"Short delay should be less than long delay!"),this.isMobile=(0,n.isMobileCordova)()||(0,n.isReactNative)()}get(){return!("u">typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(v()||(0,n.isBrowserExtension)()||"connection"in navigator))||navigator.onLine?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function y(e,t){var i,n;i=e.emulator,n="Emulator should always be set here",i||I(n);let{url:r}=e.emulator;return t?`${r}${t.startsWith("/")?t.slice(1):t}`:r}class w{static initialize(e,t,i){this.fetchImpl=e,t&&(this.headersImpl=t),i&&(this.responseImpl=i)}static fetch(){return this.fetchImpl?this.fetchImpl:"u">typeof self&&"fetch"in self?self.fetch:"u">typeof globalThis&&globalThis.fetch?globalThis.fetch:"u">typeof fetch?fetch:void I("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"u">typeof self&&"Headers"in self?self.Headers:"u">typeof globalThis&&globalThis.Headers?globalThis.Headers:"u">typeof Headers?Headers:void I("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"u">typeof self&&"Response"in self?self.Response:"u">typeof globalThis&&globalThis.Response?globalThis.Response:"u">typeof Response?Response:void I("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}let A={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-rec
2aptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},S=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],R=new E(3e4,6e4);function k(e,t){return e.tenantId&&!t.tenantId?{...t,tenantId:e.tenantId}:t}async function P(e,t,i,r,s={}){return N(e,s,async()=>{let s={},a={};r&&("GET"===t?a=r:s={body:JSON.stringify(r)});let o=(0,n.querystring)({key:e.config.apiKey,...a}).slice(1),c=await e._getAdditionalHeaders();c["Content-Type"]="application/json",e.languageCode&&(c["X-Firebase-Locale"]=e.languageCode);let l={method:t,headers:c,...s};return(0,n.isCloudflareWorker)()||(l.referrerPolicy="no-referrer"),e.emulatorConfig&&(0,n.isCloudWorkstation)(e.emulatorConfig.host)&&(l.credentials="include"),w.fetch()(await O(e,e.config.apiHost,i,o),l)})}async function N(e,t,i){e._canInitEmulator=!1;let r={...A,...t};try{let t=new C(e),n=await Promise.race([i(),t.promise]);t.clearNetworkTimeout();let s=await n.json();if("needConfirmation"in s)throw D(e,"account-exists-with-different-credential",s);if(n.ok&&!("errorMessage"in s))return s;{let[t,i]=(n.ok?s.errorMessage:s.error.message).split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===t)throw D(e,"credential-already-in-use",s);if("EMAIL_EXISTS"===t)throw D(e,"email-already-in-use",s);if("USER_DISABLED"===t)throw D(e,"user-disabled",s);let a=r[t]||t.toLowerCase().replace(/[_\s]+/g,"-");if(i)throw d(e,a,i);u(e,a)}}catch(t){if(t instanceof n.FirebaseError)throw t;u(e,"network-request-failed",{message:String(t)})}}async function b(e,t,i,n,r={}){let s=await P(e,t,i,n,r);return"mfaPendingCredential"in s&&u(e,"multi-factor-auth-required",{_serverResponse:s}),s}async function O(e,t,i,n){let r=`${t}${i}?${n}`,s=e.config.emulator?y(e.config,r):`${e.config.apiScheme}://${r}`;return S.includes(i)&&(await e._persistenceManagerAvailable,"COOKIE"===e._getPersistenceType())?e._getPersistence()._getFinalTarget(s).toString():s}class C{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(h(this.auth,"network-request-failed")),R.get())})}}function D(e,t,i){let n={appName:e.name};i.email&&(n.email=i.email),i.phoneNumber&&(n.phoneNumber=i.phoneNumber);let r=h(e,t,n);return r.customData._tokenResponse=i,r}function L(e){return void 0!==e&&void 0!==e.getResponse}function M(e){return void 0!==e&&void 0!==e.enterprise}class U{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(let t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)switch(t.enforcementState){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PROVIDER")}}async function F(e){return(await P(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}async function V(e,t){return P(e,"GET","/v2/recaptchaConfig",k(e,t))}async function x(e,t){return P(e,"POST","/v1/accounts:delete",t)}async function H(e,t){return P(e,"POST","/v1/accounts:update",t)}async function q(e,t){return P(e,"POST","/v1/accounts:lookup",t)}function j(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}async function W(e,t=!1){let i=(0,n.getModularInstance)(e),r=await i.getIdToken(t),s=z(r);g(s&&s.exp&&s.auth_time&&s.iat,i.auth,"internal-error");let a="object"==typeof s.firebase?s.firebase:void 0,o=a?.sign_in_provider;return{claims:s,token:r,authTime:j(G(s.auth_time)),issuedAtTime:j(G(s.iat)),expirationTime:j(G(s.exp)),signInProvider:o||null,signInSecondFactor:a?.sign_in_second_factor||null}}function G(e){return 1e3*Number(e)}function z(e){let[t,i,r]=e.split(".");if(void 0===t||void 0===i||void 0===r)return l("JWT malformed, contained fewer than 3 sections"),null;try{let e=(0,n.base64Decode)(i);if(!e)return l("Failed to decode base64 JWT payload"),null;return JSON.parse(e)}catch(e){return l("Caught error parsing JWT payload as JSON",e?.toString()),null}}function K(e){let t=z(e);return g(t,"internal-error"),g(void 0!==t.exp,"internal-error"),g(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}async function $(e,t,i=!1){if(i)return t;try{return await t}catch(t){throw t instanceof n.FirebaseError&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}class B{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){if(!e)return this.errorBackoff=3e4,Math.max(0,(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5);{let e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}}schedule(e=!1){if(!this.isRunning)return;let t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){e?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}class J{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=j(this.lastLoginAt),this.creationTime=j(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function Y(e){var t,i;let n=e.auth,r=await e.getIdToken(),s=await $(e,q(n,{idToken:r}));g(s?.users.length,n,"internal-error");let a=s.users[0];e._notifyReloadListener(a);let o=a.providerUserInfo?.length?Q(a.providerUserInfo):[],c=(t=e.providerData,i=o,[...t.filter(e=>!i.some(t=>t.providerId===e.providerId)),...i]),l=e.isAnonymous,u=!(e.email&&a.passwordHash)&&!c?.length;Object.assign(e,{uid:a.localId,displayName:a.displayName||null,photoURL:a.photoUrl||null,email:a.email||null,emailVerified:a.emailVerified||!1,phoneNumber:a.phoneNumber||null,tenantId:a.tenantId||null,providerData:c,metadata:new J(a.createdAt,a.lastLoginAt),isAnonymous:!!l&&u})}async function X(e){let t=(0,n.getModularInstance)(e);await Y(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function Q(e){return e.map(({providerId:e,...t})=>
2({providerId:e,uid:t.rawId||"",displayName:t.displayName||null,email:t.email||null,phoneNumber:t.phoneNumber||null,photoURL:t.photoUrl||null}))}async function Z(e,t){let i=await N(e,{},async()=>{let i=(0,n.querystring)({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:s}=e.config,a=await O(e,r,"/v1/token",`key=${s}`),o=await e._getAdditionalHeaders();o["Content-Type"]="application/x-www-form-urlencoded";let c={method:"POST",headers:o,body:i};return e.emulatorConfig&&(0,n.isCloudWorkstation)(e.emulatorConfig.host)&&(c.credentials="include"),w.fetch()(a,c)});return{accessToken:i.access_token,expiresIn:i.expires_in,refreshToken:i.refresh_token}}async function ee(e,t){return P(e,"POST","/v2/accounts:revokeToken",k(e,t))}class et{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){g(e.idToken,"internal-error"),g(void 0!==e.idToken,"internal-error"),g(void 0!==e.refreshToken,"internal-error");let t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):K(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){g(0!==e.length,"internal-error");let t=K(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e,t=!1){return t||!this.accessToken||this.isExpired?(g(this.refreshToken,e,"user-token-expired"),this.refreshToken)?(await this.refresh(e,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){let{accessToken:i,refreshToken:n,expiresIn:r}=await Z(e,t);this.updateTokensAndExpiration(i,n,Number(r))}updateTokensAndExpiration(e,t,i){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*i}static fromJSON(e,t){let{refreshToken:i,accessToken:n,expirationTime:r}=t,s=new et;return i&&(g("string"==typeof i,"internal-error",{appName:e}),s.refreshToken=i),n&&(g("string"==typeof n,"internal-error",{appName:e}),s.accessToken=n),r&&(g("number"==typeof r,"internal-error",{appName:e}),s.expirationTime=r),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new et,this.toJSON())}_performRefresh(){return I("not implemented")}}function ei(e,t){g("string"==typeof e||void 0===e,"internal-error",{appName:t})}class en{constructor({uid:e,auth:t,stsTokenManager:i,...n}){this.providerId="firebase",this.proactiveRefresh=new B(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=t,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=n.displayName||null,this.email=n.email||null,this.emailVerified=n.emailVerified||!1,this.phoneNumber=n.phoneNumber||null,this.photoURL=n.photoURL||null,this.isAnonymous=n.isAnonymous||!1,this.tenantId=n.tenantId||null,this.providerData=n.providerData?[...n.providerData]:[],this.metadata=new J(n.createdAt||void 0,n.lastLoginAt||void 0)}async getIdToken(e){let t=await $(this,this.stsTokenManager.getToken(this.auth,e));return g(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return W(this,e)}reload(){return X(this)}_assign(e){this!==e&&(g(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(e=>({...e})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let t=new en({...this,auth:e,stsTokenManager:this.stsTokenManager._clone()});return t.metadata._copy(this.metadata),t}_onReload(e){g(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let i=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),i=!0),t&&await Y(this),await this.auth._persistUserIfCurrent(this),i&&this.auth._notifyListenersIfCurrent(this)}async delete(){if((0,i._isFirebaseServerApp)(this.auth.app))return Promise.reject(p(this.auth));let e=await this.getIdToken();return await $(this,x(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isA
2nonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>({...e})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId,...this.metadata.toJSON(),apiKey:this.auth.config.apiKey,appName:this.auth.name}}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){let i=t.displayName??void 0,n=t.email??void 0,r=t.phoneNumber??void 0,s=t.photoURL??void 0,a=t.tenantId??void 0,o=t._redirectEventId??void 0,c=t.createdAt??void 0,l=t.lastLoginAt??void 0,{uid:u,emailVerified:h,isAnonymous:d,providerData:p,stsTokenManager:m}=t;g(u&&m,e,"internal-error");let f=et.fromJSON(this.name,m);g("string"==typeof u,e,"internal-error"),ei(i,e.name),ei(n,e.name),g("boolean"==typeof h,e,"internal-error"),g("boolean"==typeof d,e,"internal-error"),ei(r,e.name),ei(s,e.name),ei(a,e.name),ei(o,e.name),ei(c,e.name),ei(l,e.name);let I=new en({uid:u,auth:e,email:n,emailVerified:h,displayName:i,isAnonymous:d,photoURL:s,phoneNumber:r,tenantId:a,stsTokenManager:f,createdAt:c,lastLoginAt:l});return p&&Array.isArray(p)&&(I.providerData=p.map(e=>({...e}))),o&&(I._redirectEventId=o),I}static async _fromIdTokenResponse(e,t,i=!1){let n=new et;n.updateFromServerResponse(t);let r=new en({uid:t.localId,auth:e,stsTokenManager:n,isAnonymous:i});return await Y(r),r}static async _fromGetAccountInfoResponse(e,t,i){let n=t.users[0];g(void 0!==n.localId,"internal-error");let r=void 0!==n.providerUserInfo?Q(n.providerUserInfo):[],s=!(n.email&&n.passwordHash)&&!r?.length,a=new et;a.updateFromIdToken(i);let o=new en({uid:n.localId,auth:e,stsTokenManager:a,isAnonymous:s});return Object.assign(o,{uid:n.localId,displayName:n.displayName||null,photoURL:n.photoUrl||null,email:n.email||null,emailVerified:n.emailVerified||!1,phoneNumber:n.phoneNumber||null,tenantId:n.tenantId||null,providerData:r,metadata:new J(n.createdAt,n.lastLoginAt),isAnonymous:!(n.email&&n.passwordHash)&&!r?.length}),o}}let er=new Map;function es(e){var t,i;t="Expected a class definition",e instanceof Function||I(t);let n=er.get(e);return n?(i="Instance stored in cache mismatched with class",n instanceof e||I(i)):(n=new e,er.set(e,n)),n}class ea{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){let t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}function eo(e,t,i){return`firebase:${e}:${t}:${i}`}ea.type="NONE";class ec{constructor(e,t,i){this.persistence=e,this.auth=t,this.userKey=i;const{config:n,name:r}=this.auth;this.fullUserKey=eo(this.userKey,n.apiKey,r),this.fullPersistenceKey=eo("persistence",n.apiKey,r),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){let e=await this.persistence._get(this.fullUserKey);if(!e)return null;if("string"==typeof e){let t=await q(this.auth,{idToken:e}).catch(()=>void 0);return t?en._fromGetAccountInfoResponse(this.auth,t,e):null}return en._fromJSON(this.auth,e)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;let t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,i="authUser"){if(!t.length)return new ec(es(ea),e,i);let n=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),r=n[0]||es(ea),s=eo(i,e.config.apiKey,e.name),a=null;for(let i of t)try{let t=await i._get(s);if(t){let n;if("string"==typeof t){let i=await q(e,{idToken:t}).catch(()=>void 0);if(!i)break;n=await en._fromGetAccountInfoResponse(e,i,t)}else n=en._fromJSON(e,t);i!==r&&(a=n),r=i;break}}catch{}let o=n.filter(e=>e._shouldAllowMigration);return r._shouldAllowMigration&&o.length&&(r=o[0],a&&await r._set(s,a.toJSON()),await Promise.all(t.map(async e=>{if(e!==r)try{await e._remove(s)}catch{}}))),new ec(r,e,i)}}function el(e){let t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";{if(ep(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(eu(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(ef(t))return"Blackberry";if(eg(t))return"Webos";if(eh(t))return"Safari";if((t.includes("chrome/")||ed(t))&&!t.includes("edge/"))return"Chrome";if(em(t))return"Android";let i=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if(i?.length===2)return i[1]}return"Other"}function eu(e=(0,n.getUA)()){return/firefox\//i.test(e)}function eh(e=(0,n.getUA)()){let t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function ed(e=(0,n.getUA)()){return/crios\//i.test(e)}function ep(e=(0,n.getUA)()){return/iemobile/i.test(e)}function em(e=(0,n.getUA)()){return/android/i.test(e)}function ef(e=(0,n.getUA)()){return/blackberry/i.test(e)}function eg(e=(0,n.getUA)()){return/webos/i.test(e)}function eI(e=(0,n.getUA)()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function e_(e=(0,n.getUA)()){return eI(e)||em(e)||eg(e)||ef(e)||/windows phone/i.test(e)||ep(e)}function ev(e,t=[]){let r;switch(e){case"Browser":r=el((0,n.getUA)());break;case"Worker":r=`${el((0,n.getUA)())}-${e}`;break;default:r=e}let s=t.length?t.join(","):"FirebaseCore-web";return`${r}/JsCore/${i.SDK_VERSION}/${s}`}class eT{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let i=t=>new Promise((i,n)=>{try{let n=e(t);i(n)}catch(e){n(e)}});i.onAbort=t,this.queue.push(i);let n=this.queue.length-1;return()=>{this.queue[n]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;let t=[];try{for(let i of this.queue)await i(e),i.onAbort&&t.push(i.onAbort)}catch(e){for(let e of(t.reverse(),t))try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:e?.message})}}}async function eE(e,t={}){return P(e,"GET","/v2/passwordPolicy",k(e,t))}class ey{constructor(e){const t=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=t.minPasswordLength??6,t.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=t.maxPasswordLength),void 0!==t.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=t.containsLowercaseCharacter),void 0!==t.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=t.containsUppercaseCharacter),void 0!==t.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=t.containsNumericCharacter),void 0!==t.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=t.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=e.allowedNonAlphanumericCharacters?.join("")??"",this.forceUpgradeOnSignin=e.forceUpgradeOnSignin??!1,this.schemaVersion=e.schemaVersion}validatePassword(e){let t={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,t),this.validatePasswordCharacterOptions(e,t),t.isValid&&
2(t.isValid=t.meetsMinPasswordLength??!0),t.isValid&&(t.isValid=t.meetsMaxPasswordLength??!0),t.isValid&&(t.isValid=t.containsLowercaseLetter??!0),t.isValid&&(t.isValid=t.containsUppercaseLetter??!0),t.isValid&&(t.isValid=t.containsNumericCharacter??!0),t.isValid&&(t.isValid=t.containsNonAlphanumericCharacter??!0),t}validatePasswordLengthOptions(e,t){let i=this.customStrengthOptions.minPasswordLength,n=this.customStrengthOptions.maxPasswordLength;i&&(t.meetsMinPasswordLength=e.length>=i),n&&(t.meetsMaxPasswordLength=e.length<=n)}validatePasswordCharacterOptions(e,t){let i;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let n=0;n<e.length;n++)i=e.charAt(n),this.updatePasswordCharacterOptionsStatuses(t,i>="a"&&i<="z",i>="A"&&i<="Z",i>="0"&&i<="9",this.allowedNonAlphanumericCharacters.includes(i))}updatePasswordCharacterOptionsStatuses(e,t,i,n,r){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=i)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=n)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=r))}}class ew{constructor(e,t,i,n){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=i,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new eS(this),this.idTokenSubscription=new eS(this),this.beforeStateQueue=new eT(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=o,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=n.sdkClientVersion,this._persistenceManagerAvailable=new Promise(e=>this._resolvePersistenceManagerAvailable=e)}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=es(t)),this._initializationPromise=this.queue(async()=>{if(!this._deleted){if(this.persistenceManager=await ec.create(this,e),this._resolvePersistenceManagerAvailable?.(),!this._deleted){if(this._popupRedirectResolver?._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}await this.initializeCurrentUser(t),this.lastNotifiedUid=this.currentUser?.uid||null,this._deleted||(this._isInitialized=!0)}}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;let e=await this.assertedPersistence.getCurrentUser();if(this.currentUser||e){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUserFromIdToken(e){try{let t=await q(this,{idToken:e}),i=await en._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(i)}catch(e){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",e),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){if((0,i._isFirebaseServerApp)(this.app)){let e=this.app.settings.authIdToken;return e?new Promise(t=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(e).then(t,t))}):this.directlySetCurrentUser(null)}let t=await this.assertedPersistence.getCurrentUser(),n=t,r=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let t=this.redirectUser?._redirectEventId,i=n?._redirectEventId,s=await this.tryRedirectSignIn(e);(!t||t===i)&&s?.user&&(n=s.user,r=!0)}if(!n)return this.directlySetCurrentUser(null);if(!n._redirectEventId){if(r)try{await this.beforeStateQueue.runMiddleware(n)}catch(e){n=t,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return n?this.reloadAndSetCurrentUserOrClear(n):this.directlySetCurrentUser(null)}return(g(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===n._redirectEventId)?this.directlySetCurrentUser(n):this.reloadAndSetCurrentUserOrClear(n)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(e){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await Y(e)}catch(e){if(e?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("u"<typeof navigator)return null;let e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}
2async updateCurrentUser(e){if((0,i._isFirebaseServerApp)(this.app))return Promise.reject(p(this));let t=e?(0,n.getModularInstance)(e):null;return t&&g(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&g(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return(0,i._isFirebaseServerApp)(this.app)?Promise.reject(p(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return(0,i._isFirebaseServerApp)(this.app)?Promise.reject(p(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(es(e))})}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();let t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){let e=new ey(await eE(this));null===this.tenantId?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new n.ErrorFactory("auth","Firebase",e())}onAuthStateChanged(e,t,i){return this.registerStateListener(this.authStateSubscription,e,t,i)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,i){return this.registerStateListener(this.idTokenSubscription,e,t,i)}authStateReady(){return new Promise((e,t)=>{if(this.currentUser)e();else{let i=this.onAuthStateChanged(()=>{i(),e()},t)}})}async revokeAccessToken(e){if(this.currentUser){let t={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:await this.currentUser.getIdToken()};null!=this.tenantId&&(t.tenantId=this.tenantId),await ee(this,t)}}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}async _setRedirectUser(e,t){let i=await this.getOrInitRedirectPersistenceManager(t);return null===e?i.removeCurrentUser():i.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&es(e)||this._popupRedirectResolver;g(t,this,"argument-error"),this.redirectPersistenceManager=await ec.create(this,[es(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){return(this._isInitialized&&await this.queue(async()=>{}),this._currentUser?._redirectEventId===e)?this._currentUser:this.redirectUser?._redirectEventId===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let e=this.currentUser?.uid??null;this.lastNotifiedUid!==e&&(this.lastNotifiedUid=e,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,i,n){if(this._deleted)return()=>{};let r="function"==typeof t?t:t.next.bind(t),s=!1,a=this._isInitialized?Promise.resolve():this._initializationPromise;if(g(a,this,"internal-error"),a.then(()=>{s||r(this.currentUser)}),"function"==typeof t){let r=e.addObserver(t,i,n);return()=>{s=!0,r()}}{let i=e.addObserver(t);return()=>{s=!0,i()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return g(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=ev(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){let e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId);let t=await this.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader();t&&(e["X-Firebase-Client"]=t);let i=await this._getAppCheckToken();return i&&(e["X-Firebase-AppCheck"]=i),e}async _getAppCheckToken(){if((0,i._isFirebaseServerApp)(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let e=await this.appCheckServiceProvider.getImmediate({optional:!0})?.getToken();return e?.error&&function(e,...t){c.logLevel<=r.LogLevel.WARN&&c.warn(`Auth (${i.SDK_VERSION}): ${e}`,...t)}(`Error while retrieving App Check token: ${e.error}`),e?.token}}function eA(e){return(0,n.getModularInstance)(e)}class eS{constructor(e){this.auth=e,this.observer=null,this.addObserver=(0,n.createSubscribe)(e=>this.observer=e)}get next(){return g(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let eR={async loadJS(){throw Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function ek(e){return eR.loadJS(e)}function eP(e){return`__${e}${Math.floor(1e6*Math.random())}`}class eN{constructor(e){this.auth=e,this.counter=1e12,this._widgets=new Map}render(e,t){let i=this.counter;return this._widgets.set(i,new eC(e,this.auth.name,t||{})),this.counter++,i}reset(e){let t=e||1e12;this._widgets.get(t)?.delete(),this._widgets.delete(t)}getResponse(e){return this._widgets.get(e||1e12)?.getResponse()||""}async execute(e){return this._widgets.get(e||1e12)?.execute(),""}}class eb{constructor(){this.enterprise=new eO}ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}class eO{ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}class eC{constructor(e,t,i){this.params=i,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const n="string"==typeof e?document.getElementById(e):e;g(n,"argument-error",{appName:t}),this.container=n,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),this.timerId||(this.timerId=window.setTimeout(()=>{this.responseToken=function(){let e=[],t="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let i=0;i<50;i++)e.push(t.charAt(Math.floor(Math.random()*t.length)));return e.join("")}();let{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(e){}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(e){}this.isVisible&&this.execute()},6e4)},500))}checkIfDeleted(){if(this.deleted)throw Error("reCAPTCHA mock was already deleted!")}}let eD="NO_RECAPTCHA";class eL{constructor(e){this.type="recaptcha-enterprise",this.auth=eA(e)}async verify(e="verify",t=!1){async function i(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,i)=>
2{V(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(n=>{if(void 0===n.recaptchaKey)i(Error("recaptcha Enterprise site key undefined"));else{let i=new U(n);return null==e.tenantId?e._agentRecaptchaConfig=i:e._tenantRecaptchaConfigs[e.tenantId]=i,t(i.siteKey)}}).catch(e=>{i(e)})})}function n(t,i,n){let r=window.grecaptcha;M(r)?r.enterprise.ready(()=>{r.enterprise.execute(t,{action:e}).then(e=>{i(e)}).catch(()=>{i(eD)})}):n(Error("No reCAPTCHA enterprise script loaded."))}return this.auth.settings.appVerificationDisabledForTesting?new eb().execute("siteKey",{action:"verify"}):new Promise((e,r)=>{i(this.auth).then(i=>{if(!t&&M(window.grecaptcha))n(i,e,r);else{if("u"<typeof window)return void r(Error("RecaptchaVerifier is only supported in browser"));let t=eR.recaptchaEnterpriseScript;0!==t.length&&(t+=i),ek(t).then(()=>{n(i,e,r)}).catch(e=>{r(e)})}}).catch(e=>{r(e)})})}}async function eM(e,t,i,n=!1,r=!1){let s,a=new eL(e);if(r)s=eD;else try{s=await a.verify(i)}catch(e){s=await a.verify(i,!0)}let o={...t};if("mfaSmsEnrollment"===i||"mfaSmsSignIn"===i){if("phoneEnrollmentInfo"in o){let e=o.phoneEnrollmentInfo.phoneNumber,t=o.phoneEnrollmentInfo.recaptchaToken;Object.assign(o,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:t,captchaResponse:s,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in o){let e=o.phoneSignInInfo.recaptchaToken;Object.assign(o,{phoneSignInInfo:{recaptchaToken:e,captchaResponse:s,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return o}return n?Object.assign(o,{captchaResp:s}):Object.assign(o,{captchaResponse:s}),Object.assign(o,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(o,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),o}async function eU(e,t,i,n,r){if("EMAIL_PASSWORD_PROVIDER"===r)if(!e._getRecaptchaConfig()?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER"))return n(e,t).catch(async r=>{if("auth/missing-recaptcha-token"!==r.code)return Promise.reject(r);{console.log(`${i} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let r=await eM(e,t,i,"getOobCode"===i);return n(e,r)}});else{let r=await eM(e,t,i,"getOobCode"===i);return n(e,r)}if("PHONE_PROVIDER"!==r)return Promise.reject(r+" provider is not supported.");if(e._getRecaptchaConfig()?.isProviderEnabled("PHONE_PROVIDER")){let r=await eM(e,t,i);return n(e,r).catch(async r=>{if(e._getRecaptchaConfig()?.getProviderEnforcementState("PHONE_PROVIDER")==="AUDIT"&&("auth/missing-recaptcha-token"===r.code||"auth/invalid-app-credential"===r.code)){console.log(`Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ${i} flow.`);let r=await eM(e,t,i,!1,!0);return n(e,r)}return Promise.reject(r)})}{let r=await eM(e,t,i,!1,!0);return n(e,r)}}async function eF(e){let t=eA(e),i=new U(await V(t,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}));null==t.tenantId?t._agentRecaptchaConfig=i:t._tenantRecaptchaConfigs[t.tenantId]=i,i.isAnyProviderEnabled()&&new eL(t).verify()}function eV(e,t){let r=(0,i._getProvider)(e,"auth");if(r.isInitialized()){let e=r.getImmediate(),i=r.getOptions();if((0,n.deepEqual)(i,t??{}))return e;u(e,"already-initialized")}return r.initialize({options:t})}function ex(e,t,i){let r=eA(e);g(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");let s=!!i?.disableWarnings,a=eH(t),{host:o,port:c}=function(e){let t=eH(e),i=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!i)return{host:"",port:null};let n=i[2].split("@").pop()||"",r=/^(\[[^\]]+\])(:|$)/.exec(n);if(r){let e=r[1];return{host:e,port:eq(n.substr(e.length+1))}}{let[e,t]=n.split(":");return{host:e,port:eq(t)}}}(t),l=null===c?"":`:${c}`,u={url:`${a}//${o}${l}/`},h=Object.freeze({host:o,port:c,protocol:a.replace(":",""),options:Object.freeze({disableWarnings:s})});if(!r._canInitEmulator){g(r.config.emulator&&r.emulatorConfig,r,"emulator-config-failed"),g((0,n.deepEqual)(u,r.config.emulator)&&(0,n.deepEqual)(h,r.emulatorConfig),r,"emulator-config-failed");return}r.config.emulator=u,r.emulatorConfig=h,r.settings.appVerificationDisabledForTesting=!0,(0,n.isCloudWorkstation)(o)?(0,n.pingServer)(`${a}//${o}${l}`):s||function(){function e(){let e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"u">typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),"u">typeof window&&"u">typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function eH(e){let t=e.indexOf(":");
2return t<0?"":e.substr(0,t+1)}function eq(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}class ej{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return I("not implemented")}_getIdTokenResponse(e){return I("not implemented")}_linkToIdToken(e,t){return I("not implemented")}_getReauthenticationResolver(e){return I("not implemented")}}async function eW(e,t){return P(e,"POST","/v1/accounts:resetPassword",k(e,t))}async function eG(e,t){return P(e,"POST","/v1/accounts:update",t)}async function ez(e,t){return P(e,"POST","/v1/accounts:signUp",t)}async function eK(e,t){return P(e,"POST","/v1/accounts:update",k(e,t))}async function e$(e,t){return b(e,"POST","/v1/accounts:signInWithPassword",k(e,t))}async function eB(e,t){return P(e,"POST","/v1/accounts:sendOobCode",k(e,t))}async function eJ(e,t){return eB(e,t)}async function eY(e,t){return eB(e,t)}async function eX(e,t){return eB(e,t)}async function eQ(e,t){return eB(e,t)}async function eZ(e,t){return b(e,"POST","/v1/accounts:signInWithEmailLink",k(e,t))}async function e0(e,t){return b(e,"POST","/v1/accounts:signInWithEmailLink",k(e,t))}class e1 extends ej{constructor(e,t,i,n=null){super("password",i),this._email=e,this._password=t,this._tenantId=n}static _fromEmailAndPassword(e,t){return new e1(e,t,"password")}static _fromEmailAndCode(e,t,i=null){return new e1(e,t,"emailLink",i)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e;if(t?.email&&t?.password){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);else if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return eU(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",e$,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return eZ(e,{email:this._email,oobCode:this._password});default:u(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return eU(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",ez,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return e0(e,{idToken:t,email:this._email,oobCode:this._password});default:u(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function e2(e,t){return b(e,"POST","/v1/accounts:signInWithIdp",k(e,t))}class e3 extends ej{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let t=new e3(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):u("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
2once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let{providerId:t,signInMethod:i,...n}="string"==typeof e?JSON.parse(e):e;if(!t||!i)return null;let r=new e3(t,i);return r.idToken=n.idToken||void 0,r.accessToken=n.accessToken||void 0,r.secret=n.secret,r.nonce=n.nonce,r.pendingToken=n.pendingToken||null,r}_getIdTokenResponse(e){return e2(e,this.buildRequest())}_linkToIdToken(e,t){let i=this.buildRequest();return i.idToken=t,e2(e,i)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,e2(e,t)}buildRequest(){let e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=(0,n.querystring)(t)}return e}}async function e6(e,t){return P(e,"POST","/v1/accounts:sendVerificationCode",k(e,t))}async function e4(e,t){return b(e,"POST","/v1/accounts:signInWithPhoneNumber",k(e,t))}async function e5(e,t){let i=await b(e,"POST","/v1/accounts:signInWithPhoneNumber",k(e,t));if(i.temporaryProof)throw D(e,"account-exists-with-different-credential",i);return i}let e9={USER_NOT_FOUND:"user-not-found"};async function e7(e,t){return b(e,"POST","/v1/accounts:signInWithPhoneNumber",k(e,{...t,operation:"REAUTH"}),e9)}class e8 extends ej{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new e8({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new e8({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return e4(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return e5(e,{idToken:t,...this._makeVerificationRequest()})}_getReauthenticationResolver(e){return e7(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:i,verificationCode:n}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:i,code:n}}toJSON(){let e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));let{verificationId:t,verificationCode:i,phoneNumber:n,temporaryProof:r}=e;return i||t||n||r?new e8({verificationId:t,verificationCode:i,phoneNumber:n,temporaryProof:r}):null}}class te{constructor(e){const t=(0,n.querystringDecode)((0,n.extractQuerystring)(e)),i=t.apiKey??null,r=t.oobCode??null,s=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(t.mode??null);g(i&&r&&s,"argument-error"),this.apiKey=i,this.operation=s,this.code=r,this.continueUrl=t.continueUrl??null,this.languageCode=t.lang??null,this.tenantId=t.tenantId??null}static parseLink(e){let t,i,r,s=(i=(t=(0,n.querystringDecode)((0,n.extractQuerystring)(e)).link)?(0,n.querystringDecode)((0,n.extractQuerystring)(t)).deep_link_id:null,((r=(0,n.querystringDecode)((0,n.extractQuerystring)(e)).deep_link_id)?(0,n.querystringDecode)((0,n.extractQuerystring)(r)).link:null)||r||i||t||e);try{return new te(s)}catch{return null}}}class tt{constructor(){this.providerId=tt.PROVIDER_ID}static credential(e,t){return e1._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let i=te.parseLink(t);return g(i,"argument-error"),e1._fromEmailAndCode(e,i.code,i.tenantId)}}tt.PROVIDER_ID="password",tt.EMAIL_PASSWORD_SIGN_IN_METHOD="password",tt.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class ti{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}class tn extends ti{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class tr extends tn{static credentialFromJSON(e){let t="string"==typeof e?JSON.parse(e):e;return g("providerId"in t&&"signInMethod"in t,"argument-error"),e3._fromParams(t)}credential(e){return this._credential({...e,nonce:e.rawNonce})}_credential(e){return g(e.idToken||e.accessToken,"argument-error"),e3._fromParams({...e,providerId:this.providerId,sign
2InMethod:this.providerId})}static credentialFromResult(e){return tr.oauthCredentialFromTaggedObject(e)}static credentialFromError(e){return tr.oauthCredentialFromTaggedObject(e.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:i,oauthTokenSecret:n,pendingToken:r,nonce:s,providerId:a}=e;if(!i&&!n&&!t&&!r||!a)return null;try{return new tr(a)._credential({idToken:t,accessToken:i,nonce:s,pendingToken:r})}catch(e){return null}}}class ts extends tn{constructor(){super("facebook.com")}static credential(e){return e3._fromParams({providerId:ts.PROVIDER_ID,signInMethod:ts.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return ts.credentialFromTaggedObject(e)}static credentialFromError(e){return ts.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return ts.credential(e.oauthAccessToken)}catch{return null}}}ts.FACEBOOK_SIGN_IN_METHOD="facebook.com",ts.PROVIDER_ID="facebook.com";class ta extends tn{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return e3._fromParams({providerId:ta.PROVIDER_ID,signInMethod:ta.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return ta.credentialFromTaggedObject(e)}static credentialFromError(e){return ta.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:i}=e;if(!t&&!i)return null;try{return ta.credential(t,i)}catch{return null}}}ta.GOOGLE_SIGN_IN_METHOD="google.com",ta.PROVIDER_ID="google.com";class to extends tn{constructor(){super("github.com")}static credential(e){return e3._fromParams({providerId:to.PROVIDER_ID,signInMethod:to.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return to.credentialFromTaggedObject(e)}static credentialFromError(e){return to.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return to.credential(e.oauthAccessToken)}catch{return null}}}to.GITHUB_SIGN_IN_METHOD="github.com",to.PROVIDER_ID="github.com";class tc extends ej{constructor(e,t){super(e,e),this.pendingToken=t}_getIdTokenResponse(e){return e2(e,this.buildRequest())}_linkToIdToken(e,t){let i=this.buildRequest();return i.idToken=t,e2(e,i)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,e2(e,t)}toJSON(){return{signInMethod:this.signInMethod,providerId:this.providerId,pendingToken:this.pendingToken}}static fromJSON(e){let{providerId:t,signInMethod:i,pendingToken:n}="string"==typeof e?JSON.parse(e):e;return t&&i&&n&&t===i?new tc(t,n):null}static _create(e,t){return new tc(e,t)}buildRequest(){return{requestUri:"http://localhost",returnSecureToken:!0,pendingToken:this.pendingToken}}}class tl extends ti{constructor(e){g(e.startsWith("saml."),"argument-error"),super(e)}static credentialFromResult(e){return tl.samlCredentialFromTaggedObject(e)}static credentialFromError(e){return tl.samlCredentialFromTaggedObject(e.customData||{})}static credentialFromJSON(e){let t=tc.fromJSON(e);return g(t,"argument-error"),t}static samlCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{pendingToken:t,providerId:i}=e;if(!t||!i)return null;try{return tc._create(i,t)}catch(e){return null}}}class tu extends tn{constructor(){super("twitter.com")}static credential(e,t){return e3._fromParams({providerId:tu.PROVIDER_ID,signInMethod:tu.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return tu.credentialFromTaggedObject(e)}static credentialFromError(e){return tu.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:t,oauthTokenSecret:i}=e;if(!t||!i)return null;try{return tu.credential(t,i)}catch{return null}}}async function th(e,t){return b(e,"POST","/v1/accounts:signUp",k(e,t))}tu.TWITTER_SIGN_IN_METHOD="twitter.com",tu.PROVIDER_ID="twitter.com";class td{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,i,n=!1){return new td({user:await en._fromIdTokenResponse(e,i,n),providerId:tp(i),_tokenResponse:i,operationType:t})}static async _forOperation(e,t,i){return await e._updateTokensIfNecessary(i,!0),new td({user:e,providerId:tp(i),_tokenResponse:i,operationType:t})}}function tp(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}async function tm(e){if((0,i._isFirebaseServerApp)(e.app))return Promise.reject(p(e));let t=eA(e);
2if(await t._initializationPromise,t.currentUser?.isAnonymous)return new td({user:t.currentUser,providerId:null,operationType:"signIn"});let n=await th(t,{returnSecureToken:!0}),r=await td._fromIdTokenResponse(t,"signIn",n,!0);return await t._updateCurrentUser(r.user),r}class tf extends n.FirebaseError{constructor(e,t,i,n){super(t.code,t.message),this.operationType=i,this.user=n,Object.setPrototypeOf(this,tf.prototype),this.customData={appName:e.name,tenantId:e.tenantId??void 0,_serverResponse:t.customData._serverResponse,operationType:i}}static _fromErrorAndOperation(e,t,i,n){return new tf(e,t,i,n)}}function tg(e,t,i,n){return("reauthenticate"===t?i._getReauthenticationResolver(e):i._getIdTokenResponse(e)).catch(i=>{if("auth/multi-factor-auth-required"===i.code)throw tf._fromErrorAndOperation(e,i,t,n);throw i})}function tI(e){return new Set(e.map(({providerId:e})=>e).filter(e=>!!e))}async function t_(e,t){let i=(0,n.getModularInstance)(e);await tT(!0,i,t);let{providerUserInfo:r}=await H(i.auth,{idToken:await i.getIdToken(),deleteProvider:[t]}),s=tI(r||[]);return i.providerData=i.providerData.filter(e=>s.has(e.providerId)),s.has("phone")||(i.phoneNumber=null),await i.auth._persistUserIfCurrent(i),i}async function tv(e,t,i=!1){let n=await $(e,t._linkToIdToken(e.auth,await e.getIdToken()),i);return td._forOperation(e,"link",n)}async function tT(e,t,i){await Y(t),g(tI(t.providerData).has(i)===e,t.auth,!1===e?"provider-already-linked":"no-such-provider")}async function tE(e,t,n=!1){let{auth:r}=e;if((0,i._isFirebaseServerApp)(r.app))return Promise.reject(p(r));let s="reauthenticate";try{let i=await $(e,tg(r,s,t,e),n);g(i.idToken,r,"internal-error");let a=z(i.idToken);g(a,r,"internal-error");let{sub:o}=a;return g(e.uid===o,r,"user-mismatch"),td._forOperation(e,s,i)}catch(e){throw e?.code==="auth/user-not-found"&&u(r,"user-mismatch"),e}}async function ty(e,t,n=!1){if((0,i._isFirebaseServerApp)(e.app))return Promise.reject(p(e));let r="signIn",s=await tg(e,r,t),a=await td._fromIdTokenResponse(e,r,s);return n||await e._updateCurrentUser(a.user),a}async function tw(e,t){return ty(eA(e),t)}async function tA(e,t){let i=(0,n.getModularInstance)(e);return await tT(!1,i,t.providerId),tv(i,t)}async function tS(e,t){return tE((0,n.getModularInstance)(e),t)}async function tR(e,t){return b(e,"POST","/v1/accounts:signInWithCustomToken",k(e,t))}async function tk(e,t){if((0,i._isFirebaseServerApp)(e.app))return Promise.reject(p(e));let n=eA(e),r=await tR(n,{token:t,returnSecureToken:!0}),s=await td._fromIdTokenResponse(n,"signIn",r);return await n._updateCurrentUser(s.user),s}class tP{constructor(e,t){this.factorId=e,this.uid=t.mfaEnrollmentId,this.enrollmentTime=new Date(t.enrolledAt).toUTCString(),this.displayName=t.displayName}static _fromServerResponse(e,t){return"phoneInfo"in t?tN._fromServerResponse(e,t):"totpInfo"in t?tb._fromServerResponse(e,t):u(e,"internal-error")}}class tN extends tP{constructor(e){super("phone",e),this.phoneNumber=e.phoneInfo}static _fromServerResponse(e,t){return new tN(t)}}class tb extends tP{constructor(e){super("totp",e)}static _fromServerResponse(e,t){return new tb(t)}}function tO(e,t,i){g(i.url?.length>0,e,"invalid-continue-uri"),g(void 0===i.dynamicLinkDomain||i.dynamicLinkDomain.length>0,e,"invalid-dynamic-link-domain"),g(void 0===i.linkDomain||i.linkDomain.length>0,e,"invalid-hosting-link-domain"),t.continueUrl=i.url,t.dynamicLinkDomain=i.dynamicLinkDomain,t.linkDomain=i.linkDomain,t.canHandleCodeInApp=i.handleCodeInApp,i.iOS&&(g(i.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iOSBundleId=i.iOS.bundleId),i.android&&(g(i.android.packageName.length>0,e,"missing-android-pkg-name"),t.androidInstallApp=i.android.installApp,t.androidMinimumVersionCode=i.android.minimumVersion,t.androidPackageName=i.android.packageName)}async function tC(e){let t=eA(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function tD(e,t,i){let n=eA(e),r={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};i&&tO(n,r,i),await eU(n,r,"getOobCode",eY,"EMAIL_PASSWORD_PROVIDER")}async function tL(e,t,i){await eW((0,n.getModularInstance)(e),{oobCode:t,newPassword:i}).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&tC(e),t})}async function tM(e,t){await eK((0,n.getModularInstance)(e),{oobCode:t})}async function tU(e,t){let i=(0,n.getModularInstance)(e),r=await eW(i,{oobCode:t}),s=r.requestType;switch(g(s,i,"internal-error"),s){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":g(r.newEmail,i,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":g(r.mfaInfo,i,"internal-error");default:g(r.email,i,"internal-error")}let a=null;return r.mfaInfo&&(a=tP._fromServerResponse(eA(i),r.mfaInfo)),{data:{email:("VERIFY_AND_CHANGE_EMAIL"===r.requestType?r.newEmail:r.email)||null,previousEmail:("VERIFY_AND_CHANGE_EMAIL"===r.requestType?r.email:r.newEmail)||null,multiFactorInfo:a},operation:s}}async function tF(e,t){let{data:i}=await tU((0,n.getModularInstance)(e),t);return i.email}
2async function tV(e,t,n){if((0,i._isFirebaseServerApp)(e.app))return Promise.reject(p(e));let r=eA(e),s=eU(r,{returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",th,"EMAIL_PASSWORD_PROVIDER"),a=await s.catch(t=>{throw"auth/password-does-not-meet-requirements"===t.code&&tC(e),t}),o=await td._fromIdTokenResponse(r,"signIn",a);return await r._updateCurrentUser(o.user),o}async function tx(e,t,i){let n=eA(e),r={requestType:"EMAIL_SIGNIN",email:t,clientType:"CLIENT_TYPE_WEB"};g(i.handleCodeInApp,n,"argument-error"),i&&tO(n,r,i),await eU(n,r,"getOobCode",eX,"EMAIL_PASSWORD_PROVIDER")}async function tH(e,t,r){if((0,i._isFirebaseServerApp)(e.app))return Promise.reject(p(e));let s=(0,n.getModularInstance)(e),a=tt.credentialWithLink(t,r||_());return g(a._tenantId===(s.tenantId||null),s,"tenant-id-mismatch"),tw(s,a)}async function tq(e,t){return P(e,"POST","/v1/accounts:createAuthUri",k(e,t))}async function tj(e,t){let i=v()?_():"http://localhost",{signinMethods:r}=await tq((0,n.getModularInstance)(e),{identifier:t,continueUri:i});return r||[]}async function tW(e,t){let i=(0,n.getModularInstance)(e),r={requestType:"VERIFY_EMAIL",idToken:await e.getIdToken()};t&&tO(i.auth,r,t);let{email:s}=await eJ(i.auth,r);s!==e.email&&await e.reload()}async function tG(e,t,i){let r=(0,n.getModularInstance)(e),s={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:await e.getIdToken(),newEmail:t};i&&tO(r.auth,s,i);let{email:a}=await eQ(r.auth,s);a!==e.email&&await e.reload()}async function tz(e,t){return P(e,"POST","/v1/accounts:update",t)}async function tK(e,{displayName:t,photoURL:i}){if(void 0===t&&void 0===i)return;let r=(0,n.getModularInstance)(e),s=await r.getIdToken(),a=await $(r,tz(r.auth,{idToken:s,displayName:t,photoUrl:i,returnSecureToken:!0}));r.displayName=a.displayName||null,r.photoURL=a.photoUrl||null;let o=r.providerData.find(({providerId:e})=>"password"===e);o&&(o.displayName=r.displayName,o.photoURL=r.photoURL),await r._updateTokensIfNecessary(a)}async function t$(e,t,i){let{auth:n}=e,r={idToken:await e.getIdToken(),returnSecureToken:!0};t&&(r.email=t),i&&(r.password=i);let s=await $(e,eG(n,r));await e._updateTokensIfNecessary(s,!0)}class tB{constructor(e,t,i={}){this.isNewUser=e,this.providerId=t,this.profile=i}}class tJ extends tB{constructor(e,t,i,n){super(e,t,i),this.username=n}}class tY extends tB{constructor(e,t){super(e,"facebook.com",t)}}class tX extends tJ{constructor(e,t){super(e,"github.com",t,"string"==typeof t?.login?t?.login:null)}}class tQ extends tB{constructor(e,t){super(e,"google.com",t)}}class tZ extends tJ{constructor(e,t,i){super(e,"twitter.com",t,i)}}async function t0(e,t){return eA(e).validatePassword(t)}function t1(e,t,i,r){return(0,n.getModularInstance)(e).onIdTokenChanged(t,i,r)}function t2(e,t,i){return(0,n.getModularInstance)(e).beforeAuthStateChanged(t,i)}async function t3(e){return(0,n.getModularInstance)(e).delete()}class t6{constructor(e,t,i){this.type=e,this.credential=t,this.user=i}static _fromIdtoken(e,t){return new t6("enroll",e,t)}static _fromMfaPendingCredential(e){return new t6("signin",e)}toJSON(){return{multiFactorSession:{["enroll"===this.type?"idToken":"pendingCredential"]:this.credential}}}static fromJSON(e){if(e?.multiFactorSession){if(e.multiFactorSession?.pendingCredential)return t6._fromMfaPendingCredential(e.multiFactorSession.pendingCredential);else if(e.multiFactorSession?.idToken)return t6._fromIdtoken(e.multiFactorSession.idToken)}return null}}class t4{constructor(e,t,i){this.session=e,this.hints=t,this.signInResolver=i}static _fromError(e,t){let i=eA(e),n=t.customData._serverResponse,r=(n.mfaInfo||[]).map(e=>tP._fromServerResponse(i,e));g(n.mfaPendingCredential,i,"internal-error");let s=t6._fromMfaPendingCredential(n.mfaPendingCredential);return new t4(s,r,async e=>{let r=await e._process(i,s);delete n.mfaInfo,delete n.mfaPendingCredential;let a={...n,idToken:r.idToken,refreshToken:r.refreshToken};switch(t.operationType){case"signIn":let o=await td._fromIdTokenResponse(i,t.operationType,a);return await i._updateCurrentUser(o.user),o;case"reauthenticate":return g(t.user,i,"internal-error"),td._forOperation(t.user,t.operationType,a);default:u(i,"internal-error")}})}async resolveSignIn(e){return this.signInResolver(e)}}function t5(e,t){return P(e,"POST","/v2/accounts/mfaEnrollment:start",k(e,t))}class t9{constructor(e){this.user=e,this.enrolledFactors=[],e._onReload(t=>{t.mfaInfo&&(this.enrolledFactors=t.mfaInfo.map(t=>tP._fromServerResponse(e.auth,t)))})}static _fromUser(e){return new t9(e)}async getSession(){return t6._fromIdtoken(await this.user.getIdToken(),this.user)}
2async enroll(e,t){let i=await this.getSession(),n=await $(this.user,e._process(this.user.auth,i,t));return await this.user._updateTokensIfNecessary(n),this.user.reload()}async unenroll(e){let t="string"==typeof e?e:e.uid,i=await this.user.getIdToken();try{var n,r;let e=await $(this.user,(n=this.user.auth,r={idToken:i,mfaEnrollmentId:t},P(n,"POST","/v2/accounts/mfaEnrollment:withdraw",k(n,r))));this.enrolledFactors=this.enrolledFactors.filter(({uid:e})=>e!==t),await this.user._updateTokensIfNecessary(e),await this.user.reload()}catch(e){throw e}}}let t7=new WeakMap,t8="__sak";class ie{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{if(!this.storage)return Promise.resolve(!1);return this.storage.setItem(t8,"1"),this.storage.removeItem(t8),Promise.resolve(!0)}catch{return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){let t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class it extends ie{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=e_(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let i=this.storage.getItem(t),n=this.localCache[t];i!==n&&e(t,n,i)}}onStorageEvent(e,t=!1){if(!e.key)return void this.forAllChangedKeys((e,t,i)=>{this.notifyListeners(e,i)});let i=e.key;t?this.detachListener():this.stopPolling();let r=()=>{let e=this.storage.getItem(i);(t||this.localCache[i]!==e)&&this.notifyListeners(i,e)},s=this.storage.getItem(i);(0,n.isIE)()&&10===document.documentMode&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;let i=this.listeners[e];if(i)for(let e of Array.from(i))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,i)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:i}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){let t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}function ii(e){let t=e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),i=RegExp(`${t}=([^;]+)`);return document.cookie.match(i)?.[1]??null}function ir(e){let t="http:"===window.location.protocol;return`${t?"__dev_":"__HOST-"}FIREBASE_${e.split(":")[3]}`}it.type="LOCAL";class is{constructor(){this.type="COOKIE",this.listenerUnsubscribes=new Map}_getFinalTarget(e){let t=new URL(`${window.location.origin}/__cookies__`);return t.searchParams.set("finalTarget",e),t}async _isAvailable(){return!("boolean"==typeof isSecureContext&&!isSecureContext||"u"<typeof navigator||"u"<typeof document)&&(navigator.cookieEnabled??!0)}async _set(e,t){}async _get(e){if(!this._isAvailable())return null;let t=ir(e);if(window.cookieStore){let e=await window.cookieStore.get(t);return e?.value}return ii(t)}async _remove(e){if(!this._isAvailable()||!await this._get(e))return;let t=ir(e);document.cookie=`${t}=;Max-Age=34560000;Partitioned;Secure;SameSite=Strict;Path=/;Priority=High`,await fetch("/__cookies__",{method:"DELETE"}).catch(()=>void 0)}_addListener(e,t){if(!this._isAvailable())return;let i=ir(e);
2if(window.cookieStore){let e=e=>{let n=e.changed.find(e=>e.name===i);n&&t(n.value),e.deleted.find(e=>e.name===i)&&t(null)};return this.listenerUnsubscribes.set(t,()=>window.cookieStore.removeEventListener("change",e)),window.cookieStore.addEventListener("change",e)}let n=ii(i),r=setInterval(()=>{let e=ii(i);e!==n&&(t(e),n=e)},1e3);this.listenerUnsubscribes.set(t,()=>clearInterval(r))}_removeListener(e,t){let i=this.listenerUnsubscribes.get(t);i&&(i(),this.listenerUnsubscribes.delete(t))}}is.type="COOKIE";class ia extends ie{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}ia.type="SESSION";class io{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let t=this.receivers.find(t=>t.isListeningto(e));if(t)return t;let i=new io(e);return this.receivers.push(i),i}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let{eventId:t,eventType:i,data:n}=e.data,r=this.handlersMap[i];if(!r?.size)return;e.ports[0].postMessage({status:"ack",eventId:t,eventType:i});let s=Array.from(r).map(async t=>t(e.origin,n)),a=await Promise.all(s.map(async e=>{try{let t=await e;return{fulfilled:!0,value:t}}catch(e){return{fulfilled:!1,reason:e}}}));e.ports[0].postMessage({status:"done",eventId:t,eventType:i,response:a})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}function ic(e="",t=10){let i="";for(let e=0;e<t;e++)i+=Math.floor(10*Math.random());return e+i}io.receivers=[];class il{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t,i=50){let n,r,s="u">typeof MessageChannel?new MessageChannel:null;if(!s)throw Error("connection_unavailable");return new Promise((a,o)=>{let c=ic("",20);s.port1.start();let l=setTimeout(()=>{o(Error("unsupported_event"))},i);r={messageChannel:s,onMessage(e){if(e.data.eventId===c)switch(e.data.status){case"ack":clearTimeout(l),n=setTimeout(()=>{o(Error("timeout"))},3e3);break;case"done":clearTimeout(n),a(e.data.response);break;default:clearTimeout(l),clearTimeout(n),o(Error("invalid_response"))}}},this.handlers.add(r),s.port1.addEventListener("message",r.onMessage),this.target.postMessage({eventType:e,eventId:c,data:t},[s.port2])}).finally(()=>{r&&this.removeMessageHandler(r)})}}function iu(){return window}function ih(){return void 0!==iu().WorkerGlobalScope&&"function"==typeof iu().importScripts}async function id(){if(!navigator?.serviceWorker)return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}let ip="firebaseLocalStorageDb",im="firebaseLocalStorage",ig="fbase_key";class iI{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function i_(e,t){return e.transaction([im],t?"readwrite":"readonly").objectStore(im)}function iv(){let e=indexedDB.open(ip,1);return new Promise((t,i)=>{e.addEventListener("error",()=>{i(e.error)}),e.addEventListener("upgradeneeded",()=>{let t=e.result;try{t.createObjectStore(im,{keyPath:ig})}catch(e){i(e)}}),e.addEventListener("success",async()=>{let i=e.result;i.objectStoreNames.contains(im)?t(i):(i.close(),await new iI(indexedDB.deleteDatabase(ip)).toPromise(),t(await iv()))})})}async function iT(e,t,i){return new iI(i_(e,!0).put({[ig]:t,value:i})).toPromise()}async function iE(e,t){let i=i_(e,!1).get(t),n=await new iI(i).toPromise();return void 0===n?null:n.value}function iy(e,t){return new iI(i_(e,!0).delete(t)).toPromise()}class iw{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db||(this.db=await iv()),this.db}async _withRetries(e){let t=0;for(;;)try{let t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return ih()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=io._getInstance(ih()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}
2async initializeSender(){if(this.activeServiceWorker=await id(),!this.activeServiceWorker)return;this.sender=new il(this.activeServiceWorker);let e=await this.sender._send("ping",{},800);e&&e[0]?.fulfilled&&e[0]?.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(this.sender&&this.activeServiceWorker&&(navigator?.serviceWorker?.controller||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await iv();return await iT(e,t8,"1"),await iy(e,t8),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(i=>iT(i,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>iE(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>iy(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new iI(i_(e,!1).getAll()).toPromise());if(!e||0!==this.pendingWrites)return[];let t=[],i=new Set;if(0!==e.length)for(let{fbase_key:n,value:r}of e)i.add(n),JSON.stringify(this.localCache[n])!==JSON.stringify(r)&&(this.notifyListeners(n,r),t.push(n));for(let e of Object.keys(this.localCache))this.localCache[e]&&!i.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let i=this.listeners[e];if(i)for(let e of Array.from(i))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}function iA(e,t){return P(e,"POST","/v2/accounts/mfaSignIn:start",k(e,t))}iw.type="LOCAL";let iS=eP("rcb"),iR=new E(3e4,6e4);class ik{constructor(){this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!iu().grecaptcha?.render}load(e,t=""){var i;return(g((i=t).length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(i),e,"argument-error"),this.shouldResolveImmediately(t)&&L(iu().grecaptcha))?Promise.resolve(iu().grecaptcha):new Promise((i,r)=>{let s=iu().setTimeout(()=>{r(h(e,"network-request-failed"))},iR.get());iu()[iS]=()=>{iu().clearTimeout(s),delete iu()[iS];let n=iu().grecaptcha;if(!n||!L(n))return void r(h(e,"internal-error"));let a=n.render;n.render=(e,t)=>{let i=a(e,t);return this.counter++,i},this.hostLanguage=t,i(n)},ek(`${eR.recaptchaV2Script}?${(0,n.querystring)({onload:iS,render:"explicit",hl:t})}`).catch(()=>{clearTimeout(s),r(h(e,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){return!!iu().grecaptcha?.render&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class iP{async load(e){return new eN(e)}clearedOneInstance(){}}let iN="recaptcha",ib={theme:"light",type:"image"};class iO{constructor(e,t){this.verificationId=e,this.onConfirmation=t}confirm(e){let t=e8._fromVerification(this.verificationId,e);return this.onConfirmation(t)}}async function iC(e,t,r){if((0,i._isFirebaseServerApp)(e.app))return Promise.reject(p(e));let s=eA(e);return new iO(await iM(s,t,(0,n.getModularInstance)(r)),e=>tw(s,e))}async function iD(e,t,i){let r=(0,n.getModularInstance)(e);return await tT(!1,r,"phone"),new iO(await iM(r.auth,t,(0,n.getModularInstance)(i)),e=>tA(r,e))}async function iL(e,t,r){let s=(0,n.getModularInstance)(e);return(0,i._isFirebaseServerApp)(s.auth.app)?Promise.reject(p(s.auth)):new iO(await iM(s.auth,t,(0,n.getModularInstance)(r)),e=>tS(s,e))}async function iM(e,t,i){if(!e._getRecaptchaConfig())try{await eF(e)}catch(e){console.log("Failed to initialize reCAPTCHA Enterprise config. Triggering the reCAPTCHA v2 verification.")}try{let n;if(n="string"==typeof t?{phoneNumber:t}
2:t,"session"in n){let t=n.session;if("phoneNumber"in n){g("enroll"===t.type,e,"internal-error");let r={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:n.phoneNumber,clientType:"CLIENT_TYPE_WEB"}},s=async(e,t)=>{if(t.phoneEnrollmentInfo.captchaResponse===eD){g(i?.type===iN,e,"argument-error");let n=await iF(e,t,i);return t5(e,n)}return t5(e,t)},a=eU(e,r,"mfaSmsEnrollment",s,"PHONE_PROVIDER");return(await a.catch(e=>Promise.reject(e))).phoneSessionInfo.sessionInfo}{g("signin"===t.type,e,"internal-error");let r=n.multiFactorHint?.uid||n.multiFactorUid;g(r,e,"missing-multi-factor-info");let s={mfaPendingCredential:t.credential,mfaEnrollmentId:r,phoneSignInInfo:{clientType:"CLIENT_TYPE_WEB"}},a=async(e,t)=>{if(t.phoneSignInInfo.captchaResponse===eD){g(i?.type===iN,e,"argument-error");let n=await iF(e,t,i);return iA(e,n)}return iA(e,t)},o=eU(e,s,"mfaSmsSignIn",a,"PHONE_PROVIDER");return(await o.catch(e=>Promise.reject(e))).phoneResponseInfo.sessionInfo}}{let t={phoneNumber:n.phoneNumber,clientType:"CLIENT_TYPE_WEB"},r=async(e,t)=>{if(t.captchaResponse===eD){g(i?.type===iN,e,"argument-error");let n=await iF(e,t,i);return e6(e,n)}return e6(e,t)},s=eU(e,t,"sendVerificationCode",r,"PHONE_PROVIDER");return(await s.catch(e=>Promise.reject(e))).sessionInfo}}finally{i?._reset()}}async function iU(e,t){let r=(0,n.getModularInstance)(e);if((0,i._isFirebaseServerApp)(r.auth.app))return Promise.reject(p(r.auth));await tv(r,t)}async function iF(e,t,i){g(i.type===iN,e,"argument-error");let n=await i.verify();g("string"==typeof n,e,"argument-error");let r={...t};if("phoneEnrollmentInfo"in r){let e=r.phoneEnrollmentInfo.phoneNumber,t=r.phoneEnrollmentInfo.captchaResponse,i=r.phoneEnrollmentInfo.clientType,s=r.phoneEnrollmentInfo.recaptchaVersion;return Object.assign(r,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:n,captchaResponse:t,clientType:i,recaptchaVersion:s}}),r}if(!("phoneSignInInfo"in r))return Object.assign(r,{recaptchaToken:n}),r;{let e=r.phoneSignInInfo.captchaResponse,t=r.phoneSignInInfo.clientType,i=r.phoneSignInInfo.recaptchaVersion;return Object.assign(r,{phoneSignInInfo:{recaptchaToken:n,captchaResponse:e,clientType:t,recaptchaVersion:i}}),r}}class iV{constructor(e){this.providerId=iV.PROVIDER_ID,this.auth=eA(e)}verifyPhoneNumber(e,t){return iM(this.auth,e,(0,n.getModularInstance)(t))}static credential(e,t){return e8._fromVerification(e,t)}static credentialFromResult(e){return iV.credentialFromTaggedObject(e)}static credentialFromError(e){return iV.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:t,temporaryProof:i}=e;return t&&i?e8._fromTokenResponse(t,i):null}}function ix(e,t){return t?es(t):(g(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}iV.PROVIDER_ID="phone",iV.PHONE_SIGN_IN_METHOD="phone";class iH extends ej{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return e2(e,this._buildIdpRequest())}_linkToIdToken(e,t){return e2(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return e2(e,this._buildIdpRequest())}_buildIdpRequest(e){let t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function iq(e){return ty(e.auth,new iH(e),e.bypassAuthState)}function ij(e){let{auth:t,user:i}=e;return g(i,t,"internal-error"),tE(i,new iH(e),e.bypassAuthState)}async function iW(e){let{auth:t,user:i}=e;return g(i,t,"internal-error"),tv(i,new iH(e),e.bypassAuthState)}class iG{constructor(e,t,i,n,r=!1){this.auth=e,this.resolver=i,this.user=n,this.bypassAuthState=r,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}})}async onAuthEvent(e){let{urlResponse:t,sessionId:i,postBody:n,tenantId:r,error:s,type:a}=e;if(s)return void this.reject(s);let o={auth:this.auth,requestUri:t,sessionId:i,tenantId:r||void 0,postBody:n||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(o))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return iq;case"linkViaPopup":case"linkViaRedirect":return iW;case"reauthViaPopup":case"reauthViaRedirect":return ij;default:u(this.auth,"internal-error")}}resolve(e){var t,i;t=this.pendingPromise,i="Pending promise was never set",t||I(i),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){var t,i;t=this.pendingPromise,i="Pending promise was never set",t||I(i),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}let iz=new E(2e3,1e4);async function iK(e,t,n){if((0,i._isFirebaseServerApp)(e.app))return Promise.reject(h(e,"operation-not-supported-in-this-environment"));let r=eA(e);m(e,t,ti);let s=ix(r,n);return new iJ(r,"signInViaPopup",t,s).executeNotNull()}async function i$(e,t,r){let s=(0,n.getModularInstance)(e);if((0,i._isFirebaseServerApp)(s.auth.app))return Promise.reject(h(s.auth,"operation-not-supported-in-this-environment"));m(s.auth,t,ti);let a=ix(s.auth,r);return new iJ(s.auth,"reauthViaPopup",t,a,s).executeNotNull()}async function iB(e,t,i){let r=(0,n.getModularInstance)(e);m(r.auth,t,ti);let s=ix(r.auth,i);return new iJ(r.auth,"linkViaPopup",t,s,r).executeNotNull()}class iJ extends iG{constructor(e,t,i,n,r){super(e,t,n,r),this.provider=i,this.authWindow=null,this.pollId=null,iJ.currentPopupAction&&iJ.currentPopupAction.cancel(),iJ.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return g(e,this.auth,"internal-error"),e}async onExecution(){var e,t;e=1===this.filter.length,t="Popup operations only handle one event",e||I(t);let i=ic();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],i),this.authWindow.associatedEvent=i,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(h(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}onAuthEvent(e){return this.pollId&&(window.clearTimeout(this.pollId),this.pollId=null),super.onAuthEvent(e)}get eventId(){return this.authWindow?.associatedEvent||null}cancel(){this.reject(h(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,iJ.currentPopupAction=null}pollUserCancellation(){let e=()=>{if(this.authWindow?.window?.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(h(this.auth,"popup-closed-by-user"))},eu()||e_()||window.self!==window.top?8e3:2e3);return}this.pollId=window.setTimeout(e,iz.get())};e()}}iJ.currentPopupAction=null;let iY=new Map;class iX extends iG{constructor(e,t,i=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,i),this.eventId=null}async execute(){let e=iY.get(this.auth._key());if(!e){try{let t=await iQ(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}iY.set(this.auth._key(),e)}return this.bypassAuthState||iY.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);
2if("unknown"===e.type)return void this.resolve(null);if(e.eventId){let t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function iQ(e,t){let i=i2(t),n=i1(e);if(!await n._isAvailable())return!1;let r=await n._get(i)==="true";return await n._remove(i),r}async function iZ(e,t){return i1(e)._set(i2(t),"true")}function i0(e,t){iY.set(e._key(),t)}function i1(e){return es(e._redirectPersistence)}function i2(e){return eo("pendingRedirect",e.config.apiKey,e.name)}async function i3(e,t,n){if((0,i._isFirebaseServerApp)(e.app))return Promise.reject(p(e));let r=eA(e);m(e,t,ti),await r._initializationPromise;let s=ix(r,n);return await iZ(s,r),s._openRedirect(r,t,"signInViaRedirect")}async function i6(e,t,r){let s=(0,n.getModularInstance)(e);if(m(s.auth,t,ti),(0,i._isFirebaseServerApp)(s.auth.app))return Promise.reject(p(s.auth));await s.auth._initializationPromise;let a=ix(s.auth,r);await iZ(a,s.auth);let o=await i7(s);return a._openRedirect(s.auth,t,"reauthViaRedirect",o)}async function i4(e,t,i){let r=(0,n.getModularInstance)(e);m(r.auth,t,ti),await r.auth._initializationPromise;let s=ix(r.auth,i);await tT(!1,r,t.providerId),await iZ(s,r.auth);let a=await i7(r);return s._openRedirect(r.auth,t,"linkViaRedirect",a)}async function i5(e,t){return await eA(e)._initializationPromise,i9(e,t,!1)}async function i9(e,t,n=!1){if((0,i._isFirebaseServerApp)(e.app))return Promise.reject(p(e));let r=eA(e),s=ix(r,t),a=new iX(r,s,n),o=await a.execute();return o&&!n&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,t)),o}async function i7(e){let t=ic(`${e.uid}:::`);return e._redirectEventId=t,await e.auth._setRedirectUser(e),await e.auth._persistUserIfCurrent(e),t}class i8{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(i=>{this.isEventForConsumer(e,i)&&(t=!0,this.sendToConsumer(e,i),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return nt(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){if(e.error&&!nt(e)){let i=e.error.code?.split("auth/")[1]||"internal-error";t.onError(h(this.auth,i))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let i=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&i}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(ne(e))}saveEventToCache(e){this.cachedEventUids.add(ne(e)),this.lastProcessedEventTime=Date.now()}}function ne(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function nt({type:e,error:t}){return"unknown"===e&&t?.code==="auth/no-auth-event"}async function ni(e,t={}){return P(e,"GET","/v1/projects",t)}let nn=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,nr=/^https?/;async function ns(e){if(e.config.emulator)return;let{authorizedDomains:t}=await ni(e);for(let e of t)try{if(function(e){let t=_(),{protocol:i,hostname:n}=new URL(t);if(e.startsWith("chrome-extension://")){let r=new URL(e);return""===r.hostname&&""===n?"chrome-extension:"===i&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===i&&r.hostname===n}if(!nr.test(i))return!1;if(nn.test(e))return n===e;let r=e.replace(/\./g,"\\.");return RegExp("^(.+\\."+r+"|"+r+")$","i").test(n)}(e))return}catch{}u(e,"unauthorized-domain")}let na=new E(3e4,6e4);function no(){let e=iu().___jsl;if(e?.H){for(let t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let t=0;t<e.CP.length;t++)e.CP[t]=null}}let nc=null,nl=new E(5e3,15e3),nu={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},nh=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);
2async function nd(e){let t,r,s,a,o,c=await (nc=nc||new Promise((t,i)=>{function n(){no(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{no(),i(h(e,"network-request-failed"))},timeout:na.get()})}if(iu().gapi?.iframes?.Iframe)t(gapi.iframes.getContext());else if(iu().gapi?.load)n();else{let t=eP("iframefcb");return iu()[t]=()=>{gapi.load?n():i(h(e,"network-request-failed"))},ek(`${eR.gapiScript}?onload=${t}`).catch(e=>i(e))}}).catch(e=>{throw nc=null,e})),l=iu().gapi;return g(l,e,"internal-error"),c.open({where:document.body,url:(g((t=e.config).authDomain,e,"auth-domain-config-required"),r=t.emulator?y(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,s={apiKey:t.apiKey,appName:e.name,v:i.SDK_VERSION},(a=nh.get(e.config.apiHost))&&(s.eid=a),(o=e._getFrameworks()).length&&(s.fw=o.join(",")),`${r}?${(0,n.querystring)(s).slice(1)}`),messageHandlersFilter:l.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:nu,dontclear:!0},t=>new Promise(async(i,n)=>{await t.restyle({setHideOnLeave:!1});let r=h(e,"network-request-failed"),s=iu().setTimeout(()=>{n(r)},nl.get());function a(){iu().clearTimeout(s),i(t)}t.ping(a).then(a,()=>{n(r)})}))}let np={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class nm{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}let nf=encodeURIComponent("fac");async function ng(e,t,r,s,a,o){g(e.config.authDomain,e,"auth-domain-config-required"),g(e.config.apiKey,e,"invalid-api-key");let c={apiKey:e.config.apiKey,appName:e.name,authType:r,redirectUrl:s,v:i.SDK_VERSION,eventId:a};if(t instanceof ti)for(let[i,r]of(t.setDefaultLanguage(e.languageCode),c.providerId=t.providerId||"",(0,n.isEmpty)(t.getCustomParameters())||(c.customParameters=JSON.stringify(t.getCustomParameters())),Object.entries(o||{})))c[i]=r;if(t instanceof tn){let e=t.getScopes().filter(e=>""!==e);e.length>0&&(c.scopes=e.join(","))}for(let t of(e.tenantId&&(c.tid=e.tenantId),Object.keys(c)))void 0===c[t]&&delete c[t];let l=await e._getAppCheckToken(),u=l?`#${nf}=${encodeURIComponent(l)}`:"";return`${function({config:e}){return e.emulator?y(e,"emulator/auth/handler"):`https://${e.authDomain}/__/auth/handler`}(e)}?${(0,n.querystring)(c).slice(1)}${u}`}let nI="webStorageSupport",n_=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=ia,this._completeRedirectFn=i9,this._overrideRedirectResult=i0}async _openPopup(e,t,i,r){var s,a;s=this.eventManagers[e._key()]?.manager,a="_initialize() not called before _openPopup()",s||I(a);let o=await ng(e,t,i,_(),r);return function(e,t,i,r=500,s=600){let a=Math.max((window.screen.availHeight-s)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString(),c="",l={...np,width:r.toString(),height:s.toString(),top:a,left:o},u=(0,n.getUA)().toLowerCase();i&&(c=ed(u)?"_blank":i),eu(u)&&(t=t||"http://localhost",l.scrollbars="yes");let h=Object.entries(l).reduce((e,[t,i])=>`${e}${t}=${i},`,"");if(function(e=(0,n.getUA)()){return eI(e)&&!!window.navigator?.standalone}(u)&&"_self"!==c){var d,p;let e,i;return d=t||"",p=c,(e=document.createElement("a")).href=d,e.target=p,(i=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),e.dispatchEvent(i),new nm(null)}let m=window.open(t||"",c,h);g(m,e,"popup-blocked");try{m.focus()}catch(e){}return new nm(m)}(e,o,ic())}async _openRedirect(e,t,i,n){var r;return await this._originValidation(e),r=await ng(e,t,i,_(),n),iu().location.href=r,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){var i;let{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(i="If manager is not set, promise should be",n||I(i),n)}let n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch(()=>{delete this.eventManagers[t]}),n}async initAndGetManager(e){let t=await nd(e),i=new i8(e);return t.register("authEvent",t=>(g(t?.authEvent,e,"invalid-auth-event"),{status:i.onEvent(t.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:i},this.iframes[e._key()]=t,i}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(nI,{type:nI},i=>{let n=i?.[0]?.[nI];void 0!==n&&t(!!n),u(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=ns(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return e_()||eh()||eI()}};
2class nv{constructor(e){this.factorId=e}_process(e,t,i){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,i);case"signin":return this._finalizeSignIn(e,t.credential);default:return I("unexpected MultiFactorSessionType")}}}class nT extends nv{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new nT(e)}_finalizeEnroll(e,t,i){return P(e,"POST","/v2/accounts/mfaEnrollment:finalize",k(e,{idToken:t,displayName:i,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){return P(e,"POST","/v2/accounts/mfaSignIn:finalize",k(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class nE{static assertion(e){return nT._fromCredential(e)}}nE.FACTOR_ID="phone";class ny{static assertionForEnrollment(e,t){return nw._fromSecret(e,t)}static assertionForSignIn(e,t){return nw._fromEnrollmentId(e,t)}static async generateSecret(e){var t;g(void 0!==e.user?.auth,"internal-error");let i=await P(t=e.user.auth,"POST","/v2/accounts/mfaEnrollment:start",k(t,{idToken:e.credential,totpEnrollmentInfo:{}}));return nA._fromStartTotpMfaEnrollmentResponse(i,e.user.auth)}}ny.FACTOR_ID="totp";class nw extends nv{constructor(e,t,i){super("totp"),this.otp=e,this.enrollmentId=t,this.secret=i}static _fromSecret(e,t){return new nw(t,void 0,e)}static _fromEnrollmentId(e,t){return new nw(t,e)}async _finalizeEnroll(e,t,i){return g(void 0!==this.secret,e,"argument-error"),P(e,"POST","/v2/accounts/mfaEnrollment:finalize",k(e,{idToken:t,displayName:i,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}))}async _finalizeSignIn(e,t){g(void 0!==this.enrollmentId&&void 0!==this.otp,e,"argument-error");let i={verificationCode:this.otp};return P(e,"POST","/v2/accounts/mfaSignIn:finalize",k(e,{mfaPendingCredential:t,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:i}))}}class nA{constructor(e,t,i,n,r,s,a){this.sessionInfo=s,this.auth=a,this.secretKey=e,this.hashingAlgorithm=t,this.codeLength=i,this.codeIntervalSeconds=n,this.enrollmentCompletionDeadline=r}static _fromStartTotpMfaEnrollmentResponse(e,t){return new nA(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,t)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,t){let i=!1;return(nS(e)||nS(t))&&(i=!0),i&&(nS(e)&&(e=this.auth.currentUser?.email||"unknownuser"),nS(t)&&(t=this.auth.name)),`otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}}function nS(e){return void 0===e||e?.length===0}var nR="@firebase/auth",nk="1.13.0";class nP{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){return this.assertAuthConfigured(),this.auth.currentUser?.uid||null}async getToken(e){return(this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser)?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e(t?.stsTokenManager.accessToken||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){g(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let nN=(0,n.getExperimentalSetting)("authIdTokenMaxAge")||300,nb=null;eR={loadJS:e=>new Promise((t,i)=>{let n=document.createElement("script");n.setAttribute("src",e),n.onload=t,n.onerror=e=>{let t=h("internal-error");t.customData=e,i(t)},n.type="text/javascript",n.charset="UTF-8",(document.getElementsByTagName("head")?.[0]??document).appendChild(n)}),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},t="Browser",(0,i._registerComponent)(new s.Component("auth",(e,{options:i})=>{let n,r,s=e.getProvider("app").getImmediate(),a=e.getProvider("heartbeat"),o=e.getProvider("app-check-internal"),{apiKey:c,authDomain:l}=s.options;g(c&&!c.includes(":"),"invalid-api-key",{appName:s.name});let u=new ew(s,a,o,{apiKey:c,authDomain:l,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ev(t)});return r=(Array.isArray(n=i?.persistence||[])?n:[n]).map(es),i?.errorMap&&u._updateErrorMap(i.errorMap),u._initializeWithPersistence(r,i?.popupRedirectResolver),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,i)=>{e.getProvider("auth-internal").initialize()})),(0,i._registerComponent)(new s.Component("auth-internal",e=>new nP(eA(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),(0,i.registerVersion)(nR,nk,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(t)),(0,i.registerVersion)(nR,nk,"esm2020"),e.s(["$",0,tl,"A",0,{EMAIL_SIGNIN:"EMAIL_SIGNIN",PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:"REVERT_SECOND_FACTOR_ADDITION",VERIFY_AND_CHANGE_EMAIL:"VERIFY_AND_CHANGE_EMAIL",VERIFY_EMAIL:"VERIFY_EMAIL"},"B",0,function(e){(0,n.getModularInstance)(e).useDeviceLanguage()},"C",0,function(e,t){return(0,n.getModularInstance)(e).updateCurrentUser(t)},"D",0,function(e){return(0,n.getModularInstance)(e).signOut()},"E",0,function(e,t){return eA(e).revokeAccessToken(t)},"F",0,{PHONE:"phone",TOTP:"totp"},"G",0,t3,"H",0,function
vendor: 12,061 bytes, line 2
2(){return{"admin-restricted-operation":"This operation is restricted to administrators only.","argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-change-needs-verification":"Multi-factor users must always have a verified email.","email-already-in-use":"The email address is already in use by another account.","emulator-config-failed":'Auth instance has already been used to make a network call. Auth can no longer be configured to use the emulator. Try calling "connectAuthEmulator()" sooner.',"expired-action-code":"The action code has expired.","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal AuthError has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registered for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal AuthError has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure to use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-dynamic-link-domain":"The provided dynamic link domain is not configured or authorized for the current project.","invalid-email":"The email address is badly formatted.","invalid-emulator-scheme":"Emulator URL must start with a valid scheme (http:// or https://).","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is incorrect, malformed or has expired.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-multi-factor-session":"The request does not contain a valid proof of first factor successful sign-in.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-provider-id":"The specified provider ID is invalid.","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","invalid-tenant-id":"The Auth instance's tenant ID is invalid.","login-blocked":"Login blocked by user-provided method: {$originalMessage}","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal AuthError has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-or-invalid-nonce":"The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.","missing-password":"A non-empty password must be provided","missing-multi-factor-info":"No second factor identifier is provided.","missing-multi-factor-session":"The request is missing proof of first factor successful sign-in.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","multi-factor-info-not-found":"The user does not have a second factor matching the identifier provided.","multi-factor-auth-required":"Proof of ownership of a second factor is required to complete sign-in.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal AuthError has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.","rejected-credential":"The request contains malformed or mismatching credentials.","second-factor-already-in-use":"The second factor is already enrolled on this account.","maximum-second-factor-count-exceeded":"The maximum allowed number of second factors on a user has been exceeded.","tenant-id-mismatch":"The provided tenant ID does not match the Auth instance's tenant ID",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.","unsupported-first-factor":"Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","unsupported-tenant-operation":"This operation is not supported in a multi-tenant context.","unverified-email":"The operation requires a verified email.","user-cancelled":"The user did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled.","already-initialized":"initializeAuth() has already been called with different options. To avoid this error, call initializeAuth() with the same options as when it was originally called, or call getAuth() to return the already initialized instance.","missing-recaptcha-token":"The reCAPTCHA token is missing when sending request to the backend.","invalid-recaptcha-token":"The reCAPTCHA token is invalid when sending request to the backend.","invalid-recaptcha-action":"The reCAPTCHA action is invalid when sending request to the backend.","recaptcha-not-enabled":"reCAPTCHA Enterprise integration is not enabled for this project.","missing-client-type":"The reCAPTCHA client type is missing when sending request to the backend.","missing-recaptcha-version":"The reCAPTCHA version is missing when sending request to the backend.","invalid-req-type":"Invalid request parameters.","invalid-recaptcha-version":"The reCAPTCHA version is invalid when sending request to the backend.","unsupported-password-policy-schema-version":"The password policy received from the backend uses a schema version that is not supported by this version of the Firebase SDK.","password-does-not-meet-requirements":"The password does not meet the requirements.","invalid-hosting-link-domain":"The provided Hosting link domain is not configured in Firebase Hosting or is not owned by the current project. This cannot be a default Hosting domain (`web.app` or `firebaseapp.com`)."}}
2,"I",0,a,"J",0,{ADMIN_ONLY_OPERATION:"auth/admin-restricted-operation",ARGUMENT_ERROR:"auth/argument-error",APP_NOT_AUTHORIZED:"auth/app-not-authorized",APP_NOT_INSTALLED:"auth/app-not-installed",CAPTCHA_CHECK_FAILED:"auth/captcha-check-failed",CODE_EXPIRED:"auth/code-expired",CORDOVA_NOT_READY:"auth/cordova-not-ready",CORS_UNSUPPORTED:"auth/cors-unsupported",CREDENTIAL_ALREADY_IN_USE:"auth/credential-already-in-use",CREDENTIAL_MISMATCH:"auth/custom-token-mismatch",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"auth/requires-recent-login",DEPENDENT_SDK_INIT_BEFORE_AUTH:"auth/dependent-sdk-initialized-before-auth",DYNAMIC_LINK_NOT_ACTIVATED:"auth/dynamic-link-not-activated",EMAIL_CHANGE_NEEDS_VERIFICATION:"auth/email-change-needs-verification",EMAIL_EXISTS:"auth/email-already-in-use",EMULATOR_CONFIG_FAILED:"auth/emulator-config-failed",EXPIRED_OOB_CODE:"auth/expired-action-code",EXPIRED_POPUP_REQUEST:"auth/cancelled-popup-request",INTERNAL_ERROR:"auth/internal-error",INVALID_API_KEY:"auth/invalid-api-key",INVALID_APP_CREDENTIAL:"auth/invalid-app-credential",INVALID_APP_ID:"auth/invalid-app-id",INVALID_AUTH:"auth/invalid-user-token",INVALID_AUTH_EVENT:"auth/invalid-auth-event",INVALID_CERT_HASH:"auth/invalid-cert-hash",INVALID_CODE:"auth/invalid-verification-code",INVALID_CONTINUE_URI:"auth/invalid-continue-uri",INVALID_CORDOVA_CONFIGURATION:"auth/invalid-cordova-configuration",INVALID_CUSTOM_TOKEN:"auth/invalid-custom-token",INVALID_DYNAMIC_LINK_DOMAIN:"auth/invalid-dynamic-link-domain",INVALID_EMAIL:"auth/invalid-email",INVALID_EMULATOR_SCHEME:"auth/invalid-emulator-scheme",INVALID_IDP_RESPONSE:"auth/invalid-credential",INVALID_LOGIN_CREDENTIALS:"auth/invalid-credential",INVALID_MESSAGE_PAYLOAD:"auth/invalid-message-payload",INVALID_MFA_SESSION:"auth/invalid-multi-factor-session",INVALID_OAUTH_CLIENT_ID:"auth/invalid-oauth-client-id",INVALID_OAUTH_PROVIDER:"auth/invalid-oauth-provider",INVALID_OOB_CODE:"auth/invalid-action-code",INVALID_ORIGIN:"auth/unauthorized-domain",INVALID_PASSWORD:"auth/wrong-password",INVALID_PERSISTENCE:"auth/invalid-persistence-type",INVALID_PHONE_NUMBER:"auth/invalid-phone-number",INVALID_PROVIDER_ID:"auth/invalid-provider-id",INVALID_RECIPIENT_EMAIL:"auth/invalid-recipient-email",INVALID_SENDER:"auth/invalid-sender",INVALID_SESSION_INFO:"auth/invalid-verification-id",INVALID_TENANT_ID:"auth/invalid-tenant-id",MFA_INFO_NOT_FOUND:"auth/multi-factor-info-not-found",MFA_REQUIRED:"auth/multi-factor-auth-required",MISSING_ANDROID_PACKAGE_NAME:"auth/missing-android-pkg-name",MISSING_APP_CREDENTIAL:"auth/missing-app-credential",MISSING_AUTH_DOMAIN:"auth/auth-domain-config-required",MISSING_CODE:"auth/missing-verification-code",MISSING_CONTINUE_URI:"auth/missing-continue-uri",MISSING_IFRAME_START:"auth/missing-iframe-start",MISSING_IOS_BUNDLE_ID:"auth/missing-ios-bundle-id",MISSING_OR_INVALID_
2NONCE:"auth/missing-or-invalid-nonce",MISSING_MFA_INFO:"auth/missing-multi-factor-info",MISSING_MFA_SESSION:"auth/missing-multi-factor-session",MISSING_PHONE_NUMBER:"auth/missing-phone-number",MISSING_PASSWORD:"auth/missing-password",MISSING_SESSION_INFO:"auth/missing-verification-id",MODULE_DESTROYED:"auth/app-deleted",NEED_CONFIRMATION:"auth/account-exists-with-different-credential",NETWORK_REQUEST_FAILED:"auth/network-request-failed",NULL_USER:"auth/null-user",NO_AUTH_EVENT:"auth/no-auth-event",NO_SUCH_PROVIDER:"auth/no-such-provider",OPERATION_NOT_ALLOWED:"auth/operation-not-allowed",OPERATION_NOT_SUPPORTED:"auth/operation-not-supported-in-this-environment",POPUP_BLOCKED:"auth/popup-blocked",POPUP_CLOSED_BY_USER:"auth/popup-closed-by-user",PROVIDER_ALREADY_LINKED:"auth/provider-already-linked",QUOTA_EXCEEDED:"auth/quota-exceeded",REDIRECT_CANCELLED_BY_USER:"auth/redirect-cancelled-by-user",REDIRECT_OPERATION_PENDING:"auth/redirect-operation-pending",REJECTED_CREDENTIAL:"auth/rejected-credential",SECOND_FACTOR_ALREADY_ENROLLED:"auth/second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"auth/maximum-second-factor-count-exceeded",TENANT_ID_MISMATCH:"auth/tenant-id-mismatch",TIMEOUT:"auth/timeout",TOKEN_EXPIRED:"auth/user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"auth/too-many-requests",UNAUTHORIZED_DOMAIN:"auth/unauthorized-continue-uri",UNSUPPORTED_FIRST_FACTOR:"auth/unsupported-first-factor",UNSUPPORTED_PERSISTENCE:"auth/unsupported-persistence-type",UNSUPPORTED_TENANT_OPERATION:"auth/unsupported-tenant-operation",UNVERIFIED_EMAIL:"auth/unverified-email",USER_CANCELLED:"auth/user-cancelled",USER_DELETED:"auth/user-not-found",USER_DISABLED:"auth/user-disabled",USER_MISMATCH:"auth/user-mismatch",USER_SIGNED_OUT:"auth/user-signed-out",WEAK_PASSWORD:"auth/weak-password",WEB_STORAGE_UNSUPPORTED:"auth/web-storage-unsupported",ALREADY_INITIALIZED:"auth/already-initialized",RECAPTCHA_NOT_ENABLED:"auth/recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"auth/missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"auth/invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"auth/invalid-recaptcha-action",MISSING_CLIENT_TYPE:"auth/missing-client-type",MISSING_RECAPTCHA_VERSION:"auth/missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"auth/invalid-recaptcha-version",INVALID_REQ_TYPE:"auth/invalid-req-type",INVALID_HOSTING_LINK_DOMAIN:"auth/invalid-hosting-link-domain"},"K",0,eV,"L",0,ex,"M",0,ej,"N",0,e1,"O",0,{LINK:"link",REAUTHENTICATE:"reauthenticate",SIGN_IN:"signIn"},"P",0,iV,"Q",0,e3,"R",0,class{constructor(e,t,i={...ib}){this.parameters=i,this.type=iN,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=eA(e),this.isInvisible="invisible"===this.parameters.size,g("u">typeof document,this.auth,"operation-not-supported-in-this-environment");const n="string"==typeof t?document.getElementById(t):t;g(n,this.auth,"argument-error"),this.container=n,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new iP:new ik,this.validateStartingState()}async verify(){this.assertNotDestroyed();let e=await this.render(),t=this.getAssertedRecaptcha(),i=t.getResponse(e);return i||new Promise(i=>{let n=e=>{e&&(this.tokenChangeListeners.delete(n),i(e))};this.tokenChangeListeners.add(n),this.isInvisible&&t.execute(e)})}render(){try{this.assertNotDestroyed()}catch(e){return Promise.reject(e)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch(e=>{throw this.renderPromise=null,e})),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(e=>{this.container.removeChild(e)})}validateStartingState(){g(!this.parameters.sitekey,this.auth,"argument-error"),g(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),g("u">typeof document,this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>
2{if(this.tokenChangeListeners.forEach(e=>e(t)),"function"==typeof e)e(t);else if("string"==typeof e){let i=iu()[e];"function"==typeof i&&i(t)}}}assertNotDestroyed(){g(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){let t=document.createElement("div");e.appendChild(t),e=t}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}async init(){let e;g(v()&&!ih(),this.auth,"internal-error"),await (e=null,new Promise(t=>{"complete"===document.readyState?t():(e=()=>t(),window.addEventListener("load",e))}).catch(t=>{throw e&&window.removeEventListener("load",e),t})),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);let t=await F(this.auth);g(t,this.auth,"internal-error"),this.parameters.sitekey=t}getAssertedRecaptcha(){return g(this.recaptcha,this.auth,"internal-error"),this.recaptcha}},"S",0,{EMAIL_LINK:"emailLink",EMAIL_PASSWORD:"password",FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PHONE:"phone",TWITTER:"twitter.com"},"T",0,ny,"U",0,e8,"V",0,ea,"W",0,tt,"X",0,ts,"Y",0,ta,"Z",0,to,"_",0,tr,"a",0,is,"a0",0,tu,"a1",0,tm,"a2",0,tw,"a3",0,tA,"a4",0,tS,"a5",0,tk,"a6",0,tD,"a7",0,tL,"a8",0,tM,"a9",0,tU,"aa",0,tF,"ab",0,tV,"ac",0,function(e,t,r){return(0,i._isFirebaseServerApp)(e.app)?Promise.reject(p(e)):tw((0,n.getModularInstance)(e),tt.credential(t,r)).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&tC(e),t})},"ad",0,tx,"ae",0,function(e,t){let i=te.parseLink(t);return i?.operation==="EMAIL_SIGNIN"},"af",0,tH,"ag",0,tj,"ah",0,tW,"ai",0,tG,"aj",0,te,"ak",0,function(e){return te.parseLink(e)},"al",0,tK,"am",0,function(e,t){let r=(0,n.getModularInstance)(e);return(0,i._isFirebaseServerApp)(r.auth.app)?Promise.reject(p(r.auth)):t$(r,t,null)},"an",0,function(e,t){return t$((0,n.getModularInstance)(e),null,t)},"ao",0,function(e,t=!1){return(0,n.getModularInstance)(e).getIdToken(t)},"ap",0,W,"aq",0,t_,"ar",0,function(e){let{user:t,_tokenResponse:i}=e;return t.isAnonymous&&!i?{providerId:null,isNewUser:!1,profile:null}:function(e){if(!e)return null;let{providerId:t}=e,i=e.rawUserInfo?JSON.parse(e.rawUserInfo):{},n=e.isNewUser||"identitytoolkit#SignupNewUserResponse"===e.kind;if(!t&&e?.idToken){let t=z(e.idToken)?.firebase?.sign_in_provider;if(t)return new tB(n,"anonymous"!==t&&"custom"!==t?t:null)}if(!t)return null;switch(t){case"facebook.com":return new tY(n,i);case"github.com":return new tX(n,i);case"google.com":return new tQ(n,i);case"twitter.com":return new tZ(n,i,e.screenName||null);case"custom":case"anonymous":return new tB(n,null);default:return new tB(n,t,i)}}(i)},"as",0,X,"at",0,function(e,t){let i=(0,n.getModularInstance)(e);return g(t.customData.operationType,i,"argument-error"),g(t.customData._serverResponse?.mfaPendingCredential,i,"argument-error"),t4._fromError(i,t)},"au",0,function(e){let t=(0,n.getModularInstance)(e);return t7.has(t)||t7.set(t,t9._fromUser(t)),t7.get(t)},"b",0,it,"c",0,ia,"d",0,iK,"e",0,iB,"f",0,i$,"g",0,function(e,t,i){return i3(e,t,i)},"h",0,function(e,t,i){return i4(e,t,i)},"i",0,iw,"j",0,function(e,t,i){return i6(e,t,i)},"k",0,i5,"l",0,iD,"m",0,n_,"n",0,nE,"o",0,nA,"p",0,function(e=(0,i.getApp)()){let t=(0,i._getProvider)(e,"auth");if(t.isInitialized())return t.getImmediate();let r=eV(e,{popupRedirectResolver:n_,persistence:[iw,it,ia]}),s=(0,n.getExperimentalSetting)("authTokenSyncURL");if(s&&"boolean"==typeof isSecureContext&&isSecureContext){let e=new URL(s,location.origin);if(location.origin===e.origin){let t,i=(t=e.toString(),async e=>{let i=e&&await e.getIdTokenResult(),n=i&&(new Date().getTime()-Date.parse(i.issuedAtTime))/1e3;if(n&&n>nN)return;let r=i?.token;nb!==r&&(nb=r,await fetch(t,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))});t2(r,i,()=>i(r.currentUser)),t1(r,e=>i(e))}}let a=(0,n.getDefaultEmulatorHost)("auth");return a&&ex(r,`http://${a}`),r},"q",0,{FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PASSWORD:"password",PHONE:"phone",TWITTER:"twitter.com"},"r",0,iL,"s",0,iC,"t",0,function(e,t){return(0,n.getModularInstance)(e).setPersistence(t)},"u",0,iU,"v",0,function(e){return eF(e)},"w",0,t0,"x",0,t1,"y",0,t2,"z",0,function(e,t,i,r){return(0,n.getModularInstance)(e).onAuthStateChanged(t,i,r)}],799243),e.s([],296678),e.s([],433925)}]); 3 4//# debugId=04ca5195-a2f7-d727-c8d0-c3efbb8babe9
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.