PageSourceSearch

https://aipeeps.com/assets/web-DjGWcUB0.js

js aipeeps.com collected 2026-10-09 17:42:11 UTC 12,402 bytes, 1 lines download raw bytes

1import{W as S}from"./index-DOEOSNPB.js";import{by as s,bz as N,bA as C,bB as O,bC as f,bD as y,bE as v,bF as a,bG as U,bH as g,bI as d,bJ as h,bK as R,bL as p,bM as _,bN as I,bO as k,bP as P,bQ as T,bR as W,bS as A,bT as m,bU as G,bV as L,bW as D,bX as V,bY as M,bZ as b,b_ as H,b$ as F,c0 as B,c1 as w,c2 as x,c3 as $,c4 as Y,c5 as j,c6 as K,c7 as J,c8 as q,c9 as z,ca as Q,cb as X,cc as Z,cd as ee}from"./app-Brzv3Rd5.js";import{ProviderId as u,Persistence as E}from"./index-B5di1OZz.js";class i extends S{constructor(){super(),this.lastConfirmationResult=new Map;const e=s();e.onAuthStateChanged(t=>this.handleAuthStateChange(t)),e.onIdTokenChanged(t=>{this.handleIdTokenChange(t)})}async applyActionCode(e){const t=s();return N(t,e.oobCode)}async createUserWithEmailAndPassword(e){const t=s(),n=await C(t,e.email,e.password);return this.createSignInResult(n,null)}async confirmPasswordReset(e){const t=s();return O(t,e.oobCode,e.newPassword)}async confirmVerificationCode(e){const{verificationCode:t,verificationId:n}=e,r=this.lastConfirmationResult.get(n);if(!r)throw new Error(i.ERROR_CONFIRMATION_RESULT_MISSING);const c=await r.confirm(t);return this.createSignInResult(c,null)}async deleteUser(){const t=s().currentUser;if(!t)throw new Error(i.ERROR_NO_USER_SIGNED_IN);return f(t)}async fetchSignInMethodsForEmail(e){const t=s();return{signInMethods:await y(t,e.email)}}async getPendingAuthResult(){throw this.unimplemented("Not implemented on web.")}async getCurrentUser(){const e=s();return{user:this.createUserResult(e.currentUser)}}async getIdToken(e){const t=s();if(!t.currentUser)throw new Error(i.ERROR_NO_USER_SIGNED_IN);return{token:await t.currentUser.getIdToken(e?.forceRefresh)||""}}async getIdTokenResult(e){const t=s();if(!t.currentUser)throw new Error(i.ERROR_NO_USER_SIGNED_IN);const n=await t.currentUser.getIdTokenResult(e?.forceRefresh);return Object.assign(Object.assign({},n),{authTime:Date.parse(n.authTime),expirationTime:Date.parse(n.expirationTime),issuedAtTime:Date.parse(n.issuedAtTime)})}async getRedirectResult(){const e=s(),t=await v(e),n=t?a.credentialFromResult(t):null;return this.createSignInResult(t,n)}async getTenantId(){return{tenantId:s().tenantId}}async isSignInWithEmailLink(e){const t=s();return{isSignInWithEmailLink:U(t,e.emailLink)}}async linkWithApple(e){const t=new a(u.APPLE);this.applySignInOptions(e||{},t);const n=await this.linkCurrentUserWithPopupOrRedirect(t,e?.mode),r=a.credentialFromResult(n);return this.createSignInResult(n,r)}async linkWithEmailAndPassword(e){const t=g.credential(e.email,e.password),n=await this.linkCurrentUserWithCredential(t);return this.createSignInResult(n,t)}async linkWithEmailLink(e){const t=g.credentialWithLink(e.email,e.emailLink),n=await this.linkCurrentUserWithCredential(t);return this.createSignInResult(n,t)}async linkWithFacebook(e){const t=new d;this.applySignInOptions(e||{},t);const n=await this.linkCurrentUserWithPopupOrRedirect(t,e?.mode),r=d.credentialFromResult(n);return this.createSignInResult(n,r)}async linkWithGameCenter(){throw this.unimplemented("Not implemented on web.")}async linkWithGithub(e){const t=new h;this.applySignInOptions(e||{},t);const n=await this.linkCurrentUserWithPopupOrRedirect(t,e?.mode),r=h.credentialFromResult(n);return this.createSignInResult(n,r)}async linkWithGoogle(e){const t=new R;this.applySignInOptions(e||{},t);const n=await this.linkCurrentUserWithPopupOrRedirect(t,e?.mode),r=R.credentialFromResult(n);return this.createSignInResult(n,r)}async linkWithMicrosoft(e){const t=new a(u.MICROSOFT);this.applySignInOptions(e||{},t);const n=await this.linkCurrentUserWithPopupOrRedirect(t,e?.mode),r=a.credentialFromResult(n);return this.createSignInResult(n,r)}async linkWithOpenIdConnect(e){const t=new a(e.providerId);this.applySignInOptions(e,t);const n=await this.linkCurrentUserWithPopupOrRedirect(t,e.mode),r=a.credentialFromResult(n);return this.createSignInResult(n,r)}async linkWithPhoneNumber(e){const n=s().currentUser;if(!n)throw new Error(i.ERROR_NO_USER_SIGNED_IN);if(!e.phoneNumber)throw new Error(i.ERROR_PHONE_NUMBER_MISSING);if(!e.recaptchaVerifier||!(e.recaptchaVerifier instanceof p))throw new Error(i.ERROR_RECAPTCHA_VERIFIER_MISSING);try{const r=await _(n,e.phoneNumber,e.recaptchaVerifier),{verificationId:c}=r;this.lastConfirmationResult.set(c,r);const o={verificationId:c};this.notifyListeners(i.PHONE_CODE_SENT_EVENT,o)}catch(r){const c={message:this.getErrorMessage(r)};this.notifyListeners(i.PHONE_VERIFICATION_FAILED_EVENT,c)}}async linkWithPlayGames(){throw this.unimplemented("Not implemented on web.")}async linkWithTwitter(e){const t=new I;this.applySignInOptions(e||{},t);const n=await this.linkCurrentUserWithPopupOrRedirect(t,e?.mode),r=I.credentialFromResult(n);return this.createSignInResult(n,r)}async linkWithYahoo(e){const t=new a(u.YAHOO);this.applySignInOptions(e||{},t);const n=await this.linkCurrentUserWithPopupOrRedirect(t,e?.mode),r=a.credentialFromResult(n);return this.createSignInResult(n,r)}async reload(){const t=s().currentUser;if(!t)throw new Error(i.ERROR_NO_USER_SIGNED_IN);return k(t)}async revokeAccessToken(e){const t=s();return P(t,e.token)}async sendEmailVerification(e){const n=s().currentUser;if(!n)throw new Error(i.ERROR_NO_USER_SIGNED_IN);return T(n,e?.actionCodeSettings)}async sendPasswordResetEmail(e){const t=s();return W(t,e.email,e.actionCodeSettings)}async sendSignInLinkToEmail(e){const t=s();return A(t,e.email,e.actionCodeSettings)}async setLanguageCode(e){const t=s();t.languageCode=e.languageCode}async setPersistence(e){const t=s();switch(e.persistence){case E.BrowserLocal:await m(t,ee);break;case E.BrowserSession:await m(t,Z);break;case E.IndexedDbLocal:await m(t,X);break;case E.InMemory:await m(t,Q);break}}async setTenantId(e){const t=s();t.tenantId=e.tenantId}async signInAnonymously(){const e=s(),t=await G(e);return this.createSignInResult(t,null)}async signInWithApple(e){const t=new a(u.APPLE);this.applySignInOptions(e||{},t);const n=await this.signInWithPopupOrRedirect(t,e?.mode),r=a.credentialFromResult(n);return this.createSignInResult(n,r)}async signInWithCustomToken(e){const t=s(),n=await L(t,e.token);return this.createSignInResult(n,null)}async signInWithEmailAndPassword(e){const t=s(),n=await D(t,e.email,e.password);return this.createSignInResult(n,null)}async signInWithEmailLink(e){const t=s(),n=await V(t,e.email,e.emailLink);return this.createSignInResult(n,null)}async signInWithFacebook(e){const t=new d;this.applySignInOptions(e||{},t);const n=await this.signInWithPopupOrRedirect(t,e?.mode),r=d.credentialFromResult(n);return this.createSignInResult(n,r)}async signInWithGithub(e){const t=new h;this.applySignInOptions(e||{},t);const n=await this.signInWithPopupOrRedirect(t,e?.mode),r=h.credentialFromResult(n);return this.createSignInResult(n,r)}async signInWithGoogle(e){const t=new R;this.applySignInOptions(e||{},t);const n=await this.signInWithPopupOrRedirect(t,e?.mode),r=R.credentialFromResult(n);return this.createSignInResult(n,r)}async signInWithMicrosoft(e){const t=new a(u.MICROSOFT);this.applySignInOptions(e||{},t);const n=await this.signInWithPopupOrRedirect(t,e?.mode),r=a.credentialFromResult(n);return this.createSignInResult(n,r)}async signInWithOpenIdConnect(e){const t=new a(e.providerId);this.applySignInOptions(e,t);const n=await this.signInWithPopupOrRedirect(t,e.mode),r=a.credentialFromResult(n);return this.createSignInResult(n,r)}async signInWithPhoneNumber(e){if(!e.phoneNumber)throw new Error(i.ERROR_PHONE_NUMBER_MISSING);
1if(!e.recaptchaVerifier||!(e.recaptchaVerifier instanceof p))throw new Error(i.ERROR_RECAPTCHA_VERIFIER_MISSING);const t=s();try{const n=await M(t,e.phoneNumber,e.recaptchaVerifier),{verificationId:r}=n;this.lastConfirmationResult.set(r,n);const c={verificationId:r};this.notifyListeners(i.PHONE_CODE_SENT_EVENT,c)}catch(n){const r={message:this.getErrorMessage(n)};this.notifyListeners(i.PHONE_VERIFICATION_FAILED_EVENT,r)}}async signInWithPlayGames(){throw this.unimplemented("Not implemented on web.")}async signInWithGameCenter(){throw this.unimplemented("Not implemented on web.")}async signInWithTwitter(e){const t=new I;this.applySignInOptions(e||{},t);const n=await this.signInWithPopupOrRedirect(t,e?.mode),r=I.credentialFromResult(n);return this.createSignInResult(n,r)}async signInWithYahoo(e){const t=new a(u.YAHOO);this.applySignInOptions(e||{},t);const n=await this.signInWithPopupOrRedirect(t,e?.mode),r=a.credentialFromResult(n);return this.createSignInResult(n,r)}async signOut(){await s().signOut()}async unlink(e){const t=s();if(!t.currentUser)throw new Error(i.ERROR_NO_USER_SIGNED_IN);const n=await b(t.currentUser,e.providerId);return{user:this.createUserResult(n)}}async updateEmail(e){const n=s().currentUser;if(!n)throw new Error(i.ERROR_NO_USER_SIGNED_IN);return H(n,e.newEmail)}async updatePassword(e){const n=s().currentUser;if(!n)throw new Error(i.ERROR_NO_USER_SIGNED_IN);return F(n,e.newPassword)}async updateProfile(e){const n=s().currentUser;if(!n)throw new Error(i.ERROR_NO_USER_SIGNED_IN);return B(n,{displayName:e.displayName,photoURL:e.photoUrl})}async useAppLanguage(){s().useDeviceLanguage()}async useEmulator(e){const t=s(),n=e.port||9099,r=e.scheme||"http";e.host.includes("://")?w(t,`${e.host}:${n}`):w(t,`${r}://${e.host}:${n}`)}async verifyBeforeUpdateEmail(e){const n=s().currentUser;if(!n)throw new Error(i.ERROR_NO_USER_SIGNED_IN);return x(n,e?.newEmail,e?.actionCodeSettings)}handleAuthStateChange(e){const n={user:this.createUserResult(e)};this.notifyListeners(i.AUTH_STATE_CHANGE_EVENT,n,!0)}async handleIdTokenChange(e){if(!e)return;const n={token:await e.getIdToken(!1)};this.notifyListeners(i.ID_TOKEN_CHANGE_EVENT,n,!0)}applySignInOptions(e,t){if(e.customParameters){const n={};e.customParameters.map(r=>{n[r.key]=r.value}),t.setCustomParameters(n)}if(e.scopes)for(const n of e.scopes)t.addScope(n)}signInWithPopupOrRedirect(e,t){const n=s();return t==="redirect"?$(n,e):Y(n,e)}linkCurrentUserWithPopupOrRedirect(e,t){const n=s();if(!n.currentUser)throw new Error(i.ERROR_NO_USER_SIGNED_IN);return t==="redirect"?j(n.currentUser,e):K(n.currentUser,e)}linkCurrentUserWithCredential(e){const t=s();if(!t.currentUser)throw new Error(i.ERROR_NO_USER_SIGNED_IN);return J(t.currentUser,e)}requestAppTrackingTransparencyPermission(){throw this.unimplemented("Not implemented on web.")}checkAppTrackingTransparencyPermission(){throw this.unimplemented("Not implemented on web.")}createSignInResult(e,t){const n=this.createUserResult(e?.user||null),r=this.createCredentialResult(t),c=this.createAdditionalUserInfoResult(e);return{user:n,credential:r,additionalUserInfo:c}}createCredentialResult(e){if(!e)return null;const t={providerId:e.providerId};return e instanceof q&&(t.accessToken=e.accessToken,t.idToken=e.idToken,t.secret=e.secret),t}createUserResult(e){return e?{displayName:e.displayName,email:e.email,emailVerified:e.emailVerified,isAnonymous:e.isAnonymous,metadata:this.createUserMetadataResult(e.metadata),phoneNumber:e.phoneNumber,photoUrl:e.photoURL,providerData:this.createUserProviderDataResult(e.providerData),providerId:e.providerId,tenantId:e.tenantId,uid:e.uid}:null}createUserMetadataResult(e){const t={};return e.creationTime&&(t.creationTime=Date.parse(e.creationTime)),e.lastSignInTime&&(t.lastSignInTime=Date.parse(e.lastSignInTime)),t}createUserProviderDataResult(e){return e.map(t=>({displayName:t.displayName,email:t.email,phoneNumber:t.phoneNumber,photoUrl:t.photoURL,providerId:t.providerId,uid:t.uid}))}createAdditionalUserInfoResult(e){if(!e)return null;const t=z(e);if(!t)return null;const{isNewUser:n,profile:r,providerId:c,username:o}=t,l={isNewUser:n};return c!==null&&(l.providerId=c),r!==null&&(l.profile=r),o!=null&&(l.username=o),l}getErrorMessage(e){return e instanceof Object&&"message"in e&&typeof e.message=="string"?e.message:JSON.stringify(e)}}i.AUTH_STATE_CHANGE_EVENT="authStateChange";i.ID_TOKEN_CHANGE_EVENT="idTokenChange";i.PHONE_CODE_SENT_EVENT="phoneCodeSent";i.PHONE_VERIFICATION_FAILED_EVENT="phoneVerificationFailed";i.ERROR_NO_USER_SIGNED_IN="No user is signed in.";i.ERROR_PHONE_NUMBER_MISSING="phoneNumber must be provided.";i.ERROR_RECAPTCHA_VERIFIER_MISSING="recaptchaVerifier must be provided and must be an instance of RecaptchaVerifier.";i.ERROR_CONFIRMATION_RESULT_MISSING="No confirmation result with this verification id was found.";export{i as FirebaseAuthenticationWeb};

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.