PageSourceSearch

https://xynergy.ai/_next/static/chunks/4982.2ffb676e03976d7e.js

js xynergy.ai collected 2026-10-05 16:02:18 UTC 4,940 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4982],{14982:(e,r,t)=>{t.d(r,{googleProvider:()=>n});var a=t(30274),o=t(76458),s=t(17956),u=t(18654),i=t(48716);t(3379);class l extends s.R{type="google";name="Google";googleProvider;constructor(){super(),this.googleProvider=new a.GoogleAuthProvider,this.googleProvider.addScope("email"),this.googleProvider.addScope("profile"),this.googleProvider.setCustomParameters({prompt:"select_account"})}supportsRedirect(){return!0}async authenticate(e){if(!o.auth)return this.createErrorResult("auth/not-initialized","Firebase Auth 尚未初始化");try{if(e?.redirect)return await (0,a.signInWithRedirect)(o.auth,this.googleProvider),{success:!0};let r=await (0,a.signInWithPopup)(o.auth,this.googleProvider);return(0,u.fH)("Google 登入成功 (Popup):",r.user.email),this.createSuccessResult(r.user,r)}catch(e){if("auth/popup-closed-by-user"===e.code)return this.createErrorResult("auth/popup-closed-by-user","登入視窗被關閉,請重試");if("auth/popup-blocked"===e.code)return this.createErrorResult("auth/popup-blocked","彈出視窗被瀏覽器阻擋,請允許彈出視窗後重試");if("auth/network-request-failed"===e.code)return this.createErrorResult("auth/network-request-failed","網路連線失敗,請檢查網路連線後重試");return this.handleAuthError(e)}}async handleRedirectResult(){if(!o.auth)return this.createErrorResult("auth/not-initialized","Firebase Auth 尚未初始化");try{let e=await (0,a.getRedirectResult)(o.auth);if(!e)return{success:!1,error:{code:"auth/no-redirect-result",message:"沒有重定向結果"}};if(!e.user?.providerData?.some(e=>"google.com"===e.providerId))return{success:!1,error:{code:"auth/wrong-provider",message:"不是 Google 登入"}};return(0,u.fH)("Google 登入成功 (Redirect):",e.user.email),this.createSuccessResult(e.user,e)}catch(e){return this.handleAuthError(e)}}async signInWithRedirect(){if(!o.auth)throw Error("Firebase Auth 尚未初始化");try{(0,i.setOAuthRedirectState)("google"),await (0,a.signInWithRedirect)(o.auth,this.googleProvider)}catch(e){throw(0,u.vV)("Google 重定向登入失敗:",e),Error(`Google 登入失敗: ${e.message}`)}}}let n=new l},17956:(e,r,t)=>{t.d(r,{R:()=>o});var a=t(18654);class o{supportsRedirect(){return!1}createSuccessResult(e,r){return{success:!0,user:e,credential:r}}createErrorResult(e,r,t){return{success:!1,error:{code:e,message:r,originalError:t}}}handleAuthError(e){let r=e?.code||"auth/unknown-error",t=e?.message||"認證失敗,請稍後再試",o=e&&"object"==typeof e&&Object.keys(e).length>0?{code:r,message:t,error:e}:{code:r,message:t};(0,a.vV)(`[${this.name}] 認證錯誤:`,o);let s={"auth/user-not-found":"找不到此用戶,請先註冊","auth/wrong-password":"密碼不正確","auth/invalid-email":"電子郵件格式不正確","auth/user-disabled":"此帳戶已被停用","auth/email-already-in-use":"此電子郵件已被使用","auth/weak-password":"密碼強度不足","auth/operation-not-allowed":"此登入方式未啟用","auth/too-many-requests":"嘗試過多,請稍後再試","auth/network-request-failed":"網路連線失敗,請檢查網路","auth/invalid-credential":"認證資料無效","auth/popup-closed-by-user":"登入視窗被關閉","auth/popup-blocked":"彈出視窗被瀏覽器阻擋","auth/cancelled-popup-request":"登入請求已取消","auth/account-exists-with-different-credential":"此帳戶已使用其他登入方式註冊","auth/email-required":"需要 Email 權限才能完成登入","auth/config-error":"認證配置錯誤,請聯繫管理員","auth/configuration-not-found":"認證配置未找到,請確認 Firebase Console 設定","auth/no-redirect-result":"沒有重定向結果,請重新嘗試登入","auth/wrong-provider":"認證提供者不匹配","auth/not-initialized":"Firebase Auth 尚未初始化","auth/auto-login-failed":"自動登入失敗,請重新嘗試登入","auth/invalid-request":"請求參數錯誤","auth/access-denied":"用戶取消了授權","auth/unsupported-response-type":"不支援的回應類型","auth/invalid-scope":"無效的 scope 設定","auth/server-error":"伺服器錯誤,請稍後再試","auth/login-required":"需要登入","auth/interaction-required":"需要用戶互動","auth/line-error":"LINE Login 錯誤","auth/network-error":"網路連線錯誤"}[r]||t;return this.createErrorResult(r,s,e)}validateEmail(e){return!!e&&"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim())}normalizeEmail(e){return e.trim().toLowerCase()}validatePassword(e){return!e||e.length<8?{valid:!1,message:"密碼需至少 8 碼"}:/[A-Z]/.test(e)?/[a-z]/.test(e)?/[0-9]/.test(e)?/[^A-Za-z0-9]/.test(e)?{valid:!0}:{valid:!1,message:"密碼需包含至少一個特殊字元"}:{valid:!1,message:"密碼需包含至少一個數字"}:{valid:!1,message:"密碼需包含至少一個小寫字母"}:{valid:!1,message:"密碼需包含至少一個大寫字母"}}}}}]);

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.