@authing/guard-shim-react18 4.5.43-rc.2 → 4.5.43-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/guard.min.js
CHANGED
|
@@ -22372,7 +22372,7 @@ caches:["localStorage"],excludeCacheFor:["cimode"]}),
|
|
|
22372
22372
|
// backwards compatibility
|
|
22373
22373
|
this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Ru),this.addDetector(Mu),this.addDetector(Fu),this.addDetector(Uu),this.addDetector(qu),this.addDetector(Vu),this.addDetector(zu),this.addDetector($u)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach((function(e){if(t.detectors[e]){var r=t.detectors[e].lookup(t.options);r&&"string"==typeof r&&(r=[r]),r&&(n=n.concat(r))}})),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null;// new i18next v19.5.0
|
|
22374
22374
|
}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)})))}}]),e}();Hu.type="languageDetector";// CONCATENATED MODULE: ./src/_utils/locales/en-us/common.json
|
|
22375
|
-
const Wu=JSON.parse('{"alreadyHasAcc":"already have an account,","bind":"Bind","yes":"Yes","no":"No","usernameFormatError":"Enter a valid user name","customNameFormatError":"Enter a valid account number","checkUserName":"The username already exists","checkCustomName":"The account already exists","pleaseSelectDate":"Please select date","bindEmail":"Bind Email","bindPhone":"Bind your phone number","confirm":"Confirm","unlock":"unlock","email":"Email","emailFormatError":"Enter a valid Email address ","emailLabel":"Email","female":"Female","guidance":{},"hasLooseSaftyCode":"Lost the security code?","inputFourVerifyCode":"{{length}}-digit code","login":"Sign In","man":"Male","noAccYet":"No account yet,","perfectUserInfo":"Personal Information","phoneFormateError":"Please verify your phone number first","phoneLabel":"Phone","phoneNumber":"Phone number","register":"Sign Up","registerImmediate":"Sign Up","retryAfterTime":"{{time}} seconds","sendVerifyCode":"Send Code","sure":"Confirm","uploadFail":"{{name}} failed to upload","useRecoverCode":"Use recovery code","username":"Username","problem":{"title":"Tell us your problem","noVerify":"Unable to receive the verification code","noLogin":"Unable to log in","noRegister":"Unable to register","noAccount":"Lost Account","noResetPass":"Unable to reset password","locked":"Account is locked","other":"Other","noVerifyTip":{"tip":"If you cannot receive the mobile phone verification code, I suggest you do the following:","type1":"1. Check if your mobile phone is turned off or offline.","type2":"2. Check if your phone number has been entered correctly.","type3":"3. Check if your SMS with the verification code is blocked."},"noLoginTip":{"type1":"1. Check if your username and password have been entered correctly.","type2":"2. Check if your mobile phone is turned off or offline."},"noRegisterTip":{"tip":"If you cannot register, please do the following steps to solve this issue:","type1":"1. Check if your account has been registered.","type2":"2. Check if your phone number has been entered correctly.","type3":"3. Check if your SMS with the verification code is blocked."},"noAccountTip":{"tip":"If your account is lost, please do the following steps to solve this issue:","type1":"1. Check if your username and password have been entered correctly.","type2":"2. Check if your mobile phone is turned off or offline."},"noResetPassTip":{"tip":"If your password cannot be reset, please do the following steps to solve this issue:","type1":"1. Check if your mobile phone is turned off or offline.","type2":"2. Check if your password has been entered correctly."},"otherTip":{},"successTip":"Submitted successfully","successTipMsg":"Your information has been submitted to the application administrator. Your feedback will be processed as soon as possible. Please wait patiently.","form":{"phone":"Contact","question":"Problem","questionDescript":"Problem description","questionClip":"Problem screenshot","submit":"Submit"},"noLoginTips":"If you cannot log in, we suggest you do the following:","lockedTips":"If your account is locked, please contact the administrator to unlock it and try to log in again"},"backLoginPage":"Back","LoginSuccess":"Login Success","welcomeDoc":"Welcome to {{name}}. Providing your personal information will allow us to give you the best online\\nexperience.","copied":"Copied","bindEmailDoc":"please enter the mailbox to bind","copy":"Copy","SMS":"SMS Verification","EmailVerification":"Email Verification","OTPVerification":"OTP Verification","faceVerification":"Face Verification","registrationSuccess":"Registration Success","repeatPasswordDoc":"The Two Passwords Entered are Inconsistent","copyFailed":"Copy Failed","downloadTotpAppAndroid":"Android download","downloadTotpAppDocs":"Please use your mobile phone to scan the code to download the verifier","downloadTotpAppIOS":"IOS download","bindTotp":"Bind OTP","checkEmail":"The email already exists","checkPhone":"The phone number already exists","loginFailCheck":"Reminder: Your password is wrong, you can try {{number}} times","otpText1":"Please go to the OTP binding page to bind","faceText1":"Bind facial recognition","faceText2":"Please turn on the camera to recognize the face for binding","faceText3":"Start","faceText4":"Try again","checkPasswordHasSpace":"No spaces","backToVerify":"Back","backToMFA":"Return to MFA binding","bindSuccess":"Complete binding","clickTodownload":"click to download","goToLogin":"Back","mfaText1":"Scan the code to add MFA, check it on your mobile phone and enter the 6-digit security code.","noQuestions":"no problem,","noValidator":"No validator please","pleaseRecordKey":"Please record the key","timeoutLDAP":"Request timed out, LDAP configuration error","totpText1":"Please keep the recovery code properly","totpText2":"If your MFA is lost, you will need a recovery code","usePhoneOpen":"Please open Google Authenticator or Microsoft Authenticator on your phone","passwordAgain":"Confirm password","isMissing":"{{name}} is missing","password":"Password","captchaCode":"Digit code","account":"Account","phone":"Phone number","pToLogin":"seconds later back","resetSuccess":"Reset successfully","resetSuccessMessage":"The password is reset successfully, you can continue to log in with the new password","welcome":"Welcome","initPasswordText":"To ensure account security, please set your new password.","unsafePasswordChangeText":"Your password does not meet the current password strength requirements. Please set a new password.","updatePsswordSuccess":"Change the password successfully, please log in again","fullCaptchaCode":"Please fill in the complete","feedback":"Need help ?","loginProtocolTips":"Please check the login protocol","registerProtocolTips":"Please check the registration agreement","accountLock":"The account is locked, please click the question mark below to give feedback","corsErrorMessage":"The current domain name is not in the list of allowed domain names","corsErrorMessage2":"If you have any questions, you can <a href=\\"https://docs.authing.cn/v2/guides/security/config-domain.html\\">refer to the document</a>","totpGenerateCode":"Generate a new recovery code for you, please record this key safely","verifyCodeLogin":"Verify Code","phoneVerifyCode":"Phone Code","emailVerifyCode":"Email Code","phoneCodeTab":"Phone Code","emailCodeTab":"Email Code","phoneOrEmail":"Phone Or Email","skip":"Skip","back":"Back","publicAccount":"Public account","identityBindingAskTitle":"Choose how to connect","identityBindingAskDesc":"If you are bound to an existing account, you can directly log in to the existing account by this method next time.","identityBindingCreate":"Create a new account","identityBindingBinding":"Bind to an existing account","identityBindingTitle":"Bind existing account","identityBindingDesc":"After binding, you can log in to this account directly by this method next time","identityBindingSkipAskTitle":"Account Binding","identityBindingSkipAskDesc":"Enter an exisiting account to bind, or enter a new account to sign up.","internationPhoneMessage":"Please enter a valid mobile phone number","areaCodePhone":"Area code Mobile number","timeoutAD":"Request timed out, AD misconfigured","timeout":"Request timed out, please try again later","userNameIsExists":"This username already exists!","fetchError":"Network connection failed, please try again later","i18nCheckErrorMessage":"Please enter a valid mobile phone number or correct email address","verifyCodeRegister":"Verify Code","PasswordRegister":"Password","EmailRegister":"Email","registerTab":"{{text}}","noFindEmail":"Can\'t find the email account","noFindPhone":"Can\'t find the phone account","noFindUsername":"Can\'t find the username account","jobNumber":"Account first letter must be capital","passwordUnsafeTip":"Password strength has been updated, please refresh the page and try again","loginWithWechatmpQrcodeTipsTitle":"Long press the QR code to login","del":"Delete","qrcode":"QR Code","registerCompletePasswordDesc":"To ensure account security, please set your password.","mfaCertification":"Multi-factor authentication","emailMfaCheck":"Please enter email verification code","SmsMfaCheck":"Please enter SMS verification code","faceCheck":"Please keep the camera turned on and unobstructed","resetAccount":{"title":"Set the user name","message":"The current user name is not unique, please reset the user name before you can successfully log on."},"noTenant":"There are currently no tenants who have joined","joinTenant":"Join Tenant","tenantExample":"Please enter the tenant identification code, for example: Ljrs18wa","enter":"enter","createTenant":"Create Tenant","pleaseInput":"Enter","tenantName":"Tenant Name","tenantEmail":"Tenant\'s corporate email domain name","tenantDesc":"Tenant Description","visitor":"guesting","createTenantDesc":"To create a new tenant, please click here","codeError":"Identification code error, please re-enter","emailVerify":"Verify Enterprise Email","verify":"test and verify","inputBusinessEmail":"Please enter your company email address","inputCode":"Please enter the verification code","domainNotFound":"The current organization administrator has not set up a corporate email domain name. Please contact the administrator to set it up and join the organization.","name":"name","applyJoin":"Apply to join","welcomeJoin":"Inviting you to join","inputCaptcha":"Please enter the authentication code","verifyAccount":"The identity verification code has been sent to {{0}}","captchaMaxErrorCount":"Verification code input error {{0}} times, the link will become invalid","pendingMsg":"You have completed the application to join 「{{0}}」.<br />Please wait for the administrator\'s approval before you receive the email. Please pay attention.","doneMsg":"Successfully applied to join, please check your email!","inviteExpire":"Verification failed, current link is no longer valid","inviteExpireMsg":"Please contact the inviter to resend the invitation email to you","sendSms":"Did not receive the email? Click to send SMS","sendEmail":"Did not receive the text message? Click to send email","invitation":{"completeInfo":"Please complete the information","completeInfoDesc":"Please complete the information below. If the information is not mandatory, you can click「Next」to skip it directly"},"cratePasskeyTitle":"Create Passkey","cratePasskeyTips":"The current account does not have a passkey, please complete the creation and verification before logging in","onBindPasskeyTitle":"Passkey has not been bound yet. Please contact the administrator for binding operation","createNow":"Create now","passkeyVerifyTitle":"Passkey verify","passkeyVerifyTips":"To ensure access security, please complete verification according to the browser prompts","reVerify":"reverify","inviteExpired":"The current invitation link has expired. Please contact the relevant administrator to resend the invitation for you.","pageExpired":"The current page has expired. Please click the invitation link again to enter","inviteSuccess":"Successfully joined, please check your email. Please complete the login based on the information in the email."}'),Gu=JSON.parse('{"inputAccount":"Enter {{text}}","inputAdUsername":"Enter AD username","accPwdLoginVerify":"Account login verification","captchaCode":"Captcha","inputAdPwd":"Enter AD password","inputCaptchaCode":"Digit code","inputCorrectPhone":"Enter correct phone number or email address","inputEmail":"Enter Email","inputLdapPwd":"LDAP Password","inputLdapUsername":"LDAP Username","inputLoginPwd":"Enter Password","inputPhone":"Phone number","inputPhoneOrEmail":"Enter Phone number or Email","inputPwdAgain":"Enter password again","inputRecoverCode":"Enter recovery code","inputSixCode":"Enter 6-digit security code","loginBy":"Sign in with {{name}}","mfaAfterReset":"If you do not have a recovery code, please contact the administrator","noEmpty":"Please enter a {{label}}","rememberedSecret":"This key has been safely recorded","resetPwd":"Reset password","selfUnlock":"self unlock","selfUnlockText":"Your account has been locked, please enter the verification code and password to unlock it by yourself.","thridAccLogin":"Or sign in with","pwdLogin":"Password","bindPwdLogin":"Password","appScanLogin":"Mobile APP QR Code","zjzwScanLogin":"Zhejiang Office QR Code","scanLogin":"QR Code","ldapLogin":"LDAP","adLogin":"AD","authingOtpPushLogin":"Login by push","authingOtpPushCancelLogin":"Cancel login","loginText":"Login","otpLoginPendingText":"The request has been sent to the Authoring Token APP. Please confirm login at the client","getOtpLoginRequestAgain":"The login request is invalid. Please send request again","downloadOtpVerifier":"Download Authing OTP","loginToMobileClient":"Login Authing OTP","scanQrCode":"Scan QR code","setAuthingTokenVerify":"Set Authing OTP Verify","phoneScanCodeAndDownloadAuthingToken":"Please scan the code with your mobile phone or go to the app market to download the Authing OTP","noPrompt":"Don\'t prompt again","directLogin":"Direct login","openAuthingOtp":"Open the Authing OTP and click \\"Login / Register\\"","clickAndScanQrcode":"Click the scanning entry at the upper right corner of the \\"Login Application\\" page to scan the QR code below","downloadIOS":"IOS download","downloadAndroid":"Android download","howBindClient":"How to bind client applications","installAuthingToken":"Install the Authing Token App","downloadAuthingToken":"Please use your mobile phone to scan the code or go to the application market to download the Authoring token","openAppList":"Open app list","addApp":"Open the \\"Application List\\" and click \\"Add Application\\"","openLoginPage":"Open the login page","scanQrcode":"Click the \\"Scan QR code\\" button to scan the application QR code","scanFollowingQrcode":"Scan the following application QR code","relevanceApp":"Associate the application and log in to the account","receiveMessageFromAuthingToken":"After logging in to the application account, you can complete the login by receiving the Web application push in the Authing token","howUsePushLogin":"How to use push login","inputAccountInWeb":"Enter account information in the web login panel","clickLoginButton":"Click \\"Login\\"","receiveMessageInApp":"Receive login push on the bound mobile application","confirmLoginInApp":"Confirm \\"Login\\" to successfully log in to the web side.","howGetAppLoginUrl":"How to get the application login address","getCodeFromAdmin":"Get the associated application QR code from the administrator","getCodeFromAdminTips":"The administrator can get the application QR code in the application login control, and scan the QR code to log in to the corresponding application.","getCodeFromPersonalCenter":"Get application QR code from personal center","getCodeFromPersonalCenterTips":"Users can save the application login QR code in \\"Personal Center - Quick Authentication\\", and use the Authoring token to scan the code and select the application to log in","getLoginUrlFromConsole":"The administrator obtains the login address from the console","getLoginUrlFromConsoleTips":"Administrators can copy the authentication address in \\"Console - Application Details - Application Configuration - Authentication Configuration\\". Users can log in and bind after copying the authentication address.","nextStep":"Next Step","enterAccount":"Please enter the account","inputEmailCode":"Enter email verification code","otherVerifyWay":"Other verification methods","otherLoginWay":"OR","verifyCodeSended":"Verification code has been sent to","clickSent":"Click send","reSent":"Click to resend the verification code","bindPhoneInfo":"Please enter the phone number to bind","bindWarning":"Please contact the administrator to bind your phone number for you","inputPhoneCode":"Please enter the phone verification code","forgetPwd":"Forgot Password","inputPwd":"Password","login":{"setPwdLimit2":"At least six digits, must contain two of English, numbers and symbols","setPwdLimit3":"At least six digits, including English, numbers and symbols"},"setPwdLimit1":"Set a password of at least 6 characters","setPwdLimitMsg1":"Passwords must be at least 6 characters long","setPwdLimitMsg2":"The password must be at least 6 characters long and must contain two of English, numbers and symbols","setPwdLimitMsg3":"The password must be at least 6 digits long and must contain English, numbers and symbols at the same time","wechatmpQrcode":"WechatMp QRcode\\t","inputUsername":"Username","moreWays":"More Login","inputCorrectPhoneOrEmail":"Enter a valid Email or Phone number","sendCodeTimeout":"Sending failed, please try later","mediaDevicesSupport":"The current device does not support face recognition","noLoginMethodsDesc":"No login method configured","inputNewPwd":"Please enter a new password","socialConnectionMessage":"Login with {{provider}} is not supported, please choose another way to log in, or try again in another browser","selectLoginAccount":"Select login account","useOtherAccount":"Use another account","wechatScanLogin":"WeChat QR Code","qrcodeRefer":"Refresh","qrcodeNetWorkError":"Retry","scanAgain":"Scan the code again","scanSuccess":"Scan Success","tenant":{"consoleManage":"Admin console","ssoPad":"Single sign-on application panel"},"AuthorizationCamera":"Please enable authorization first","checkPreferences":"Please check preferences","requireError":"Unable to satisfy request error","hardwareSupport":"Hardware not supported","verifyCodeTip":"Try another","loginWithPasskey":"Sign in with Passkey","resetPassword":{"pleaseInputPassword":"Please input a password","checkPasswordDiff":"Please enter a consistent password","nextStep":"Next","reset":"reset password","back":"Back","resetPasswordText1":"Please enter your registered mobile phone number/email to receive the verification code, and we will reset your password.","resetPasswordText2":"You are resetting Password for {{account}}。","input":"Input{{text}}","inputFourVerifyCode":"{{length}}-digit code","inputNewPwd":"Please enter a new password","confirmNewPwd":"Please confirm the new password","successTipMsg":"You can continue to log in with your new password","successTip":"Password reset succeeded","backLogin":"Seconds will automatically jump to the login page"},"wecomScanLogin":"Enterprise WeChat scan code to log in","passwordRuleTips":"Password requirements:","characterTypes":"Include at least {{x}} character types"}'),Ku=JSON.parse('{"inputCurrPwd":"Enter current password","inputNewPwd":"Enter a new Password","inputOldPwd":"Enter a old Password","mfaBind":"MFA Binding","modifyPwd":"Change Password","nextStep":"Next","numberSafteyCode":"Digital Security Code","error":"Error~","contactAdministrator":"Unknown error ~ please contact the administrator for processing","resetpasswordText1":"Enter your registered phone number/email, enter the verification code received, and we will reset your password.","modifyPwdTextDay":"Your password has been used for more than {{number}} days and may be at risk. Please reset your password.","modifyPwdTextMonth":"Your password has been used continuously for more than {{number}} months and may be at risk. Please reset your password.","modifyPwdTextYear":"Your password has been used continuously for more than {{number}} years and may be at risk. Please reset your password.","modifyNoticePwdTextDay":"Your password has been used continuously for more than {{number}} days and is about to expire. In order not to affect your use, please set a new password","modifyNoticePwdTextMonth":"Your password has been used continuously for more than {{number}} months and is about to expire. In order not to affect your use, please set a new password","modifyNoticePwdTextYear":"Your password has been used continuously for more than {{number}} years and is about to expire. In order not to affect your use, please set a new password","unlockTip":"If you encounter problems with unlocking, please click"}'),Yu=JSON.parse('{"guidance":{},"uploadFail":"{{name}} 上传失败","confirm":"确认","retryAfterTime":"{{time}} 秒","sendVerifyCode":"发送验证码","emailFormatError":"输入有效的邮箱","usernameFormatError":"输入有效的用户名","customNameFormatError":"输入有效的账号","phoneFormateError":"输入有效的手机号","username":"用户名","login":"登录","noAccYet":"还没有账号,","registerImmediate":"立即注册","sure":"确定","hasLooseSaftyCode":"安全码丢失?","useRecoverCode":"使用恢复代码","register":"注册","unlock":"解锁","alreadyHasAcc":"已有账号,","perfectUserInfo":"完善用户信息","man":"男","female":"女","emailLabel":"邮箱","phoneLabel":"手机号","pleaseSelectDate":"请选择日期","bindEmail":"绑定邮箱","email":"邮箱","inputFourVerifyCode":"请输入 {{length}} 位验证码","bindPhone":"绑定手机号","phoneNumber":"手机号","bind":"绑定","yes":"是","no":"否","problem":{"title":"问题反馈","noVerify":"无法收到验证码","noLogin":"无法登录","noRegister":"无法注册","noAccount":"帐号丢失","noResetPass":"无法重置密码","locked":"账号被锁定","other":"其他","noVerifyTip":{"tip":"如果无法收到手机验证码,建议你进行以下操作:","type1":"1. 检查你的手机是否停机/无网络","type2":"2. 检查你的手机号是否输入正确","type3":"3. 检查你的验证码短信是否被屏蔽"},"noLoginTip":{"type1":"1. 检查你的用户名与密码输入是否正确","type2":"2. 检查你的手机是否停机/无网络"},"noRegisterTip":{"tip":"如果无法注册,建议你进行以下操作:","type1":"1. 检查你的帐号是否已注册","type2":"2. 检查你的注册手机号是否输入正确","type3":"3. 检查你的验证码短信是否被屏蔽"},"noAccountTip":{"tip":"如果帐号丢失,建议你进行以下操作:","type1":"1. 检查你的用户名与密码输入是否正确","type2":"2. 检查你的手机是否停机/无网络"},"noResetPassTip":{"tip":"如果无法重置密码,建议你进行以下操作:","type1":"1. 检查你的手机是否停机/无网络","type2":"2. 检查你的设置的密码是否正确"},"otherTip":{},"successTip":"提交成功","successTipMsg":"你的信息已经提交给应用管理员,会尽快处理你的反馈,请你耐心等待。","form":{"phone":"联系方式","question":"相关问题","questionDescript":"问题描述","questionClip":"问题截图","submit":"提交"},"lockedTips":"如果你的账号被锁定,请联系管理员解锁后再尝试登录","noLoginTips":"如果无法登录,建议你进行以下操作:"},"backLoginPage":"返回登录","LoginSuccess":"登录成功","welcomeDoc":"欢迎加入 {{name}} ,为了更好的使用体验,请先完善你的个人信息","bindEmailDoc":"请输入邮箱进行绑定","copied":"已复制","copy":"复制","repeatPasswordDoc":"两次密码输入不一致","SMS":"短信验证码验证","EmailVerification":"电子邮箱验证","OTPVerification":"OTP 口令验证","faceVerification":"人脸识别验证","registrationSuccess":"注册成功","copyFailed":"复制失败","downloadTotpAppIOS":"IOS 下载","downloadTotpAppAndroid":"Android 下载","downloadTotpAppDocs":"请使用手机扫码下载验证器","bindTotp":"绑定 OTP","checkEmail":"该邮箱已存在","checkUserName":"该用户名已存在","checkCustomName":"该账号已存在","checkPhone":"该手机号已存在","loginFailCheck":"温馨提示:你的密码错误,还可以尝试 {{number}} 次","bindSuccess":"完成绑定","pleaseRecordKey":"请记录密钥","totpText1":"请妥善保存恢复代码","totpText2":"如果你的 MFA 丢失时,你将需要一个恢复代码","otpText1":"请前往 OTP 绑定页面进行绑定","faceText1":"绑定人脸识别","faceText2":"请打开摄像头识别人脸进行绑定","faceText3":"开始验证","faceText4":"重试一次","publicAccount":"公共账号","checkPasswordHasSpace":"不能包含空格","backToVerify":"返回验证页","usePhoneOpen":"请在手机打开 Google Authenticator 或 Microsoft Authenticator","noValidator":"没有验证器请","clickTodownload":"点击下载","mfaText1":"扫码添加 OTP,在手机查看并输入 6 位数字安全码。","backToMFA":"返回 MFA 绑定","timeoutLDAP":"请求超时,LDAP 配置错误","noQuestions":"没有问题,","goToLogin":"直接登录","passwordAgain":"请确认密码","isMissing":"{{name}}未填写","password":"密码","captchaCode":"验证码","account":"账号","phone":"手机号","pToLogin":"秒后返回登录","resetSuccess":"重置成功","resetSuccessMessage":"密码重置成功,你可以使用新密码继续登录","welcome":"欢迎访问","initPasswordText":"为了保障账号安全,请设置你的新密码。","unsafePasswordChangeText":"你的密码不符合当前密码强度要求,请设置新密码。","updatePsswordSuccess":"修改密码成功,请重新登录","fullCaptchaCode":"请填写完整的{{name}}","feedback":"问题反馈","loginProtocolTips":"请勾选登录协议","registerProtocolTips":"请勾选注册协议","accountLock":"账号被锁定,请点击下方问号进行反馈","corsErrorMessage":"当前域名不在允许访问的域名列表中。","corsErrorMessage2":"如果有疑问可以<a href=\\"https://docs.authing.cn/v2/guides/security/config-domain.html\\">参考文档</a>","totpGenerateCode":"为你生成一串新的恢复代码,请安全地记录这段密钥","verifyCodeLogin":"验证码登录","phoneCodeTab":"手机号登录","emailCodeTab":"邮箱登录","phoneVerifyCode":"短信验证码","emailVerifyCode":"邮箱验证码","phoneOrEmail":"手机号或邮箱","skip":"跳过","back":"返回","identityBindingAskTitle":"选择关联方式","identityBindingAskDesc":"如果绑定到已有账号,下次可以通过本次的方式直接登录已有账号","identityBindingCreate":"我想创建一个新账号","identityBindingBinding":"我想绑定到已有账号","identityBindingTitle":"绑定已有账号","identityBindingDesc":"绑定后,下次可以直接通过这次的方式登录到此账号","identityBindingSkipAskTitle":"账号绑定","identityBindingSkipAskDesc":"若存在已有账号,输入成功后将会完成绑定;若输入新账号则会完成创建和绑定","internationPhoneMessage":"请输入所在区号合法的手机号","areaCodePhone":"+区号 手机号","timeoutAD":"请求超时,AD 配置错误","timeout":"请求超时,请稍后重试","userNameIsExists":"该用户名已存在!","fetchError":"网络连接失败,请稍后再试","passwordUnsafeTip":"密码强度已更新,请刷新页面后重试","i18nCheckErrorMessage":"请输入所在区号合法的手机号或正确的邮箱","verifyCodeRegister":"验证码注册","PasswordRegister":"密码注册","EmailRegister":"邮箱注册","registerTab":"{{text}}注册","noFindEmail":"找不到该邮箱账号","noFindPhone":"找不到该手机账号","noFindUsername":"找不到该用户名账号","jobNumber":"工号首字母大写","loginWithWechatmpQrcodeTipsTitle":"长按二维码登录","del":"移除","qrcode":"二维码","registerCompletePasswordDesc":"为了保障账号安全,请设置你的密码。","mfaCertification":"多因素认证","emailMfaCheck":"请输入电子邮箱验证码","SmsMfaCheck":"请输入短信验证码","faceCheck":"请保持摄像头已打开并无遮挡","resetAccount":{"title":"设置用户名","message":"当前用户名不是唯一的,请重新设置用户名后才可以成功登录。"},"noTenant":"暂无已加入的租户","joinTenant":"加入租户","tenantExample":"请输入租户识别码,例如:Ljrs18wa","enter":"进入","createTenant":"创建租户","pleaseInput":"请输入","tenantName":"租户名称","tenantEmail":"租户企业邮箱域名","tenantDesc":"租户描述","visitor":"访客模式","createTenantDesc":"如需创建新租户,请点击此处","codeError":"识别码错误,请重新输入","emailVerify":"验证企业邮箱","verify":"验证","inputBusinessEmail":"请输入企业邮箱","inputCode":"请输入验证码","domainNotFound":"当前组织管理员未设置企业邮箱域名,请联系管理员设置后加入组织。","name":"姓名","applyJoin":"申请加入","welcomeJoin":"邀请你加入","inputCaptcha":"请输入身份验证码","verifyAccount":"身份验证码已发送至 {{0}}","captchaMaxErrorCount":"验证码输入错误 {{0}} 次,链接将会失效","pendingMsg":"你已完成加入「{{0}}」的申请。<br />请等待管理员审批通过后,你将收到邮件,敬请留意。","doneMsg":"申请加入成功,敬请查收邮件!","inviteExpire":"验证失败,当前链接已失效","inviteExpireMsg":"请联系邀请人为您重新发送邀请邮件","sendSms":"未收到邮件?点击发送短信","sendEmail":"未收到短信?点击发送邮件","invitation":{"completeInfo":"请补全信息","completeInfoDesc":"请补全下方信息,信息为非必填的情况下, 可点击「下一步」直接跳过"},"cratePasskeyTitle":"创建 Passkey","cratePasskeyTips":"当前账号暂无 passkey,请先完成创建验证后登录","onBindPasskeyTitle":"暂未绑定 Passkey,请联系管理员进行绑定操作","createNow":"立即创建","passkeyVerifyTitle":"Passkey 验证","passkeyVerifyTips":"为了保障访问安全,请根据浏览器提示完成验证","reVerify":"重新验证","inviteExpired":"当前邀请链接已失效,请联系相关管理员为你重新发起邀请。","pageExpired":"当前页面已过期,请重新点击邀请链接进入","inviteSuccess":"已成功加入,敬请查收邮件。请根据邮件内的信息完成登录。"}'),Ju=JSON.parse('{"inputAccount":"请输入{{text}}","inputAdUsername":"请输入 AD 用户名","inputAdPwd":"请输入 AD 密码","inputLdapUsername":"请输入 LDAP 用户名","inputLdapPwd":"请输入 LDAP 密码","inputCaptchaCode":"请输入图形验证码","captchaCode":"图形验证码","accPwdLoginVerify":"账号登录验证","inputSixCode":"请输入绑定的 6 位数字安全码","inputLoginPwd":"请输入登录密码","inputPhone":"请输入手机号","inputEmail":"请输入邮箱","inputPwdAgain":"再输入一次密码","loginBy":"使用 {{name}} 登录","thridAccLogin":"第三方账号登录","inputRecoverCode":"请输入恢复代码","rememberedSecret":"已经安全地记录了这段密钥","mfaAfterReset":"如果你没有恢复代码,请联系管理员处理","noEmpty":"{{label}} 不能为空","inputCorrectPhone":"请输入正确的手机号或邮箱","inputPhoneOrEmail":"请输入手机号或邮箱","resetPwd":"重置密码","selfUnlock":"自助解锁","selfUnlockText":"你的账号已被锁定,请输入验证码及密码自助解锁。","pwdLogin":"密码登录","bindPwdLogin":"密码登录","appScanLogin":"移动端 APP 扫码登录","zjzwScanLogin":"浙里办扫码登录","scanLogin":"扫码登录","scanAgain":"重新扫码","wechatScanLogin":"使用微信扫码登录","scanSuccess":"扫码成功","ldapLogin":"LDAP 登录","adLogin":"AD 登录","loginText":"登录","authingOtpPushLogin":"推送登录","authingOtpPushCancelLogin":"取消登录","otpLoginPendingText":"已发送请求到 Authing 令牌 APP,请在客户端确认登录","getOtpLoginRequestAgain":"登录请求已失效,请重新获取","downloadOtpVerifier":"下载验证器","loginToMobileClient":"登录移动端","scanQrCode":"扫描二维码","setAuthingTokenVerify":"设置 Authing 令牌 Verify","phoneScanCodeAndDownloadAuthingToken":"请用手机扫码或前往应用市场下载 Authing 令牌","noPrompt":"以后不再提示","directLogin":"直接登录","openAuthingOtp":"打开 Authing 令牌,点击“登录/注册”","clickAndScanQrcode":"点击“登录应用”页面右上角的扫码入口,扫描下方二维码","downloadIOS":"iOS下载","downloadAndroid":"安卓下载","howBindClient":"如何绑定客户端应用","installAuthingToken":"安装 Authing 令牌","downloadAuthingToken":"请使用手机扫码或前往应用市场下载 Authing 令牌","openAppList":"打开应用列表","addApp":"打开\\"应用列表\\",点击\\"添加应用\\"","openLoginPage":"打开登录页","scanQrcode":"点击\\"扫描二维码\\"按钮扫描应用二维码","scanFollowingQrcode":"扫描以下应用二维码","relevanceApp":"关联应用并登录账号","receiveMessageFromAuthingToken":"登录应用账号后即可在 Authing 令牌接收 Web 应用推送完成登录","howUsePushLogin":"如何使用推送登录","inputAccountInWeb":"在 Web 端登录面板输入账号信息","clickLoginButton":"点击\\"登录\\"","receiveMessageInApp":"在已绑定的移动端应用上接收登录推送","confirmLoginInApp":"确认“登录”,即可成功登录 Web 端。","howGetAppLoginUrl":"如何获取应用登录地址","getCodeFromAdmin":"从管理员处获取关联应用二维码","getCodeFromAdminTips":"管理员可在应用登录控制中得到应用二维码,扫描二维码即可登录对应应用。","getCodeFromPersonalCenter":"从个人中心获取应用二维码","getCodeFromPersonalCenterTips":"用户可在\\"个人中心 - 快速认证\\"保存应用登录二维码,使用 Authing 令牌扫码后选择应用即可登录。","getLoginUrlFromConsole":"管理员从控制台取得登录地址","getLoginUrlFromConsoleTips":"管理员可在「控制台 - 应用详情 - 应用配置 - 认证配置」复制认证地址,用户复制认证地址后即可登录和绑定。","nextStep":"下一步","enterAccount":"请输入账号","verifyCodeSended":"验证码已发送至","inputEmailCode":"请输入邮箱验证码","otherVerifyWay":"其他验证方式","otherLoginWay":"其他登录方式","clickSent":"点击发送验证码","reSent":"点击重发验证码","bindPhoneInfo":"请输入手机号进行绑定","bindWarning":"请联系管理员为你绑定手机号","inputPhoneCode":"请输入手机验证码","forgetPwd":"忘记密码","inputPwd":"请输入密码","setPwdLimit1":"设置至少 6 位字符密码","login":{"setPwdLimit2":"至少六位,需包含英文、数字与符号中的两种","setPwdLimit3":"至少六位,需包含英文、数字与符号"},"setPwdLimitMsg1":"密码长度至少为 6 位","setPwdLimitMsg2":"密码长度至少为 6 位,且要包含英文、数字与符号中的两种","setPwdLimitMsg3":"密码长度至少为 6 位,且要同时包含英文、数字与符号","wechatmpQrcode":"公众号关注登录","inputUsername":"请输入用户名","moreWays":"更多登录","inputCorrectPhoneOrEmail":"请输入有效的手机号或邮箱","sendCodeTimeout":"发送失败,请稍后尝试","mediaDevicesSupport":"当前设备暂不支持人脸识别","qrcodeNetWorkError":"网络异常 点击重试","qrcodeRefer":"刷新","noLoginMethodsDesc":"未配置登录方式","socialConnectionMessage":"不支持使用{{provider}}登录,请选择其他方式登录,或在其它浏览器中重试","inputNewPwd":"请输入新密码","selectLoginAccount":"选择登录账号","useOtherAccount":"使用其他账号","tenant":{"consoleManage":"管理员控制台","ssoPad":"单点登录应用面板"},"AuthorizationCamera":"请先开启授权","checkPreferences":"请检查偏好设置","requireError":"无法满足要求错误","hardwareSupport":"硬件不支持","verifyCodeTip":"看不清?换一张","loginWithPasskey":"使用 Passkey 登录","resetPassword":{"pleaseInputPassword":"请输入密码","checkPasswordDiff":"请输入一致的密码","nextStep":"下一步","reset":"重置密码","back":"返回","resetPasswordText1":"请输入你注册的手机号/邮箱用于接收验证码,我们将为你重置密码。","resetPasswordText2":"你正在重置 {{account}} 的密码。","input":"输入{{text}}","inputFourVerifyCode":"请输入 {{length}} 位验证码","inputNewPwd":"请输入新密码","confirmNewPwd":"请确认新密码","successTipMsg":"你可以使用新密码继续登录","successTip":"密码重置成功","backLogin":"秒后将自动跳转登录页"},"wecomScanLogin":"企业微信扫码登录","passwordRuleTips":"你的密码需要满足如下要求:","characterTypes":"需要包含以下至少 {{x}} 种字符类型"}'),Zu=JSON.parse('{"numberSafteyCode":"数字安全码","mfaBind":"MFA 绑定","nextStep":"下一步","inputCurrPwd":"请输入当前密码","inputNewPwd":"请输入新密码","inputOldPwd":"请输入原登录密码","modifyPwd":"修改密码","modifyPwdTextDay":"你的密码连续使用超过 {{number}} 天,可能存在风险。请重新设置密码。","modifyPwdTextMonth":"你的密码连续使用超过 {{number}} 个月,可能存在风险。请重新设置密码。","modifyPwdTextYear":"你的密码连续使用超过 {{number}} 年,可能存在风险。请重新设置密码。","modifyNoticePwdTextDay":"你的密码连续使用超过 {{number}} 天,即将过期,为了不影响你的使用,请设置新密码","modifyNoticePwdTextMonth":"你的密码连续使用超过 {{number}} 个月,即将过期,为了不影响你的使用,请设置新密码","modifyNoticePwdTextYear":"你的密码连续使用超过 {{number}} 年,即将过期,为了不影响你的使用,请设置新密码","error":"错误信息","contactAdministrator":"未知的错误~ 请你联系管理员进行处理","resetpasswordText1":"输入你的注册电话/邮箱,输入收到的验证码,我们将为你进行密码重置。","unlockTip":"若解锁遇到问题,请点"}'),Qu=JSON.parse('{"EmailVerification":"電子郵件驗證","LoginSuccess":"登入成功","OTPVerification":"OTP 口令驗證","PasswordRegister":"密碼註冊","EmailRegister":"電子郵件註冊","registerTab":"{{text}}註冊","SMS":"短信驗證碼驗證","account":"賬號","accountLock":"賬號被鎖定,請點擊下方問號進行反饋","alreadyHasAcc":"已有賬號,","areaCodePhone":"區號 手機號碼","back":"返回","backLoginPage":"返回登入","backToMFA":"返回 MFA 綁定","backToVerify":"返回驗證頁","bind":"綁定","bindEmail":"綁定電子郵件","bindEmailDoc":"請輸入電子郵件進行綁定","bindPhone":"綁定手機號碼","bindSuccess":"完成綁定","bindTotp":"綁定 OTP","captchaCode":"驗證碼","checkEmail":"該電子郵件已存在","checkPasswordHasSpace":"不能包含空格","checkPhone":"該手機號碼已存在","checkUserName":"該用戶名已存在","checkCustomName":"該帳號已存在","clickTodownload":"點擊下載","confirm":"確認","copied":"已復制","copy":"複製","copyFailed":"複製失敗","corsErrorMessage":"當前域名不在允許訪問的域名列表中。","corsErrorMessage2":"如果有疑問可以<a href=\\"https://docs.authing.cn/v2/guides/security/config-domain.html\\">參考文檔</a>","downloadTotpAppAndroid":"Android 下載","downloadTotpAppDocs":"請使用手機掃碼下載驗證器","downloadTotpAppIOS":"IOS 下載","email":"電子郵件","emailFormatError":"請輸入有效的電子郵件","emailLabel":"電子郵件","emailVerifyCode":"電子郵件驗證碼","faceText1":"綁定人臉識別","faceText2":"請打開攝像頭識別人臉進行綁定","faceText3":"開始驗證","faceText4":"重試一次","faceVerification":"人臉識別驗證","feedback":"幫助中心","female":"女","fetchError":"網路連接失敗,請稍後再試","fullCaptchaCode":"請填寫完整的{{name}}","goToLogin":"直接登入","hasLooseSaftyCode":"安全碼丟失?","i18nCheckErrorMessage":"請輸入所在區號合法的手機號或正確的郵箱","identityBindingAskDesc":"如果綁定到已有賬號,下次可以通過本次的方式直接登入已有賬號","identityBindingAskTitle":"選擇關聯方式","identityBindingBinding":"我想綁定到已有賬號","identityBindingCreate":"我想創建一個新賬號","identityBindingDesc":"綁定後,下次可以直接通過這次的方式登入到此賬號","identityBindingTitle":"綁定已有賬號","identityBindingSkipAskTitle":"帳號綁定","identityBindingSkipAskDesc":"若存在已有帳號,輸入成功後將會完成綁定; 若輸入新帳號則會完成創建和綁定","initPasswordText":"為了保障賬號安全,請設置您的新密碼。","inputFourVerifyCode":"請輸入 {{length}} 位數驗證碼","internationPhoneMessage":"請輸入所在區號合法的手機號碼","isMissing":"{{name}}未填寫","jobNumber":"工號首字母大寫","login":"登入","loginFailCheck":"溫馨提示:您的密碼錯誤,還可以嘗試 {{number}} 次","loginProtocolTips":"請勾選登入協議","man":"男","mfaText1":"掃碼添加 OTP,在手機查看並輸入 6 位數字安全碼。","no":"否","noAccYet":"還沒有賬號,","noFindEmail":"找不到該電子郵件","noFindPhone":"找不到該手機賬號","noFindUsername":"找不到該用戶名賬號","noQuestions":"沒有問題,","noValidator":"沒有驗證器請","otpText1":"請前往 OTP 綁定頁面進行綁定","pToLogin":"秒後返回","password":"密碼","passwordAgain":"請確認密碼","publicAccount":"公共帳戶","passwordUnsafeTip":"密碼強度已更新,請刷新頁面後重試","perfectUserInfo":"個人資訊","phone":"手機號碼","phoneFormateError":"輸入有效的手機號碼","phoneLabel":"手機號碼","phoneNumber":"手機號碼","phoneOrEmail":"手機號碼或電子郵件","phoneVerifyCode":"短信驗證碼","pleaseRecordKey":"請記錄密鑰","pleaseSelectDate":"請選擇日期","problem":{"form":{"phone":"聯絡方式","question":"相關問題","questionClip":"截圖","questionDescript":"問題描述","submit":"提交"},"locked":"帳號被鎖住","lockedTips":"如果您的帳號被鎖定,請聯繫管理員解鎖後再嘗試登入","noAccount":"帳號遺失","noAccountTip":{"tip":"如果帳號丟失,建議您進行以下操作:","type1":"1. 檢查您的帳號與密碼是否正確輸入","type2":"2. 檢查您的手機服務是否停用 / 沒有網路"},"noLogin":"無法登入","noLoginTip":{"type1":"1. 檢查您的帳號與密碼是否正確輸入","type2":"2. 檢查您的手機服務是否停用 / 沒有網路"},"noLoginTips":"如果無法登入,建議您進行以下操作:","noRegister":"無法註冊","noRegisterTip":{"tip":"如果無法註冊,建議您進行以下操作:","type1":"1. 檢查您的帳號是否已註冊","type2":"2. 檢查您的註冊手機號碼是否正確輸入","type3":"3. 檢查您的驗證碼簡訊是否被阻擋"},"noResetPass":"無法重設密碼","noResetPassTip":{"tip":"如果無法重設密碼,建議您進行以下操作:","type1":"1. 檢查您的手機服務是否停用 / 沒有網路","type2":"2. 檢查您設定的密碼是否正確"},"noVerify":"無法收到驗證碼","noVerifyTip":{"tip":"如果無法收到手機驗證碼,建議您進行以下操作:","type1":"1. 檢查您的手機服務是否停用 / 沒有網路","type2":"2. 檢查您的手機號碼是否輸入正確","type3":"3. 檢查您的驗證碼簡訊是否被阻擋"},"other":"其他","successTip":"提交成功","successTipMsg":"您的信息已經提交給應用管理員,會盡快處理您的反饋,請您耐心等待。","title":"問題回報"},"register":"註冊","registerImmediate":"立即註冊","registerProtocolTips":"請勾選註冊協議","registrationSuccess":"註冊成功","repeatPasswordDoc":"兩次密碼輸入不一致","resetSuccess":"重設密碼","resetSuccessMessage":"密碼重設成功,請使用新密碼登入","retryAfterTime":"{{time}} 秒","sendVerifyCode":"發送驗證碼","skip":"跳過","sure":"確定","timeout":"請求超時,請稍後重試","timeoutAD":"請求超時,AD 配置錯誤","timeoutLDAP":"請求超時,LDAP 配置錯誤","totpGenerateCode":"為您生成一串新的恢復代碼,請安全地記錄這段密鑰","totpText1":"請妥善保存恢復代碼","totpText2":"如果您的 MFA 丟失時,您將需要一個恢復代碼","unlock":"解鎖","unsafePasswordChangeText":"您的密碼不符合當前密碼強度要求,請設置新密碼。","updatePsswordSuccess":"修改密碼成功,請重新登入","uploadFail":"{{name}} 上傳失敗","usePhoneOpen":"請在手機打開 Google Authenticator 或 Microsoft Authenticator","useRecoverCode":"使用恢復代碼","userNameIsExists":"該用戶名已存在!","username":"用戶名","usernameFormatError":"輸入有效的用戶名","customNameFormatError":"輸入有效的帳號","verifyCodeLogin":"驗證碼登入","phoneCodeTab":"手機號登錄","emailCodeTab":"郵箱登錄","verifyCodeRegister":"驗證碼註冊","welcome":"歡迎訪問","welcomeDoc":"歡迎加入 {{name}} ,為了提供最佳的線上體驗,請填寫您的個人資訊","yes":"是","loginWithWechatmpQrcodeTipsTitle":"長按二維碼登入","del":"移除","qrcode":"二維碼","registerCompletePasswordDesc":"為了保障賬號安全,請設置您的密碼。","mfaCertification":"多因素認證","emailMfaCheck":"請輸入電子郵箱驗證碼","SmsMfaCheck":"請輸入短信驗證碼","faceCheck":"請保持攝像頭已打開並無遮擋","resetAccount":{"title":"設定用戶名","message":"當前用戶名不是唯一的,請重新設定用戶名後才可以成功登入。"},"noTenant":"暫無已加入的租戶","joinTenant":"加入租戶","tenantExample":"請輸入租戶識別碼,例如:Ljrs18wa","enter":"進入","createTenant":"創建租戶","pleaseInput":"請輸入","tenantName":"租戶名稱","tenantEmail":"租戶企業郵箱功能變數名稱","tenantDesc":"租戶描述","visitor":"訪客模式","createTenantDesc":"如需創建新租戶,請點擊此處","codeError":"識別碼錯誤,請重新輸入","emailVerify":"驗證企業郵箱","verify":"驗證","inputBusinessEmail":"請輸入企業郵箱","inputCode":"請輸入驗證碼","domainNotFound":"當前組織管理員未設定企業郵箱功能變數名稱,請聯系管理員設定後加入組織。","name":"姓名","applyJoin":"申請加入","welcomeJoin":"邀請你加入","inputCaptcha":"請輸入身份驗證碼","verifyAccount":"身份驗證碼已發送至 {{0}}","captchaMaxErrorCount":"驗證碼輸入錯誤 {{0}} 次,連結將會失效","pendingMsg":"你已完成加入「{{0}}」的申請。< br />請等待管理員審批通過後,你將收到郵件,敬請留意。","doneMsg":"申請加入成功,敬請查收郵件!","inviteExpire":"驗證失敗,當前連結已失效","inviteExpireMsg":"請聯系邀請人為您重新發送邀請郵件","sendSms":"未收到郵件?點擊發送短信","sendEmail":"未收到簡訊?點擊發送郵件","invitation":{"completeInfo":"請補全資訊","completeInfoDesc":"請補全下方資訊,資訊為非必填的情况下,可點擊「下一步」直接跳過"},"cratePasskeyTitle":"建立 Passkey","cratePasskeyTips":"目前帳號沒有 passkey,請先完成建立驗證後登入","onBindPasskeyTitle":"暫未綁定 Passkey,請聯系管理員進行綁定操作","createNow":"立即建立","passkeyVerifyTitle":"Passkey 驗證","passkeyVerifyTips":"為了保障存取安全,請根據瀏覽器提示完成驗證","reVerify":"重新驗證","inviteExpired":"當前邀請連結已失效,請聯系相關管理員為你重新發起邀請。","pageExpired":"當前頁面已過期,請重新點擊邀請連結進入","inviteSuccess":"已成功加入,敬請查收郵件。 請根據郵件內的資訊完成登入。"}'),Xu=JSON.parse('{"accPwdLoginVerify":"賬號登入驗證","adLogin":"AD 登入","authingOtpPushLogin":"推送登錄","authingOtpPushCancelLogin":"取消登錄","loginText":"登録","otpLoginPendingText":"已發送請求到Authing權杖APP,請在用戶端確認登入","getOtpLoginRequestAgain":"登錄請求已失效,請重新獲取","downloadOtpVerifier":"下載驗證器","loginToMobileClient":"登錄移動端","scanQrCode":"掃描二維碼","setAuthingTokenVerify":"設定Authing權杖Verify","phoneScanCodeAndDownloadAuthingToken":"请用手机扫码或前往应用市场下载 Authing 令牌","noPrompt":"以後不再提示","directLogin":"直接登錄","openAuthingOtp":"打開Authing權杖,點擊“登入/注册”","clickAndScanQrcode":"點擊“登入應用”頁面右上角的掃碼入口,掃描下方二維碼","downloadIOS":"iOS下載","downloadAndroid":"安卓下載","howBindClient":"如何綁定用戶端應?","installAuthingToken":"安裝Authing權杖","downloadAuthingToken":"請使用手機掃碼或前往應用市場下載Authing權杖","openAppList":"打開應用清單","addApp":"打開“應用清單”,點擊“添加應用”","openLoginPage":"打開登入頁","scanQrcode":"點擊“掃描二維碼”按鈕掃描應用二維碼","scanFollowingQrcode":"掃描以下應用二維碼","relevanceApp":"關聯應用並登入帳號","receiveMessageFromAuthingToken":"登录应用账号后即可在 Authing 令牌接收 Web 应用推送完成登录","howUsePushLogin":"如何使用推送登入","inputAccountInWeb":"在Web端登入面板輸入帳號資訊","clickLoginButton":"點擊\\"登入\\"","receiveMessageInApp":"在已綁定的移動端應用上接收登入推送","confirmLoginInApp":"確認“登入”,即可成功登入Web端。","howGetAppLoginUrl":"如何獲取應用登入地址","getCodeFromAdmin":"從管理員處獲取關聯應用二維碼","getCodeFromAdminTips":"管理員可在應用登入控制中得到應用二維碼,掃描二維碼即可登入對應應用。","getCodeFromPersonalCenter":"從個人中心獲取應用二維碼","getCodeFromPersonalCenterTips":"用戶可在“個人中心-快速認證”保存應用登入二維碼,使用Authing權杖掃碼後選擇應用即可登入。","getLoginUrlFromConsole":"管理員從控制台取得登入地址","getLoginUrlFromConsoleTips":"管理員可在「控制台-應用詳情-應用配寘-認證配寘」複製認證地址,用戶複製認證地址後即可登入和綁定。","nextStep":"下一步","enterAccount":"請輸入帳號","appScanLogin":"移動端 APP 掃碼登入","zjzwScanLogin":"浙裡辦掃碼登入","bindPhoneInfo":"請輸入手機號碼進行綁定","bindWarning":"請聯系管理員為你綁定手機號","captchaCode":"圖形驗證碼","clickSent":"點擊發送驗證碼","reSent":"點擊重發驗證碼","forgetPwd":"忘記密碼","inputAccount":"請輸入{{text}}","inputAdPwd":"請輸入 AD 密碼","inputAdUsername":"請輸入 AD 用戶名","inputCaptchaCode":"請輸入圖形驗證碼","inputCorrectPhone":"請輸入正確的手機號碼或電子郵件","inputCorrectPhoneOrEmail":"請輸入有效的手機號碼或電子郵件","inputEmail":"請輸入電子郵件","inputEmailCode":"請輸入電子郵件驗證碼","inputLdapPwd":"請輸入 LDAP 密碼","inputLdapUsername":"請輸入 LDAP 用戶名","inputLoginPwd":"請輸入密碼","inputNewPwd":"請輸入新密碼","inputPhone":"請輸入手機號碼","inputPhoneCode":"請輸入手機驗證碼","inputPhoneOrEmail":"請輸入手機號碼或電子郵件","inputPwd":"請輸入密碼","inputPwdAgain":"再輸入一次密碼","inputRecoverCode":"請輸入恢復代碼","inputSixCode":"請輸入綁定的 6 位數字安全碼","inputUsername":"請輸入用戶名","ldapLogin":"LDAP 登入","login":{"setPwdLimit2":"至少六位,需包含英文、數字與符號中的兩種","setPwdLimit3":"至少六位,需包含英文、數字與符號"},"loginBy":"使用 {{name}} 登入","mediaDevicesSupport":"當前設備暫不支持人臉識別","mfaAfterReset":"如果您沒有恢復代碼,請聯繫管理員處理","moreWays":"更多登入","noEmpty":"請填入 {{label}}","noLoginMethodsDesc":"未配置登入方式","otherLoginWay":"其他登入方式","otherVerifyWay":"其他驗證方式","pwdLogin":"帳號","bindPwdLogin":"帳號","rememberedSecret":"已經安全地記錄了這段密鑰","resetPwd":"重設密碼","scanLogin":"掃碼登入","selfUnlock":"自助解鎖","selfUnlockText":"您的賬號已被鎖定,請輸入驗證碼及密碼自助解鎖。","sendCodeTimeout":"發送失敗,請稍後嘗試","setPwdLimit1":"設置至少 6 位字符密碼","setPwdLimitMsg1":"密碼長度至少為 6 位","setPwdLimitMsg2":"密碼長度至少為 6 位,且要包含英文、數字與符號中的兩種","setPwdLimitMsg3":"密碼長度至少為 6 位,且要同時包含英文、數字與符號","socialConnectionMessage":"不支持使用{{provider}}登入,請選擇其他方式登入,或在其它瀏覽器中重試","thridAccLogin":"第三方帳號登入","verifyCodeSended":"驗證碼已發送至","wechatmpQrcode":"公眾號關注登入","selectLoginAccount":"選擇登入賬號","useOtherAccount":"使用其他賬號","wechatScanLogin":"使用微信掃碼登錄","qrcodeRefer":"刷新","qrcodeNetWorkError":"網路異常 點擊重試","scanAgain":"重新掃碼","scanSuccess":"掃碼成功","tenant":{"consoleManage":"管理員控制台","ssoPad":"單點登錄應用面板"},"AuthorizationCamera":"請先開啟授權","checkPreferences":"請檢查偏好設置","requireError":"無法滿足要求錯誤","hardwareSupport":"硬件不支持","verifyCodeTip":"看不清?換一張","loginWithPasskey":"使用 Passkey 登入","resetPassword":{"pleaseInputPassword":"請輸入密碼","checkPasswordDiff":"請輸入一致的密碼","nextStep":"下一步","reset":"重置密碼","back":"返回","resetPasswordText1":"請輸入你注册的手機號/郵箱用於接收驗證碼,我們將為你重置密碼。","resetPasswordText2":"你正在重置 {{account}} 的密碼。","input":"輸入{{text}}","inputFourVerifyCode":"請輸入 {{length}} 位數驗證碼","inputNewPwd":"請輸入新密碼","confirmNewPwd":"請確認新密碼","successTipMsg":"你可以使用新密碼繼續登入","successTip":"密碼重置成功","backLogin":"秒後將自動跳轉登入頁"},"wecomScanLogin":"企業微信掃碼登入","passwordRuleTips":"您的密碼必須包含:","characterTypes":"需要包含以下至少 {{x}} 种字符类型"}'),ed=JSON.parse('{"contactAdministrator":"未知的錯誤~ 請您聯繫管理員進行處理","error":"錯誤信息","inputCurrPwd":"請輸入當前密碼","inputNewPwd":"請輸入新密碼","inputOldPwd":"請輸入原登入密碼","mfaBind":"MFA 綁定","modifyPwdTextDay":"你的密碼連續使用超過 {{number}} 天,可能有風險。請重新設定密碼。","modifyPwdTextMonth":"你的密碼連續使用超過 {{number}} 個月,可能會有風險。請重新設定密碼。","modifyPwdTextYear":"你的密碼連續使用超過 {{number}} 年,可能有風險。請重新設定密碼。","modifyNoticePwdTextDay":"你的密碼連續使用超過 {{number}} 天,即將過期,為了不影響你的使用,請設定新密碼","modifyNoticePwdTextMonth":"你的密碼連續使用超過 {{number}} 個月,即將過期,為了不影響你的使用,請設定新密碼","modifyNoticePwdTextYear":"你的密碼連續使用超過 {{number}} 年,即將過期,為了不影響你的使用,請設定新密碼","modifyPwd":"修改密碼","nextStep":"下一步","numberSafteyCode":"數字安全碼","resetpasswordText1":"請輸入您的註冊電子郵件 / 手機號碼,以及收到的驗證碼,我們將為您進行密碼重設。","unlockTip":"若解鎖遇到問題,請點"}'),td=JSON.parse('{"guidance":{},"uploadFail":"{{name}} アップロード失敗","confirm":"確認","retryAfterTime":"{{time}} 秒","sendVerifyCode":"認証コードを送信します","emailFormatError":"有効なメールアドレスをご入力ください","usernameFormatError":"有効なユーザー名を入力する","customNameFormatError":"有効なアカウントを入力","phoneFormateError":"有効な携帯番号を入力する","username":"ユーザー名","login":"ログイン","noAccYet":"アカウントがないので,","registerImmediate":"すぐに登録します","sure":"確定","hasLooseSaftyCode":"セキュリティコードの紛失?","useRecoverCode":"復旧コードを使って","register":"登録","unlock":"ロック","alreadyHasAcc":"すでにアカウントがある,","perfectUserInfo":"プロフィール充実","publicAccount":"パブリックアカウント","man":"男","female":"女","emailLabel":"メールアドレス","phoneLabel":"携帯電話番号","pleaseSelectDate":"日付を選んでください","bindEmail":"メールボックスを結びつける","email":"メールアドレス","inputFourVerifyCode":"{{length}}桁の認証コードをご入力ください","bindPhone":"携帯電話番号を結びつける","phoneNumber":"携帯電話","bind":"据え置き","yes":"は","no":"いいえ","problem":{"title":"ヘルプ・お問い合わせ","noVerify":"認証コードが届きません","noLogin":"ログインできません","noRegister":"登録できません","noAccount":"アカウントをお忘れ","noResetPass":"パスワードのリセットができません","locked":"アカウントがロックされました","other":"その他","noVerifyTip":{"tip":"認証コードのSMSが届かない原因としては以下の事象等が考えられます。","type1":"1. 通信状況が不安定 /モバイル通信ができない状態","type2":"2. 電話番号の入力間違い","type3":"3. SMSの受信の制限"},"noLoginTip":{"type1":"1. アカウントとパスワードの入力が正しいかどうかチェックします。","type2":"2. 携帯電話が利用停止かどうか若しくはネットワーク接続状態チェックします。"},"noRegisterTip":{"tip":"ログインできない場合は、以下の操作をお勧めします。","type1":"1. すでにアカウント登録済みとなっているかどうかチェックします。","type2":"2. 携帯電話番号が正しく入力しているかどうかチェックします。","type3":"3. 認証コードのSMSがブロックされているかどうかチェックします。"},"noAccountTip":{"tip":"アカウントが紛失した場合は、以下の操作をお勧めします。","type1":"1. アカウントとパスワードの入力が正しいかどうかチェックします。","type2":"2. 携帯電話が利用停止かどうか若しくはネットワーク接続状態チェックします。"},"noResetPassTip":{"tip":"パスワードをリセットできない場合は、以下の操作をお勧めします。","type1":"1. 携帯電話が利用停止かどうか若しくはネットワーク接続状態チェックします。","type2":"2. 設定したパスワードが正しいかどうかチェックします。"},"otherTip":{},"successTip":"提出に成功する","successTipMsg":"あなたの情報はアプリケーション管理者に提出されており、フィードバックはすぐに処理されますので、お待ちください。","form":{"phone":"連絡方法","question":"ご用件","questionDescript":"お問い合わせ内容","questionClip":"スクリーンショット","submit":"提出"},"lockedTips":"アカウントがロックされた場合は、管理者にご連絡頂き、ロック解除された後もう一度ログインするようお願い致します。","noLoginTips":"ログインできない場合は、以下の操作をお勧めします。"},"backLoginPage":"ログイン画面に戻ります","LoginSuccess":"ログインに成功する","welcomeDoc":"{{name}}へようこそ、より良い使用体験をご提供できるよう個人情報のご記入をお願い致します。","bindEmailDoc":"メールアドレスを入力して結びつけてください","copied":"複製済み","copy":"コピー","repeatPasswordDoc":"2回のパスワード入力が一致しません","SMS":"sms認証","EmailVerification":"電子メール認証","OTPVerification":"OTP パスワード検証","faceVerification":"顔認証認証","registrationSuccess":"登録に成功する","copyFailed":"コピー失敗","downloadTotpAppIOS":"IOS のダウンロード","downloadTotpAppAndroid":"Android ダウンロード","downloadTotpAppDocs":"携帯電話のコードを使って検証をダウンロードしてください","bindTotp":"バインディング OTP","checkEmail":"メールボックスはすでに存在しています","checkUserName":"ユーザ名はすでに存在する","checkCustomName":"このアカウントは既に存在します","checkPhone":"携帯電話番号はすでに存在しています","loginFailCheck":"暖かい提示:あなたのパスワードは間違って、また試みることができます {{number}} 回","bindSuccess":"バインディング完了","pleaseRecordKey":"鍵を記録してください","totpText1":"回復コードを適切に保存してください","totpText2":"MFA が紛失した場合復旧コードが必要になります","otpText1":"バインドするには OTP バインド ページに移動してください","faceText1":"顔認証を結びつける","faceText2":"バインドする顔を認識するためにカメラをオンにしてください","faceText3":"検証を開始する","faceText4":"もう一度やってみる","checkPasswordHasSpace":"フレームを含まない","backToVerify":"検証ページに戻る","usePhoneOpen":"携帯で Google Authenticator または Microsoft Authenticator を開いてください","noValidator":"ベリファイアなしで","clickTodownload":"クリックしてダウンロードする","mfaText1":"OTP を追加して、携帯電話で調べて 6 桁の数字の安全なコードを入力します。","backToMFA":"MFA バインディングを戻す","timeoutLDAP":"要求タイムアウト、LDAP構成エラー","noQuestions":"問題がなく、","goToLogin":"直接にログインします","passwordAgain":"パスワードを確認してください","isMissing":"{{name}}が未入力です","password":"パスワード","captchaCode":"認証コード","account":"アカウント","phone":"携帯電話番号","pToLogin":"秒後に、ログイン画面に戻ります","resetSuccess":"リセットが完了しました","resetSuccessMessage":"パスワードのリセットが完了しました。新しいパスワードにて再ログインしてください。","welcome":"訪問を歓迎する","initPasswordText":"アカウントを安全に保つために、新しいパスワードを設定してください。","unsafePasswordChangeText":"あなたのパスワードは現在のパスワード強度の要件を満たしていません。新しいパスワードを設定してください。","updatePsswordSuccess":"パスワードの変更に成功しましたので、再ログインしてください","fullCaptchaCode":"{{name}}を記入してください","feedback":"ヘルプ・お問い合わせ","loginProtocolTips":"ログインプロトコルにチェックを入れてください","registerProtocolTips":"登録プロトコルにチェックを入れてください","accountLock":"アカウントがロックされたら、下の疑問符をクリックしてフィードバックしてください","corsErrorMessage":"現在のドメイン名はアクセスが許可されているドメイン名のリストには含まれていない。","corsErrorMessage2":"質問があれば<a href=\\"https://docs.authing.cn/v2/guides/security/config-domain.html\\">ドキュメント参照</a>","totpGenerateCode":"この鍵を安全に記録してください","verifyCodeLogin":"認証コード登録","phoneCodeTab":"携帯電話番号でのログイン","emailCodeTab":"電子メールでのログイン","phoneVerifyCode":"sms認証コード","emailVerifyCode":"メールボックス認証コード","phoneOrEmail":"携帯電話/メールアドレス","skip":"飛び越え","back":"戻る","identityBindingAskTitle":"つながり方を選ぶ","identityBindingAskDesc":"既存アカウントに紐付いている場合は、今回の方法で直接既存アカウントにログインすることができます。","identityBindingCreate":"新しいアカウントを作りたいのですが","identityBindingBinding":"既存のアカウントと結びつけたい","identityBindingTitle":"既存のアカウントを結びつける","identityBindingDesc":"紐付け后、次回から直接今回の方法でこのアカウントにログインすることができます","identityBindingSkipAskTitle":"アカウントのバインド","identityBindingSkipAskDesc":"既存のアカウントが存在する場合は、入力に成功するとバインドが完了します。新規アカウントを入力すると作成とバインドが完了します","internationPhoneMessage":"合法的な局番の携帯番号を入力してください","areaCodePhone":"+局番付き携帯番号","timeoutAD":"要求タイムアウト、AD設定ミス","timeout":"タイムアウトをお願いしますので,後ほど再試行してください","userNameIsExists":"このユーザー名はすでに存在します!","fetchError":"ネットワーク接続に失敗した場合は後ほどお試しください","passwordUnsafeTip":"パスワードが更新されましたので、ページを更新して再試行してください","i18nCheckErrorMessage":"地域番号の合法的な携帯電話番号または正しいメールアドレスを入力してください","verifyCodeRegister":"認証コード登録","EmailRegister":"Eメール登録","registerTab":"{{text}}登録","PasswordRegister":"アカウント登録","noFindEmail":"該当メールアドレスが見つかりません","noFindPhone":"携帯電話のアカウントが見つかりません","noFindUsername":"該当ユーザー名アカウントが見つからない","jobNumber":"工番の頭文字を大文字にする","loginWithWechatmpQrcodeTipsTitle":"qrコードを長押しして登録する","del":"除去","qrcode":"qrコード","registerCompletePasswordDesc":"アカウントを安全に保つために、パスワードを設定してください。","mfaCertification":"多要素認証","emailMfaCheck":"メール認証コードを入力してください","SmsMfaCheck":"SMS認証コードを入力してください","faceCheck":"カメラの電源を入れ、遮るものがない状態にしてください","resetAccount":{"title":"ユーザー名の設定","message":"現在のユーザー名は一つではありません。ユーザー名を再設定してからログインできます。"},"noTenant":"未加入のテナントは現在存在しません","joinTenant":"テナントへの参加","tenantExample":"テナント識別コードを入力してください(例:Ljrs18wa)","enter":"に入る","createTenant":"テナントの作成","pleaseInput":"入力してください","tenantName":"租户テナント名名称","tenantEmail":"テナント企業メールアドレスドメイン","tenantDesc":"テナントの説明","visitor":"ゲストモード","createTenantDesc":"新規テナントを作成するには、こちらをクリックしてください","codeError":"識別コードエラー、再入力してください","emailVerify":"エンタープライズメールボックスの検証","verify":"検証","inputBusinessEmail":"エンタープライズメールアドレスを入力してください","inputCode":"認証コードを入力してください","domainNotFound":"現在の組織管理者はエンタープライズメールアドレスのドメイン名を設定していません。管理者に連絡して設定してから組織に参加してください。","name":"名前","applyJoin":"加入申請","welcomeJoin":"あなたを招待します","inputCaptcha":"認証コードを入力してください","verifyAccount":"認証コードがに送信されました {{0}}","captchaMaxErrorCount":"認証コード入力エラー {{0}} 回、リンクが無効になります","pendingMsg":"あなたは「{{0}}」への参加申請を完了しました。<br />管理者の承認が完了するまで待ってください。メールが届きますので、注意してください。","doneMsg":"加入申請に成功しました、メールをご査収ください","inviteExpire":"検証に失敗しました。現在のリンクは無効です","inviteExpireMsg":"招待者に連絡して招待メールを再送してください","sendSms":"メールを受信していませんか?をクリックしてメッセージを送信","sendEmail":"メールが届かない?クリックしてメールを送信","invitation":{"completeInfo":"情報を補完してください","completeInfoDesc":"下の情報を補足してください。情報が必要でない場合は、「次へ」をクリックして直接スキップしてください"},"cratePasskeyTitle":"パスキーの作成","cratePasskeyTips":"現在のアカウントにはパスキーがありません。ログインする前に作成と検証を完了してください","onBindPasskeyTitle":"Passkeyはまだバインドされていません。バインド操作については管理者に連絡してください","createNow":"今すぐ作成","passkeyVerifyTitle":"パスキーログイン","passkeyVerifyTips":"アクセスのセキュリティを確保するため、ブラウザのプロンプトに従って検証を完了してください","reVerify":"再検証","inviteExpired":"現在の招待リンクは無効です。関連管理者に連絡して招待を再開してください。","pageExpired":"現在のページは期限切れですので、招待リンクをもう一度クリックしてください","inviteSuccess":"正常に参加しました。メールを確認してください。メール内の情報に基づいてログインを完了してください。"}'),nd=JSON.parse('{"inputAccount":"{{text}}をご入力ください","inputAdUsername":"AD ユーザー名を入力してください","inputAdPwd":"AD パスワードを入力してください","inputLdapUsername":"LDAP ユーザ名を入力してください","inputLdapPwd":"LDAP パスワードを入力してください","inputCaptchaCode":"図形認証コードを入力してください","captchaCode":"グラフィックス認証コード","accPwdLoginVerify":"アカウント登録検証","inputSixCode":"バインドされた 6 桁のセキュリティ コードを入力してください","inputLoginPwd":"パスワードをご入力ください","inputPhone":"携帯番号を入力してください","inputEmail":"メールアドレスをご入力ください","inputPwdAgain":"もう一度パスワードを入力する","loginBy":"{{name}}を使ってログインする","thridAccLogin":"第三者アカウントのログイン","inputRecoverCode":"復旧コードを入力してください","rememberedSecret":"鍵は安全に記録されています","mfaAfterReset":"復旧コードがない場合は管理者に連絡してください","noEmpty":"{{label}}が未入力です","inputCorrectPhone":"メールアドレス/携帯電話を正しくご入力ください","inputPhoneOrEmail":"携帯番号またはメールアドレスをご入力ください","resetPwd":"パスワードをリセット","selfUnlock":"セルフロック","selfUnlockText":"あなたのアカウントはロックされています。認証コードとパスワードを入力してセルフロックを解除してください。","pwdLogin":"既にアカウントをお持ち","bindPwdLogin":"アカウントログイン","appScanLogin":"モバイルアプリでコード登録","zjzwScanLogin":"浙江事務所","scanLogin":"コード登録","scanAgain":"コードを掃き直す","wechatScanLogin":"wechatのコードを使ってログインする","scanSuccess":"コード掃きに成功する","ldapLogin":"LDAP ログイン","adLogin":"AD 登録","authingOtpPushLogin":"プッシュ登録","authingOtpPushCancelLogin":"登録をキャンセルする","loginText":"登録","otpLoginPendingText":"AuthingトークンAPPにリクエストを送信しました。クライアントでログインを確認してください","getOtpLoginRequestAgain":"ログイン要求は無効になりましたので、再取得してください","downloadOtpVerifier":"ベリファイアのダウンロード","loginToMobileClient":"モバイル端末へのログイン","scanQrCode":"スキャン2次元コード","setAuthingTokenVerify":"AuthingトークンVerifyの設定","phoneScanCodeAndDownloadAuthingToken":"携帯電話でコードをスキャンするか、アプリケーション市場に行ってAuthingトークンをダウンロードしてください","noPrompt":"後でプロンプトしない","directLogin":"直接ログイン","openAuthingOtp":"Authingトークンを開き、「ログイン/登録」をクリックします","clickAndScanQrcode":"「ログインアプリケーション」ページの右上にあるスキャンコードの入り口をクリックし、下のQRコードをスキャンします","downloadIOS":"iOSダウンロード","downloadAndroid":"Androidダウンロード","howBindClient":"クライアントアプリケーションをバインドする方法","installAuthingToken":"Authingトークンのインストール","downloadAuthingToken":"携帯電話でコードをスキャンするか、アプリケーション市場に行ってAuthingトークンをダウンロードしてください","openAppList":"アプリケーションリストを開く","addApp":"「アプリケーションリスト」を開き、「アプリケーションの追加」をクリックします","openLoginPage":"ログインページを開く","scanQrcode":"「QRコードをスキャン」ボタンをクリックしてQRコードをスキャンして適用する","scanFollowingQrcode":"スキャン以下にQRコードを適用","relevanceApp":"アプリケーションを関連付けてアカウントにログインする","receiveMessageFromAuthingToken":"アプリケーションアカウントにログインすると、AuthingトークンでWebアプリケーションのプッシュを受信してログインを完了することができます","howUsePushLogin":"プッシュログインの使用方法","inputAccountInWeb":"Webログインパネルにアカウント情報を入力する","clickLoginButton":"「ログイン」をクリック","receiveMessageInApp":"バインドされたモバイル端末アプリケーションへのログインプッシュの受信","confirmLoginInApp":"「ログイン」を確認すると、Web側に正常にログインできます。","howGetAppLoginUrl":"アプリケーションログインアドレスを取得する方法","getCodeFromAdmin":"管理者から関連アプリケーションのQRコードを取得する","getCodeFromAdminTips":"管理者はアプリケーションログイン制御に二次元コードを適用することができ、二次元コードをスキャンすれば対応するアプリケーションにログインすることができる。","getCodeFromPersonalCenter":"パーソナルセンターからアプリケーションQRコードを取得する","getCodeFromPersonalCenterTips":"ユーザーは「パーソナルセンター-クイック認証」保存アプリケーションに二次元コードを登録し、Authingトークンを使用してコードをスキャンした後、アプリケーションを選択することでログインすることができます","getLoginUrlFromConsole":"管理者はコンソールからログインアドレスを取得する","getLoginUrlFromConsoleTips":"管理者は、コンソール-アプリケーション詳細-アプリケーション構成-認証構成で認証アドレスをコピーでき、ユーザーは認証アドレスをコピーするとログインとバインドできます。","nextStep":"次のステップ","enterAccount":"アカウントを入力してください","verifyCodeSended":"認証コードが送信され","inputEmailCode":"メールアドレス認証を入力してください","otherVerifyWay":"その他の検証方法","otherLoginWay":"その他の登録方法","clickSent":"認証コードの送信をクリックする","reSent":"認証コードの再送をクリックしてください","bindPhoneInfo":"携帯番号を入力して結びつけてください","bindWarning":"管理者に連絡して携帯番号をバインドしてください","inputPhoneCode":"携帯認証コードを入力してください","forgetPwd":"パスワードをお忘れの場合","inputPwd":"パスワードを入力してください","setPwdLimit1":"最低 6 ビットの文字パスワードを設定する","login":{"setPwdLimit2":"少なくとも6桁で、英数字と記号のうち2種類を含むこと","setPwdLimit3":"少なくとも6桁の英数字および記号を含むこと"},"setPwdLimitMsg1":"パスワードの長も 6桁で","setPwdLimitMsg2":"パスワードの長さは少なくとも 6桁で、英語、数字、記号のうち 2種類を含むこと","setPwdLimitMsg3":"パスワードの長も 6桁で、英文、数字および記号を同時に含むこと","wechatmpQrcode":"公衆番号フォロー登録","inputUsername":"ユーザー名を入力してください","moreWays":"もっとログインする","inputCorrectPhoneOrEmail":"有効な携帯番号またはメールアドレスをご入力ください","sendCodeTimeout":"送信に失敗した場合は後ほどお試しください","mediaDevicesSupport":"現在のデバイスは顔認識をサポートしていない","qrcodeNetWorkError":"ネットワーク異常クリック再試行","qrcodeRefer":"更新","noLoginMethodsDesc":"未構成登録方式","socialConnectionMessage":"{{provider}}を使用したログインはサポートされていません。他の方法でログインするか、他のブラウザで再試行してください。","inputNewPwd":"新しいパスワードをご入力ください","selectLoginAccount":"ログインアカウントを選択する","useOtherAccount":"別のアカウントを使う","tenant":{"consoleManage":"管理コンソール","ssoPad":"シングル サインオン アプリケーション パネル"},"AuthorizationCamera":"最初に認証を有効にしてください","checkPreferences":"設定を確認してください","requireError":"要求エラーを満たすことができません","hardwareSupport":"ハードウェアはサポートされていません","verifyCodeTip":"別の画像を表示","loginWithPasskey":"パスキーを使用してログインする","resetPassword":{"pleaseInputPassword":"パスワードを入力してください","checkPasswordDiff":"一貫したパスワードを入力してください","nextStep":"次のステップ","reset":"パスワードをリセット","back":"戻る","resetPasswordText1":"認証コードを受け取るために登録した携帯電話番号/メールボックスを入力してください。パスワードをリセットします。","resetPasswordText2":"あなたはリセットしています {{account}} のパスワード。","input":"インプット{{text}}","inputFourVerifyCode":"入力してください {{length}} ビット認証コード","inputNewPwd":"新しいパスワードを入力してください","confirmNewPwd":"新しいパスワードを確認してください","successTipMsg":"新しいパスワードを使用してログインを続けることができます","successTip":"パスワードのリセットに成功しました","backLogin":"秒ログインページが自動的にジャンプされます"},"wecomScanLogin":"エンタープライズ WeChat ログイン","passwordRuleTips":"パスワードには、以下を含める必要があります:","characterTypes":"Include at least {{x}} character types"}'),rd=JSON.parse('{"numberSafteyCode":"デジタルセキュリティコード","mfaBind":"MFA バインディング","nextStep":"次のステップ","inputCurrPwd":"現在のパスワードを入力してください","inputNewPwd":"新しいパスワードをご入力ください","inputOldPwd":"元のログインパスワードを入力してください","modifyPwd":"パスワードを変更する","modifyPwdTextDay":"あなたのパスワードは {{number}} 日以上使用されており、危険にさらされている可能性があります。パスワードをリセットしてください。","modifyPwdTextMonth":"あなたのパスワードは {{number}} か月間以上継続して使用されており、危険にさらされている可能性があります。パスワードをリセットしてください。","modifyPwdTextYear":"あなたのパスワードは {{number}} 年以上継続して使用されており、危険にさらされている可能性があります。パスワードをリセットしてください。","modifyNoticePwdTextDay":"あなたのパスワードは {{number}} 日以上継続して使用されており、有効期限が近づいています。使用に影響を与えないように、新しいパスワードを設定してください。","modifyNoticePwdTextMonth":"あなたのパスワードは {{number}} か月間以上継続して使用されており、有効期限が近づいています。使用に影響を与えないように、新しいパスワードを設定してください。","modifyNoticePwdTextYear":"あなたのパスワードは {{number}} 年以上継続して使用されており、有効期限が近づいています。使用に影響を与えないように、新しいパスワードを設定してください。","error":"エラーメッセージ","contactAdministrator":"不明なエラーです ~ 処理については管理者に連絡してください","resetpasswordText1":"登録の携帯番号/メールアドレスを入力し、認証コードを入力しください。パスワードのリセットをさせて頂きます。","unlockTip":"ロック解除に問題がある場合は、クリックしてください"}');// CONCATENATED MODULE: ./src/_utils/guardDocument.ts
|
|
22375
|
+
const Wu=JSON.parse('{"alreadyHasAcc":"already have an account,","bind":"Bind","yes":"Yes","no":"No","usernameFormatError":"Enter a valid user name","customNameFormatError":"Enter a valid account number","checkUserName":"The username already exists","checkCustomName":"The account already exists","pleaseSelectDate":"Please select date","bindEmail":"Bind Email","bindPhone":"Bind your phone number","confirm":"Confirm","unlock":"unlock","email":"Email","emailFormatError":"Enter a valid Email address ","emailLabel":"Email","female":"Female","guidance":{},"hasLooseSaftyCode":"Lost the security code?","inputFourVerifyCode":"{{length}}-digit code","login":"Sign In","man":"Male","noAccYet":"No account yet,","perfectUserInfo":"Personal Information","phoneFormateError":"Please verify your phone number first","phoneLabel":"Phone","phoneNumber":"Phone number","register":"Sign Up","registerImmediate":"Sign Up","retryAfterTime":"{{time}} seconds","sendVerifyCode":"Send Code","sure":"Confirm","uploadFail":"{{name}} failed to upload","useRecoverCode":"Use recovery code","username":"Username","problem":{"title":"Tell us your problem","noVerify":"Unable to receive the verification code","noLogin":"Unable to log in","noRegister":"Unable to register","noAccount":"Lost Account","noResetPass":"Unable to reset password","locked":"Account is locked","other":"Other","noVerifyTip":{"tip":"If you cannot receive the mobile phone verification code, I suggest you do the following:","type1":"1. Check if your mobile phone is turned off or offline.","type2":"2. Check if your phone number has been entered correctly.","type3":"3. Check if your SMS with the verification code is blocked."},"noLoginTip":{"type1":"1. Check if your username and password have been entered correctly.","type2":"2. Check if your mobile phone is turned off or offline."},"noRegisterTip":{"tip":"If you cannot register, please do the following steps to solve this issue:","type1":"1. Check if your account has been registered.","type2":"2. Check if your phone number has been entered correctly.","type3":"3. Check if your SMS with the verification code is blocked."},"noAccountTip":{"tip":"If your account is lost, please do the following steps to solve this issue:","type1":"1. Check if your username and password have been entered correctly.","type2":"2. Check if your mobile phone is turned off or offline."},"noResetPassTip":{"tip":"If your password cannot be reset, please do the following steps to solve this issue:","type1":"1. Check if your mobile phone is turned off or offline.","type2":"2. Check if your password has been entered correctly."},"otherTip":{},"successTip":"Submitted successfully","successTipMsg":"Your information has been submitted to the application administrator. Your feedback will be processed as soon as possible. Please wait patiently.","form":{"phone":"Contact","question":"Problem","questionDescript":"Problem description","questionClip":"Problem screenshot","submit":"Submit"},"noLoginTips":"If you cannot log in, we suggest you do the following:","lockedTips":"If your account is locked, please contact the administrator to unlock it and try to log in again"},"backLoginPage":"Back","LoginSuccess":"Login Success","welcomeDoc":"Welcome to {{name}}. Providing your personal information will allow us to give you the best online\\nexperience.","copied":"Copied","bindEmailDoc":"please enter the mailbox to bind","copy":"Copy","SMS":"SMS Verification","EmailVerification":"Email Verification","OTPVerification":"OTP Verification","faceVerification":"Face Verification","registrationSuccess":"Registration Success","repeatPasswordDoc":"The Two Passwords Entered are Inconsistent","copyFailed":"Copy Failed","downloadTotpAppAndroid":"Android download","downloadTotpAppDocs":"Please use your mobile phone to scan the code to download the verifier","downloadTotpAppIOS":"IOS download","bindTotp":"Bind OTP","checkEmail":"The email already exists","checkPhone":"The phone number already exists","loginFailCheck":"Reminder: Your password is wrong, you can try {{number}} times","otpText1":"Please go to the OTP binding page to bind","faceText1":"Bind facial recognition","faceText2":"Please turn on the camera to recognize the face for binding","faceText3":"Start","faceText4":"Try again","checkPasswordHasSpace":"No spaces","backToVerify":"Back","backToMFA":"Return to MFA binding","bindSuccess":"Complete binding","clickTodownload":"click to download","goToLogin":"Back","mfaText1":"Scan the code to add MFA, check it on your mobile phone and enter the 6-digit security code.","noQuestions":"no problem,","noValidator":"No validator please","pleaseRecordKey":"Please record the key","timeoutLDAP":"Request timed out, LDAP configuration error","totpText1":"Please keep the recovery code properly","totpText2":"If your MFA is lost, you will need a recovery code","usePhoneOpen":"Please open Google Authenticator or Microsoft Authenticator on your phone","passwordAgain":"Confirm password","isMissing":"{{name}} is missing","password":"Password","captchaCode":"Digit code","account":"Account","phone":"Phone number","pToLogin":"seconds later back","resetSuccess":"Reset successfully","resetSuccessMessage":"The password is reset successfully, you can continue to log in with the new password","welcome":"Welcome","initPasswordText":"To ensure account security, please set your new password.","unsafePasswordChangeText":"Your password does not meet the current password strength requirements. Please set a new password.","updatePsswordSuccess":"Change the password successfully, please log in again","fullCaptchaCode":"Please fill in the complete","feedback":"Need help ?","loginProtocolTips":"Please check the login protocol","registerProtocolTips":"Please check the registration agreement","accountLock":"The account is locked, please click the question mark below to give feedback","corsErrorMessage":"The current domain name is not in the list of allowed domain names","corsErrorMessage2":"If you have any questions, you can <a href=\\"https://docs.authing.cn/v2/guides/security/config-domain.html\\">refer to the document</a>","totpGenerateCode":"Generate a new recovery code for you, please record this key safely","verifyCodeLogin":"Verify Code","phoneVerifyCode":"Phone Code","emailVerifyCode":"Email Code","phoneCodeTab":"Phone Code","emailCodeTab":"Email Code","phoneOrEmail":"Phone Or Email","skip":"Skip","back":"Back","publicAccount":"Public account","identityBindingAskTitle":"Choose how to connect","identityBindingAskDesc":"If you are bound to an existing account, you can directly log in to the existing account by this method next time.","identityBindingCreate":"Create a new account","identityBindingBinding":"Bind to an existing account","identityBindingTitle":"Bind existing account","identityBindingDesc":"After binding, you can log in to this account directly by this method next time","identityBindingSkipAskTitle":"Account Binding","identityBindingSkipAskDesc":"Enter an exisiting account to bind, or enter a new account to sign up.","internationPhoneMessage":"Please enter a valid mobile phone number","areaCodePhone":"Area code Mobile number","timeoutAD":"Request timed out, AD misconfigured","timeout":"Request timed out, please try again later","userNameIsExists":"This username already exists!","fetchError":"Network connection failed, please try again later","i18nCheckErrorMessage":"Please enter a valid mobile phone number or correct email address","verifyCodeRegister":"Verify Code","PasswordRegister":"Password","EmailRegister":"Email","registerTab":"{{text}}","noFindEmail":"Can\'t find the email account","noFindPhone":"Can\'t find the phone account","noFindUsername":"Can\'t find the username account","jobNumber":"Account first letter must be capital","passwordUnsafeTip":"Password strength has been updated, please refresh the page and try again","loginWithWechatmpQrcodeTipsTitle":"Long press the QR code to login","del":"Delete","qrcode":"QR Code","registerCompletePasswordDesc":"To ensure account security, please set your password.","mfaCertification":"Multi-factor authentication","emailMfaCheck":"Please enter email verification code","SmsMfaCheck":"Please enter SMS verification code","faceCheck":"Please keep the camera turned on and unobstructed","resetAccount":{"title":"Set the user name","message":"The current user name is not unique, please reset the user name before you can successfully log on."},"noTenant":"There are currently no tenants who have joined","joinTenant":"Join Tenant","tenantExample":"Please enter the tenant identification code, for example: Ljrs18wa","enter":"enter","createTenant":"Create Tenant","pleaseInput":"Enter","tenantName":"Tenant Name","tenantEmail":"Tenant\'s corporate email domain name","tenantDesc":"Tenant Description","visitor":"guesting","createTenantDesc":"To create a new tenant, please click here","codeError":"Identification code error, please re-enter","emailVerify":"Verify Enterprise Email","verify":"test and verify","inputBusinessEmail":"Please enter your company email address","inputCode":"Please enter the verification code","domainNotFound":"The current organization administrator has not set up a corporate email domain name. Please contact the administrator to set it up and join the organization.","name":"name","applyJoin":"Apply to join","welcomeJoin":"Inviting you to join","inputCaptcha":"Please enter the authentication code","verifyAccount":"The identity verification code has been sent to {{0}}","captchaMaxErrorCount":"Verification code input error {{0}} times, the link will become invalid","pendingMsg":"You have completed the application to join 「{{0}}」.<br />Please wait for the administrator\'s approval before you receive the email. Please pay attention.","doneMsg":"Successfully applied to join, please check your email!","inviteExpire":"Verification failed, current link is no longer valid","inviteExpireMsg":"Please contact the inviter to resend the invitation email to you","sendSms":"Did not receive the email? Click to send SMS","sendEmail":"Did not receive the text message? Click to send email","invitation":{"completeInfo":"Please complete the information","completeInfoDesc":"Please complete the information below. If the information is not mandatory, you can click「Next」to skip it directly"},"cratePasskeyTitle":"Create Passkey","cratePasskeyTips":"The current account does not have a passkey, please complete the creation and verification before logging in","onBindPasskeyTitle":"Passkey has not been bound yet. Please contact the administrator for binding operation","createNow":"Create now","passkeyVerifyTitle":"Passkey verify","passkeyVerifyTips":"To ensure access security, please complete verification according to the browser prompts","reVerify":"reverify","inviteExpired":"The current invitation link has expired. Please contact the relevant administrator to resend the invitation for you.","pageExpired":"The current page has expired. Please click the invitation link again to enter","inviteSuccess":"Successfully joined, please check your email. Please complete the login based on the information in the email."}'),Gu=JSON.parse('{"inputAccount":"Enter {{text}}","inputAdUsername":"Enter AD username","accPwdLoginVerify":"Account login verification","captchaCode":"Captcha","inputAdPwd":"Enter AD password","inputCaptchaCode":"Digit code","inputCorrectPhone":"Enter correct phone number or email address","inputEmail":"Enter Email","inputLdapPwd":"LDAP Password","inputLdapUsername":"LDAP Username","inputLoginPwd":"Enter Password","inputPhone":"Phone number","inputPhoneOrEmail":"Enter Phone number or Email","inputPwdAgain":"Enter password again","inputRecoverCode":"Enter recovery code","inputSixCode":"Enter 6-digit security code","loginBy":"Sign in with {{name}}","mfaAfterReset":"If you do not have a recovery code, please contact the administrator","noEmpty":"Please enter a {{label}}","rememberedSecret":"This key has been safely recorded","resetPwd":"Reset password","selfUnlock":"self unlock","selfUnlockText":"Your account has been locked, please enter the verification code and password to unlock it by yourself.","thridAccLogin":"Or sign in with","pwdLogin":"Password","bindPwdLogin":"Password","appScanLogin":"Mobile APP QR Code","zjzwScanLogin":"Zhejiang Office QR Code","scanLogin":"QR Code","ldapLogin":"LDAP","adLogin":"AD","authingOtpPushLogin":"Login by push","authingOtpPushCancelLogin":"Cancel login","loginText":"Login","otpLoginPendingText":"The request has been sent to the Authoring Token APP. Please confirm login at the client","getOtpLoginRequestAgain":"The login request is invalid. Please send request again","downloadOtpVerifier":"Download Authing OTP","loginToMobileClient":"Login Authing OTP","scanQrCode":"Scan QR code","setAuthingTokenVerify":"Set Authing OTP Verify","phoneScanCodeAndDownloadAuthingToken":"Please scan the code with your mobile phone or go to the app market to download the Authing OTP","noPrompt":"Don\'t prompt again","directLogin":"Direct login","openAuthingOtp":"Open the Authing OTP and click \\"Login / Register\\"","clickAndScanQrcode":"Click the scanning entry at the upper right corner of the \\"Login Application\\" page to scan the QR code below","downloadIOS":"IOS download","downloadAndroid":"Android download","howBindClient":"How to bind client applications","installAuthingToken":"Install the Authing Token App","downloadAuthingToken":"Please use your mobile phone to scan the code or go to the application market to download the Authoring token","openAppList":"Open app list","addApp":"Open the \\"Application List\\" and click \\"Add Application\\"","openLoginPage":"Open the login page","scanQrcode":"Click the \\"Scan QR code\\" button to scan the application QR code","scanFollowingQrcode":"Scan the following application QR code","relevanceApp":"Associate the application and log in to the account","receiveMessageFromAuthingToken":"After logging in to the application account, you can complete the login by receiving the Web application push in the Authing token","howUsePushLogin":"How to use push login","inputAccountInWeb":"Enter account information in the web login panel","clickLoginButton":"Click \\"Login\\"","receiveMessageInApp":"Receive login push on the bound mobile application","confirmLoginInApp":"Confirm \\"Login\\" to successfully log in to the web side.","howGetAppLoginUrl":"How to get the application login address","getCodeFromAdmin":"Get the associated application QR code from the administrator","getCodeFromAdminTips":"The administrator can get the application QR code in the application login control, and scan the QR code to log in to the corresponding application.","getCodeFromPersonalCenter":"Get application QR code from personal center","getCodeFromPersonalCenterTips":"Users can save the application login QR code in \\"Personal Center - Quick Authentication\\", and use the Authoring token to scan the code and select the application to log in","getLoginUrlFromConsole":"The administrator obtains the login address from the console","getLoginUrlFromConsoleTips":"Administrators can copy the authentication address in \\"Console - Application Details - Application Configuration - Authentication Configuration\\". Users can log in and bind after copying the authentication address.","nextStep":"Next Step","enterAccount":"Please enter the account","inputEmailCode":"Enter email verification code","otherVerifyWay":"Other verification methods","otherLoginWay":"OR","verifyCodeSended":"Verification code has been sent to","clickSent":"Click send","reSent":"Click to resend the verification code","bindPhoneInfo":"Please enter the phone number to bind","bindWarning":"Please contact the administrator to bind your phone number for you","inputPhoneCode":"Please enter the phone verification code","forgetPwd":"Forgot Password","inputPwd":"Password","login":{"setPwdLimit2":"At least six digits, must contain two of English, numbers and symbols","setPwdLimit3":"At least six digits, including English, numbers and symbols"},"setPwdLimit1":"Set a password of at least 6 characters","setPwdLimitMsg1":"Passwords must be at least 6 characters long","setPwdLimitMsg2":"The password must be at least 6 characters long and must contain two of English, numbers and symbols","setPwdLimitMsg3":"The password must be at least 6 digits long and must contain English, numbers and symbols at the same time","wechatmpQrcode":"WechatMp QRcode\\t","inputUsername":"Username","moreWays":"More Login","inputCorrectPhoneOrEmail":"Enter a valid Email or Phone number","sendCodeTimeout":"Sending failed, please try later","mediaDevicesSupport":"The current device does not support face recognition","noLoginMethodsDesc":"No login method configured","inputNewPwd":"Please enter a new password","socialConnectionMessage":"Login with {{provider}} is not supported, please choose another way to log in, or try again in another browser","selectLoginAccount":"Select login account","useOtherAccount":"Use another account","wechatScanLogin":"WeChat QR Code","qrcodeRefer":"Refresh","qrcodeNetWorkError":"Retry","scanAgain":"Scan the code again","scanSuccess":"Scan Success","tenant":{"consoleManage":"Admin console","ssoPad":"Single sign-on application panel"},"AuthorizationCamera":"Please enable authorization first","checkPreferences":"Please check preferences","requireError":"Unable to satisfy request error","hardwareSupport":"Hardware not supported","verifyCodeTip":"Try another","loginWithPasskey":"Sign in with Passkey","resetPassword":{"pleaseInputPassword":"Please input a password","checkPasswordDiff":"Please enter a consistent password","nextStep":"Next","reset":"reset password","back":"Back","resetPasswordText1":"Please enter your registered mobile phone number/email to receive the verification code, and we will reset your password.","resetPasswordText2":"You are resetting Password for {{account}}。","input":"Input{{text}}","inputFourVerifyCode":"{{length}}-digit code","inputNewPwd":"Please enter a new password","confirmNewPwd":"Please confirm the new password","successTipMsg":"You can continue to log in with your new password","successTip":"Password reset succeeded","backLogin":"Seconds will automatically jump to the login page"},"wecomScanLogin":"Enterprise WeChat scan code to log in"}'),Ku=JSON.parse('{"inputCurrPwd":"Enter current password","inputNewPwd":"Enter a new Password","inputOldPwd":"Enter a old Password","mfaBind":"MFA Binding","modifyPwd":"Change Password","nextStep":"Next","numberSafteyCode":"Digital Security Code","error":"Error~","contactAdministrator":"Unknown error ~ please contact the administrator for processing","resetpasswordText1":"Enter your registered phone number/email, enter the verification code received, and we will reset your password.","modifyPwdTextDay":"Your password has been used for more than {{number}} days and may be at risk. Please reset your password.","modifyPwdTextMonth":"Your password has been used continuously for more than {{number}} months and may be at risk. Please reset your password.","modifyPwdTextYear":"Your password has been used continuously for more than {{number}} years and may be at risk. Please reset your password.","modifyNoticePwdTextDay":"Your password has been used continuously for more than {{number}} days and is about to expire. In order not to affect your use, please set a new password","modifyNoticePwdTextMonth":"Your password has been used continuously for more than {{number}} months and is about to expire. In order not to affect your use, please set a new password","modifyNoticePwdTextYear":"Your password has been used continuously for more than {{number}} years and is about to expire. In order not to affect your use, please set a new password","unlockTip":"If you encounter problems with unlocking, please click"}'),Yu=JSON.parse('{"guidance":{},"uploadFail":"{{name}} 上传失败","confirm":"确认","retryAfterTime":"{{time}} 秒","sendVerifyCode":"发送验证码","emailFormatError":"输入有效的邮箱","usernameFormatError":"输入有效的用户名","customNameFormatError":"输入有效的账号","phoneFormateError":"输入有效的手机号","username":"用户名","login":"登录","noAccYet":"还没有账号,","registerImmediate":"立即注册","sure":"确定","hasLooseSaftyCode":"安全码丢失?","useRecoverCode":"使用恢复代码","register":"注册","unlock":"解锁","alreadyHasAcc":"已有账号,","perfectUserInfo":"完善用户信息","man":"男","female":"女","emailLabel":"邮箱","phoneLabel":"手机号","pleaseSelectDate":"请选择日期","bindEmail":"绑定邮箱","email":"邮箱","inputFourVerifyCode":"请输入 {{length}} 位验证码","bindPhone":"绑定手机号","phoneNumber":"手机号","bind":"绑定","yes":"是","no":"否","problem":{"title":"问题反馈","noVerify":"无法收到验证码","noLogin":"无法登录","noRegister":"无法注册","noAccount":"帐号丢失","noResetPass":"无法重置密码","locked":"账号被锁定","other":"其他","noVerifyTip":{"tip":"如果无法收到手机验证码,建议你进行以下操作:","type1":"1. 检查你的手机是否停机/无网络","type2":"2. 检查你的手机号是否输入正确","type3":"3. 检查你的验证码短信是否被屏蔽"},"noLoginTip":{"type1":"1. 检查你的用户名与密码输入是否正确","type2":"2. 检查你的手机是否停机/无网络"},"noRegisterTip":{"tip":"如果无法注册,建议你进行以下操作:","type1":"1. 检查你的帐号是否已注册","type2":"2. 检查你的注册手机号是否输入正确","type3":"3. 检查你的验证码短信是否被屏蔽"},"noAccountTip":{"tip":"如果帐号丢失,建议你进行以下操作:","type1":"1. 检查你的用户名与密码输入是否正确","type2":"2. 检查你的手机是否停机/无网络"},"noResetPassTip":{"tip":"如果无法重置密码,建议你进行以下操作:","type1":"1. 检查你的手机是否停机/无网络","type2":"2. 检查你的设置的密码是否正确"},"otherTip":{},"successTip":"提交成功","successTipMsg":"你的信息已经提交给应用管理员,会尽快处理你的反馈,请你耐心等待。","form":{"phone":"联系方式","question":"相关问题","questionDescript":"问题描述","questionClip":"问题截图","submit":"提交"},"lockedTips":"如果你的账号被锁定,请联系管理员解锁后再尝试登录","noLoginTips":"如果无法登录,建议你进行以下操作:"},"backLoginPage":"返回登录","LoginSuccess":"登录成功","welcomeDoc":"欢迎加入 {{name}} ,为了更好的使用体验,请先完善你的个人信息","bindEmailDoc":"请输入邮箱进行绑定","copied":"已复制","copy":"复制","repeatPasswordDoc":"两次密码输入不一致","SMS":"短信验证码验证","EmailVerification":"电子邮箱验证","OTPVerification":"OTP 口令验证","faceVerification":"人脸识别验证","registrationSuccess":"注册成功","copyFailed":"复制失败","downloadTotpAppIOS":"IOS 下载","downloadTotpAppAndroid":"Android 下载","downloadTotpAppDocs":"请使用手机扫码下载验证器","bindTotp":"绑定 OTP","checkEmail":"该邮箱已存在","checkUserName":"该用户名已存在","checkCustomName":"该账号已存在","checkPhone":"该手机号已存在","loginFailCheck":"温馨提示:你的密码错误,还可以尝试 {{number}} 次","bindSuccess":"完成绑定","pleaseRecordKey":"请记录密钥","totpText1":"请妥善保存恢复代码","totpText2":"如果你的 MFA 丢失时,你将需要一个恢复代码","otpText1":"请前往 OTP 绑定页面进行绑定","faceText1":"绑定人脸识别","faceText2":"请打开摄像头识别人脸进行绑定","faceText3":"开始验证","faceText4":"重试一次","publicAccount":"公共账号","checkPasswordHasSpace":"不能包含空格","backToVerify":"返回验证页","usePhoneOpen":"请在手机打开 Google Authenticator 或 Microsoft Authenticator","noValidator":"没有验证器请","clickTodownload":"点击下载","mfaText1":"扫码添加 OTP,在手机查看并输入 6 位数字安全码。","backToMFA":"返回 MFA 绑定","timeoutLDAP":"请求超时,LDAP 配置错误","noQuestions":"没有问题,","goToLogin":"直接登录","passwordAgain":"请确认密码","isMissing":"{{name}}未填写","password":"密码","captchaCode":"验证码","account":"账号","phone":"手机号","pToLogin":"秒后返回登录","resetSuccess":"重置成功","resetSuccessMessage":"密码重置成功,你可以使用新密码继续登录","welcome":"欢迎访问","initPasswordText":"为了保障账号安全,请设置你的新密码。","unsafePasswordChangeText":"你的密码不符合当前密码强度要求,请设置新密码。","updatePsswordSuccess":"修改密码成功,请重新登录","fullCaptchaCode":"请填写完整的{{name}}","feedback":"问题反馈","loginProtocolTips":"请勾选登录协议","registerProtocolTips":"请勾选注册协议","accountLock":"账号被锁定,请点击下方问号进行反馈","corsErrorMessage":"当前域名不在允许访问的域名列表中。","corsErrorMessage2":"如果有疑问可以<a href=\\"https://docs.authing.cn/v2/guides/security/config-domain.html\\">参考文档</a>","totpGenerateCode":"为你生成一串新的恢复代码,请安全地记录这段密钥","verifyCodeLogin":"验证码登录","phoneCodeTab":"手机号登录","emailCodeTab":"邮箱登录","phoneVerifyCode":"短信验证码","emailVerifyCode":"邮箱验证码","phoneOrEmail":"手机号或邮箱","skip":"跳过","back":"返回","identityBindingAskTitle":"选择关联方式","identityBindingAskDesc":"如果绑定到已有账号,下次可以通过本次的方式直接登录已有账号","identityBindingCreate":"我想创建一个新账号","identityBindingBinding":"我想绑定到已有账号","identityBindingTitle":"绑定已有账号","identityBindingDesc":"绑定后,下次可以直接通过这次的方式登录到此账号","identityBindingSkipAskTitle":"账号绑定","identityBindingSkipAskDesc":"若存在已有账号,输入成功后将会完成绑定;若输入新账号则会完成创建和绑定","internationPhoneMessage":"请输入所在区号合法的手机号","areaCodePhone":"+区号 手机号","timeoutAD":"请求超时,AD 配置错误","timeout":"请求超时,请稍后重试","userNameIsExists":"该用户名已存在!","fetchError":"网络连接失败,请稍后再试","passwordUnsafeTip":"密码强度已更新,请刷新页面后重试","i18nCheckErrorMessage":"请输入所在区号合法的手机号或正确的邮箱","verifyCodeRegister":"验证码注册","PasswordRegister":"密码注册","EmailRegister":"邮箱注册","registerTab":"{{text}}注册","noFindEmail":"找不到该邮箱账号","noFindPhone":"找不到该手机账号","noFindUsername":"找不到该用户名账号","jobNumber":"工号首字母大写","loginWithWechatmpQrcodeTipsTitle":"长按二维码登录","del":"移除","qrcode":"二维码","registerCompletePasswordDesc":"为了保障账号安全,请设置你的密码。","mfaCertification":"多因素认证","emailMfaCheck":"请输入电子邮箱验证码","SmsMfaCheck":"请输入短信验证码","faceCheck":"请保持摄像头已打开并无遮挡","resetAccount":{"title":"设置用户名","message":"当前用户名不是唯一的,请重新设置用户名后才可以成功登录。"},"noTenant":"暂无已加入的租户","joinTenant":"加入租户","tenantExample":"请输入租户识别码,例如:Ljrs18wa","enter":"进入","createTenant":"创建租户","pleaseInput":"请输入","tenantName":"租户名称","tenantEmail":"租户企业邮箱域名","tenantDesc":"租户描述","visitor":"访客模式","createTenantDesc":"如需创建新租户,请点击此处","codeError":"识别码错误,请重新输入","emailVerify":"验证企业邮箱","verify":"验证","inputBusinessEmail":"请输入企业邮箱","inputCode":"请输入验证码","domainNotFound":"当前组织管理员未设置企业邮箱域名,请联系管理员设置后加入组织。","name":"姓名","applyJoin":"申请加入","welcomeJoin":"邀请你加入","inputCaptcha":"请输入身份验证码","verifyAccount":"身份验证码已发送至 {{0}}","captchaMaxErrorCount":"验证码输入错误 {{0}} 次,链接将会失效","pendingMsg":"你已完成加入「{{0}}」的申请。<br />请等待管理员审批通过后,你将收到邮件,敬请留意。","doneMsg":"申请加入成功,敬请查收邮件!","inviteExpire":"验证失败,当前链接已失效","inviteExpireMsg":"请联系邀请人为您重新发送邀请邮件","sendSms":"未收到邮件?点击发送短信","sendEmail":"未收到短信?点击发送邮件","invitation":{"completeInfo":"请补全信息","completeInfoDesc":"请补全下方信息,信息为非必填的情况下, 可点击「下一步」直接跳过"},"cratePasskeyTitle":"创建 Passkey","cratePasskeyTips":"当前账号暂无 passkey,请先完成创建验证后登录","onBindPasskeyTitle":"暂未绑定 Passkey,请联系管理员进行绑定操作","createNow":"立即创建","passkeyVerifyTitle":"Passkey 验证","passkeyVerifyTips":"为了保障访问安全,请根据浏览器提示完成验证","reVerify":"重新验证","inviteExpired":"当前邀请链接已失效,请联系相关管理员为你重新发起邀请。","pageExpired":"当前页面已过期,请重新点击邀请链接进入","inviteSuccess":"已成功加入,敬请查收邮件。请根据邮件内的信息完成登录。"}'),Ju=JSON.parse('{"inputAccount":"请输入{{text}}","inputAdUsername":"请输入 AD 用户名","inputAdPwd":"请输入 AD 密码","inputLdapUsername":"请输入 LDAP 用户名","inputLdapPwd":"请输入 LDAP 密码","inputCaptchaCode":"请输入图形验证码","captchaCode":"图形验证码","accPwdLoginVerify":"账号登录验证","inputSixCode":"请输入绑定的 6 位数字安全码","inputLoginPwd":"请输入登录密码","inputPhone":"请输入手机号","inputEmail":"请输入邮箱","inputPwdAgain":"再输入一次密码","loginBy":"使用 {{name}} 登录","thridAccLogin":"第三方账号登录","inputRecoverCode":"请输入恢复代码","rememberedSecret":"已经安全地记录了这段密钥","mfaAfterReset":"如果你没有恢复代码,请联系管理员处理","noEmpty":"{{label}} 不能为空","inputCorrectPhone":"请输入正确的手机号或邮箱","inputPhoneOrEmail":"请输入手机号或邮箱","resetPwd":"重置密码","selfUnlock":"自助解锁","selfUnlockText":"你的账号已被锁定,请输入验证码及密码自助解锁。","pwdLogin":"密码登录","bindPwdLogin":"密码登录","appScanLogin":"移动端 APP 扫码登录","zjzwScanLogin":"浙里办扫码登录","scanLogin":"扫码登录","scanAgain":"重新扫码","wechatScanLogin":"使用微信扫码登录","scanSuccess":"扫码成功","ldapLogin":"LDAP 登录","adLogin":"AD 登录","loginText":"登录","authingOtpPushLogin":"推送登录","authingOtpPushCancelLogin":"取消登录","otpLoginPendingText":"已发送请求到 Authing 令牌 APP,请在客户端确认登录","getOtpLoginRequestAgain":"登录请求已失效,请重新获取","downloadOtpVerifier":"下载验证器","loginToMobileClient":"登录移动端","scanQrCode":"扫描二维码","setAuthingTokenVerify":"设置 Authing 令牌 Verify","phoneScanCodeAndDownloadAuthingToken":"请用手机扫码或前往应用市场下载 Authing 令牌","noPrompt":"以后不再提示","directLogin":"直接登录","openAuthingOtp":"打开 Authing 令牌,点击“登录/注册”","clickAndScanQrcode":"点击“登录应用”页面右上角的扫码入口,扫描下方二维码","downloadIOS":"iOS下载","downloadAndroid":"安卓下载","howBindClient":"如何绑定客户端应用","installAuthingToken":"安装 Authing 令牌","downloadAuthingToken":"请使用手机扫码或前往应用市场下载 Authing 令牌","openAppList":"打开应用列表","addApp":"打开\\"应用列表\\",点击\\"添加应用\\"","openLoginPage":"打开登录页","scanQrcode":"点击\\"扫描二维码\\"按钮扫描应用二维码","scanFollowingQrcode":"扫描以下应用二维码","relevanceApp":"关联应用并登录账号","receiveMessageFromAuthingToken":"登录应用账号后即可在 Authing 令牌接收 Web 应用推送完成登录","howUsePushLogin":"如何使用推送登录","inputAccountInWeb":"在 Web 端登录面板输入账号信息","clickLoginButton":"点击\\"登录\\"","receiveMessageInApp":"在已绑定的移动端应用上接收登录推送","confirmLoginInApp":"确认“登录”,即可成功登录 Web 端。","howGetAppLoginUrl":"如何获取应用登录地址","getCodeFromAdmin":"从管理员处获取关联应用二维码","getCodeFromAdminTips":"管理员可在应用登录控制中得到应用二维码,扫描二维码即可登录对应应用。","getCodeFromPersonalCenter":"从个人中心获取应用二维码","getCodeFromPersonalCenterTips":"用户可在\\"个人中心 - 快速认证\\"保存应用登录二维码,使用 Authing 令牌扫码后选择应用即可登录。","getLoginUrlFromConsole":"管理员从控制台取得登录地址","getLoginUrlFromConsoleTips":"管理员可在「控制台 - 应用详情 - 应用配置 - 认证配置」复制认证地址,用户复制认证地址后即可登录和绑定。","nextStep":"下一步","enterAccount":"请输入账号","verifyCodeSended":"验证码已发送至","inputEmailCode":"请输入邮箱验证码","otherVerifyWay":"其他验证方式","otherLoginWay":"其他登录方式","clickSent":"点击发送验证码","reSent":"点击重发验证码","bindPhoneInfo":"请输入手机号进行绑定","bindWarning":"请联系管理员为你绑定手机号","inputPhoneCode":"请输入手机验证码","forgetPwd":"忘记密码","inputPwd":"请输入密码","setPwdLimit1":"设置至少 6 位字符密码","login":{"setPwdLimit2":"至少六位,需包含英文、数字与符号中的两种","setPwdLimit3":"至少六位,需包含英文、数字与符号"},"setPwdLimitMsg1":"密码长度至少为 6 位","setPwdLimitMsg2":"密码长度至少为 6 位,且要包含英文、数字与符号中的两种","setPwdLimitMsg3":"密码长度至少为 6 位,且要同时包含英文、数字与符号","wechatmpQrcode":"公众号关注登录","inputUsername":"请输入用户名","moreWays":"更多登录","inputCorrectPhoneOrEmail":"请输入有效的手机号或邮箱","sendCodeTimeout":"发送失败,请稍后尝试","mediaDevicesSupport":"当前设备暂不支持人脸识别","qrcodeNetWorkError":"网络异常 点击重试","qrcodeRefer":"刷新","noLoginMethodsDesc":"未配置登录方式","socialConnectionMessage":"不支持使用{{provider}}登录,请选择其他方式登录,或在其它浏览器中重试","inputNewPwd":"请输入新密码","selectLoginAccount":"选择登录账号","useOtherAccount":"使用其他账号","tenant":{"consoleManage":"管理员控制台","ssoPad":"单点登录应用面板"},"AuthorizationCamera":"请先开启授权","checkPreferences":"请检查偏好设置","requireError":"无法满足要求错误","hardwareSupport":"硬件不支持","verifyCodeTip":"看不清?换一张","loginWithPasskey":"使用 Passkey 登录","resetPassword":{"pleaseInputPassword":"请输入密码","checkPasswordDiff":"请输入一致的密码","nextStep":"下一步","reset":"重置密码","back":"返回","resetPasswordText1":"请输入你注册的手机号/邮箱用于接收验证码,我们将为你重置密码。","resetPasswordText2":"你正在重置 {{account}} 的密码。","input":"输入{{text}}","inputFourVerifyCode":"请输入 {{length}} 位验证码","inputNewPwd":"请输入新密码","confirmNewPwd":"请确认新密码","successTipMsg":"你可以使用新密码继续登录","successTip":"密码重置成功","backLogin":"秒后将自动跳转登录页"},"wecomScanLogin":"企业微信扫码登录"}'),Zu=JSON.parse('{"numberSafteyCode":"数字安全码","mfaBind":"MFA 绑定","nextStep":"下一步","inputCurrPwd":"请输入当前密码","inputNewPwd":"请输入新密码","inputOldPwd":"请输入原登录密码","modifyPwd":"修改密码","modifyPwdTextDay":"你的密码连续使用超过 {{number}} 天,可能存在风险。请重新设置密码。","modifyPwdTextMonth":"你的密码连续使用超过 {{number}} 个月,可能存在风险。请重新设置密码。","modifyPwdTextYear":"你的密码连续使用超过 {{number}} 年,可能存在风险。请重新设置密码。","modifyNoticePwdTextDay":"你的密码连续使用超过 {{number}} 天,即将过期,为了不影响你的使用,请设置新密码","modifyNoticePwdTextMonth":"你的密码连续使用超过 {{number}} 个月,即将过期,为了不影响你的使用,请设置新密码","modifyNoticePwdTextYear":"你的密码连续使用超过 {{number}} 年,即将过期,为了不影响你的使用,请设置新密码","error":"错误信息","contactAdministrator":"未知的错误~ 请你联系管理员进行处理","resetpasswordText1":"输入你的注册电话/邮箱,输入收到的验证码,我们将为你进行密码重置。","unlockTip":"若解锁遇到问题,请点"}'),Qu=JSON.parse('{"EmailVerification":"電子郵件驗證","LoginSuccess":"登入成功","OTPVerification":"OTP 口令驗證","PasswordRegister":"密碼註冊","EmailRegister":"電子郵件註冊","registerTab":"{{text}}註冊","SMS":"短信驗證碼驗證","account":"賬號","accountLock":"賬號被鎖定,請點擊下方問號進行反饋","alreadyHasAcc":"已有賬號,","areaCodePhone":"區號 手機號碼","back":"返回","backLoginPage":"返回登入","backToMFA":"返回 MFA 綁定","backToVerify":"返回驗證頁","bind":"綁定","bindEmail":"綁定電子郵件","bindEmailDoc":"請輸入電子郵件進行綁定","bindPhone":"綁定手機號碼","bindSuccess":"完成綁定","bindTotp":"綁定 OTP","captchaCode":"驗證碼","checkEmail":"該電子郵件已存在","checkPasswordHasSpace":"不能包含空格","checkPhone":"該手機號碼已存在","checkUserName":"該用戶名已存在","checkCustomName":"該帳號已存在","clickTodownload":"點擊下載","confirm":"確認","copied":"已復制","copy":"複製","copyFailed":"複製失敗","corsErrorMessage":"當前域名不在允許訪問的域名列表中。","corsErrorMessage2":"如果有疑問可以<a href=\\"https://docs.authing.cn/v2/guides/security/config-domain.html\\">參考文檔</a>","downloadTotpAppAndroid":"Android 下載","downloadTotpAppDocs":"請使用手機掃碼下載驗證器","downloadTotpAppIOS":"IOS 下載","email":"電子郵件","emailFormatError":"請輸入有效的電子郵件","emailLabel":"電子郵件","emailVerifyCode":"電子郵件驗證碼","faceText1":"綁定人臉識別","faceText2":"請打開攝像頭識別人臉進行綁定","faceText3":"開始驗證","faceText4":"重試一次","faceVerification":"人臉識別驗證","feedback":"幫助中心","female":"女","fetchError":"網路連接失敗,請稍後再試","fullCaptchaCode":"請填寫完整的{{name}}","goToLogin":"直接登入","hasLooseSaftyCode":"安全碼丟失?","i18nCheckErrorMessage":"請輸入所在區號合法的手機號或正確的郵箱","identityBindingAskDesc":"如果綁定到已有賬號,下次可以通過本次的方式直接登入已有賬號","identityBindingAskTitle":"選擇關聯方式","identityBindingBinding":"我想綁定到已有賬號","identityBindingCreate":"我想創建一個新賬號","identityBindingDesc":"綁定後,下次可以直接通過這次的方式登入到此賬號","identityBindingTitle":"綁定已有賬號","identityBindingSkipAskTitle":"帳號綁定","identityBindingSkipAskDesc":"若存在已有帳號,輸入成功後將會完成綁定; 若輸入新帳號則會完成創建和綁定","initPasswordText":"為了保障賬號安全,請設置您的新密碼。","inputFourVerifyCode":"請輸入 {{length}} 位數驗證碼","internationPhoneMessage":"請輸入所在區號合法的手機號碼","isMissing":"{{name}}未填寫","jobNumber":"工號首字母大寫","login":"登入","loginFailCheck":"溫馨提示:您的密碼錯誤,還可以嘗試 {{number}} 次","loginProtocolTips":"請勾選登入協議","man":"男","mfaText1":"掃碼添加 OTP,在手機查看並輸入 6 位數字安全碼。","no":"否","noAccYet":"還沒有賬號,","noFindEmail":"找不到該電子郵件","noFindPhone":"找不到該手機賬號","noFindUsername":"找不到該用戶名賬號","noQuestions":"沒有問題,","noValidator":"沒有驗證器請","otpText1":"請前往 OTP 綁定頁面進行綁定","pToLogin":"秒後返回","password":"密碼","passwordAgain":"請確認密碼","publicAccount":"公共帳戶","passwordUnsafeTip":"密碼強度已更新,請刷新頁面後重試","perfectUserInfo":"個人資訊","phone":"手機號碼","phoneFormateError":"輸入有效的手機號碼","phoneLabel":"手機號碼","phoneNumber":"手機號碼","phoneOrEmail":"手機號碼或電子郵件","phoneVerifyCode":"短信驗證碼","pleaseRecordKey":"請記錄密鑰","pleaseSelectDate":"請選擇日期","problem":{"form":{"phone":"聯絡方式","question":"相關問題","questionClip":"截圖","questionDescript":"問題描述","submit":"提交"},"locked":"帳號被鎖住","lockedTips":"如果您的帳號被鎖定,請聯繫管理員解鎖後再嘗試登入","noAccount":"帳號遺失","noAccountTip":{"tip":"如果帳號丟失,建議您進行以下操作:","type1":"1. 檢查您的帳號與密碼是否正確輸入","type2":"2. 檢查您的手機服務是否停用 / 沒有網路"},"noLogin":"無法登入","noLoginTip":{"type1":"1. 檢查您的帳號與密碼是否正確輸入","type2":"2. 檢查您的手機服務是否停用 / 沒有網路"},"noLoginTips":"如果無法登入,建議您進行以下操作:","noRegister":"無法註冊","noRegisterTip":{"tip":"如果無法註冊,建議您進行以下操作:","type1":"1. 檢查您的帳號是否已註冊","type2":"2. 檢查您的註冊手機號碼是否正確輸入","type3":"3. 檢查您的驗證碼簡訊是否被阻擋"},"noResetPass":"無法重設密碼","noResetPassTip":{"tip":"如果無法重設密碼,建議您進行以下操作:","type1":"1. 檢查您的手機服務是否停用 / 沒有網路","type2":"2. 檢查您設定的密碼是否正確"},"noVerify":"無法收到驗證碼","noVerifyTip":{"tip":"如果無法收到手機驗證碼,建議您進行以下操作:","type1":"1. 檢查您的手機服務是否停用 / 沒有網路","type2":"2. 檢查您的手機號碼是否輸入正確","type3":"3. 檢查您的驗證碼簡訊是否被阻擋"},"other":"其他","successTip":"提交成功","successTipMsg":"您的信息已經提交給應用管理員,會盡快處理您的反饋,請您耐心等待。","title":"問題回報"},"register":"註冊","registerImmediate":"立即註冊","registerProtocolTips":"請勾選註冊協議","registrationSuccess":"註冊成功","repeatPasswordDoc":"兩次密碼輸入不一致","resetSuccess":"重設密碼","resetSuccessMessage":"密碼重設成功,請使用新密碼登入","retryAfterTime":"{{time}} 秒","sendVerifyCode":"發送驗證碼","skip":"跳過","sure":"確定","timeout":"請求超時,請稍後重試","timeoutAD":"請求超時,AD 配置錯誤","timeoutLDAP":"請求超時,LDAP 配置錯誤","totpGenerateCode":"為您生成一串新的恢復代碼,請安全地記錄這段密鑰","totpText1":"請妥善保存恢復代碼","totpText2":"如果您的 MFA 丟失時,您將需要一個恢復代碼","unlock":"解鎖","unsafePasswordChangeText":"您的密碼不符合當前密碼強度要求,請設置新密碼。","updatePsswordSuccess":"修改密碼成功,請重新登入","uploadFail":"{{name}} 上傳失敗","usePhoneOpen":"請在手機打開 Google Authenticator 或 Microsoft Authenticator","useRecoverCode":"使用恢復代碼","userNameIsExists":"該用戶名已存在!","username":"用戶名","usernameFormatError":"輸入有效的用戶名","customNameFormatError":"輸入有效的帳號","verifyCodeLogin":"驗證碼登入","phoneCodeTab":"手機號登錄","emailCodeTab":"郵箱登錄","verifyCodeRegister":"驗證碼註冊","welcome":"歡迎訪問","welcomeDoc":"歡迎加入 {{name}} ,為了提供最佳的線上體驗,請填寫您的個人資訊","yes":"是","loginWithWechatmpQrcodeTipsTitle":"長按二維碼登入","del":"移除","qrcode":"二維碼","registerCompletePasswordDesc":"為了保障賬號安全,請設置您的密碼。","mfaCertification":"多因素認證","emailMfaCheck":"請輸入電子郵箱驗證碼","SmsMfaCheck":"請輸入短信驗證碼","faceCheck":"請保持攝像頭已打開並無遮擋","resetAccount":{"title":"設定用戶名","message":"當前用戶名不是唯一的,請重新設定用戶名後才可以成功登入。"},"noTenant":"暫無已加入的租戶","joinTenant":"加入租戶","tenantExample":"請輸入租戶識別碼,例如:Ljrs18wa","enter":"進入","createTenant":"創建租戶","pleaseInput":"請輸入","tenantName":"租戶名稱","tenantEmail":"租戶企業郵箱功能變數名稱","tenantDesc":"租戶描述","visitor":"訪客模式","createTenantDesc":"如需創建新租戶,請點擊此處","codeError":"識別碼錯誤,請重新輸入","emailVerify":"驗證企業郵箱","verify":"驗證","inputBusinessEmail":"請輸入企業郵箱","inputCode":"請輸入驗證碼","domainNotFound":"當前組織管理員未設定企業郵箱功能變數名稱,請聯系管理員設定後加入組織。","name":"姓名","applyJoin":"申請加入","welcomeJoin":"邀請你加入","inputCaptcha":"請輸入身份驗證碼","verifyAccount":"身份驗證碼已發送至 {{0}}","captchaMaxErrorCount":"驗證碼輸入錯誤 {{0}} 次,連結將會失效","pendingMsg":"你已完成加入「{{0}}」的申請。< br />請等待管理員審批通過後,你將收到郵件,敬請留意。","doneMsg":"申請加入成功,敬請查收郵件!","inviteExpire":"驗證失敗,當前連結已失效","inviteExpireMsg":"請聯系邀請人為您重新發送邀請郵件","sendSms":"未收到郵件?點擊發送短信","sendEmail":"未收到簡訊?點擊發送郵件","invitation":{"completeInfo":"請補全資訊","completeInfoDesc":"請補全下方資訊,資訊為非必填的情况下,可點擊「下一步」直接跳過"},"cratePasskeyTitle":"建立 Passkey","cratePasskeyTips":"目前帳號沒有 passkey,請先完成建立驗證後登入","onBindPasskeyTitle":"暫未綁定 Passkey,請聯系管理員進行綁定操作","createNow":"立即建立","passkeyVerifyTitle":"Passkey 驗證","passkeyVerifyTips":"為了保障存取安全,請根據瀏覽器提示完成驗證","reVerify":"重新驗證","inviteExpired":"當前邀請連結已失效,請聯系相關管理員為你重新發起邀請。","pageExpired":"當前頁面已過期,請重新點擊邀請連結進入","inviteSuccess":"已成功加入,敬請查收郵件。 請根據郵件內的資訊完成登入。"}'),Xu=JSON.parse('{"accPwdLoginVerify":"賬號登入驗證","adLogin":"AD 登入","authingOtpPushLogin":"推送登錄","authingOtpPushCancelLogin":"取消登錄","loginText":"登録","otpLoginPendingText":"已發送請求到Authing權杖APP,請在用戶端確認登入","getOtpLoginRequestAgain":"登錄請求已失效,請重新獲取","downloadOtpVerifier":"下載驗證器","loginToMobileClient":"登錄移動端","scanQrCode":"掃描二維碼","setAuthingTokenVerify":"設定Authing權杖Verify","phoneScanCodeAndDownloadAuthingToken":"请用手机扫码或前往应用市场下载 Authing 令牌","noPrompt":"以後不再提示","directLogin":"直接登錄","openAuthingOtp":"打開Authing權杖,點擊“登入/注册”","clickAndScanQrcode":"點擊“登入應用”頁面右上角的掃碼入口,掃描下方二維碼","downloadIOS":"iOS下載","downloadAndroid":"安卓下載","howBindClient":"如何綁定用戶端應?","installAuthingToken":"安裝Authing權杖","downloadAuthingToken":"請使用手機掃碼或前往應用市場下載Authing權杖","openAppList":"打開應用清單","addApp":"打開“應用清單”,點擊“添加應用”","openLoginPage":"打開登入頁","scanQrcode":"點擊“掃描二維碼”按鈕掃描應用二維碼","scanFollowingQrcode":"掃描以下應用二維碼","relevanceApp":"關聯應用並登入帳號","receiveMessageFromAuthingToken":"登录应用账号后即可在 Authing 令牌接收 Web 应用推送完成登录","howUsePushLogin":"如何使用推送登入","inputAccountInWeb":"在Web端登入面板輸入帳號資訊","clickLoginButton":"點擊\\"登入\\"","receiveMessageInApp":"在已綁定的移動端應用上接收登入推送","confirmLoginInApp":"確認“登入”,即可成功登入Web端。","howGetAppLoginUrl":"如何獲取應用登入地址","getCodeFromAdmin":"從管理員處獲取關聯應用二維碼","getCodeFromAdminTips":"管理員可在應用登入控制中得到應用二維碼,掃描二維碼即可登入對應應用。","getCodeFromPersonalCenter":"從個人中心獲取應用二維碼","getCodeFromPersonalCenterTips":"用戶可在“個人中心-快速認證”保存應用登入二維碼,使用Authing權杖掃碼後選擇應用即可登入。","getLoginUrlFromConsole":"管理員從控制台取得登入地址","getLoginUrlFromConsoleTips":"管理員可在「控制台-應用詳情-應用配寘-認證配寘」複製認證地址,用戶複製認證地址後即可登入和綁定。","nextStep":"下一步","enterAccount":"請輸入帳號","appScanLogin":"移動端 APP 掃碼登入","zjzwScanLogin":"浙裡辦掃碼登入","bindPhoneInfo":"請輸入手機號碼進行綁定","bindWarning":"請聯系管理員為你綁定手機號","captchaCode":"圖形驗證碼","clickSent":"點擊發送驗證碼","reSent":"點擊重發驗證碼","forgetPwd":"忘記密碼","inputAccount":"請輸入{{text}}","inputAdPwd":"請輸入 AD 密碼","inputAdUsername":"請輸入 AD 用戶名","inputCaptchaCode":"請輸入圖形驗證碼","inputCorrectPhone":"請輸入正確的手機號碼或電子郵件","inputCorrectPhoneOrEmail":"請輸入有效的手機號碼或電子郵件","inputEmail":"請輸入電子郵件","inputEmailCode":"請輸入電子郵件驗證碼","inputLdapPwd":"請輸入 LDAP 密碼","inputLdapUsername":"請輸入 LDAP 用戶名","inputLoginPwd":"請輸入密碼","inputNewPwd":"請輸入新密碼","inputPhone":"請輸入手機號碼","inputPhoneCode":"請輸入手機驗證碼","inputPhoneOrEmail":"請輸入手機號碼或電子郵件","inputPwd":"請輸入密碼","inputPwdAgain":"再輸入一次密碼","inputRecoverCode":"請輸入恢復代碼","inputSixCode":"請輸入綁定的 6 位數字安全碼","inputUsername":"請輸入用戶名","ldapLogin":"LDAP 登入","login":{"setPwdLimit2":"至少六位,需包含英文、數字與符號中的兩種","setPwdLimit3":"至少六位,需包含英文、數字與符號"},"loginBy":"使用 {{name}} 登入","mediaDevicesSupport":"當前設備暫不支持人臉識別","mfaAfterReset":"如果您沒有恢復代碼,請聯繫管理員處理","moreWays":"更多登入","noEmpty":"請填入 {{label}}","noLoginMethodsDesc":"未配置登入方式","otherLoginWay":"其他登入方式","otherVerifyWay":"其他驗證方式","pwdLogin":"帳號","bindPwdLogin":"帳號","rememberedSecret":"已經安全地記錄了這段密鑰","resetPwd":"重設密碼","scanLogin":"掃碼登入","selfUnlock":"自助解鎖","selfUnlockText":"您的賬號已被鎖定,請輸入驗證碼及密碼自助解鎖。","sendCodeTimeout":"發送失敗,請稍後嘗試","setPwdLimit1":"設置至少 6 位字符密碼","setPwdLimitMsg1":"密碼長度至少為 6 位","setPwdLimitMsg2":"密碼長度至少為 6 位,且要包含英文、數字與符號中的兩種","setPwdLimitMsg3":"密碼長度至少為 6 位,且要同時包含英文、數字與符號","socialConnectionMessage":"不支持使用{{provider}}登入,請選擇其他方式登入,或在其它瀏覽器中重試","thridAccLogin":"第三方帳號登入","verifyCodeSended":"驗證碼已發送至","wechatmpQrcode":"公眾號關注登入","selectLoginAccount":"選擇登入賬號","useOtherAccount":"使用其他賬號","wechatScanLogin":"使用微信掃碼登錄","qrcodeRefer":"刷新","qrcodeNetWorkError":"網路異常 點擊重試","scanAgain":"重新掃碼","scanSuccess":"掃碼成功","tenant":{"consoleManage":"管理員控制台","ssoPad":"單點登錄應用面板"},"AuthorizationCamera":"請先開啟授權","checkPreferences":"請檢查偏好設置","requireError":"無法滿足要求錯誤","hardwareSupport":"硬件不支持","verifyCodeTip":"看不清?換一張","loginWithPasskey":"使用 Passkey 登入","resetPassword":{"pleaseInputPassword":"請輸入密碼","checkPasswordDiff":"請輸入一致的密碼","nextStep":"下一步","reset":"重置密碼","back":"返回","resetPasswordText1":"請輸入你注册的手機號/郵箱用於接收驗證碼,我們將為你重置密碼。","resetPasswordText2":"你正在重置 {{account}} 的密碼。","input":"輸入{{text}}","inputFourVerifyCode":"請輸入 {{length}} 位數驗證碼","inputNewPwd":"請輸入新密碼","confirmNewPwd":"請確認新密碼","successTipMsg":"你可以使用新密碼繼續登入","successTip":"密碼重置成功","backLogin":"秒後將自動跳轉登入頁"},"wecomScanLogin":"企業微信掃碼登入"}'),ed=JSON.parse('{"contactAdministrator":"未知的錯誤~ 請您聯繫管理員進行處理","error":"錯誤信息","inputCurrPwd":"請輸入當前密碼","inputNewPwd":"請輸入新密碼","inputOldPwd":"請輸入原登入密碼","mfaBind":"MFA 綁定","modifyPwdTextDay":"你的密碼連續使用超過 {{number}} 天,可能有風險。請重新設定密碼。","modifyPwdTextMonth":"你的密碼連續使用超過 {{number}} 個月,可能會有風險。請重新設定密碼。","modifyPwdTextYear":"你的密碼連續使用超過 {{number}} 年,可能有風險。請重新設定密碼。","modifyNoticePwdTextDay":"你的密碼連續使用超過 {{number}} 天,即將過期,為了不影響你的使用,請設定新密碼","modifyNoticePwdTextMonth":"你的密碼連續使用超過 {{number}} 個月,即將過期,為了不影響你的使用,請設定新密碼","modifyNoticePwdTextYear":"你的密碼連續使用超過 {{number}} 年,即將過期,為了不影響你的使用,請設定新密碼","modifyPwd":"修改密碼","nextStep":"下一步","numberSafteyCode":"數字安全碼","resetpasswordText1":"請輸入您的註冊電子郵件 / 手機號碼,以及收到的驗證碼,我們將為您進行密碼重設。","unlockTip":"若解鎖遇到問題,請點"}'),td=JSON.parse('{"guidance":{},"uploadFail":"{{name}} アップロード失敗","confirm":"確認","retryAfterTime":"{{time}} 秒","sendVerifyCode":"認証コードを送信します","emailFormatError":"有効なメールアドレスをご入力ください","usernameFormatError":"有効なユーザー名を入力する","customNameFormatError":"有効なアカウントを入力","phoneFormateError":"有効な携帯番号を入力する","username":"ユーザー名","login":"ログイン","noAccYet":"アカウントがないので,","registerImmediate":"すぐに登録します","sure":"確定","hasLooseSaftyCode":"セキュリティコードの紛失?","useRecoverCode":"復旧コードを使って","register":"登録","unlock":"ロック","alreadyHasAcc":"すでにアカウントがある,","perfectUserInfo":"プロフィール充実","publicAccount":"パブリックアカウント","man":"男","female":"女","emailLabel":"メールアドレス","phoneLabel":"携帯電話番号","pleaseSelectDate":"日付を選んでください","bindEmail":"メールボックスを結びつける","email":"メールアドレス","inputFourVerifyCode":"{{length}}桁の認証コードをご入力ください","bindPhone":"携帯電話番号を結びつける","phoneNumber":"携帯電話","bind":"据え置き","yes":"は","no":"いいえ","problem":{"title":"ヘルプ・お問い合わせ","noVerify":"認証コードが届きません","noLogin":"ログインできません","noRegister":"登録できません","noAccount":"アカウントをお忘れ","noResetPass":"パスワードのリセットができません","locked":"アカウントがロックされました","other":"その他","noVerifyTip":{"tip":"認証コードのSMSが届かない原因としては以下の事象等が考えられます。","type1":"1. 通信状況が不安定 /モバイル通信ができない状態","type2":"2. 電話番号の入力間違い","type3":"3. SMSの受信の制限"},"noLoginTip":{"type1":"1. アカウントとパスワードの入力が正しいかどうかチェックします。","type2":"2. 携帯電話が利用停止かどうか若しくはネットワーク接続状態チェックします。"},"noRegisterTip":{"tip":"ログインできない場合は、以下の操作をお勧めします。","type1":"1. すでにアカウント登録済みとなっているかどうかチェックします。","type2":"2. 携帯電話番号が正しく入力しているかどうかチェックします。","type3":"3. 認証コードのSMSがブロックされているかどうかチェックします。"},"noAccountTip":{"tip":"アカウントが紛失した場合は、以下の操作をお勧めします。","type1":"1. アカウントとパスワードの入力が正しいかどうかチェックします。","type2":"2. 携帯電話が利用停止かどうか若しくはネットワーク接続状態チェックします。"},"noResetPassTip":{"tip":"パスワードをリセットできない場合は、以下の操作をお勧めします。","type1":"1. 携帯電話が利用停止かどうか若しくはネットワーク接続状態チェックします。","type2":"2. 設定したパスワードが正しいかどうかチェックします。"},"otherTip":{},"successTip":"提出に成功する","successTipMsg":"あなたの情報はアプリケーション管理者に提出されており、フィードバックはすぐに処理されますので、お待ちください。","form":{"phone":"連絡方法","question":"ご用件","questionDescript":"お問い合わせ内容","questionClip":"スクリーンショット","submit":"提出"},"lockedTips":"アカウントがロックされた場合は、管理者にご連絡頂き、ロック解除された後もう一度ログインするようお願い致します。","noLoginTips":"ログインできない場合は、以下の操作をお勧めします。"},"backLoginPage":"ログイン画面に戻ります","LoginSuccess":"ログインに成功する","welcomeDoc":"{{name}}へようこそ、より良い使用体験をご提供できるよう個人情報のご記入をお願い致します。","bindEmailDoc":"メールアドレスを入力して結びつけてください","copied":"複製済み","copy":"コピー","repeatPasswordDoc":"2回のパスワード入力が一致しません","SMS":"sms認証","EmailVerification":"電子メール認証","OTPVerification":"OTP パスワード検証","faceVerification":"顔認証認証","registrationSuccess":"登録に成功する","copyFailed":"コピー失敗","downloadTotpAppIOS":"IOS のダウンロード","downloadTotpAppAndroid":"Android ダウンロード","downloadTotpAppDocs":"携帯電話のコードを使って検証をダウンロードしてください","bindTotp":"バインディング OTP","checkEmail":"メールボックスはすでに存在しています","checkUserName":"ユーザ名はすでに存在する","checkCustomName":"このアカウントは既に存在します","checkPhone":"携帯電話番号はすでに存在しています","loginFailCheck":"暖かい提示:あなたのパスワードは間違って、また試みることができます {{number}} 回","bindSuccess":"バインディング完了","pleaseRecordKey":"鍵を記録してください","totpText1":"回復コードを適切に保存してください","totpText2":"MFA が紛失した場合復旧コードが必要になります","otpText1":"バインドするには OTP バインド ページに移動してください","faceText1":"顔認証を結びつける","faceText2":"バインドする顔を認識するためにカメラをオンにしてください","faceText3":"検証を開始する","faceText4":"もう一度やってみる","checkPasswordHasSpace":"フレームを含まない","backToVerify":"検証ページに戻る","usePhoneOpen":"携帯で Google Authenticator または Microsoft Authenticator を開いてください","noValidator":"ベリファイアなしで","clickTodownload":"クリックしてダウンロードする","mfaText1":"OTP を追加して、携帯電話で調べて 6 桁の数字の安全なコードを入力します。","backToMFA":"MFA バインディングを戻す","timeoutLDAP":"要求タイムアウト、LDAP構成エラー","noQuestions":"問題がなく、","goToLogin":"直接にログインします","passwordAgain":"パスワードを確認してください","isMissing":"{{name}}が未入力です","password":"パスワード","captchaCode":"認証コード","account":"アカウント","phone":"携帯電話番号","pToLogin":"秒後に、ログイン画面に戻ります","resetSuccess":"リセットが完了しました","resetSuccessMessage":"パスワードのリセットが完了しました。新しいパスワードにて再ログインしてください。","welcome":"訪問を歓迎する","initPasswordText":"アカウントを安全に保つために、新しいパスワードを設定してください。","unsafePasswordChangeText":"あなたのパスワードは現在のパスワード強度の要件を満たしていません。新しいパスワードを設定してください。","updatePsswordSuccess":"パスワードの変更に成功しましたので、再ログインしてください","fullCaptchaCode":"{{name}}を記入してください","feedback":"ヘルプ・お問い合わせ","loginProtocolTips":"ログインプロトコルにチェックを入れてください","registerProtocolTips":"登録プロトコルにチェックを入れてください","accountLock":"アカウントがロックされたら、下の疑問符をクリックしてフィードバックしてください","corsErrorMessage":"現在のドメイン名はアクセスが許可されているドメイン名のリストには含まれていない。","corsErrorMessage2":"質問があれば<a href=\\"https://docs.authing.cn/v2/guides/security/config-domain.html\\">ドキュメント参照</a>","totpGenerateCode":"この鍵を安全に記録してください","verifyCodeLogin":"認証コード登録","phoneCodeTab":"携帯電話番号でのログイン","emailCodeTab":"電子メールでのログイン","phoneVerifyCode":"sms認証コード","emailVerifyCode":"メールボックス認証コード","phoneOrEmail":"携帯電話/メールアドレス","skip":"飛び越え","back":"戻る","identityBindingAskTitle":"つながり方を選ぶ","identityBindingAskDesc":"既存アカウントに紐付いている場合は、今回の方法で直接既存アカウントにログインすることができます。","identityBindingCreate":"新しいアカウントを作りたいのですが","identityBindingBinding":"既存のアカウントと結びつけたい","identityBindingTitle":"既存のアカウントを結びつける","identityBindingDesc":"紐付け后、次回から直接今回の方法でこのアカウントにログインすることができます","identityBindingSkipAskTitle":"アカウントのバインド","identityBindingSkipAskDesc":"既存のアカウントが存在する場合は、入力に成功するとバインドが完了します。新規アカウントを入力すると作成とバインドが完了します","internationPhoneMessage":"合法的な局番の携帯番号を入力してください","areaCodePhone":"+局番付き携帯番号","timeoutAD":"要求タイムアウト、AD設定ミス","timeout":"タイムアウトをお願いしますので,後ほど再試行してください","userNameIsExists":"このユーザー名はすでに存在します!","fetchError":"ネットワーク接続に失敗した場合は後ほどお試しください","passwordUnsafeTip":"パスワードが更新されましたので、ページを更新して再試行してください","i18nCheckErrorMessage":"地域番号の合法的な携帯電話番号または正しいメールアドレスを入力してください","verifyCodeRegister":"認証コード登録","EmailRegister":"Eメール登録","registerTab":"{{text}}登録","PasswordRegister":"アカウント登録","noFindEmail":"該当メールアドレスが見つかりません","noFindPhone":"携帯電話のアカウントが見つかりません","noFindUsername":"該当ユーザー名アカウントが見つからない","jobNumber":"工番の頭文字を大文字にする","loginWithWechatmpQrcodeTipsTitle":"qrコードを長押しして登録する","del":"除去","qrcode":"qrコード","registerCompletePasswordDesc":"アカウントを安全に保つために、パスワードを設定してください。","mfaCertification":"多要素認証","emailMfaCheck":"メール認証コードを入力してください","SmsMfaCheck":"SMS認証コードを入力してください","faceCheck":"カメラの電源を入れ、遮るものがない状態にしてください","resetAccount":{"title":"ユーザー名の設定","message":"現在のユーザー名は一つではありません。ユーザー名を再設定してからログインできます。"},"noTenant":"未加入のテナントは現在存在しません","joinTenant":"テナントへの参加","tenantExample":"テナント識別コードを入力してください(例:Ljrs18wa)","enter":"に入る","createTenant":"テナントの作成","pleaseInput":"入力してください","tenantName":"租户テナント名名称","tenantEmail":"テナント企業メールアドレスドメイン","tenantDesc":"テナントの説明","visitor":"ゲストモード","createTenantDesc":"新規テナントを作成するには、こちらをクリックしてください","codeError":"識別コードエラー、再入力してください","emailVerify":"エンタープライズメールボックスの検証","verify":"検証","inputBusinessEmail":"エンタープライズメールアドレスを入力してください","inputCode":"認証コードを入力してください","domainNotFound":"現在の組織管理者はエンタープライズメールアドレスのドメイン名を設定していません。管理者に連絡して設定してから組織に参加してください。","name":"名前","applyJoin":"加入申請","welcomeJoin":"あなたを招待します","inputCaptcha":"認証コードを入力してください","verifyAccount":"認証コードがに送信されました {{0}}","captchaMaxErrorCount":"認証コード入力エラー {{0}} 回、リンクが無効になります","pendingMsg":"あなたは「{{0}}」への参加申請を完了しました。<br />管理者の承認が完了するまで待ってください。メールが届きますので、注意してください。","doneMsg":"加入申請に成功しました、メールをご査収ください","inviteExpire":"検証に失敗しました。現在のリンクは無効です","inviteExpireMsg":"招待者に連絡して招待メールを再送してください","sendSms":"メールを受信していませんか?をクリックしてメッセージを送信","sendEmail":"メールが届かない?クリックしてメールを送信","invitation":{"completeInfo":"情報を補完してください","completeInfoDesc":"下の情報を補足してください。情報が必要でない場合は、「次へ」をクリックして直接スキップしてください"},"cratePasskeyTitle":"パスキーの作成","cratePasskeyTips":"現在のアカウントにはパスキーがありません。ログインする前に作成と検証を完了してください","onBindPasskeyTitle":"Passkeyはまだバインドされていません。バインド操作については管理者に連絡してください","createNow":"今すぐ作成","passkeyVerifyTitle":"パスキーログイン","passkeyVerifyTips":"アクセスのセキュリティを確保するため、ブラウザのプロンプトに従って検証を完了してください","reVerify":"再検証","inviteExpired":"現在の招待リンクは無効です。関連管理者に連絡して招待を再開してください。","pageExpired":"現在のページは期限切れですので、招待リンクをもう一度クリックしてください","inviteSuccess":"正常に参加しました。メールを確認してください。メール内の情報に基づいてログインを完了してください。"}'),nd=JSON.parse('{"inputAccount":"{{text}}をご入力ください","inputAdUsername":"AD ユーザー名を入力してください","inputAdPwd":"AD パスワードを入力してください","inputLdapUsername":"LDAP ユーザ名を入力してください","inputLdapPwd":"LDAP パスワードを入力してください","inputCaptchaCode":"図形認証コードを入力してください","captchaCode":"グラフィックス認証コード","accPwdLoginVerify":"アカウント登録検証","inputSixCode":"バインドされた 6 桁のセキュリティ コードを入力してください","inputLoginPwd":"パスワードをご入力ください","inputPhone":"携帯番号を入力してください","inputEmail":"メールアドレスをご入力ください","inputPwdAgain":"もう一度パスワードを入力する","loginBy":"{{name}}を使ってログインする","thridAccLogin":"第三者アカウントのログイン","inputRecoverCode":"復旧コードを入力してください","rememberedSecret":"鍵は安全に記録されています","mfaAfterReset":"復旧コードがない場合は管理者に連絡してください","noEmpty":"{{label}}が未入力です","inputCorrectPhone":"メールアドレス/携帯電話を正しくご入力ください","inputPhoneOrEmail":"携帯番号またはメールアドレスをご入力ください","resetPwd":"パスワードをリセット","selfUnlock":"セルフロック","selfUnlockText":"あなたのアカウントはロックされています。認証コードとパスワードを入力してセルフロックを解除してください。","pwdLogin":"既にアカウントをお持ち","bindPwdLogin":"アカウントログイン","appScanLogin":"モバイルアプリでコード登録","zjzwScanLogin":"浙江事務所","scanLogin":"コード登録","scanAgain":"コードを掃き直す","wechatScanLogin":"wechatのコードを使ってログインする","scanSuccess":"コード掃きに成功する","ldapLogin":"LDAP ログイン","adLogin":"AD 登録","authingOtpPushLogin":"プッシュ登録","authingOtpPushCancelLogin":"登録をキャンセルする","loginText":"登録","otpLoginPendingText":"AuthingトークンAPPにリクエストを送信しました。クライアントでログインを確認してください","getOtpLoginRequestAgain":"ログイン要求は無効になりましたので、再取得してください","downloadOtpVerifier":"ベリファイアのダウンロード","loginToMobileClient":"モバイル端末へのログイン","scanQrCode":"スキャン2次元コード","setAuthingTokenVerify":"AuthingトークンVerifyの設定","phoneScanCodeAndDownloadAuthingToken":"携帯電話でコードをスキャンするか、アプリケーション市場に行ってAuthingトークンをダウンロードしてください","noPrompt":"後でプロンプトしない","directLogin":"直接ログイン","openAuthingOtp":"Authingトークンを開き、「ログイン/登録」をクリックします","clickAndScanQrcode":"「ログインアプリケーション」ページの右上にあるスキャンコードの入り口をクリックし、下のQRコードをスキャンします","downloadIOS":"iOSダウンロード","downloadAndroid":"Androidダウンロード","howBindClient":"クライアントアプリケーションをバインドする方法","installAuthingToken":"Authingトークンのインストール","downloadAuthingToken":"携帯電話でコードをスキャンするか、アプリケーション市場に行ってAuthingトークンをダウンロードしてください","openAppList":"アプリケーションリストを開く","addApp":"「アプリケーションリスト」を開き、「アプリケーションの追加」をクリックします","openLoginPage":"ログインページを開く","scanQrcode":"「QRコードをスキャン」ボタンをクリックしてQRコードをスキャンして適用する","scanFollowingQrcode":"スキャン以下にQRコードを適用","relevanceApp":"アプリケーションを関連付けてアカウントにログインする","receiveMessageFromAuthingToken":"アプリケーションアカウントにログインすると、AuthingトークンでWebアプリケーションのプッシュを受信してログインを完了することができます","howUsePushLogin":"プッシュログインの使用方法","inputAccountInWeb":"Webログインパネルにアカウント情報を入力する","clickLoginButton":"「ログイン」をクリック","receiveMessageInApp":"バインドされたモバイル端末アプリケーションへのログインプッシュの受信","confirmLoginInApp":"「ログイン」を確認すると、Web側に正常にログインできます。","howGetAppLoginUrl":"アプリケーションログインアドレスを取得する方法","getCodeFromAdmin":"管理者から関連アプリケーションのQRコードを取得する","getCodeFromAdminTips":"管理者はアプリケーションログイン制御に二次元コードを適用することができ、二次元コードをスキャンすれば対応するアプリケーションにログインすることができる。","getCodeFromPersonalCenter":"パーソナルセンターからアプリケーションQRコードを取得する","getCodeFromPersonalCenterTips":"ユーザーは「パーソナルセンター-クイック認証」保存アプリケーションに二次元コードを登録し、Authingトークンを使用してコードをスキャンした後、アプリケーションを選択することでログインすることができます","getLoginUrlFromConsole":"管理者はコンソールからログインアドレスを取得する","getLoginUrlFromConsoleTips":"管理者は、コンソール-アプリケーション詳細-アプリケーション構成-認証構成で認証アドレスをコピーでき、ユーザーは認証アドレスをコピーするとログインとバインドできます。","nextStep":"次のステップ","enterAccount":"アカウントを入力してください","verifyCodeSended":"認証コードが送信され","inputEmailCode":"メールアドレス認証を入力してください","otherVerifyWay":"その他の検証方法","otherLoginWay":"その他の登録方法","clickSent":"認証コードの送信をクリックする","reSent":"認証コードの再送をクリックしてください","bindPhoneInfo":"携帯番号を入力して結びつけてください","bindWarning":"管理者に連絡して携帯番号をバインドしてください","inputPhoneCode":"携帯認証コードを入力してください","forgetPwd":"パスワードをお忘れの場合","inputPwd":"パスワードを入力してください","setPwdLimit1":"最低 6 ビットの文字パスワードを設定する","login":{"setPwdLimit2":"少なくとも6桁で、英数字と記号のうち2種類を含むこと","setPwdLimit3":"少なくとも6桁の英数字および記号を含むこと"},"setPwdLimitMsg1":"パスワードの長も 6桁で","setPwdLimitMsg2":"パスワードの長さは少なくとも 6桁で、英語、数字、記号のうち 2種類を含むこと","setPwdLimitMsg3":"パスワードの長も 6桁で、英文、数字および記号を同時に含むこと","wechatmpQrcode":"公衆番号フォロー登録","inputUsername":"ユーザー名を入力してください","moreWays":"もっとログインする","inputCorrectPhoneOrEmail":"有効な携帯番号またはメールアドレスをご入力ください","sendCodeTimeout":"送信に失敗した場合は後ほどお試しください","mediaDevicesSupport":"現在のデバイスは顔認識をサポートしていない","qrcodeNetWorkError":"ネットワーク異常クリック再試行","qrcodeRefer":"更新","noLoginMethodsDesc":"未構成登録方式","socialConnectionMessage":"{{provider}}を使用したログインはサポートされていません。他の方法でログインするか、他のブラウザで再試行してください。","inputNewPwd":"新しいパスワードをご入力ください","selectLoginAccount":"ログインアカウントを選択する","useOtherAccount":"別のアカウントを使う","tenant":{"consoleManage":"管理コンソール","ssoPad":"シングル サインオン アプリケーション パネル"},"AuthorizationCamera":"最初に認証を有効にしてください","checkPreferences":"設定を確認してください","requireError":"要求エラーを満たすことができません","hardwareSupport":"ハードウェアはサポートされていません","verifyCodeTip":"別の画像を表示","loginWithPasskey":"パスキーを使用してログインする","resetPassword":{"pleaseInputPassword":"パスワードを入力してください","checkPasswordDiff":"一貫したパスワードを入力してください","nextStep":"次のステップ","reset":"パスワードをリセット","back":"戻る","resetPasswordText1":"認証コードを受け取るために登録した携帯電話番号/メールボックスを入力してください。パスワードをリセットします。","resetPasswordText2":"あなたはリセットしています {{account}} のパスワード。","input":"インプット{{text}}","inputFourVerifyCode":"入力してください {{length}} ビット認証コード","inputNewPwd":"新しいパスワードを入力してください","confirmNewPwd":"新しいパスワードを確認してください","successTipMsg":"新しいパスワードを使用してログインを続けることができます","successTip":"パスワードのリセットに成功しました","backLogin":"秒ログインページが自動的にジャンプされます"},"wecomScanLogin":"エンタープライズ WeChat ログイン"}'),rd=JSON.parse('{"numberSafteyCode":"デジタルセキュリティコード","mfaBind":"MFA バインディング","nextStep":"次のステップ","inputCurrPwd":"現在のパスワードを入力してください","inputNewPwd":"新しいパスワードをご入力ください","inputOldPwd":"元のログインパスワードを入力してください","modifyPwd":"パスワードを変更する","modifyPwdTextDay":"あなたのパスワードは {{number}} 日以上使用されており、危険にさらされている可能性があります。パスワードをリセットしてください。","modifyPwdTextMonth":"あなたのパスワードは {{number}} か月間以上継続して使用されており、危険にさらされている可能性があります。パスワードをリセットしてください。","modifyPwdTextYear":"あなたのパスワードは {{number}} 年以上継続して使用されており、危険にさらされている可能性があります。パスワードをリセットしてください。","modifyNoticePwdTextDay":"あなたのパスワードは {{number}} 日以上継続して使用されており、有効期限が近づいています。使用に影響を与えないように、新しいパスワードを設定してください。","modifyNoticePwdTextMonth":"あなたのパスワードは {{number}} か月間以上継続して使用されており、有効期限が近づいています。使用に影響を与えないように、新しいパスワードを設定してください。","modifyNoticePwdTextYear":"あなたのパスワードは {{number}} 年以上継続して使用されており、有効期限が近づいています。使用に影響を与えないように、新しいパスワードを設定してください。","error":"エラーメッセージ","contactAdministrator":"不明なエラーです ~ 処理については管理者に連絡してください","resetpasswordText1":"登録の携帯番号/メールアドレスを入力し、認証コードを入力しください。パスワードのリセットをさせて頂きます。","unlockTip":"ロック解除に問題がある場合は、クリックしてください"}');// CONCATENATED MODULE: ./src/_utils/guardDocument.ts
|
|
22376
22376
|
var od,id=function(){return od},ad=function(e){od=e},sd=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},cd=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},ld={"en-US":{translation:e},"zh-CN":{translation:t},"zh-TW":{translation:n},"ja-JP":{translation:r}},ud=function(e){if(void 0===e&&(e=""),!e||"en"===e)return["en-US"];if(!e||"zh"===e)return["zh-CN"];if(!e||"ja"===e)return["ja-JP"];var t=[];return e.startsWith("en-")?(t.push("en-US"),t):e.startsWith("ja-")?(t.push("ja-JP"),t):e.startsWith("zh-")?(["zh-tw","zh-hk","zh-mo","zh-hant"].includes(e.toLocaleLowerCase())?t.push("zh-TW"):(["zh-cn","zh-sg","zh-my"].includes(e.toLocaleLowerCase()),t.push("zh-CN")),t):["en-US"]},dd=i(8424),fd=i.n(dd),pd=i(6888),hd=i.n(pd);// CONCATENATED MODULE: ./shim-antd4/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
22377
22377
|
function md(){return md=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},md.apply(this,arguments)}// CONCATENATED MODULE: ./shim-antd4/node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
22378
22378
|
function vd(e){return vd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vd(e)}// CONCATENATED MODULE: ./shim-antd4/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
@@ -27319,7 +27319,7 @@ var $D=i(4232),HD=i(4631),WD=i(1062),GD=i(8787),KD={zhCN:$D/* default */.Z,enUS:
|
|
|
27319
27319
|
* 多账号 状态
|
|
27320
27320
|
*/
|
|
27321
27321
|
multipleInstance:{isMultipleAccount:!1,instance:void 0,referMultipleState:void 0,multipleAccountData:void 0,clearBackFillData:void 0},phoneRegex:null,defaultLanguageConfig:"zh-CN",tenantInstance:void 0,isSpecialBrowser:!1},nL=y().createContext(tL),rL=y().createContext({spin:!1,spinChange:function(){}}),oL=function(){return XD(rL)},iL=function(){return XD(nL).publicConfig},aL=function(){return XD(nL).httpClient},sL=function(){return XD(nL).isSpecialBrowser},cL=function(){return XD(nL).appId},lL=function(){return XD(nL).tenantId};function uL(){return XD(nL).initData}var dL=function(){return XD(nL).currentModule},fL=function(){return XD(nL).events},pL=function(){var e=XD(nL);return{changeModule:e.changeModule,backModule:e.backModule,currentModule:e.currentModule}},hL=function(){return XD(nL).finallyConfig},mL=function(){return XD(nL).isAuthFlow},vL=function(){return XD(nL).multipleInstance},gL=function(){return XD(nL).phoneRegex},yL=function(){return XD(nL).defaultLanguageConfig},bL=function(){var e=iL(),t=e.customSecurityEnabled,n=e.appRobotVerify,r=e.userpoolRobotVerify;return t?n:r},wL=function(e){var t,n,r=iL(),o=r.loginSmsConfig,i=r.registerSmsConfig,a=!1;switch(e){case"login":a="ON"===(null===(t=null==o?void 0:o.robot)||void 0===t?void 0:t.switch);break;case"register":a="ON"===(null===(n=null==i?void 0:i.robot)||void 0===n?void 0:n.switch)}return a},CL=y().useMemo,EL={"zh-CN":{label:"简体中文"},"zh-TW":{label:"繁體中文"},"en-US":{label:"English"},"ja-JP":{label:"日本語"}},kL=function(e){var t=e.langRange,n=void 0===t?["zh-CN","zh-TW","en-US","ja-JP"]:t,r=e.onLangChange,o=_u().i18n,i=XD(nL).guardPageConfig,a=hL(),s=CL((function(){return"g2-change-language-text ".concat(a.mode)}),[a]),c=CL((function(){var e;return null===(e=i.global)||void 0===e?void 0:e.showChangeLanguage}),[i]),l=CL((function(){var e,t=null!==(e=o.resolvedLanguage)&&void 0!==e?e:o.language;return Object.keys(EL).includes(t)?t:ud(t)[0]||"en-US"}),[o.resolvedLanguage,o.language]),u=CL((function(){return y().createElement(y().Fragment,null,y().createElement("span",null,EL[l].label))}),[l]),d=CL((function(){return Object.keys(EL).filter((function(e){return n.includes(e)})).map((function(e){return{key:e,label:EL[e].label}}))}),[n]);if(!c||0===n.length)return null;var f={items:d,onClick:function(e){l!==e.key&&(o.changeLanguage(e.key),null==r||r(e.key))}};return y().createElement("div",{className:"g2-change-language-container"},y().createElement(CP,{menu:f,trigger:["click"],placement:"bottom",overlayClassName:"authing-g2-change-language-menu"},y().createElement("span",{className:s},u,y().createElement(JD,{type:"authing-arrow-down-s-fill",className:"down-fill-svg"}))))};// CONCATENATED MODULE: ./package.json
|
|
27322
|
-
const SL="4.5.43-rc.
|
|
27322
|
+
const SL="4.5.43-rc.3";// CONCATENATED MODULE: ./src/_utils/getVersion.ts
|
|
27323
27323
|
function xL(){return SL}// CONCATENATED MODULE: ./src/_utils/flowHandleStorage.ts
|
|
27324
27324
|
var _L,PL=function(){return _L},TL=function(e){_L=e},OL=function(){return OL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},OL.apply(this,arguments)},NL=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},IL=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},AL=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},RL=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},ML=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return NL(void 0,void 0,void 0,(function(){return IL(this,(function(t){switch(t.label){case 0:return[4/*yield*/,fetch.apply(void 0,RL([],AL(e),!1))];case 1:return[2/*return*/,t.sent().json()]}}))}))},DL=function(e){return new Promise((function(t){setTimeout((function(){t({data:{code:-1}}),e()}),1e4)}))};ML.get=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return NL(void 0,RL([e],AL(t),!1),void 0,(function(e,t,n){var r,o,i,a,s;return void 0===t&&(t={}),IL(this,(function(c){switch(c.label){case 0:r=OL(OL({},null==n?void 0:n.headers),((s={"Content-Type":"application/json"})[ML.langHeader]=AX(),s)),""!==ML.tenantId&&(r[ML.tenantHeader]=ML.tenantId),c.label=1;case 1:return c.trys.push([1,3,,4]),o=ha().CancelToken,i=o.source(),[4/*yield*/,Promise.race([DL(i.cancel),ha()("".concat(ML.baseUrl).concat(e).concat(Fc().stringify(t,{addQueryPrefix:!0})),OL(OL({method:"GET"},n),{withCredentials:!0,headers:r,cancelToken:i.token}))])];case 2:return[2/*return*/,null==(a=c.sent())?void 0:a.data];case 3:return c.sent(),[2/*return*/,Promise.resolve({code:-2})];case 4:return[2/*return*/]}}))}))},ML.post=function(e,t,n){return NL(void 0,void 0,void 0,(function(){var r,o,i,a,s,c,l;return IL(this,(function(u){switch(u.label){case 0:r=OL(OL({},null==n?void 0:n.headers),((s={"Content-Type":"application/json"})[ML.langHeader]=null!==(l=su.resolvedLanguage)&&void 0!==l?l:su.language,s)),""!==ML.tenantId&&(r[ML.tenantHeader]=ML.tenantId),u.label=1;case 1:return u.trys.push([1,3,,4]),o=ha().CancelToken,i=o.source(),[4/*yield*/,Promise.race([DL(i.cancel),ha()("".concat(ML.baseUrl).concat(e),{data:t,method:"POST",withCredentials:!0,cancelToken:i.token,headers:OL(OL({"Content-Type":"application/json"},null==n?void 0:n.headers),(c={},c[ML.langHeader]=AX(),c))})])];case 2:return[2/*return*/,null==(a=u.sent())?void 0:a.data];case 3:return u.sent(),[2/*return*/,Promise.resolve({code:-2})];case 4:return[2/*return*/]}}))}))},ML.postForm=function(e,t,n){return NL(void 0,void 0,void 0,(function(){var r,o,i,a;return IL(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),r=ha().CancelToken,o=r.source(),[4/*yield*/,Promise.race([DL(o.cancel),ha()("".concat(ML.baseUrl).concat(e),{method:"POST",data:t,withCredentials:!0,cancelToken:o.token,headers:OL(OL({},null==n?void 0:n.headers),(a={},a[ML.langHeader]=AX(),a))})])];case 1:return[2/*return*/,null==(i=s.sent())?void 0:i.data];case 2:return s.sent(),[2/*return*/,Promise.resolve({code:-2})];case 3:return[2/*return*/]}}))}))},ML.baseUrl="",ML.setBaseUrl=function(e){ML.baseUrl=e.replace(/\/$/,"")};var LL,FL="x-authing-lang";ML.langHeader=FL,ML.tenantHeader="x-authing-app-tenant-idåå",ML.tenantId="",ML.setLangHeader=function(e){ML.langHeader=e||FL},ML.setTenantHeader=function(e){ML.tenantHeader=e||FL},ML.setTenantId=function(e){ML.tenantId=e},function(e){e.ERROR="error",e.LOGIN="login",e.REGISTER="register",e.MFA="mfa",e.FORGET_PWD="forgetPassword",e.FORCED_PASSWORD_RESET="forcedPasswordReset",e.NOTICE_PASSWORD_RESET="noticePasswordReset",e.FIRST_LOGIN_PASSWORD="firstLoginPassword",e.UNSAFE_PASSWORD_RESET="unsafePasswordReset",e.DOWNLOAD_AT="downloadAT",e.BIND_TOTP="bindTotp",e.ANY_QUESTIONS="anyQuestions",e.LOGIN_COMPLETE_INFO="loginCompleteInfo",e.REGISTER_PASSWORD="registerPassword",e.REGISTER_COMPLETE_INFO="registerCompleteInfo",e.RECOVERY_CODE="recoveryCode",e.SUBMIT_SUCCESS="submitSuccess",e.IDENTITY_BINDING_ASK="identityBindingAsk",e.IDENTITY_BINDING="identityBinding",e.IDENTITY_BINDING_NO_ASK="identityBindingNoAsk",e.SELF_UNLOCK="selfUnlock",e.FLOW_SELECT_ACCOUNT="flowSelectAccount",
|
|
27325
27325
|
/** 多租户门户选择页 */
|
|
@@ -27353,7 +27353,7 @@ i&&fd()(i,o)?r.back():r.historyPush(o)},this.back=function(e){if(void 0===e&&(e=
|
|
|
27353
27353
|
this.end=function(){
|
|
27354
27354
|
// console.log('业务终点 Log', this.stateMachineLog)
|
|
27355
27355
|
// TODO 请求
|
|
27356
|
-
},this.historyPush=function(e,t){void 0===t&&(t=uF.ChangeModule),r.moduleStateHistory.unshift(e),r.stateMachineLog[r.order++]={action:t,date:(new Date).getTime(),dataSource:e},r.moduleStateHistory.length>10&&r.moduleStateHistory.splice(10,r.moduleStateHistory.length-10)},this.historyBack=function(e){r.moduleStateHistory.length<=1||(r.moduleStateHistory.splice(0,1),r.stateMachineLog[r.order++]={action:uF.Back,date:(new Date).getTime(),dataSource:e})},this.setConfig=function(e){r.config=e},this.isUseHistoryHijack=function(){var e;return"about:blank"!==(null===(e=r.globalWindow())||void 0===e?void 0:e.location.href)},this.onPopstate=function(){r.back()},this.changeModuleEvent=e,null===(n=this.globalWindow())||void 0===n||n.addEventListener("popstate",this.onPopstate),this.historyPush(t,uF.Init)},yF=function(e,t){return new gF(e,t)},bF=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},wF=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},CF=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},EF=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},kF=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},SF=y().useCallback,xF=y().useEffect,_F=y().useState,PF=function(e,t){var n=kF(_F(!1),2),r=n[0],o=n[1],i=SF((function(){return CF(void 0,void 0,void 0,(function(){var n,r,i;return EF(this,(function(a){switch(a.label){case 0:if(!e)return[2/*return*/];a.label=1;case 1:return a.trys.push([1,4,,5]),[4/*yield*/,fetch("".concat(e,"/svg-string/guard?v=
|
|
27356
|
+
},this.historyPush=function(e,t){void 0===t&&(t=uF.ChangeModule),r.moduleStateHistory.unshift(e),r.stateMachineLog[r.order++]={action:t,date:(new Date).getTime(),dataSource:e},r.moduleStateHistory.length>10&&r.moduleStateHistory.splice(10,r.moduleStateHistory.length-10)},this.historyBack=function(e){r.moduleStateHistory.length<=1||(r.moduleStateHistory.splice(0,1),r.stateMachineLog[r.order++]={action:uF.Back,date:(new Date).getTime(),dataSource:e})},this.setConfig=function(e){r.config=e},this.isUseHistoryHijack=function(){var e;return"about:blank"!==(null===(e=r.globalWindow())||void 0===e?void 0:e.location.href)},this.onPopstate=function(){r.back()},this.changeModuleEvent=e,null===(n=this.globalWindow())||void 0===n||n.addEventListener("popstate",this.onPopstate),this.historyPush(t,uF.Init)},yF=function(e,t){return new gF(e,t)},bF=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},wF=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},CF=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},EF=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},kF=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},SF=y().useCallback,xF=y().useEffect,_F=y().useState,PF=function(e,t){var n=kF(_F(!1),2),r=n[0],o=n[1],i=SF((function(){return CF(void 0,void 0,void 0,(function(){var n,r,i;return EF(this,(function(a){switch(a.label){case 0:if(!e)return[2/*return*/];a.label=1;case 1:return a.trys.push([1,4,,5]),[4/*yield*/,fetch("".concat(e,"/svg-string/guard?v=1"))];case 2:return[4/*yield*/,a.sent().text()];case 3:return n=a.sent(),(r=UX())?(function(e,t){var n=function(){var n=e.createElement("div");n.innerHTML=t;var r=n.getElementsByTagName("svg")[0];r.setAttribute("aria-hidden","true"),r.id="guard-svg-string",r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.overflow="hidden";var o=e.body;o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r)},r=e.readyState;if(["complete","loaded","interactive"].includes(r))setTimeout((function(){n()}),0);else{var o=function(){e.removeEventListener("DOMContentLoaded",o),n()};e.addEventListener("DOMContentLoaded",o)}}(r.document,n),o(!0),[3/*break*/,5]):[2/*return*/];case 4:return i=a.sent(),null==t||t(i),[3/*break*/,5];case 5:return[2/*return*/]}}))}))}),[e,t]);return xF((function(){i()}),[i]),r},TF=y().useEffect,OF=y().useMemo,NF=i(3282),IF=i.n(NF),AF=function(){return AF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},AF.apply(this,arguments)},RF=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},MF=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},DF=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},LF=y().useCallback,FF=y().useEffect,jF=y().useMemo,BF=y().useState,UF="__authing__multiple_accounts",qF=["email","phone","password","phone-code","email-code","ad","ldap","ldap-password","ldap-email","ldap-phone"],VF=["wechat-miniprogram-qrcode","wechatmp-qrcode","app-qrcode"],zF=VF.concat("social"),$F=function(){var e=this;
|
|
27357
27357
|
/**
|
|
27358
27358
|
* 原始的登录账号
|
|
27359
27359
|
*/this.originAccount="",this.originWay="",
|
|
@@ -27754,71 +27754,71 @@ return n.defaultScenes&&!e.includes(n.defaultScenes)?null:y().createElement(Cj,{
|
|
|
27754
27754
|
TB((function(){var e;window.$$guard=Object.assign({},window.$$guard,{viewContext:PB(PB({},null===(e=window.$$guard)||void 0===e?void 0:e.viewContext),{changeModule:o,changeTab:n})})}),[o,n]),TB((function(){var e,n=i.moduleName;t&&(n+=":".concat(t)),window.$$guard=Object.assign({},window.$$guard,{viewContext:PB(PB({},null===(e=window.$$guard)||void 0===e?void 0:e.viewContext),{currentModule:i.moduleName,currentTab:t,currentView:n})}),(null==a?void 0:a.onAfterChangeModule)&&!s&&i&&a.onAfterChangeModule({currentView:n,currentModule:i.moduleName,currentTab:t,data:i.initData})}),[i,t,a,s])}// CONCATENATED MODULE: ./src/BindTotp/index.tsx
|
|
27755
27755
|
var NB,IB=function(){return IB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},IB.apply(this,arguments)},AB=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},RB=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},MB=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};!function(e){e.SECURITY_CODE="securityCode",e.BIND_SUCCESS="bindSuccess"}(NB||(NB={}));var DB=y().useEffect,LB=y().useMemo,FB=y().useState,jB=function(){var e=uL(),t=fL(),n=pL().changeModule,r=tX(),o=r.get,i=r.post,a=mL();OB();var s=_u().t,c=MB(FB(""),2),l=c[0],u=c[1],d=MB(FB(""),2),f=d[0],p=d[1],h=MB(FB(),2),m=h[0],v=h[1],g=MB(FB(NB.SECURITY_CODE),2),b=g[0],w=g[1],C=JL(),E=MB(sj((function(){return AB(void 0,void 0,void 0,(function(){var t,r,a,s,c,l,d,f,h,m;return RB(this,(function(v){switch(v.label){case 0:t={
|
|
27756
27756
|
// type: 'totp',
|
|
27757
|
-
source:"APPLICATION"},r={headers:{authorization:e.mfaToken}},v.label=1;case 1:return v.trys.push([1,3,,4]),[4/*yield*/,o("/api/v2/mfa/authenticator",t,r)];case 2:return a=v.sent(),f=a.code,s=a.message,f===WF.LOGIN_INVALID?(gC.error(s),null==n||n(LL.LOGIN,{}),[2/*return*/]):[3/*break*/,4];case 3:return c=v.sent(),gC.error(null==c?void 0:c.message),[3/*break*/,4];case 4:return v.trys.push([4,6,,7]),[4/*yield*/,i("/api/v2/mfa/totp/associate",t,r)];case 5:return l=v.sent(),d=l.data,f=l.code,h=l.onGuardHandling,200===f?(u(d.recovery_code),p(d.qrcode_data_url)):null==h||h(),[3/*break*/,7];case 6:return m=v.sent(),gC.error(null==m?void 0:m.message),[3/*break*/,7];case 7:return[2/*return*/]}}))}))}),[]),2),k=E[0],S=E[1];DB((function(){S()}),[S]);var x=LB((function(){var e;return(e={})[NB.SECURITY_CODE]=function(e){return y().createElement(CB,IB({},e))},e[NB.BIND_SUCCESS]=function(e){return y().createElement(Bj,IB({},e))},e}),[]),_=LB((function(){return y().createElement(_B,{onBack:function(){null==n||n(LL.MFA,IB(IB({},e),{current:uB.TOTP}))}},s("common.backToVerify"))}),[n,e,s]);return y().createElement(y().Fragment,null,k.loading?y().createElement(fF,null):y().createElement("div",{className:"g2-view-container g2-bind-totp"},_,y().createElement("div",{className:"g2-mfa-content g2-mfa-bindTotp"},k.loading?y().createElement(dF,null):x[b]({mfaToken:e.mfaToken,qrcode:f,secret:l,onBind:function(e){var n,r;a&&e?null===(n=null==t?void 0:t.onLogin)||void 0===n||n.call(t,e,C):m&&(null===(r=null==t?void 0:t.onLogin)||void 0===r||r.call(t,m,C))},onNext:function(e){a||v(e),w(NB.BIND_SUCCESS)},changeModule:n}))))},BB=function(
|
|
27757
|
+
source:"APPLICATION"},r={headers:{authorization:e.mfaToken}},v.label=1;case 1:return v.trys.push([1,3,,4]),[4/*yield*/,o("/api/v2/mfa/authenticator",t,r)];case 2:return a=v.sent(),f=a.code,s=a.message,f===WF.LOGIN_INVALID?(gC.error(s),null==n||n(LL.LOGIN,{}),[2/*return*/]):[3/*break*/,4];case 3:return c=v.sent(),gC.error(null==c?void 0:c.message),[3/*break*/,4];case 4:return v.trys.push([4,6,,7]),[4/*yield*/,i("/api/v2/mfa/totp/associate",t,r)];case 5:return l=v.sent(),d=l.data,f=l.code,h=l.onGuardHandling,200===f?(u(d.recovery_code),p(d.qrcode_data_url)):null==h||h(),[3/*break*/,7];case 6:return m=v.sent(),gC.error(null==m?void 0:m.message),[3/*break*/,7];case 7:return[2/*return*/]}}))}))}),[]),2),k=E[0],S=E[1];DB((function(){S()}),[S]);var x=LB((function(){var e;return(e={})[NB.SECURITY_CODE]=function(e){return y().createElement(CB,IB({},e))},e[NB.BIND_SUCCESS]=function(e){return y().createElement(Bj,IB({},e))},e}),[]),_=LB((function(){return y().createElement(_B,{onBack:function(){null==n||n(LL.MFA,IB(IB({},e),{current:uB.TOTP}))}},s("common.backToVerify"))}),[n,e,s]);return y().createElement(y().Fragment,null,k.loading?y().createElement(fF,null):y().createElement("div",{className:"g2-view-container g2-bind-totp"},_,y().createElement("div",{className:"g2-mfa-content g2-mfa-bindTotp"},k.loading?y().createElement(dF,null):x[b]({mfaToken:e.mfaToken,qrcode:f,secret:l,onBind:function(e){var n,r;a&&e?null===(n=null==t?void 0:t.onLogin)||void 0===n||n.call(t,e,C):m&&(null===(r=null==t?void 0:t.onLogin)||void 0===r||r.call(t,m,C))},onNext:function(e){a||v(e),w(NB.BIND_SUCCESS)},changeModule:n}))))},BB=function(){return BB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},BB.apply(this,arguments)},UB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},qB=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},VB=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},zB=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},$B=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},HB=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},WB=y().useCallback,GB=y().useState,KB=function(e){var t=HB(GB(),2),n=t[0],r=t[1];return WB((function(t,o){return zB(void 0,void 0,void 0,(function(){return $B(this,(function(t){return n&&clearTimeout(n),[2/*return*/,new Promise((function(t,n){var i=setTimeout((function(){e(o,t,n)}),500);r(i)}))]}))}))}),[e,n])},YB=function(){return YB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},YB.apply(this,arguments)},JB=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},ZB=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},QB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},XB=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},eU=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},tU=y().useMemo,nU=function(e){var t,n,r,o=e.checkRepeat,i=void 0!==o&&o,a=e.checkExist,s=void 0!==a&&a,c=e.method,l=e.name,u=e.required,d=e.areaCode,//国际化区号
|
|
27758
27758
|
f=e.isCheckPattern,//国际化区号
|
|
27759
|
-
p=void 0===f||f,h=
|
|
27759
|
+
p=void 0===f||f,h=QB(e,["checkRepeat","checkExist","method","name","required","areaCode","isCheckPattern"]),m=iL(),v=tX().get,g=_u().t,b=tU((function(){var e;return(null===(e=m.internationalSmsConfig)||void 0===e?void 0:e.enabled)&&"phone"===c&&p}),[p,c,null===(t=m.internationalSmsConfig)||void 0===t?void 0:t.enabled]),w=gL(),C=tU((function(){var e;return"email"===c?{field:g("common.emailLabel"),checkRepeatErrorMessage:g("common.checkEmail"),formatErrorMessage:g("common.emailFormatError"),checkExistErrorMessage:g("common.noFindEmail"),pattern:lX.email}:"username"===c?{field:g("common.username"),checkRepeatErrorMessage:g("common.checkUserName"),checkExistErrorMessage:g("common.noFindUsername"),formatErrorMessage:g("common.usernameFormatError"),pattern:lX.username}:"phone"===c?{field:g("common.phone"),checkRepeatErrorMessage:g("common.checkPhone"),checkExistErrorMessage:g("common.noFindPhone"),formatErrorMessage:g("common.phoneFormateError"),pattern:!p&&(null===(e=m.internationalSmsConfig)||void 0===e?void 0:e.enabled)?/^[0-9]*$/:w||lX.phone}:{field:g("common.account"),checkRepeatErrorMessage:g("common.checkCustomName"),checkExistErrorMessage:g("common.noFindUsername"),formatErrorMessage:g("common.customNameFormatError"),pattern:lX.username};
|
|
27760
27760
|
// 自定义字段
|
|
27761
|
-
}),[p,c,null===(n=m.internationalSmsConfig)||void 0===n?void 0:n.enabled,g,w]),E=
|
|
27761
|
+
}),[p,c,null===(n=m.internationalSmsConfig)||void 0===n?void 0:n.enabled,g,w]),E=KB((function(e,t,n){v("/api/v2/users/find",{userPoolId:null==m?void 0:m.userPoolId,key:e,type:c}).then((function(e){var r=e.data;s&&(Boolean(r)?t(!0):n(C.checkExistErrorMessage)),i&&(Boolean(r)?n(C.checkRepeatErrorMessage):t(!0))}))})),k=tU((function(){return b?{validateTrigger:"onBlur",validator:function(e,t){return JB(void 0,void 0,void 0,(function(){return ZB(this,(function(e){return!t||(0,uj.phone)(t,{country:d}).isValid?[2/*return*/,Promise.resolve()]:[2/*return*/,Promise.reject(g("common.internationPhoneMessage"))]}))}))}}:{validateTrigger:"onBlur",pattern:C.pattern,message:C.formatErrorMessage}}),[d,b,C.formatErrorMessage,C.pattern,g]),S=tU((function(){
|
|
27762
27762
|
// 如果不是必填就不校验
|
|
27763
27763
|
if(!1===u)return[];
|
|
27764
27764
|
// 必填项的默认校验规则
|
|
27765
|
-
var e=
|
|
27765
|
+
var e=eU([],XB(dX(C.field)),!1);
|
|
27766
27766
|
// 格式校验
|
|
27767
27767
|
return e.push(k),
|
|
27768
27768
|
// 是否校验重复
|
|
27769
|
-
(i||s)&&e.push({validator:E,validateTrigger:[]}),e}),[u,C.field,k,i,s,E]);return y().createElement(cT.Item,
|
|
27770
|
-
/* harmony default export */const
|
|
27771
|
-
var aU
|
|
27769
|
+
(i||s)&&e.push({validator:E,validateTrigger:[]}),e}),[u,C.field,k,i,s,E]);return y().createElement(cT.Item,YB({validateFirst:!0,validateTrigger:["onBlur","onChange"],rules:eU(eU([],XB(S),!1),XB(null!==(r=null==h?void 0:h.rules)&&void 0!==r?r:[]),!1),name:null!=l?l:c},h))},rU=cT.Item;rU.Password=function(e){var t,n=e.rules,r=e.fieldRequiredRuleMessage,o=UB(e,["rules","fieldRequiredRuleMessage"]),i=iL(),a=uL(),s=i.passwordStrength,c=i.customPasswordStrength,l=a.passwordStrength,u=a.customPasswordStrength,d=a.userId;return(l||u)&&(s=l,c=u),i?y().createElement(cT.Item,BB({validateTrigger:["onChange","onBlur"],validateFirst:!0,name:"password",rules:VB(VB([],qB(null!==(t=EX(s,c,r,d))&&void 0!==t?t:[]),!1),qB(null!=n?n:[]),!1)},o)):y().createElement(cT.Item,BB({},e))},rU.Email=function(e){return y().createElement(nU,YB({required:!0,method:"email"},e))},rU.Phone=function(e){return y().createElement(nU,YB({required:!0,method:"phone"},e))},rU.UserName=function(e){return y().createElement(nU,YB({required:!0,method:"username"},e))},rU.CustomName=function(e){return y().createElement(nU,YB({required:!0},e))};
|
|
27770
|
+
/* harmony default export */const oU=rU;// CONCATENATED MODULE: ./src/InputPassword/index.tsx
|
|
27771
|
+
var iU,aU=function(){return aU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},aU.apply(this,arguments)},sU=function(e){return y().createElement(oO.Password,aU({autoComplete:"off"},e,{iconRender:function(e){return y().createElement("span",{style:{display:"flex",height:"100%",alignItems:"center"}},e?y().createElement(JD,{type:"authing-a-eye-line1"}):y().createElement(JD,{type:"authing-a-eye-close-line1"}))}}))},cU=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},lU=y().useState,uU=function(){var e=_u().t,t=cU(lU(!1),2),n=t[0];return{setPasswordErrorTextShow:t[1],getPassWordUnsafeText:function(){return y().createElement(y().Fragment,null,n?y().createElement("div",{style:{marginBottom:23,fontSize:12,color:"#E8353E",display:"block"}},e("common.passwordUnsafeTip")):y().createElement(y().Fragment,null))}}},dU=function(){return dU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},dU.apply(this,arguments)},fU=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},pU=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},hU=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},mU=y().useRef,vU=y().useCallback,gU=function(){var e=_u().t,t=fL(),n=hU(cT.useForm(),1)[0],r=vj().isPhoneMedia,o=eX().post,i=uL(),a=i.businessRequestName,s=i.content,c=i.isChangeComplete,l=i.onRegisterSuccess,u=i.onRegisterFailed,d=mU(null),f=pL().changeModule,p=iL().publicKey,h=JL().options.encryptFunction,m=uU(),v=m.getPassWordUnsafeText,g=m.setPasswordErrorTextShow,b=vU((function(e){return fU(void 0,void 0,void 0,(function(){var n,r,i,m,v,y,b,w,C,E,k,S,x,_;return pU(this,(function(P){switch(P.label){case 0:return[4/*yield*/,h(e.password,p)];case 1:return n=P.sent(),null===(C=d.current)||void 0===C||C.onSpin(!0),c?(
|
|
27772
27772
|
// 需要进行信息补全
|
|
27773
|
-
null==f||f(LL.REGISTER_COMPLETE_INFO,{businessRequestName:a,content:fU(fU({},s),{password:n}),onRegisterSuccess:l,onRegisterFailed:u}),[2/*return*/]):[3/*break*/,2];case 2:return P.trys.push([2,7,,8]),"registerByEmailCode"!==a?[3/*break*/,4]:[4/*yield*/,o("/api/v2/register-email-code",fU(fU({},s),{password:n,postUserInfoPipeline:!1}))];case 3:return r=P.sent(),v=r.statusCode,y=r.apiCode,m=r.data,b=r.onGuardHandling,w=r.message,d.current.onSpin(!1),200===v?l(m):(v===TQ.UNSAFE_PASSWORD_TIP&&g(!0),null==b||b(),u(y,m,w),null===(E=null==t?void 0:t.onRegisterError)||void 0===E||E.call(t,{code:y,data:m,message:w})),[3/*break*/,6];case 4:return"registerByPhoneCode"!==a?[3/*break*/,6]:[4/*yield*/,o("/api/v2/register-phone-code",fU(fU({},s),{password:n,postUserInfoPipeline:!1}))];case 5:i=P.sent(),m=i.data,v=i.statusCode,y=i.apiCode,b=i.onGuardHandling,w=i.message,200===v?(null===(k=d.current)||void 0===k||k.onSpin(!1),l(m)):(y===TQ.UNSAFE_PASSWORD_TIP&&g(!0),null==b||b(),null===(S=d.current)||void 0===S||S.onSpin(!1),u(y,m,w),null===(x=null==t?void 0:t.onRegisterError)||void 0===x||x.call(t,{apiCode:y,data:m,message:w})),P.label=6;case 6:return[3/*break*/,8];case 7:return P.sent(),null===(_=d.current)||void 0===_||_.onSpin(!1),[3/*break*/,8];case 8:return[2/*return*/]}}))}))}),[a,f,s,h,t,c,u,l,o,p,g]);return y().createElement("div",{className:"authing-g2-login-phone-code"},y().createElement(cT,{name:"resetPassword",form:n,onFinish:b,onFinishFailed:function(){var e;null===(e=null==d?void 0:d.current)||void 0===e||e.onError()},autoComplete:"off"},y().createElement(iU.Password,{className:"authing-g2-input-form",name:"password",required:!0},y().createElement(cU,{autoFocus:!r,className:"authing-g2-input",size:"large",placeholder:e("login.inputPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password2",rules:[{validator:function(t,r){var o=n.getFieldValue("password");return r?r!==o?Promise.reject(e("common.repeatPasswordDoc")):Promise.resolve():Promise.reject(e("login.inputPwd"))}}]},y().createElement(cU,{className:"authing-g2-input",size:"large",placeholder:e("login.inputPwdAgain"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),v(),y().createElement(cT.Item,{className:"authing-g2-sumbit-form submit-form"},y().createElement(Tj,{className:"forget-password",text:e("common.confirm"),ref:d}))))},bU=function(){return bU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bU.apply(this,arguments)},wU=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},CU=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};!function(e){e.ResetPassword="reset-password-first-time",e.FirstLoginReset="reset-password-forced",e.ResetPasswordStrengthDetection="reset-password-strength-detection"}(aU||(aU={}));var EU,kU,SU,xU,_U=function(e,t){return wU(void 0,void 0,void 0,(function(){return CU(this,(function(n){switch(n.label){case 0:return[4/*yield*/,(0,eX().authFlow)(e,bU({},t))];case 1:return[2/*return*/,n.sent()]}}))}))},PU=function(){return PU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},PU.apply(this,arguments)},TU=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},OU=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},NU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},IU=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},AU=y().useState,RU=y().useRef,MU=y().useEffect,DU=y().useMemo,LU=function(e){var t,n,r=_u().t,o=e.sendDesc,i=void 0===o?r("login.reSent"):o,a=e.beforeSend,s=e.btnRef,c=e.setSent,l=NU(e,["sendDesc","beforeSend","btnRef","setSent"]),u=null!==(t=su.resolvedLanguage)&&void 0!==t?t:su.language,d=function(e){var t=IU(AU(0),2),n=t[0],r=t[1],o=RU(0);return MU((function(){return function(){return clearInterval(o.current)}}),[]),MU((function(){n<=0?(clearInterval(o.current),null==e||e(!1)):null==e||e(!0)}),[n,e]),{enabled:DU((function(){return n<=0}),[n]),send:function(){r(60),o.current=setInterval((function(){r((function(e){return e-1}))}),1e3)},countDown:n}}(c),f=d.enabled,p=d.send,h=d.countDown,m=IU(AU(!1),2),v=m[0],g=m[1],b=DU((function(){return!f||v}),[f,v]);return y().createElement(ly,PU({},l,{className:"".concat(null!==(n=l.type)&&void 0!==n?n:"authing-g2-send-code-btn g2-loading-btn-center"," ").concat("ja-JP"===u?"send-code-btn-jp":""),disabled:b,loading:v,onClick:function(e){return TU(void 0,void 0,void 0,(function(){return OU(this,(function(e){switch(e.label){case 0:return g(!0),b?[2/*return*/]:[4/*yield*/,a()];case 1:return!e.sent()?(g(!1),[2/*return*/]):(g(!1),p(),[2/*return*/])}}))}))},ref:s}),!0===v&&y().createElement("span",null),!1===v&&y().createElement("span",null,f?i:r("common.retryAfterTime",{time:h})))},FU=function(){return FU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},FU.apply(this,arguments)},jU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},BU=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},UU=y().useEffect,qU=y().useState,VU=function(e){return/^[0-9]*$/.test(String(e))},zU=y().forwardRef((function(e,t){var n=e.onChange,r=e.value,o=jU(e,["onChange","value"]),i=BU(qU(VU(r)?r:""),2),a=i[0],s=i[1];return UU((function(){s(VU(r)?r:"")}),[r]),y().createElement(oO,FU({autoComplete:"off"},o,{ref:t,value:a,type:"tel",pattern:"[0-9]*",onChange:function(e){var t=e.target.value;/^[0-9]*$/.test(t)&&function(e){s(e.target.value),null==n||n(e)}(e)}}))})),$U=function(){return $U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},$U.apply(this,arguments)},HU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},WU=function(e){var t,n=e.value,r=e.onChange,o=e.autoSubmit,i=void 0!==o&&o,a=e.form,s=e.beforeSend,c=e.maxLength,l=HU(e,["value","onChange","autoSubmit","form","beforeSend","maxLength"]),u=_u().t,d=null!==(t=su.resolvedLanguage)&&void 0!==t?t:su.language;return y().createElement(y().Fragment,null,y().createElement(FA,{justify:"space-between",align:"middle"},y().createElement(sw,{span:/ja/.test(d)?9:15,className:"g2-send-code-input-col"},y().createElement(zU,$U({value:n,onChange:function(e){null==r||r(e),i&&c&&e.target.value.length>=c&&(null==a||a.submit())}},l,{maxLength:c}))),y().createElement(sw,{offset:1,span:/ja/.test(d)?14:8},y().createElement(LU,{beforeSend:s,sendDesc:u("common.sendVerifyCode")}))))},GU=function(){return GU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},GU.apply(this,arguments)},KU=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},YU=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},JU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},ZU=function(e){var t=e.scene,n=e.data,r=e.form,o=e.areaCode,i=e.onSendCodeBefore,a=e.onSendCodeAfter,s=e.fieldName,c=e.isInternationSms,l=void 0!==c&&c,u=e.codeFieldName,d=e.captchaCode,f=JU(e,["scene","data","form","areaCode","onSendCodeBefore","onSendCodeAfter","fieldName","isInternationSms","codeFieldName","captchaCode"]),p=_u().t,h=JL(),m=fL(),v=tX().post,g=function(e,n,r){return KU(void 0,void 0,void 0,(function(){var o,i,a,s,c,l;return YU(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4/*yield*/,v("/api/v2/sms/send",{phone:e,phoneCountryCode:n,scene:t,captchaCode:r})];case 1:
|
|
27773
|
+
null==f||f(LL.REGISTER_COMPLETE_INFO,{businessRequestName:a,content:dU(dU({},s),{password:n}),onRegisterSuccess:l,onRegisterFailed:u}),[2/*return*/]):[3/*break*/,2];case 2:return P.trys.push([2,7,,8]),"registerByEmailCode"!==a?[3/*break*/,4]:[4/*yield*/,o("/api/v2/register-email-code",dU(dU({},s),{password:n,postUserInfoPipeline:!1}))];case 3:return r=P.sent(),v=r.statusCode,y=r.apiCode,m=r.data,b=r.onGuardHandling,w=r.message,d.current.onSpin(!1),200===v?l(m):(v===TQ.UNSAFE_PASSWORD_TIP&&g(!0),null==b||b(),u(y,m,w),null===(E=null==t?void 0:t.onRegisterError)||void 0===E||E.call(t,{code:y,data:m,message:w})),[3/*break*/,6];case 4:return"registerByPhoneCode"!==a?[3/*break*/,6]:[4/*yield*/,o("/api/v2/register-phone-code",dU(dU({},s),{password:n,postUserInfoPipeline:!1}))];case 5:i=P.sent(),m=i.data,v=i.statusCode,y=i.apiCode,b=i.onGuardHandling,w=i.message,200===v?(null===(k=d.current)||void 0===k||k.onSpin(!1),l(m)):(y===TQ.UNSAFE_PASSWORD_TIP&&g(!0),null==b||b(),null===(S=d.current)||void 0===S||S.onSpin(!1),u(y,m,w),null===(x=null==t?void 0:t.onRegisterError)||void 0===x||x.call(t,{apiCode:y,data:m,message:w})),P.label=6;case 6:return[3/*break*/,8];case 7:return P.sent(),null===(_=d.current)||void 0===_||_.onSpin(!1),[3/*break*/,8];case 8:return[2/*return*/]}}))}))}),[a,f,s,h,t,c,u,l,o,p,g]);return y().createElement("div",{className:"authing-g2-login-phone-code"},y().createElement(cT,{name:"resetPassword",form:n,onFinish:b,onFinishFailed:function(){var e;null===(e=null==d?void 0:d.current)||void 0===e||e.onError()},autoComplete:"off"},y().createElement(oU.Password,{className:"authing-g2-input-form",name:"password",required:!0},y().createElement(sU,{autoFocus:!r,className:"authing-g2-input",size:"large",placeholder:e("login.inputPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password2",rules:[{validator:function(t,r){var o=n.getFieldValue("password");return r?r!==o?Promise.reject(e("common.repeatPasswordDoc")):Promise.resolve():Promise.reject(e("login.inputPwd"))}}]},y().createElement(sU,{className:"authing-g2-input",size:"large",placeholder:e("login.inputPwdAgain"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),v(),y().createElement(cT.Item,{className:"authing-g2-sumbit-form submit-form"},y().createElement(Tj,{className:"forget-password",text:e("common.confirm"),ref:d}))))},yU=function(){return yU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},yU.apply(this,arguments)},bU=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},wU=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};!function(e){e.ResetPassword="reset-password-first-time",e.FirstLoginReset="reset-password-forced",e.ResetPasswordStrengthDetection="reset-password-strength-detection"}(iU||(iU={}));var CU,EU,kU,SU,xU=function(e,t){return bU(void 0,void 0,void 0,(function(){return wU(this,(function(n){switch(n.label){case 0:return[4/*yield*/,(0,eX().authFlow)(e,yU({},t))];case 1:return[2/*return*/,n.sent()]}}))}))},_U=function(){return _U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},_U.apply(this,arguments)},PU=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},TU=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},OU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},NU=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},IU=y().useState,AU=y().useRef,RU=y().useEffect,MU=y().useMemo,DU=function(e){var t,n,r=_u().t,o=e.sendDesc,i=void 0===o?r("login.reSent"):o,a=e.beforeSend,s=e.btnRef,c=e.setSent,l=OU(e,["sendDesc","beforeSend","btnRef","setSent"]),u=null!==(t=su.resolvedLanguage)&&void 0!==t?t:su.language,d=function(e){var t=NU(IU(0),2),n=t[0],r=t[1],o=AU(0);return RU((function(){return function(){return clearInterval(o.current)}}),[]),RU((function(){n<=0?(clearInterval(o.current),null==e||e(!1)):null==e||e(!0)}),[n,e]),{enabled:MU((function(){return n<=0}),[n]),send:function(){r(60),o.current=setInterval((function(){r((function(e){return e-1}))}),1e3)},countDown:n}}(c),f=d.enabled,p=d.send,h=d.countDown,m=NU(IU(!1),2),v=m[0],g=m[1],b=MU((function(){return!f||v}),[f,v]);return y().createElement(ly,_U({},l,{className:"".concat(null!==(n=l.type)&&void 0!==n?n:"authing-g2-send-code-btn g2-loading-btn-center"," ").concat("ja-JP"===u?"send-code-btn-jp":""),disabled:b,loading:v,onClick:function(e){return PU(void 0,void 0,void 0,(function(){return TU(this,(function(e){switch(e.label){case 0:return g(!0),b?[2/*return*/]:[4/*yield*/,a()];case 1:return!e.sent()?(g(!1),[2/*return*/]):(g(!1),p(),[2/*return*/])}}))}))},ref:s}),!0===v&&y().createElement("span",null),!1===v&&y().createElement("span",null,f?i:r("common.retryAfterTime",{time:h})))},LU=function(){return LU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},LU.apply(this,arguments)},FU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},jU=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},BU=y().useEffect,UU=y().useState,qU=function(e){return/^[0-9]*$/.test(String(e))},VU=y().forwardRef((function(e,t){var n=e.onChange,r=e.value,o=FU(e,["onChange","value"]),i=jU(UU(qU(r)?r:""),2),a=i[0],s=i[1];return BU((function(){s(qU(r)?r:"")}),[r]),y().createElement(oO,LU({autoComplete:"off"},o,{ref:t,value:a,type:"tel",pattern:"[0-9]*",onChange:function(e){var t=e.target.value;/^[0-9]*$/.test(t)&&function(e){s(e.target.value),null==n||n(e)}(e)}}))})),zU=function(){return zU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},zU.apply(this,arguments)},$U=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},HU=function(e){var t,n=e.value,r=e.onChange,o=e.autoSubmit,i=void 0!==o&&o,a=e.form,s=e.beforeSend,c=e.maxLength,l=$U(e,["value","onChange","autoSubmit","form","beforeSend","maxLength"]),u=_u().t,d=null!==(t=su.resolvedLanguage)&&void 0!==t?t:su.language;return y().createElement(y().Fragment,null,y().createElement(FA,{justify:"space-between",align:"middle"},y().createElement(sw,{span:/ja/.test(d)?9:15,className:"g2-send-code-input-col"},y().createElement(VU,zU({value:n,onChange:function(e){null==r||r(e),i&&c&&e.target.value.length>=c&&(null==a||a.submit())}},l,{maxLength:c}))),y().createElement(sw,{offset:1,span:/ja/.test(d)?14:8},y().createElement(DU,{beforeSend:s,sendDesc:u("common.sendVerifyCode")}))))},WU=function(){return WU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},WU.apply(this,arguments)},GU=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},KU=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},YU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},JU=function(e){var t=e.scene,n=e.data,r=e.form,o=e.areaCode,i=e.onSendCodeBefore,a=e.onSendCodeAfter,s=e.fieldName,c=e.isInternationSms,l=void 0!==c&&c,u=e.codeFieldName,d=e.captchaCode,f=YU(e,["scene","data","form","areaCode","onSendCodeBefore","onSendCodeAfter","fieldName","isInternationSms","codeFieldName","captchaCode"]),p=_u().t,h=JL(),m=fL(),v=tX().post,g=function(e,n,r){return GU(void 0,void 0,void 0,(function(){var o,i,a,s,c,l;return KU(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4/*yield*/,v("/api/v2/sms/send",{phone:e,phoneCountryCode:n,scene:t,captchaCode:r})];case 1:
|
|
27774
27774
|
// 200 表示请求成功,不报错
|
|
27775
27775
|
return o=u.sent(),i=o.code,a=o.statusCode,s=o.message,200===a||200===i?[2/*return*/,{status:!0}]:
|
|
27776
27776
|
// 由于使用项目中 post 方法进行请求,外层进行了处理,不会抛错,catch 不会走,在这对 code 进行针对处理
|
|
27777
27777
|
// 'ECONNABORTED' 不知道是不是只有 sdk 报错,所以我在接口这也写了,防止接口也会1报这个错
|
|
27778
27778
|
"ECONNABORTED"===i?(gC.error(p("login.sendCodeTimeout")),[2/*return*/,{status:!1,error:o}]):(
|
|
27779
27779
|
// code 不是 -1、-2 时,并且 msg 存在, 那么进行报错
|
|
27780
|
-
-1!==i&&-2!==i&&s&&gC.error(s),[2/*return*/,{status:!1,error:o}]);case 2:if("ECONNABORTED"===(c=u.sent()).code)return gC.error(p("login.sendCodeTimeout")),[2/*return*/,{status:!1,error:c}];try{l=JSON.parse(c.message),gC.error(l.message)}catch(e){gC.error(c)}return[2/*return*/,{status:!1,error:c}];case 3:return[2/*return*/]}}))}))};return y().createElement(y().Fragment,null,y().createElement(WU,GU({beforeSend:function(){return i().then((function(e){return KU(void 0,void 0,void 0,(function(){var e,i,c,f,p,v,y,b,w,C;return YU(this,(function(E){switch(E.label){case 0:return e=r?r.getFieldValue(s||"phone"):n,i=gj(l,e,o),c=i.phoneNumber,f=i.countryCode,p=r?null==r?void 0:r.getFieldValue(u||"captchaCode"):d,[4/*yield*/,g(c,f,p)];case 1:return v=E.sent(),y=v.status,b=v.error,null==a||a(),y?null===(w=null==m?void 0:m.onPhoneSend)||void 0===w||w.call(m,h,t):null===(C=null==m?void 0:m.onPhoneSendError)||void 0===C||C.call(m,b,h,t),[2/*return*/,y]}}))}))})).catch((function(e){var n;return null==a||a(),null===(n=null==m?void 0:m.onPhoneSendError)||void 0===n||n.call(m,e,h,t),!1}))},form:r},f)))},QU=function(){return QU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},QU.apply(this,arguments)},XU=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},eq=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},tq=function(e){var t,n,r=_u().t,o=null!==(t=e.publicConfig.verifyCodeLength)&&void 0!==t?t:4,i=(null===(n=e.publicConfig.internationalSmsConfig)||void 0===n?void 0:n.enabled)||!1,a=uL().phone;return y().createElement("div",{className:"authing-g2-login-phone-code"},y().createElement(ZU,QU({},e,{isInternationSms:i,className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:r("login.resetPassword.inputFourVerifyCode",{length:o}),prefix:y().createElement(JD,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:Ni.SCENE_TYPE_RESET,maxLength:o,data:a,onSendCodeBefore:function(){return XU(void 0,void 0,void 0,(function(){return eq(this,(function(e){return[2/*return*/]}))}))}})))},nq=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},rq=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},oq=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},iq=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},aq=y().useRef,sq=function(e){var t=e.onReset,n=_u().t,r=uL(),o=mL(),i=iL(),a=i.publicKey,s=oq(cT.useForm(),1)[0],c=JL(),l=c.options.encryptFunction,u=vj().isPhoneMedia,d=aq(null),f=dU(),p=f.getPassWordUnsafeText,h=f.setPasswordErrorTextShow;return y().createElement("div",{className:"authing-g2-login-phone-code"},y().createElement(cT,{name:"resetPassword",form:s,onFinish:function(e){return nq(void 0,void 0,void 0,(function(){var n,i,s,u,f,p,m,v,g,y,b,w,C,E;return rq(this,(function(k){switch(k.label){case 0:return n=e.password,null===(y=d.current)||void 0===y||y.onSpin(!0),o?(g={},[4/*yield*/,l(n,a)]):[3/*break*/,3];case 1:return g.password=k.sent(),i=g,e.code&&(i.code=e.code),[4/*yield*/,_U(aU.FirstLoginReset,i)];case 2:return s=k.sent(),u=s.apiCode,f=s.onGuardHandling,p=s.message,null===(b=d.current)||void 0===b||b.onSpin(!1),u===TQ.ABORT_FLOW?t():u===TQ.UNSAFE_PASSWORD_TIP?(gC.error(p),h(!0)):(null===(w=d.current)||void 0===w||w.onError(),null==f||f()),[3/*break*/,7];case 3:return k.trys.push([3,5,6,7]),[4/*yield*/,c.resetPasswordByFirstLoginToken({token:r.token,password:n})];case 4:return m=k.sent(),t(m),[3/*break*/,7];case 5:return v=k.sent(),gC.error(v.message),null===(C=null==d?void 0:d.current)||void 0===C||C.onError(),[3/*break*/,7];case 6:return null===(E=d.current)||void 0===E||E.onSpin(!1),[7/*endfinally*/];case 7:return[2/*return*/]}}))}))},onFinishFailed:function(){var e;null===(e=null==d?void 0:d.current)||void 0===e||e.onError()},autoComplete:"off"},(null==r?void 0:r.enableFirstLoginResetPasswordVerifyPhone)&&(null==r?void 0:r.phone)&&y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"code",rules:iq([],oq(dX(n("common.captchaCode"))),!1)},y().createElement(tq,{publicConfig:i})),y().createElement(iU.Password,{className:"authing-g2-input-form",name:"password",required:!0},y().createElement(cU,{autoFocus:!u,className:"authing-g2-input",size:"large",placeholder:n("login.inputNewPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password2",rules:[{validator:function(e,t){var r=s.getFieldValue("password");return t?t!==r?Promise.reject(n("common.repeatPasswordDoc")):Promise.resolve():Promise.reject(n("login.inputPwd"))}}]},y().createElement(cU,{className:"authing-g2-input",size:"large",placeholder:n("login.inputPwdAgain"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),p(),y().createElement(cT.Item,{className:"authing-g2-sumbit-form submit-form"},y().createElement(Tj,{className:"forget-password",text:n("common.confirm"),ref:d}))))},cq=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},lq=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},uq=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},dq=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},fq=y().useRef,pq=function(e){var t=_u().t,n=e.onReset,r=e.onFinishCallBack,o=uq(cT.useForm(),1)[0],i=iL().publicKey,a=JL(),s=vj().isPhoneMedia,c=a.options.encryptFunction,l=mL(),u=fq(null),d=uL(),f=dU(),p=f.getPassWordUnsafeText,h=f.setPasswordErrorTextShow;return y().createElement("div",{className:"authing-g2-login-phone-code"},y().createElement(cT,{name:"resetPassword",form:o,onFinish:function(t){return cq(void 0,void 0,void 0,(function(){var o,s,f,p,m,v,g,y,b,w,C,E,k,S,x,_,P;return lq(this,(function(T){switch(T.label){case 0:return r instanceof Function?[4/*yield*/,r(t)]:[3/*break*/,2];case 1:return(o=T.sent()).code===TQ.UNSAFE_PASSWORD_TIP&&(gC.error(o.message),h(!0)),[2/*return*/];case 2:return s=t.password,f=t.oldPassword,null===(k=null==u?void 0:u.current)||void 0===k||k.onSpin(!0),l?(y=_U,b=[aU.ResetPassword],E={},[4/*yield*/,c(s,i)]):[3/*break*/,6];case 3:return E.password=T.sent(),[4/*yield*/,c(f,i)];case 4:return[4/*yield*/,y.apply(void 0,b.concat([(E.oldPassword=T.sent(),E)]))];case 5:return p=T.sent(),m=p.apiCode,v=p.onGuardHandling,g=p.message,null===(S=null==u?void 0:u.current)||void 0===S||S.onSpin(!1),
|
|
27780
|
+
-1!==i&&-2!==i&&s&&gC.error(s),[2/*return*/,{status:!1,error:o}]);case 2:if("ECONNABORTED"===(c=u.sent()).code)return gC.error(p("login.sendCodeTimeout")),[2/*return*/,{status:!1,error:c}];try{l=JSON.parse(c.message),gC.error(l.message)}catch(e){gC.error(c)}return[2/*return*/,{status:!1,error:c}];case 3:return[2/*return*/]}}))}))};return y().createElement(y().Fragment,null,y().createElement(HU,WU({beforeSend:function(){return i().then((function(e){return GU(void 0,void 0,void 0,(function(){var e,i,c,f,p,v,y,b,w,C;return KU(this,(function(E){switch(E.label){case 0:return e=r?r.getFieldValue(s||"phone"):n,i=gj(l,e,o),c=i.phoneNumber,f=i.countryCode,p=r?null==r?void 0:r.getFieldValue(u||"captchaCode"):d,[4/*yield*/,g(c,f,p)];case 1:return v=E.sent(),y=v.status,b=v.error,null==a||a(),y?null===(w=null==m?void 0:m.onPhoneSend)||void 0===w||w.call(m,h,t):null===(C=null==m?void 0:m.onPhoneSendError)||void 0===C||C.call(m,b,h,t),[2/*return*/,y]}}))}))})).catch((function(e){var n;return null==a||a(),null===(n=null==m?void 0:m.onPhoneSendError)||void 0===n||n.call(m,e,h,t),!1}))},form:r},f)))},ZU=function(){return ZU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ZU.apply(this,arguments)},QU=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},XU=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},eq=function(e){var t,n,r=_u().t,o=null!==(t=e.publicConfig.verifyCodeLength)&&void 0!==t?t:4,i=(null===(n=e.publicConfig.internationalSmsConfig)||void 0===n?void 0:n.enabled)||!1,a=uL().phone;return y().createElement("div",{className:"authing-g2-login-phone-code"},y().createElement(JU,ZU({},e,{isInternationSms:i,className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:r("login.resetPassword.inputFourVerifyCode",{length:o}),prefix:y().createElement(JD,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:Ni.SCENE_TYPE_RESET,maxLength:o,data:a,onSendCodeBefore:function(){return QU(void 0,void 0,void 0,(function(){return XU(this,(function(e){return[2/*return*/]}))}))}})))},tq=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},nq=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},rq=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},oq=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},iq=y().useRef,aq=function(e){var t=e.onReset,n=_u().t,r=uL(),o=mL(),i=iL(),a=i.publicKey,s=rq(cT.useForm(),1)[0],c=JL(),l=c.options.encryptFunction,u=vj().isPhoneMedia,d=iq(null),f=uU(),p=f.getPassWordUnsafeText,h=f.setPasswordErrorTextShow;return y().createElement("div",{className:"authing-g2-login-phone-code"},y().createElement(cT,{name:"resetPassword",form:s,onFinish:function(e){return tq(void 0,void 0,void 0,(function(){var n,i,s,u,f,p,m,v,g,y,b,w,C,E;return nq(this,(function(k){switch(k.label){case 0:return n=e.password,null===(y=d.current)||void 0===y||y.onSpin(!0),o?(g={},[4/*yield*/,l(n,a)]):[3/*break*/,3];case 1:return g.password=k.sent(),i=g,e.code&&(i.code=e.code),[4/*yield*/,xU(iU.FirstLoginReset,i)];case 2:return s=k.sent(),u=s.apiCode,f=s.onGuardHandling,p=s.message,null===(b=d.current)||void 0===b||b.onSpin(!1),u===TQ.ABORT_FLOW?t():u===TQ.UNSAFE_PASSWORD_TIP?(gC.error(p),h(!0)):(null===(w=d.current)||void 0===w||w.onError(),null==f||f()),[3/*break*/,7];case 3:return k.trys.push([3,5,6,7]),[4/*yield*/,c.resetPasswordByFirstLoginToken({token:r.token,password:n})];case 4:return m=k.sent(),t(m),[3/*break*/,7];case 5:return v=k.sent(),gC.error(v.message),null===(C=null==d?void 0:d.current)||void 0===C||C.onError(),[3/*break*/,7];case 6:return null===(E=d.current)||void 0===E||E.onSpin(!1),[7/*endfinally*/];case 7:return[2/*return*/]}}))}))},onFinishFailed:function(){var e;null===(e=null==d?void 0:d.current)||void 0===e||e.onError()},autoComplete:"off"},(null==r?void 0:r.enableFirstLoginResetPasswordVerifyPhone)&&(null==r?void 0:r.phone)&&y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"code",rules:oq([],rq(dX(n("common.captchaCode"))),!1)},y().createElement(eq,{publicConfig:i})),y().createElement(oU.Password,{className:"authing-g2-input-form",name:"password",required:!0},y().createElement(sU,{autoFocus:!u,className:"authing-g2-input",size:"large",placeholder:n("login.inputNewPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password2",rules:[{validator:function(e,t){var r=s.getFieldValue("password");return t?t!==r?Promise.reject(n("common.repeatPasswordDoc")):Promise.resolve():Promise.reject(n("login.inputPwd"))}}]},y().createElement(sU,{className:"authing-g2-input",size:"large",placeholder:n("login.inputPwdAgain"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),p(),y().createElement(cT.Item,{className:"authing-g2-sumbit-form submit-form"},y().createElement(Tj,{className:"forget-password",text:n("common.confirm"),ref:d}))))},sq=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},cq=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},lq=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},uq=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},dq=y().useRef,fq=function(e){var t=_u().t,n=e.onReset,r=e.onFinishCallBack,o=lq(cT.useForm(),1)[0],i=iL().publicKey,a=JL(),s=vj().isPhoneMedia,c=a.options.encryptFunction,l=mL(),u=dq(null),d=uL(),f=uU(),p=f.getPassWordUnsafeText,h=f.setPasswordErrorTextShow;return y().createElement("div",{className:"authing-g2-login-phone-code"},y().createElement(cT,{name:"resetPassword",form:o,onFinish:function(t){return sq(void 0,void 0,void 0,(function(){var o,s,f,p,m,v,g,y,b,w,C,E,k,S,x,_,P;return cq(this,(function(T){switch(T.label){case 0:return r instanceof Function?[4/*yield*/,r(t)]:[3/*break*/,2];case 1:return(o=T.sent()).code===TQ.UNSAFE_PASSWORD_TIP&&(gC.error(o.message),h(!0)),[2/*return*/];case 2:return s=t.password,f=t.oldPassword,null===(k=null==u?void 0:u.current)||void 0===k||k.onSpin(!0),l?(y=xU,b=[iU.ResetPassword],E={},[4/*yield*/,c(s,i)]):[3/*break*/,6];case 3:return E.password=T.sent(),[4/*yield*/,c(f,i)];case 4:return[4/*yield*/,y.apply(void 0,b.concat([(E.oldPassword=T.sent(),E)]))];case 5:return p=T.sent(),m=p.apiCode,v=p.onGuardHandling,g=p.message,null===(S=null==u?void 0:u.current)||void 0===S||S.onSpin(!1),
|
|
27781
27781
|
// 重置密码 返回的是流程终止
|
|
27782
|
-
m===TQ.ABORT_FLOW?n():m===TQ.UNSAFE_PASSWORD_TIP?(gC.error(g),h(!0)):(null===(x=null==u?void 0:u.current)||void 0===x||x.onError(),null==v||v()),[3/*break*/,10];case 6:return T.trys.push([6,8,9,10]),[4/*yield*/,a.resetPasswordByForceResetToken({token:d.token,newPassword:s,oldPassword:f})];case 7:return w=T.sent(),e.onReset({code:200,data:w}),[3/*break*/,10];case 8:return C=T.sent(),gC.error(C.message),null===(_=null==u?void 0:u.current)||void 0===_||_.onError(),[3/*break*/,10];case 9:return null===(P=null==u?void 0:u.current)||void 0===P||P.onSpin(!1),[7/*endfinally*/];case 10:return[2/*return*/]}}))}))},onFinishFailed:function(){var e;null===(e=null==u?void 0:u.current)||void 0===e||e.onError()},autoComplete:"off"},y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"oldPassword",rules:dq([],uq(dX(t("common.password"))),!1)},y().createElement(cU,{autoFocus:!s,className:"authing-g2-input",size:"large",placeholder:t("user.inputCurrPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),y().createElement(iU.Password,{className:"authing-g2-input-form",name:"password"},y().createElement(cU,{className:"authing-g2-input",size:"large",placeholder:t("login.inputNewPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),y().createElement(iU.Password,{className:"authing-g2-input-form",name:"password2",rules:[{validator:function(e,n){var r=o.getFieldValue("password");return n?n!==r?Promise.reject(t("common.repeatPasswordDoc")):Promise.resolve():Promise.reject(t("login.inputPwd"))}}]},y().createElement(cU,{className:"authing-g2-input",size:"large",placeholder:t("login.inputPwdAgain"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),p(),y().createElement(cT.Item,{className:"authing-g2-sumbit-form submit-form"},y().createElement(Tj,{className:"forget-password",text:t("common.confirm"),ref:u}))))},hq=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},mq=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},vq=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},gq=y().useRef,yq=function(e){var t=e.onReset,n=_u().t,r=uL(),o=mL(),i=iL().publicKey,a=vq(cT.useForm(),1)[0],s=JL(),c=s.options.encryptFunction,l=vj().isPhoneMedia,u=gq(null),d=dU(),f=d.getPassWordUnsafeText,p=d.setPasswordErrorTextShow;return y().createElement("div",{className:"authing-g2-login-phone-code"},y().createElement(cT,{name:"resetPassword",form:a,onFinish:function(e){return hq(void 0,void 0,void 0,(function(){var n,a,l,d,f,h,m,v,g,y,b,w,C,E,k;return mq(this,(function(S){switch(S.label){case 0:return n=e.password,null===(b=u.current)||void 0===b||b.onSpin(!0),o?(h=_U,m=[aU.ResetPasswordStrengthDetection],y={},[4/*yield*/,c(n,i)]):[3/*break*/,3];case 1:return[4/*yield*/,h.apply(void 0,m.concat([(y.password=S.sent(),y)]))];case 2:return a=S.sent(),l=a.apiCode,d=a.onGuardHandling,f=a.message,null===(w=u.current)||void 0===w||w.onSpin(!1),l===TQ.ABORT_FLOW?t():l===TQ.UNSAFE_PASSWORD_TIP?(gC.error(f),p(!0)):(null===(C=u.current)||void 0===C||C.onError(),null==d||d()),[3/*break*/,7];case 3:return S.trys.push([3,5,6,7]),[4/*yield*/,s.resetPasswordByFirstLoginToken({token:r.token,password:n})];case 4:return v=S.sent(),t(v),[3/*break*/,7];case 5:return g=S.sent(),gC.error(g.message),null===(E=null==u?void 0:u.current)||void 0===E||E.onError(),[3/*break*/,7];case 6:return null===(k=u.current)||void 0===k||k.onSpin(!1),[7/*endfinally*/];case 7:return[2/*return*/]}}))}))},onFinishFailed:function(){var e;null===(e=null==u?void 0:u.current)||void 0===e||e.onError()},autoComplete:"off"},y().createElement(iU.Password,{className:"authing-g2-input-form",name:"password",required:!0},y().createElement(cU,{autoFocus:!l,className:"authing-g2-input",size:"large",placeholder:n("login.inputNewPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password2",rules:[{validator:function(e,t){var r=a.getFieldValue("password");return t?t!==r?Promise.reject(n("common.repeatPasswordDoc")):Promise.resolve():Promise.reject(n("login.inputPwd"))}}]},y().createElement(cU,{className:"authing-g2-input",size:"large",placeholder:n("login.inputPwdAgain"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),f(),y().createElement(cT.Item,{className:"authing-g2-sumbit-form submit-form"},y().createElement(Tj,{className:"forget-password",text:n("common.confirm"),ref:u}))))},bq=y().useMemo,wq=function(e){var t=e.title,n=e.explain,r=e.children,o=hL(),i=bq((function(){return{title:t,explain:n}}),[n,t]);return OB(),y().createElement("div",{className:"g2-view-container g2-change-password"},y().createElement("div",{className:"g2-view-header"},y().createElement(Hj,{src:null==o?void 0:o.logo,size:48,borderRadius:4,alt:"",className:"icon"}),y().createElement("div",{className:"title"},i.title),y().createElement("div",{className:"title-explain"},i.explain)),y().createElement("div",{className:"g2-view-tabs"},r))},Cq=function(){var e=_u().t,t=pL().changeModule,n=hL(),r=y().createElement(sq,{onReset:function(){gC.success(e("common.updatePsswordSuccess")),setTimeout((function(){null==t||t(LL.LOGIN)}),500)}});return y().createElement(wq,{title:"".concat(e("common.welcome")," ").concat(n.title),explain:e("common.initPasswordText")},r)},Eq=function(){var e=_u().t,t=pL().changeModule,n=hL(),r=y().createElement(yq,{onReset:function(){gC.success(e("common.updatePsswordSuccess")),setTimeout((function(){null==t||t(LL.LOGIN)}),500)}});return y().createElement(wq,{title:"".concat(e("common.welcome")," ").concat(n.title),explain:e("common.unsafePasswordChangeText")},r)},kq=function(){var e=_u().t,t=pL().changeModule,n=uL(),r=y().createElement(pq,{onReset:function(){gC.success(e("common.updatePsswordSuccess")),setTimeout((function(){null==t||t(LL.LOGIN)}),500)}}),o=bq((function(){switch(null==n?void 0:n.forcedCycleUnit){case Nc.Day:return e("user.modifyPwdTextDay",{number:n.forcedCycle});case Nc.Year:return e("user.modifyPwdTextYear",{number:n.forcedCycle});case Nc.Month:default:return e("user.modifyPwdTextMonth",{number:n.forcedCycle})}}),[n]);return y().createElement(wq,{title:e("user.modifyPwd"),explain:o},r)},Sq=function(){var e=_u().t,t=pL().changeModule,n=uL(),r=bq((function(){switch(null==n?void 0:n.forcedCycleUnit){case Nc.Day:return e("user.modifyNoticePwdTextDay",{number:n.forcedCycle});case Nc.Year:return e("user.modifyNoticePwdTextYear",{number:n.forcedCycle});case Nc.Month:default:return e("user.modifyNoticePwdTextMonth",{number:n.forcedCycle})}}),[n]),o=y().createElement(pq,{onReset:function(){gC.success(e("common.updatePsswordSuccess")),setTimeout((function(){null==t||t(LL.LOGIN)}),500)},onFinishCallBack:n.onFinishCallBack});return y().createElement(wq,{title:e("user.modifyPwd"),explain:r},o)},xq=function(){var e=_u().t,t=hL();return y().createElement(wq,{title:"".concat(e("common.welcome")," ").concat(t.title),explain:e("common.registerCompletePasswordDesc")},y().createElement(yU,null))},_q=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Pq=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},Tq=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Oq=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Nq=y().useCallback,Iq=function(){var e,t,n=hL(),r=fL(),o=_u().t,i=JL(),a=aL().post,s=uL(),c=null!==(e=null==s?void 0:s.accounts)&&void 0!==e?e:[],l=null!==(t=null==s?void 0:s.myself)&&void 0!==t?t:{},u=null==s?void 0:s.i18n,d=Oq([l],Tq(c),!1);OB();var f=eX().authFlow,p=Nq((function(e){return _q(void 0,void 0,void 0,(function(){var t,n,o,a,s;return Pq(this,(function(c){switch(c.label){case 0:return[4/*yield*/,f("public-account-login-selection",{userId:e.userId})];case 1:return t=c.sent(),n=t.isFlowEnd,o=t.data,a=t.onGuardHandling,n?null===(s=null==r?void 0:r.onLogin)||void 0===s||s.call(r,o,i):null==a||a(),[2/*return*/]}}))}))}),[i,a,r]);return y().createElement(y().Fragment,null,s?y().createElement("div",{className:"g2-view-container g2-view-container-2-login"},y().createElement("div",{className:"g2-view-header"},y().createElement(Hj,{src:null==n?void 0:n.logo,size:42,borderRadius:4,alt:"",className:"icon"}),y().createElement("div",{className:"title"},u)),y().createElement("div",{className:"g2-view-tabs"},y().createElement("ul",{className:"g2-select-account-2-login_wrapper"},d.map((function(e,t){return y().createElement("li",{className:"g2-select-account-2-login__li",key:t,onClick:function(){return p(e)}},y().createElement("img",{className:"g2-select-account-2-login__avatar",alt:e.userId,src:e.avatar||""}),y().createElement("div",{className:"g2-select-account-2-login__body"},e.displayName&&y().createElement(mP,{className:"g2-select-account-2-login__title"},e.displayName,2==+e.usertype&&y().createElement(mP,{className:"g2-select-account-2-login__des"},o("common.publicAccount"))),y().createElement(mP,{className:"g2-multiple__tel"},(null==e?void 0:e.phone)||"-")))}))))):n.loadingComponent)},Aq=function(){return Aq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Aq.apply(this,arguments)};Aq({},Ac());!function(e){e.NONE="none",e.EMAIL="email",e.PHONE="phone",e.IS_NUMBER="isNumber",e.REG_EXP="regExp"}(EU||(EU={})),function(e){e.USERNAME="username",e.PHONE="phone",e.EMAIL="email"}(kU||(kU={})),function(e){e.IMAGE="image",e.NUMBER="number",e.DATE="date",e.DATE_TIME="datetime",e.SELECT="select",e.DROPDOWN="dropdown",e.BOOLEAN="boolean",e.STRING="string",e.TEXT="text",e.GENDER="gender",e.COUNTRY="country"}(SU||(SU={})),function(e){e.registerByEmail="email",e.registerByPhoneCode="phone",e.registerByEmailCode="email",e["phone-password"]="phone"}(xU||(xU={}));// CONCATENATED MODULE: ./src/SendCode/SendCodeByEmail.tsx
|
|
27783
|
-
var Rq
|
|
27782
|
+
m===TQ.ABORT_FLOW?n():m===TQ.UNSAFE_PASSWORD_TIP?(gC.error(g),h(!0)):(null===(x=null==u?void 0:u.current)||void 0===x||x.onError(),null==v||v()),[3/*break*/,10];case 6:return T.trys.push([6,8,9,10]),[4/*yield*/,a.resetPasswordByForceResetToken({token:d.token,newPassword:s,oldPassword:f})];case 7:return w=T.sent(),e.onReset({code:200,data:w}),[3/*break*/,10];case 8:return C=T.sent(),gC.error(C.message),null===(_=null==u?void 0:u.current)||void 0===_||_.onError(),[3/*break*/,10];case 9:return null===(P=null==u?void 0:u.current)||void 0===P||P.onSpin(!1),[7/*endfinally*/];case 10:return[2/*return*/]}}))}))},onFinishFailed:function(){var e;null===(e=null==u?void 0:u.current)||void 0===e||e.onError()},autoComplete:"off"},y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"oldPassword",rules:uq([],lq(dX(t("common.password"))),!1)},y().createElement(sU,{autoFocus:!s,className:"authing-g2-input",size:"large",placeholder:t("user.inputCurrPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),y().createElement(oU.Password,{className:"authing-g2-input-form",name:"password"},y().createElement(sU,{className:"authing-g2-input",size:"large",placeholder:t("login.inputNewPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),y().createElement(oU.Password,{className:"authing-g2-input-form",name:"password2",rules:[{validator:function(e,n){var r=o.getFieldValue("password");return n?n!==r?Promise.reject(t("common.repeatPasswordDoc")):Promise.resolve():Promise.reject(t("login.inputPwd"))}}]},y().createElement(sU,{className:"authing-g2-input",size:"large",placeholder:t("login.inputPwdAgain"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),p(),y().createElement(cT.Item,{className:"authing-g2-sumbit-form submit-form"},y().createElement(Tj,{className:"forget-password",text:t("common.confirm"),ref:u}))))},pq=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},hq=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},mq=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},vq=y().useRef,gq=function(e){var t=e.onReset,n=_u().t,r=uL(),o=mL(),i=iL().publicKey,a=mq(cT.useForm(),1)[0],s=JL(),c=s.options.encryptFunction,l=vj().isPhoneMedia,u=vq(null),d=uU(),f=d.getPassWordUnsafeText,p=d.setPasswordErrorTextShow;return y().createElement("div",{className:"authing-g2-login-phone-code"},y().createElement(cT,{name:"resetPassword",form:a,onFinish:function(e){return pq(void 0,void 0,void 0,(function(){var n,a,l,d,f,h,m,v,g,y,b,w,C,E,k;return hq(this,(function(S){switch(S.label){case 0:return n=e.password,null===(b=u.current)||void 0===b||b.onSpin(!0),o?(h=xU,m=[iU.ResetPasswordStrengthDetection],y={},[4/*yield*/,c(n,i)]):[3/*break*/,3];case 1:return[4/*yield*/,h.apply(void 0,m.concat([(y.password=S.sent(),y)]))];case 2:return a=S.sent(),l=a.apiCode,d=a.onGuardHandling,f=a.message,null===(w=u.current)||void 0===w||w.onSpin(!1),l===TQ.ABORT_FLOW?t():l===TQ.UNSAFE_PASSWORD_TIP?(gC.error(f),p(!0)):(null===(C=u.current)||void 0===C||C.onError(),null==d||d()),[3/*break*/,7];case 3:return S.trys.push([3,5,6,7]),[4/*yield*/,s.resetPasswordByFirstLoginToken({token:r.token,password:n})];case 4:return v=S.sent(),t(v),[3/*break*/,7];case 5:return g=S.sent(),gC.error(g.message),null===(E=null==u?void 0:u.current)||void 0===E||E.onError(),[3/*break*/,7];case 6:return null===(k=u.current)||void 0===k||k.onSpin(!1),[7/*endfinally*/];case 7:return[2/*return*/]}}))}))},onFinishFailed:function(){var e;null===(e=null==u?void 0:u.current)||void 0===e||e.onError()},autoComplete:"off"},y().createElement(oU.Password,{className:"authing-g2-input-form",name:"password",required:!0},y().createElement(sU,{autoFocus:!l,className:"authing-g2-input",size:"large",placeholder:n("login.inputNewPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password2",rules:[{validator:function(e,t){var r=a.getFieldValue("password");return t?t!==r?Promise.reject(n("common.repeatPasswordDoc")):Promise.resolve():Promise.reject(n("login.inputPwd"))}}]},y().createElement(sU,{className:"authing-g2-input",size:"large",placeholder:n("login.inputPwdAgain"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),f(),y().createElement(cT.Item,{className:"authing-g2-sumbit-form submit-form"},y().createElement(Tj,{className:"forget-password",text:n("common.confirm"),ref:u}))))},yq=y().useMemo,bq=function(e){var t=e.title,n=e.explain,r=e.children,o=hL(),i=yq((function(){return{title:t,explain:n}}),[n,t]);return OB(),y().createElement("div",{className:"g2-view-container g2-change-password"},y().createElement("div",{className:"g2-view-header"},y().createElement(Hj,{src:null==o?void 0:o.logo,size:48,borderRadius:4,alt:"",className:"icon"}),y().createElement("div",{className:"title"},i.title),y().createElement("div",{className:"title-explain"},i.explain)),y().createElement("div",{className:"g2-view-tabs"},r))},wq=function(){var e=_u().t,t=pL().changeModule,n=hL(),r=y().createElement(aq,{onReset:function(){gC.success(e("common.updatePsswordSuccess")),setTimeout((function(){null==t||t(LL.LOGIN)}),500)}});return y().createElement(bq,{title:"".concat(e("common.welcome")," ").concat(n.title),explain:e("common.initPasswordText")},r)},Cq=function(){var e=_u().t,t=pL().changeModule,n=hL(),r=y().createElement(gq,{onReset:function(){gC.success(e("common.updatePsswordSuccess")),setTimeout((function(){null==t||t(LL.LOGIN)}),500)}});return y().createElement(bq,{title:"".concat(e("common.welcome")," ").concat(n.title),explain:e("common.unsafePasswordChangeText")},r)},Eq=function(){var e=_u().t,t=pL().changeModule,n=uL(),r=y().createElement(fq,{onReset:function(){gC.success(e("common.updatePsswordSuccess")),setTimeout((function(){null==t||t(LL.LOGIN)}),500)}}),o=yq((function(){switch(null==n?void 0:n.forcedCycleUnit){case Nc.Day:return e("user.modifyPwdTextDay",{number:n.forcedCycle});case Nc.Year:return e("user.modifyPwdTextYear",{number:n.forcedCycle});case Nc.Month:default:return e("user.modifyPwdTextMonth",{number:n.forcedCycle})}}),[n]);return y().createElement(bq,{title:e("user.modifyPwd"),explain:o},r)},kq=function(){var e=_u().t,t=pL().changeModule,n=uL(),r=yq((function(){switch(null==n?void 0:n.forcedCycleUnit){case Nc.Day:return e("user.modifyNoticePwdTextDay",{number:n.forcedCycle});case Nc.Year:return e("user.modifyNoticePwdTextYear",{number:n.forcedCycle});case Nc.Month:default:return e("user.modifyNoticePwdTextMonth",{number:n.forcedCycle})}}),[n]),o=y().createElement(fq,{onReset:function(){gC.success(e("common.updatePsswordSuccess")),setTimeout((function(){null==t||t(LL.LOGIN)}),500)},onFinishCallBack:n.onFinishCallBack});return y().createElement(bq,{title:e("user.modifyPwd"),explain:r},o)},Sq=function(){var e=_u().t,t=hL();return y().createElement(bq,{title:"".concat(e("common.welcome")," ").concat(t.title),explain:e("common.registerCompletePasswordDesc")},y().createElement(gU,null))},xq=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},_q=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},Pq=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Tq=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Oq=y().useCallback,Nq=function(){var e,t,n=hL(),r=fL(),o=_u().t,i=JL(),a=aL().post,s=uL(),c=null!==(e=null==s?void 0:s.accounts)&&void 0!==e?e:[],l=null!==(t=null==s?void 0:s.myself)&&void 0!==t?t:{},u=null==s?void 0:s.i18n,d=Tq([l],Pq(c),!1);OB();var f=eX().authFlow,p=Oq((function(e){return xq(void 0,void 0,void 0,(function(){var t,n,o,a,s;return _q(this,(function(c){switch(c.label){case 0:return[4/*yield*/,f("public-account-login-selection",{userId:e.userId})];case 1:return t=c.sent(),n=t.isFlowEnd,o=t.data,a=t.onGuardHandling,n?null===(s=null==r?void 0:r.onLogin)||void 0===s||s.call(r,o,i):null==a||a(),[2/*return*/]}}))}))}),[i,a,r]);return y().createElement(y().Fragment,null,s?y().createElement("div",{className:"g2-view-container g2-view-container-2-login"},y().createElement("div",{className:"g2-view-header"},y().createElement(Hj,{src:null==n?void 0:n.logo,size:42,borderRadius:4,alt:"",className:"icon"}),y().createElement("div",{className:"title"},u)),y().createElement("div",{className:"g2-view-tabs"},y().createElement("ul",{className:"g2-select-account-2-login_wrapper"},d.map((function(e,t){return y().createElement("li",{className:"g2-select-account-2-login__li",key:t,onClick:function(){return p(e)}},y().createElement("img",{className:"g2-select-account-2-login__avatar",alt:e.userId,src:e.avatar||""}),y().createElement("div",{className:"g2-select-account-2-login__body"},e.displayName&&y().createElement(mP,{className:"g2-select-account-2-login__title"},e.displayName,2==+e.usertype&&y().createElement(mP,{className:"g2-select-account-2-login__des"},o("common.publicAccount"))),y().createElement(mP,{className:"g2-multiple__tel"},(null==e?void 0:e.phone)||"-")))}))))):n.loadingComponent)},Iq=function(){return Iq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Iq.apply(this,arguments)};Iq({},Ac());!function(e){e.NONE="none",e.EMAIL="email",e.PHONE="phone",e.IS_NUMBER="isNumber",e.REG_EXP="regExp"}(CU||(CU={})),function(e){e.USERNAME="username",e.PHONE="phone",e.EMAIL="email"}(EU||(EU={})),function(e){e.IMAGE="image",e.NUMBER="number",e.DATE="date",e.DATE_TIME="datetime",e.SELECT="select",e.DROPDOWN="dropdown",e.BOOLEAN="boolean",e.STRING="string",e.TEXT="text",e.GENDER="gender",e.COUNTRY="country"}(kU||(kU={})),function(e){e.registerByEmail="email",e.registerByPhoneCode="phone",e.registerByEmailCode="email",e["phone-password"]="phone"}(SU||(SU={}));// CONCATENATED MODULE: ./src/SendCode/SendCodeByEmail.tsx
|
|
27783
|
+
var Aq,Rq=function(){return Rq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Rq.apply(this,arguments)},Mq=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Dq=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},Lq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Fq=function(e){var t=e.scene,n=e.data,r=e.form,o=e.onSendCodeBefore,i=e.fieldName,a=Lq(e,["scene","data","form","onSendCodeBefore","fieldName"]),s=_u().t,c=fL(),l=JL(),u=eX().post,d=function(e){return Mq(void 0,void 0,void 0,(function(){var n,r,o,i,a;return Dq(this,(function(c){switch(c.label){case 0:if(!e)return gC.error(s("login.inputEmail")),[2/*return*/,{status:!1,error:{code:400,message:s("login.inputEmail")}}];if(!uX("email",e))return gC.error(s("common.emailFormatError")),[2/*return*/,{status:!1,error:{code:400,message:s("common.emailFormatError")}}];c.label=1;case 1:return c.trys.push([1,3,,4]),[4/*yield*/,u("/api/v2/email/send",{email:e,scene:t})];case 2:return n=c.sent(),r=n.code,o=n.message,2080===(i=n.apiCode)?(
|
|
27784
27784
|
// 一分钟只能发一次邮箱验证码的提示信息,特殊处理
|
|
27785
27785
|
gC.error(o),[2/*return*/,{status:!1,error:{code:i,message:o}}]):200===r?[2/*return*/,{status:!0}]:(gC.error(s("login.sendCodeTimeout")),[2/*return*/,{status:!1,error:{code:r,message:s("login.sendCodeTimeout")}}]);case 3:
|
|
27786
27786
|
// onError?.(error)
|
|
27787
|
-
return a=c.sent(),[2/*return*/,{status:!1,error:{message:JSON.stringify(a),code:401}}];case 4:return[2/*return*/]}}))}))};return y().createElement(WU,Mq({beforeSend:function(){return o().then((function(e){return Dq(void 0,void 0,void 0,(function(){var e,o,a,s,u,f;return Lq(this,(function(p){switch(p.label){case 0:return e=r?r.getFieldValue(i||"email"):n,[4/*yield*/,d(e)];case 1:return o=p.sent(),a=o.status,s=o.error,a?null===(u=null==c?void 0:c.onEmailSend)||void 0===u||u.call(c,l,t):null===(f=null==c?void 0:c.onEmailSendError)||void 0===f||f.call(c,s,l,t),[2/*return*/,a]}}))}))})).catch((function(e){var n;return null===(n=null==c?void 0:c.onEmailSendError)||void 0===n||n.call(c,e,l,t),!1}))},form:r},a))},Bq=[{iso:"CA",regions:"加拿大",regions_en:"Canada",phoneCountryCode:"+1"},{iso:"US",regions:"美国",regions_en:"United States",phoneCountryCode:"+1"},{iso:"KZ",regions:"哈萨克斯坦",regions_en:"Kazakhstan",phoneCountryCode:"+7"},{iso:"RU",regions:"俄罗斯",regions_en:"Russia",phoneCountryCode:"+7"},{iso:"EG",regions:"埃及",regions_en:"Egypt",phoneCountryCode:"+20"},{iso:"ZA",regions:"南非",regions_en:"South Africa",phoneCountryCode:"+27"},{iso:"GR",regions:"希腊",regions_en:"Greece",phoneCountryCode:"+30"},{iso:"NL",regions:"荷兰",regions_en:"Netherlands",phoneCountryCode:"+31"},{iso:"BE",regions:"比利时",regions_en:"Belgium",phoneCountryCode:"+32"},{iso:"FR",regions:"法国",regions_en:"France",phoneCountryCode:"+33"},{iso:"ES",regions:"西班牙",regions_en:"Spain",phoneCountryCode:"+34"},{iso:"HU",regions:"匈牙利",regions_en:"Hungary",phoneCountryCode:"+36"},{iso:"IT",regions:"意大利",regions_en:"Italy",phoneCountryCode:"+39"},{iso:"RO",regions:"罗马尼亚",regions_en:"Romania",phoneCountryCode:"+40"},{iso:"CH",regions:"瑞士",regions_en:"Switzerland",phoneCountryCode:"+41"},{iso:"AT",regions:"奥地利",regions_en:"Austria",phoneCountryCode:"+43"},{iso:"GB",regions:"英国",regions_en:"United Kingdom",phoneCountryCode:"+44"},{iso:"DK",regions:"丹麦",regions_en:"Denmark",phoneCountryCode:"+45"},{iso:"SE",regions:"瑞典",regions_en:"Sweden",phoneCountryCode:"+46"},{iso:"NO",regions:"挪威",regions_en:"Norway",phoneCountryCode:"+47"},{iso:"PL",regions:"波兰",regions_en:"Poland",phoneCountryCode:"+48"},{iso:"DE",regions:"德国",regions_en:"Germany",phoneCountryCode:"+49"},{iso:"PE",regions:"秘鲁",regions_en:"Peru",phoneCountryCode:"+51"},{iso:"MX",regions:"墨西哥",regions_en:"Mexico",phoneCountryCode:"+52"},{iso:"CU",regions:"古巴",regions_en:"Cuba",phoneCountryCode:"+53"},{iso:"AR",regions:"阿根廷",regions_en:"Argentina",phoneCountryCode:"+54"},{iso:"BR",regions:"巴西",regions_en:"Brazil",phoneCountryCode:"+55"},{iso:"CL",regions:"智利",regions_en:"Chile",phoneCountryCode:"+56"},{iso:"CO",regions:"哥伦比亚",regions_en:"Colombia",phoneCountryCode:"+57"},{iso:"VE",regions:"委内瑞拉",regions_en:"Venezuela",phoneCountryCode:"+58"},{iso:"MY",regions:"马来西亚",regions_en:"Malaysia",phoneCountryCode:"+60"},{iso:"AU",regions:"澳大利亚",regions_en:"Australia",phoneCountryCode:"+61"},{iso:"ID",regions:"印度尼西亚",regions_en:"Indonesia",phoneCountryCode:"+62"},{iso:"PH",regions:"菲律宾",regions_en:"Philippines",phoneCountryCode:"+63"},{iso:"NZ",regions:"新西兰",regions_en:"New Zealand",phoneCountryCode:"+64"},{iso:"SG",regions:"新加坡",regions_en:"Singapore",phoneCountryCode:"+65"},{iso:"TH",regions:"泰国",regions_en:"Thailand",phoneCountryCode:"+66"},{iso:"JP",regions:"日本",regions_en:"Japan",phoneCountryCode:"+81"},{iso:"KR",regions:"韩国",regions_en:"South Korea",phoneCountryCode:"+82"},{iso:"VN",regions:"越南",regions_en:"Vietnam",phoneCountryCode:"+84"},{iso:"CN",regions:"中国",regions_en:"China",phoneCountryCode:"+86"},{iso:"TR",regions:"土耳其",regions_en:"Turkey",phoneCountryCode:"+90"},{iso:"IN",regions:"印度",regions_en:"India",phoneCountryCode:"+91"},{iso:"PK",regions:"巴基斯坦",regions_en:"Pakistan",phoneCountryCode:"+92"},{iso:"AF",regions:"阿富汗",regions_en:"Afghanistan",phoneCountryCode:"+93"},{iso:"LK",regions:"斯里兰卡",regions_en:"Sri Lanka",phoneCountryCode:"+94"},{iso:"MM",regions:"缅甸",regions_en:"Myanmar",phoneCountryCode:"+95"},{iso:"IR",regions:"伊朗",regions_en:"Iran",phoneCountryCode:"+98"},{iso:"MA",regions:"摩洛哥",regions_en:"Morocco",phoneCountryCode:"+212"},{iso:"DZ",regions:"阿尔及利亚",regions_en:"Algeria",phoneCountryCode:"+213"},{iso:"TN",regions:"突尼斯",regions_en:"Tunisia",phoneCountryCode:"+216"},{iso:"LY",regions:"利比亚",regions_en:"Libya",phoneCountryCode:"+218"},{iso:"GM",regions:"冈比亚",regions_en:"Gambia",phoneCountryCode:"+220"},{iso:"SN",regions:"塞内加尔",regions_en:"Senegal",phoneCountryCode:"+221"},{iso:"MR",regions:"毛里塔尼亚",regions_en:"Mauritania",phoneCountryCode:"+222"},{iso:"ML",regions:"马里",regions_en:"Mali",phoneCountryCode:"+223"},{iso:"GN",regions:"几内亚",regions_en:"Guinea",phoneCountryCode:"+224"},{iso:"CI",regions:"象牙海岸",regions_en:"Ivory Coast",phoneCountryCode:"+225"},{iso:"BF",regions:"布基纳法索",regions_en:"Burkina Faso",phoneCountryCode:"+226"},{iso:"NE",regions:"尼日尔",regions_en:"Niger",phoneCountryCode:"+227"},{iso:"TG",regions:"多哥",regions_en:"Togo",phoneCountryCode:"+228"},{iso:"BJ",regions:"贝宁",regions_en:"Benin",phoneCountryCode:"+229"},{iso:"MU",regions:"毛里求斯",regions_en:"Mauritius",phoneCountryCode:"+230"},{iso:"LR",regions:"利比里亚",regions_en:"Liberia",phoneCountryCode:"+231"},{iso:"SL",regions:"塞拉利昂",regions_en:"Sierra Leone",phoneCountryCode:"+232"},{iso:"GH",regions:"加纳",regions_en:"Ghana",phoneCountryCode:"+233"},{iso:"NG",regions:"尼日利亚",regions_en:"Nigeria",phoneCountryCode:"+234"},{iso:"TD",regions:"乍得",regions_en:"Chad",phoneCountryCode:"+235"},{iso:"CF",regions:"中非共和国",regions_en:"Central African Republic",phoneCountryCode:"+236"},{iso:"CM",regions:"喀麦隆",regions_en:"Cameroon",phoneCountryCode:"+237"},{iso:"CV",regions:"开普",regions_en:"Cape Verde",phoneCountryCode:"+238"},{iso:"ST",regions:"圣多美和普林西比",regions_en:"Sao Tome and Principe",phoneCountryCode:"+239"},{iso:"GQ",regions:"赤道几内亚",regions_en:"Equatorial Guinea",phoneCountryCode:"+240"},{iso:"GA",regions:"加蓬",regions_en:"Gabon",phoneCountryCode:"+241"},{iso:"CG",regions:"刚果共和国",regions_en:"Republic Of The Congo",phoneCountryCode:"+242"},{iso:"CD",regions:"刚果民主共和国",regions_en:"Democratic Republic of theCongo",phoneCountryCode:"+243"},{iso:"AO",regions:"安哥拉",regions_en:"Angola",phoneCountryCode:"+244"},{iso:"GW",regions:"几内亚比绍共和国",regions_en:"Guinea-Bissau",phoneCountryCode:"+245"},{iso:"SC",regions:"塞舌尔",regions_en:"Seychelles",phoneCountryCode:"+248"},{iso:"SD",regions:"苏丹",regions_en:"Sudan",phoneCountryCode:"+249"},{iso:"RW",regions:"卢旺达",regions_en:"Rwanda",phoneCountryCode:"+250"},{iso:"ET",regions:"埃塞俄比亚",regions_en:"Ethiopia",phoneCountryCode:"+251"},{iso:"SO",regions:"索马里",regions_en:"Somalia",phoneCountryCode:"+252"},{iso:"DJ",regions:"吉布提",regions_en:"Djibouti",phoneCountryCode:"+253"},{iso:"KE",regions:"肯尼亚",regions_en:"Kenya",phoneCountryCode:"+254"},{iso:"TZ",regions:"坦桑尼亚",regions_en:"Tanzania",phoneCountryCode:"+255"},{iso:"UG",regions:"乌干达",regions_en:"Uganda",phoneCountryCode:"+256"},{iso:"BI",regions:"布隆迪",regions_en:"Burundi",phoneCountryCode:"+257"},{iso:"MZ",regions:"莫桑比克",regions_en:"Mozambique",phoneCountryCode:"+258"},{iso:"ZM",regions:"赞比亚",regions_en:"Zambia",phoneCountryCode:"+260"},{iso:"MG",regions:"马达加斯加",regions_en:"Madagascar",phoneCountryCode:"+261"},{iso:"RE",regions:"留尼汪",regions_en:"Réunion Island",phoneCountryCode:"+262"},{iso:"ZW",regions:"津巴布韦",regions_en:"Zimbabwe",phoneCountryCode:"+263"},{iso:"NA",regions:"纳米比亚",regions_en:"Namibia",phoneCountryCode:"+264"},{iso:"MW",regions:"马拉维",regions_en:"Malawi",phoneCountryCode:"+265"},{iso:"LS",regions:"莱索托",regions_en:"Lesotho",phoneCountryCode:"+266"},{iso:"BW",regions:"博茨瓦纳",regions_en:"Botswana",phoneCountryCode:"+267"},{iso:"SZ",regions:"斯威士兰",regions_en:"Swaziland",phoneCountryCode:"+268"},{iso:"KM",regions:"科摩罗",regions_en:"Comoros",phoneCountryCode:"+269"},{iso:"YT",regions:"马约特",regions_en:"Mayotte",phoneCountryCode:"+269"},{iso:"ER",regions:"厄立特里亚",regions_en:"Eritrea",phoneCountryCode:"+291"},{iso:"AW",regions:"阿鲁巴",regions_en:"Aruba",phoneCountryCode:"+297"},{iso:"FO",regions:"法罗群岛",regions_en:"Faroe Islands",phoneCountryCode:"+298"},{iso:"GL",regions:"格陵兰岛",regions_en:"Greenland",phoneCountryCode:"+299"},{iso:"GI",regions:"直布罗陀",regions_en:"Gibraltar",phoneCountryCode:"+350"},{iso:"PT",regions:"葡萄牙",regions_en:"Portugal",phoneCountryCode:"+351"},{iso:"LU",regions:"卢森堡",regions_en:"Luxembourg",phoneCountryCode:"+352"},{iso:"IE",regions:"爱尔兰",regions_en:"Ireland",phoneCountryCode:"+353"},{iso:"IS",regions:"冰岛",regions_en:"Iceland",phoneCountryCode:"+354"},{iso:"AL",regions:"阿尔巴尼亚",regions_en:"Albania",phoneCountryCode:"+355"},{iso:"MT",regions:"马耳他",regions_en:"Malta",phoneCountryCode:"+356"},{iso:"CY",regions:"塞浦路斯",regions_en:"Cyprus",phoneCountryCode:"+357"},{iso:"FI",regions:"芬兰",regions_en:"Finland",phoneCountryCode:"+358"},{iso:"BG",regions:"保加利亚",regions_en:"Bulgaria",phoneCountryCode:"+359"},{iso:"LT",regions:"立陶宛",regions_en:"Lithuania",phoneCountryCode:"+370"},{iso:"LV",regions:"拉脱维亚",regions_en:"Latvia",phoneCountryCode:"+371"},{iso:"EE",regions:"爱沙尼亚",regions_en:"Estonia",phoneCountryCode:"+372"},{iso:"MD",regions:"摩尔多瓦",regions_en:"Moldova",phoneCountryCode:"+373"},{iso:"AM",regions:"亚美尼亚",regions_en:"Armenia",phoneCountryCode:"+374"},{iso:"BY",regions:"白俄罗斯",regions_en:"Belarus",phoneCountryCode:"+375"},{iso:"AD",regions:"安道尔",regions_en:"Andorra",phoneCountryCode:"+376"},{iso:"MC",regions:"摩纳哥",regions_en:"Monaco",phoneCountryCode:"+377"},{iso:"SM",regions:"圣马力诺",regions_en:"San Marino",phoneCountryCode:"+378"},{iso:"UA",regions:"乌克兰",regions_en:"Ukraine",phoneCountryCode:"+380"},{iso:"RS",regions:"塞尔维亚",regions_en:"Serbia",phoneCountryCode:"+381"},{iso:"ME",regions:"黑山",regions_en:"Montenegro",phoneCountryCode:"+382"},{iso:"HR",regions:"克罗地亚",regions_en:"Croatia",phoneCountryCode:"+385"},{iso:"SI",regions:"斯洛文尼亚",regions_en:"Slovenia",phoneCountryCode:"+386"},{iso:"BA",regions:"波斯尼亚和黑塞哥维那",regions_en:"Bosniaand Herzegovina",phoneCountryCode:"+387"},{iso:"MK",regions:"马其顿",regions_en:"Macedonia",phoneCountryCode:"+389"},{iso:"CZ",regions:"捷克",regions_en:"Czech",phoneCountryCode:"+420"},{iso:"SK",regions:"斯洛伐克",regions_en:"Slovakia",phoneCountryCode:"+421"},{iso:"LI",regions:"列支敦士登",regions_en:"Liechtenstein",phoneCountryCode:"+423"},{iso:"BZ",regions:"伯利兹",regions_en:"Belize",phoneCountryCode:"+501"},{iso:"GT",regions:"瓜地马拉",regions_en:"Guatemala",phoneCountryCode:"+502"},{iso:"SV",regions:"萨尔瓦多",regions_en:"ElSalvador",phoneCountryCode:"+503"},{iso:"HN",regions:"洪都拉斯",regions_en:"Honduras",phoneCountryCode:"+504"},{iso:"NI",regions:"尼加拉瓜",regions_en:"Nicaragua",phoneCountryCode:"+505"},{iso:"CR",regions:"哥斯达黎加",regions_en:"CostaRica",phoneCountryCode:"+506"},{iso:"PA",regions:"巴拿马",regions_en:"Panama",phoneCountryCode:"+507"},{iso:"PM",regions:"圣彼埃尔和密克隆岛",regions_en:"Saint Pierreand Miquelon",phoneCountryCode:"+508"},{iso:"HT",regions:"海地",regions_en:"Haiti",phoneCountryCode:"+509"},{iso:"GP",regions:"瓜德罗普岛",regions_en:"Guadeloupe",phoneCountryCode:"+590"},{iso:"BO",regions:"玻利维亚",regions_en:"Bolivia",phoneCountryCode:"+591"},{iso:"GY",regions:"圭亚那",regions_en:"Guyana",phoneCountryCode:"+592"},{iso:"EC",regions:"厄瓜多尔",regions_en:"Ecuador",phoneCountryCode:"+593"},{iso:"GF",regions:"法属圭亚那",regions_en:"French Guiana",phoneCountryCode:"+594"},{iso:"PY",regions:"巴拉圭",regions_en:"Paraguay",phoneCountryCode:"+595"},{iso:"SR",regions:"苏里南",regions_en:"Suriname",phoneCountryCode:"+597"},{iso:"UY",regions:"乌拉圭",regions_en:"Uruguay",phoneCountryCode:"+598"},{iso:"BQ",regions:"荷兰加勒比",regions_en:"Caribisch Nederland",phoneCountryCode:"+599"},{iso:"CW",regions:"库拉索",regions_en:"Curacao",phoneCountryCode:"+599"},{iso:"TL",regions:"东帝汶",regions_en:"East Timor",phoneCountryCode:"+670"},{iso:"BN",regions:"文莱",regions_en:"Brunei",phoneCountryCode:"+673"},{iso:"NR",regions:"拿鲁岛",regions_en:"Nauru",phoneCountryCode:"+674"},{iso:"PG",regions:"巴布亚新几内亚",regions_en:"Papua New Guinea",phoneCountryCode:"+675"},{iso:"TO",regions:"汤加",regions_en:"Tonga",phoneCountryCode:"+676"},{iso:"SB",regions:"所罗门群岛",regions_en:"Solomon Islands",phoneCountryCode:"+677"},{iso:"VU",regions:"瓦努阿图",regions_en:"Vanuatu",phoneCountryCode:"+678"},{iso:"FJ",regions:"斐济",regions_en:"Fiji",phoneCountryCode:"+679"},{iso:"PW",regions:"帕劳",regions_en:"Palau",phoneCountryCode:"+680"},{iso:"CK",regions:"库克群岛",regions_en:"Cook Islands",phoneCountryCode:"+682"},{iso:"WS",regions:"萨摩亚",regions_en:"Samoa",phoneCountryCode:"+685"},{iso:"KI",regions:"基里巴斯",regions_en:"Kiribati",phoneCountryCode:"+686"},{iso:"NC",regions:"新喀里多尼亚",regions_en:"New Caledonia",phoneCountryCode:"+687"},{iso:"PF",regions:"法属波利尼西亚",regions_en:"French Polynesia",phoneCountryCode:"+689"},{iso:"FM",regions:"密克罗尼西亚",regions_en:"Micronesia",phoneCountryCode:"+691"},{iso:"MH",regions:"马绍尔群岛",regions_en:"Marshall Islands",phoneCountryCode:"+692"},{iso:"KP",regions:"朝鲜",regions_en:"Korea Democratic Rep.",phoneCountryCode:"+850"},{iso:"HK",regions:"中国香港",regions_en:"Hong Kong",phoneCountryCode:"+852"},{iso:"MO",regions:"中国澳门",regions_en:"Macau",phoneCountryCode:"+853"},{iso:"KH",regions:"柬埔寨",regions_en:"Cambodia",phoneCountryCode:"+855"},{iso:"LA",regions:"老挝",regions_en:"Laos",phoneCountryCode:"+856"},{iso:"BD",regions:"孟加拉国",regions_en:"Bangladesh",phoneCountryCode:"+880"},{iso:"TW",regions:"中国台湾",regions_en:"Taiwan",phoneCountryCode:"+886"},{iso:"MV",regions:"马尔代夫",regions_en:"Maldives",phoneCountryCode:"+960"},{iso:"LB",regions:"黎巴嫩",regions_en:"Lebanon",phoneCountryCode:"+961"},{iso:"JO",regions:"约旦",regions_en:"Jordan",phoneCountryCode:"+962"},{iso:"SY",regions:"叙利亚",regions_en:"Syria",phoneCountryCode:"+963"},{iso:"IQ",regions:"伊拉克",regions_en:"Iraq",phoneCountryCode:"+964"},{iso:"KW",regions:"科威特",regions_en:"Kuwait",phoneCountryCode:"+965"},{iso:"SA",regions:"沙特阿拉伯",regions_en:"Saudi Arabia",phoneCountryCode:"+966"},{iso:"YE",regions:"也门",regions_en:"Yemen",phoneCountryCode:"+967"},{iso:"OM",regions:"阿曼",regions_en:"Oman",phoneCountryCode:"+968"},{iso:"AE",regions:"阿拉伯联合酋长国",regions_en:"United Arab Emirates",phoneCountryCode:"+971"},{iso:"IL",regions:"以色列",regions_en:"Israel",phoneCountryCode:"+972"},{iso:"BH",regions:"巴林",regions_en:"Bahrain",phoneCountryCode:"+973"},{iso:"QA",regions:"卡塔尔",regions_en:"Qatar",phoneCountryCode:"+974"},{iso:"BT",regions:"不丹",regions_en:"Bhutan",phoneCountryCode:"+975"},{iso:"MN",regions:"蒙古",regions_en:"Mongolia",phoneCountryCode:"+976"},{iso:"NP",regions:"尼泊尔",regions_en:"Nepal",phoneCountryCode:"+977"},{iso:"TJ",regions:"塔吉克斯坦",regions_en:"Tajikistan",phoneCountryCode:"+992"},{iso:"TM",regions:"土库曼斯坦",regions_en:"Turkmenistan",phoneCountryCode:"+993"},{iso:"AZ",regions:"阿塞拜疆",regions_en:"Azerbaijan",phoneCountryCode:"+994"},{iso:"GE",regions:"格鲁吉亚",regions_en:"Georgia",phoneCountryCode:"+995"},{iso:"KG",regions:"吉尔吉斯斯坦",regions_en:"Kyrgyzstan",phoneCountryCode:"+996"},{iso:"UZ",regions:"乌兹别克斯坦",regions_en:"Uzbekistan",phoneCountryCode:"+998"},{iso:"BS",regions:"巴哈马",regions_en:"Bahamas",phoneCountryCode:"+1242"},{iso:"BB",regions:"巴巴多斯",regions_en:"Barbados",phoneCountryCode:"+1246"},{iso:"AI",regions:"安圭拉",regions_en:"Anguilla",phoneCountryCode:"+1264"},{iso:"AG",regions:"安提瓜和巴布达",regions_en:"Antigua and Barbuda",phoneCountryCode:"+1268"},{iso:"VG",regions:"英属处女群岛",regions_en:"VirginIslands,British",phoneCountryCode:"+1284"},{iso:"KY",regions:"开曼群岛",regions_en:"Cayman Islands",phoneCountryCode:"+1345"},{iso:"BM",regions:"百慕大群岛",regions_en:"Bermuda",phoneCountryCode:"+1441"},{iso:"GD",regions:"格林纳达",regions_en:"Grenada",phoneCountryCode:"+1473"},{iso:"TC",regions:"特克斯和凯科斯群岛",regions_en:"Turksand Caicos Islands",phoneCountryCode:"+1649"},{iso:"MS",regions:"蒙特塞拉特岛",regions_en:"Montserrat",phoneCountryCode:"+1664"},{iso:"GU",regions:"关岛",regions_en:"Guam",phoneCountryCode:"+1671"},{iso:"AS",regions:"美属萨摩亚",regions_en:"American Samoa",phoneCountryCode:"+1684"},{iso:"LC",regions:"圣露西亚",regions_en:"Saint Lucia",phoneCountryCode:"+1758"},{iso:"DM",regions:"多米尼加",regions_en:"Dominica",phoneCountryCode:"+1767"},{iso:"VC",regions:"圣文森特和格林纳丁斯",regions_en:"Saint Vincent and The Grenadines",phoneCountryCode:"+1784"},{iso:"PR",regions:"波多黎各",regions_en:"Puerto Rico",phoneCountryCode:"+1787"},{iso:"DO",regions:"多米尼加共和国",regions_en:"dominican republic",phoneCountryCode:"+1809"},{iso:"TT",regions:"特立尼达和多巴哥",regions_en:"Trinidadand Tobago",phoneCountryCode:"+1868"},{iso:"KN",regions:"圣基茨和尼维斯",regions_en:"Saint Kitts and Nevis",phoneCountryCode:"+1869"},{iso:"JM",regions:"牙买加",regions_en:"Jamaica",phoneCountryCode:"+1876"}],Uq=function(e){var t,n=e.value,r=e.onChange,o=null!==(t=su.resolvedLanguage)&&void 0!==t?t:su.language,i=Bq.map((function(e){return{value:e.iso,key:e.iso,children:e.phoneCountryCode,label:y().createElement("div",{className:"select-option-item"},y().createElement("span",null,e.phoneCountryCode),y().createElement("div",{className:"country"},y().createElement(fv,{title:"zh-CN"===o?e.regions:e.regions_en},"zh-CN"===o?e.regions:e.regions_en))),region:e.regions,region_en:e.regions_en}}));
|
|
27787
|
+
return a=c.sent(),[2/*return*/,{status:!1,error:{message:JSON.stringify(a),code:401}}];case 4:return[2/*return*/]}}))}))};return y().createElement(HU,Rq({beforeSend:function(){return o().then((function(e){return Mq(void 0,void 0,void 0,(function(){var e,o,a,s,u,f;return Dq(this,(function(p){switch(p.label){case 0:return e=r?r.getFieldValue(i||"email"):n,[4/*yield*/,d(e)];case 1:return o=p.sent(),a=o.status,s=o.error,a?null===(u=null==c?void 0:c.onEmailSend)||void 0===u||u.call(c,l,t):null===(f=null==c?void 0:c.onEmailSendError)||void 0===f||f.call(c,s,l,t),[2/*return*/,a]}}))}))})).catch((function(e){var n;return null===(n=null==c?void 0:c.onEmailSendError)||void 0===n||n.call(c,e,l,t),!1}))},form:r},a))},jq=[{iso:"CA",regions:"加拿大",regions_en:"Canada",phoneCountryCode:"+1"},{iso:"US",regions:"美国",regions_en:"United States",phoneCountryCode:"+1"},{iso:"KZ",regions:"哈萨克斯坦",regions_en:"Kazakhstan",phoneCountryCode:"+7"},{iso:"RU",regions:"俄罗斯",regions_en:"Russia",phoneCountryCode:"+7"},{iso:"EG",regions:"埃及",regions_en:"Egypt",phoneCountryCode:"+20"},{iso:"ZA",regions:"南非",regions_en:"South Africa",phoneCountryCode:"+27"},{iso:"GR",regions:"希腊",regions_en:"Greece",phoneCountryCode:"+30"},{iso:"NL",regions:"荷兰",regions_en:"Netherlands",phoneCountryCode:"+31"},{iso:"BE",regions:"比利时",regions_en:"Belgium",phoneCountryCode:"+32"},{iso:"FR",regions:"法国",regions_en:"France",phoneCountryCode:"+33"},{iso:"ES",regions:"西班牙",regions_en:"Spain",phoneCountryCode:"+34"},{iso:"HU",regions:"匈牙利",regions_en:"Hungary",phoneCountryCode:"+36"},{iso:"IT",regions:"意大利",regions_en:"Italy",phoneCountryCode:"+39"},{iso:"RO",regions:"罗马尼亚",regions_en:"Romania",phoneCountryCode:"+40"},{iso:"CH",regions:"瑞士",regions_en:"Switzerland",phoneCountryCode:"+41"},{iso:"AT",regions:"奥地利",regions_en:"Austria",phoneCountryCode:"+43"},{iso:"GB",regions:"英国",regions_en:"United Kingdom",phoneCountryCode:"+44"},{iso:"DK",regions:"丹麦",regions_en:"Denmark",phoneCountryCode:"+45"},{iso:"SE",regions:"瑞典",regions_en:"Sweden",phoneCountryCode:"+46"},{iso:"NO",regions:"挪威",regions_en:"Norway",phoneCountryCode:"+47"},{iso:"PL",regions:"波兰",regions_en:"Poland",phoneCountryCode:"+48"},{iso:"DE",regions:"德国",regions_en:"Germany",phoneCountryCode:"+49"},{iso:"PE",regions:"秘鲁",regions_en:"Peru",phoneCountryCode:"+51"},{iso:"MX",regions:"墨西哥",regions_en:"Mexico",phoneCountryCode:"+52"},{iso:"CU",regions:"古巴",regions_en:"Cuba",phoneCountryCode:"+53"},{iso:"AR",regions:"阿根廷",regions_en:"Argentina",phoneCountryCode:"+54"},{iso:"BR",regions:"巴西",regions_en:"Brazil",phoneCountryCode:"+55"},{iso:"CL",regions:"智利",regions_en:"Chile",phoneCountryCode:"+56"},{iso:"CO",regions:"哥伦比亚",regions_en:"Colombia",phoneCountryCode:"+57"},{iso:"VE",regions:"委内瑞拉",regions_en:"Venezuela",phoneCountryCode:"+58"},{iso:"MY",regions:"马来西亚",regions_en:"Malaysia",phoneCountryCode:"+60"},{iso:"AU",regions:"澳大利亚",regions_en:"Australia",phoneCountryCode:"+61"},{iso:"ID",regions:"印度尼西亚",regions_en:"Indonesia",phoneCountryCode:"+62"},{iso:"PH",regions:"菲律宾",regions_en:"Philippines",phoneCountryCode:"+63"},{iso:"NZ",regions:"新西兰",regions_en:"New Zealand",phoneCountryCode:"+64"},{iso:"SG",regions:"新加坡",regions_en:"Singapore",phoneCountryCode:"+65"},{iso:"TH",regions:"泰国",regions_en:"Thailand",phoneCountryCode:"+66"},{iso:"JP",regions:"日本",regions_en:"Japan",phoneCountryCode:"+81"},{iso:"KR",regions:"韩国",regions_en:"South Korea",phoneCountryCode:"+82"},{iso:"VN",regions:"越南",regions_en:"Vietnam",phoneCountryCode:"+84"},{iso:"CN",regions:"中国",regions_en:"China",phoneCountryCode:"+86"},{iso:"TR",regions:"土耳其",regions_en:"Turkey",phoneCountryCode:"+90"},{iso:"IN",regions:"印度",regions_en:"India",phoneCountryCode:"+91"},{iso:"PK",regions:"巴基斯坦",regions_en:"Pakistan",phoneCountryCode:"+92"},{iso:"AF",regions:"阿富汗",regions_en:"Afghanistan",phoneCountryCode:"+93"},{iso:"LK",regions:"斯里兰卡",regions_en:"Sri Lanka",phoneCountryCode:"+94"},{iso:"MM",regions:"缅甸",regions_en:"Myanmar",phoneCountryCode:"+95"},{iso:"IR",regions:"伊朗",regions_en:"Iran",phoneCountryCode:"+98"},{iso:"MA",regions:"摩洛哥",regions_en:"Morocco",phoneCountryCode:"+212"},{iso:"DZ",regions:"阿尔及利亚",regions_en:"Algeria",phoneCountryCode:"+213"},{iso:"TN",regions:"突尼斯",regions_en:"Tunisia",phoneCountryCode:"+216"},{iso:"LY",regions:"利比亚",regions_en:"Libya",phoneCountryCode:"+218"},{iso:"GM",regions:"冈比亚",regions_en:"Gambia",phoneCountryCode:"+220"},{iso:"SN",regions:"塞内加尔",regions_en:"Senegal",phoneCountryCode:"+221"},{iso:"MR",regions:"毛里塔尼亚",regions_en:"Mauritania",phoneCountryCode:"+222"},{iso:"ML",regions:"马里",regions_en:"Mali",phoneCountryCode:"+223"},{iso:"GN",regions:"几内亚",regions_en:"Guinea",phoneCountryCode:"+224"},{iso:"CI",regions:"象牙海岸",regions_en:"Ivory Coast",phoneCountryCode:"+225"},{iso:"BF",regions:"布基纳法索",regions_en:"Burkina Faso",phoneCountryCode:"+226"},{iso:"NE",regions:"尼日尔",regions_en:"Niger",phoneCountryCode:"+227"},{iso:"TG",regions:"多哥",regions_en:"Togo",phoneCountryCode:"+228"},{iso:"BJ",regions:"贝宁",regions_en:"Benin",phoneCountryCode:"+229"},{iso:"MU",regions:"毛里求斯",regions_en:"Mauritius",phoneCountryCode:"+230"},{iso:"LR",regions:"利比里亚",regions_en:"Liberia",phoneCountryCode:"+231"},{iso:"SL",regions:"塞拉利昂",regions_en:"Sierra Leone",phoneCountryCode:"+232"},{iso:"GH",regions:"加纳",regions_en:"Ghana",phoneCountryCode:"+233"},{iso:"NG",regions:"尼日利亚",regions_en:"Nigeria",phoneCountryCode:"+234"},{iso:"TD",regions:"乍得",regions_en:"Chad",phoneCountryCode:"+235"},{iso:"CF",regions:"中非共和国",regions_en:"Central African Republic",phoneCountryCode:"+236"},{iso:"CM",regions:"喀麦隆",regions_en:"Cameroon",phoneCountryCode:"+237"},{iso:"CV",regions:"开普",regions_en:"Cape Verde",phoneCountryCode:"+238"},{iso:"ST",regions:"圣多美和普林西比",regions_en:"Sao Tome and Principe",phoneCountryCode:"+239"},{iso:"GQ",regions:"赤道几内亚",regions_en:"Equatorial Guinea",phoneCountryCode:"+240"},{iso:"GA",regions:"加蓬",regions_en:"Gabon",phoneCountryCode:"+241"},{iso:"CG",regions:"刚果共和国",regions_en:"Republic Of The Congo",phoneCountryCode:"+242"},{iso:"CD",regions:"刚果民主共和国",regions_en:"Democratic Republic of theCongo",phoneCountryCode:"+243"},{iso:"AO",regions:"安哥拉",regions_en:"Angola",phoneCountryCode:"+244"},{iso:"GW",regions:"几内亚比绍共和国",regions_en:"Guinea-Bissau",phoneCountryCode:"+245"},{iso:"SC",regions:"塞舌尔",regions_en:"Seychelles",phoneCountryCode:"+248"},{iso:"SD",regions:"苏丹",regions_en:"Sudan",phoneCountryCode:"+249"},{iso:"RW",regions:"卢旺达",regions_en:"Rwanda",phoneCountryCode:"+250"},{iso:"ET",regions:"埃塞俄比亚",regions_en:"Ethiopia",phoneCountryCode:"+251"},{iso:"SO",regions:"索马里",regions_en:"Somalia",phoneCountryCode:"+252"},{iso:"DJ",regions:"吉布提",regions_en:"Djibouti",phoneCountryCode:"+253"},{iso:"KE",regions:"肯尼亚",regions_en:"Kenya",phoneCountryCode:"+254"},{iso:"TZ",regions:"坦桑尼亚",regions_en:"Tanzania",phoneCountryCode:"+255"},{iso:"UG",regions:"乌干达",regions_en:"Uganda",phoneCountryCode:"+256"},{iso:"BI",regions:"布隆迪",regions_en:"Burundi",phoneCountryCode:"+257"},{iso:"MZ",regions:"莫桑比克",regions_en:"Mozambique",phoneCountryCode:"+258"},{iso:"ZM",regions:"赞比亚",regions_en:"Zambia",phoneCountryCode:"+260"},{iso:"MG",regions:"马达加斯加",regions_en:"Madagascar",phoneCountryCode:"+261"},{iso:"RE",regions:"留尼汪",regions_en:"Réunion Island",phoneCountryCode:"+262"},{iso:"ZW",regions:"津巴布韦",regions_en:"Zimbabwe",phoneCountryCode:"+263"},{iso:"NA",regions:"纳米比亚",regions_en:"Namibia",phoneCountryCode:"+264"},{iso:"MW",regions:"马拉维",regions_en:"Malawi",phoneCountryCode:"+265"},{iso:"LS",regions:"莱索托",regions_en:"Lesotho",phoneCountryCode:"+266"},{iso:"BW",regions:"博茨瓦纳",regions_en:"Botswana",phoneCountryCode:"+267"},{iso:"SZ",regions:"斯威士兰",regions_en:"Swaziland",phoneCountryCode:"+268"},{iso:"KM",regions:"科摩罗",regions_en:"Comoros",phoneCountryCode:"+269"},{iso:"YT",regions:"马约特",regions_en:"Mayotte",phoneCountryCode:"+269"},{iso:"ER",regions:"厄立特里亚",regions_en:"Eritrea",phoneCountryCode:"+291"},{iso:"AW",regions:"阿鲁巴",regions_en:"Aruba",phoneCountryCode:"+297"},{iso:"FO",regions:"法罗群岛",regions_en:"Faroe Islands",phoneCountryCode:"+298"},{iso:"GL",regions:"格陵兰岛",regions_en:"Greenland",phoneCountryCode:"+299"},{iso:"GI",regions:"直布罗陀",regions_en:"Gibraltar",phoneCountryCode:"+350"},{iso:"PT",regions:"葡萄牙",regions_en:"Portugal",phoneCountryCode:"+351"},{iso:"LU",regions:"卢森堡",regions_en:"Luxembourg",phoneCountryCode:"+352"},{iso:"IE",regions:"爱尔兰",regions_en:"Ireland",phoneCountryCode:"+353"},{iso:"IS",regions:"冰岛",regions_en:"Iceland",phoneCountryCode:"+354"},{iso:"AL",regions:"阿尔巴尼亚",regions_en:"Albania",phoneCountryCode:"+355"},{iso:"MT",regions:"马耳他",regions_en:"Malta",phoneCountryCode:"+356"},{iso:"CY",regions:"塞浦路斯",regions_en:"Cyprus",phoneCountryCode:"+357"},{iso:"FI",regions:"芬兰",regions_en:"Finland",phoneCountryCode:"+358"},{iso:"BG",regions:"保加利亚",regions_en:"Bulgaria",phoneCountryCode:"+359"},{iso:"LT",regions:"立陶宛",regions_en:"Lithuania",phoneCountryCode:"+370"},{iso:"LV",regions:"拉脱维亚",regions_en:"Latvia",phoneCountryCode:"+371"},{iso:"EE",regions:"爱沙尼亚",regions_en:"Estonia",phoneCountryCode:"+372"},{iso:"MD",regions:"摩尔多瓦",regions_en:"Moldova",phoneCountryCode:"+373"},{iso:"AM",regions:"亚美尼亚",regions_en:"Armenia",phoneCountryCode:"+374"},{iso:"BY",regions:"白俄罗斯",regions_en:"Belarus",phoneCountryCode:"+375"},{iso:"AD",regions:"安道尔",regions_en:"Andorra",phoneCountryCode:"+376"},{iso:"MC",regions:"摩纳哥",regions_en:"Monaco",phoneCountryCode:"+377"},{iso:"SM",regions:"圣马力诺",regions_en:"San Marino",phoneCountryCode:"+378"},{iso:"UA",regions:"乌克兰",regions_en:"Ukraine",phoneCountryCode:"+380"},{iso:"RS",regions:"塞尔维亚",regions_en:"Serbia",phoneCountryCode:"+381"},{iso:"ME",regions:"黑山",regions_en:"Montenegro",phoneCountryCode:"+382"},{iso:"HR",regions:"克罗地亚",regions_en:"Croatia",phoneCountryCode:"+385"},{iso:"SI",regions:"斯洛文尼亚",regions_en:"Slovenia",phoneCountryCode:"+386"},{iso:"BA",regions:"波斯尼亚和黑塞哥维那",regions_en:"Bosniaand Herzegovina",phoneCountryCode:"+387"},{iso:"MK",regions:"马其顿",regions_en:"Macedonia",phoneCountryCode:"+389"},{iso:"CZ",regions:"捷克",regions_en:"Czech",phoneCountryCode:"+420"},{iso:"SK",regions:"斯洛伐克",regions_en:"Slovakia",phoneCountryCode:"+421"},{iso:"LI",regions:"列支敦士登",regions_en:"Liechtenstein",phoneCountryCode:"+423"},{iso:"BZ",regions:"伯利兹",regions_en:"Belize",phoneCountryCode:"+501"},{iso:"GT",regions:"瓜地马拉",regions_en:"Guatemala",phoneCountryCode:"+502"},{iso:"SV",regions:"萨尔瓦多",regions_en:"ElSalvador",phoneCountryCode:"+503"},{iso:"HN",regions:"洪都拉斯",regions_en:"Honduras",phoneCountryCode:"+504"},{iso:"NI",regions:"尼加拉瓜",regions_en:"Nicaragua",phoneCountryCode:"+505"},{iso:"CR",regions:"哥斯达黎加",regions_en:"CostaRica",phoneCountryCode:"+506"},{iso:"PA",regions:"巴拿马",regions_en:"Panama",phoneCountryCode:"+507"},{iso:"PM",regions:"圣彼埃尔和密克隆岛",regions_en:"Saint Pierreand Miquelon",phoneCountryCode:"+508"},{iso:"HT",regions:"海地",regions_en:"Haiti",phoneCountryCode:"+509"},{iso:"GP",regions:"瓜德罗普岛",regions_en:"Guadeloupe",phoneCountryCode:"+590"},{iso:"BO",regions:"玻利维亚",regions_en:"Bolivia",phoneCountryCode:"+591"},{iso:"GY",regions:"圭亚那",regions_en:"Guyana",phoneCountryCode:"+592"},{iso:"EC",regions:"厄瓜多尔",regions_en:"Ecuador",phoneCountryCode:"+593"},{iso:"GF",regions:"法属圭亚那",regions_en:"French Guiana",phoneCountryCode:"+594"},{iso:"PY",regions:"巴拉圭",regions_en:"Paraguay",phoneCountryCode:"+595"},{iso:"SR",regions:"苏里南",regions_en:"Suriname",phoneCountryCode:"+597"},{iso:"UY",regions:"乌拉圭",regions_en:"Uruguay",phoneCountryCode:"+598"},{iso:"BQ",regions:"荷兰加勒比",regions_en:"Caribisch Nederland",phoneCountryCode:"+599"},{iso:"CW",regions:"库拉索",regions_en:"Curacao",phoneCountryCode:"+599"},{iso:"TL",regions:"东帝汶",regions_en:"East Timor",phoneCountryCode:"+670"},{iso:"BN",regions:"文莱",regions_en:"Brunei",phoneCountryCode:"+673"},{iso:"NR",regions:"拿鲁岛",regions_en:"Nauru",phoneCountryCode:"+674"},{iso:"PG",regions:"巴布亚新几内亚",regions_en:"Papua New Guinea",phoneCountryCode:"+675"},{iso:"TO",regions:"汤加",regions_en:"Tonga",phoneCountryCode:"+676"},{iso:"SB",regions:"所罗门群岛",regions_en:"Solomon Islands",phoneCountryCode:"+677"},{iso:"VU",regions:"瓦努阿图",regions_en:"Vanuatu",phoneCountryCode:"+678"},{iso:"FJ",regions:"斐济",regions_en:"Fiji",phoneCountryCode:"+679"},{iso:"PW",regions:"帕劳",regions_en:"Palau",phoneCountryCode:"+680"},{iso:"CK",regions:"库克群岛",regions_en:"Cook Islands",phoneCountryCode:"+682"},{iso:"WS",regions:"萨摩亚",regions_en:"Samoa",phoneCountryCode:"+685"},{iso:"KI",regions:"基里巴斯",regions_en:"Kiribati",phoneCountryCode:"+686"},{iso:"NC",regions:"新喀里多尼亚",regions_en:"New Caledonia",phoneCountryCode:"+687"},{iso:"PF",regions:"法属波利尼西亚",regions_en:"French Polynesia",phoneCountryCode:"+689"},{iso:"FM",regions:"密克罗尼西亚",regions_en:"Micronesia",phoneCountryCode:"+691"},{iso:"MH",regions:"马绍尔群岛",regions_en:"Marshall Islands",phoneCountryCode:"+692"},{iso:"KP",regions:"朝鲜",regions_en:"Korea Democratic Rep.",phoneCountryCode:"+850"},{iso:"HK",regions:"中国香港",regions_en:"Hong Kong",phoneCountryCode:"+852"},{iso:"MO",regions:"中国澳门",regions_en:"Macau",phoneCountryCode:"+853"},{iso:"KH",regions:"柬埔寨",regions_en:"Cambodia",phoneCountryCode:"+855"},{iso:"LA",regions:"老挝",regions_en:"Laos",phoneCountryCode:"+856"},{iso:"BD",regions:"孟加拉国",regions_en:"Bangladesh",phoneCountryCode:"+880"},{iso:"TW",regions:"中国台湾",regions_en:"Taiwan",phoneCountryCode:"+886"},{iso:"MV",regions:"马尔代夫",regions_en:"Maldives",phoneCountryCode:"+960"},{iso:"LB",regions:"黎巴嫩",regions_en:"Lebanon",phoneCountryCode:"+961"},{iso:"JO",regions:"约旦",regions_en:"Jordan",phoneCountryCode:"+962"},{iso:"SY",regions:"叙利亚",regions_en:"Syria",phoneCountryCode:"+963"},{iso:"IQ",regions:"伊拉克",regions_en:"Iraq",phoneCountryCode:"+964"},{iso:"KW",regions:"科威特",regions_en:"Kuwait",phoneCountryCode:"+965"},{iso:"SA",regions:"沙特阿拉伯",regions_en:"Saudi Arabia",phoneCountryCode:"+966"},{iso:"YE",regions:"也门",regions_en:"Yemen",phoneCountryCode:"+967"},{iso:"OM",regions:"阿曼",regions_en:"Oman",phoneCountryCode:"+968"},{iso:"AE",regions:"阿拉伯联合酋长国",regions_en:"United Arab Emirates",phoneCountryCode:"+971"},{iso:"IL",regions:"以色列",regions_en:"Israel",phoneCountryCode:"+972"},{iso:"BH",regions:"巴林",regions_en:"Bahrain",phoneCountryCode:"+973"},{iso:"QA",regions:"卡塔尔",regions_en:"Qatar",phoneCountryCode:"+974"},{iso:"BT",regions:"不丹",regions_en:"Bhutan",phoneCountryCode:"+975"},{iso:"MN",regions:"蒙古",regions_en:"Mongolia",phoneCountryCode:"+976"},{iso:"NP",regions:"尼泊尔",regions_en:"Nepal",phoneCountryCode:"+977"},{iso:"TJ",regions:"塔吉克斯坦",regions_en:"Tajikistan",phoneCountryCode:"+992"},{iso:"TM",regions:"土库曼斯坦",regions_en:"Turkmenistan",phoneCountryCode:"+993"},{iso:"AZ",regions:"阿塞拜疆",regions_en:"Azerbaijan",phoneCountryCode:"+994"},{iso:"GE",regions:"格鲁吉亚",regions_en:"Georgia",phoneCountryCode:"+995"},{iso:"KG",regions:"吉尔吉斯斯坦",regions_en:"Kyrgyzstan",phoneCountryCode:"+996"},{iso:"UZ",regions:"乌兹别克斯坦",regions_en:"Uzbekistan",phoneCountryCode:"+998"},{iso:"BS",regions:"巴哈马",regions_en:"Bahamas",phoneCountryCode:"+1242"},{iso:"BB",regions:"巴巴多斯",regions_en:"Barbados",phoneCountryCode:"+1246"},{iso:"AI",regions:"安圭拉",regions_en:"Anguilla",phoneCountryCode:"+1264"},{iso:"AG",regions:"安提瓜和巴布达",regions_en:"Antigua and Barbuda",phoneCountryCode:"+1268"},{iso:"VG",regions:"英属处女群岛",regions_en:"VirginIslands,British",phoneCountryCode:"+1284"},{iso:"KY",regions:"开曼群岛",regions_en:"Cayman Islands",phoneCountryCode:"+1345"},{iso:"BM",regions:"百慕大群岛",regions_en:"Bermuda",phoneCountryCode:"+1441"},{iso:"GD",regions:"格林纳达",regions_en:"Grenada",phoneCountryCode:"+1473"},{iso:"TC",regions:"特克斯和凯科斯群岛",regions_en:"Turksand Caicos Islands",phoneCountryCode:"+1649"},{iso:"MS",regions:"蒙特塞拉特岛",regions_en:"Montserrat",phoneCountryCode:"+1664"},{iso:"GU",regions:"关岛",regions_en:"Guam",phoneCountryCode:"+1671"},{iso:"AS",regions:"美属萨摩亚",regions_en:"American Samoa",phoneCountryCode:"+1684"},{iso:"LC",regions:"圣露西亚",regions_en:"Saint Lucia",phoneCountryCode:"+1758"},{iso:"DM",regions:"多米尼加",regions_en:"Dominica",phoneCountryCode:"+1767"},{iso:"VC",regions:"圣文森特和格林纳丁斯",regions_en:"Saint Vincent and The Grenadines",phoneCountryCode:"+1784"},{iso:"PR",regions:"波多黎各",regions_en:"Puerto Rico",phoneCountryCode:"+1787"},{iso:"DO",regions:"多米尼加共和国",regions_en:"dominican republic",phoneCountryCode:"+1809"},{iso:"TT",regions:"特立尼达和多巴哥",regions_en:"Trinidadand Tobago",phoneCountryCode:"+1868"},{iso:"KN",regions:"圣基茨和尼维斯",regions_en:"Saint Kitts and Nevis",phoneCountryCode:"+1869"},{iso:"JM",regions:"牙买加",regions_en:"Jamaica",phoneCountryCode:"+1876"}],Bq=function(e){var t,n=e.value,r=e.onChange,o=null!==(t=su.resolvedLanguage)&&void 0!==t?t:su.language,i=jq.map((function(e){return{value:e.iso,key:e.iso,children:e.phoneCountryCode,label:y().createElement("div",{className:"select-option-item"},y().createElement("span",null,e.phoneCountryCode),y().createElement("div",{className:"country"},y().createElement(fv,{title:"zh-CN"===o?e.regions:e.regions_en},"zh-CN"===o?e.regions:e.regions_en))),region:e.regions,region_en:e.regions_en}}));
|
|
27788
27788
|
// 现在需要回填国际化短信
|
|
27789
|
-
return y().createElement(lI,{showSearch:!0,popupClassName:"areacode-virtual-dropdown",bordered:!1,listHeight:258,options:i,value:n,onChange:r,onClick:function(e){e.preventDefault(),e.stopPropagation()},optionLabelProp:"children",dropdownMatchSelectWidth:138,filterOption:function(e,t){return t.children.toLowerCase().indexOf(e.toLowerCase())>=0||(t.region.toLowerCase().indexOf(e.toLowerCase())>=0||t.region_en.toLowerCase().indexOf(e.toLowerCase())>=0)},suffixIcon:y().createElement(y().Fragment,null,y().createElement(JD,{className:"areacode-virtual-dropdown-icon",type:"authing-arrow-down-s-fill",style:{width:20,height:20}}))})},
|
|
27789
|
+
return y().createElement(lI,{showSearch:!0,popupClassName:"areacode-virtual-dropdown",bordered:!1,listHeight:258,options:i,value:n,onChange:r,onClick:function(e){e.preventDefault(),e.stopPropagation()},optionLabelProp:"children",dropdownMatchSelectWidth:138,filterOption:function(e,t){return t.children.toLowerCase().indexOf(e.toLowerCase())>=0||(t.region.toLowerCase().indexOf(e.toLowerCase())>=0||t.region_en.toLowerCase().indexOf(e.toLowerCase())>=0)},suffixIcon:y().createElement(y().Fragment,null,y().createElement(JD,{className:"areacode-virtual-dropdown-icon",type:"authing-arrow-down-s-fill",style:{width:20,height:20}}))})},Uq=function(){return Uq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Uq.apply(this,arguments)},qq=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Vq=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},zq=y().useEffect,$q=y().useState,Hq=function(e){var t=e.areaCode,n=e.onAreaCodeChange,r=e.onChange,o=e.value,i=qq(e,["areaCode","onAreaCodeChange","onChange","value"]),a=_u().t,s=Vq($q(/^[^a-zA-Z]*$/.test(String(o))?o:""),2),c=s[0],l=s[1];
|
|
27790
27790
|
// 当formValue变化时候
|
|
27791
|
-
|
|
27791
|
+
zq((function(){l(/^[^a-zA-Z]*$/.test(String(o))?o:"")}),[o]);return y().createElement(y().Fragment,null,y().createElement(oO,Uq({autoComplete:"off",pattern:"[^a-zA-Z]*",value:c,placeholder:a("login.inputPhone")},i,{onChange:function(e){var t=e.target.value;/^[^a-zA-Z]*$/.test(t)&&function(e){l(e.target.value),null==r||r(e)}(e)},prefix:y().createElement(Bq,{value:t,onChange:n}),maxLength:20})))},Wq=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Gq=y().useState,Kq=function(e){var t=e.value,n=e.onChange,r=Wq(Gq(!1),2),o=r[0],i=r[1],a=_u().t,s=hL().host,c=y().createElement("div",null,y().createElement(zD,null),y().createElement("div",{style:{marginTop:8}},"Upload"));return y().createElement(uD,{name:"file",accept:"image/*",listType:"picture-card",showUploadList:!1,action:"".concat(s,"/api/v2/upload?folder=photos"),onChange:function(e){var t=e.file.status;if(i("uploading"===t),"done"===t){var r=e.file.response,o=r.code,s=r.message,c=r.data;if(200!==o)return gC.error(s);var l=c.url;null==n||n(l)}else"error"===t&&gC.error(a("common.uploadFail",{name:e.file.name}))}},y().createElement(CI,{size:"small",spinning:o},t?y().createElement("img",{src:t,alt:"",style:{width:"100%"}}):c))},Yq=function(e,t){return void 0===e&&(e=[]),e.map((function(e){var n;return{type:e.inputType,label:e.label,name:e.name,required:e.required,validateRules:e.validateRules.map((function(e){return{type:e.type,content:e.content,errorMessage:e.errorMessage,i18n:e.i18n}})),options:null===(n=t.find((function(t){return t.key===e.name})))||void 0===n?void 0:n.options}}))},Jq=function(e,t){var n=[],r={};return null==t||t.forEach((function(t){var o,i=t.name,a=t.value,s=t.code,c=null===(o=e.find((function(e){return e.name===i})))||void 0===o?void 0:o.type;
|
|
27792
27792
|
// 根据字段类型生成不同的数据结构
|
|
27793
|
-
"internal"===c?("phone"===i&&(r.phoneToken=s),"email"===i&&(r.emailToken=s),r[i]=a):"user"===c&&n.push({key:i,value:a})})),{registerProfile:r,udf:n}},
|
|
27793
|
+
"internal"===c?("phone"===i&&(r.phoneToken=s),"email"===i&&(r.emailToken=s),r[i]=a):"user"===c&&n.push({key:i,value:a})})),{registerProfile:r,udf:n}},Zq=function(e,t){var n,r,o=null!==(n=su.resolvedLanguage)&&void 0!==n?n:su.language,i=null==e?void 0:e[t],a=(null===(r=null==e?void 0:e.i18n)||void 0===r?void 0:r[t])||{},s=null==a?void 0:a[o];return(null==s?void 0:s.enabled)&&(null==s?void 0:s.value)||i},Qq=function(){return Qq=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Qq.apply(this,arguments)},Xq=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},eV=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},tV=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},nV=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},rV=y().useCallback,oV=y().useEffect,iV=y().useMemo,aV=y().useRef,sV=y().useState,cV=bS,lV=function(e,t){return t.props.value.toLowerCase().indexOf(e.toLowerCase())>=0||t.props.label.toLowerCase().indexOf(e.toLowerCase())>=0},uV=function(e){var t,n,r=e.metaData,o=e.businessRequest,i=e.extendsFieldsI18n,a=iL(),s=null==a?void 0:a.verifyCodeLength,c=aV(null),l=tV(sV([]),2),u=l[0],d=l[1],f=(null===(t=null==a?void 0:a.internationalSmsConfig)||void 0===t?void 0:t.enabled)||!1,p=tV(sV((null===(n=null==a?void 0:a.internationalSmsConfig)||void 0===n?void 0:n.defaultISOType)||"CN"),2),h=p[0],m=p[1],v=tX(),g=v.get,b=v.post,w=_u().t,C=tV(cT.useForm(),1)[0],E=rV((function(){return Xq(void 0,void 0,void 0,(function(){var e,t,n,r,o,i,a,s,c,l,u;return eV(this,(function(f){switch(f.label){case 0:return[4/*yield*/,g("/api/v2/country-list")];case 1:e=f.sent().data,null!==(u=su.resolvedLanguage)&&void 0!==u?u:su.language,t="zh-CN"===su.resolvedLanguage?null==e?void 0:e.zh:null==e?void 0:e.en,n=[];try{for(r=nV(Object.entries(t)),o=r.next();!o.done;o=r.next())i=tV(o.value,2),a=i[0],s=i[1],n.push({label:s+" (".concat(a,")"),value:a})}catch(e){c={error:e}}finally{try{o&&!o.done&&(l=r.return)&&l.call(r)}finally{if(c)throw c.error}}return d(n),[2/*return*/]}}))}))}),[g]);oV((function(){r.map((function(e){return e.name})).includes("country")&&E()}),[E,r]);var k=rV((function(e){return f?y().createElement(Hq,Qq({},e,{className:"authing-g2-input",size:"large",areaCode:h,onAreaCodeChange:function(e){m(e),C.getFieldValue(["internal phone:phone"])&&C.validateFields(["internal phone:phone"])},maxLength:20})):y().createElement(VU,Qq({},e,{className:"authing-g2-input",autoComplete:"off",key:"internal-phone:phone123",type:"tel",size:"large",maxLength:11,placeholder:w("login.inputPhone")}))}),[h,C,f,w]),S=iV((function(){return{gender:function(e){return y().createElement(lI,{key:e.key,className:Zj()("authing-g2-select","authing-g2-input"),popupClassName:"authing-g2-dropdown",options:[{label:su.t("common.man"),value:"M"},{label:su.t("common.female"),value:"F"}]})},country:function(e){return y().createElement(lI,{key:e.key,className:Zj()("authing-g2-select","authing-g2-input"),popupClassName:"authing-g2-dropdown",options:u,showSearch:!0,filterOption:lV})},image:function(){return y().createElement(Kq,null)},number:function(e){return y().createElement(VU,{key:e.key,style:{width:"100%"},className:"authing-g2-input"})},date:function(e){return y().createElement(cV,{key:e.key,className:"authing-g2-input",style:{width:"100%"},placeholder:su.t("common.pleaseSelectDate")})},datetime:function(e){return y().createElement(cV,{key:e.key,className:"authing-g2-input",style:{width:"100%"},placeholder:su.t("common.pleaseSelectDate")})},select:function(e){return y().createElement(lI,{key:e.key,className:Zj()("authing-g2-select","authing-g2-input"),popupClassName:"authing-g2-dropdown",showSearch:!0,options:e.options,filterOption:lV})},dropdown:function(e){return y().createElement(lI,{key:e.key,className:Zj()("authing-g2-select","authing-g2-input"),popupClassName:"authing-g2-dropdown",showSearch:!0,options:e.options,filterOption:lV})},boolean:function(e){return y().createElement(lI,{key:e.key,className:Zj()("authing-g2-select","authing-g2-input"),popupClassName:"authing-g2-dropdown",options:[{label:su.t("common.yes"),value:!0},{label:su.t("common.no"),value:!1}]})},string:function(e){return y().createElement(oO,{key:e.key,type:"text",size:"large",className:"authing-g2-input",autoComplete:"off"})},text:function(e){return y().createElement(oO,{key:e.key,type:"text",size:"large",className:"authing-g2-input",autoComplete:"off"})},textarea:function(e){return y().createElement(oO.TextArea,{key:e.key,
|
|
27794
27794
|
// className="authing-g2-textarea"
|
|
27795
|
-
className:Zj()("authing-g2-textarea","authing-g2-input"),maxLength:200,rows:4,style:{marginBottom:10}})}}}),[u]),x=
|
|
27795
|
+
className:Zj()("authing-g2-textarea","authing-g2-input"),maxLength:200,rows:4,style:{marginBottom:10}})}}}),[u]),x=iV((function(){return{username:function(e){var t;return y().createElement(oU.UserName,{validateFirst:!0,className:"authing-g2-input-form",name:"username",key:e.key,label:null!==(t=e.label)&&void 0!==t?t:su.t("common.username"),required:e.required,checkRepeat:!0},y().createElement(oO,{className:"authing-g2-input",autoComplete:"username",key:"internal-username:asdf",size:"large",maxLength:11,placeholder:w("login.inputUsername")}))},phone:function(e){var t;return y().createElement(y().Fragment,null,y().createElement(oU.Phone,{validateFirst:!0,className:f?"authing-g2-input-form remove-padding":"authing-g2-input-form",name:"phone",key:"internal-phone:phone",label:null!==(t=e.label)&&void 0!==t?t:su.t("common.phoneLabel"),required:e.required,checkRepeat:!0,areaCode:h},y().createElement(k,null)),y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"phoneCode",key:"internal-phone:code",rules:e.required?dX(w("common.captchaCode")):void 0},y().createElement(JU,{isInternationSms:f,areaCode:h,className:"authing-g2-input g2-send-code-input",autoComplete:"one-time-code",size:"large",placeholder:w("common.inputFourVerifyCode",{length:s}),scene:Ni.SCENE_TYPE_COMPLETE_PHONE,maxLength:s,fieldName:"phone",form:C,onSendCodeBefore:function(){return C.validateFields(["phone"])}})))},email:function(e){var t;return y().createElement(y().Fragment,null,y().createElement(oU.Email,{className:"authing-g2-input-form",name:"email",checkRepeat:!0,label:null!==(t=e.label)&&void 0!==t?t:su.t("common.email"),required:e.required,key:"internal email:email13",validateFirst:!0},y().createElement(oO,{className:"authing-g2-input",autoComplete:"email",size:"large",placeholder:w("login.inputEmail")})),y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"emailCode",key:"internal email:code1432",rules:e.required?dX(w("common.captchaCode")):void 0},y().createElement(Fq,{className:"authing-g2-input g2-send-code-input",autoComplete:"one-time-code",size:"large",placeholder:w("common.inputFourVerifyCode",{length:s}),maxLength:s,data:"",scene:Oc.INFORMATION_COMPLETION_VERIFY_CODE,fieldName:"email",form:C,onSendCodeBefore:function(){return C.validateFields(["email"])}})))}}}),[k,h,C,f,w,s]),_=rV((function(e){var t,n,r=null===(t=i||a.extendsFieldsI18n)||void 0===t?void 0:t[e.name],o=AX();return(null===(n=null==r?void 0:r[o])||void 0===n?void 0:n.enabled)&&(null==r?void 0:r[o].value)?null==r?void 0:r[o].value:e.label||e.name}),[a.extendsFieldsI18n,i]),P=rV((function(e){var t,n,r=[],o=_(e),i=null!==(t=e.validateRules)&&void 0!==t?t:[];return null!==(n=e.required)&&void 0!==n&&n&&r.push({type:"any",required:!0,validateTrigger:"onChange",message:w("login.noEmpty",{label:o})}),
|
|
27796
27796
|
// TODO 后端的 rule Type 有很多 前端目前只做了两种的映射
|
|
27797
|
-
i.forEach((function(e){switch(e.type){case"isNumber":r.push({type:"number",validateTrigger:"onBlur",message:
|
|
27797
|
+
i.forEach((function(e){switch(e.type){case"isNumber":r.push({type:"number",validateTrigger:"onBlur",message:Zq(e,"errorMessage")||e.errorMessage||"请填写数字"});break;case"regExp":r.push({validateTrigger:"onBlur",pattern:new RegExp(e.content.replaceAll("/","")),message:Zq(e,"errorMessage")||e.errorMessage})}})),r}),[_,w]),T=rV((function(e){
|
|
27798
27798
|
// const label =
|
|
27799
27799
|
// i18n.resolvedLanguage === 'zh-CN'
|
|
27800
27800
|
// ? metaData.label || metaData.name
|
|
27801
27801
|
// : metaData.name
|
|
27802
27802
|
var t=_(e);
|
|
27803
27803
|
// 这部分的控件分两种 一个集成控件(手机号 + 验证码)一种是基础控件 分开处理
|
|
27804
|
-
if(Object.values(
|
|
27804
|
+
if(Object.values(EU).includes(e.type))return x[e.name]({required:e.required,label:t});var n=function(n){return y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",rules:P(e),key:e.name,name:e.name,label:t,style:{marginBottom:8}},n)};
|
|
27805
27805
|
// 国家名和性别的控件需要单独和name匹配
|
|
27806
|
-
return["country","gender"].includes(e.name)?n(S[e.name]({options:e.options,key:e.name})):Object.keys(S).includes(e.type)?n(S[e.type]({options:e.options,key:e.name})):n(y().createElement(oO,{type:"text",className:"authing-g2-input",autoComplete:"off"}))}),[S,P,_,x]),O=
|
|
27806
|
+
return["country","gender"].includes(e.name)?n(S[e.name]({options:e.options,key:e.name})):Object.keys(S).includes(e.type)?n(S[e.type]({options:e.options,key:e.name})):n(y().createElement(oO,{type:"text",className:"authing-g2-input",autoComplete:"off"}))}),[S,P,_,x]),O=iV((function(){return r.map((function(e){return T(e)}))}),[T,r]),N=tV(sj((function(e){return Xq(void 0,void 0,void 0,(function(){var t,n,r,i,a,s,l,u,d,p,m,v,y,C,E;return eV(this,(function(k){switch(k.label){case 0:t=Object.keys(e).filter((function(t){return void 0!==e[t]&&""!==e[t]})),null===(C=c.current)||void 0===C||C.onSpin(!0),n=t.filter((function(e){return!["phoneCode","emailCode"].includes(e)})).map((function(t){var n={name:t,value:e[t]};
|
|
27807
27807
|
// 给这两个字段添加一个验证码
|
|
27808
27808
|
// 国际化短信 需要携带区号
|
|
27809
27809
|
// TODO 默认这里手机号与邮箱 都是有验证码的
|
|
27810
|
-
if("phone"===t){if(f){var r=gj(f,e[t],h).countryCode;return
|
|
27810
|
+
if("phone"===t){if(f){var r=gj(f,e[t],h).countryCode;return Qq(Qq({},n),{code:e.phoneCode,phoneCountryCode:r})}return Qq(Qq({},n),{code:e.phoneCode})}return"email"===t?Qq(Qq({},n),{code:e.emailCode}):n})),k.label=1;case 1:return k.trys.push([1,9,10,11]),t.includes("username")?[4/*yield*/,g("/api/v2/users/is-user-exists",{username:e.username})]:[3/*break*/,3];case 2:
|
|
27811
27811
|
// checkResult 为 true 时 代表用户名已存在 直接报message 并且不调用注册接口
|
|
27812
|
-
if(r=k.sent(),i=r.data,200===(p=r.code)&&i)return gC.error(w("common.userNameIsExists")),[2/*return*/];k.label=3;case 3:return t.includes("phone")?(a={phone:e.phone,phoneCode:e.phoneCode},f&&(s=gj(f,e.phone,h).countryCode,a.phoneCountryCode=s),[4/*yield*/,b("/api/v2/sms/preCheckCode",a)]):[3/*break*/,5];case 4:if(l=k.sent(),p=l.statusCode,u=l.data,v=u.valid,y=u.message,200!==p||!v)return gC.error(y),[2/*return*/];k.label=5;case 5:return t.includes("email")?[4/*yield*/,b("/api/v2/email/preCheckCode",{email:e.email,emailCode:e.emailCode})]:[3/*break*/,7];case 6:if(d=k.sent(),p=d.statusCode,m=d.data,v=m.valid,y=m.message,200!==p||!v)return gC.error(y),[2/*return*/];k.label=7;case 7:return[4/*yield*/,null==o?void 0:o({fieldValues:n})];case 8:return k.sent(),[3/*break*/,11];case 9:return k.sent(),[3/*break*/,11];case 10:return null===(E=c.current)||void 0===E||E.onSpin(!1),[7/*endfinally*/];case 11:return[2/*return*/]}}))}))}),[h]),2),I=N[1];return y().createElement(cT,{layout:"vertical",form:C,onFinish:I,onSubmitCapture:function(){return c.current.onSpin(!0)},onFinishFailed:function(){return c.current.onError()},className:"authing-g2-completeInfo-form authing-g2-form-required-item-icon-after"},O,y().createElement(cT.Item,{className:"authing-g2-sumbit-form"},y().createElement(Tj,{text:w("common.problem.form.submit"),ref:c,className:"password g2-completeInfo-submit"})))},fV=function(){return fV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},fV.apply(this,arguments)},pV=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},hV=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};!function(e){e.Complete="complete-completion",e.Skip="skip-completion"}(Rq||(Rq={}));var mV,vV=function(e,t){return pV(void 0,void 0,void 0,(function(){return hV(this,(function(n){switch(n.label){case 0:return[4/*yield*/,(0,eX().authFlow)(e,t)];case 1:return[2/*return*/,n.sent()]}}))}))},gV=function(e,t,n){var r,o,i=eX().post;if("registerByEmail"===e){var a=n.phoneToken;return delete n.phoneToken,i("/api/v2/register-email",fV(fV({},t),{profile:fV(fV({},t.profile),n),phoneToken:a,postUserInfoPipeline:!0}))}if("registerByPhoneCode"===e){var s=null==n?void 0:n.emailToken;return null==n||delete n.emailToken,i("/api/v2/register-phone-code",fV(fV({},t),{profile:fV(fV({},t.profile),n),emailToken:s,postUserInfoPipeline:!0}))}if("registerByEmailCode"===e){a=n.phoneToken;return delete n.phoneToken,i("/api/v2/register-email-code",fV(fV({},t),{profile:fV(fV({},t.profile),n),phoneToken:a,postUserInfoPipeline:!0}))}a=null!==(r=n.phoneToken)&&void 0!==r?r:null==t?void 0:t.phoneToken,s=null!==(o=n.emailToken)&&void 0!==o?o:null==t?void 0:t.emailToken;return delete n.phoneToken,delete n.emailToken,i("/api/v2/register-".concat(e.split("-")[0]),fV(fV({},t),{profile:fV(fV({},t.profile),n),postUserInfoPipeline:!0,phoneToken:a,emailToken:s}))},yV=function(e,t,n,r){return pV(void 0,void 0,void 0,(function(){return hV(this,(function(o){switch(o.label){case 0:return e!==Rq.Skip?[3/*break*/,2]:[4/*yield*/,(i=t,a=n,s=eX().post,s("registerByEmail"===i?"/api/v2/register-email":"registerByPhoneCode"===i?"/api/v2/register-phone-code":"registerByEmailCode"===i?"/api/v2/register-email-code":"/api/v2/register-".concat(i.split("-")[0]),a))];case 1:case 3:return[2/*return*/,o.sent()];case 2:return e!==Rq.Complete?[3/*break*/,4]:[4/*yield*/,gV(t,n,r)];case 4:return[2/*return*/]}var i,a,s}))}))},bV=function(){return bV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bV.apply(this,arguments)},wV=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},CV=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},EV=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},kV=y().useCallback,SV=y().useEffect,xV=y().useMemo,_V=y().useState,PV=function(e){var t=e.metaData,n=e.businessRequest,r=e.skipComplateFileds;OB();var o=hL(),i=_u().t,a=oL().spinChange,s=EV(_V(!1),2),c=s[0],l=s[1];return y().createElement("div",{className:"g2-view-container g2-complete-info"},y().createElement("div",{className:"g2-view-header"},y().createElement("div",{className:"g2-completeInfo-header"},y().createElement(Hj,{src:null==o?void 0:o.logo,size:48,borderRadius:4,alt:"",className:"icon"}),r&&y().createElement(Cj,{className:"g2-completeInfo-header-skip",type:"link",loading:c,onClick:function(){return wV(void 0,void 0,void 0,(function(){return CV(this,(function(e){switch(e.label){case 0:return a(!0),l(!0),[4/*yield*/,n(Rq.Skip)];case 1:return e.sent(),l(!1),a(!1),[2/*return*/]}}))}))}},!c&&y().createElement(JD,{type:"authing-a-share-forward-line1"}),y().createElement("span",null,i("common.skip")))),y().createElement("div",{className:"title"},i("common.perfectUserInfo")),y().createElement("div",{className:"title-explain"},i("common.welcomeDoc",{name:o.title}))),y().createElement("div",{className:"g2-view-tabs g2-completeInfo-content"},y().createElement(dV,{metaData:t,businessRequest:function(e){return wV(void 0,void 0,void 0,(function(){return CV(this,(function(t){switch(t.label){case 0:return[4/*yield*/,null==n?void 0:n(Rq.Complete,e)];case 1:return[2/*return*/,t.sent()]}}))}))}})))},TV=function(){var e=uL(),t=e.metaData,n=e.skip,r=fL(),o=JL(),i=vL().instance;return y().createElement(PV,{metaData:t,businessRequest:function(e,t){return wV(void 0,void 0,void 0,(function(){var n,a,s,c,l,u,d;return CV(this,(function(f){switch(f.label){case 0:return[4/*yield*/,vV(e,t)];case 1:return n=f.sent(),a=n.isFlowEnd,s=n.data,c=n.onGuardHandling,l=null==i?void 0:i.getOriginAccount(),u="password"===(null==i?void 0:i.getOriginWay())?null==i?void 0:i.setLoginWayByHttpData:null==i?void 0:i.setLoginWayByLDAPData,s&&i&&l&&u(l,s),a?null===(d=null==r?void 0:r.onLogin)||void 0===d||d.call(r,s,o):null==c||c(),[2/*return*/]}}))}))},skipComplateFileds:n})},OV=function(){var e=uL(),t=iL(),n=fL(),r=JL(),o=aL().get,i=hL(),a=EV(_V(),2),s=a[0],c=a[1],l=EV(_V(),2),u=l[0],d=l[1],f=xV((function(){return null==t?void 0:t.extendsFields.filter((function(t){return t.name!==xU[e.businessRequestName]}))}),[e.businessRequestName,null==t?void 0:t.extendsFields]),p=null==t?void 0:t.skipComplateFileds,h=xV((function(){return i.loadingComponent}),[i.loadingComponent]),m=kV((function(){return wV(void 0,void 0,void 0,(function(){var e;return CV(this,(function(t){switch(t.label){case 0:return[4/*yield*/,o("/api/v2/udfs/field-metadata-for-completion",void 0,{})];case 1:return e=t.sent().data,c(e),[2/*return*/]}}))}))}),[o]);return SV((function(){m()}),[m]),SV((function(){if(s){var e=Jq(f,s);d(e)}}),[f,s]),y().createElement(y().Fragment,null,u?y().createElement(PV,{metaData:u,skipComplateFileds:p,businessRequest:function(t,o){return wV(void 0,void 0,void 0,(function(){var i,a,s,c,l,u,d,p,h,m,v,g,y;return CV(this,(function(b){switch(b.label){case 0:return i=Zq(f,null==o?void 0:o.fieldValues),a=i.registerProfile,s=i.udf,c=bV(bV({},e.content),{params:JSON.stringify(JSON.parse((null===(h=e.content)||void 0===h?void 0:h.params)?null===(m=e.content)||void 0===m?void 0:m.params:"[]").concat(s))}),[4/*yield*/,yV(t,e.businessRequestName,c,a)];case 1:return 200===(l=b.sent()).statusCode?(e.onRegisterSuccess(l.data),null===(v=null==n?void 0:n.onRegisterInfoCompleted)||void 0===v||v.call(n,l.data,c,r)):(null===(g=null==l?void 0:l.onGuardHandling)||void 0===g||g.call(l),u=l.apiCode,d=l.message,p=l.data,e.onRegisterFailed(u,p,d),null===(y=null==n?void 0:n.onRegisterInfoCompletedError)||void 0===y||y.call(n,{code:u,message:d},c,r)),[2/*return*/]}}))}))}}):h)},NV=y().useMemo;!function(e){e.IOS="ios",e.Android="Android"}(mV||(mV={}));var IV,AV=function(){OB();var e=_u().t,t=iL(),n=pL().backModule,r=null==t?void 0:t.cdnBase,o=NV((function(){var t;return(t={})[mV.IOS]={title:e("common.downloadTotpAppIOS"),google:"".concat(r,"/GoogleAuthenticator-Apple.png"),microsoft:"".concat(r,"/MicrosoftAuthenticator-Apple.png")},t[mV.Android]={title:e("common.downloadTotpAppAndroid"),google:"".concat(r,"/GoogleAuthenticator-Authing.png"),microsoft:"".concat(r,"/MicrosoftAuthenticator-Baidu.png")},t}),[r,e]),i=NV((function(){return Object.keys(o).map((function(t,n){return y().createElement(xR.TabPane,{tab:o[t].title,key:n,className:"g2-mfa-download-at-tab"},y().createElement("span",{className:"g2-mfa-totp-download-subtitle"},e("common.downloadTotpAppDocs")),y().createElement("div",{className:"g2-mfa-totp-download-qrcode"},y().createElement("div",{className:"g2-mfa-totp-download-qrcode-item"},y().createElement(Hj,{width:120,height:120,className:"g2-mfa-totp-download-image",src:o[t].google,alt:"Google Authenticator"}),y().createElement("span",{className:"g2-mfa-totp-download-qrcode-text"},"Google Authenticator")),y().createElement("div",{className:"g2-mfa-totp-download-qrcode-item"},y().createElement(Hj,{width:120,height:120,className:"g2-mfa-totp-download-image",src:o[t].microsoft,alt:"Microsoft Authenticator"}),y().createElement("span",{className:"g2-mfa-totp-download-qrcode-text"},"Microsoft Authenticator"))))}))}),[o,e]),a=NV((function(){return y().createElement(_B,{onBack:function(){return null==n?void 0:n()}},e("common.backToMFA"))}),[n,e]);return y().createElement("div",{className:"g2-view-container g2-download-authenticator"},a,y().createElement("div",{className:"g2-view-tabs g2-mfa-totp-download-tabs"},y().createElement(xR,{defaultActiveKey:mV.IOS},i)))},RV=y().useMemo,MV=function(e){var t=uL();OB();var n=RV((function(){var n,r,o=null!==(n=null==e?void 0:e.error)&&void 0!==n?n:null==t?void 0:t.error;return null!==(r="".concat(null==o?void 0:o.message))&&void 0!==r?r:"".concat(su.t("user.contactAdministrator"))}),[null==t?void 0:t.error,null==e?void 0:e.error]);return y().createElement("div",{className:"g2-view-container g2-view-error"},y().createElement("div",{className:"g2-error-content"},y().createElement("div",{style:{display:"flex",justifyContent:"center"}},y().createElement("div",{style:{width:240,height:160,backgroundImage:"url(https://authing-files.oss-cn-zhangjiakou.aliyuncs.com/authing-guard/authing_error.svg)",backgroundSize:"contain"}})),y().createElement("div",{className:"g2-error-message"},su.t("user.error")),y().createElement("span",{className:"g2-error-message-text",dangerouslySetInnerHTML:{__html:n}})))},DV=function(){return DV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},DV.apply(this,arguments)},LV=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},FV=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},jV=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},BV=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},UV=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},qV=y().useMemo,VV={"phone-code":"phone","email-code":"email"},zV=function(e){var t,n=e.methods,r=e.areaCode,o=void 0===r?"CN":r,i=e.currentMethod,a=e.checkRepeat,s=e.checkExist,c=jV(e,["methods","areaCode","currentMethod","checkRepeat","checkExist"]),l=iL(),u=_u().t,d=aL().get,f=gL(),p=(null===(t=l.internationalSmsConfig)||void 0===t?void 0:t.enabled)&&"phone-code"===i,h=qV((function(){return"email-code"===i?{field:u("common.emailLabel"),checkRepeatErrorMessage:u("common.checkEmail"),checkExistErrorMessage:u("common.noFindEmail"),formatErrorMessage:u("login.inputCorrectPhone"),pattern:lX.email}:{field:u("common.phone"),checkRepeatErrorMessage:u("common.checkPhone"),checkExistErrorMessage:u("common.noFindPhone"),formatErrorMessage:u("login.inputCorrectPhone"),pattern:f||lX.phone}}),[i,f,u]),m=YB((function(e,t,n){var r=e;"phone-code"===i&&p&&(r=gj(p,r,o).phoneNumber);d("/api/v2/users/find",{userPoolId:null==l?void 0:l.userPoolId,key:r,type:VV[i]}).then((function(e){var r=e.data;s&&(Boolean(r)?t(!0):n(h.checkExistErrorMessage)),a&&(Boolean(r)?n(h.checkRepeatErrorMessage):t(!0))}))})),v=qV((function(){return p?{validateTrigger:"onBlur",validator:function(e,t){return LV(void 0,void 0,void 0,(function(){return FV(this,(function(e){return!t||(0,uj.phone)(t,{country:o}).isValid||(0,uj.phone)(t).isValid?[2/*return*/,Promise.resolve()]:[2/*return*/,Promise.reject(u("common.i18nCheckErrorMessage"))]}))}))}}:{validateTrigger:"onBlur",pattern:h.pattern,message:h.formatErrorMessage}}),[o,p,h.formatErrorMessage,h.pattern,u]),g=qV((function(){
|
|
27812
|
+
if(r=k.sent(),i=r.data,200===(p=r.code)&&i)return gC.error(w("common.userNameIsExists")),[2/*return*/];k.label=3;case 3:return t.includes("phone")?(a={phone:e.phone,phoneCode:e.phoneCode},f&&(s=gj(f,e.phone,h).countryCode,a.phoneCountryCode=s),[4/*yield*/,b("/api/v2/sms/preCheckCode",a)]):[3/*break*/,5];case 4:if(l=k.sent(),p=l.statusCode,u=l.data,v=u.valid,y=u.message,200!==p||!v)return gC.error(y),[2/*return*/];k.label=5;case 5:return t.includes("email")?[4/*yield*/,b("/api/v2/email/preCheckCode",{email:e.email,emailCode:e.emailCode})]:[3/*break*/,7];case 6:if(d=k.sent(),p=d.statusCode,m=d.data,v=m.valid,y=m.message,200!==p||!v)return gC.error(y),[2/*return*/];k.label=7;case 7:return[4/*yield*/,null==o?void 0:o({fieldValues:n})];case 8:return k.sent(),[3/*break*/,11];case 9:return k.sent(),[3/*break*/,11];case 10:return null===(E=c.current)||void 0===E||E.onSpin(!1),[7/*endfinally*/];case 11:return[2/*return*/]}}))}))}),[h]),2),I=N[1];return y().createElement(cT,{layout:"vertical",form:C,onFinish:I,onSubmitCapture:function(){return c.current.onSpin(!0)},onFinishFailed:function(){return c.current.onError()},className:"authing-g2-completeInfo-form authing-g2-form-required-item-icon-after"},O,y().createElement(cT.Item,{className:"authing-g2-sumbit-form"},y().createElement(Tj,{text:w("common.problem.form.submit"),ref:c,className:"password g2-completeInfo-submit"})))},dV=function(){return dV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},dV.apply(this,arguments)},fV=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},pV=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};!function(e){e.Complete="complete-completion",e.Skip="skip-completion"}(Aq||(Aq={}));var hV,mV=function(e,t){return fV(void 0,void 0,void 0,(function(){return pV(this,(function(n){switch(n.label){case 0:return[4/*yield*/,(0,eX().authFlow)(e,t)];case 1:return[2/*return*/,n.sent()]}}))}))},vV=function(e,t,n){var r,o,i=eX().post;if("registerByEmail"===e){var a=n.phoneToken;return delete n.phoneToken,i("/api/v2/register-email",dV(dV({},t),{profile:dV(dV({},t.profile),n),phoneToken:a,postUserInfoPipeline:!0}))}if("registerByPhoneCode"===e){var s=null==n?void 0:n.emailToken;return null==n||delete n.emailToken,i("/api/v2/register-phone-code",dV(dV({},t),{profile:dV(dV({},t.profile),n),emailToken:s,postUserInfoPipeline:!0}))}if("registerByEmailCode"===e){a=n.phoneToken;return delete n.phoneToken,i("/api/v2/register-email-code",dV(dV({},t),{profile:dV(dV({},t.profile),n),phoneToken:a,postUserInfoPipeline:!0}))}a=null!==(r=n.phoneToken)&&void 0!==r?r:null==t?void 0:t.phoneToken,s=null!==(o=n.emailToken)&&void 0!==o?o:null==t?void 0:t.emailToken;return delete n.phoneToken,delete n.emailToken,i("/api/v2/register-".concat(e.split("-")[0]),dV(dV({},t),{profile:dV(dV({},t.profile),n),postUserInfoPipeline:!0,phoneToken:a,emailToken:s}))},gV=function(e,t,n,r){return fV(void 0,void 0,void 0,(function(){return pV(this,(function(o){switch(o.label){case 0:return e!==Aq.Skip?[3/*break*/,2]:[4/*yield*/,(i=t,a=n,s=eX().post,s("registerByEmail"===i?"/api/v2/register-email":"registerByPhoneCode"===i?"/api/v2/register-phone-code":"registerByEmailCode"===i?"/api/v2/register-email-code":"/api/v2/register-".concat(i.split("-")[0]),a))];case 1:case 3:return[2/*return*/,o.sent()];case 2:return e!==Aq.Complete?[3/*break*/,4]:[4/*yield*/,vV(t,n,r)];case 4:return[2/*return*/]}var i,a,s}))}))},yV=function(){return yV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},yV.apply(this,arguments)},bV=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},wV=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},CV=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},EV=y().useCallback,kV=y().useEffect,SV=y().useMemo,xV=y().useState,_V=function(e){var t=e.metaData,n=e.businessRequest,r=e.skipComplateFileds;OB();var o=hL(),i=_u().t,a=oL().spinChange,s=CV(xV(!1),2),c=s[0],l=s[1];return y().createElement("div",{className:"g2-view-container g2-complete-info"},y().createElement("div",{className:"g2-view-header"},y().createElement("div",{className:"g2-completeInfo-header"},y().createElement(Hj,{src:null==o?void 0:o.logo,size:48,borderRadius:4,alt:"",className:"icon"}),r&&y().createElement(Cj,{className:"g2-completeInfo-header-skip",type:"link",loading:c,onClick:function(){return bV(void 0,void 0,void 0,(function(){return wV(this,(function(e){switch(e.label){case 0:return a(!0),l(!0),[4/*yield*/,n(Aq.Skip)];case 1:return e.sent(),l(!1),a(!1),[2/*return*/]}}))}))}},!c&&y().createElement(JD,{type:"authing-a-share-forward-line1"}),y().createElement("span",null,i("common.skip")))),y().createElement("div",{className:"title"},i("common.perfectUserInfo")),y().createElement("div",{className:"title-explain"},i("common.welcomeDoc",{name:o.title}))),y().createElement("div",{className:"g2-view-tabs g2-completeInfo-content"},y().createElement(uV,{metaData:t,businessRequest:function(e){return bV(void 0,void 0,void 0,(function(){return wV(this,(function(t){switch(t.label){case 0:return[4/*yield*/,null==n?void 0:n(Aq.Complete,e)];case 1:return[2/*return*/,t.sent()]}}))}))}})))},PV=function(){var e=uL(),t=e.metaData,n=e.skip,r=fL(),o=JL(),i=vL().instance;return y().createElement(_V,{metaData:t,businessRequest:function(e,t){return bV(void 0,void 0,void 0,(function(){var n,a,s,c,l,u,d;return wV(this,(function(f){switch(f.label){case 0:return[4/*yield*/,mV(e,t)];case 1:return n=f.sent(),a=n.isFlowEnd,s=n.data,c=n.onGuardHandling,l=null==i?void 0:i.getOriginAccount(),u="password"===(null==i?void 0:i.getOriginWay())?null==i?void 0:i.setLoginWayByHttpData:null==i?void 0:i.setLoginWayByLDAPData,s&&i&&l&&u(l,s),a?null===(d=null==r?void 0:r.onLogin)||void 0===d||d.call(r,s,o):null==c||c(),[2/*return*/]}}))}))},skipComplateFileds:n})},TV=function(){var e=uL(),t=iL(),n=fL(),r=JL(),o=aL().get,i=hL(),a=CV(xV(),2),s=a[0],c=a[1],l=CV(xV(),2),u=l[0],d=l[1],f=SV((function(){return null==t?void 0:t.extendsFields.filter((function(t){return t.name!==SU[e.businessRequestName]}))}),[e.businessRequestName,null==t?void 0:t.extendsFields]),p=null==t?void 0:t.skipComplateFileds,h=SV((function(){return i.loadingComponent}),[i.loadingComponent]),m=EV((function(){return bV(void 0,void 0,void 0,(function(){var e;return wV(this,(function(t){switch(t.label){case 0:return[4/*yield*/,o("/api/v2/udfs/field-metadata-for-completion",void 0,{})];case 1:return e=t.sent().data,c(e),[2/*return*/]}}))}))}),[o]);return kV((function(){m()}),[m]),kV((function(){if(s){var e=Yq(f,s);d(e)}}),[f,s]),y().createElement(y().Fragment,null,u?y().createElement(_V,{metaData:u,skipComplateFileds:p,businessRequest:function(t,o){return bV(void 0,void 0,void 0,(function(){var i,a,s,c,l,u,d,p,h,m,v,g,y;return wV(this,(function(b){switch(b.label){case 0:return i=Jq(f,null==o?void 0:o.fieldValues),a=i.registerProfile,s=i.udf,c=yV(yV({},e.content),{params:JSON.stringify(JSON.parse((null===(h=e.content)||void 0===h?void 0:h.params)?null===(m=e.content)||void 0===m?void 0:m.params:"[]").concat(s))}),[4/*yield*/,gV(t,e.businessRequestName,c,a)];case 1:return 200===(l=b.sent()).statusCode?(e.onRegisterSuccess(l.data),null===(v=null==n?void 0:n.onRegisterInfoCompleted)||void 0===v||v.call(n,l.data,c,r)):(null===(g=null==l?void 0:l.onGuardHandling)||void 0===g||g.call(l),u=l.apiCode,d=l.message,p=l.data,e.onRegisterFailed(u,p,d),null===(y=null==n?void 0:n.onRegisterInfoCompletedError)||void 0===y||y.call(n,{code:u,message:d},c,r)),[2/*return*/]}}))}))}}):h)},OV=y().useMemo;!function(e){e.IOS="ios",e.Android="Android"}(hV||(hV={}));var NV,IV=function(){OB();var e=_u().t,t=iL(),n=pL().backModule,r=null==t?void 0:t.cdnBase,o=OV((function(){var t;return(t={})[hV.IOS]={title:e("common.downloadTotpAppIOS"),google:"".concat(r,"/GoogleAuthenticator-Apple.png"),microsoft:"".concat(r,"/MicrosoftAuthenticator-Apple.png")},t[hV.Android]={title:e("common.downloadTotpAppAndroid"),google:"".concat(r,"/GoogleAuthenticator-Authing.png"),microsoft:"".concat(r,"/MicrosoftAuthenticator-Baidu.png")},t}),[r,e]),i=OV((function(){return Object.keys(o).map((function(t,n){return y().createElement(xR.TabPane,{tab:o[t].title,key:n,className:"g2-mfa-download-at-tab"},y().createElement("span",{className:"g2-mfa-totp-download-subtitle"},e("common.downloadTotpAppDocs")),y().createElement("div",{className:"g2-mfa-totp-download-qrcode"},y().createElement("div",{className:"g2-mfa-totp-download-qrcode-item"},y().createElement(Hj,{width:120,height:120,className:"g2-mfa-totp-download-image",src:o[t].google,alt:"Google Authenticator"}),y().createElement("span",{className:"g2-mfa-totp-download-qrcode-text"},"Google Authenticator")),y().createElement("div",{className:"g2-mfa-totp-download-qrcode-item"},y().createElement(Hj,{width:120,height:120,className:"g2-mfa-totp-download-image",src:o[t].microsoft,alt:"Microsoft Authenticator"}),y().createElement("span",{className:"g2-mfa-totp-download-qrcode-text"},"Microsoft Authenticator"))))}))}),[o,e]),a=OV((function(){return y().createElement(_B,{onBack:function(){return null==n?void 0:n()}},e("common.backToMFA"))}),[n,e]);return y().createElement("div",{className:"g2-view-container g2-download-authenticator"},a,y().createElement("div",{className:"g2-view-tabs g2-mfa-totp-download-tabs"},y().createElement(xR,{defaultActiveKey:hV.IOS},i)))},AV=y().useMemo,RV=function(e){var t=uL();OB();var n=AV((function(){var n,r,o=null!==(n=null==e?void 0:e.error)&&void 0!==n?n:null==t?void 0:t.error;return null!==(r="".concat(null==o?void 0:o.message))&&void 0!==r?r:"".concat(su.t("user.contactAdministrator"))}),[null==t?void 0:t.error,null==e?void 0:e.error]);return y().createElement("div",{className:"g2-view-container g2-view-error"},y().createElement("div",{className:"g2-error-content"},y().createElement("div",{style:{display:"flex",justifyContent:"center"}},y().createElement("div",{style:{width:240,height:160,backgroundImage:"url(https://authing-files.oss-cn-zhangjiakou.aliyuncs.com/authing-guard/authing_error.svg)",backgroundSize:"contain"}})),y().createElement("div",{className:"g2-error-message"},su.t("user.error")),y().createElement("span",{className:"g2-error-message-text",dangerouslySetInnerHTML:{__html:n}})))},MV=function(){return MV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},MV.apply(this,arguments)},DV=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},LV=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},FV=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},jV=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},BV=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},UV=y().useMemo,qV={"phone-code":"phone","email-code":"email"},VV=function(e){var t,n=e.methods,r=e.areaCode,o=void 0===r?"CN":r,i=e.currentMethod,a=e.checkRepeat,s=e.checkExist,c=FV(e,["methods","areaCode","currentMethod","checkRepeat","checkExist"]),l=iL(),u=_u().t,d=aL().get,f=gL(),p=(null===(t=l.internationalSmsConfig)||void 0===t?void 0:t.enabled)&&"phone-code"===i,h=UV((function(){return"email-code"===i?{field:u("common.emailLabel"),checkRepeatErrorMessage:u("common.checkEmail"),checkExistErrorMessage:u("common.noFindEmail"),formatErrorMessage:u("login.inputCorrectPhone"),pattern:lX.email}:{field:u("common.phone"),checkRepeatErrorMessage:u("common.checkPhone"),checkExistErrorMessage:u("common.noFindPhone"),formatErrorMessage:u("login.inputCorrectPhone"),pattern:f||lX.phone}}),[i,f,u]),m=KB((function(e,t,n){var r=e;"phone-code"===i&&p&&(r=gj(p,r,o).phoneNumber);d("/api/v2/users/find",{userPoolId:null==l?void 0:l.userPoolId,key:r,type:qV[i]}).then((function(e){var r=e.data;s&&(Boolean(r)?t(!0):n(h.checkExistErrorMessage)),a&&(Boolean(r)?n(h.checkRepeatErrorMessage):t(!0))}))})),v=UV((function(){return p?{validateTrigger:"onBlur",validator:function(e,t){return DV(void 0,void 0,void 0,(function(){return LV(this,(function(e){return!t||(0,uj.phone)(t,{country:o}).isValid||(0,uj.phone)(t).isValid?[2/*return*/,Promise.resolve()]:[2/*return*/,Promise.reject(u("common.i18nCheckErrorMessage"))]}))}))}}:{validateTrigger:"onBlur",pattern:h.pattern,message:h.formatErrorMessage}}),[o,p,h.formatErrorMessage,h.pattern,u]),g=UV((function(){
|
|
27813
27813
|
// 如果不是必填就不校验
|
|
27814
27814
|
// 必填项的默认校验规则
|
|
27815
|
-
var e=
|
|
27815
|
+
var e=BV([],jV(dX(u("common.phoneOrEmail"))),!1);
|
|
27816
27816
|
// 格式校验
|
|
27817
27817
|
return e.push(v),
|
|
27818
27818
|
// 是否校验重复
|
|
27819
|
-
(a||s)&&e.push({validator:m,validateTrigger:[]}),e}),[u,v,a,s,m]),b=
|
|
27819
|
+
(a||s)&&e.push({validator:m,validateTrigger:[]}),e}),[u,v,a,s,m]),b=UV((function(){if(1!==n.length)return y().createElement(cT.Item,MV({validateTrigger:["onBlur","onChange"],validateFirst:!0,rules:g},c));switch(i){case"phone-code":return y().createElement(oU.Phone,MV({},c,{areaCode:o,checkRepeat:a,checkExist:s}));case"email-code":return y().createElement(oU.Email,MV({},c,{checkRepeat:a,checkExist:s}))}}),[o,s,a,i,c,n.length,g]);return y().createElement(y().Fragment,null,b)},zV=function(){return zV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},zV.apply(this,arguments)},$V=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},HV=y().useMemo,WV=function(e){var t,n=e.methods,r=$V(e,["methods"]),o=iL(),i=_u().t,a=HV((function(){var e;return{"email-code":{t:i("common.email"),sort:2},"phone-code":{t:(null===(e=null==o?void 0:o.internationalSmsConfig)||void 0===e?void 0:e.enabled)?i("common.areaCodePhone"):i("common.phoneNumber"),sort:1}}}),[o,i]),s=HV((function(){var e;return(null===(e=null==o?void 0:o.internationalSmsConfig)||void 0===e?void 0:e.enabled)?i("login.inputAccount",{text:null==n?void 0:n.map((function(e){return a[e]})).sort((function(e,t){return e.sort-t.sort})).map((function(e){return e.t})).map((function(e,t){return 0===t?"「".concat(e,"」"):e})).join(" / ")}):i("login.inputAccount",{text:null==n?void 0:n.map((function(e){return a[e]})).sort((function(e,t){return e.sort-t.sort})).map((function(e){return e.t})).join(" / ")})}),[n,i,a,null===(t=null==o?void 0:o.internationalSmsConfig)||void 0===t?void 0:t.enabled]),c=HV((function(){return 1===n.length&&"phone-code"===n[0]?y().createElement(VU,zV({maxLength:11,placeholder:s},r)):y().createElement(oO,zV({maxLength:50,placeholder:s},r,{prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}})}))}),[r,n,s]);return y().createElement(y().Fragment,null,c)},GV=function(){return GV=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},GV.apply(this,arguments)},KV=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},YV=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},JV=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},ZV=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},QV=y().useCallback,XV=y().useRef,ez=y().useState;!function(e){e.email="email-code",e.phone="phone-code"}(NV||(NV={}));var tz=function(e){var t,n,r=_u().t,o=JV(cT.useForm(),1)[0],i=JV(ez(""),2),a=i[0],s=i[1],c=JV(ez("phone"),2),l=c[0],u=c[1],d=XV(null),f=vj().isPhoneMedia,p=eX().post,h=null!==(t=e.publicConfig.verifyCodeLength)&&void 0!==t?t:4,m=(null===(n=e.publicConfig.internationalSmsConfig)||void 0===n?void 0:n.enabled)||!1,v=QV((function(e){return y().createElement(y().Fragment,null,"phone"===l&&y().createElement(JU,GV({},e,{isInternationSms:m,className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:r("login.resetPassword.inputFourVerifyCode",{length:h}),prefix:y().createElement(JD,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:Ni.SCENE_TYPE_RESET,maxLength:h,data:a,onSendCodeBefore:function(){return KV(void 0,void 0,void 0,(function(){return YV(this,(function(e){switch(e.label){case 0:return[4/*yield*/,o.validateFields(["identify"])];case 1:return e.sent(),[2/*return*/]}}))}))}})),"email"===l&&y().createElement(Fq,GV({},e,{className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:r("login.resetPassword.inputFourVerifyCode",{length:h}),prefix:y().createElement(JD,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:Oc.RESET_PASSWORD_VERIFY_CODE,maxLength:h,data:a,onSendCodeBefore:function(){return KV(void 0,void 0,void 0,(function(){return YV(this,(function(e){switch(e.label){case 0:return[4/*yield*/,o.validateFields(["identify"])];case 1:return e.sent(),[2/*return*/]}}))}))}})))}),[l,o,a,m,r,h]);
|
|
27820
27820
|
// .map((item, index) => (index === 0 ? `「${item}」` : item))
|
|
27821
|
-
return y().createElement("div",{className:"authing-g2-login-phone-code"},y().createElement(cT,{name:"rePassword",form:o,onFinish:function(t){return
|
|
27821
|
+
return y().createElement("div",{className:"authing-g2-login-phone-code"},y().createElement(cT,{name:"rePassword",form:o,onFinish:function(t){return KV(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,c;return YV(this,(function(u){return null===(c=d.current)||void 0===c||c.onSpin(!0),n=t.identify,r=t.code,o=new Promise((function(){})),
|
|
27822
27822
|
// const newPassword = await authClient.options?.encryptFunction?.(
|
|
27823
27823
|
// tempPassword,
|
|
27824
27824
|
// publicKey
|
|
@@ -27834,7 +27834,7 @@ phoneCountryCode:s})),o.then((function(t){var r,o,i,a,s,c,l,u,f=t.code;if(null==
|
|
|
27834
27834
|
200===f&&(e.setPhoneOrEmailText(n),e.setPolicyStrength(p),(null===(c=null===(s=null==t?void 0:t.data)||void 0===s?void 0:s.customPasswordStrength)||void 0===c?void 0:c.enabled)&&e.setCustomPasswordStrength(h),e.setControlShow(!1),e.setResetToken(null===(l=null==t?void 0:t.data)||void 0===l?void 0:l.resetPasswordToken),e.setUserId(null===(u=null==t?void 0:t.data)||void 0===u?void 0:u.userId))}else gC.error(null==t?void 0:t.message)})).catch((function(e){
|
|
27835
27835
|
// submitButtonRef.current.onError()
|
|
27836
27836
|
// props.onSendError(codeMethod, e)
|
|
27837
|
-
gC.error(e.message)})),[2/*return*/]}))}))},onFinishFailed:function(){var e;null===(e=null==d?void 0:d.current)||void 0===e||e.onError()},autoComplete:"off"},y().createElement(
|
|
27837
|
+
gC.error(e.message)})),[2/*return*/]}))}))},onFinishFailed:function(){var e;null===(e=null==d?void 0:d.current)||void 0===e||e.onError()},autoComplete:"off"},y().createElement(VV,{name:"identify",className:"authing-g2-input-form",methods:["email-code","phone-code"],currentMethod:NV[l],checkExist:!0},y().createElement(WV,{methods:["email-code","phone-code"],className:"authing-g2-input",autoComplete:"off",autoFocus:!f,size:"large",value:a,onChange:function(e){var t=e.target.value;s(t),uX("email",t)?u("email"):u("phone")},prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form-sendCode",name:"code",rules:ZV([],JV(dX(r("common.captchaCode"))),!1)},y().createElement(v,null)),y().createElement(cT.Item,{className:"authing-g2-sumbit-form submit-form"},y().createElement(Tj,{className:"validater-account-btn",text:r("login.resetPassword.nextStep"),ref:d}))))},nz=function(){return nz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},nz.apply(this,arguments)},rz=y().forwardRef((function(e,t){return y().createElement(oO.Password,nz({autoComplete:"off",ref:t},e,{iconRender:function(e){return y().createElement("span",{style:{display:"flex",height:"100%",alignItems:"center"}},e?y().createElement(JD,{type:"authing-authing-eye-fill",style:{color:"#4E5969"}}):y().createElement(JD,{type:"authing-authing-eye-off-fill",style:{color:"#A9AEB8"}}))},maxLength:35}))})),oz=function(){return oz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},oz.apply(this,arguments)},iz=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},az=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},sz=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},cz=y().useRef,lz=y().useState,uz=function(){var e,t=_u().t,n=fL(),r=iL(),o=JL(),i=hL();OB();var a,s=(null==r?void 0:r.resetPwdCustomLogo)||(null==i?void 0:i.logo),c=pL().changeModule,l=sz(lz(!0),2),u=l[0],d=l[1],f=sz(lz(0),2),p=f[0],h=f[1],m=sz(lz({}),2),v=m[0],g=m[1],b=sz(lz(""),2),w=b[0],C=b[1],E=uU(),k=E.getPassWordUnsafeText,S=E.setPasswordErrorTextShow,x=sz(lz(""),2),_=x[0],P=x[1],T=sz(lz(""),2),O=T[0],N=T[1],I=null!==(null==i?void 0:i.goBack),A=null!==(e=null==i?void 0:i.goBack)&&void 0!==e?e:function(){return null==c?void 0:c(LL.LOGIN)},R=sz(cT.useForm(),1)[0],M=eX().post,D=cz(null);
|
|
27838
27838
|
// const onSend = (type: 'phone' | 'email') => {
|
|
27839
27839
|
// if (type === 'phone') events?.onPwdPhoneSend?.(authClient)
|
|
27840
27840
|
// if (type === 'email') events?.onPwdEmailSend?.(authClient)
|
|
@@ -27845,46 +27845,51 @@ gC.error(e.message)})),[2/*return*/]}))}))},onFinishFailed:function(){var e;null
|
|
|
27845
27845
|
// if (type === 'email')
|
|
27846
27846
|
// events?.onPwdEmailSendError?.(error as CommonMessage, authClient)
|
|
27847
27847
|
// }
|
|
27848
|
-
return u?y().createElement("div",{className:"g2-view-container g2-forget-password g2-password-reset-pageWrap g2-password-reset-step1"},y().createElement("div",{className:"g2-view-header"},y().createElement(Hj,{src:s,size:48,borderRadius:4,alt:"",className:"icon"}),y().createElement("div",{className:"title"},t("login.resetPwd")),y().createElement("div",{className:"title-explain"},t("login.resetPassword.resetPasswordText1"))),y().createElement("div",{className:"g2-view-tabs"},y().createElement(
|
|
27848
|
+
return u?y().createElement("div",{className:"g2-view-container g2-forget-password g2-password-reset-pageWrap g2-password-reset-step1"},y().createElement("div",{className:"g2-view-header"},y().createElement(Hj,{src:s,size:48,borderRadius:4,alt:"",className:"icon"}),y().createElement("div",{className:"title"},t("login.resetPwd")),y().createElement("div",{className:"title-explain"},t("login.resetPassword.resetPasswordText1"))),y().createElement("div",{className:"g2-view-tabs"},y().createElement(tz,{
|
|
27849
27849
|
// onReset={onReset}
|
|
27850
|
-
publicConfig:r,setControlShow:d,setPolicyStrength:h,setCustomPasswordStrength:
|
|
27850
|
+
publicConfig:r,setControlShow:d,setPolicyStrength:h,setCustomPasswordStrength:g,setPhoneOrEmailText:C,setResetToken:P,setUserId:N})),I&&y().createElement("div",{className:"g2-tips-line"},y().createElement("div",{className:"link-like back-to-login",onClick:A},t("login.resetPassword.back")))):y().createElement("div",{className:"g2-view-container g2-forget-password g2-password-reset-pageWrap g2-password-reset-step2"},y().createElement("div",{className:"g2-view-header"},y().createElement(Hj,{src:s,size:48,borderRadius:4,alt:"",className:"icon"}),y().createElement("div",{className:"title"},t("login.resetPwd")),y().createElement("div",{className:"title-explain"},t("login.resetPassword.resetPasswordText2",{account:w}))),y().createElement("div",{className:"g2-view-tabs"},y().createElement(cT,{name:"resetPassword",form:R,onFinish:function(){return iz(void 0,void 0,void 0,(function(){var e,i,a,s,l,u,d,f;return az(this,(function(p){switch(p.label){case 0:return null===(s=D.current)||void 0===s||s.onSpin(!0),e=R.getFieldsValue(),[4/*yield*/,null===(u=null===(l=o.options)||void 0===l?void 0:l.encryptFunction)||void 0===u?void 0:u.call(l,e.password,r.publicKey)];case 1:return i=p.sent(),[4/*yield*/,null===(f=null===(d=o.options)||void 0===d?void 0:d.encryptFunction)||void 0===f?void 0:f.call(d,e.repeatPassword,r.publicKey)];case 2:return a=p.sent(),M("/api/v2/users/password/password-reset",{newPassword:i,repeatPassword:a,
|
|
27851
27851
|
// ...phoneOrEmail, // 不用传 phone 和 email 了
|
|
27852
|
-
resetPasswordToken:
|
|
27852
|
+
resetPasswordToken:_}).then((function(e){var r,i,a;null===(r=D.current)||void 0===r||r.onSpin(!1);var s=e.code;if(s===TQ.UNSAFE_PASSWORD_TIP&&S(!0),200!==s)return null===(i=null==n?void 0:n.onPwdResetError)||void 0===i||i.call(n,e,o),void gC.error(null==e?void 0:e.message);null===(a=null==n?void 0:n.onPwdReset)||void 0===a||a.call(n,o);
|
|
27853
27853
|
// 返回登录
|
|
27854
|
-
var l={title:t("common.resetSuccess"),message:t("common.resetSuccessMessage"),needBack:
|
|
27854
|
+
var l={title:t("common.resetSuccess"),message:t("common.resetSuccessMessage"),needBack:I,goBack:A};null==c||c(LL.New_SUBMIT_SUCCESS,oz({},l))})).catch((function(e){var t;D.current.onError(),
|
|
27855
27855
|
// props.onSendError(codeMethod, e)
|
|
27856
|
-
null===(t=null==n?void 0:n.onPwdResetError)||void 0===t||t.call(n,e,o),gC.error(e.message)})),[2/*return*/]}}))}))},onFinishFailed:function(){var e;null===(e=null==
|
|
27857
|
-
|
|
27856
|
+
null===(t=null==n?void 0:n.onPwdResetError)||void 0===t||t.call(n,e,o),gC.error(e.message)})),[2/*return*/]}}))}))},onFinishFailed:function(){var e;null===(e=null==D?void 0:D.current)||void 0===e||e.onError()},autoComplete:"off"},y().createElement(cT.Item,{className:"authing-g2-input-form-password",name:"password",rules:(
|
|
27857
|
+
// {
|
|
27858
|
+
// required: true,
|
|
27859
|
+
// message: t('login.resetPassword.pleaseInputPassword'),
|
|
27860
|
+
// },
|
|
27861
|
+
a=[gX.NoCheck,gX.Low,gX.Middle,gX.High,gX.AUTO,gX.Custom],kX(a[p],v,"onChange",t("login.resetPassword.pleaseInputPassword"),O))},y().createElement(rz,{className:"authing-g2-input",size:"large",placeholder:t("login.resetPassword.inputNewPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95",marginBottom:2}})})),y().createElement(cT.Item,{className:"authing-g2-input-form-password-repeat",name:"repeatPassword",validateFirst:!0,rules:[{required:!0,message:t("login.resetPassword.pleaseInputPassword")},function(e){var n=e.getFieldValue;return{validator:function(e,r){var o=n("password");return void 0===o&&void 0===r||o===r?Promise.resolve():Promise.reject(t("login.resetPassword.checkPasswordDiff"))}}}]},y().createElement(rz,{className:"authing-g2-input",size:"large",placeholder:t("login.resetPassword.confirmNewPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95",marginBottom:2}})})),k(),y().createElement(cT.Item,{className:"authing-g2-sumbit-form submit-form"},y().createElement(Tj,{className:"reset-password-button",text:t("login.resetPassword.reset"),ref:D})))),y().createElement("div",{className:"g2-tips-line"},y().createElement("div",{className:"link-like back-to-login",onClick:function(){return d(!0)}},t("login.resetPassword.back"))))},dz=i(1766),fz=i.n(dz),pz=function(){return pz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},pz.apply(this,arguments)},hz=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},mz=y().useMemo,vz=function(e){var t=e.validPasswordLoginMethods,n=hz(e,["validPasswordLoginMethods"]),r=_u().t,o=mz((function(){if(1!==t.length)return y().createElement(cT.Item,pz({validateTrigger:["onBlur","onChange"],rules:dX(r("common.account"))},n));switch(t[0]){case"phone-password":return y().createElement(oU.Phone,pz({},n,{isCheckPattern:!1}));case"email-password":return y().createElement(oU.Email,pz({},n))}return y().createElement(oU.UserName,pz({},n))}),[n,t,r]);return y().createElement(y().Fragment,null,o)},gz=function(){return gz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},gz.apply(this,arguments)},yz=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},bz=y().useMemo,wz=function(e){var t=e.passwordLoginMethods,n=e.placeholder,r=yz(e,["passwordLoginMethods","placeholder"]),o=bz((function(){return 1===t.length&&"phone-password"===t[0]?y().createElement(VU,gz({maxLength:20,placeholder:n},r)):y().createElement(oO,gz({placeholder:n},r))}),[r,t,n]);return y().createElement(y().Fragment,null,o)},Cz=function(){return Cz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Cz.apply(this,arguments)},Ez=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},kz=function(e){var t=e.verifyCodeUrl,n=e.changeCode,r=Ez(e,["verifyCodeUrl","changeCode"]),o=_u().t;return y().createElement("div",{className:"g2-graphic-verify-code"},y().createElement(oO,Cz({},r)),y().createElement(Wj,{className:"g2-captcha-code-image",src:t,alt:o("login.captchaCode"),height:"46px",width:"134px",style:{cursor:"pointer"},onClick:function(){return n()}}))},Sz=y().useEffect;// CONCATENATED MODULE: ./src/Register/components/Agreements/index.tsx
|
|
27862
|
+
var xz=function(){return xz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},xz.apply(this,arguments)},_z=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Pz=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Tz=y().useState,Oz=y().useMemo,Nz=y().useEffect,Iz=function(e){var t=e.showError,n=e.onChange,r=void 0===n?function(){}:n,o=e.style,i=e.agreements,a=_z(Tz([]),2),s=a[0],c=a[1];!function(e){var t=e.agreements,n=e.checkedAgreements,r={agreements:t,checkedAgreements:n,checkAllAgreements:e.checkAllAgreements,unCheckAllAgreements:e.unCheckAllAgreements};Sz((function(){window.$$guard=Object.assign({},window.$$guard,{agreementsContext:r})}),[t,n])}({agreements:i,checkedAgreements:s,checkAllAgreements:function(){var e=i.map((function(e){return e.id}));c(e)},unCheckAllAgreements:function(){c([])}});
|
|
27858
27863
|
/** 是否可以注册 */
|
|
27859
|
-
var l=
|
|
27864
|
+
var l=Oz((function(){
|
|
27860
27865
|
/** 所有必须勾选的都勾了就可以通过 */
|
|
27861
|
-
return i.filter((function(e){return e.required})).every((function(e){return s.includes(e.id)}))}),[s,i]);return
|
|
27866
|
+
return i.filter((function(e){return e.required})).every((function(e){return s.includes(e.id)}))}),[s,i]);return Nz((function(){r(l,s)}),[l,r,s]),y().createElement("div",{className:vX(["authing-agreements",t&&"authing-agreements-error"])},i.map((function(e){return y().createElement("div",{key:e.id,style:xz({},o),className:vX(["authing-agreements-item",e.required&&!s.includes(e.id)&&"authing-agreements-item-invalid"]),onClick:function(t){t.persist(),"A"!==t.target.nodeName&&function(e){c((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):Pz(Pz([],_z(t),!1),[e],!1)}))}(e.id)}},y().createElement(mP,{align:"start",size:5},y().createElement(tw,{className:"authing-agreements-checkbox",checked:s.includes(e.id)}),y().createElement("div",{className:"authing-agreements-item-content",dangerouslySetInnerHTML:{__html:e.title}})))})))},Az=i(4917),Rz=y().useEffect,Mz=y().useCallback,Dz=y().useRef,Lz=y().useLayoutEffect;function Fz(e,t){if(!e)return!1;var n=(0,Az.castArray)(t);return e.filter(Boolean).some((function(e){return n.includes(e)}))}
|
|
27862
27867
|
/**
|
|
27863
27868
|
* 登录账号选择时:账户 & 登录方式自动回填
|
|
27864
27869
|
* oidc 时:login_hint 回填账号
|
|
27865
27870
|
*
|
|
27866
27871
|
* TODO: HOOK 参数有时间整理成为对象,开始没有想到有这么多
|
|
27867
27872
|
* 调用地方 core 中需要回填的两个登录方式
|
|
27868
|
-
*/function
|
|
27873
|
+
*/function jz(e){var t=e.form,n=e.way,r=e.formKey,o=e.backfillData,i=e.isOnlyInternationSms,a=e.setAreaCode,s=e.cancelBackfill,c=e.changeCurrentMethod,l=e.loginHint,u=Mz((function(){
|
|
27869
27874
|
// oidc login_hint 优先级更高
|
|
27870
27875
|
if(l){var e=dj()(l);
|
|
27871
27876
|
// 账号可以填手机号
|
|
27872
|
-
return
|
|
27877
|
+
return Fz(["ad","ldap","ldap-phone","phone","phone-code","password"],n)&&(e.isValid||uX("phone",l))?{account:e.isValid?e.phoneNumber:l,areaCode:e.isValid?e.countryCode:void 0,matched:!0}:
|
|
27873
27878
|
// 账号可以填邮箱
|
|
27874
|
-
|
|
27879
|
+
Fz(["ad","ldap","ldap-email","email","email-code","password"],n)&&uX("email",l)||Fz(["ad","ldap","password"],n)?{account:l,areaCode:void 0,matched:!0}:{account:"",areaCode:void 0,matched:!1}}return o&&!s?{account:(i?"":(null==o?void 0:o.phoneCountryCode)?(null==o?void 0:o.phoneCountryCode)+" ":"")+((null==o?void 0:o.account)||""),areaCode:null==o?void 0:o.areaCode,matched:Fz([null==o?void 0:o.way],n)}:{account:"",areaCode:void 0,matched:!1}}),[i,o,l]);
|
|
27875
27880
|
// 获得格式化后的回填 account,如果是国际化选择框,还需要改变对应选项
|
|
27876
27881
|
// initData 如果存在值表示已经回填过了
|
|
27877
|
-
|
|
27882
|
+
Rz((function(){var e,n=u(),o=n.account,i=n.areaCode;n.matched&&(i&&(null==a||a(i)),null==c||c(o),t.setFieldsValue(((e={})[r]=o,e)))}),[o,s,t,r,n,a,u,c])}
|
|
27878
27883
|
/**
|
|
27879
27884
|
* 多账号统一状态管理
|
|
27880
27885
|
* @param setLoginWay
|
|
27881
27886
|
* @returns
|
|
27882
27887
|
*/ // CONCATENATED MODULE: ./src/_utils/getCaptchaUrl.ts
|
|
27883
|
-
var Uz
|
|
27888
|
+
var Bz,Uz=function(e){var t=new URL(e);return t.pathname="/api/v2/security/captcha",t.search="?r=".concat(+new Date),t.href},qz=function(){return qz=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},qz.apply(this,arguments)},Vz=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},zz=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},$z=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Hz=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Wz=y().useCallback,Gz=y().useEffect,Kz=y().useMemo,Yz=y().useRef,Jz=y().useState,Zz=function(e){var t,n=e.host,r=e.agreements,o=e.onLoginFailed,i=e.onLoginSuccess,a=e.saveIdentify,s=e.multipleInstance,c=e.backfillData,l=e.passwordLoginMethods,u=e.loginHint,d=cL(),f=$z(cT.useForm(),1)[0],p=lL(),h=xL(),m=sL(),v=uL(),g=v._firstItemInitialValue,b=void 0===g?"":g,w=v.specifyDefaultLoginMethod;jz({form:f,way:Vs.Password,formKey:"account",backfillData:c,cancelBackfill:Vs.Password===w,loginHint:u});var C=$z(Jz(!1),2),E=C[0],k=C[1],S=Yz([]),x=vj().isPhoneMedia,_=$z(Jz(!0),2),P=_[0],T=_[1],O=_u(),N=O.t,I=O.i18n,A=tX().post,R=JL(),M=iL(),D=hL(),L=yL(),F=bL(),j=Yz(null),B=$z(Jz("always_enable"===F),2),U=B[0],q=B[1],V=$z(Jz(""),2),z=V[0],$=V[1],H=$z(Jz(0),2),W=H[0],G=H[1],K=$z(Jz(!1),2),Y=K[0],J=K[1],Z=$z(Jz(l.includes("email-password")),2),Q=Z[0],X=Z[1],ee=$z(Jz("pendding"),2),te=ee[0],ne=ee[1],re=Kz((function(){return(null==M?void 0:M.enabledMatchEmailDomain)&&Q&&"fail"!==te}),[M,Q,te]),oe=R.options.encryptFunction,ie=Wz((function(e){ne("pendding"),1!==l.length&&e&&(uX("email",e)?X(!0):X(!1))}),[l.length]),ae=Wz((function(t){return Vz(void 0,void 0,void 0,(function(){var n,o,i,a,s,c,l,u;return zz(this,(function(d){switch(d.label){case 0:return e.onLoginRequest?[4/*yield*/,e.onLoginRequest(t)]:[3/*break*/,2];case 1:return[2/*return*/,d.sent()];case 2:return n=t.data,o=(null==M?void 0:M.mergeAdAndAccountPasswordLogin)?"/api/v2/login/ad-all-in-one":"/api/v2/login/account",i=n.identity&&n.identity.trim(),a=n.password,s=n.captchaCode&&n.captchaCode.trim(),c=yX()||[],l=c.reduce((function(e,t){return e[t.key]=t.value,e}),{}),u={account:i},[4/*yield*/,oe(a,e.publicKey)];case 3:return u.password=d.sent(),u.captchaCode=s,u.customData=(null==D?void 0:D.isHost)?l:void 0,u.autoRegister=e.autoRegister,u.withCustomData=!1,u.agreementIds=r.length?S.current:void 0,[4/*yield*/,A(o,u)];case 4:return[2/*return*/,d.sent()]}}))}))}),[null==D?void 0:D.isHost,oe,A,e,null==M?void 0:M.mergeAdAndAccountPasswordLogin,S,r]),se=Wz((function(e){return Vz(void 0,void 0,void 0,(function(){var t;return zz(this,(function(n){switch(n.label){case 0:return t="/api/v2/applications/".concat(d,"/matchIdpConnByAccount"),[4/*yield*/,A(t,e)];case 1:return[2/*return*/,n.sent()]}}))}))}),[d]),ce=function(t,n){var r,a,c,l,u=t.code,d=t.apiCode,f=t.message,p=t.data,h=t.onGuardHandling;if(null===(r=null==j?void 0:j.current)||void 0===r||r.onSpin(!1),
|
|
27884
27889
|
// 更新本次登录方式
|
|
27885
27890
|
p&&s&&s.setLoginWayByHttpData(n,p),200===u)i(p,f);else{if(
|
|
27886
27891
|
// 需要「图形验证码」并且是第一次,就发一次,后面存在的时候会在点击登录,表单校验通过后,不论对错都要重新请求验证码
|
|
27887
|
-
d!==WF.INPUT_CAPTCHACODE||z||($(
|
|
27892
|
+
d!==WF.INPUT_CAPTCHACODE||z||($(Uz(e.host)),q(!0)),d===WF.PASSWORD_ERROR&&null!==(a=null==p?void 0:p.remainCount)&&void 0!==a&&a)return G(null!==(c=null==p?void 0:p.remainCount)&&void 0!==c?c:0),null===(l=null==j?void 0:j.current)||void 0===l||l.onSpin(!1),void(
|
|
27888
27893
|
// TODO 临时拦截密码错误限制不报 message
|
|
27889
27894
|
// props.onLogin(9999, data, msg)
|
|
27890
27895
|
null==o||o(9999,p,f));d!==WF.ACCOUNT_LOCK&&d!==WF.MULTIPLE_ERROR_LOCK||
|
|
@@ -27894,19 +27899,19 @@ J(!0);
|
|
|
27894
27899
|
// 本次请求成功 && 当前请求
|
|
27895
27900
|
var m=null==h?void 0:h();
|
|
27896
27901
|
// 向上层抛出错误
|
|
27897
|
-
m===PQ.RENDER_MESSAGE&&(null==o||o(u,p,f))}};
|
|
27902
|
+
m===PQ.RENDER_MESSAGE&&(null==o||o(u,p,f))}};Gz((function(){G(0),J(!1)}),[e.loginWay]),Gz((function(){q("always_enable"===F),"always_enable"===F&&$(Uz(e.host))}),[F,e.host]);var le=Kz((function(){var t,n;return e.submitButText?e.submitButText:e.autoRegister&&!M.registerDisabled&&(null===(n=null===(t=D.registerMethods)||void 0===t?void 0:t.filter((function(e){
|
|
27898
27903
|
// @ts-ignore
|
|
27899
|
-
return![Ws.Phone,Ws.EmailCode].includes(e)})))||void 0===n?void 0:n.length)?"".concat(N("common.login")," / ").concat(N("common.register")):N("common.login")}),[e,N,M.registerDisabled,D.registerMethods]),ue=
|
|
27904
|
+
return![Ws.Phone,Ws.EmailCode].includes(e)})))||void 0===n?void 0:n.length)?"".concat(N("common.login")," / ").concat(N("common.register")):N("common.login")}),[e,N,M.registerDisabled,D.registerMethods]),ue=Kz((function(){var e=new Map;return M.tabMethodsFields.forEach((function(t){e.set(t.key,t)})),e}),[M.tabMethodsFields]),de=Kz((function(){
|
|
27900
27905
|
// 登录注册合并
|
|
27901
27906
|
if(null==D?void 0:D.autoRegister){
|
|
27902
27907
|
// 密码 placeholder
|
|
27903
|
-
var e=
|
|
27908
|
+
var e=Hz([],$z(l),!1);return N("login.inputAccount",{text:DX(e,ue,L)})}
|
|
27904
27909
|
// 登录注册分页
|
|
27905
|
-
return N("login.inputAccount",{text:DX(
|
|
27910
|
+
return N("login.inputAccount",{text:DX(Hz([],$z(l),!1),ue,L)})}),[null==D?void 0:D.autoRegister,I,ue,L,l,N]);return y().createElement("div",{className:"authing-g2-login-password"},y().createElement(cT,{name:"passworLogin",onFinish:function(t){return Vz(void 0,void 0,void 0,(function(){var o,i,a,s,c,l,u,f,v;return zz(this,(function(g){switch(g.label){case 0:return T(!0),(null==r?void 0:r.length)&&!E?(j.current.onError(),[2/*return*/]):(G(0),J(!1),
|
|
27906
27911
|
// onBeforeLogin
|
|
27907
27912
|
null===(l=null==j?void 0:j.current)||void 0===l||l.onSpin(!0),o={type:Vs.Password,data:{identity:t.account,password:t.password,captchaCode:t.captchaCode}},[4/*yield*/,null===(u=e.onBeforeLogin)||void 0===u?void 0:u.call(e,o)]);case 1:if(!g.sent()&&e.onBeforeLogin)return null===(f=null==j?void 0:j.current)||void 0===f||f.onSpin(!1),[2/*return*/];g.label=2;case 2:return g.trys.push([2,7,8,9]),re?[4/*yield*/,se({account:t.account})]:[3/*break*/,4];case 3:return i=g.sent(),a=i.code,s=i.data,null===(v=null==j?void 0:j.current)||void 0===v||v.onSpin(!1),200===a&&s.matched?
|
|
27908
27913
|
// gene idp init url
|
|
27909
|
-
function(e){var t,r,o=
|
|
27914
|
+
function(e){var t,r,o=qz({from_guard:"1",app_id:d,guard_version:"Guard@".concat(h)},p&&{tenant_id:p});if(null==D?void 0:D.isHost){if(delete o.from_guard,o.from_hosted_guard="1",m){o.redirected="1";var i=UX();i&&(
|
|
27910
27915
|
// 如果 isHost 是 true,则从 url 获取 finish_login_url 作为 social.authorize 方法的 targetUrl 参数
|
|
27911
27916
|
o.redirect_url=null===(t=Fc().parse(i.location.search))||void 0===t?void 0:t.finish_login_url)}
|
|
27912
27917
|
// 托管登录页,直接写死登录 URL
|
|
@@ -27914,78 +27919,78 @@ o.identifier=e.identifier;var a=iF[e.protocol];if(!a)return null;r="".concat(n).
|
|
|
27914
27919
|
// 嵌入式组件,从配置字段获取登录 URL
|
|
27915
27920
|
r=e.config[s]}o.redirected?window.location.replace(r):nX(r)}(s.identityProvider):ne("fail"),[3/*break*/,6];case 4:return[4/*yield*/,ae(o)];case 5:c=g.sent(),ce(c,t.account),g.label=6;case 6:return[3/*break*/,9];case 7:throw g.sent();case 8:
|
|
27916
27921
|
// 图形验证码出现后,不管是「图形验证码」错了,还是「账号」「密码」错了,都要重新发验证码
|
|
27917
|
-
return z&&$(
|
|
27922
|
+
return z&&$(Uz(e.host)),[7/*endfinally*/];case 9:return[2/*return*/]}}))}))},onFinishFailed:function(){return j.current.onError()},autoComplete:"off",form:f,onValuesChange:function(e){(null==e?void 0:e.account)&&a&&a(Vs.Password,null==e?void 0:e.account)}},y().createElement(vz,{name:"account",className:"authing-g2-input-form",validPasswordLoginMethods:(null===(t=null==M?void 0:M.passwordTabConfig)||void 0===t?void 0:t.validLoginMethods)||[],initialValue:w===Vs.Password?b:""},y().createElement(wz,{className:"authing-g2-input",autoComplete:"off",size:"large",autoFocus:!x,prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}}),
|
|
27918
27923
|
// onChange={e => {
|
|
27919
27924
|
// let v = e.target.value
|
|
27920
27925
|
// console.log(v, '22')
|
|
27921
27926
|
// changeMethod(v)
|
|
27922
27927
|
// }}
|
|
27923
|
-
onBlur:function(e){var t=e.target.value;ie(t)},passwordLoginMethods:l,placeholder:de})),!re&&y().createElement(cT.Item,{name:"password",validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",rules:dX(N("common.password"))},y().createElement(
|
|
27928
|
+
onBlur:function(e){var t=e.target.value;ie(t)},passwordLoginMethods:l,placeholder:de})),!re&&y().createElement(cT.Item,{name:"password",validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",rules:dX(N("common.password"))},y().createElement(sU,{className:"authing-g2-input",size:"large",placeholder:N("login.inputLoginPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),U&&!re&&y().createElement(cT.Item,{className:"authing-g2-input-form",validateTrigger:["onBlur","onChange"],name:"captchaCode",rules:dX(N("common.captchaCode"))},y().createElement(kz,{className:"authing-g2-input",size:"large",placeholder:N("login.inputCaptchaCode"),verifyCodeUrl:z,changeCode:function(){return $(Uz(e.host))}})),0!==W&&!Y&&y().createElement("span",{style:{marginBottom:23,fontSize:12,color:"#E8353E",display:"block"}},N("common.loginFailCheck",{number:W})),Y&&y().createElement("span",{style:{marginBottom:23,fontSize:12,color:"#E8353E",display:"block"}},N("common.accountLock")),Boolean(null==r?void 0:r.length)&&y().createElement(Iz,{onChange:function(e,t){k(e),S.current=t},agreements:r,showError:P}),y().createElement(cT.Item,{className:"authing-g2-sumbit-form"},y().createElement(Tj,{
|
|
27924
27929
|
// TODO 产品还没想好 暂时不上
|
|
27925
27930
|
// disabled={
|
|
27926
27931
|
// !!agreements.find((item) => item.required && !acceptedAgreements)
|
|
27927
27932
|
// }
|
|
27928
|
-
text:le,className:"password",ref:j}))))},
|
|
27933
|
+
text:le,className:"password",ref:j}))))},Qz=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Xz=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},e$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},t$=y().useRef,n$=y().useState,r$=function(e){var t=e.agreements,n=e.onLoginSuccess,r=e.onLoginFailed,o=e.multipleInstance,i=e.backfillData,a=e.loginHint,s=e$(cT.useForm(),1)[0];
|
|
27929
27934
|
// const { responseIntercept } = useGuardHttpClient()
|
|
27930
|
-
|
|
27935
|
+
jz({form:s,way:"ldap",formKey:"account",backfillData:i,loginHint:a});var c=e$(n$(!1),2),l=c[0],u=c[1],d=e$(n$([]),2),f=d[0],p=d[1],h=vj().isPhoneMedia,m=e$(n$(!1),2),v=m[0],g=m[1],b=aL().post,w=_u().t,C=t$(null),E=e$(n$(!1),2),k=E[0],S=E[1],x=e$(n$(""),2),_=x[0],P=x[1],T="".concat(e.host,"/api/v2/security/captcha"),O=function(){return"".concat(T,"?r=").concat(+new Date)};return y().createElement("div",{className:"authing-g2-login-ldap"},y().createElement(cT,{form:s,name:"passworLogin",onFinish:function(i){return Qz(void 0,void 0,void 0,(function(){var a,s,c,u,d,p,h,m,v,y,E,k,x;return Xz(this,(function(_){switch(_.label){case 0:return g(!0),(null==t?void 0:t.length)&&!l?(null===(y=C.current)||void 0===y||y.onError(),[2/*return*/]):(
|
|
27931
27936
|
// onBeforeLogin
|
|
27932
27937
|
null===(E=C.current)||void 0===E||E.onSpin(!0),a={type:Vs.LDAP,data:{identity:i.account,password:i.password,captchaCode:i.captchaCode}},[4/*yield*/,e.onBeforeLogin(a)]);case 1:if(!_.sent())return null===(k=C.current)||void 0===k||k.onSpin(!1),[2/*return*/];s=i.account&&i.account.trim(),c=i.password,_.label=2;case 2:return _.trys.push([2,4,,5]),[4/*yield*/,b("/api/v2/ldap/verify-user",{username:s,password:c,agreementIds:t.length?f:void 0})];case 3:return u=_.sent(),d=u.code,p=u.data,h=u.onGuardHandling,m=u.message,C.current.onSpin(!1),
|
|
27933
27938
|
// 更新本次登录方式
|
|
27934
27939
|
p&&o&&o.setLoginWayByLDAPData(s,p),200===d?n(p):(d===WF.INPUT_CAPTCHACODE&&(P(O()),S(!0)),
|
|
27935
27940
|
// 向上层抛出错误
|
|
27936
|
-
(null==h?void 0:h())===PQ.RENDER_MESSAGE&&r(d,p,m)),[3/*break*/,5];case 4:return v=_.sent(),null===(x=C.current)||void 0===x||x.onSpin(!1),"ECONNABORTED"===v.code&&(gC.error(w("common.timeoutLDAP")),r(2333,{},JSON.stringify(v))),[3/*break*/,5];case 5:return[2/*return*/]}}))}))},onFinishFailed:function(){var e;return null===(e=C.current)||void 0===e?void 0:e.onError()},autoComplete:"off"},y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"account",rules:dX(w("common.account"))},y().createElement(oO,{autoFocus:!h,className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:w("login.inputLdapUsername"),prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password",rules:dX(w("common.password"))},y().createElement(
|
|
27941
|
+
(null==h?void 0:h())===PQ.RENDER_MESSAGE&&r(d,p,m)),[3/*break*/,5];case 4:return v=_.sent(),null===(x=C.current)||void 0===x||x.onSpin(!1),"ECONNABORTED"===v.code&&(gC.error(w("common.timeoutLDAP")),r(2333,{},JSON.stringify(v))),[3/*break*/,5];case 5:return[2/*return*/]}}))}))},onFinishFailed:function(){var e;return null===(e=C.current)||void 0===e?void 0:e.onError()},autoComplete:"off"},y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"account",rules:dX(w("common.account"))},y().createElement(oO,{autoFocus:!h,className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:w("login.inputLdapUsername"),prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password",rules:dX(w("common.password"))},y().createElement(sU,{className:"authing-g2-input",size:"large",placeholder:w("login.inputLdapPwd"),
|
|
27937
27942
|
// prefix={<LockOutlined style={{ color: '#878A95' }} />}
|
|
27938
|
-
prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),k&&y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"captchaCode",rules:[{required:!0,message:w("login.inputCaptchaCode")}]},y().createElement(oO,{className:"authing-g2-input add-after",size:"large",placeholder:w("login.inputCaptchaCode"),addonAfter:y().createElement("img",{className:"g2-captcha-code-image",src:_,alt:w("login.captchaCode"),style:{height:"2em",cursor:"pointer"},onClick:function(){return P(O())}})})),Boolean(null==t?void 0:t.length)&&y().createElement(
|
|
27943
|
+
prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),k&&y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"captchaCode",rules:[{required:!0,message:w("login.inputCaptchaCode")}]},y().createElement(oO,{className:"authing-g2-input add-after",size:"large",placeholder:w("login.inputCaptchaCode"),addonAfter:y().createElement("img",{className:"g2-captcha-code-image",src:_,alt:w("login.captchaCode"),style:{height:"2em",cursor:"pointer"},onClick:function(){return P(O())}})})),Boolean(null==t?void 0:t.length)&&y().createElement(Iz,{onChange:function(e,t){u(e),p(t)},agreements:t,showError:v}),y().createElement(cT.Item,{className:"authing-g2-sumbit-form"},y().createElement(Tj,{
|
|
27939
27944
|
// disabled={
|
|
27940
27945
|
// !!agreements.find((item) => item.required && !acceptedAgreements)
|
|
27941
27946
|
// }
|
|
27942
|
-
text:w("common.login"),className:"password",ref:C}))))},
|
|
27947
|
+
text:w("common.login"),className:"password",ref:C}))))},o$=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i$=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},a$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},s$=y().useEffect,c$=y().useRef,l$=y().useState,u$=function(e){var t,n=e.agreements,r=e.onLoginFailed,o=e.onLoginSuccess,i=null!==(t=su.resolvedLanguage)&&void 0!==t?t:su.language,a=a$(l$(!1),2),s=a[0],c=a[1],l=a$(l$([]),2),u=l[0],d=l[1],f=a$(l$(!1),2),p=f[0],h=f[1],m=bL(),v=a$(l$("always_enable"===m),2),g=v[0],b=v[1],w=a$(l$(""),2),C=w[0],E=w[1],k=iL(),S=hL().host,x=cL(),_=aL(),P=_.responseIntercept,T=_u().t,O=vj().isPhoneMedia,N=JL(),I=a$(cT.useForm(),1)[0],A=c$(null);return s$((function(){b("always_enable"===m),"always_enable"===m&&E(Uz(S))}),[m,S]),y().createElement("div",{className:"authing-g2-login-ad"},y().createElement(cT,{form:I,name:"adLogin",onFinish:function(t){return o$(void 0,void 0,void 0,(function(){var a,c,l,d,f,p,m,v,g,y,w,O,I,R,M,D,L,F,j,B,U;return i$(this,(function(q){switch(q.label){case 0:return h(!0),(null==n?void 0:n.length)&&!s?(null===(L=A.current)||void 0===L||L.onError(),[2/*return*/]):(
|
|
27943
27948
|
// onBeforeLogin
|
|
27944
|
-
null===(
|
|
27949
|
+
null===(F=A.current)||void 0===F||F.onSpin(!0),a={type:Ti.AD,data:{identity:t.account,password:t.password,captchaCode:t.captchaCode}},[4/*yield*/,e.onBeforeLogin(a)]);case 1:return q.sent()?(c=t.account&&t.account.trim(),l=t.password,d=t.captchaCode,[4/*yield*/,(0,N.options.encryptFunction)(l,e.publicKey)]):(null===(j=A.current)||void 0===j||j.onSpin(!1),[2/*return*/]);case 2:f=q.sent(),q.label=3;case 3:return q.trys.push([3,6,7,8]),p="".concat(S,"/api/v2/ad/verify-user"),m=xL(),[4/*yield*/,fetch(p,{method:"POST",body:JSON.stringify({username:c,password:f,captchaCode:d,agreementIds:n.length?u:void 0}),credentials:"include",headers:(D={"Content-Type":"application/json"},D[ML.langHeader]=i,D["x-authing-userpool-id"]=k.userPoolId,D["x-authing-app-id"]=x,D["x-authing-sdk-version"]=m,D["x-authing-request-from"]="Guard@".concat(m),D["x-authing-device-id"]=_.getHeaders()["x-authing-device-id"],D)})];case 4:return[4/*yield*/,q.sent().json()];case 5:return v=q.sent(),g=P(v),y=g.code,w=g.apiCode,O=g.data,I=g.onGuardHandling,R=g.message,
|
|
27945
27950
|
// // 更新本次登录方式
|
|
27946
27951
|
// data && multipleInstance && multipleInstance.setLoginWay('input', 'ad')
|
|
27947
|
-
null===(
|
|
27952
|
+
null===(B=A.current)||void 0===B||B.onSpin(!1),200===y?o(O):(
|
|
27948
27953
|
// 需要「图形验证码」并且是第一次,就发一次,后面存在的时候会在点击登录,表单校验通过后,不论对错都要重新请求验证码
|
|
27949
|
-
w!==WF.INPUT_CAPTCHACODE||C||(E(
|
|
27954
|
+
w!==WF.INPUT_CAPTCHACODE||C||(E(Uz(S)),b(!0)),
|
|
27950
27955
|
// 向上层抛出错误
|
|
27951
|
-
(null==
|
|
27956
|
+
(null==I?void 0:I())===PQ.RENDER_MESSAGE&&r(y,O,R)),[3/*break*/,8];case 6:return M=q.sent(),null===(U=A.current)||void 0===U||U.onSpin(!1),"ECONNABORTED"===M.code&&(gC.error(T("common.timeoutAD")),r(2333,{},JSON.stringify(M))),[3/*break*/,8];case 7:
|
|
27952
27957
|
// 图形验证码出现后,不管是「图形验证码」错了,还是「账号」「密码」错了,都要重新发验证码
|
|
27953
|
-
return C&&E(
|
|
27958
|
+
return C&&E(Uz(S)),[7/*endfinally*/];case 8:return[2/*return*/]}}))}))},onFinishFailed:function(){return A.current.onError()},autoComplete:"off"},(null==k?void 0:k.ssoPageComponentDisplay.userPasswordInput)&&y().createElement(y().Fragment,null,y().createElement(cT.Item,{className:"authing-g2-input-form",name:"account",validateTrigger:["onBlur","onChange"],rules:dX(T("common.account"))},y().createElement(oO,{autoFocus:!O,className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:(null==k?void 0:k.mergeAdAndAccountPasswordLogin)?T("common.jobNumber"):T("login.inputAdUsername"),prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password",rules:dX(T("common.password"))},y().createElement(sU,{autoComplete:"off",className:"authing-g2-input",size:"large",placeholder:(null==k?void 0:k.mergeAdAndAccountPasswordLogin)?T("login.inputPwd"):T("login.inputAdPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),g&&y().createElement(cT.Item,{className:"authing-g2-input-form",validateTrigger:["onBlur","onChange"],name:"captchaCode",rules:dX(T("common.captchaCode"))},y().createElement(kz,{className:"authing-g2-input",size:"large",placeholder:T("login.inputCaptchaCode"),verifyCodeUrl:C,changeCode:function(){return E(Uz(S))}})),Boolean(null==n?void 0:n.length)&&y().createElement(Iz,{onChange:function(e,t){c(e),d(t)},agreements:n,showError:p}),y().createElement(cT.Item,{className:"authing-g2-sumbit-form"},y().createElement(Tj,{
|
|
27954
27959
|
// disabled={
|
|
27955
27960
|
// !!agreements.find(
|
|
27956
27961
|
// (item) => item.required && !acceptedAgreements
|
|
27957
27962
|
// )
|
|
27958
27963
|
// }
|
|
27959
|
-
text:P("common.login"),className:"password",ref:I})))))},f$=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},p$=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},h$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},m$=y().useCallback,v$=y().useEffect,g$=y().useState,y$=y().useMemo,b$=function(e){var t="".concat(z$,"-qrcode--").concat(e),n=_u().t;return[t,y$((function(){return{loading:null,ready:null,already:y().createElement(y().Fragment,null,y().createElement(JD,{type:"authing-checkbox-circle-fill",style:{width:"40px",height:"40px"}}),y().createElement("span",{className:"".concat(z$,"-inner__title--already")},n("login.scanSuccess"))),cancel:y().createElement(y().Fragment,null,y().createElement(JD,{type:"authing-refer-qr-code",style:{width:"40px",height:"40px"}}),y().createElement("span",{className:"".concat(z$,"-inner__title--refer")},n("login.qrcodeRefer"))),expired:y().createElement(y().Fragment,null,y().createElement(JD,{type:"authing-refer-qr-code",style:{width:"40px",height:"40px"}}),y().createElement("span",{className:"".concat(z$,"-inner__title--refer")},n("login.qrcodeRefer"))),error:y().createElement(y().Fragment,null,y().createElement(JD,{type:"authing-refer-qr-code",style:{width:"40px",height:"40px"}}),y().createElement("span",{className:"".concat(z$,"-inner__title--refer")},n("login.qrcodeNetWorkError"))),success:y().createElement(y().Fragment,null,y().createElement(JD,{type:"authing-checkbox-circle-fill",style:{width:"40px",height:"40px"}}),y().createElement("span",{className:"".concat(z$,"-inner__title--already")},n("login.scanSuccess"))),MFA:null}[e]}),[e,n])]},w$=Object.defineProperty,C$=Object.getOwnPropertySymbols,E$=Object.prototype.hasOwnProperty,k$=Object.prototype.propertyIsEnumerable,S$=(e,t,n)=>t in e?w$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,x$=(e,t)=>{for(var n in t||(t={}))E$.call(t,n)&&S$(e,n,t[n]);if(C$)for(var n of C$(t))k$.call(t,n)&&S$(e,n,t[n]);return e},_$=(e,t)=>{var n={};for(var r in e)E$.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&C$)for(var r of C$(e))t.indexOf(r)<0&&k$.call(e,r)&&(n[r]=e[r]);return n};(e=>{const t=class{constructor(e,n,r,o){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let a=[];for(let e=0;e<this.size;e++)a.push(!1);for(let e=0;e<this.size;e++)this.modules.push(a.slice()),this.isFunction.push(a.slice());this.drawFunctionPatterns();const s=this.addEccAndInterleave(r);if(this.drawCodewords(s),-1==o){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(o=t,e=n),this.applyMask(t)}}i(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(n,r){const o=e.QrSegment.makeSegments(n);return t.encodeSegments(o,r)}static encodeBinary(n,r){const o=e.QrSegment.makeBytes(n);return t.encodeSegments([o],r)}static encodeSegments(e,n,o=1,a=40,c=-1,l=!0){if(!(t.MIN_VERSION<=o&&o<=a&&a<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let u,d;for(u=o;;u++){const r=8*t.getNumDataCodewords(u,n),o=s.getTotalBits(e,u);if(o<=r){d=o;break}if(u>=a)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=8*t.getNumDataCodewords(u,e)&&(n=e);let f=[];for(const t of e){r(t.mode.modeBits,4,f),r(t.numChars,t.mode.numCharCountBits(u),f);for(const e of t.getData())f.push(e)}i(f.length==d);const p=8*t.getNumDataCodewords(u,n);i(f.length<=p),r(0,Math.min(4,p-f.length),f),r(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let e=236;f.length<p;e^=253)r(e,8,f);let h=[];for(;8*h.length<f.length;)h.push(0);return f.forEach(((e,t)=>h[t>>>3]|=e<<7-(7&t))),new t(u,n,h,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)0==n&&0==r||0==n&&r==t-1||n==t-1&&0==r||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let e=0;e<10;e++)n=n<<1^1335*(n>>>9);const r=21522^(t<<10|n);i(r>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,o(r,e));this.setFunctionModule(8,7,o(r,6)),this.setFunctionModule(8,8,o(r,7)),this.setFunctionModule(7,8,o(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,o(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,o(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,o(r,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;i(t>>>18==0);for(let e=0;e<18;e++){const n=o(t,e),r=this.size-11+e%3,i=Math.floor(e/3);this.setFunctionModule(r,i,n),this.setFunctionModule(i,r,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const o=Math.max(Math.abs(r),Math.abs(n)),i=e+r,a=t+n;0<=i&&i<this.size&&0<=a&&a<this.size&&this.setFunctionModule(i,a,2!=o&&4!=o)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,1!=Math.max(Math.abs(r),Math.abs(n)))}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw new RangeError("Invalid argument");const o=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],a=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],s=Math.floor(t.getNumRawDataModules(n)/8),c=o-s%o,l=Math.floor(s/o);let u=[];const d=t.reedSolomonComputeDivisor(a);for(let n=0,r=0;n<o;n++){let o=e.slice(r,r+l-a+(n<c?0:1));r+=o.length;const i=t.reedSolomonComputeRemainder(o,d);n<c&&o.push(0),u.push(o.concat(i))}let f=[];for(let e=0;e<u[0].length;e++)u.forEach(((t,n)=>{(e!=l-a||n>=c)&&f.push(t[e])}));return i(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let r=0;r<this.size;r++)for(let i=0;i<2;i++){const a=t-i,s=0==(t+1&2)?this.size-1-r:r;!this.isFunction[s][a]&&n<8*e.length&&(this.modules[s][a]=o(e[n>>>3],7-(7&n)),n++)}}i(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,o=0,i=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[n][a]==r?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,i),r||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),r=this.modules[n][a],o=1);e+=this.finderPenaltyTerminateAndCount(r,o,i)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,o=0,i=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[a][n]==r?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,i),r||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),r=this.modules[a][n],o=1);e+=this.finderPenaltyTerminateAndCount(r,o,i)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){const o=this.modules[n][r];o==this.modules[n][r+1]&&o==this.modules[n+1][r]&&o==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(const e of this.modules)n=e.reduce(((e,t)=>e+(t?1:0)),n);const r=this.size*this.size,o=Math.ceil(Math.abs(20*n-10*r)/r)-1;return i(0<=o&&o<=9),e+=o*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let o=0;o<e;o++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map((e=>0));for(const o of e){const e=o^r.shift();r.push(0),n.forEach(((n,o)=>r[o]^=t.reedSolomonMultiply(n,e)))}return r}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^285*(n>>>7),n^=(t>>>r&1)*e;return i(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];i(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let n=t;function r(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function o(e,t){return 0!=(e>>>t&1)}function i(e){if(!e)throw new Error("Assertion error")}n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;const a=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)r(n,8,t);return new a(a.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!a.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){const o=Math.min(e.length-n,3);r(parseInt(e.substr(n,o),10),3*o+1,t),n+=o}return new a(a.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!a.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,n=[];for(t=0;t+2<=e.length;t+=2){let o=45*a.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));o+=a.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),r(o,11,n)}return t<e.length&&r(a.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,n),new a(a.Mode.ALPHANUMERIC,e.length,n)}static makeSegments(e){return""==e?[]:a.isNumeric(e)?[a.makeNumeric(e)]:a.isAlphanumeric(e)?[a.makeAlphanumeric(e)]:[a.makeBytes(a.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)r(e,8,t);else if(e<16384)r(2,2,t),r(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");r(6,3,t),r(e,21,t)}return new a(a.Mode.ECI,0,t)}static isNumeric(e){return a.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return a.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(const r of e){const e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t}};let s=a;s.NUMERIC_REGEX=/^[0-9]*$/,s.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,s.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=s})(Uz||(Uz={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let n=t;n.LOW=new t(0,1),n.MEDIUM=new t(1,0),n.QUARTILE=new t(2,3),n.HIGH=new t(3,2),e.Ecc=n})(t=e.QrCode||(e.QrCode={}))})(Uz||(Uz={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let n=t;n.NUMERIC=new t(1,[10,12,14]),n.ALPHANUMERIC=new t(2,[9,11,13]),n.BYTE=new t(4,[8,16,16]),n.KANJI=new t(8,[8,10,12]),n.ECI=new t(7,[0,0,0]),e.Mode=n})(t=e.QrSegment||(e.QrSegment={}))})(Uz||(Uz={}));var P$=Uz,T$={L:P$.QrCode.Ecc.LOW,M:P$.QrCode.Ecc.MEDIUM,Q:P$.QrCode.Ecc.QUARTILE,H:P$.QrCode.Ecc.HIGH},O$=128,N$="L",I$="#FFFFFF",A$="#000000",R$=!1,M$=4,D$=.1;
|
|
27964
|
+
text:T("common.login"),className:"password",ref:A})))))},d$=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},f$=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},p$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},h$=y().useCallback,m$=y().useEffect,v$=y().useState,g$=y().useMemo,y$=function(e){var t="".concat(V$,"-qrcode--").concat(e),n=_u().t;return[t,g$((function(){return{loading:null,ready:null,already:y().createElement(y().Fragment,null,y().createElement(JD,{type:"authing-checkbox-circle-fill",style:{width:"40px",height:"40px"}}),y().createElement("span",{className:"".concat(V$,"-inner__title--already")},n("login.scanSuccess"))),cancel:y().createElement(y().Fragment,null,y().createElement(JD,{type:"authing-refer-qr-code",style:{width:"40px",height:"40px"}}),y().createElement("span",{className:"".concat(V$,"-inner__title--refer")},n("login.qrcodeRefer"))),expired:y().createElement(y().Fragment,null,y().createElement(JD,{type:"authing-refer-qr-code",style:{width:"40px",height:"40px"}}),y().createElement("span",{className:"".concat(V$,"-inner__title--refer")},n("login.qrcodeRefer"))),error:y().createElement(y().Fragment,null,y().createElement(JD,{type:"authing-refer-qr-code",style:{width:"40px",height:"40px"}}),y().createElement("span",{className:"".concat(V$,"-inner__title--refer")},n("login.qrcodeNetWorkError"))),success:y().createElement(y().Fragment,null,y().createElement(JD,{type:"authing-checkbox-circle-fill",style:{width:"40px",height:"40px"}}),y().createElement("span",{className:"".concat(V$,"-inner__title--already")},n("login.scanSuccess"))),MFA:null}[e]}),[e,n])]},b$=Object.defineProperty,w$=Object.getOwnPropertySymbols,C$=Object.prototype.hasOwnProperty,E$=Object.prototype.propertyIsEnumerable,k$=(e,t,n)=>t in e?b$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S$=(e,t)=>{for(var n in t||(t={}))C$.call(t,n)&&k$(e,n,t[n]);if(w$)for(var n of w$(t))E$.call(t,n)&&k$(e,n,t[n]);return e},x$=(e,t)=>{var n={};for(var r in e)C$.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&w$)for(var r of w$(e))t.indexOf(r)<0&&E$.call(e,r)&&(n[r]=e[r]);return n};(e=>{const t=class{constructor(e,n,r,o){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let a=[];for(let e=0;e<this.size;e++)a.push(!1);for(let e=0;e<this.size;e++)this.modules.push(a.slice()),this.isFunction.push(a.slice());this.drawFunctionPatterns();const s=this.addEccAndInterleave(r);if(this.drawCodewords(s),-1==o){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(o=t,e=n),this.applyMask(t)}}i(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(n,r){const o=e.QrSegment.makeSegments(n);return t.encodeSegments(o,r)}static encodeBinary(n,r){const o=e.QrSegment.makeBytes(n);return t.encodeSegments([o],r)}static encodeSegments(e,n,o=1,a=40,c=-1,l=!0){if(!(t.MIN_VERSION<=o&&o<=a&&a<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let u,d;for(u=o;;u++){const r=8*t.getNumDataCodewords(u,n),o=s.getTotalBits(e,u);if(o<=r){d=o;break}if(u>=a)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=8*t.getNumDataCodewords(u,e)&&(n=e);let f=[];for(const t of e){r(t.mode.modeBits,4,f),r(t.numChars,t.mode.numCharCountBits(u),f);for(const e of t.getData())f.push(e)}i(f.length==d);const p=8*t.getNumDataCodewords(u,n);i(f.length<=p),r(0,Math.min(4,p-f.length),f),r(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let e=236;f.length<p;e^=253)r(e,8,f);let h=[];for(;8*h.length<f.length;)h.push(0);return f.forEach(((e,t)=>h[t>>>3]|=e<<7-(7&t))),new t(u,n,h,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)0==n&&0==r||0==n&&r==t-1||n==t-1&&0==r||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let e=0;e<10;e++)n=n<<1^1335*(n>>>9);const r=21522^(t<<10|n);i(r>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,o(r,e));this.setFunctionModule(8,7,o(r,6)),this.setFunctionModule(8,8,o(r,7)),this.setFunctionModule(7,8,o(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,o(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,o(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,o(r,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;i(t>>>18==0);for(let e=0;e<18;e++){const n=o(t,e),r=this.size-11+e%3,i=Math.floor(e/3);this.setFunctionModule(r,i,n),this.setFunctionModule(i,r,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const o=Math.max(Math.abs(r),Math.abs(n)),i=e+r,a=t+n;0<=i&&i<this.size&&0<=a&&a<this.size&&this.setFunctionModule(i,a,2!=o&&4!=o)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,1!=Math.max(Math.abs(r),Math.abs(n)))}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw new RangeError("Invalid argument");const o=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],a=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],s=Math.floor(t.getNumRawDataModules(n)/8),c=o-s%o,l=Math.floor(s/o);let u=[];const d=t.reedSolomonComputeDivisor(a);for(let n=0,r=0;n<o;n++){let o=e.slice(r,r+l-a+(n<c?0:1));r+=o.length;const i=t.reedSolomonComputeRemainder(o,d);n<c&&o.push(0),u.push(o.concat(i))}let f=[];for(let e=0;e<u[0].length;e++)u.forEach(((t,n)=>{(e!=l-a||n>=c)&&f.push(t[e])}));return i(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let r=0;r<this.size;r++)for(let i=0;i<2;i++){const a=t-i,s=0==(t+1&2)?this.size-1-r:r;!this.isFunction[s][a]&&n<8*e.length&&(this.modules[s][a]=o(e[n>>>3],7-(7&n)),n++)}}i(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,o=0,i=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[n][a]==r?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,i),r||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),r=this.modules[n][a],o=1);e+=this.finderPenaltyTerminateAndCount(r,o,i)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,o=0,i=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[a][n]==r?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,i),r||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),r=this.modules[a][n],o=1);e+=this.finderPenaltyTerminateAndCount(r,o,i)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){const o=this.modules[n][r];o==this.modules[n][r+1]&&o==this.modules[n+1][r]&&o==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(const e of this.modules)n=e.reduce(((e,t)=>e+(t?1:0)),n);const r=this.size*this.size,o=Math.ceil(Math.abs(20*n-10*r)/r)-1;return i(0<=o&&o<=9),e+=o*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let o=0;o<e;o++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map((e=>0));for(const o of e){const e=o^r.shift();r.push(0),n.forEach(((n,o)=>r[o]^=t.reedSolomonMultiply(n,e)))}return r}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^285*(n>>>7),n^=(t>>>r&1)*e;return i(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];i(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let n=t;function r(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function o(e,t){return 0!=(e>>>t&1)}function i(e){if(!e)throw new Error("Assertion error")}n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;const a=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)r(n,8,t);return new a(a.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!a.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){const o=Math.min(e.length-n,3);r(parseInt(e.substr(n,o),10),3*o+1,t),n+=o}return new a(a.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!a.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,n=[];for(t=0;t+2<=e.length;t+=2){let o=45*a.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));o+=a.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),r(o,11,n)}return t<e.length&&r(a.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,n),new a(a.Mode.ALPHANUMERIC,e.length,n)}static makeSegments(e){return""==e?[]:a.isNumeric(e)?[a.makeNumeric(e)]:a.isAlphanumeric(e)?[a.makeAlphanumeric(e)]:[a.makeBytes(a.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)r(e,8,t);else if(e<16384)r(2,2,t),r(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");r(6,3,t),r(e,21,t)}return new a(a.Mode.ECI,0,t)}static isNumeric(e){return a.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return a.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(const r of e){const e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t}};let s=a;s.NUMERIC_REGEX=/^[0-9]*$/,s.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,s.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=s})(Bz||(Bz={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let n=t;n.LOW=new t(0,1),n.MEDIUM=new t(1,0),n.QUARTILE=new t(2,3),n.HIGH=new t(3,2),e.Ecc=n})(t=e.QrCode||(e.QrCode={}))})(Bz||(Bz={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let n=t;n.NUMERIC=new t(1,[10,12,14]),n.ALPHANUMERIC=new t(2,[9,11,13]),n.BYTE=new t(4,[8,16,16]),n.KANJI=new t(8,[8,10,12]),n.ECI=new t(7,[0,0,0]),e.Mode=n})(t=e.QrSegment||(e.QrSegment={}))})(Bz||(Bz={}));var _$=Bz,P$={L:_$.QrCode.Ecc.LOW,M:_$.QrCode.Ecc.MEDIUM,Q:_$.QrCode.Ecc.QUARTILE,H:_$.QrCode.Ecc.HIGH},T$=128,O$="L",N$="#FFFFFF",I$="#000000",A$=!1,R$=4,M$=.1;
|
|
27960
27965
|
// src/index.tsx
|
|
27961
27966
|
/**
|
|
27962
27967
|
* @license qrcode.react
|
|
27963
27968
|
* Copyright (c) Paul O'Shannessy
|
|
27964
27969
|
* SPDX-License-Identifier: ISC
|
|
27965
|
-
*/function
|
|
27966
|
-
return y().createElement("svg",
|
|
27970
|
+
*/function D$(e,t=0){const n=[];return e.forEach((function(e,r){let o=null;e.forEach((function(i,a){if(!i&&null!==o)return n.push(`M${o+t} ${r+t}h${a-o}v1H${o+t}z`),void(o=null);if(a!==e.length-1)i&&null===o&&(o=a);else{if(!i)return;null===o?n.push(`M${a+t},${r+t} h1v1H${a+t}z`):n.push(`M${o+t},${r+t} h${a+1-o}v1H${o+t}z`)}}))})),n.join("")}function L$(e,t){return e.slice().map(((e,n)=>n<t.y||n>=t.y+t.h?e:e.map(((e,n)=>(n<t.x||n>=t.x+t.w)&&e))))}function F$(e,t,n,r){if(null==r)return null;const o=n?R$:0,i=e.length+2*o,a=Math.floor(t*M$),s=i/t,c=(r.width||a)*s,l=(r.height||a)*s,u=null==r.x?e.length/2-c/2:r.x*s,d=null==r.y?e.length/2-l/2:r.y*s;let f=null;if(r.excavate){let e=Math.floor(u),t=Math.floor(d);f={x:e,y:t,w:Math.ceil(c+u-e),h:Math.ceil(l+d-t)}}return{x:u,y:d,h:l,w:c,excavation:f}}!function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}}();function j$(e){const t=e,{value:n,size:r=T$,level:o=O$,bgColor:i=N$,fgColor:a=I$,includeMargin:s=A$,imageSettings:c}=t,l=x$(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let u=_$.QrCode.encodeText(n,P$[o]).getModules();const d=s?R$:0,f=u.length+2*d,p=F$(u,r,s,c);let h=null;null!=c&&null!=p&&(null!=p.excavation&&(u=L$(u,p.excavation)),h=y().createElement("image",{xlinkHref:c.src,height:p.h,width:p.w,x:p.x+d,y:p.y+d,preserveAspectRatio:"none"}));const m=D$(u,d);
|
|
27971
|
+
return y().createElement("svg",S$({height:r,width:r,viewBox:`0 0 ${f} ${f}`},l),y().createElement("path",{fill:i,d:`M0,0 h${f}v${f}H0z`,shapeRendering:"crispEdges"}),y().createElement("path",{fill:a,d:m,shapeRendering:"crispEdges"}),h)}var B$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},U$=y().useMemo,q$=y().useEffect,V$="refactor",z$=y().memo((function(e){var t=e.status,n=e.loadingComponent,r=e.src,o=e.descriptions,i=e.containerStyle,a=e.imageStyle,s=e.onLoad,c=e.onClickMaskEl,l=e.onMaskContent,u=_u().t,d=B$(y$(t),2),f=d[0],p=d[1],h=B$(function(e,t){var n=p$(v$(),2),r=n[0],o=n[1],i=t.onLoad,a=h$((function(){return d$(void 0,void 0,void 0,(function(){var t,n;return f$(this,(function(r){switch(r.label){case 0:return[4/*yield*/,ha().get(e,{responseType:"blob"})];case 1:return t=r.sent().data,(n=new FileReader).onload=function(e){var t,n=null===(t=e.target)||void 0===t?void 0:t.result;o(n),i&&i()},n.readAsDataURL(t),[2/*return*/]}}))}))}),[e,i]);
|
|
27967
27972
|
// 每次 render 都会请求 不应该
|
|
27968
|
-
return
|
|
27973
|
+
return m$((function(){e&&a()}),[e]),[r]}(r,{onLoad:s}),1),m=h[0],v="".concat(V$,"-qrcode"),g=Zj()(v,f),b=U$((function(){return n||y().createElement(dF,null)}),[n]);return y().createElement("div",{className:g,style:i},"loading"===t?b:y().createElement(y().Fragment,null,y().createElement("span",{className:"".concat(V$,"__image-wrapper"),onClick:function(){return l&&l(t)}},p&&y().createElement("div",{className:"".concat(V$,"-qrcode__mask")},y().cloneElement(p,{onClick:function(e){var n,r;c&&c(t),null===(r=(n=p.props).onClick)||void 0===r||r.call(n,e)}})),y().createElement("img",{className:"".concat(V$,"__image"),src:m,alt:u("common.qrcode"),style:a})),y().createElement("div",{className:"".concat(V$,"__desc")},o[t])))})),$$=function(e){var t=e.status,n=e.loadingComponent,r=e.src,o=e.descriptions,i=e.containerStyle,a=(e.imageStyle,e.onLoad),s=e.onClickMaskEl,c=e.onMaskContent,l=(_u().t,B$(y$(t),2)),u=l[0],d=l[1],f="".concat(V$,"-qrcode"),p=Zj()(f,u),h=U$((function(){return n||y().createElement(dF,null)}),[n]);return q$((function(){r&&(null==a||a())}),[r]),y().createElement("div",{className:p,style:i},"loading"===t?h:y().createElement(y().Fragment,null,y().createElement("span",{className:"".concat(V$,"__image-wrapper"),onClick:function(){return c&&c(t)}},d&&y().createElement("div",{className:"".concat(V$,"-qrcode__mask")},y().cloneElement(d,{onClick:function(e){var n,r;s&&s(t),null===(r=(n=d.props).onClick)||void 0===r||r.call(n,e)}})),y().createElement(j$,{level:"H",size:166,value:r,style:{padding:"11px",backgroundColor:"#fff",display:"block"}})),y().createElement("div",{className:"".concat(V$,"__desc")},o[t])))},H$=function(){return H$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},H$.apply(this,arguments)},W$=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},G$=y().useReducer,K$=function(e,t){switch(t.type){case"changeStatus":return e.status===t.payload.status?e:H$(H$({},e),t.payload);
|
|
27969
27974
|
// case 'changeDesc':
|
|
27970
27975
|
// if (state.description === action.payload.description) {
|
|
27971
27976
|
// return state
|
|
27972
27977
|
// }
|
|
27973
27978
|
// return { ...state, ...action.payload }
|
|
27974
|
-
case"change":return
|
|
27979
|
+
case"change":return H$(H$({},e),t.payload);default:return e}},Y$=function(){
|
|
27975
27980
|
/**
|
|
27976
27981
|
* reducer 控制
|
|
27977
27982
|
*/
|
|
27978
|
-
var e=G$(K
|
|
27983
|
+
var e=W$(G$(K$,{status:"loading",
|
|
27979
27984
|
// description: '',
|
|
27980
|
-
src:void 0,random:void 0}),2);return{state:e[0],dispatch:e[1]}},
|
|
27985
|
+
src:void 0,random:void 0}),2);return{state:e[0],dispatch:e[1]}},J$=function(){return J$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},J$.apply(this,arguments)},Z$=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Q$=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},X$=y().useCallback,eH=y().useEffect,tH=function(e,t){var n=!1,r=e.state,o=e.dispatch,i=e.sleepTime,a=e.onStatusChange,s=hL(),c=t.readyCheckedRequest,l=t.alreadyCheckedRequest,u=t.exchangeUserInfo,d=t.genCodeRequest,f=t.getAuthUrlRequest,p=X$((function(e){return["expired","ready","already","success","cancel","MFA","error"][e.status+1]}),[]),h=function(){return Z$(void 0,void 0,void 0,(function(){return Q$(this,(function(e){switch(e.label){case 0:return"ready"!==r.status||!c||(null==s?void 0:s._closeLoopCheckQrcode)?[3/*break*/,3]:i?[4/*yield*/,SX(i)]:[3/*break*/,2];case 1:e.sent(),e.label=2;case 2:
|
|
27981
27986
|
// 再次发起请求
|
|
27982
|
-
S(c),e.label=3;case 3:return[2/*return*/]}}))}))},m=function(){return
|
|
27987
|
+
S(c),e.label=3;case 3:return[2/*return*/]}}))}))},m=function(){return Z$(void 0,void 0,void 0,(function(){return Q$(this,(function(e){switch(e.label){case 0:return"already"!==r.status||!l||(null==s?void 0:s._closeLoopCheckQrcode)?[3/*break*/,3]:i?[4/*yield*/,SX(i)]:[3/*break*/,2];case 1:e.sent(),e.label=2;case 2:S(l),e.label=3;case 3:return[2/*return*/]}}))}))},v=function(){r.status},g=function(){r.status},y=function(){r.status},b=function(){r.status},w=function(){r.status},C=function(e){if(!n){var t,o,i=r.status,s=p(e);
|
|
27983
27988
|
// 状态已经改变 交给状态的 Handler 来改变
|
|
27984
27989
|
if(i!==s)
|
|
27985
27990
|
// 改变状态
|
|
27986
27991
|
return k(s),
|
|
27987
27992
|
// 触发改变状态的用户事件
|
|
27988
|
-
t=s,o=e,void
|
|
27993
|
+
t=s,o=e,void Z$(void 0,void 0,void 0,(function(){var e;return Q$(this,(function(n){switch(n.label){case 0:return o.ticket&&u?[4/*yield*/,u(o.ticket)]:[3/*break*/,2];case 1:return e=n.sent().data,a&&a(t,J$(J$({},e),{ticket:o.ticket})),[3/*break*/,3];case 2:a&&a(t,o),n.label=3;case 3:return[2/*return*/]}}))}));
|
|
27989
27994
|
// 状态未改变 交给 ResponseFlow 处理
|
|
27990
27995
|
E(e)}},E=function(e){
|
|
27991
27996
|
// 未改变状态 进入处理流程
|
|
@@ -28003,11 +28008,11 @@ case 3:y();break;
|
|
|
28003
28008
|
// mfa 状态
|
|
28004
28009
|
case 4:b();break;
|
|
28005
28010
|
// 未知错误
|
|
28006
|
-
case 5:w();break;default:throw new Error("不满足的Server Code:".concat(e.status))}},k=function(e){return o({type:"changeStatus",payload:{status:e}})},S=function(e){return
|
|
28011
|
+
case 5:w();break;default:throw new Error("不满足的Server Code:".concat(e.status))}},k=function(e){return o({type:"changeStatus",payload:{status:e}})},S=function(e){return Z$(void 0,void 0,void 0,(function(){var t;return Q$(this,(function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),[4/*yield*/,e()];case 1:return(t=n.sent().data)?[4/*yield*/,C(t)]:[3/*break*/,3];case 2:return n.sent(),[3/*break*/,4];case 3:throw new Error("返回数据不匹配");case 4:return[3/*break*/,6];case 5:return n.sent(),k("error"),[3/*break*/,6];case 6:return[2/*return*/]}}))}))},x={loading:function(){return Z$(void 0,void 0,void 0,(function(){var e,t,n,r,i,a,s;return Q$(this,(function(c){switch(c.label){case 0:return d?[4/*yield*/,d()]:[3/*break*/,2];case 1:(i=c.sent().data)&&(e=i.url,t=i.random,o({type:"change",payload:{src:e,random:t}})),c.label=2;case 2:return f?[4/*yield*/,f()]:[3/*break*/,4];case 3:n=c.sent(),r=n.data,n.code,r&&200===r.code&&(i=r.data,a=i.authCode,s=i.authUrl,o({type:"change",payload:{authCode:a,authUrl:s}})),c.label=4;case 4:return[2/*return*/]}}))}))},ready:h,already:m,success:v,error:w,expired:g,cancel:y,MFA:b};
|
|
28007
28012
|
// 每次状态变化流转下一个 flowHandler
|
|
28008
|
-
|
|
28013
|
+
eH((function(){return(0,x[r.status])(),function(){
|
|
28009
28014
|
// 阻止上一次 Render 内的作用域方法
|
|
28010
|
-
n=!0}}),[r.status])},
|
|
28015
|
+
n=!0}}),[r.status])},nH=function(){return nH=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},nH.apply(this,arguments)},rH=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},oH=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},iH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},aH=y().forwardRef,sH=y().useCallback,cH=y().useImperativeHandle,lH=y().useMemo,uH=aH((function(e,t){var n=e.scene,r=e.descriptions,o=e.sleepTime,i=void 0===o?1e3:o,a=e.onStatusChange,s=e.onClickMaskContent,c=e.qrCodeScanOptions,l=void 0===c?{}:c,u=iH(e,["scene","descriptions","sleepTime","onStatusChange","onClickMaskContent","qrCodeScanOptions"]),d=l.context,f=l.customData,p=l.withCustomData,h=l.extIdpConnId,m=aL(),v=m.get,g=m.post,b=sH((function(){return g("/api/v2/qrcode/gene",{autoMergeQrCode:!1,scene:n,
|
|
28011
28016
|
/**
|
|
28012
28017
|
* 请求上下文,将会传递到 Pipeline 中
|
|
28013
28018
|
*/
|
|
@@ -28023,100 +28028,100 @@ withCustomData:p,
|
|
|
28023
28028
|
/**
|
|
28024
28029
|
* 多租户用的额外的 Idp Id。
|
|
28025
28030
|
*/
|
|
28026
|
-
extIdpConnId:h})}),[n,g,d,f,h,p]),w=
|
|
28031
|
+
extIdpConnId:h})}),[n,g,d,f,h,p]),w=Y$(),C=w.state,E=w.dispatch,k=sH((function(){return rH(void 0,void 0,void 0,(function(){return oH(this,(function(e){return[2/*return*/,v("/api/v2/qrcode/check?random=".concat(C.random))]}))}))}),[C.random,v]),S=sH((function(e){return rH(void 0,void 0,void 0,(function(){return oH(this,(function(t){return[2/*return*/,g("/api/v2/qrcode/userinfo",{ticket:e})]}))}))}),[g]);tH({state:C,dispatch:E,sleepTime:i,descriptions:r,onStatusChange:a},{genCodeRequest:b,exchangeUserInfo:S,readyCheckedRequest:k,alreadyCheckedRequest:k});
|
|
28027
28032
|
/**
|
|
28028
28033
|
* 二维码渲染完成后重置状态
|
|
28029
28034
|
*/
|
|
28030
|
-
var x=
|
|
28035
|
+
var x=sH((function(){E({type:"changeStatus",payload:{status:"loading"}})}),[E]);
|
|
28031
28036
|
/**
|
|
28032
28037
|
* 刷新二维码方法
|
|
28033
|
-
*/
|
|
28038
|
+
*/cH(t,(function(){return{referQrCode:x}}),[x]);
|
|
28034
28039
|
/**
|
|
28035
28040
|
* 渲染时进行格式化描述
|
|
28036
28041
|
*/
|
|
28037
|
-
var _=
|
|
28042
|
+
var _=lH((function(){var e={};return r&&Object.keys(r).forEach((function(t){var n=t,o=r[n];e[n]="function"==typeof o?o(x):o})),e}),[r,x]);return y().createElement(z$,nH({src:C.src,descriptions:_,status:C.status,loadingComponent:y().createElement(dF,null),onLoad:function(){E({type:"changeStatus",payload:{status:"ready"}})},onMaskContent:function(e){s?s(e):function(e){switch(e){case"cancel":case"expired":case"error":x()}}(e)}},u))})),dH=aH((function(e,t){var n=e.descriptions,r=e.sleepTime,o=void 0===r?1e3:r,i=e.onStatusChange,a=e.onClickMaskContent,s=e.qrCodeScanOptions,c=void 0===s?{}:s,l=e.authorizationUrl,u=iH(e,["descriptions","sleepTime","onStatusChange","onClickMaskContent","qrCodeScanOptions","authorizationUrl"]),d=c.extIdpConnId,f=aL().get,p=sH((function(){return l?ha().get(l):new Promise((function(e,t){return t("no redirectUrl")}))}),[l]),h=Y$(),m=h.state,v=h.dispatch,g=sH((function(){return rH(void 0,void 0,void 0,(function(){return oH(this,(function(e){return[2/*return*/,f("/connections/zjzwfw/check-auth-code",{authCode:m.authCode,extIdpConnId:d})]}))}))}),[m.authCode,f,d]);tH({state:m,dispatch:v,sleepTime:o,descriptions:n,onStatusChange:i},{getAuthUrlRequest:p,readyCheckedRequest:g,alreadyCheckedRequest:g});
|
|
28038
28043
|
/**
|
|
28039
28044
|
* 二维码渲染完成后重置状态
|
|
28040
28045
|
*/
|
|
28041
|
-
var b=
|
|
28046
|
+
var b=sH((function(){v({type:"changeStatus",payload:{status:"loading"}})}),[v]);
|
|
28042
28047
|
/**
|
|
28043
28048
|
* 刷新二维码方法
|
|
28044
|
-
*/
|
|
28049
|
+
*/cH(t,(function(){return{referQrCode:b}}),[b]);
|
|
28045
28050
|
/**
|
|
28046
28051
|
* 渲染时进行格式化描述
|
|
28047
28052
|
*/
|
|
28048
|
-
var w=
|
|
28049
|
-
var mH
|
|
28053
|
+
var w=lH((function(){var e={};return n&&Object.keys(n).forEach((function(t){var r=t,o=n[r];e[r]="function"==typeof o?o(b):o})),e}),[n,b]);return y().createElement($$,nH({src:m.authUrl,descriptions:w,status:m.status,loadingComponent:y().createElement(dF,null),onLoad:function(){v({type:"changeStatus",payload:{status:"ready"}})},onMaskContent:function(e){a?a(e):function(e){switch(e){case"cancel":case"expired":case"error":b()}}(e)}},u))})),fH=uH,pH=dH;fH.UI=z$,pH.UI=$$;// CONCATENATED MODULE: ./src/Login/core/withAppQrcode.tsx
|
|
28054
|
+
var hH,mH=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},vH=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},gH=y().useRef,yH=function(e){var t=gH(),n=e.canLoop,r=aL().responseIntercept,o=fL(),i=JL(),a=_u().t;if(!n)return null;var s={already:function(e){return y().createElement("span",{className:"qrcode__again-scan",onClick:e},a("login.scanAgain"))},ready:a("login.appScanLogin"),success:a("common.LoginSuccess"),MFA:a("common.LoginSuccess")};
|
|
28050
28055
|
/**
|
|
28051
28056
|
* Sever Status 发生变化
|
|
28052
28057
|
* @param status
|
|
28053
28058
|
* @param data
|
|
28054
|
-
*/return y().createElement(
|
|
28059
|
+
*/return y().createElement(fH,{ref:t,scene:"APP_AUTH",descriptions:s,onStatusChange:function(t,n){return mH(void 0,void 0,void 0,(function(){var a,s;return vH(this,(function(c){switch(c.label){case 0:switch(t){case"success":return[3/*break*/,1];case"error":return[3/*break*/,4];case"MFA":return[3/*break*/,5]}return[3/*break*/,6];case 1:return(null==o?void 0:o.onBeforeLogin)?[4/*yield*/,null==o?void 0:o.onBeforeLogin({type:Vs.AppQr,data:n},i)]:[3/*break*/,3];case 2:if(!c.sent())return[3/*break*/,7];c.label=3;case 3:return e.multipleInstance&&e.multipleInstance.setLoginWay("qrcode",Vs.AppQr),e.onLoginSuccess(n),[3/*break*/,7];case 4:return n.scannedResult&&(a=n.scannedResult.message,gC.error(a)),[3/*break*/,7];case 5:return n.scannedResult&&(null==(s=r(n.scannedResult).onGuardHandling)||s()),[3/*break*/,7];case 6:return[3/*break*/,7];case 7:return[2/*return*/]}}))}))},imageStyle:{height:"166px",width:"166px"}})},bH=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},wH=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},CH=function(e){var t=e.canLoop,n=e.qrCodeScanOptions,r=_u().t,o=aL().responseIntercept,i=fL(),a=JL();if(!t)return null;var s={already:function(e){return y().createElement("span",{className:"qrcode__again-scan",onClick:e},r("login.scanAgain"))},ready:jc()?r("common.loginWithWechatmpQrcodeTipsTitle"):r("login.wechatScanLogin"),success:r("common.LoginSuccess"),MFA:r("common.LoginSuccess")};
|
|
28055
28060
|
/**
|
|
28056
28061
|
* 状态发生变化时的处理函数
|
|
28057
28062
|
* @param status
|
|
28058
28063
|
* @param data
|
|
28059
|
-
*/return y().createElement(
|
|
28064
|
+
*/return y().createElement(fH,{scene:"WXAPP_AUTH",descriptions:s,onStatusChange:function(t,n){return bH(void 0,void 0,void 0,(function(){var r,s;return wH(this,(function(c){switch(c.label){case 0:switch(t){case"success":return[3/*break*/,1];case"error":return[3/*break*/,4];case"MFA":return[3/*break*/,5]}return[3/*break*/,6];case 1:return(null==i?void 0:i.onBeforeLogin)?[4/*yield*/,null==i?void 0:i.onBeforeLogin({type:Vs.WxMinQr,data:n},a)]:[3/*break*/,3];case 2:if(!c.sent())return[3/*break*/,7];c.label=3;case 3:return e.multipleInstance&&e.multipleInstance.setLoginWay("qrcode",Vs.WxMinQr,e.id),e.onLoginSuccess(n),[3/*break*/,7];case 4:
|
|
28060
28065
|
// 怎么模拟这里的 error
|
|
28061
|
-
return n.scannedResult&&(r=n.scannedResult.message,gC.error(r)),[3/*break*/,7];case 5:return null==(s=o(n.scannedResult).onGuardHandling)||s(),[3/*break*/,7];case 6:return[3/*break*/,7];case 7:return[2/*return*/]}}))}))},qrCodeScanOptions:n,imageStyle:{height:"166px",width:"166px"}})},
|
|
28066
|
+
return n.scannedResult&&(r=n.scannedResult.message,gC.error(r)),[3/*break*/,7];case 5:return null==(s=o(n.scannedResult).onGuardHandling)||s(),[3/*break*/,7];case 6:return[3/*break*/,7];case 7:return[2/*return*/]}}))}))},qrCodeScanOptions:n,imageStyle:{height:"166px",width:"166px"}})},EH=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},kH=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},SH=function(e){var t=e.canLoop,n=e.qrCodeScanOptions,r=_u().t,o=aL().responseIntercept,i=fL(),a=JL();if(!t)return null;var s={already:function(e){return y().createElement("span",{className:"qrcode__again-scan",onClick:e},r("login.scanAgain"))},ready:jc()?r("common.loginWithWechatmpQrcodeTipsTitle"):r("login.wechatScanLogin"),success:r("common.LoginSuccess"),MFA:r("common.LoginSuccess")};
|
|
28062
28067
|
/**
|
|
28063
28068
|
* 状态发生变化时的处理函数
|
|
28064
28069
|
* @param status
|
|
28065
28070
|
* @param data
|
|
28066
|
-
*/return y().createElement(
|
|
28071
|
+
*/return y().createElement(fH,{scene:"WECHATMP_AUTH",descriptions:s,onStatusChange:function(t,n){return EH(void 0,void 0,void 0,(function(){var r,s;return kH(this,(function(c){switch(c.label){case 0:switch(t){case"success":return[3/*break*/,1];case"error":return[3/*break*/,4];case"MFA":return[3/*break*/,5]}return[3/*break*/,6];case 1:return(null==i?void 0:i.onBeforeLogin)?[4/*yield*/,null==i?void 0:i.onBeforeLogin({type:Vs.WechatMpQrcode,data:n},a)]:[3/*break*/,3];case 2:if(!c.sent())return[3/*break*/,7];c.label=3;case 3:return e.multipleInstance&&e.multipleInstance.setLoginWay("qrcode",Vs.WechatMpQrcode,e.id),e.onLoginSuccess(n),[3/*break*/,7];case 4:
|
|
28067
28072
|
// 怎么模拟这里的 error
|
|
28068
|
-
return n.scannedResult&&(r=n.scannedResult.message,gC.error(r)),[3/*break*/,7];case 5:return null==(s=o(n.scannedResult).onGuardHandling)||s(),[3/*break*/,7];case 6:return[3/*break*/,7];case 7:return[2/*return*/]}}))}))},qrCodeScanOptions:n,imageStyle:{height:"166px",width:"166px"}})},
|
|
28073
|
+
return n.scannedResult&&(r=n.scannedResult.message,gC.error(r)),[3/*break*/,7];case 5:return null==(s=o(n.scannedResult).onGuardHandling)||s(),[3/*break*/,7];case 6:return[3/*break*/,7];case 7:return[2/*return*/]}}))}))},qrCodeScanOptions:n,imageStyle:{height:"166px",width:"166px"}})},xH=((hH={})[WF.APP_MFA_CODE]={
|
|
28069
28074
|
// 跳转去 mfa 验证
|
|
28070
|
-
action:"changeModule",module:LL.MFA},
|
|
28075
|
+
action:"changeModule",module:LL.MFA},hH[WF.OTP_MFA_CODE]={
|
|
28071
28076
|
// 跳转去 mfa 验证
|
|
28072
|
-
action:"changeModule",module:LL.MFA,initData:{current:uB.TOTP,totpMfaEnabled:!0}},
|
|
28077
|
+
action:"changeModule",module:LL.MFA,initData:{current:uB.TOTP,totpMfaEnabled:!0}},hH[WF.INPUT_CAPTCHACODE]={
|
|
28073
28078
|
// 需要输入图形验证码
|
|
28074
|
-
action:"message"},
|
|
28079
|
+
action:"message"},hH[500]={action:"message"},hH[1002]={
|
|
28075
28080
|
// 登录太频繁
|
|
28076
|
-
action:"message"},
|
|
28081
|
+
action:"message"},hH[2820002]={
|
|
28077
28082
|
// ldap url报错信息
|
|
28078
|
-
action:"message"},
|
|
28083
|
+
action:"message"},hH[2333]={
|
|
28079
28084
|
// 密码错误
|
|
28080
|
-
action:"message"},
|
|
28085
|
+
action:"message"},hH[2057]={
|
|
28081
28086
|
// 多次错误登录导致账号锁定
|
|
28082
|
-
action:"accountLock"},
|
|
28087
|
+
action:"accountLock"},hH[2005]={
|
|
28083
28088
|
// 账号锁定
|
|
28084
|
-
action:"accountLock"},
|
|
28089
|
+
action:"accountLock"},hH[2042]={
|
|
28085
28090
|
// 禁止未验证邮箱注册
|
|
28086
|
-
action:"message"},
|
|
28091
|
+
action:"message"},hH[2001]={
|
|
28087
28092
|
// 验证码过期
|
|
28088
|
-
action:"message"},
|
|
28093
|
+
action:"message"},hH[1576]={action:"message"},hH[2029]={action:"message"},hH[3720001]={
|
|
28089
28094
|
// 01 02 03 计量计费相关
|
|
28090
|
-
action:"message"},
|
|
28095
|
+
action:"message"},hH[3720002]={action:"message"},hH[3720003]={action:"message"},hH[2130010]={
|
|
28091
28096
|
// 无权登录此应用
|
|
28092
|
-
action:"message"},
|
|
28097
|
+
action:"message"},hH[2120008]={action:"message"},hH[2031]={
|
|
28093
28098
|
// 禁止注册
|
|
28094
|
-
action:"message"},
|
|
28099
|
+
action:"message"},hH[1640]={action:"changeModule",module:LL.IDENTITY_BINDING},hH[1641]={action:"changeModule",module:LL.IDENTITY_BINDING_ASK},hH[1642]={action:"changeModule",module:LL.LOGIN_COMPLETE_INFO},hH[1645]={action:"changeModule",module:LL.LOGIN_COMPLETE_INFO},hH[1666]={action:"changeModule",module:LL.IDENTITY_BINDING_NO_ASK},hH[1108]={action:"changeModule",module:LL.RESET_ACCOUNT_NAME},hH[2930]={action:"changeModule",module:LL.SELECT_ACCOUNT_2_LOGIN},
|
|
28095
28100
|
// 1643: {},
|
|
28096
|
-
|
|
28101
|
+
hH[408]={action:"message"},hH),_H=i(3109),PH=function(){return PH=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},PH.apply(this,arguments)},TH=y().useCallback,OH=function(e){
|
|
28097
28102
|
// TODO: 能不能加个类型
|
|
28098
|
-
var t=e.i,n=e.appId,r=e.appHost,o=e.isHost,i=_u().t,
|
|
28103
|
+
var t=e.i,n=e.appId,r=e.appHost,o=e.isHost,i=aL(),a=_u().t,s=lL(),c=xL(),l=sL(),u=TH((function(){var e,u,d=i.getHeaders()["x-authing-device-id"],f=PH(PH({from_guard:"1",app_id:n,guard_version:"Guard@".concat(c)},s&&{tenant_id:s}),d&&{device_id:d});if(o&&(delete f.from_guard,f.from_hosted_guard="1",l)){f.redirected="1";var p=UX();p&&(
|
|
28099
28104
|
// 如果 isHost 是 true,则从 url 获取 finish_login_url 作为 social.authorize 方法的 targetUrl 参数
|
|
28100
|
-
|
|
28105
|
+
f.redirect_url=null===(e=Fc().parse(p.location.search))||void 0===e?void 0:e.finish_login_url)}if(null==t?void 0:t.provider){
|
|
28101
28106
|
// 社交身份源
|
|
28102
|
-
var
|
|
28107
|
+
var h="authing-".concat(t.provider.replace(/:/g,"-"));return y().createElement(Cj,{key:t.identifier,className:"g2-guard-third-login-btn",block:!0,size:"large",icon:y().createElement(JD,{type:"".concat(h,"-fill"),style:{fontSize:20,marginRight:8}}),onClick:function(){var e,n;if(t.action===cj.Message)gC.error(a("login.socialConnectionMessage",{provider:null!==(n=null!==(e=t.displayName)&&void 0!==e?e:"zh-CN"===su.resolvedLanguage?t.name:t.name_en)&&void 0!==n?n:t.provider}));else if(t.action===cj.Auth){var o="".concat(r,"/connections/social/").concat(t.identifier,"?").concat(Fc().stringify(f));f.redirected?window.location.replace(o):nX(o)}}},a("login.loginBy",{name:t.displayName}))}if(o){
|
|
28103
28108
|
// 托管登录页,直接写死登录 URL
|
|
28104
|
-
|
|
28109
|
+
f.identifier=t.identifier;var m=iF[t.protocol];if(!m)return null;u="".concat(r).concat(m,"?").concat(Fc().stringify(f))}else{var v=aF[t.protocol];if(!v)return null;
|
|
28105
28110
|
// 嵌入式组件,从配置字段获取登录 URL
|
|
28106
|
-
|
|
28111
|
+
u=t.config[v]}return y().createElement(Cj,{key:t.identifier,className:"g2-guard-third-login-btn",block:!0,size:"large",icon:y().createElement(bv,{size:20,src:t.logo,style:{marginRight:8}}),onClick:function(){f.redirected?window.location.replace(u):nX(u)}},a("login.loginBy",{name:t.displayName}))}),[n,t,a,o,r,s]);return u()};// CONCATENATED MODULE: ./node_modules/@github/webauthn-json/dist/esm/webauthn-json.js
|
|
28107
28112
|
// src/webauthn-json/base64url.ts
|
|
28108
|
-
function
|
|
28113
|
+
function NH(e){const t="==".slice(0,(4-e.length%4)%4),n=e.replace(/-/g,"+").replace(/_/g,"/")+t,r=atob(n),o=new ArrayBuffer(r.length),i=new Uint8Array(o);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);return o}function IH(e){const t=new Uint8Array(e);let n="";for(const e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}
|
|
28109
28114
|
// src/webauthn-json/convert.ts
|
|
28110
|
-
var
|
|
28115
|
+
var AH="copy",RH="convert";function MH(e,t,n){if(t===AH)return n;if(t===RH)return e(n);if(t instanceof Array)return n.map((n=>MH(e,t[0],n)));if(t instanceof Object){const r={};for(const[o,i]of Object.entries(t)){if(i.derive){const e=i.derive(n);void 0!==e&&(n[o]=e)}if(o in n)null!=n[o]?r[o]=MH(e,i.schema,n[o]):r[o]=null;else if(i.required)throw new Error(`Missing key: ${o}`)}return r}}function DH(e,t){return{required:!0,schema:e,derive:t}}function LH(e){return{required:!0,schema:e}}function FH(e){return{required:!1,schema:e}}
|
|
28111
28116
|
// src/webauthn-json/basic/schema.ts
|
|
28112
|
-
var
|
|
28117
|
+
var jH={type:LH(AH),id:LH(RH),transports:FH(AH)},BH={appid:FH(AH),appidExclude:FH(AH),credProps:FH(AH)},UH={appid:FH(AH),appidExclude:FH(AH),credProps:FH(AH)},qH={publicKey:LH({rp:LH(AH),user:LH({id:LH(RH),name:LH(AH),displayName:LH(AH)}),challenge:LH(RH),pubKeyCredParams:LH(AH),timeout:FH(AH),excludeCredentials:FH([jH]),authenticatorSelection:FH(AH),attestation:FH(AH),extensions:FH(BH)}),signal:FH(AH)},VH={type:LH(AH),id:LH(AH),rawId:LH(RH),authenticatorAttachment:FH(AH),response:LH({clientDataJSON:LH(RH),attestationObject:LH(RH),transports:DH(AH,(e=>{var t;return(null==(t=e.getTransports)?void 0:t.call(e))||[]}))}),clientExtensionResults:DH(UH,(e=>e.getClientExtensionResults()))},zH={mediation:FH(AH),publicKey:LH({challenge:LH(RH),timeout:FH(AH),rpId:FH(AH),allowCredentials:FH([jH]),userVerification:FH(AH),extensions:FH(BH)}),signal:FH(AH)},$H={type:LH(AH),id:LH(AH),rawId:LH(RH),authenticatorAttachment:FH(AH),response:LH({clientDataJSON:LH(RH),authenticatorData:LH(RH),signature:LH(RH),userHandle:LH(RH)}),clientExtensionResults:DH(UH,(e=>e.getClientExtensionResults()))};async function HH(e){const t=await navigator.credentials.create(
|
|
28113
28118
|
// src/webauthn-json/basic/api.ts
|
|
28114
|
-
function(e){return
|
|
28119
|
+
function(e){return MH(NH,qH,e)}(e));return function(e){return MH(IH,VH,e)}(t)}async function WH(e){const t=await navigator.credentials.get(function(e){return MH(NH,zH,e)}(e));return function(e){return MH(IH,$H,e)}(t)}
|
|
28115
28120
|
// src/webauthn-json/basic/supported.ts
|
|
28116
28121
|
// CONCATENATED MODULE: ./src/Login/socialLogin/PasskeyButton/index.tsx
|
|
28117
|
-
var KH
|
|
28122
|
+
var GH,KH=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},YH=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},JH=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},ZH=y().useCallback,QH=function(e){var t,n=e.onLoginFailed,r=e.onLoginSuccess,o=null!==(t=su.resolvedLanguage)&&void 0!==t?t:su.language,i=iL(),a=JH((0,g.useState)(),2),s=a[0],c=a[1],l=JH((0,g.useState)(!1),2),u=l[0],d=l[1],f=hL().host,p=cL(),h=xL(),m=aL(),v=m.responseIntercept,b=_u().t,w=ZH((function(){return!!i.passkeyEnabled&&!!(navigator.credentials&&navigator.credentials.create&&navigator.credentials.get&&window.PublicKeyCredential)}),[i]);return y().createElement(y().Fragment,null,w()&&y().createElement(Cj,{className:"g2-guard-third-login-btn",block:!0,loading:u,size:"large",onClick:function(){return KH(void 0,void 0,void 0,(function(){var e,t,a,l,u,g,y,b,w,C,E,k,S,x,_,P,T;return YH(this,(function(O){switch(O.label){case 0:d(!0),O.label=1;case 1:return O.trys.push([1,7,8,9]),e="".concat(f,"/api/v3/webauthn/login/initialize"),[4/*yield*/,fetch(e,{method:"POST",body:JSON.stringify({}),credentials:"include",headers:(P={"Content-Type":"application/json"},P[ML.langHeader]=o,P["x-authing-userpool-id"]=i.userPoolId,P["x-authing-app-id"]=p,P["x-authing-sdk-version"]=h,P["x-authing-request-from"]="Guard@".concat(h),P["x-authing-device-id"]=m.getHeaders()["x-authing-device-id"],P)})];case 2:return[4/*yield*/,O.sent().json()];case 3:return t=O.sent(),a=v(t),l=a.statusCode,u=a.data,g=a.message,200!==l?(n(l,void 0,g),[2/*return*/]):(u.mediation="required",u.signal=function(){s&&s.abort();var e=new AbortController;return c(e),e.signal}(),y=u.ticket,[4/*yield*/,WH(u)]);case 4:return b=O.sent(),w="".concat(f,"/api/v3/webauthn/login/finalize"),[4/*yield*/,fetch(w,{method:"POST",body:JSON.stringify({credential:b,ticket:y}),credentials:"include",headers:(T={"Content-Type":"application/json"},T[ML.langHeader]=o,T["x-authing-userpool-id"]=i.userPoolId,T["x-authing-app-id"]=p,T["x-authing-sdk-version"]=h,T["x-authing-request-from"]="Guard@".concat(h),T["x-authing-device-id"]=m.getHeaders()["x-authing-device-id"],T)})];case 5:return[4/*yield*/,O.sent().json()];case 6:return C=O.sent(),E=v(C),k=E.statusCode,S=E.data,x=E.message,200!==k?(n(k,void 0,x),[2/*return*/]):(r(S),[3/*break*/,9]);case 7:return _=O.sent(),n(500,void 0,_.message),[3/*break*/,9];case 8:return d(!1),[7/*endfinally*/];case 9:return[2/*return*/]}}))}))},icon:y().createElement(JD,{type:"authing-slideshow-3-line",style:{fontSize:16,marginRight:8,color:"#215AE5"}})},b("login.loginWithPasskey")))},XH=function(){return XH=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},XH.apply(this,arguments)},eW=function(e){var t,n=e.appId,r=e.config,o=e.enterpriseConnectionObjs,i=e.socialConnectionObjs,a=e.onLoginSuccess,s=e.onLoginFailed,c=!(null===(t=null==r?void 0:r.loginMethods)||void 0===t?void 0:t.length),l=aL(),u=iL(),d=null==u?void 0:u.userPoolId,f=_u().t,p=vj().isPhoneMedia,h=lL(),m=sL(),v=o.map((function(e){return y().createElement(OH,{key:e.identifier,i:e,appId:n,appHost:null==r?void 0:r.host,userPoolId:d,isHost:null==r?void 0:r.isHost})})),g=i.map((function(e){var t,o,i,a,s,u,d,v="authing-".concat(e.provider.replace(/:/g,"-")),g=xL(),b=l.getHeaders()["x-authing-device-id"],w=XH({from_guard:"1",app_id:n,guard_version:"Guard@".concat(g)},b&&{device_id:b});if(h&&(w.tenant_id=h),(null==r?void 0:r.isHost)&&(w.from_hosted_guard="1",m)){w.redirected="1";var C=UX();C&&(
|
|
28118
28123
|
// 如果 isHost 是 true,则从 url 获取 finish_login_url 作为 social.authorize 方法的 targetUrl 参数
|
|
28119
|
-
|
|
28124
|
+
w.redirect_url=null===(t=_H.parse(C.location.search))||void 0===t?void 0:t.finish_login_url)}var E=function(){var t,n;if(e.action===cj.Message)gC.error(f("login.socialConnectionMessage",{provider:null!==(n=null!==(t=e.displayName)&&void 0!==t?t:"zh-CN"===su.resolvedLanguage?e.name:e.name_en)&&void 0!==n?n:e.provider}));else if(e.action===cj.Auth){var o="".concat(r.host,"/connections/social/").concat(e.identifier,"?").concat(_H.stringify(w));w.redirected?window.location.replace(o):nX(o)}},k=r.socialConnectionsBtnShape;return"button"===k?y().createElement(Cj,{key:e.id,block:!0,size:"large",className:"g2-guard-third-login-btn",icon:y().createElement(JD,{type:"".concat(v,"-fill"),style:{fontSize:20,marginRight:8}}),onClick:E,style:{marginBottom:8}},null!==(i=null!==(o=e.displayName)&&void 0!==o?o:"zh-CN"===su.resolvedLanguage?e.name:e.name_en)&&void 0!==i?i:e.provider):"icon"===k?p?y().createElement(Cj,{className:"g2-social-login-item",onClick:E,icon:y().createElement(JD,{type:"".concat(v,"-fill")})}):y().createElement(fv,{key:e.id,title:(null===(a=e.tooltip)||void 0===a?void 0:a[su.resolvedLanguage])||e.name,trigger:["hover","click","contextMenu"]},y().createElement(Cj,{className:"g2-social-login-item",onClick:E,icon:y().createElement(JD,{type:"".concat(v,"-fill")})})):c?y().createElement(Cj,{key:e.id,block:!0,size:"large",className:"g2-guard-third-login-btn",icon:y().createElement(JD,{type:"".concat(v,"-fill"),style:{fontSize:20,marginRight:8}}),onClick:E},null!==(u=null!==(s=e.displayName)&&void 0!==s?s:"zh-CN"===su.resolvedLanguage?e.name:e.name_en)&&void 0!==u?u:e.provider):p?y().createElement(Cj,{className:"g2-social-login-item",onClick:E,key:e.id,icon:y().createElement(JD,{type:"".concat(v,"-fill")})}):y().createElement(fv,{overlayStyle:{fontFamily:"sans-serif"},key:e.id,title:e.displayName||(null===(d=e.tooltip)||void 0===d?void 0:d[su.resolvedLanguage])||e.name,trigger:["hover","click","contextMenu"]},y().createElement(Cj,{className:"g2-social-login-item",onClick:E,icon:y().createElement(JD,{type:"".concat(v,"-fill")})}))})),b=o.length?y().createElement(y().Fragment,null,!c&&y().createElement("div",{className:"g2-social-login-title"},su.t("login.otherLoginWay")),y().createElement("div",{className:"g2-social-login-list g2-enterprise-connection-space"},v)):null,w=g.length>0&&c?y().createElement(mP,{size:c?0:12,className:"g2-guard-full-width-space no-login-methods",direction:"vertical"},g):g.length>0&&y().createElement(y().Fragment,null,y().createElement("div",{className:"g2-social-login-title"},f("login.thridAccLogin")),y().createElement("div",{className:"g2-social-login-list g2-social-connection-space"},g)),C=y().createElement("div",{className:"g2-social-login-list",style:{marginTop:-8}},y().createElement(QH,{onLoginSuccess:a,onLoginFailed:s}));return y().createElement(y().Fragment,null,!c&&y().createElement("div",{style:{flex:1,minHeight:16}}),y().createElement(mP,{size:c?0:8,direction:"vertical",className:"g2-guard-full-width-space"},!(null==u?void 0:u.ssoPageComponentDisplay.idpBtns)||b,C,!(null==u?void 0:u.ssoPageComponentDisplay.socialLoginBtns)||w))},tW=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},nW=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},rW=y().useMemo,oW=y().useCallback,iW=function(e){var t=e.lists,n=e.handleDel,r=e.onClick,o=_u().t,i=vj().isPhoneMedia,a=rW((function(){return i?"click":"hover"}),[i]),s=rW((function(){return nW(nW([],tW(t),!1),[{operation:!1,id:"other",title:o("login.useOtherAccount"),element:y().createElement("div",{className:"g2-multiple__icon--add-line"},y().createElement(JD,{style:{fontSize:24,color:"#4E5969"},type:"authing-add-line"}))}],!1)}),[t,o]),c=oW((function(e,t){n(t),e.stopPropagation()}),[n]),l=rW((function(){return s.map((function(e){var t=e,n=t.photo,i=t.title,s=t.description,l=t.id,u=t.operation,d=void 0===u||u,f=t.element;return y().createElement("li",{className:"g2-multiple__li",key:l,onClick:function(){return r(l)}},f||y().createElement("img",{className:"g2-multiple__avatar",alt:"",src:n}),y().createElement("section",{className:"g2-multiple__body"},i&&y().createElement("span",{className:"g2-multiple__title"},i),y().createElement("span",{className:i?"g2-multiple__desc":"g2-multiple__title"},s)),d&&y().createElement("span",{className:"g2-multiple__op",onClick:function(e){return e.stopPropagation()}},y().createElement(vv,{trigger:a,overlayClassName:"g2-multiple__op-wrapper",getPopupContainer:function(e){return e},content:y().createElement("div",{className:"g2-multiple__del",onClick:function(e){return c(e,l)}},y().createElement(JD,{style:{fontSize:20,marginRight:8},type:"authing-indeterminate-circle-line"}),o("common.del"))},y().createElement("div",{className:"g2-multiple__icon"},y().createElement(JD,{type:"authing-more-fill"})))))}))}),[s,r,c,o,a]);return y().createElement("ul",{className:"g2-multiple"},l)},aW=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},sW=y().useCallback,cW=y().useState,lW=y().memo((function(e){var t=aW(cW(0),2)[1],n=e.multipleInstance,r=e.referMultipleState,o=null==n?void 0:n.getMemoUser(),i=sW((function(){return t(Math.random)}),[]);if(!o)
|
|
28120
28125
|
// 这里应该额外处理下 其实本质上应该是存在的
|
|
28121
28126
|
return null;
|
|
28122
28127
|
/**
|
|
@@ -28127,15 +28132,15 @@ var t=null==n?void 0:n.getMemoSingleUser(e);null==r||r("login",t)},handleDel:fun
|
|
|
28127
28132
|
// 7.15: 如果仅剩一个需求跳转
|
|
28128
28133
|
null==r||r("login"):i()}})})),uW=function(){return uW=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},uW.apply(this,arguments)},dW=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},fW=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},pW=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},hW=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},mW=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},vW=y().useCallback,gW=y().useRef,yW=function(){var e=gW(null),t=mW(cT.useForm(),1)[0],n=fL(),r=JL(),o=vW((function(t){return pW(void 0,void 0,void 0,(function(){var o,i,a,s,c,l,u,d,f;return hW(this,(function(p){switch(p.label){case 0:return p.trys.push([0,2,,3]),[4/*yield*/,(h="reset-username-before-auth"/* ResetAccountBusinessAction.ResetName */,m=t,dW(void 0,void 0,void 0,(function(){return fW(this,(function(e){switch(e.label){case 0:return[4/*yield*/,(0,eX().authFlow)(h,uW({},m))];case 1:return[2/*return*/,e.sent()]}}))})))];case 1:return o=p.sent(),i=o.apiCode,a=o.onGuardHandling,s=o.message,c=o.isFlowEnd,l=o.data,null===(u=e.current)||void 0===u||u.onSpin(!1),c?null===(d=null==n?void 0:n.onLogin)||void 0===d||d.call(n,l,r):i===TQ.RESET_ACCOUNT_NAME?
|
|
28129
28134
|
// 用户名重复
|
|
28130
|
-
gC.error(s):(null===(f=e.current)||void 0===f||f.onError(),null==a||a()),[3/*break*/,3];case 2:return p.sent(),[3/*break*/,3];case 3:return[2/*return*/]}var h,m}))}))}),[r,n]);return y().createElement("div",{className:"g2-view-reset-username"},y().createElement("div",{className:"g2-view-reset-username__title"},su.t("common.resetAccount.title")),y().createElement(cT,{name:"passworLogin",onFinish:o,onFinishFailed:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.onError()},autoComplete:"off",form:t},y().createElement(
|
|
28135
|
+
gC.error(s):(null===(f=e.current)||void 0===f||f.onError(),null==a||a()),[3/*break*/,3];case 2:return p.sent(),[3/*break*/,3];case 3:return[2/*return*/]}var h,m}))}))}),[r,n]);return y().createElement("div",{className:"g2-view-reset-username"},y().createElement("div",{className:"g2-view-reset-username__title"},su.t("common.resetAccount.title")),y().createElement(cT,{name:"passworLogin",onFinish:o,onFinishFailed:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.onError()},autoComplete:"off",form:t},y().createElement(oU.UserName,null,y().createElement(oO,{className:"authing-g2-input",size:"large",prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}}),placeholder:su.t("login.inputUsername")})),y().createElement(cT.Item,{className:"authing-g2-sumbit-form"},y().createElement(Tj,{text:su.t("common.sure"),className:"password",ref:e}))))},bW=function(){return bW=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bW.apply(this,arguments)},wW=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},CW=y().useMemo,EW=function(e){var t=e.methods,n=wW(e,["methods"]),r=iL(),o=_u().t,i=CW((function(){var e;return{"email-code":{t:o("common.email"),sort:2},"phone-code":{t:(null===(e=null==r?void 0:r.internationalSmsConfig)||void 0===e?void 0:e.enabled)?o("common.areaCodePhone"):o("common.phoneNumber"),sort:1}}}),[r,o]),a=CW((function(){return o("login.inputAccount",{text:null==t?void 0:t.map((function(e){return i[e]})).sort((function(e,t){return e.sort-t.sort})).map((function(e){return e.t})).join(" / ")})}),[t,o,i]),s=CW((function(){return 1===t.length&&"phone-code"===t[0]?y().createElement(VU,bW({maxLength:11,placeholder:a},n)):y().createElement(oO,bW({placeholder:a},n,{prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}})}))}),[n,t,a]);return y().createElement(y().Fragment,null,s)},kW=function(){return kW=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},kW.apply(this,arguments)},SW=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},xW=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},_W=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},PW=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};!function(e){e.Phone="phone",e.Email="email"}(GH||(GH={}));var TW=y().useCallback,OW=y().useEffect,NW=y().useMemo,IW=y().useRef,AW=y().useState,RW=function(e){var t,n,r,o=iL(),i=hL(),a=uL(),s=a._firstItemInitialValue,c=void 0===s?"":s,l=a.specifyDefaultLoginMethod,u=a._lockMethod,d=e.agreements,f=e.methods,p=e.autoRegister,h=e.submitButText,m=e.onLoginFailed,v=e.onLoginSuccess,g=e.saveIdentify,b=e.multipleInstance,w=e.backfillData,C=e.specifyCodeMethod,E=e.loginHint,k=null!==(t=null==o?void 0:o.verifyCodeLength)&&void 0!==t?t:4,S=aL().post,x=vj().isPhoneMedia,_=(null===(n=null==o?void 0:o.internationalSmsConfig)||void 0===n?void 0:n.enabled)||!1,P=IW(!1),T=IW([]),O=_W(AW(!1),2),N=O[0],I=O[1],A=_W(AW(""),2),R=A[0],M=A[1],D=_W(AW(l&&null!=u?u:f[0]),2),L=D[0],F=D[1],j=_W(AW(!1),2),B=j[0],U=j[1],q=_W(AW(!1),2),V=q[0],z=q[1],$=_W(AW((null===(r=null==o?void 0:o.internationalSmsConfig)||void 0===r?void 0:r.defaultISOType)||"CN"),2),H=$[0],W=$[1],G=wL("login"),K=_W(AW(""),2),Y=K[0],J=K[1],Z=_W(cT.useForm(),1)[0],Q=TW((function(e){1!==f.length&&(uX("email",e)?F(Pc.EmailCode):
|
|
28131
28136
|
// 放开手机号校验 方便同时开启邮箱和短信国际化手机号通过
|
|
28132
|
-
F(Pc.PhoneCode))}),[f.length]),X=TW((function(e){M(e),Q(e)}),[Q]);
|
|
28137
|
+
F(Pc.PhoneCode))}),[f.length]),X=TW((function(e){M(e),Q(e)}),[Q]);jz({form:Z,way:f,formKey:"identify",backfillData:w,isOnlyInternationSms:B,setAreaCode:W,cancelBackfill:l===Vs.PhoneCode,changeCurrentMethod:X,loginHint:E});var ee=IW(null),te=_u().t,ne=TW((function(e){return B?y().createElement(JU,kW({},e,{form:Z,fieldName:"identify",className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:te("common.inputFourVerifyCode",{length:k}),areaCode:H,prefix:y().createElement(JD,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),isInternationSms:_,scene:Ni.SCENE_TYPE_LOGIN,maxLength:k,onSendCodeBefore:function(){return SW(void 0,void 0,void 0,(function(){return xW(this,(function(e){switch(e.label){case 0:return[4/*yield*/,Z.validateFields(["identify"])];case 1:return e.sent(),[4/*yield*/,Z.validateFields(["captchaCode"])];case 2:return e.sent(),[2/*return*/]}}))}))},onSendCodeAfter:function(){J(Uz(i.host))}})):y().createElement(y().Fragment,null,L===Pc.PhoneCode&&y().createElement(JU,kW({},e,{isInternationSms:_,className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:te("common.inputFourVerifyCode",{length:k}),areaCode:H,prefix:y().createElement(JD,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:Ni.SCENE_TYPE_LOGIN,maxLength:k,form:Z,fieldName:"identify",data:R,codeFieldName:"captchaCode",onSendCodeBefore:function(){return SW(void 0,void 0,void 0,(function(){return xW(this,(function(e){switch(e.label){case 0:return[4/*yield*/,Z.validateFields(["identify"])];case 1:return e.sent(),[4/*yield*/,Z.validateFields(["captchaCode"])];case 2:return e.sent(),[2/*return*/]}}))}))},onSendCodeAfter:function(){J(Uz(i.host))}})),L===Pc.EmailCode&&y().createElement(Fq,kW({},e,{className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:te("common.inputFourVerifyCode",{length:k}),prefix:y().createElement(JD,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),form:Z,fieldName:"identify",scene:Oc.LOGIN_VERIFY_CODE,maxLength:k,data:R,onSendCodeBefore:function(){return SW(void 0,void 0,void 0,(function(){return xW(this,(function(e){switch(e.label){case 0:return[4/*yield*/,Z.validateFields(["identify"])];case 1:return e.sent(),[2/*return*/]}}))}))}})))}),[H,L,Z,R,_,B,te,k]);OW((function(){var e;
|
|
28133
28138
|
// 开启国际化配置且登录方式为手机号码时
|
|
28134
|
-
(1===f.length&&"phone-code"===f[0]&&(null===(e=null==o?void 0:o.internationalSmsConfig)||void 0===e?void 0:e.enabled)||C===
|
|
28139
|
+
(1===f.length&&"phone-code"===f[0]&&(null===(e=null==o?void 0:o.internationalSmsConfig)||void 0===e?void 0:e.enabled)||C===GH.Phone)&&(U(!0),F(Pc.PhoneCode)),
|
|
28135
28140
|
// 指定了只用邮箱验证码
|
|
28136
|
-
C===
|
|
28141
|
+
C===GH.Email&&(z(!0),F(Pc.EmailCode))}),[o,f,C]),OW((function(){
|
|
28137
28142
|
/** 如果是国外用户池,那么有图形验证码,需要请求图片 */
|
|
28138
|
-
G&&J(
|
|
28143
|
+
G&&J(Uz(i.host))}),[G,null==i?void 0:i.host]),OW((function(){
|
|
28139
28144
|
// 方法发生变化时,图像验证码数据应该清空
|
|
28140
28145
|
G&&(null==Z||Z.setFieldsValue({captchaCode:void 0}))}),[Z,L,G]);var re=function(e){return SW(void 0,void 0,void 0,(function(){var t,n,r,a,s,c,l,u,f,h;return xW(this,(function(g){switch(g.label){case 0:return t=yX()||[],n=t.reduce((function(e,t){return e[t.key]=t.value,e}),{}),r={phone:e.phoneNumber,code:e.code,customData:(null==i?void 0:i.isHost)?n:void 0,autoRegister:p,withCustomData:!1,agreementIds:d.length?T.current:void 0},o&&(null===(f=o.internationalSmsConfig)||void 0===f?void 0:f.enabled)&&(r.phoneCountryCode=e.phoneCountryCode),[4/*yield*/,S("/api/v2/login/phone-code",r)];case 1:return a=g.sent(),s=a.code,c=a.data,l=a.onGuardHandling,u=a.message,null===(h=ee.current)||void 0===h||h.onSpin(!1),200===s?
|
|
28141
28146
|
// props.onLogin(200, data)
|
|
@@ -28147,7 +28152,7 @@ v(s):
|
|
|
28147
28152
|
// 向上层抛出错误
|
|
28148
28153
|
(null==c?void 0:c())===PQ.RENDER_MESSAGE&&m(a,s,l),[2/*return*/]}}))}))},ie=NW((function(){var e,t;return h||(p&&!o.registerDisabled&&(null===(t=null===(e=i.registerMethods)||void 0===e?void 0:e.filter((function(e){
|
|
28149
28154
|
// @ts-ignore
|
|
28150
|
-
return[Ws.Phone,Ws.EmailCode].includes(e)})))||void 0===t?void 0:t.length)?"".concat(te("common.login")," / ").concat(te("common.register")):te("common.login"))}),[p,h,te,i.registerMethods,o.registerDisabled]),ae=TW((function(e){return y().createElement(
|
|
28155
|
+
return[Ws.Phone,Ws.EmailCode].includes(e)})))||void 0===t?void 0:t.length)?"".concat(te("common.login")," / ").concat(te("common.register")):te("common.login"))}),[p,h,te,i.registerMethods,o.registerDisabled]),ae=TW((function(e){return y().createElement(Hq,kW({},e,{className:"authing-g2-input",size:"large",areaCode:H,onAreaCodeChange:function(e){W(e),Z.getFieldValue(["identify"])&&Z.validateFields(["identify"])}}))}),[H,Z]),se=Vc();
|
|
28151
28156
|
// 邮箱验证码登录
|
|
28152
28157
|
return y().createElement("div",{className:"authing-g2-login-phone-code"},y().createElement(cT,{name:"phoneCode",form:Z,onFinish:function(t){return SW(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,c,l,u,f,p,h,g,y,w;return xW(this,(function(C){switch(C.label){case 0:return I(!0),(null==d?void 0:d.length)&&!P.current?(
|
|
28153
28158
|
// message.error(t('common.loginProtocolTips'))
|
|
@@ -28157,14 +28162,14 @@ null===(p=ee.current)||void 0===p||p.onSpin(!0),i={type:L,data:{identity:L===Pc.
|
|
|
28157
28162
|
// 向上层抛出错误 执行绑定失败钩子
|
|
28158
28163
|
(null==u?void 0:u())===PQ.RENDER_MESSAGE&&m(null!=c?c:s,l,f),[2/*return*/];case 3:
|
|
28159
28164
|
// 其实这里应该是保存两个 一个是 countryCode 一个是对应的 code
|
|
28160
|
-
return b&&b.setLoginWay("input","phone-code"===L?"phone-code":"email-code",void 0,_?{phoneCountryCode:o,areaCode:H}:void 0),"phone-code"!==L?[3/*break*/,5]:[4/*yield*/,re(kW(kW({},t),{phoneNumber:r,phoneCountryCode:o}))];case 4:return C.sent(),[3/*break*/,7];case 5:return[4/*yield*/,oe(t)];case 6:C.sent(),C.label=7;case 7:return[2/*return*/]}}))}))},onFinishFailed:function(){return ee.current.onError()},autoComplete:"off",onValuesChange:function(e){(null==e?void 0:e.identify)&&g&&g(Vs.PhoneCode,null==e?void 0:e.identify)}},y().createElement(
|
|
28165
|
+
return b&&b.setLoginWay("input","phone-code"===L?"phone-code":"email-code",void 0,_?{phoneCountryCode:o,areaCode:H}:void 0),"phone-code"!==L?[3/*break*/,5]:[4/*yield*/,re(kW(kW({},t),{phoneNumber:r,phoneCountryCode:o}))];case 4:return C.sent(),[3/*break*/,7];case 5:return[4/*yield*/,oe(t)];case 6:C.sent(),C.label=7;case 7:return[2/*return*/]}}))}))},onFinishFailed:function(){return ee.current.onError()},autoComplete:"off",onValuesChange:function(e){(null==e?void 0:e.identify)&&g&&g(Vs.PhoneCode,null==e?void 0:e.identify)}},y().createElement(VV,{initialValue:l===Vs.PhoneCode?c:"phone"!==C&&_||!se?"":se,name:"identify",className:B?"authing-g2-input-form remove-padding":"authing-g2-input-form",methods:f,checkExist:!p,currentMethod:L,areaCode:H},B?y().createElement(ae,{autoFocus:!x}):y().createElement(EW,{className:"authing-g2-input",size:"large",autoFocus:!x,value:R,methods:V?["email-code"]:f,onChange:function(e){var t=e.target.value;Q(t)},onBlur:function(e){var t=e.target.value;Q(t)},prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),G&&L===Pc.PhoneCode&&y().createElement(cT.Item,{className:"authing-g2-input-form",validateTrigger:["onBlur","onChange"],name:"captchaCode",rules:dX(te("common.captchaCode"))},y().createElement(kz,{className:"authing-g2-input",size:"large",placeholder:te("login.inputCaptchaCode"),verifyCodeUrl:Y,changeCode:function(){return J(Uz(i.host))}})),y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"code",rules:PW([],_W(dX(te("common.captchaCode"))),!1)},y().createElement(ne,null)),Boolean(null==d?void 0:d.length)&&y().createElement(Iz,{
|
|
28161
28166
|
// onChange={val => {
|
|
28162
28167
|
// acceptedAgreements.current = val
|
|
28163
28168
|
// }}
|
|
28164
28169
|
onChange:function(e,t){P.current=e,T.current=t},agreements:d,showError:N}),y().createElement(cT.Item,{className:"authing-g2-sumbit-form"},y().createElement(Tj,{text:ie,className:"password",ref:ee}))))};// CONCATENATED MODULE: ./src/Login/core/withAuthingOtpPush/PushLoginGuideSelector.tsx
|
|
28165
28170
|
function MW(e){var t=e.defaultValue,n=e.onChange,r=e.options;return y().createElement(lI,{defaultValue:t,onChange:n,options:r,dropdownMatchSelectWidth:!1,showArrow:!0})}// CONCATENATED MODULE: ./src/LazyloadImage/index.tsx
|
|
28166
28171
|
var DW=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},LW=y().useEffect,FW=y().useState;function jW(e){var t=e.src,n=e.placeholder,r=e.className,o=e.style,i=e.alt,a=e.width,s=e.height,c=DW(FW(!1),2),l=c[0],u=c[1],d=new Image(0,0);return d.src=t,LW((function(){d.onload=function(){u(!0)}})),y().createElement(y().Fragment,null,l&&y().createElement("img",{src:t,width:a,height:s,className:r,style:o,alt:i})||n)}// CONCATENATED MODULE: ./src/Login/core/withAuthingOtpPush/HowBindClient.tsx
|
|
28167
|
-
var BW=y().useMemo;function UW(){var e=_u().t,t=hL(),n=iL(),r=cL(),o=BW((function(){var e={appId:r,appHost:t.host,scene:"APP_OPTIONS",userPoolId:n.userPoolId};return JSON.stringify(e)}),[t,r]);return y().createElement(y().Fragment,null,y().createElement("div",{className:"guide-step"},y().createElement("div",{className:"title"},y().createElement("span",{className:"dot"}),y().createElement("span",null,"1. ",e("login.installAuthingToken"))),y().createElement("div",{className:"desc"},e("login.downloadAuthingToken")),y().createElement("div",{className:"qrcode-container space-between"},y().createElement("div",{className:"qrcode-app grey-bg"},y().createElement(jW,{src:"https://cdn.authing.co/authing-assets/qrcode-download-android.png",placeholder:y().createElement(CI,null),className:"qrcode-verifier download-app",alt:e("login.downloadAndroid")}),y().createElement("div",{className:"qrcode-tips"},e("login.downloadAndroid"))),y().createElement("div",{className:"qrcode-app grey-bg"},y().createElement(jW,{src:"https://cdn.authing.co/authing-assets/qrcode-download-ios.png",placeholder:y().createElement(CI,null),className:"qrcode-verifier download-app",alt:e("login.downloadIOS")}),y().createElement("div",{className:"qrcode-tips"},e("login.downloadIOS"))))),y().createElement("div",{className:"guide-step"},y().createElement("div",{className:"title"},y().createElement("span",{className:"dot"}),y().createElement("span",null,"2. ",e("login.openAppList"))),y().createElement("div",{className:"desc"},e("login.addApp")),y().createElement(jW,{src:"https://files.authing.co/authing-guard/push-login-open-application-list.svg",placeholder:y().createElement(CI,null),className:"qrcode-verifier",alt:e("login.downloadIOS")})),y().createElement("div",{className:"guide-step"},y().createElement("div",{className:"title"},y().createElement("span",{className:"dot"}),y().createElement("span",null,"3. ",e("login.openLoginPage"))),y().createElement("div",{className:"desc"},e("login.scanQrcode")),y().createElement(jW,{src:"https://files.authing.co/authing-guard/push-login-open-application.svg",placeholder:y().createElement(CI,null),className:"qrcode-verifier",alt:e("login.downloadIOS")})),y().createElement("div",{className:"guide-step"},y().createElement("div",{className:"title"},y().createElement("span",{className:"dot"}),y().createElement("span",null,"4. ",e("login.scanFollowingQrcode"))),y().createElement("div",{className:"qrcode-container center grey-bg",style:{marginTop:"16px",padding:"25px 0",boxSizing:"border-box"}},y().createElement(
|
|
28172
|
+
var BW=y().useMemo;function UW(){var e=_u().t,t=hL(),n=iL(),r=cL(),o=BW((function(){var e={appId:r,appHost:t.host,scene:"APP_OPTIONS",userPoolId:n.userPoolId};return JSON.stringify(e)}),[t,r]);return y().createElement(y().Fragment,null,y().createElement("div",{className:"guide-step"},y().createElement("div",{className:"title"},y().createElement("span",{className:"dot"}),y().createElement("span",null,"1. ",e("login.installAuthingToken"))),y().createElement("div",{className:"desc"},e("login.downloadAuthingToken")),y().createElement("div",{className:"qrcode-container space-between"},y().createElement("div",{className:"qrcode-app grey-bg"},y().createElement(jW,{src:"https://cdn.authing.co/authing-assets/qrcode-download-android.png",placeholder:y().createElement(CI,null),className:"qrcode-verifier download-app",alt:e("login.downloadAndroid")}),y().createElement("div",{className:"qrcode-tips"},e("login.downloadAndroid"))),y().createElement("div",{className:"qrcode-app grey-bg"},y().createElement(jW,{src:"https://cdn.authing.co/authing-assets/qrcode-download-ios.png",placeholder:y().createElement(CI,null),className:"qrcode-verifier download-app",alt:e("login.downloadIOS")}),y().createElement("div",{className:"qrcode-tips"},e("login.downloadIOS"))))),y().createElement("div",{className:"guide-step"},y().createElement("div",{className:"title"},y().createElement("span",{className:"dot"}),y().createElement("span",null,"2. ",e("login.openAppList"))),y().createElement("div",{className:"desc"},e("login.addApp")),y().createElement(jW,{src:"https://files.authing.co/authing-guard/push-login-open-application-list.svg",placeholder:y().createElement(CI,null),className:"qrcode-verifier",alt:e("login.downloadIOS")})),y().createElement("div",{className:"guide-step"},y().createElement("div",{className:"title"},y().createElement("span",{className:"dot"}),y().createElement("span",null,"3. ",e("login.openLoginPage"))),y().createElement("div",{className:"desc"},e("login.scanQrcode")),y().createElement(jW,{src:"https://files.authing.co/authing-guard/push-login-open-application.svg",placeholder:y().createElement(CI,null),className:"qrcode-verifier",alt:e("login.downloadIOS")})),y().createElement("div",{className:"guide-step"},y().createElement("div",{className:"title"},y().createElement("span",{className:"dot"}),y().createElement("span",null,"4. ",e("login.scanFollowingQrcode"))),y().createElement("div",{className:"qrcode-container center grey-bg",style:{marginTop:"16px",padding:"25px 0",boxSizing:"border-box"}},y().createElement(j$,{size:80,value:o,style:{padding:"5px",backgroundColor:"#fff"}}))),y().createElement("div",{className:"guide-step"},y().createElement("div",{className:"title"},y().createElement("span",{className:"dot"}),y().createElement("span",null,"5. ",e("login.relevanceApp"))),y().createElement("div",{className:"desc"},e("login.receiveMessageFromAuthingToken")),y().createElement("div",{className:"qrcode-container center grey-bg"},y().createElement(jW,{src:"https://files.authing.co/authing-guard/push-login-relevance-application.svg",placeholder:y().createElement(CI,null),className:"qrcode-verifier",alt:e("login.receiveMessageFromAuthingToken")}))))}// CONCATENATED MODULE: ./src/Login/core/withAuthingOtpPush/HowUsePushLogin.tsx
|
|
28168
28173
|
function qW(){var e=_u().t;return y().createElement(y().Fragment,null,y().createElement("div",{className:"guide-step"},y().createElement("div",{className:"title"},y().createElement("span",{className:"dot"}),y().createElement("span",null,"1. ",e("login.inputAccountInWeb"))),y().createElement("div",{className:"desc"},e("login.clickLoginButton")),y().createElement("div",{className:"qrcode-container center grey"},y().createElement(jW,{src:"https://files.authing.co/authing-guard/push-login-input-account.svg",placeholder:y().createElement(CI,null),className:"qrcode-verifier",alt:e("login.clickLoginButton")}))),y().createElement("div",{className:"guide-step"},y().createElement("div",{className:"title"},y().createElement("span",{className:"dot"}),y().createElement("span",null,"2. ",e("login.receiveMessageInApp"))),y().createElement("div",{className:"desc"},e("login.confirmLoginInApp")),y().createElement("div",{className:"qrcode-container center grey"},y().createElement(jW,{src:"https://files.authing.co/authing-guard/push-login-receive-message-in-app.svg",placeholder:y().createElement(CI,null),className:"qrcode-verifier",alt:e("login.confirmLoginInApp")}))))}// CONCATENATED MODULE: ./src/Login/core/withAuthingOtpPush/HowGetAppLoginUrl.tsx
|
|
28169
28174
|
function VW(){var e=_u().t;return y().createElement(y().Fragment,null,y().createElement("div",{className:"guide-step"},y().createElement("div",{className:"title"},y().createElement("span",{className:"dot"}),y().createElement("span",null,"1. ",e("login.getCodeFromAdmin"))),y().createElement("div",{className:"desc"},e("login.getCodeFromAdminTips")),y().createElement("div",{className:"qrcode-container center grey"},y().createElement(jW,{src:"https://files.authing.co/authing-guard/push-login-get-associated-qrcode-from-admin.svg",placeholder:y().createElement(CI,null),className:"qrcode-verifier",alt:e("login.getCodeFromAdmin")}))),y().createElement("div",{className:"guide-step"},y().createElement("div",{className:"title"},y().createElement("span",{className:"dot"}),y().createElement("span",null,"2. ",e("login.getCodeFromPersonalCenter"))),y().createElement("div",{className:"desc"},e("login.getCodeFromPersonalCenterTips")),y().createElement("div",{className:"qrcode-container center grey"},y().createElement(jW,{src:"https://files.authing.co/authing-guard/push-login-get-code-from-personal.svg",placeholder:y().createElement(CI,null),className:"qrcode-verifier",alt:e("login.getCodeFromPersonalCenter")}))),y().createElement("div",{className:"guide-step"},y().createElement("div",{className:"title"},y().createElement("span",{className:"dot"}),y().createElement("span",null,"3. ",e("login.getLoginUrlFromConsole"))),y().createElement("div",{className:"desc"},e("login.getLoginUrlFromConsoleTips")),y().createElement("div",{className:"qrcode-container center grey"},y().createElement(jW,{src:"https://files.authing.co/authing-guard/push-login-get-login-url-from-console.png",placeholder:y().createElement(CI,null),className:"qrcode-verifier",alt:e("login.getLoginUrlFromConsole")}))))}// CONCATENATED MODULE: ./src/Login/core/withAuthingOtpPush/PushLoginGuideModal.tsx
|
|
28170
28175
|
var zW=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},$W=y().useMemo,HW=y().useState;function WW(e){var t=e.visible,n=e.onClose,r=_u().t,o=r("login.howBindClient"),i=r("login.howGetAppLoginUrl"),a=r("login.howUsePushLogin"),s=zW(HW("howUsePushLogin"),2),c=s[0],l=s[1],u=vj().isPhoneMedia,d=$W((function(){return[{value:"howUsePushLogin",label:a},{value:"howBindClient",label:o},{value:"howGetAppLoginUrl",label:i}]}),[a,o,i]),f={howBindClient:y().createElement(UW,null),howGetAppLoginUrl:y().createElement(VW,null),howUsePushLogin:y().createElement(qW,null)};return y().createElement(zS,{title:y().createElement(MW,{defaultValue:"howUsePushLogin",onChange:function(e){var t=d.find((function(t){return t.value===e}));t&&l(t.value)},options:d}),placement:"right",onClose:n,open:t,width:u?"375":"640",closeIcon:y().createElement(JD,{type:"authing-close-line"})},f[c])}// CONCATENATED MODULE: ./src/Login/core/withAuthingOtpPush/BeforeLogin.tsx
|
|
@@ -28172,31 +28177,31 @@ var GW=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e)
|
|
|
28172
28177
|
// 登录注册合并
|
|
28173
28178
|
return(null==u?void 0:u.autoRegister)?l("login.inputAccount",{text:DX(t,x,f)}):l("login.inputAccount",{text:DX(JW([],YW(t),!1),x,f)});
|
|
28174
28179
|
// 登录注册分页
|
|
28175
|
-
}),[null==u?void 0:u.autoRegister,x,f,null===(t=d.authingOtpPushTabConfig)||void 0===t?void 0:t.validLoginMethods,l]);return y().createElement("div",null,!i&&y().createElement("div",{className:"push-login-error-tips-container"},y().createElement("div",{className:"push-login-error-warning-box"},y().createElement(JD,{type:"authing-error-warning-fill1",className:"icon-push-login-error-warning"}),y().createElement("div",null,l("login.getOtpLoginRequestAgain"))),y().createElement("div",{onClick:e.onchangePushLoginStatus},y().createElement(JD,{type:"authing-close-line",className:"close-line"}))),y().createElement(cT,{onFinish:function(e){return GW(n,void 0,void 0,(function(){return KW(this,(function(t){return function(e){GW(n,void 0,void 0,(function(){var t,n,i,c;return KW(this,(function(u){switch(u.label){case 0:return k(!0),(null==s?void 0:s.length)&&!m?(null==S||S.current.onError(),[2/*return*/]):e?[4/*yield*/,o({account:e,agreementIds:s.length?b:void 0})]:[2/*return*/,gC.error(l("login.enterAccount"))];case 1:return t=u.sent(),n=t.statusCode,i=t.message,c=t.data,200===n?(a(e),r({pushCodeId:(null==c?void 0:c.pushCodeId)||""})):gC.error(i),[2/*return*/]}}))}))}(e.account),[2/*return*/]}))}))},form:p},y().createElement(cT.Item,{name:"account"},y().createElement(oO,{className:"authing-g2-input",autoComplete:"off",size:"large",autoFocus:!c,placeholder:O,prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),Boolean(null==s?void 0:s.length)&&y().createElement(
|
|
28180
|
+
}),[null==u?void 0:u.autoRegister,x,f,null===(t=d.authingOtpPushTabConfig)||void 0===t?void 0:t.validLoginMethods,l]);return y().createElement("div",null,!i&&y().createElement("div",{className:"push-login-error-tips-container"},y().createElement("div",{className:"push-login-error-warning-box"},y().createElement(JD,{type:"authing-error-warning-fill1",className:"icon-push-login-error-warning"}),y().createElement("div",null,l("login.getOtpLoginRequestAgain"))),y().createElement("div",{onClick:e.onchangePushLoginStatus},y().createElement(JD,{type:"authing-close-line",className:"close-line"}))),y().createElement(cT,{onFinish:function(e){return GW(n,void 0,void 0,(function(){return KW(this,(function(t){return function(e){GW(n,void 0,void 0,(function(){var t,n,i,c;return KW(this,(function(u){switch(u.label){case 0:return k(!0),(null==s?void 0:s.length)&&!m?(null==S||S.current.onError(),[2/*return*/]):e?[4/*yield*/,o({account:e,agreementIds:s.length?b:void 0})]:[2/*return*/,gC.error(l("login.enterAccount"))];case 1:return t=u.sent(),n=t.statusCode,i=t.message,c=t.data,200===n?(a(e),r({pushCodeId:(null==c?void 0:c.pushCodeId)||""})):gC.error(i),[2/*return*/]}}))}))}(e.account),[2/*return*/]}))}))},form:p},y().createElement(cT.Item,{name:"account"},y().createElement(oO,{className:"authing-g2-input",autoComplete:"off",size:"large",autoFocus:!c,placeholder:O,prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),Boolean(null==s?void 0:s.length)&&y().createElement(Iz,{agreements:s,showError:E,onChange:function(e,t){v(e),w(t)}}),y().createElement(cT.Item,{className:"authing-g2-sumbit-form"},y().createElement(Tj,{text:l("login.loginText"),htmlType:"submit",ref:S}))),y().createElement("div",{className:"how-use-push-login",onClick:function(){T(!0)}},l("login.howUsePushLogin"),"?"),y().createElement(WW,{visible:P,onClose:function(){T(!1)}}))}// CONCATENATED MODULE: ./src/Login/core/withAuthingOtpPush/PendingLogin.tsx
|
|
28176
28181
|
function tG(e){var t=_u().t;return y().createElement(y().Fragment,null,y().createElement("div",{className:"pending-tips"},y().createElement("div",{className:"code-success"},y().createElement(JD,{type:"authing-checkbox-circle-fill"})),y().createElement("div",null,t("login.otpLoginPendingText"))),y().createElement(cT,null,y().createElement(cT.Item,{className:"authing-g2-sumbit-form"},y().createElement(ly,{block:!0,style:{width:"348px",height:"44px",background:"#F2F3F5",borderRadius:"4px",border:"none"},onClick:function(){e.onCancelLogin()}},t("login.authingOtpPushCancelLogin")))))}// CONCATENATED MODULE: ./src/Login/core/withAuthingOtpPush/index.tsx
|
|
28177
28182
|
var nG=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},rG=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},oG=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},iG=y().useCallback,aG=y().useEffect,sG=y().useRef,cG=y().useState;function lG(e){var t=this,n=e.onLoginSuccess,r=e.multipleInstance,o=e.agreements,i=oG(cG("before"),2),a=i[0],s=i[1],c=oG(cG(""),2),l=c[0],u=c[1],d=oG(cG(!0),2),f=d[0],p=d[1],h=sG(),m=oG(cG(""),2),v=m[0],g=m[1],b=function(){h.current&&clearInterval(h.current)},w=tX(),C=w.post,E=w.get,k=iL(),S=iG((function(){b(),s("before")}),[]),x=iG((function(e){void 0===e&&(e=!0),p(e)}),[]),_=iG((function(e){return nG(t,void 0,void 0,(function(){var t,n;return rG(this,(function(r){switch(r.label){case 0:return t=e.pushCodeId,n="/api/v3/check-pushcode-status?pushCodeId=".concat(t),[4/*yield*/,E(n)];case 1:return[2/*return*/,r.sent()]}}))}))}),[E]),P=iG((function(e){return nG(t,void 0,void 0,(function(){var t;return rG(this,(function(n){switch(n.label){case 0:return"/api/v2/users/me/info",t={headers:{"x-authing-userpool-id":k.userPoolId,authorization:"Bearer ".concat(e)}},[4/*yield*/,E("/api/v2/users/me/info",{},t)];case 1:return[2/*return*/,n.sent()]}}))}))}),[E,k.userPoolId]),T=function(){return nG(t,void 0,void 0,(function(){var e,t,o,i,a,s,c,u,d;return rG(this,(function(f){switch(f.label){case 0:return[4/*yield*/,_({pushCodeId:l})];case 1:return e=f.sent(),t=e.statusCode,o=e.data,i=e.message,200!==t?(gC.error(i),S(),[2/*return*/]):"AUTHORIZED"!==o.status?[3/*break*/,3]:(a=o.tokenSet.access_token,b(),[4/*yield*/,P(a)]);case 2:if(s=f.sent(),c=s.code,u=s.data,d=s.message,200===c)return null==r||r.setLoginWay("input",Vs.AuthingOtpPush),n(u,d),[2/*return*/];f.label=3;case 3:return"PUSHED"!==o.status&&(p(!1),S()),[2/*return*/]}}))}))};aG((function(){if(l)return h.current=setInterval(T,1e3),function(){b()}}),[l,_,P,n,S]);var O={before:y().createElement(eG,{defaultAccount:v,setAccount:g,onPushSuccess:function(e){s("pending"),u(e.pushCodeId)},signinByPush:function(e){return nG(t,void 0,void 0,(function(){var t,n;return rG(this,(function(r){switch(r.label){case 0:return t=e.account,n=e.agreementIds,"/api/v3/signin-by-push",[4/*yield*/,C("/api/v3/signin-by-push",{account:t,agreementIds:n})];case 1:return[2/*return*/,r.sent()]}}))}))},pushLoginStatus:f,onchangePushLoginStatus:x,agreements:o}),pending:y().createElement(tG,{onCancelLogin:S})};return y().createElement("div",null,O[a])}// CONCATENATED MODULE: ./src/Login/socialLogin/postMessage.ts
|
|
28178
28183
|
// 处理所有使用 postMessage 方式的登录
|
|
28179
|
-
var uG=function(){return uG=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},uG.apply(this,arguments)},dG=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},fG=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},pG=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},hG=xL(),mG=y().useCallback,vG=y().useEffect,gG=y().useState,yG=(y().useMemo,function(e){var t,n=e.QRConfig,r=e.id,o=null!==(t=su.resolvedLanguage)&&void 0!==t?t:su.language,i=window.WwLogin,a=pG(gG(!0),2),s=a[0],c=a[1],l=aL().get,
|
|
28184
|
+
var uG=function(){return uG=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},uG.apply(this,arguments)},dG=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},fG=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},pG=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},hG=xL(),mG=y().useCallback,vG=y().useEffect,gG=y().useState,yG=(y().useMemo,function(e){var t,n=e.QRConfig,r=e.id,o=null!==(t=su.resolvedLanguage)&&void 0!==t?t:su.language,i=window.WwLogin,a=pG(gG(!0),2),s=a[0],c=a[1],l=aL(),u=l.get,d=lL(),f=cL(),p=hL(),h=iL(),m=fL(),v=JL(),g=sL(),b=mG((function(){return dG(void 0,void 0,void 0,(function(){var e,t,a,s,u;return fG(this,(function(m){return e=l.getHeaders()["x-authing-device-id"],t=uG(uG({from_guard:"1",app_id:f,guard_version:"Guard@".concat(hG)},d&&{tenant_id:d}),e&&{device_id:e}),(null==p?void 0:p.isHost)&&(delete t.from_guard,t.from_hosted_guard="1",g&&(t.redirected="1",(a=UX())&&(
|
|
28180
28185
|
// 如果 isHost 是 true,则从 url 获取 finish_login_url 作为 social.authorize 方法的 targetUrl 参数
|
|
28181
|
-
|
|
28186
|
+
t.redirect_url=null===(u=Fc().parse(a.location.search))||void 0===u?void 0:u.finish_login_url))),(s=new i({id:"weCom_qrcode_wrapper-".concat(r),appid:n.corpId,agentid:n.agentId,redirect_uri:encodeURIComponent("".concat(n.redirectUrl,"?").concat(Fc().stringify(t))),
|
|
28182
28187
|
// redirect_uri,
|
|
28183
|
-
href:"".concat(null==
|
|
28184
|
-
lang:o.includes("zh")?"zh":"en"})).frame.onload=function(e){c(!1),
|
|
28188
|
+
href:"".concat(null==h?void 0:h.cdnBase,"/guard-assets/wrp_code_friesland.css"),//企业微信二维码样式文件
|
|
28189
|
+
lang:o.includes("zh")?"zh":"en"})).frame.onload=function(e){c(!1),s.frame.contentWindow.postMessage&&s.frame.contentWindow.postMessage("ask_usePostMessage","*")},[2/*return*/]}))}))}),[n.agentId,n.corpId,n.redirectUrl,i,f,null==p?void 0:p.isHost,r,null==h?void 0:h.cdnBase,d]);return vG((function(){b()}),[b]),vG((function(){var t=function(t){return dG(void 0,void 0,void 0,(function(){var r,o,i,a;return fG(this,(function(s){switch(s.label){case 0:if(!FX(t))return[3/*break*/,6];s.label=1;case 1:return s.trys.push([1,5,,6]),(null==m?void 0:m.onBeforeLogin)?[4/*yield*/,null==m?void 0:m.onBeforeLogin({type:Vs.WechatworkCorpQrconnect,data:t.data},v)]:[3/*break*/,3];case 2:if(!s.sent())return[2/*return*/];s.label=3;case 3:return r=new URL(t.data).search,[4/*yield*/,u("/api/v1/qrcode/".concat(n.identifier,"/verify").concat(r))];case 4:return 200===(o=s.sent()).code?(e.multipleInstance&&e.multipleInstance.setLoginWay("qrcode",Vs.WechatworkCorpQrconnect,e.id),e.onLoginSuccess(o.data)):
|
|
28185
28190
|
// 向上层抛出错误
|
|
28186
|
-
(null===(a=null==o?void 0:o.onGuardHandling)||void 0===a?void 0:a.call(o))===PQ.RENDER_MESSAGE&&e.onLoginFailed(o.code,o.data,o.message),[3/*break*/,6];case 5:return i=s.sent(),gC.error(i.message),[3/*break*/,6];case 6:return[2/*return*/]}}))}))};return s||window.addEventListener("message",t,!1),function(){window.removeEventListener("message",t,!1)}}),[n.identifier,m,
|
|
28191
|
+
(null===(a=null==o?void 0:o.onGuardHandling)||void 0===a?void 0:a.call(o))===PQ.RENDER_MESSAGE&&e.onLoginFailed(o.code,o.data,o.message),[3/*break*/,6];case 5:return i=s.sent(),gC.error(i.message),[3/*break*/,6];case 6:return[2/*return*/]}}))}))};return s||window.addEventListener("message",t,!1),function(){window.removeEventListener("message",t,!1)}}),[n.identifier,v,m,u,s,e]),y().createElement("div",{className:"wecom_container"},s&&y().createElement(dF,null),y().createElement("div",{id:"weCom_qrcode_wrapper-".concat(r),style:{display:s?"none":""}}))}),bG=function(){return bG=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bG.apply(this,arguments)},wG=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},CG=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},EG=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},kG=xL(),SG=y().useCallback,xG=y().useEffect,_G=y().useState,PG=function(e){var t=e.QRConfig,n=e.id,r=window.DTFrameLogin,o=EG(_G(!0),2),i=o[0],a=o[1],s=aL(),c=s.get,l=lL(),u=cL(),d=fL(),f=JL(),p=hL(),h=sL(),m=SG((function(){return wG(void 0,void 0,void 0,(function(){var o,i,m,v,g;return CG(this,(function(y){return o=s.getHeaders()["x-authing-device-id"],i=bG(bG({from_guard:"1",embedded:"1",app_id:u,guard_version:"Guard@".concat(kG)},l&&{tenant_id:l}),o&&{device_id:o}),(null==p?void 0:p.isHost)&&(delete i.from_guard,i.from_hosted_guard="1",h&&(i.redirected="1",(m=UX())&&(
|
|
28187
28192
|
// 如果 isHost 是 true,则从 url 获取 finish_login_url 作为 social.authorize 方法的 targetUrl 参数
|
|
28188
|
-
|
|
28193
|
+
i.redirect_url=null===(g=Fc().parse(m.location.search))||void 0===g?void 0:g.finish_login_url))),v=r({id:"dingtalk_qrcode_wrapper-".concat(n),width:"100%",height:388},{redirect_uri:encodeURIComponent("".concat(p.isHost?t.redirectUrl:window.location.origin,"?").concat(Fc().stringify(i))),client_id:t.clientId,scope:"openid",response_type:"code",
|
|
28189
28194
|
// state: 'xxxxxxxxx',
|
|
28190
|
-
prompt:"consent"},(function(n){return wG(void 0,void 0,void 0,(function(){var r,
|
|
28195
|
+
prompt:"consent"},(function(n){return wG(void 0,void 0,void 0,(function(){var r,o,a,s;return CG(this,(function(l){switch(l.label){case 0:r=n.authCode,l.label=1;case 1:return l.trys.push([1,5,,6]),(null==d?void 0:d.onBeforeLogin)?[4/*yield*/,null==d?void 0:d.onBeforeLogin({type:Vs.WechatworkCorpQrconnect,data:n},f)]:[3/*break*/,3];case 2:if(!l.sent())return[2/*return*/];l.label=3;case 3:return[4/*yield*/,c("/api/v1/qrcode/".concat(t.identifier,"/verify?").concat(Fc().stringify(i),"&code=").concat(r))];case 4:return 200===(o=l.sent()).code?(e.multipleInstance&&e.multipleInstance.setLoginWay("qrcode",Vs.DingTalkQrcode,e.id),e.onLoginSuccess(o.data)):
|
|
28191
28196
|
// 向上层抛出错误
|
|
28192
|
-
(null===(
|
|
28197
|
+
(null===(s=null==o?void 0:o.onGuardHandling)||void 0===s?void 0:s.call(o))===PQ.RENDER_MESSAGE&&e.onLoginFailed(o.code,o.data),[3/*break*/,6];case 5:return a=l.sent(),gC.error(a.message),[3/*break*/,6];case 6:return[2/*return*/]}}))}))}),(function(e){})),
|
|
28193
28198
|
// frame 页面二维码加载完毕
|
|
28194
|
-
|
|
28199
|
+
v.onload=function(){setTimeout((function(){a(!1)}),500)},[2/*return*/]}))}))}),[r,t,u,null==p?void 0:p.isHost,l]);return xG((function(){m()}),[m]),y().createElement("div",{className:"wecom_container"},i&&y().createElement(dF,{className:"dingtalk_loading"}),y().createElement("div",{id:"dingtalk_qrcode_wrapper-".concat(n),style:{visibility:i?"hidden":"visible"}}))},TG=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},OG=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},NG=y().useRef,IG=function(e){var t=NG(),n=e.canLoop,r=e.qrConfig,o=e.qrCodeScanOptions,i=aL().responseIntercept,a=fL(),s=JL(),c=_u().t;if(!n)return null;var l={already:function(e){return y().createElement("span",{className:"qrcode__again-scan",onClick:e},c("login.scanAgain"))},ready:c("login.zjzwScanLogin"),success:c("common.LoginSuccess"),MFA:c("common.LoginSuccess")};
|
|
28195
28200
|
/**
|
|
28196
28201
|
* Sever Status 发生变化
|
|
28197
28202
|
* @param status
|
|
28198
28203
|
* @param data
|
|
28199
|
-
*/return y().createElement(
|
|
28204
|
+
*/return y().createElement(pH,{qrCodeScanOptions:o,authorizationUrl:null==r?void 0:r.authorizationUrl,ref:t,scene:"ZJ_AUTH",descriptions:l,onStatusChange:function(t,n){return TG(void 0,void 0,void 0,(function(){var r,c;return OG(this,(function(l){switch(l.label){case 0:switch(t){case"success":return[3/*break*/,1];case"error":return[3/*break*/,4];case"MFA":return[3/*break*/,5]}return[3/*break*/,6];case 1:return(null==a?void 0:a.onBeforeLogin)?[4/*yield*/,null==a?void 0:a.onBeforeLogin({type:Vs.ZJZWFWQrcode,data:n},s)]:[3/*break*/,3];case 2:if(!l.sent())return[3/*break*/,7];l.label=3;case 3:return e.multipleInstance&&e.multipleInstance.setLoginWay("qrcode",Vs.ZJZWFWQrcode,null==o?void 0:o.extIdpConnId),e.onLoginSuccess(null==n?void 0:n.user),[3/*break*/,7];case 4:return n.scannedResult&&(r=n.scannedResult.message,gC.error(r)),[3/*break*/,7];case 5:return n.scannedResult&&(null==(c=i(n.scannedResult).onGuardHandling)||c()),[3/*break*/,7];case 6:return[3/*break*/,7];case 7:return[2/*return*/]}}))}))}})},AG=function(){return AG=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},AG.apply(this,arguments)},RG=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},MG=y().useEffect,DG=y().useLayoutEffect,LG=y().useState,FG=y().useRef,jG=y().useMemo,BG=y().useCallback,UG=[Vs.Password,Vs.PhoneCode,Vs.AD,Vs.LDAP,Vs.AuthingOtpPush,Vs.EmailCode],qG=[Vs.AppQr,Vs.WxMinQr,Vs.WechatMpQrcode,Vs.WechatworkCorpQrconnect,Vs.WECHATWORKAGENCYQRCONNECT,Vs.WECHATWORKQRCONNECTOFAUTHINGAGENCY,Vs.DingTalkQrcode,Vs.ZJZWFWQrcode],VG=[Vs.WechatMpQrcode,Vs.WxMinQr,Vs.DingTalkQrcode,Vs.WechatworkCorpQrconnect,Vs.WECHATWORKAGENCYQRCONNECT,Vs.WECHATWORKQRCONNECTOFAUTHINGAGENCY,Vs.ZJZWFWQrcode];var zG,$G=function(e){return e.length>20?"".concat(e.substring(0,20),"..."):e},HG=function(e){var t,n,r,o,i,a,s,c,l,u,d,f=e.isResetPage,p=void 0!==f&&f,h=uL().specifyDefaultLoginMethod,m=null!==(t=su.resolvedLanguage)&&void 0!==t?t:su.language,v=hL(),g=cL(),b=pL().changeModule,w=fL(),C=iL(),E=RG(function(e){var t=null==e?void 0:e.defaultLoginMethod,n=null==e?void 0:e.loginMethods;return(null==n?void 0:n.includes(t))||(t=null==n?void 0:n[0]),[t,fz()(n,UG).length>0,fz()(n,qG).length>0]}(v),3),k=E[0],S=E[1],x=E[2],_=null==v?void 0:v.agreementEnabled,P=_u().t,T=(d=aL().responseIntercept,function(e){var t=e.data,n=t.message,r=t.data,o=t.event,i=t.code;
|
|
28200
28205
|
// 社会化登录是用 authing-js-sdk 实现的,不用再在这里回调了
|
|
28201
28206
|
// if (source === 'authing' && eventType === 'socialLogin') {
|
|
28202
28207
|
// return
|
|
@@ -28205,10 +28210,10 @@ if("authing"===(o||{}).source){
|
|
|
28205
28210
|
// 如果直接为 200 代表成功了
|
|
28206
28211
|
if(200===i)return{code:i,data:r,onGuardHandling:void 0};
|
|
28207
28212
|
// TODO 完整的登陆信息 在 message 中 以 Json 的形式返回 待优化
|
|
28208
|
-
var a;try{a=JSON.parse(n)}catch(e){return}var s=a.code,c=a.statusCode,l=a.apiCode,u=a.message,f=a.data,p=a.flowHandle;return d({statusCode:c,apiCode:l,data:f,message:u,code:s,flowHandle:p})}}),O=RG(LG(h||k),2),N=O[0],I=O[1],A=RG(LG("collapsed"),2),R=A[0],M=A[1];OB({currentTab:N,changeTab:I});var D=function(e){var t=
|
|
28213
|
+
var a;try{a=JSON.parse(n)}catch(e){return}var s=a.code,c=a.statusCode,l=a.apiCode,u=a.message,f=a.data,p=a.flowHandle;return d({statusCode:c,apiCode:l,data:f,message:u,code:s,flowHandle:p})}}),O=RG(LG(h||k),2),N=O[0],I=O[1],A=RG(LG("collapsed"),2),R=A[0],M=A[1];OB({currentTab:N,changeTab:I});var D=function(e){var t=Dz(),n=vL(),r=n.instance,o=n.referMultipleState,i=n.isMultipleAccount,a=n.multipleAccountData,s=Mz((function(n){var r=n.way,o=n.qrCodeId,i=o?r+o:r;t.current=i,e(r)}),[e]);
|
|
28209
28214
|
// 多账号实例
|
|
28210
28215
|
// 没办法了 TODO: 我真的是没办法了... 只有Default方式去硬逻辑加载
|
|
28211
|
-
return(null==a?void 0:a.qrCodeId)&&(t.current=a.way+(null==a?void 0:a.qrCodeId)),
|
|
28216
|
+
return(null==a?void 0:a.qrCodeId)&&(t.current=a.way+(null==a?void 0:a.qrCodeId)),Lz((function(){
|
|
28212
28217
|
// 非多账号登录页面 并且存在返回值
|
|
28213
28218
|
!i&&a&&s(a)}),[i,a,s]),{isMultipleAccount:i,multipleInstance:r,referMultipleState:o,backfillData:a,defaultQrWay:t.current}}(I),L=D.defaultQrWay,F=D.backfillData,j=D.multipleInstance,B=D.isMultipleAccount,U=D.referMultipleState,q=RG(LG(!1),2),V=q[0],z=q[1],$=JL(),H=null==C?void 0:C.qrcodeTabsSettings,W=(null==C?void 0:C.socialConnections)||[],G=RG(LG(0),2),K=G[0],Y=G[1],J=RG(LG(!1),2),Z=J[0],Q=J[1],X=FG({}),ee=XD(nL).tenantInstance,te=jG((function(){return[(null==ee?void 0:ee.isTenantConsole())&&{name:su.t("login.tenant.consoleManage")},(null==ee?void 0:ee.isTenantSSOLaunchPad())&&{name:P("login.tenant.ssoPad")}].filter(Boolean)}),[P,ee]),ne=null==v?void 0:v.publicKey,re=null==v?void 0:v.loginMethods,oe=UG.filter((function(e){return null==re?void 0:re.includes(e)}))[0],ie=qG.filter((function(e){return null==re?void 0:re.includes(e)}))[0],ae=function(e){var t=e.config,n=t.disableResetPwd,r=t.disableRegister,o=e.loginWay,i=e.autoRegister;return o===Vs.PhoneCode&&(n=!0),[Vs.LDAP,Vs.AuthingOtpPush].includes(o)&&(n=!0,r=!0),o===Vs.AD&&(
|
|
28214
28219
|
// TODO P0 需求暂时先取消掉
|
|
@@ -28218,7 +28223,7 @@ return!(e.length>1)&&(!!e.includes(Vs.AppQr)||(!H||!function(e,t){return t.some(
|
|
|
28218
28223
|
// 如果存在多账号的二维码方式
|
|
28219
28224
|
if(L)return L;if(VG.includes(k)){var n=null===(t=null===(e=null==H?void 0:H[k])||void 0===e?void 0:e.find((function(e){return e.isDefault})))||void 0===t?void 0:t.id;return k+n}return k}),[L,k,H]),de=BG((function(e,t){var n;null===(n=null==w?void 0:w.onLogin)||void 0===n||n.call(w,e,$)}),[$,w]),fe=BG((function(e,t){var n;X.current=AG(AG({},X.current),((n={})[e]=IX(t),n))}),[]);
|
|
28220
28225
|
// 重置用户名页面
|
|
28221
|
-
MG((function(){p&&gC.info({content:su.t("common.resetAccount.message"),className:"g2-view-message-info"})}),[p]);var pe=BG((function(e,t,n){var r,o=
|
|
28226
|
+
MG((function(){p&&gC.info({content:su.t("common.resetAccount.message"),className:"g2-view-message-info"})}),[p]);var pe=BG((function(e,t,n){var r,o=xH[e];
|
|
28222
28227
|
// TODO 与拦截器中 render-message 同步
|
|
28223
28228
|
"message"===(null==o?void 0:o.action)&&Y(K+1),"accountLock"===(null==o?void 0:o.action)&&Q(!0),null===(r=null==w?void 0:w.onLoginError)||void 0===r||r.call(w,{code:e,data:t,message:n})}),[K,w]),he=BG((function(e){var t;return(null==w?void 0:w.onBeforeLogin)?null===(t=null==w?void 0:w.onBeforeLogin)||void 0===t?void 0:t.call(w,e,$):function(){}}),[$,w]);MG((function(){qG.includes(N)?z(!0):z(!1);
|
|
28224
28229
|
// 可以设定 = fasle 的时候关闭 qrcode 的几个定时器
|
|
@@ -28236,7 +28241,7 @@ return t.style["min-height"]=Se?"456px":"280px",t.classList.add("no-login-method
|
|
|
28236
28241
|
// @ts-ignore
|
|
28237
28242
|
t.style["min-height"]="540px",t.classList.remove("no-login-methods-view")}}}),[Se,_e,xe]),MG((function(){var e,t=id(),n=null===(e=t.getElementsByClassName("g2-view-header"))||void 0===e?void 0:e[0],r=t.querySelector(".g2-view-login>.g2-view-container-inner");return _e&&xe?(n&&n.classList.add("g2-view-header-mobile"),r&&r.classList.add("g2-view-login-mobile-inner")):(null==n||n.classList.remove("g2-view-header-mobile"),null==r||r.classList.remove("g2-view-login-mobile-inner")),function(){null==n||n.classList.remove("g2-view-header-mobile"),null==r||r.classList.remove("g2-view-login-mobile-inner")}}),[_e,xe]);
|
|
28238
28243
|
// 获取登录 tab 多语言
|
|
28239
|
-
var Pe=(null===(o=null==C?void 0:C.ssoPageComponentDisplay)||void 0===o?void 0:o.loginMethodsI18nDisplaySettings)||{},Te=Pe.password,Oe=Pe.verifyCode,Ne=Pe.ad,Ie=Pe.ldap,Ae=jG((function(){var e,t,n,r;return(null==re?void 0:re.includes(Vs.Password))&&y().createElement(xR.TabPane,{key:Vs.Password,tab:$G((null===(t=null===(e=null==Te?void 0:Te.tab)||void 0===e?void 0:e.i18n)||void 0===t?void 0:t[m])||(null===(n=null==Te?void 0:Te.tab)||void 0===n?void 0:n.default)||P("login.pwdLogin"))},y().createElement(
|
|
28244
|
+
var Pe=(null===(o=null==C?void 0:C.ssoPageComponentDisplay)||void 0===o?void 0:o.loginMethodsI18nDisplaySettings)||{},Te=Pe.password,Oe=Pe.verifyCode,Ne=Pe.ad,Ie=Pe.ldap,Ae=jG((function(){var e,t,n,r;return(null==re?void 0:re.includes(Vs.Password))&&y().createElement(xR.TabPane,{key:Vs.Password,tab:$G((null===(t=null===(e=null==Te?void 0:Te.tab)||void 0===e?void 0:e.i18n)||void 0===t?void 0:t[m])||(null===(n=null==Te?void 0:Te.tab)||void 0===n?void 0:n.default)||P("login.pwdLogin"))},y().createElement(Zz,{loginWay:N,publicKey:ne,autoRegister:null==v?void 0:v.autoRegister,host:null==v?void 0:v.host,
|
|
28240
28245
|
// onLogin={onLogin}
|
|
28241
28246
|
backfillData:F,onLoginSuccess:de,onLoginFailed:pe,onBeforeLogin:he,saveIdentify:fe,passwordLoginMethods:null!==(r=null==v?void 0:v.passwordLoginMethods)&&void 0!==r?r:[],agreements:be,multipleInstance:j,loginHint:null==v?void 0:v.loginHint}))}),[be,re,j,F,v,ne,N,he,fe,pe,de,P,Te,null==v?void 0:v.loginHint]),Re=jG((function(){var e,t,n,r,o,i,a,s,c,l,u;if(!(null==re?void 0:re.includes(Vs.PhoneCode)))return y().createElement(y().Fragment,null);
|
|
28242
28247
|
// 是否开启了国际化短信功能
|
|
@@ -28244,17 +28249,17 @@ var d=[],f=!1;
|
|
|
28244
28249
|
// 开启国际化短信时要将短信和邮箱 tab 拆分,方便下拉选取手机区号
|
|
28245
28250
|
return(null===(e=null==C?void 0:C.internationalSmsConfig)||void 0===e?void 0:e.enabled)||!1?((null===(n=null===(t=C.verifyCodeTabConfig)||void 0===t?void 0:t.enabledLoginMethods)||void 0===n?void 0:n.includes("phone-code"))&&(f=!0,d.push(y().createElement(xR.TabPane,{key:Vs.PhoneCode,tab:$G((null===(o=null===(r=null==Oe?void 0:Oe.tab)||void 0===r?void 0:r.i18n)||void 0===o?void 0:o[m])||(null===(i=null==Oe?void 0:Oe.tab)||void 0===i?void 0:i.default)||P("common.phoneCodeTab"))},y().createElement(RW,{verifyCodeLength:null==C?void 0:C.verifyCodeLength,autoRegister:null==v?void 0:v.autoRegister,onBeforeLogin:he,
|
|
28246
28251
|
// onLogin={onLogin}
|
|
28247
|
-
onLoginSuccess:de,onLoginFailed:pe,saveIdentify:fe,agreements:be,methods:["phone-code"],backfillData:F,multipleInstance:j,specifyCodeMethod:
|
|
28252
|
+
onLoginSuccess:de,onLoginFailed:pe,saveIdentify:fe,agreements:be,methods:["phone-code"],backfillData:F,multipleInstance:j,specifyCodeMethod:GH.Phone,loginHint:null==v?void 0:v.loginHint})))),(null===(s=null===(a=C.verifyCodeTabConfig)||void 0===a?void 0:a.enabledLoginMethods)||void 0===s?void 0:s.includes("email-code"))&&d.push(y().createElement(xR.TabPane,{key:f?Vs.EmailCode:Vs.PhoneCode,
|
|
28248
28253
|
// TODO 后续需要单独抽出来
|
|
28249
28254
|
tab:$G(P("common.emailCodeTab"))},y().createElement(RW,{verifyCodeLength:null==C?void 0:C.verifyCodeLength,autoRegister:null==v?void 0:v.autoRegister,onBeforeLogin:he,
|
|
28250
28255
|
// onLogin={onLogin}
|
|
28251
|
-
onLoginSuccess:de,onLoginFailed:pe,saveIdentify:fe,agreements:be,methods:["email-code"],backfillData:F,multipleInstance:j,specifyCodeMethod:
|
|
28256
|
+
onLoginSuccess:de,onLoginFailed:pe,saveIdentify:fe,agreements:be,methods:["email-code"],backfillData:F,multipleInstance:j,specifyCodeMethod:GH.Email,loginHint:null==v?void 0:v.loginHint}))),d):y().createElement(xR.TabPane,{key:Vs.PhoneCode,tab:$G((null===(l=null===(c=null==Oe?void 0:Oe.tab)||void 0===c?void 0:c.i18n)||void 0===l?void 0:l[m])||(null===(u=null==Oe?void 0:Oe.tab)||void 0===u?void 0:u.default)||P("common.verifyCodeLogin"))},y().createElement(RW,{verifyCodeLength:null==C?void 0:C.verifyCodeLength,autoRegister:null==v?void 0:v.autoRegister,onBeforeLogin:he,
|
|
28252
28257
|
// onLogin={onLogin}
|
|
28253
|
-
onLoginSuccess:de,onLoginFailed:pe,saveIdentify:fe,agreements:be,methods:we,backfillData:F,multipleInstance:j,loginHint:null==v?void 0:v.loginHint}))}),[re,null===(i=null==C?void 0:C.internationalSmsConfig)||void 0===i?void 0:i.enabled,null===(a=C.verifyCodeTabConfig)||void 0===a?void 0:a.enabledLoginMethods,null==C?void 0:C.verifyCodeLength,P,null==v?void 0:v.autoRegister,null==v?void 0:v.loginHint,he,de,pe,fe,be,we,F,j,null===(s=null==Oe?void 0:Oe.tab)||void 0===s?void 0:s.i18n,null===(c=null==Oe?void 0:Oe.tab)||void 0===c?void 0:c.default]),Me=jG((function(){var e,t,n;return(null==re?void 0:re.includes(Vs.LDAP))&&y().createElement(xR.TabPane,{key:Vs.LDAP,tab:$G((null===(t=null===(e=null==Ie?void 0:Ie.tab)||void 0===e?void 0:e.i18n)||void 0===t?void 0:t[m])||(null===(n=null==Ie?void 0:Ie.tab)||void 0===n?void 0:n.default)||P("login.ldapLogin"))},y().createElement(
|
|
28258
|
+
onLoginSuccess:de,onLoginFailed:pe,saveIdentify:fe,agreements:be,methods:we,backfillData:F,multipleInstance:j,loginHint:null==v?void 0:v.loginHint}))}),[re,null===(i=null==C?void 0:C.internationalSmsConfig)||void 0===i?void 0:i.enabled,null===(a=C.verifyCodeTabConfig)||void 0===a?void 0:a.enabledLoginMethods,null==C?void 0:C.verifyCodeLength,P,null==v?void 0:v.autoRegister,null==v?void 0:v.loginHint,he,de,pe,fe,be,we,F,j,null===(s=null==Oe?void 0:Oe.tab)||void 0===s?void 0:s.i18n,null===(c=null==Oe?void 0:Oe.tab)||void 0===c?void 0:c.default]),Me=jG((function(){var e,t,n;return(null==re?void 0:re.includes(Vs.LDAP))&&y().createElement(xR.TabPane,{key:Vs.LDAP,tab:$G((null===(t=null===(e=null==Ie?void 0:Ie.tab)||void 0===e?void 0:e.i18n)||void 0===t?void 0:t[m])||(null===(n=null==Ie?void 0:Ie.tab)||void 0===n?void 0:n.default)||P("login.ldapLogin"))},y().createElement(r$,{publicKey:ne,autoRegister:null==v?void 0:v.autoRegister,host:null==v?void 0:v.host,
|
|
28254
28259
|
// onLogin={onLogin}
|
|
28255
|
-
onLoginSuccess:de,onLoginFailed:pe,onBeforeLogin:he,agreements:be,backfillData:F,multipleInstance:j,loginHint:null==v?void 0:v.loginHint}))}),[be,F,null==v?void 0:v.autoRegister,null==v?void 0:v.host,null==v?void 0:v.loginHint,j,he,pe,de,ne,re,P,Ie]),De=jG((function(){var e,t,n;return(null==re?void 0:re.includes(Vs.AD))&&y().createElement(xR.TabPane,{key:Vs.AD,tab:$G((null===(t=null===(e=null==Ne?void 0:Ne.tab)||void 0===e?void 0:e.i18n)||void 0===t?void 0:t[m])||(null===(n=null==Ne?void 0:Ne.tab)||void 0===n?void 0:n.default)||P("login.adLogin"))},y().createElement(
|
|
28260
|
+
onLoginSuccess:de,onLoginFailed:pe,onBeforeLogin:he,agreements:be,backfillData:F,multipleInstance:j,loginHint:null==v?void 0:v.loginHint}))}),[be,F,null==v?void 0:v.autoRegister,null==v?void 0:v.host,null==v?void 0:v.loginHint,j,he,pe,de,ne,re,P,Ie]),De=jG((function(){var e,t,n;return(null==re?void 0:re.includes(Vs.AD))&&y().createElement(xR.TabPane,{key:Vs.AD,tab:$G((null===(t=null===(e=null==Ne?void 0:Ne.tab)||void 0===e?void 0:e.i18n)||void 0===t?void 0:t[m])||(null===(n=null==Ne?void 0:Ne.tab)||void 0===n?void 0:n.default)||P("login.adLogin"))},y().createElement(u$,{backfillData:F,multipleInstance:j,publicKey:ne,autoRegister:null==v?void 0:v.autoRegister,
|
|
28256
28261
|
// onLogin={onLogin}
|
|
28257
|
-
onLoginSuccess:de,onLoginFailed:pe,onBeforeLogin:he,agreements:be}))}),[be,F,null==v?void 0:v.autoRegister,j,he,pe,de,ne,re,P,Ne]),Le=BG((function(e){var t;return y().createElement(xR.TabPane,{key:Vs.WxMinQr+e.id,tab:null!==(t=e.title)&&void 0!==t?t:P("login.scanLogin")},y().createElement(
|
|
28262
|
+
onLoginSuccess:de,onLoginFailed:pe,onBeforeLogin:he,agreements:be}))}),[be,F,null==v?void 0:v.autoRegister,j,he,pe,de,ne,re,P,Ne]),Le=BG((function(e){var t;return y().createElement(xR.TabPane,{key:Vs.WxMinQr+e.id,tab:null!==(t=e.title)&&void 0!==t?t:P("login.scanLogin")},y().createElement(CH,{id:e.id,multipleInstance:j,onLoginSuccess:de,canLoop:V,qrCodeScanOptions:{extIdpConnId:e.id}}))}),[V,j,de,P]),Fe=BG((function(){return y().createElement(xR.TabPane,{key:Vs.AppQr,tab:P("login.appScanLogin")},y().createElement(yH,{multipleInstance:j,onLoginSuccess:de,canLoop:V}))}),[V,j,de,P]),je=BG((function(e){var t;return y().createElement(xR.TabPane,{key:Vs.ZJZWFWQrcode+e.id,tab:null!==(t=e.title)&&void 0!==t?t:P("login.zjzwScanLogin")},y().createElement(IG,{qrCodeScanOptions:{extIdpConnId:e.id},qrConfig:e.QRConfig,multipleInstance:j,onLoginSuccess:de,canLoop:V}))}),[V,j,de,P]),Be=BG((function(e){var t;return y().createElement(xR.TabPane,{key:Vs.WechatMpQrcode+e.id,tab:null!==(t=e.title)&&void 0!==t?t:P("login.wechatmpQrcode")},y().createElement(SH,{id:e.id,multipleInstance:j,onLoginSuccess:de,canLoop:V,qrCodeScanOptions:{extIdpConnId:e.id}}))}),[V,j,de,P]),Ue=BG((function(e){var t,n=e.type||Vs.WechatworkCorpQrconnect;return y().createElement(xR.TabPane,{key:n+e.id,tab:null!==(t=e.title)&&void 0!==t?t:P("login.wecomScanLogin")},y().createElement(yG,{id:e.id,QRConfig:e.QRConfig,onLoginSuccess:de,onLoginFailed:pe}))}),[V,j,de,P]),qe=BG((function(e){var t;return y().createElement(xR.TabPane,{key:Vs.DingTalkQrcode+e.id,tab:null!==(t=e.title)&&void 0!==t?t:P("login.wecomScanLogin")},y().createElement(PG,{id:e.id,QRConfig:e.QRConfig,onLoginSuccess:de,onLoginFailed:pe}))}),[V,j,de,P]),Ve=jG((function(){return(null==re?void 0:re.includes(Vs.AuthingOtpPush))&&y().createElement(xR.TabPane,{key:Vs.AuthingOtpPush,tab:P("login.authingOtpPushLogin")},y().createElement(lG,{onLoginSuccess:de,multipleInstance:j,initData:F,agreements:be}))}),[re,de,P,F,j,be]),ze=jG((function(){var e;return(e={})[Vs.Password]=Ae,e[Vs.PhoneCode]=Re,e[Vs.LDAP]=Me,e[Vs.AD]=De,e[Vs.AuthingOtpPush]=Ve,e}),[Ae,Re,Me,De,Ve]),$e=jG((function(){var e,t=null==re?void 0:re.filter((function(e){return[Vs.Password,Vs.PhoneCode,Vs.LDAP,Vs.AD,Vs.AuthingOtpPush].includes(e)}));return t?LX(t,null!==(e=v.defaultLoginMethod)&&void 0!==e?e:"").map((function(e){return ze[e]})):null}),[v.defaultLoginMethod,re,ze]),He=jG((function(){var e;return(e={})[Vs.AppQr]=Fe,e[Vs.WechatMpQrcode]=Be,e[Vs.WxMinQr]=Le,e[Vs.WechatworkCorpQrconnect]=Ue,e[Vs.WECHATWORKQRCONNECTOFAUTHINGAGENCY]=function(e){return Ue(AG(AG({},e),{type:Vs.WECHATWORKQRCONNECTOFAUTHINGAGENCY}))},e[Vs.WECHATWORKAGENCYQRCONNECT]=function(e){return Ue(AG(AG({},e),{type:Vs.WECHATWORKAGENCYQRCONNECT}))},e[Vs.DingTalkQrcode]=qe,e[Vs.ZJZWFWQrcode]=je,e}),[Fe,Be,Le]),We=jG((function(){var e,t={};Object.keys(H).forEach((function(e){H[e].forEach((function(n){t[n.id]={type:e,title:n.title,id:n.id,QRConfig:n.QRConfig}}))}));var n=(null===(e=C.qrCodeSortConfig)||void 0===e?void 0:e.loginMethodsSort)||[],r=(n||[]).map((function(e){var n;return{key:e,type:(null===(n=t[e])||void 0===n?void 0:n.type)||Vs.AppQr}})),o=null==r?void 0:r.findIndex((function(e){return e.type===k}));if(o>0){var i=n.splice(o,1);n.unshift(i[0])}return(n||[]).map((function(e){var n;return t[e]?null===(n=He[t[e].type])||void 0===n?void 0:n.call(He,t[e]):He[Vs.AppQr]()}))}),[He,H,null===(l=C.qrCodeSortConfig)||void 0===l?void 0:l.loginMethodsSort,k]);return MG((function(){var e=function(e){
|
|
28258
28263
|
// 去掉钉钉和企微域下的postmessage处理 由他们内部自己监听的message控制 避免重复触发
|
|
28259
28264
|
/** 是否存在开启内嵌模式的身份源 */
|
|
28260
28265
|
var t=W.filter((function(e){return e.embedded}));
|
|
@@ -28274,15 +28279,15 @@ onLoginSuccess:de,onLoginFailed:pe,socialConnectionObjs:Ee,enterpriseConnectionO
|
|
|
28274
28279
|
// return AssociateFace(content)
|
|
28275
28280
|
},e};
|
|
28276
28281
|
/* harmony default export */const ZG=function(e){(0,g.useEffect)(e,[])};// CONCATENATED MODULE: ./src/MFA/core/email.tsx
|
|
28277
|
-
var QG,XG,eK=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},tK=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},nK=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},rK=y().useRef,oK=y().useState,iK=function(e){e.mfaToken;var t=e.onBind,n=(e.config,rK(null)),r=_u().t,o=nK(cT.useForm(),1)[0];return y().createElement(y().Fragment,null,y().createElement("p",{className:"authing-g2-mfa-title"},r("common.mfaCertification")),y().createElement("p",{className:"authing-g2-mfa-tips"},r("common.bindEmailDoc")),y().createElement(cT,{form:o,onSubmitCapture:function(){return n.current.onSpin(!0)},onFinish:function(e){return eK(void 0,[e],void 0,(function(e){var r,i,a=e.email;return tK(this,(function(e){switch(e.label){case 0:return[4/*yield*/,o.validateFields()];case 1:e.sent(),null===(i=n.current)||void 0===i||i.onSpin(!1);try{t(a)}catch(e){r=JSON.parse(null==e?void 0:e.message),n.current.onError(),gC.error(r.message)}return[2/*return*/]}}))}))},onFinishFailed:function(){return n.current.onError()}},y().createElement(
|
|
28282
|
+
var QG,XG,eK=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},tK=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},nK=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},rK=y().useRef,oK=y().useState,iK=function(e){e.mfaToken;var t=e.onBind,n=(e.config,rK(null)),r=_u().t,o=nK(cT.useForm(),1)[0];return y().createElement(y().Fragment,null,y().createElement("p",{className:"authing-g2-mfa-title"},r("common.mfaCertification")),y().createElement("p",{className:"authing-g2-mfa-tips"},r("common.bindEmailDoc")),y().createElement(cT,{form:o,onSubmitCapture:function(){return n.current.onSpin(!0)},onFinish:function(e){return eK(void 0,[e],void 0,(function(e){var r,i,a=e.email;return tK(this,(function(e){switch(e.label){case 0:return[4/*yield*/,o.validateFields()];case 1:e.sent(),null===(i=n.current)||void 0===i||i.onSpin(!1);try{t(a)}catch(e){r=JSON.parse(null==e?void 0:e.message),n.current.onError(),gC.error(r.message)}return[2/*return*/]}}))}))},onFinishFailed:function(){return n.current.onError()}},y().createElement(oU.Email,{className:"authing-g2-input-form",name:"email",form:o,
|
|
28278
28283
|
// checkRepeat={true}
|
|
28279
|
-
required:!0},y().createElement(oO,{className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:r("login.inputEmail"),prefix:y().createElement(JD,{type:"authing-a-mail-line3",style:{color:"#878A95"}})})),y().createElement(Tj,{text:r("common.sure"),ref:n})))},aK=function(e){var t=e.email,n=e.mfaToken,r=e.onVerify,o=e.sendCodeRef,i=e.codeLength,a=eX().post,s=JG()[zG.VerifyEmail],c=rK(null),l=_u().t,u=nK(cT.useForm(),1)[0],d=nK(oK(!1),2),f=d[0],p=d[1];ZG((function(){var e;null===(e=o.current)||void 0===e||e.click()}));var h=function(e){return eK(void 0,void 0,void 0,(function(){var e,o,i,a,l,d,f,p;return tK(this,(function(h){switch(h.label){case 0:return null===(d=c.current)||void 0===d||d.onSpin(!0),e=u.getFieldValue("mfaCode"),[4/*yield*/,s({mfaToken:n,email:t,code:e})];case 1:return o=h.sent(),i=o.isFlowEnd,a=o.data,l=o.onGuardHandling,null===(f=c.current)||void 0===f||f.onSpin(!1),i?r(200,a):(null===(p=c.current)||void 0===p||p.onError(),null==l||l()),[2/*return*/]}}))}))};return y().createElement(y().Fragment,null,y().createElement("p",{className:"authing-g2-mfa-title"},l("common.mfaCertification")),y().createElement("p",{className:"authing-g2-mfa-tips"},f?"".concat(l("login.verifyCodeSended")," ").concat(_X(t)):l("common.emailMfaCheck")),y().createElement(cT,{form:u,onFinish:h,onFinishFailed:function(){var e;return null===(e=c.current)||void 0===e?void 0:e.onError()}},y().createElement(Yj,{codeLength:i,ruleKeyword:l("common.captchaCode")},y().createElement(vB,{length:i,onFinish:h})),y().createElement(
|
|
28284
|
+
required:!0},y().createElement(oO,{className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:r("login.inputEmail"),prefix:y().createElement(JD,{type:"authing-a-mail-line3",style:{color:"#878A95"}})})),y().createElement(Tj,{text:r("common.sure"),ref:n})))},aK=function(e){var t=e.email,n=e.mfaToken,r=e.onVerify,o=e.sendCodeRef,i=e.codeLength,a=eX().post,s=JG()[zG.VerifyEmail],c=rK(null),l=_u().t,u=nK(cT.useForm(),1)[0],d=nK(oK(!1),2),f=d[0],p=d[1];ZG((function(){var e;null===(e=o.current)||void 0===e||e.click()}));var h=function(e){return eK(void 0,void 0,void 0,(function(){var e,o,i,a,l,d,f,p;return tK(this,(function(h){switch(h.label){case 0:return null===(d=c.current)||void 0===d||d.onSpin(!0),e=u.getFieldValue("mfaCode"),[4/*yield*/,s({mfaToken:n,email:t,code:e})];case 1:return o=h.sent(),i=o.isFlowEnd,a=o.data,l=o.onGuardHandling,null===(f=c.current)||void 0===f||f.onSpin(!1),i?r(200,a):(null===(p=c.current)||void 0===p||p.onError(),null==l||l()),[2/*return*/]}}))}))};return y().createElement(y().Fragment,null,y().createElement("p",{className:"authing-g2-mfa-title"},l("common.mfaCertification")),y().createElement("p",{className:"authing-g2-mfa-tips"},f?"".concat(l("login.verifyCodeSended")," ").concat(_X(t)):l("common.emailMfaCheck")),y().createElement(cT,{form:u,onFinish:h,onFinishFailed:function(){var e;return null===(e=c.current)||void 0===e?void 0:e.onError()}},y().createElement(Yj,{codeLength:i,ruleKeyword:l("common.captchaCode")},y().createElement(vB,{length:i,onFinish:h})),y().createElement(DU,{btnRef:o,setSent:p,beforeSend:function(){return eK(void 0,void 0,void 0,(function(){var e,n,r,o,i;return tK(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4/*yield*/,a("/api/v2/email/send",{email:t,scene:Oc.MFA_VERIFY_CODE})];case 1:return e=s.sent(),n=e.code,r=e.message,2080===e.apiCode?(
|
|
28280
28285
|
// 一分钟只能发一次邮箱验证码的提示信息,特殊处理
|
|
28281
|
-
gC.error(r),[2/*return*/,!1]):200===n?(p(!0),[2/*return*/,!0]):(gC.error(l("login.sendCodeTimeout")),[2/*return*/,!1]);case 2:if("ECONNABORTED"===(o=s.sent()).code)return gC.error(l("login.sendCodeTimeout")),[2/*return*/,!1];try{i=JSON.parse(o.message),gC.error(i.message)}catch(e){gC.error(o)}return[2/*return*/,!1];case 3:return[2/*return*/]}}))}))},type:"link"}),y().createElement(Tj,{text:l("common.sure"),ref:c,className:"g2-mfa-submit-button"})))},sK=function(e){var t=e.email,n=e.mfaToken,r=e.mfaLogin,o=e.config,i=nK(oK(t),2),a=i[0],s=i[1],c=rK(null),l=iL(),u=null==l?void 0:l.verifyCodeLength;return y().createElement(y().Fragment,null,a?y().createElement(aK,{mfaToken:n,email:a,onVerify:function(e,t){r(e,t)},sendCodeRef:c,codeLength:null!=u?u:4}):y().createElement(iK,{config:o,mfaToken:n,onBind:function(e){var t;s(e),null===(t=c.current)||void 0===t||t.click()}}))},cK=function(){return cK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},cK.apply(this,arguments)},lK=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},uK=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},dK=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},fK=y().useCallback,pK=y().useMemo,hK=y().useRef,mK=y().useState,vK=function(e){e.mfaToken;var t=e.onBind,n=(e.config,e.areaCode),r=e.setAreaCode,o=e.isInternationSms,i=e.mfaConfigsMap,a=hK(null),s=_u().t,c=dK(cT.useForm(),1)[0],l=fK((function(e){return o?y().createElement(
|
|
28286
|
+
gC.error(r),[2/*return*/,!1]):200===n?(p(!0),[2/*return*/,!0]):(gC.error(l("login.sendCodeTimeout")),[2/*return*/,!1]);case 2:if("ECONNABORTED"===(o=s.sent()).code)return gC.error(l("login.sendCodeTimeout")),[2/*return*/,!1];try{i=JSON.parse(o.message),gC.error(i.message)}catch(e){gC.error(o)}return[2/*return*/,!1];case 3:return[2/*return*/]}}))}))},type:"link"}),y().createElement(Tj,{text:l("common.sure"),ref:c,className:"g2-mfa-submit-button"})))},sK=function(e){var t=e.email,n=e.mfaToken,r=e.mfaLogin,o=e.config,i=nK(oK(t),2),a=i[0],s=i[1],c=rK(null),l=iL(),u=null==l?void 0:l.verifyCodeLength;return y().createElement(y().Fragment,null,a?y().createElement(aK,{mfaToken:n,email:a,onVerify:function(e,t){r(e,t)},sendCodeRef:c,codeLength:null!=u?u:4}):y().createElement(iK,{config:o,mfaToken:n,onBind:function(e){var t;s(e),null===(t=c.current)||void 0===t||t.click()}}))},cK=function(){return cK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},cK.apply(this,arguments)},lK=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},uK=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},dK=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},fK=y().useCallback,pK=y().useMemo,hK=y().useRef,mK=y().useState,vK=function(e){e.mfaToken;var t=e.onBind,n=(e.config,e.areaCode),r=e.setAreaCode,o=e.isInternationSms,i=e.mfaConfigsMap,a=hK(null),s=_u().t,c=dK(cT.useForm(),1)[0],l=fK((function(e){return o?y().createElement(Hq,cK({},e,{className:"authing-g2-input",size:"large",areaCode:n,onAreaCodeChange:function(e){r(e),c.getFieldValue(["phone"])&&c.validateFields(["phone"])},maxLength:20})):y().createElement(VU,cK({},e,{className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:s("login.inputPhone"),prefix:y().createElement(JD,{type:"authing-a-smartphone-line1",style:{color:"#878A95"}}),maxLength:20}))}),[n,c,o,r,s]);return y().createElement(y().Fragment,null,y().createElement("h3",{className:"authing-g2-mfa-title"},s("common.mfaCertification")),y().createElement("p",{className:"authing-g2-mfa-tips"},i.get(uB.SMS)?s("login.bindWarning"):s("login.bindPhoneInfo")),i.get(uB.SMS)?y().createElement("div",{style:{display:"flex",justifyContent:"center"}},y().createElement(JD,{type:"authing-bianzu",style:{width:178,height:120}})):y().createElement(cT,{form:c,onSubmitCapture:function(){return a.current.onSpin(!0)},onFinish:function(e){return lK(void 0,[e],void 0,(function(e){var n,r,o=e.phone;return uK(this,(function(e){switch(e.label){case 0:return[4/*yield*/,c.validateFields()];case 1:e.sent(),null===(n=a.current)||void 0===n||n.onSpin(!1);try{t(o)}catch(e){
|
|
28282
28287
|
// do nothing
|
|
28283
|
-
null===(r=a.current)||void 0===r||r.onError()}return[2/*return*/]}}))}))},onFinishFailed:function(){return a.current.onError()}},y().createElement(
|
|
28288
|
+
null===(r=a.current)||void 0===r||r.onError()}return[2/*return*/]}}))}))},onFinishFailed:function(){return a.current.onError()}},y().createElement(oU.Phone,{className:o?"authing-g2-input-form remove-padding":"authing-g2-input-form",name:"phone",form:c,
|
|
28284
28289
|
// checkRepeat={true}
|
|
28285
|
-
required:!0,areaCode:n},y().createElement(l,null)),y().createElement(Tj,{text:s("common.sure"),ref:a})))},gK=function(e){var t=e.mfaToken,n=e.phone,r=e.userPhone,o=e.onVerify,i=e.sendCodeRef,a=e.codeLength,s=void 0===a?4:a,c=e.areaCode,l=e.phoneCountryCode,u=e.isInternationSms,d=JL(),f=hK(null),p=_u().t,h=dK(cT.useForm(),1)[0],m=dK(mK(!1),2),v=m[0],g=m[1],b=gj(u,n,c),w=b.phoneNumber,C=b.countryCode;ZG((function(){var e;null===(e=i.current)||void 0===e||e.click()}));var E=JG()[zG.VerifySms],k=function(e){return lK(void 0,void 0,void 0,(function(){var e,r,i,a,s,c,u;return uK(this,(function(d){switch(d.label){case 0:return null===(c=f.current)||void 0===c||c.onSpin(!0),e=h.getFieldValue("mfaCode"),[4/*yield*/,E({mfaToken:t,phone:n,code:e,phoneCountryCode:l||C})];case 1:return r=d.sent(),i=r.isFlowEnd,a=r.data,s=r.onGuardHandling,null===(u=f.current)||void 0===u||u.onSpin(!1),i?o(200,a):(f.current.onError(),null==s||s()),[2/*return*/]}}))}))},S=pK((function(){return v?"".concat(p("login.verifyCodeSended")," ").concat(u?l||C:""," ").concat(PX(n)):p("common.SmsMfaCheck")}),[C,u,n,l,v,p]);return y().createElement(y().Fragment,null,y().createElement("h3",{className:"authing-g2-mfa-title"},p("common.mfaCertification")),y().createElement("p",{className:"authing-g2-mfa-tips"},S),y().createElement(cT,{form:h,onFinish:k,onFinishFailed:function(){return f.current.onError()}},y().createElement(Yj,{codeLength:s,ruleKeyword:p("common.captchaCode")},y().createElement(vB,{length:s,onFinish:k})),y().createElement(
|
|
28290
|
+
required:!0,areaCode:n},y().createElement(l,null)),y().createElement(Tj,{text:s("common.sure"),ref:a})))},gK=function(e){var t=e.mfaToken,n=e.phone,r=e.userPhone,o=e.onVerify,i=e.sendCodeRef,a=e.codeLength,s=void 0===a?4:a,c=e.areaCode,l=e.phoneCountryCode,u=e.isInternationSms,d=JL(),f=hK(null),p=_u().t,h=dK(cT.useForm(),1)[0],m=dK(mK(!1),2),v=m[0],g=m[1],b=gj(u,n,c),w=b.phoneNumber,C=b.countryCode;ZG((function(){var e;null===(e=i.current)||void 0===e||e.click()}));var E=JG()[zG.VerifySms],k=function(e){return lK(void 0,void 0,void 0,(function(){var e,r,i,a,s,c,u;return uK(this,(function(d){switch(d.label){case 0:return null===(c=f.current)||void 0===c||c.onSpin(!0),e=h.getFieldValue("mfaCode"),[4/*yield*/,E({mfaToken:t,phone:n,code:e,phoneCountryCode:l||C})];case 1:return r=d.sent(),i=r.isFlowEnd,a=r.data,s=r.onGuardHandling,null===(u=f.current)||void 0===u||u.onSpin(!1),i?o(200,a):(f.current.onError(),null==s||s()),[2/*return*/]}}))}))},S=pK((function(){return v?"".concat(p("login.verifyCodeSended")," ").concat(u?l||C:""," ").concat(PX(n)):p("common.SmsMfaCheck")}),[C,u,n,l,v,p]);return y().createElement(y().Fragment,null,y().createElement("h3",{className:"authing-g2-mfa-title"},p("common.mfaCertification")),y().createElement("p",{className:"authing-g2-mfa-tips"},S),y().createElement(cT,{form:h,onFinish:k,onFinishFailed:function(){return f.current.onError()}},y().createElement(Yj,{codeLength:s,ruleKeyword:p("common.captchaCode")},y().createElement(vB,{length:s,onFinish:k})),y().createElement(DU,{btnRef:i,beforeSend:function(){return lK(void 0,void 0,void 0,(function(){var e,t;return uK(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4/*yield*/,d.sendSmsCode(r||w,l||C,Ni.SCENE_TYPE_MFA_VERIFY)];case 1:return n.sent(),[2/*return*/,!0];case 2:if("ECONNABORTED"===(e=n.sent()).code)return gC.error(p("login.sendCodeTimeout")),[2/*return*/,!1];try{t=JSON.parse(e.message),gC.error(t.message)}catch(t){gC.error(e)}return[2/*return*/,!1];case 3:return[2/*return*/]}}))}))},type:"link",setSent:g}),y().createElement(Tj,{text:p("common.sure"),ref:f,className:"g2-mfa-submit-button"})))},yK=function(e){var t,n,r=e.mfaLogin,o=e.config,i=e.initData,a=i.mfaPhone,s=i.mfaToken,c=i.mfaPhoneCountryCode,l=e.mfaConfigsMap,u=dK(mK(a),2),d=u[0],f=u[1],p=hK(null),h=iL(),m=null==h?void 0:h.verifyCodeLength,v=dK(mK((null===(t=null==h?void 0:h.internationalSmsConfig)||void 0===t?void 0:t.defaultISOType)||"CN"),2),g=v[0],b=v[1],w=Boolean(null===(n=null==h?void 0:h.internationalSmsConfig)||void 0===n?void 0:n.enabled);
|
|
28286
28291
|
// todo 后续改 不用 phone 作为判断模式
|
|
28287
28292
|
return y().createElement(y().Fragment,null,d?y().createElement(gK,{mfaToken:s,phone:d,userPhone:a,phoneCountryCode:c,isInternationSms:w,onVerify:function(e,t){r(e,t)},codeLength:null!=m?m:4,sendCodeRef:p,areaCode:g}):y().createElement(vK,{config:o,mfaToken:s,areaCode:g,setAreaCode:b,isInternationSms:w,onBind:function(e){var t;f(e),null===(t=p.current)||void 0===t||t.click()},mfaConfigsMap:l}))},bK=function(){if(QG)return QG},wK={video:{width:210,height:210}};function CK(){var e=bK();if(e)return e.nets.tinyFaceDetector}!function(e){e.NotAllowedError="NotAllowedError",e.AbortError="AbortError",e.NotReadableError="NotReadableError",e.OverconstrainedError="OverconstrainedError",e.SecurityError="SecurityError"}(XG||(XG={}));var EK,kK,SK,xK=y().createContext(void 0),_K=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},PK=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},TK=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},OK=y().useCallback,NK=y().useContext,IK=y().useEffect,AK=y().useRef,RK=y().useState,MK=function(e){var t,n,r,o=NK(xK),i=tX().postForm,a=_u().t,s=TK(RK("ready"),2),c=s[0],l=s[1],u=TK(RK(0),2),d=u[0],f=u[1],p=JG(),h=oL().spinChange,m=p[zG.VerifyFace],v=p[zG.AssociateFace],g=AK(null),b=AK(null),w=AK(),C=AK(),E=AK(),k=AK(0),S=iL(),x=null==S?void 0:S.cdnBase,_=function(e){return{offset:7*e,dashStyle:{}}}(d),P=_.offset,T=_.dashStyle,O=null!==(n=null===(t=null==S?void 0:S.mfa)||void 0===t?void 0:t.faceScore)&&void 0!==n?n:.65;
|
|
28288
28293
|
// 预加载数据
|
|
@@ -28313,7 +28318,7 @@ navigator.mediaDevices?(l("identifying"),(null==o?void 0:o.setMfaBackState)&&o.s
|
|
|
28313
28318
|
// onLoadedMetadata={() => onIdentify()}
|
|
28314
28319
|
id:"inputVideo",autoPlay:!0,muted:!0,playsInline:!0}),y().createElement("div",{className:"video-round mesh",style:{display:"retry"===c?"flex":"none"},onClick:function(){l("identifying"),f(0),R()}},a("common.faceText4")),y().createElement("div",{className:"video-round ring"},y().createElement("svg",{width:240,height:240,fill:"none"},y().createElement("circle",{className:"svg-circle-running",style:T,strokeDasharray:700,strokeDashoffset:700-P,cx:120,cy:120,r:110})))),y().createElement("canvas",{style:{width:210,height:210,opacity:0,position:"absolute",display:"none"},ref:b}))},DK=function(){return DK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},DK.apply(this,arguments)},LK=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},FK=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},jK=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},BK=y().useRef,UK=function(e){var t=e.changeModule,n=e.initData,r=_u().t;return y().createElement(y().Fragment,null,y().createElement("p",{className:"authing-g2-mfa-title"},r("common.mfaCertification")),y().createElement("p",{className:"authing-g2-mfa-tips"},r("common.otpText1")),y().createElement("div",{style:{display:"flex",justifyContent:"center"}},y().createElement(JD,{type:"authing-otp",style:{width:247,height:131}})),y().createElement(Tj,{text:r("common.sure"),onClick:function(){return t(LL.BIND_TOTP,n)},className:"g2-mfa-submit-button bind-totp"}))},qK=function(e){var t=e.mfaToken,n=e.mfaLogin,r=e.changeModule,o=_u().t,i=jK(cT.useForm(),1)[0],a=BK(null),s=uL(),c=JG()[zG.VerifyTotp],l=jK(sj((function(){return LK(void 0,void 0,void 0,(function(){var e,r,o,s,l,u,d;return FK(this,(function(f){switch(f.label){case 0:return null===(u=a.current)||void 0===u||u.onSpin(!0),e=i.getFieldValue("mfaCode"),[4/*yield*/,c({totp:e,mfaToken:t})];case 1:return r=f.sent(),o=r.isFlowEnd,s=r.data,l=r.onGuardHandling,null===(d=a.current)||void 0===d||d.onSpin(!1),o?n(200,s):(a.current.onError(),null==l||l()),[2/*return*/]}}))}))}),[t]),2),u=l[1];return y().createElement(y().Fragment,null,y().createElement("p",{className:"authing-g2-mfa-title"},o("common.mfaCertification")),y().createElement("p",{className:"authing-g2-mfa-tips"},o("login.inputSixCode")),y().createElement(cT,{form:i,onSubmitCapture:function(){},onFinish:u,onFinishFailed:function(){return a.current.onError()}},y().createElement(Yj,{codeLength:6},y().createElement(vB,{length:6,showDivider:!1,gutter:"10px",onFinish:u})),y().createElement(Tj,{text:o("common.sure"),ref:a}),y().createElement("p",{className:"authing-g2-mfa-totp-recoveryCode"},o("common.hasLooseSaftyCode"),y().createElement(Cj,{type:"link",onClick:function(){r(LL.RECOVERY_CODE,DK({},s))}},o("common.useRecoverCode")))))},VK=function(e){var t=e.changeModule,n=e.initData,r=e.mfaLogin;return y().createElement(y().Fragment,null,n.totpMfaEnabled?y().createElement(qK,{mfaToken:n.mfaToken,mfaLogin:r,changeModule:t}):y().createElement(UK,{initData:n,changeModule:t}))},zK=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},$K=y().useMemo,HK=y().useState,WK=((EK={})[uB.EMAIL]={title:function(){return su.t("common.EmailVerification")},icon:"authing-mail"},EK[uB.SMS]={title:function(){return su.t("common.SMS")},icon:"authing-phone"},EK[uB.TOTP]={title:function(){return su.t("common.OTPVerification")},icon:"authing-totp"},EK[uB.FACE]={title:function(){return su.t("common.faceVerification")},icon:"authing-face"},EK[uB.PASSKEY]={title:function(){return"Passkey"},icon:"authing-slideshow-3-line"},EK),GK=function(e){var t=e.method,n=e.onChangeMethod,r=zK(HK(t),2),o=r[0],i=r[1],a=_u().t,s=uL().applicationMfa,c=$K((function(){return s.filter((function(e){return Object.keys(WK).includes(e.mfaPolicy)})).filter((function(e){return e.mfaPolicy!==o})).filter((function(e){if(e.mfaPolicy===uB.FACE){var t=bK();return Boolean(t)}return!0})).sort((function(e,t){return e.sort-t.sort})).map((function(e){return y().createElement(Cj,{className:"g2-guard-mfa-methods-btn",onClick:function(t){n(e.mfaPolicy),i(e.mfaPolicy)},key:e.mfaPolicy},y().createElement(JD,{type:WK[e.mfaPolicy].icon}),"".concat(WK[e.mfaPolicy].title()))}))}),[s,o,n]);return y().createElement(y().Fragment,null,0!==c.length&&y().createElement(y().Fragment,null,y().createElement("div",{style:{minHeight:32}}),y().createElement("div",{className:"g2-mfa-method"},y().createElement("div",{className:"g2-mfa-method-title"},a("login.otherVerifyWay")),c)))},KK={
|
|
28315
28320
|
// 待添加
|
|
28316
|
-
2021:{action:"changeModule",module:LL.LOGIN},1700:{action:"insideFix",message:"verification failed, let components inside fix is fine."},1701:{action:"insideFix",message:"verification failed, let components inside fix is fine."},1702:{action:"insideFix",message:"verification failed, let components inside fix is fine."},500:{action:"message"},6001:{action:"message"},602:{action:"message"}},YK=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},JK=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},ZK=function(e){return YK(void 0,void 0,void 0,(function(){return JK(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4/*yield*/,
|
|
28321
|
+
2021:{action:"changeModule",module:LL.LOGIN},1700:{action:"insideFix",message:"verification failed, let components inside fix is fine."},1701:{action:"insideFix",message:"verification failed, let components inside fix is fine."},1702:{action:"insideFix",message:"verification failed, let components inside fix is fine."},500:{action:"message"},6001:{action:"message"},602:{action:"message"}},YK=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},JK=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},ZK=function(e){return YK(void 0,void 0,void 0,(function(){return JK(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4/*yield*/,HH(e)];case 1:return[2/*return*/,t.sent()];case 2:return t.sent(),[3/*break*/,3];case 3:return[2/*return*/]}}))}))},QK=function(e){return YK(void 0,void 0,void 0,(function(){return JK(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4/*yield*/,WH(e)];case 1:return[2/*return*/,t.sent()];case 2:return t.sent(),[3/*break*/,3];case 3:return[2/*return*/]}}))}))},XK=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},eY=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},tY=function(e){var t=e.mfaToken,n=e.mfaLogin,r=e.mfaConfigsMap,o=y().useRef(null),i=JG()[zG.PasskeyBind],a=_u().t,s=iL(),c=null==s?void 0:s.cdnBase;return y().createElement(y().Fragment,null,y().createElement("h3",{className:"authing-g2-mfa-title"},a("common.cratePasskeyTitle")),r.get(uB.PASSKEY)?y().createElement(y().Fragment,null,y().createElement("p",{className:"authing-g2-mfa-tips"},a("common.onBindPasskeyTitle")),y().createElement("div",{style:{display:"flex",justifyContent:"center"}},y().createElement(JD,{type:"authing-bianzu",style:{width:178,height:120}}))):y().createElement(y().Fragment,null,y().createElement("p",{className:"authing-g2-mfa-tips"},a("common.cratePasskeyTips")),y().createElement(Hj,{
|
|
28317
28322
|
// className="g2-mfa-passkey-empty-image"
|
|
28318
28323
|
width:215,height:145,src:"".concat(c,"/passkey/guard-bind-passkey-press.png"),alt:"",className:"g2-mfa-register-passkey-image"}),y().createElement(Tj,{onClick:function(){return XK(void 0,void 0,void 0,(function(){var e,r,a,s,c,l,u,d,f;return eY(this,(function(p){switch(p.label){case 0:null===(u=o.current)||void 0===u||u.onSpin(!0),p.label=1;case 1:return p.trys.push([1,5,6,7]),[4/*yield*/,(h={mfaToken:t},GG(void 0,void 0,void 0,(function(){var e;return KG(this,(function(t){switch(t.label){case 0:return e=h.mfaToken,[4/*yield*/,(0,eX().post)("/api/v3/webauthn/mfa-bind/initialize",{},{headers:{authorization:"Bearer ".concat(e)}})];case 1:return[2/*return*/,t.sent()]}}))})))];case 2:return 200!==(e=p.sent()).statusCode?(gC.error(e.message),[2/*return*/]):[4/*yield*/,ZK(e.data)];case 3:return r=p.sent(),[4/*yield*/,i(r)];case 4:return a=p.sent()||{},s=a.isFlowEnd,c=a.data,l=a.onGuardHandling,s?n(200,c):(null===(d=o.current)||void 0===d||d.onError(),null==l||l()),[3/*break*/,7];case 5:return p.sent(),[3/*break*/,7];case 6:return null===(f=o.current)||void 0===f||f.onSpin(!1),[7/*endfinally*/];case 7:return[2/*return*/]}var h}))}))},text:a("common.createNow"),className:"bind-passkey-btn",htmlType:"button",ref:o})))},nY=function(e){var t=e.mfaToken,n=e.mfaLogin,r=y().useRef(null),o=JG()[zG.PasskeyVerify],i=_u().t,a=iL(),s=null==a?void 0:a.cdnBase,c=y().useCallback((function(){return XK(void 0,void 0,void 0,(function(){var e,i,a,s,c,l,u,d,f,p;return eY(this,(function(h){switch(h.label){case 0:null===(u=r.current)||void 0===u||u.onSpin(!0),h.label=1;case 1:return h.trys.push([1,5,6,7]),[4/*yield*/,(m={mfaToken:t},GG(void 0,void 0,void 0,(function(){var e;return KG(this,(function(t){switch(t.label){case 0:return e=m.mfaToken,[4/*yield*/,(0,eX().post)("/api/v3/webauthn/mfa-verify/initialize",{},{headers:{authorization:"Bearer ".concat(e)}})];case 1:return[2/*return*/,t.sent()]}}))})))];case 2:return 200!==(e=h.sent()).statusCode?(gC.error(e.message),[2/*return*/]):[4/*yield*/,QK(e.data)];case 3:return i=h.sent(),[4/*yield*/,o({credential:i,ticket:(null===(d=e.data)||void 0===d?void 0:d.ticket)||""})];case 4:return a=h.sent()||{},s=a.isFlowEnd,c=a.data,l=a.onGuardHandling,s?n(200,c):(null===(f=r.current)||void 0===f||f.onError(),null==l||l()),[3/*break*/,7];case 5:return h.sent(),[3/*break*/,7];case 6:return null===(p=r.current)||void 0===p||p.onSpin(!1),[7/*endfinally*/];case 7:return[2/*return*/]}var m}))}))}),[]);
|
|
28319
28324
|
// 首次进入页面立即开始验证
|
|
@@ -28344,20 +28349,20 @@ null===(g=s.current)||void 0===g||g.onError(),[3/*break*/,6];case 5:return null=
|
|
|
28344
28349
|
// 开关控制 如果没有 register 就不开启了
|
|
28345
28350
|
return!!iL().complateFiledsPlace.includes("register")&&(
|
|
28346
28351
|
// 排除掉已有的字段
|
|
28347
|
-
!(!Boolean(hd()(t,e))||0===t.length)&&(1!==t.length||t[0].name!==e))},zY=function(){return zY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},zY.apply(this,arguments)},$Y=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},HY=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},WY=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},GY=y().useRef,KY=y().useState,YY=y().useCallback,JY=y().useMemo,ZY=y().useEffect,QY=function(e){var t,n,r,o,i=e.label,a=e.method,s=e.onRegisterSuccess,c=e.onRegisterFailed,l=e.onBeforeRegister,u=e.agreements,d=e.registeContext,f=e.publicConfig,p=_u().t,h=GY(null),m=vj().isPhoneMedia,v=JL(),g=WY(cT.useForm(),1)[0],b=hL(),w=VY((a||"email").split("-")[0]),C=pL().changeModule,E=aL().post,k=wL("register"),S=WY(KY(!1),2),x=S[0],_=S[1],P=GY([]),T=WY(KY(!1),2),O=T[0],N=T[1],I=WY(KY(""),2),A=I[0],R=I[1],M=WY(KY((null===(t=null==f?void 0:f.internationalSmsConfig)||void 0===t?void 0:t.defaultISOType)||"CN"),2),D=M[0],L=M[1],F=(null===(n=null==f?void 0:f.internationalSmsConfig)||void 0===n?void 0:n.enabled)||!1,j=!b.autoRegister&&(null==f?void 0:f.enabledPPRegisterValid),B=null!==(r=null==f?void 0:f.verifyCodeLength)&&void 0!==r?r:4,U=
|
|
28352
|
+
!(!Boolean(hd()(t,e))||0===t.length)&&(1!==t.length||t[0].name!==e))},zY=function(){return zY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},zY.apply(this,arguments)},$Y=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},HY=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},WY=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},GY=y().useRef,KY=y().useState,YY=y().useCallback,JY=y().useMemo,ZY=y().useEffect,QY=function(e){var t,n,r,o,i=e.label,a=e.method,s=e.onRegisterSuccess,c=e.onRegisterFailed,l=e.onBeforeRegister,u=e.agreements,d=e.registeContext,f=e.publicConfig,p=_u().t,h=GY(null),m=vj().isPhoneMedia,v=JL(),g=WY(cT.useForm(),1)[0],b=hL(),w=VY((a||"email").split("-")[0]),C=pL().changeModule,E=aL().post,k=wL("register"),S=WY(KY(!1),2),x=S[0],_=S[1],P=GY([]),T=WY(KY(!1),2),O=T[0],N=T[1],I=WY(KY(""),2),A=I[0],R=I[1],M=WY(KY((null===(t=null==f?void 0:f.internationalSmsConfig)||void 0===t?void 0:t.defaultISOType)||"CN"),2),D=M[0],L=M[1],F=(null===(n=null==f?void 0:f.internationalSmsConfig)||void 0===n?void 0:n.enabled)||!1,j=!b.autoRegister&&(null==f?void 0:f.enabledPPRegisterValid),B=null!==(r=null==f?void 0:f.verifyCodeLength)&&void 0!==r?r:4,U=uU(),q=U.getPassWordUnsafeText,V=U.setPasswordErrorTextShow,z=WY(sj((function(e){return $Y(void 0,void 0,void 0,(function(){var t,n,r,o,i,f,p,m,g,y,k,S,_,T,O,I,A,R,M,L,B,U;return HY(this,(function(q){switch(q.label){case 0:if(null===(L=h.current)||void 0===L||L.onSpin(!0),!l)return[3/*break*/,4];q.label=1;case 1:return q.trys.push([1,3,,4]),[4/*yield*/,l({type:Pi.Email,data:{identity:e.email||e.account,password:e.password,code:e.code}},v)];case 2:return q.sent()?[3/*break*/,4]:(null===(B=h.current)||void 0===B||B.onSpin(!1),[2/*return*/]);case 3:return"string"==typeof(t=q.sent())?gC.error(t):gC.error(null==t?void 0:t.message),null===(U=h.current)||void 0===U||U.onSpin(!1),[2/*return*/];case 4:
|
|
28348
28353
|
// await form.validateFields()
|
|
28349
28354
|
return N(!0),(null==u?void 0:u.length)&&!x?(h.current.onError(),[2/*return*/]):(n=e.email,r=e.password,o=e.account,[4/*yield*/,(0,v.options.encryptFunction)(r,b.publicKey)]);case 5:return i=q.sent(),f=null!=d?d:{},"phone-password"===a&&(y=gj(F,o,D),k=y.phoneNumber,S=y.countryCode,o=k,p=S,j&&(m=null==e?void 0:e.code,g={phone:k})),_={account:o,// 自定义字段登录用户名
|
|
28350
|
-
email:n,password:i,phoneCountryCode:p,profile:zY({browser:"undefined"!=typeof navigator?navigator.userAgent:null,device:fX()},g),forceLogin:!1,generateToken:!0,clientIp:void 0,params:(null==b?void 0:b.isHost)?JSON.stringify(yX()):void 0,context:JSON.stringify(f),phoneToken:m,agreementIds:u.length?P.current:void 0},T=function(e){s(e,{registerFrom:Pi.Email,account:n||o})},w?(null==C||C(LL.REGISTER_COMPLETE_INFO,{businessRequestName:a||"registerByEmail",content:zY({},_),onRegisterSuccess:T,onRegisterFailed:c}),[2/*return*/]):[4/*yield*/,E("/api/v2/register-".concat((a||"email").split("-")[0]),zY(zY({},_),{postUserInfoPipeline:!1}))];case 6:return O=q.sent(),I=O.statusCode,A=O.data,R=O.message,M=O.apiCode,200===I?T(A):(M===TQ.UNSAFE_PASSWORD_TIP&&V(!0),h.current.onError(),c(M,A,R),gC.error(R)),[2/*return*/]}}))}))}),[g,x,D],{loading:!1}),2),$=z[1],H=YY((function(e){var t;return f&&(null===(t=f.internationalSmsConfig)||void 0===t?void 0:t.enabled)?y().createElement(
|
|
28355
|
+
email:n,password:i,phoneCountryCode:p,profile:zY({browser:"undefined"!=typeof navigator?navigator.userAgent:null,device:fX()},g),forceLogin:!1,generateToken:!0,clientIp:void 0,params:(null==b?void 0:b.isHost)?JSON.stringify(yX()):void 0,context:JSON.stringify(f),phoneToken:m,agreementIds:u.length?P.current:void 0},T=function(e){s(e,{registerFrom:Pi.Email,account:n||o})},w?(null==C||C(LL.REGISTER_COMPLETE_INFO,{businessRequestName:a||"registerByEmail",content:zY({},_),onRegisterSuccess:T,onRegisterFailed:c}),[2/*return*/]):[4/*yield*/,E("/api/v2/register-".concat((a||"email").split("-")[0]),zY(zY({},_),{postUserInfoPipeline:!1}))];case 6:return O=q.sent(),I=O.statusCode,A=O.data,R=O.message,M=O.apiCode,200===I?T(A):(M===TQ.UNSAFE_PASSWORD_TIP&&V(!0),h.current.onError(),c(M,A,R),gC.error(R)),[2/*return*/]}}))}))}),[g,x,D],{loading:!1}),2),$=z[1],H=YY((function(e){var t;return f&&(null===(t=f.internationalSmsConfig)||void 0===t?void 0:t.enabled)?y().createElement(Hq,zY({},e,{className:"authing-g2-input",size:"large",areaCode:D,onAreaCodeChange:function(e){L(e),g.getFieldValue(["phone"])&&g.validateFields(["phone"])},maxLength:20})):y().createElement(VU,zY({},e,{className:"authing-g2-input",size:"large",placeholder:p("login.inputPhone"),prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}}),maxLength:11}))}),[D,g,f,p]),W=YY((function(e){return F?y().createElement(JU,zY({},e,{isInternationSms:F,form:g,fieldName:"account",className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:p("common.inputFourVerifyCode",{length:B}),areaCode:D,prefix:y().createElement(JD,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:Ni.SCENE_TYPE_REGISTER,maxLength:B,codeFieldName:"captchaCode",onSendCodeBefore:function(){return $Y(void 0,void 0,void 0,(function(){return HY(this,(function(e){switch(e.label){case 0:return[4/*yield*/,g.validateFields(["account"])];case 1:return e.sent(),[4/*yield*/,g.validateFields(["captchaCode"])];case 2:return e.sent(),[2/*return*/]}}))}))},onSendCodeAfter:function(){return R(Uz(b.host))}})):y().createElement(JU,zY({},e,{form:g,fieldName:"account",className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:p("common.inputFourVerifyCode",{length:B}),maxLength:B,scene:Ni.SCENE_TYPE_REGISTER,prefix:y().createElement(JD,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),codeFieldName:"captchaCode",onSendCodeBefore:function(){return $Y(void 0,void 0,void 0,(function(){return HY(this,(function(e){switch(e.label){case 0:return[4/*yield*/,g.validateFields(["account"])];case 1:return e.sent(),[4/*yield*/,g.validateFields(["captchaCode"])];case 2:return e.sent(),[2/*return*/]}}))}))},onSendCodeAfter:function(){return R(Uz(b.host))}}))}),[D,g,F,p,B]);ZY((function(){
|
|
28351
28356
|
/** 如果是国外用户池,那么有图形验证码,需要请求图片 */
|
|
28352
|
-
k&&R(
|
|
28357
|
+
k&&R(Uz(b.host))}),[k,null==b?void 0:b.host]),ZY((function(){
|
|
28353
28358
|
// 方法发生变化时,图像验证码数据应该清空
|
|
28354
|
-
k&&(null==g||g.setFieldsValue({captchaCode:void 0}))}),[g,k]);var G=JY((function(){var e;return a?"phone-password"===a?y().createElement(y().Fragment,null,y().createElement(
|
|
28359
|
+
k&&(null==g||g.setFieldsValue({captchaCode:void 0}))}),[g,k]);var G=JY((function(){var e;return a?"phone-password"===a?y().createElement(y().Fragment,null,y().createElement(oU.Phone,{key:"account",name:"account",className:(null===(e=null==f?void 0:f.internationalSmsConfig)||void 0===e?void 0:e.enabled)?"authing-g2-input-form remove-padding":"authing-g2-input-form",
|
|
28355
28360
|
// validateFirst={true} // 会多次触发 find 接口
|
|
28356
|
-
form:g,checkRepeat:!0,required:!0,areaCode:D},y().createElement(H,{autoFocus:!m})),j&&y().createElement(y().Fragment,null,k&&y().createElement(cT.Item,{className:"authing-g2-input-form",validateTrigger:["onBlur","onChange"],name:"captchaCode",rules:dX(p("common.captchaCode"))},y().createElement(
|
|
28361
|
+
form:g,checkRepeat:!0,required:!0,areaCode:D},y().createElement(H,{autoFocus:!m})),j&&y().createElement(y().Fragment,null,k&&y().createElement(cT.Item,{className:"authing-g2-input-form",validateTrigger:["onBlur","onChange"],name:"captchaCode",rules:dX(p("common.captchaCode"))},y().createElement(kz,{className:"authing-g2-input",size:"large",placeholder:p("login.inputCaptchaCode"),verifyCodeUrl:A,changeCode:function(){return R(Uz(b.host))}})),y().createElement(cT.Item,{key:"code",name:"code",validateTrigger:["onBlur","onChange"],rules:dX(p("common.captchaCode")),className:"authing-g2-input-form"},y().createElement(W,null)))):y().createElement(oU.CustomName,{method:null==a?void 0:a.split("-")[0],key:a,name:"account",className:"authing-g2-input-form",validateFirst:!0,form:g,checkRepeat:!0,required:!0},y().createElement(oO,{maxLength:50,autoFocus:!m,className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:p("login.inputAccount",{text:i}),prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}})})):null}),[H,a,m,D,i,p,g,A,null===(o=null==f?void 0:f.internationalSmsConfig)||void 0===o?void 0:o.enabled]);return y().createElement("div",{className:"authing-g2-register-email"},y().createElement(cT,{form:g,name:"emailRegister",autoComplete:"off",onSubmitCapture:function(){return h.current.onSpin(!0)},onFinish:function(e){$(e)},onFinishFailed:function(){return h.current.onError()},onValuesChange:function(e,t){t.password&&t["new-password"]&&g.validateFields(["new-password"])}},a&&i?G:y().createElement(oU.Email,{key:"email",name:"email",className:"authing-g2-input-form",validateFirst:!0,form:g,checkRepeat:!0,required:!0},y().createElement(oO,{autoFocus:!m,className:"authing-g2-input",autoComplete:"off",size:"large",placeholder:p("login.inputEmail"),
|
|
28357
28362
|
// prefix={<UserOutlined style={{ color: '#878A95' }} />}
|
|
28358
|
-
prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),y().createElement(
|
|
28363
|
+
prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),y().createElement(oU.Password,{key:"password",name:"password",className:"authing-g2-input-form",validateFirst:!0},y().createElement(sU,{className:"authing-g2-input",size:"large",placeholder:p("login.inputPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),y().createElement(oU.Password,{key:"new-password",name:"new-password",fieldRequiredRuleMessage:p("common.repeatPasswordDoc"),rules:[{validateTrigger:"onBlur",validator:function(e,t){return t!==g.getFieldValue("password")&&t?Promise.reject(p("common.repeatPasswordDoc")):Promise.resolve()}}],className:"authing-g2-input-form",validateFirst:!0},y().createElement(sU,{className:"authing-g2-input",size:"large",placeholder:p("common.passwordAgain"),
|
|
28359
28364
|
// prefix={<LockOutlined style={{ color: '#878A95' }} />}
|
|
28360
|
-
prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),Boolean(null==u?void 0:u.length)&&y().createElement(
|
|
28365
|
+
prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),Boolean(null==u?void 0:u.length)&&y().createElement(Iz,{onChange:function(e,t){_(e),P.current=t},agreements:u,showError:O}),q(),y().createElement(cT.Item,{className:"authing-g2-sumbit-form"},y().createElement(Tj,{
|
|
28361
28366
|
// disabled={
|
|
28362
28367
|
// !!agreements.find((item) => item.required && !acceptedAgreements)
|
|
28363
28368
|
// }
|
|
@@ -28365,7 +28370,7 @@ text:p("common.register"),ref:h}))))},XY=function(){return XY=Object.assign||fun
|
|
|
28365
28370
|
// 开启国际化配置且登录方式为手机号码时
|
|
28366
28371
|
1===d.length&&"phone-code"===d[0]&&c&&(null===(e=c.internationalSmsConfig)||void 0===e?void 0:e.enabled)&&H(!0)}),[d,c]),oJ((function(){
|
|
28367
28372
|
/** 如果是国外用户池,那么有图形验证码,需要请求图片 */
|
|
28368
|
-
G&&J(
|
|
28373
|
+
G&&J(Uz(m.host))}),[G,null==m?void 0:m.host]),oJ((function(){
|
|
28369
28374
|
// 方法发生变化时,图像验证码数据应该清空
|
|
28370
28375
|
G&&(null==E||E.setFieldsValue({captchaCode:void 0}))}),[E,D,G]);var Z=rJ((function(e){return eJ(void 0,void 0,void 0,(function(){var t,n,r,u,d,f,h,v,y,k,x,P,T,N,A,R,M,D,L,F,j,B,U,q,V,z,$,H;return tJ(this,(function(G){switch(G.label){case 0:if(t=(null===(V=m.passwordLoginMethods)||void 0===V?void 0:V.includes("phone-password"))&&(null==c?void 0:c.enableCompletePassword),null===(z=C.current)||void 0===z||z.onSpin(!0),e.phone=e.identify,!a)return[3/*break*/,4];G.label=1;case 1:return G.trys.push([1,3,,4]),[4/*yield*/,a({type:Ws.Phone,data:{identity:e.phone,password:e.password,code:e.code}},g)];case 2:return G.sent()?[3/*break*/,4]:(C.current.onSpin(!1),[2/*return*/]);case 3:return"string"==typeof(n=G.sent())?gC.error(n):gC.error(null==n?void 0:n.message),C.current.onSpin(!1),[2/*return*/];case 4:return G.trys.push([4,12,13,14]),[4/*yield*/,E.validateFields()];case 5:return G.sent(),O(!0),(null==s?void 0:s.length)&&!S?(
|
|
28371
28376
|
// message.error(t('common.registerProtocolTips'))
|
|
@@ -28379,9 +28384,9 @@ params:(null==m?void 0:m.isHost)?JSON.stringify(yX()):void 0},f=function(e){o(e,
|
|
|
28379
28384
|
// 验证码校验通过 进入密码补全流程
|
|
28380
28385
|
return p=U.sent(),k=p.statusCode,v=p.data,_=v.valid,P=v.message,200===k&&_?(null==b||b(LL.REGISTER_PASSWORD,{businessRequestName:"registerByEmailCode",//用于判断后续使用哪个注册api
|
|
28381
28386
|
content:XY({},d),isChangeComplete:h,onRegisterSuccess:f,onRegisterFailed:i}),[2/*return*/]):(C.current.onError(),gC.error(P),[2/*return*/]);case 7:return h?[4/*yield*/,w("/api/v2/email/preCheckCode",{email:r,emailCode:L})]:[3/*break*/,9];case 8:return y=U.sent(),k=y.statusCode,x=y.data,_=x.valid,P=x.message,200===k&&_?(null==b||b(LL.REGISTER_COMPLETE_INFO,{businessRequestName:"registerByEmailCode",//用于判断后续使用哪个注册api
|
|
28382
|
-
content:XY({},d),onRegisterSuccess:f,onRegisterFailed:i}),[2/*return*/]):(C.current.onError(),gC.error(P),[2/*return*/]);case 9:return[4/*yield*/,w("/api/v2/register-email-code",XY(XY({},d),{postUserInfoPipeline:!1}))];case 10:T=U.sent(),N=T.statusCode,F=T.data,I=T.apiCode,A=T.onGuardHandling,R=T.message,C.current.onSpin(!1),200===N?f(F):(null==A||A(),i(I,F,R)),U.label=11;case 11:return[3/*break*/,14];case 12:return M=U.sent(),D=M.message,L=M.code,F=M.data,C.current.onError(),gC.error(D),!t&&i(L,F,gC),[3/*break*/,14];case 13:return null===(B=C.current)||void 0===B||B.onSpin(!1),[7/*endfinally*/];case 14:return[2/*return*/]}}))}))}),[null==m?void 0:m.isHost,m.passwordLoginMethods,a,g,E,null==s?void 0:s.length,S,l,w,b,h,o,i,null==c?void 0:c.enableCompletePassword]),X=rJ((function(e){return eJ(void 0,void 0,void 0,(function(){return tJ(this,(function(t){switch(t.label){case 0:return D!==Pc.EmailCode?[3/*break*/,2]:[4/*yield*/,Q(e)];case 1:return t.sent(),[3/*break*/,4];case 2:return D!==Pc.PhoneCode?[3/*break*/,4]:[4/*yield*/,Z(e)];case 3:t.sent(),t.label=4;case 4:return[2/*return*/]}}))}))}),[D,Q,Z]),ee=rJ((function(e){return $?y().createElement(
|
|
28387
|
+
content:XY({},d),onRegisterSuccess:f,onRegisterFailed:i}),[2/*return*/]):(C.current.onError(),gC.error(P),[2/*return*/]);case 9:return[4/*yield*/,w("/api/v2/register-email-code",XY(XY({},d),{postUserInfoPipeline:!1}))];case 10:T=U.sent(),N=T.statusCode,F=T.data,I=T.apiCode,A=T.onGuardHandling,R=T.message,C.current.onSpin(!1),200===N?f(F):(null==A||A(),i(I,F,R)),U.label=11;case 11:return[3/*break*/,14];case 12:return M=U.sent(),D=M.message,L=M.code,F=M.data,C.current.onError(),gC.error(D),!t&&i(L,F,gC),[3/*break*/,14];case 13:return null===(B=C.current)||void 0===B||B.onSpin(!1),[7/*endfinally*/];case 14:return[2/*return*/]}}))}))}),[null==m?void 0:m.isHost,m.passwordLoginMethods,a,g,E,null==s?void 0:s.length,S,l,w,b,h,o,i,null==c?void 0:c.enableCompletePassword]),X=rJ((function(e){return eJ(void 0,void 0,void 0,(function(){return tJ(this,(function(t){switch(t.label){case 0:return D!==Pc.EmailCode?[3/*break*/,2]:[4/*yield*/,Q(e)];case 1:return t.sent(),[3/*break*/,4];case 2:return D!==Pc.PhoneCode?[3/*break*/,4]:[4/*yield*/,Z(e)];case 3:t.sent(),t.label=4;case 4:return[2/*return*/]}}))}))}),[D,Q,Z]),ee=rJ((function(e){return $?y().createElement(JU,XY({},e,{form:E,fieldName:"identify",className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:f("common.inputFourVerifyCode",{length:R}),areaCode:I,prefix:y().createElement(JD,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),isInternationSms:W,scene:Ni.SCENE_TYPE_REGISTER,maxLength:R,onSendCodeBefore:function(){return eJ(void 0,void 0,void 0,(function(){return tJ(this,(function(e){switch(e.label){case 0:return[4/*yield*/,E.validateFields(["identify"])];case 1:return e.sent(),[4/*yield*/,E.validateFields(["captchaCode"])];case 2:return e.sent(),[2/*return*/]}}))}))},onSendCodeAfter:function(){return J(Uz(m.host))}})):y().createElement(y().Fragment,null,D===Pc.PhoneCode&&y().createElement(JU,XY({},e,{isInternationSms:W,className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:f("common.inputFourVerifyCode",{length:R}),areaCode:I,prefix:y().createElement(JD,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:Ni.SCENE_TYPE_REGISTER,maxLength:R,data:j,captchaCode:q,onSendCodeBefore:function(){return eJ(void 0,void 0,void 0,(function(){return tJ(this,(function(e){switch(e.label){case 0:return[4/*yield*/,E.validateFields(["identify"])];case 1:return e.sent(),[4/*yield*/,E.validateFields(["captchaCode"])];case 2:return e.sent(),[2/*return*/]}}))}))},onSendCodeAfter:function(){return J(Uz(m.host))}})),D===Pc.EmailCode&&y().createElement(Fq,XY({},e,{className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:f("common.inputFourVerifyCode",{length:R}),prefix:y().createElement(JD,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:Oc.REGISTER_VERIFY_CODE,maxLength:R,data:j,onSendCodeBefore:function(){return eJ(void 0,void 0,void 0,(function(){return tJ(this,(function(e){switch(e.label){case 0:return[4/*yield*/,E.validateFields(["identify"])];case 1:return e.sent(),[2/*return*/]}}))}))}})))}),[I,D,E,j,W,$,f,R,q]),te=rJ((function(e){return y().createElement(Hq,XY({},e,{className:"authing-g2-input",size:"large",areaCode:I,onAreaCodeChange:function(e){A(e),E.getFieldValue(["identify"])&&E.validateFields(["identify"])}}))}),[I,E]);return y().createElement("div",{className:"authing-g2-register-email"},y().createElement(cT,{form:E,name:"emailRegister",autoComplete:"off",onSubmitCapture:function(){return C.current.onSpin(!0)},onFinish:X,onFinishFailed:function(){return C.current.onError()}},y().createElement(VV,{name:"identify",className:$?"authing-g2-input-form remove-padding":"authing-g2-input-form",methods:d,currentMethod:D,areaCode:I,checkRepeat:!0,required:!0},$?y().createElement(te,{autoFocus:!v}):y().createElement(EW,{className:"authing-g2-input",size:"large",autoFocus:!v,value:j,methods:d,onChange:function(e){var t=e.target.value;B(t),1!==d.length&&(uX("email",t)?L(Pc.EmailCode):
|
|
28383
28388
|
// 放开手机号校验 方便同时开启邮箱和短信国际化手机号通过
|
|
28384
|
-
L(Pc.PhoneCode))},prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),G&&D===Pc.PhoneCode&&y().createElement(cT.Item,{className:"authing-g2-input-form",validateTrigger:["onBlur","onChange"],name:"captchaCode",rules:dX(f("common.captchaCode"))},y().createElement(
|
|
28389
|
+
L(Pc.PhoneCode))},prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),G&&D===Pc.PhoneCode&&y().createElement(cT.Item,{className:"authing-g2-input-form",validateTrigger:["onBlur","onChange"],name:"captchaCode",rules:dX(f("common.captchaCode"))},y().createElement(kz,{className:"authing-g2-input",size:"large",placeholder:f("login.inputCaptchaCode"),verifyCodeUrl:Y,changeCode:function(){return J(Uz(m.host))},onChange:function(e){V(e.target.value)}})),y().createElement(cT.Item,{key:"code",name:"code",validateTrigger:["onBlur","onChange"],rules:dX(f("common.captchaCode")),className:"authing-g2-input-form",validateFirst:!0},y().createElement(ee,null)),Boolean(null==s?void 0:s.length)&&y().createElement(Iz,{onChange:function(e,t){x(e),_.current=t},agreements:s,showError:T}),y().createElement(cT.Item,{className:"authing-g2-sumbit-form"},y().createElement(Tj,{
|
|
28385
28390
|
// disabled={
|
|
28386
28391
|
// !!agreements.find((item) => item.required && !acceptedAgreements)
|
|
28387
28392
|
// }
|
|
@@ -28395,22 +28400,22 @@ null===(n=null==c?void 0:c.onLogin)||void 0===n||n.call(c,e,h)},E=function(e,t,n
|
|
|
28395
28400
|
// @ts-ignore
|
|
28396
28401
|
return o.methods.filter((function(t){return e.includes(t)}))}),[o.methods]),_=xJ((function(){var e=["email-code","phone-code"];return o.methods.filter((function(t){return e.includes(t)}))}),[o.methods]),P=xJ((function(){return r?"".concat(s("common.bind")," / ").concat(s("common.register")):s("common.bind")}),[r,s]),T=[{key:"code",title:s("common.verifyCodeLogin"),component:y().createElement(RW,{verifyCodeLength:null==d?void 0:d.verifyCodeLength,autoRegister:!!r,onLoginRequest:k,
|
|
28397
28402
|
// onLogin={onLogin}
|
|
28398
|
-
onLoginSuccess:C,onLoginFailed:E,agreements:S,methods:_,submitButText:P})},{key:"password",title:s("login.bindPwdLogin"),component:y().createElement(
|
|
28403
|
+
onLoginSuccess:C,onLoginFailed:E,agreements:S,methods:_,submitButText:P})},{key:"password",title:s("login.bindPwdLogin"),component:y().createElement(Zz,{publicKey:l,autoRegister:!!r,host:i.host,onLoginRequest:k,passwordLoginMethods:x,
|
|
28399
28404
|
// onLogin={onLogin}
|
|
28400
|
-
onLoginSuccess:C,onLoginFailed:E,agreements:S,submitButText:P})}],O=xJ((function(){return o.source===LL.IDENTITY_BINDING_ASK?y().createElement(_B,{onBack:function(){return null==a?void 0:a()}},s("common.back")):y().createElement(xB,null)}),[a,o.source,s]);return y().createElement("div",{className:"g2-view-container g2-view-identity-binding"},O,y().createElement("div",{className:"g2-view-identity-binding-content"},y().createElement("div",{className:"g2-view-identity-binding-content-logo"},y().createElement("img",{src:null==i?void 0:i.logo,alt:"",className:"logo"})),y().createElement("div",{className:"g2-view-identity-binding-content-title"},y().createElement("span",null,s(r?"common.identityBindingSkipAskTitle":"common.identityBindingTitle"))),y().createElement("div",{className:"g2-view-identity-binding-content-desc"},y().createElement("span",null,s(r?"common.identityBindingSkipAskDesc":"common.identityBindingDesc"))),y().createElement("div",{className:"g2-view-identity-binding-content-login"},y().createElement(xR,null,T.filter((function(e){return"password"===e.key?0!==x.length:"code"!==e.key||0!==_.length})).map((function(e){return y().createElement(xR.TabPane,{key:e.key,tab:e.title},e.component)}))))))},PJ=function(){return PJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},PJ.apply(this,arguments)},TJ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},OJ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},NJ=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},IJ=function(){var e=uL(),t=pL().changeModule;OB();var n=_u().t,r=tX().authFlow,o=JL(),i=fL(),a=oL().spinChange,s=NJ(sj((function(){return TJ(void 0,void 0,void 0,(function(){var e,t,n,s,c;return OJ(this,(function(l){switch(l.label){case 0:return a(!0),[4/*yield*/,r(kY.CreateUser)];case 1:return e=l.sent(),t=e.code,n=e.onGuardHandling,s=e.data,c=e.isFlowEnd,a(!1),c?function(e){var t,n;null===(t=null==i?void 0:i.onLogin)||void 0===t||t.call(i,e,o),null===(n=null==i?void 0:i.onCreate)||void 0===n||n.call(i,e,o)}(s):(!function(e,t){var n,r;null===(n=null==i?void 0:i.onCreateError)||void 0===n||n.call(i,{code:e,data:t}),null===(r=null==i?void 0:i.onLoginError)||void 0===r||r.call(i,{code:e,data:t})}(t,s),null==n||n()),[2/*return*/]}}))}))}),[]),2),c=s[0],l=s[1];return y().createElement("div",{className:"g2-view-container g2-view-identity-binding-ask"},y().createElement(xB,null),y().createElement("div",{className:"g2-view-identity-binding-ask-content"},y().createElement("div",{className:"g2-view-identity-binding-ask-content-title"},y().createElement("span",null,n("common.identityBindingAskTitle"))),y().createElement("div",{className:"g2-view-identity-binding-ask-content-desc"},y().createElement("span",null,n("common.identityBindingAskDesc"))),y().createElement("div",{className:"g2-view-identity-binding-ask-content-img"},y().createElement(JD,{type:"authing-bind"})),y().createElement("div",{className:"g2-view-identity-binding-ask-content-button-group"},y().createElement(Cj,{className:"g2-view-identity-binding-ask-content-button g2-view-identity-binding-ask-content-button-create",loading:c.loading,onClick:l},n("common.identityBindingCreate")),y().createElement(Cj,{className:" g2-view-identity-binding-ask-content-button g2-view-identity-binding-ask-content-button-binding authing-g2-submit-button",onClick:function(){null==t||t(LL.IDENTITY_BINDING,PJ(PJ({},e),{source:LL.IDENTITY_BINDING_ASK}))},type:"primary"},n("common.identityBindingBinding")))))},AJ=function(){return AJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},AJ.apply(this,arguments)},RJ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},MJ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},DJ=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},LJ=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},FJ=y().useCallback,jJ=y().useEffect,BJ=y().useRef,UJ=y().useState;!function(e){e.email="email-code",e.phone="phone-code"}(wJ||(wJ={}));var qJ,VJ=function(e){var t=e.identifyRef,n=_u().t,r=DJ(cT.useForm(),1)[0],o=DJ(UJ(""),2),i=o[0],a=o[1],s=DJ(UJ("phone"),2),c=s[0],l=s[1],u=BJ(null),d=vj().isPhoneMedia,f=JL(),p=fL(),h=uL();jJ((function(){h.defaultEmail&&(a(h.defaultEmail),r.setFieldsValue({identify:h.defaultEmail}),l("email")),h.defaultPhone&&(a(h.defaultPhone),r.setFieldsValue({identify:h.defaultPhone}),l("phone"))}),[h,r]),jJ((function(){t&&(t.current=IX(i))}),[i,t]);var m=tX().authFlow,v=iL(),g=v.publicKey,b=v.verifyCodeLength,w=v.internationalSmsConfig,C=v.selfUnlockStrategy,E=void 0===C?"password-captcha":C,k=(null==w?void 0:w.enabled)||!1,S=FJ((function(e){return y().createElement(y().Fragment,null,"phone"===c&&y().createElement(
|
|
28405
|
+
onLoginSuccess:C,onLoginFailed:E,agreements:S,submitButText:P})}],O=xJ((function(){return o.source===LL.IDENTITY_BINDING_ASK?y().createElement(_B,{onBack:function(){return null==a?void 0:a()}},s("common.back")):y().createElement(xB,null)}),[a,o.source,s]);return y().createElement("div",{className:"g2-view-container g2-view-identity-binding"},O,y().createElement("div",{className:"g2-view-identity-binding-content"},y().createElement("div",{className:"g2-view-identity-binding-content-logo"},y().createElement("img",{src:null==i?void 0:i.logo,alt:"",className:"logo"})),y().createElement("div",{className:"g2-view-identity-binding-content-title"},y().createElement("span",null,s(r?"common.identityBindingSkipAskTitle":"common.identityBindingTitle"))),y().createElement("div",{className:"g2-view-identity-binding-content-desc"},y().createElement("span",null,s(r?"common.identityBindingSkipAskDesc":"common.identityBindingDesc"))),y().createElement("div",{className:"g2-view-identity-binding-content-login"},y().createElement(xR,null,T.filter((function(e){return"password"===e.key?0!==x.length:"code"!==e.key||0!==_.length})).map((function(e){return y().createElement(xR.TabPane,{key:e.key,tab:e.title},e.component)}))))))},PJ=function(){return PJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},PJ.apply(this,arguments)},TJ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},OJ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},NJ=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},IJ=function(){var e=uL(),t=pL().changeModule;OB();var n=_u().t,r=tX().authFlow,o=JL(),i=fL(),a=oL().spinChange,s=NJ(sj((function(){return TJ(void 0,void 0,void 0,(function(){var e,t,n,s,c;return OJ(this,(function(l){switch(l.label){case 0:return a(!0),[4/*yield*/,r(kY.CreateUser)];case 1:return e=l.sent(),t=e.code,n=e.onGuardHandling,s=e.data,c=e.isFlowEnd,a(!1),c?function(e){var t,n;null===(t=null==i?void 0:i.onLogin)||void 0===t||t.call(i,e,o),null===(n=null==i?void 0:i.onCreate)||void 0===n||n.call(i,e,o)}(s):(!function(e,t){var n,r;null===(n=null==i?void 0:i.onCreateError)||void 0===n||n.call(i,{code:e,data:t}),null===(r=null==i?void 0:i.onLoginError)||void 0===r||r.call(i,{code:e,data:t})}(t,s),null==n||n()),[2/*return*/]}}))}))}),[]),2),c=s[0],l=s[1];return y().createElement("div",{className:"g2-view-container g2-view-identity-binding-ask"},y().createElement(xB,null),y().createElement("div",{className:"g2-view-identity-binding-ask-content"},y().createElement("div",{className:"g2-view-identity-binding-ask-content-title"},y().createElement("span",null,n("common.identityBindingAskTitle"))),y().createElement("div",{className:"g2-view-identity-binding-ask-content-desc"},y().createElement("span",null,n("common.identityBindingAskDesc"))),y().createElement("div",{className:"g2-view-identity-binding-ask-content-img"},y().createElement(JD,{type:"authing-bind"})),y().createElement("div",{className:"g2-view-identity-binding-ask-content-button-group"},y().createElement(Cj,{className:"g2-view-identity-binding-ask-content-button g2-view-identity-binding-ask-content-button-create",loading:c.loading,onClick:l},n("common.identityBindingCreate")),y().createElement(Cj,{className:" g2-view-identity-binding-ask-content-button g2-view-identity-binding-ask-content-button-binding authing-g2-submit-button",onClick:function(){null==t||t(LL.IDENTITY_BINDING,PJ(PJ({},e),{source:LL.IDENTITY_BINDING_ASK}))},type:"primary"},n("common.identityBindingBinding")))))},AJ=function(){return AJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},AJ.apply(this,arguments)},RJ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},MJ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},DJ=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},LJ=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},FJ=y().useCallback,jJ=y().useEffect,BJ=y().useRef,UJ=y().useState;!function(e){e.email="email-code",e.phone="phone-code"}(wJ||(wJ={}));var qJ,VJ=function(e){var t=e.identifyRef,n=_u().t,r=DJ(cT.useForm(),1)[0],o=DJ(UJ(""),2),i=o[0],a=o[1],s=DJ(UJ("phone"),2),c=s[0],l=s[1],u=BJ(null),d=vj().isPhoneMedia,f=JL(),p=fL(),h=uL();jJ((function(){h.defaultEmail&&(a(h.defaultEmail),r.setFieldsValue({identify:h.defaultEmail}),l("email")),h.defaultPhone&&(a(h.defaultPhone),r.setFieldsValue({identify:h.defaultPhone}),l("phone"))}),[h,r]),jJ((function(){t&&(t.current=IX(i))}),[i,t]);var m=tX().authFlow,v=iL(),g=v.publicKey,b=v.verifyCodeLength,w=v.internationalSmsConfig,C=v.selfUnlockStrategy,E=void 0===C?"password-captcha":C,k=(null==w?void 0:w.enabled)||!1,S=FJ((function(e){return y().createElement(y().Fragment,null,"phone"===c&&y().createElement(JU,AJ({},e,{isInternationSms:k,className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:n("common.inputFourVerifyCode",{length:b}),prefix:y().createElement(JD,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:Ni.SCENE_TYPE_RESET,maxLength:b,data:i,onSendCodeBefore:function(){return RJ(void 0,void 0,void 0,(function(){return MJ(this,(function(e){switch(e.label){case 0:return[4/*yield*/,r.validateFields(["identify"])];case 1:return e.sent(),[2/*return*/]}}))}))}})),"email"===c&&y().createElement(Fq,AJ({},e,{className:"authing-g2-input g2-send-code-input",autoComplete:"off",size:"large",placeholder:n("common.inputFourVerifyCode",{length:b}),prefix:y().createElement(JD,{type:"authing-a-shield-check-line1",style:{color:"#878A95"}}),scene:Oc.SELF_UNLOCKING_VERIFY_CODE,maxLength:b,data:i,onSendCodeBefore:function(){return RJ(void 0,void 0,void 0,(function(){return MJ(this,(function(e){switch(e.label){case 0:return[4/*yield*/,r.validateFields(["identify"])];case 1:return e.sent(),[2/*return*/]}}))}))},value:i})))}),[c,r,i,k,n,b]);return y().createElement("div",{className:"authing-g2-login-phone-code"},y().createElement(cT,{name:"resetPassword",form:r,onFinish:function(e){return RJ(void 0,void 0,void 0,(function(){var t,n,r,o,i,a,s,l,d,h,v,y,b,w,C,S;return MJ(this,(function(x){switch(x.label){case 0:return t=e.identify,n=e.code,r=e.password||"",[4/*yield*/,null===(y=null===(v=f.options)||void 0===v?void 0:v.encryptFunction)||void 0===y?void 0:y.call(v,r,g)];case 1:return o=x.sent(),
|
|
28401
28406
|
// 密码,经过加密后的, 仅“验证码”时不传 password 字段
|
|
28402
28407
|
r="password-captcha"===E?o:void 0,"email"!==c?[3/*break*/,3]:[4/*yield*/,m("unlock-account-by-email",{email:t,// 用户输入的邮箱
|
|
28403
28408
|
code:n,// 验证码
|
|
28404
28409
|
password:r})];case 2:i=x.sent(),l=i.isFlowEnd,d=i.data,h=i.onGuardHandling,null===(b=u.current)||void 0===b||b.onSpin(!1),l?null===(w=null==p?void 0:p.onLogin)||void 0===w||w.call(p,d,f):null==h||h(),x.label=3;case 3:return"phone"!==c?[3/*break*/,5]:(a=gj(k,t).phoneNumber,[4/*yield*/,m("unlock-account-by-phone",{phone:a,// 用户输入的邮箱
|
|
28405
28410
|
code:n,// 验证码
|
|
28406
|
-
password:r})]);case 4:s=x.sent(),l=s.isFlowEnd,d=s.data,h=s.onGuardHandling,null===(C=u.current)||void 0===C||C.onSpin(!1),l?null===(S=null==p?void 0:p.onLogin)||void 0===S||S.call(p,d,f):null==h||h(),x.label=5;case 5:return[2/*return*/]}}))}))},onFinishFailed:function(){var e;null===(e=null==u?void 0:u.current)||void 0===e||e.onError()},autoComplete:"off"},y().createElement(
|
|
28411
|
+
password:r})]);case 4:s=x.sent(),l=s.isFlowEnd,d=s.data,h=s.onGuardHandling,null===(C=u.current)||void 0===C||C.onSpin(!1),l?null===(S=null==p?void 0:p.onLogin)||void 0===S||S.call(p,d,f):null==h||h(),x.label=5;case 5:return[2/*return*/]}}))}))},onFinishFailed:function(){var e;null===(e=null==u?void 0:u.current)||void 0===e||e.onError()},autoComplete:"off"},y().createElement(VV,{name:"identify",className:"authing-g2-input-form",methods:["email-code","phone-code"],currentMethod:wJ[c]},y().createElement(EW,{methods:["email-code","phone-code"],className:"authing-g2-input",autoComplete:"off",autoFocus:!d,size:"large",value:i,onChange:function(e){var t=e.target.value;a(t),uX("email",t)?l("email"):l("phone")},prefix:y().createElement(JD,{type:"authing-a-user-line1",style:{color:"#878A95"}})})),y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"code",rules:LJ([],DJ(dX(n("common.captchaCode"))),!1)},y().createElement(S,null)),"password-captcha"===E&&y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"password",rules:LJ([],DJ(dX(n("common.password"))),!1)},y().createElement(sU,{className:"authing-g2-input",size:"large",placeholder:n("user.inputOldPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95"}})})),y().createElement(cT.Item,{className:"authing-g2-sumbit-form submit-form"},y().createElement(Tj,{className:"forget-password",text:n("common.unlock"),ref:u}))))},zJ=y().useRef,$J=function(){var e=_u().t,t=hL(),n=pL().changeModule,r=zJ("");return OB(),y().createElement("div",{className:"g2-view-container g2-forget-password"},y().createElement("div",{className:"g2-view-header"},y().createElement(Hj,{src:null==t?void 0:t.logo,size:48,borderRadius:4,alt:"",className:"icon"}),y().createElement("div",{className:"title"},e("login.selfUnlock")),y().createElement("div",{className:"title-explain"},e("login.selfUnlockText"))),y().createElement("div",{className:"g2-view-tabs"},y().createElement(VJ,{identifyRef:r})),y().createElement("div",{className:"g2-tips-line"},y().createElement("span",null,e("user.unlockTip")," "),y().createElement("span",{className:"link-like",onClick:function(){return null==n?void 0:n(LL.ANY_QUESTIONS,{identify:r.current})}},e("common.feedback")),y().createElement("div",{className:"link-like back-to-login",onClick:function(){return null==n?void 0:n(LL.LOGIN)}},e("common.backLoginPage"))))},HJ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},WJ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},GJ=y().useCallback,KJ=y().useMemo,YJ=function(){var e=hL(),t=fL(),n=JL(),r=aL().post,o=KJ((function(){return e.loadingComponent}),[e.loadingComponent]),i=uL();OB();var a=GJ((function(e){return HJ(void 0,void 0,void 0,(function(){var o,i,a,s,c;return WJ(this,(function(l){switch(l.label){case 0:return[4/*yield*/,r("/interaction/federation/binding/select",{account:e.id})];case 1:return o=l.sent(),i=o.isFlowEnd,a=o.data,s=o.onGuardHandling,i?null===(c=null==t?void 0:t.onLogin)||void 0===c||c.call(t,a,n):null==s||s(),[2/*return*/]}}))}))}),[n,r,t]),s=KJ((function(){return i?null==i?void 0:i.accounts.map((function(e){var t=e.id,n=e.photo,r=e.phone,o=e.email,i=e.username,s=e.nickname,c=e.name||s||i||void 0,l=r||o;return y().createElement("li",{className:"g2-select-account__li",key:t,onClick:function(){return a(e)}},y().createElement("img",{className:"g2-select-account__avatar",alt:"",src:n||""}),y().createElement("div",{className:"g2-select-account__body"},c&&y().createElement("span",{className:"g2-select-account__title"},c),y().createElement("span",{className:c?"g2-multiple__desc":"g2-multiple__title"},l)))})):null}),[a,i]),c=KJ((function(){return i?i.i18n:""}),[i]);return y().createElement(y().Fragment,null,i?y().createElement("div",{className:"g2-view-container"},y().createElement("div",{className:"g2-view-header"},y().createElement(Hj,{src:null==e?void 0:e.logo,size:48,borderRadius:4,alt:"",className:"icon"}),y().createElement("div",{className:"title"},c)),y().createElement("div",{className:"g2-view-tabs"},y().createElement("ul",{className:"g2-select-account_wrapper"},s))):o)},JJ=function(){return JJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},JJ.apply(this,arguments)},ZJ=function(e){var t,n=e.avatar,r=e.title,o=e.description,i=e.tags,a="string"==typeof n?{shape:"square",size:48,src:n}:n;return y().createElement("div",{className:"g2-view-header"},y().createElement(bv,JJ({className:"g2-view-avatar icon"},a)),y().createElement("div",{className:"title"},r),y().createElement("div",{className:"title-description"},o),null===(t=null==i?void 0:i.map)||void 0===t?void 0:t.call(i,(function(e,t){
|
|
28407
28412
|
// @ts-ignore
|
|
28408
28413
|
return y().createElement(yE,JJ({key:t,className:"authing-header-tag"},e))})))},QJ=function(){return QJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},QJ.apply(this,arguments)},XJ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},eZ=function(e){var t=e.dataSource,n=e.onSelect,r=e.gap,o=void 0===r?20:r,i=(e.isNewStyle,XJ(e,["dataSource","onSelect","gap","isNewStyle"]));
|
|
28409
28414
|
// @ts-ignore
|
|
28410
28415
|
return y().createElement(OI,QJ({split:!1,size:"small"},i,{className:Zj()(i.className,"authing-guard-select-list"),dataSource:t,renderItem:function(e,r){
|
|
28411
28416
|
// @ts-ignore
|
|
28412
28417
|
return y().createElement(OI.Item,{actions:null==e?void 0:e.actions,extra:null==e?void 0:e.extra,key:r,onClick:function(){return null==n?void 0:n(e,r)},className:Zj()("authing-guard-select-list-item"),style:(null==t?void 0:t.length)!==r+1?{marginBottom:o}:{}},y().createElement(OI.Item.Meta,{avatar:"string"==typeof(null==e?void 0:e.avatar)?y().createElement(bv,{size:40,src:e.avatar}):y().createElement(bv,QJ({size:40},e.avatar)),title:null==e?void 0:e.title,description:null==e?void 0:e.description}))}}))};!function(e){e.InputTenantCode="inputTenantCode",e.InputEnterpriseEmail="inputEnterpriseEmail",e.VerifyEmailCode="verifyEmailCode",e.NoEnterpriseDomain="noEnterpriseDomain",e.JoinSuccess="joinSuccess",e.JoinFailed="joinFailed"}(qJ||(qJ={}));// CONCATENATED MODULE: ./src/TenantPortalSelect/InputEmailCode/index.tsx
|
|
28413
|
-
var tZ,nZ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},rZ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},oZ=y().useRef,iZ=(y().useState,y().useEffect),aZ=function(e){var t=e.email,n=e.setSent,r=e.onFinish,o=_u().t,i=tX(),a=i.post,s=(i.get,iL()),c=null==s?void 0:s.verifyCodeLength,l=oZ(null);return iZ((function(){setTimeout((function(){var e;null===(e=l.current)||void 0===e||e.click()}))}),[]),y().createElement(y().Fragment,null,y().createElement(Yj,{name:"emailCode",codeLength:c,ruleKeyword:o("common.captchaCode")},y().createElement(vB,{length:c,onFinish:r})),y().createElement(
|
|
28418
|
+
var tZ,nZ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},rZ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},oZ=y().useRef,iZ=(y().useState,y().useEffect),aZ=function(e){var t=e.email,n=e.setSent,r=e.onFinish,o=_u().t,i=tX(),a=i.post,s=(i.get,iL()),c=null==s?void 0:s.verifyCodeLength,l=oZ(null);return iZ((function(){setTimeout((function(){var e;null===(e=l.current)||void 0===e||e.click()}))}),[]),y().createElement(y().Fragment,null,y().createElement(Yj,{name:"emailCode",codeLength:c,ruleKeyword:o("common.captchaCode")},y().createElement(vB,{length:c,onFinish:r})),y().createElement(DU,{btnRef:l,setSent:n,beforeSend:function(){return nZ(void 0,void 0,void 0,(function(){var e,r,i,s,c;return rZ(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4/*yield*/,a("/api/v2/email/send",{email:t,scene:v.VerifyCode})];case 1:return e=l.sent(),r=e.code,i=e.message,2080===e.apiCode?(
|
|
28414
28419
|
// 一分钟只能发一次邮箱验证码的提示信息,特殊处理
|
|
28415
28420
|
gC.error(i),[2/*return*/,!1]):200===r?(n(!0),[2/*return*/,!0]):(gC.error(o("login.sendCodeTimeout")),[2/*return*/,!1]);case 2:if("ECONNABORTED"===(s=l.sent()).code)return gC.error(o("login.sendCodeTimeout")),[2/*return*/,!1];try{c=JSON.parse(s.message),gC.error(c.message)}catch(e){gC.error(s)}return[2/*return*/,!1];case 3:return[2/*return*/]}}))}))},type:"link",className:"authing-join-send-btn"}))},sZ=function(){return sZ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},sZ.apply(this,arguments)},cZ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},lZ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};!function(e){e.JoinTenant="join-tenant-portal",e.CreateTenant="create-tenant-portal"}(tZ||(tZ={}));var uZ,dZ,fZ=function(e,t){return cZ(void 0,void 0,void 0,(function(){return lZ(this,(function(n){switch(n.label){case 0:return[4/*yield*/,(0,eX().authFlow)(e,sZ({},t))];case 1:return[2/*return*/,n.sent()]}}))}))},pZ=function(){return pZ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},pZ.apply(this,arguments)},hZ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},mZ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},vZ=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},gZ=y().useMemo,yZ=y().useState,bZ=y().useRef,wZ=y().useCallback,CZ=function(e){var t,n,r=e.onBack,o=_u().t,i=fL(),a=iL(),s=JL(),c=aL(),l=vZ(yZ(null),2),u=l[0],d=l[1],f=vZ(yZ(qJ.InputTenantCode),2),p=f[0],h=f[1],m=vZ(cT.useForm(),1)[0],v=bZ(null),g=vZ(yZ(!1),2),b=g[0],w=g[1],C=vZ(yZ(""),2),E=C[0],k=C[1],S=function(e,t){return hZ(void 0,void 0,void 0,(function(){var n,r,o,a,l,u;return mZ(this,(function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),(null==e?void 0:e.host)&&c.setBaseUrl(null==e?void 0:e.host),!(null==e?void 0:e.isUserPool)&&(null==e?void 0:e.tenantId)?c.setTenantId(null==e?void 0:e.tenantId):c.setTenantId(""),[4/*yield*/,fZ(tZ.JoinTenant,{tenantId:e.tenantId,email:E||void 0,passCode:t})];case 1:return n=d.sent(),r=n.isFlowEnd,o=n.data,a=n.onGuardHandling,null===(u=null==i?void 0:i.onTenantSelect)||void 0===u||u.call(i,e),r?setTimeout((function(){var e;null===(e=null==i?void 0:i.onLogin)||void 0===e||e.call(i,o,s)})):null==a||a(),[3/*break*/,3];case 2:return(null==(l=d.sent())?void 0:l.message)&&gC.error(null==l?void 0:l.message),[3/*break*/,3];case 3:return[2/*return*/]}}))}))},x=wZ((function(){return hZ(void 0,void 0,void 0,(function(){var e,t,n,r;return mZ(this,(function(i){switch(i.label){case 0:return i.trys.push([0,7,,8]),[4/*yield*/,(s=m.getFieldValue("code"),cZ(void 0,void 0,void 0,(function(){return lZ(this,(function(e){switch(e.label){case 0:return[4/*yield*/,(0,eX().get)("/api/v3/get-tenant-public-info-by-code",{code:s})];case 1:return[2/*return*/,e.sent()]}}))})))];case 1:return e=i.sent(),t=e.data,n=e.message,d(t),t?a.enableVerifyDomainInJoinTenant?((null===(r=t.enterpriseDomains)||void 0===r?void 0:r.length)?
|
|
28416
28421
|
// 输入企业邮箱
|
|
@@ -28422,21 +28427,21 @@ avatar:{size:40,src:t.tenantLogo,style:{borderRadius:4}},extra:y().createElement
|
|
|
28422
28427
|
// changeModule = GuardModuleType.LOGIN,
|
|
28423
28428
|
g=c.needBack,
|
|
28424
28429
|
// changeModule = GuardModuleType.LOGIN,
|
|
28425
|
-
b=void 0===g||g,w=c.goBack,C=void 0===w?function(){return null==n?void 0:n(LL.LOGIN)}:w,E=null==s?void 0:s.cdnBase;return BZ((function(){return a.current=setInterval((function(){i((function(e){return e-1}))}),1e3),function(){return clearInterval(a.current)}}),[]),BZ((function(){o<=0&&(clearInterval(a.current),b&&(null==C||C()))}),[o,b,C]),y().createElement("div",{className:"g2-view-container g2-submit-success g2-view-container-submit-success"},y().createElement("div",{className:"g2-view-tabs g2-questions-send-success-pageWrap"},y().createElement(Hj,{className:"plate-submit-success",src:"".concat(E,"/questions-send-ok.png"),alt:"",width:157,height:120}),y().createElement("div",{className:"success-page-title "},u),y().createElement("div",{className:"success-page-message"},f),b&&y().createElement(y().Fragment,null,y().createElement(Tj,{className:"success-page-btn",onClick:function(){null==C||C()},text:h}),y().createElement("div",{className:"success-page-timer-tip"},o," ",v))))},zZ=function(){return zZ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},zZ.apply(this,arguments)},$Z=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},HZ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},WZ=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},GZ=y().useRef,KZ=(y().useState,y().useCallback,y().useEffect,function(){var e,t,n,r=_u().t,o=hL(),i=fL(),a=uL(),s=pL().changeModule,c=iL(),l=tX(),u=(l.get,l.post),d=WZ(cT.useForm(),1)[0],f=GZ(null),p=null==c?void 0:c.verifyCodeLength;return y().createElement("div",{className:"g2-view-container g2-view-invitation-apply"},y().createElement("div",{className:"g2-view-container-inner"},y().createElement("div",{className:"g2-view-header"},y().createElement("img",{src:null===(e=null==a?void 0:a.userPool)||void 0===e?void 0:e.logo,alt:"",className:"icon"}),y().createElement("div",{className:"g2-view-header-container"},y().createElement("div",{className:"invitation-welcome"},null===(t=null==a?void 0:a.inviter)||void 0===t?void 0:t.displayName," ",r("common.welcomeJoin")),y().createElement("div",{className:"title"},null===(n=null==a?void 0:a.userPool)||void 0===n?void 0:n.name))),y().createElement("div",{className:"g2-view-content"},y().createElement(cT,{layout:"vertical",name:"et-pre-check-email",onFinish:function(){return $Z(void 0,void 0,void 0,(function(){var e,t,n,i,c,l;return HZ(this,(function(p){switch(p.label){case 0:return p.trys.push([0,2,3,4]),null===(c=f.current)||void 0===c||c.onSpin(!0),[4/*yield*/,u("/api/v3/signup-by-invitation",zZ(zZ({},d.getFieldsValue()),{identifier:null==a?void 0:a.identifier,profile:zZ({},d.getFieldsValue())}))];case 1:return e=p.sent(),t=e.statusCode,n=e.message,i=e.data,200!==t?gC.error(n):null==s||s(LL.MESSAGE,{message:"PENDING"===i.status?r("common.pendingMsg",[o.title]):r("common.doneMsg")}),[3/*break*/,4];case 2:return p.sent(),[3/*break*/,4];case 3:return null===(l=f.current)||void 0===l||l.onSpin(!1),[7/*endfinally*/];case 4:return[2/*return*/]}}))}))},onFinishFailed:function(){return f.current.onError()},autoComplete:"off",form:d,className:"authing-g2-form-required-item-icon-after"},y().createElement(cT.Item,{name:"name",label:r("common.name"),rules:[{required:!0}],className:"authing-g2-input-form"},y().createElement(oO,{type:"text",size:"large",className:"authing-g2-input",autoComplete:"off"})),y().createElement(iU.Email,{className:"authing-g2-input-form",name:"email",checkRepeat:!0,label:su.t("common.email"),key:"internal email:email13",validateFirst:!0,required:!0},y().createElement(oO,{className:"authing-g2-input",autoComplete:"email",size:"large",placeholder:r("login.inputEmail")})),y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"emailCode",key:"internal email:code1432",rules:dX(r("common.captchaCode"))},y().createElement(jq,{className:"authing-g2-input g2-send-code-input",autoComplete:"one-time-code",size:"large",placeholder:r("common.inputFourVerifyCode",{length:p}),maxLength:p,data:"",scene:Oc.VERIFY_CODE,fieldName:"email",form:d,onSendCodeBefore:function(){return d.validateFields(["email"])}})),y().createElement(cT.Item,{className:"authing-g2-sumbit-form"},y().createElement(Tj,{text:r("common.applyJoin"),className:"password",ref:f})))),y().createElement(kL,{langRange:null==o?void 0:o.langRange,onLangChange:null==i?void 0:i.onLangChange})))}),YZ=y().useMemo,JZ=function(e){var t=uL(),n=iL();OB();var r=YZ((function(){var n,r,o=null!==(n=null==e?void 0:e.message)&&void 0!==n?n:null==t?void 0:t.message;return null!==(r="".concat(o))&&void 0!==r?r:"".concat(su.t("user.contactAdministrator"))}),[null==t?void 0:t.message,null==e?void 0:e.message]);return y().createElement("div",{className:"g2-view-container g2-view-message"},y().createElement("div",{className:"g2-message-content"},y().createElement("div",{style:{display:"flex",justifyContent:"center"}},y().createElement("div",{style:{width:135,height:103,backgroundImage:"url(".concat(n.cdnBase,"/authing_message.svg?v=1)"),backgroundSize:"contain"}})),y().createElement("span",{className:"g2-message-text",dangerouslySetInnerHTML:{__html:r}})))},ZZ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},QZ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},XZ=y().useCallback,eQ=function(e,t){var n=JL(),r=fL(),o=aL().post,i=eX().authFlow,a=pL().changeModule,s=XZ((function(e){return ZZ(void 0,void 0,void 0,(function(){var i,s,c,l,u,d,f,p,h,m,v,g;return QZ(this,(function(y){switch(y.label){case 0:if(!(i=null==r?void 0:r.onBeforeRegister))return[3/*break*/,4];y.label=1;case 1:return y.trys.push([1,3,,4]),[4/*yield*/,i({type:e.verifyType,data:e},n)];case 2:return y.sent()?[3/*break*/,4]:(null===(h=null==t?void 0:t.current)||void 0===h||h.onSpin(!1),[2/*return*/]);case 3:return"string"==typeof(s=y.sent())?gC.error(s):gC.error(null==s?void 0:s.message),null===(m=null==t?void 0:t.current)||void 0===m||m.onSpin(!1),[2/*return*/];case 4:return[4/*yield*/,o("/api/v3/join-by-invitation",e)];case 5:return c=y.sent(),l=c.statusCode,u=c.code,c.apiCode,d=c.data,f=c.onGuardHandling,p=c.message,200===l?(null===(v=null==r?void 0:r.onRegister)||void 0===v||v.call(r,d,n),null==a||a(LL.INVITE_SUCCESS)):(null==f||f(),null===(g=null==r?void 0:r.onRegisterError)||void 0===g||g.call(r,{code:u,data:d,message:p})),[2/*return*/]}}))}))}),[n,i,a,r,o,t]);return s},tQ=function(){return tQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},tQ.apply(this,arguments)},nQ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},rQ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},oQ=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},iQ=y().useCallback,aQ=y().useEffect,sQ=y().useMemo,cQ=y().useRef,lQ=y().useState,uQ=function(){var e=uL(),t=fL(),n=hL(),r=_u().t,o=cQ(null);OB();var i=pL().changeModule,a=aL().post,s=iL(),c=null==s?void 0:s.verifyCodeLength,l=oQ(cT.useForm(),1)[0],u=cQ(null),d=oQ(lQ(!0),2),f=d[0],p=d[1],h=oQ(lQ("prioritySMS"===e.sendVerifyCodeMethod&&e.phone?"smsCode":"emailCode"),2),m=h[0],v=h[1],g=cQ(null),b=sQ((function(){return"emailCode"===m?e.email:"smsCode"===m?e.phone:void 0}),[e.email,e.phone,m]),w=sQ((function(){var t={prioritySMS:{emailCode:{desc:r("common.sendSms"),show:e.phone,receiverType:"smsCode"},smsCode:{desc:r("common.sendEmail"),show:e.email,receiverType:"emailCode"}},priorityEmail:{emailCode:{desc:r("common.sendSms"),show:e.phone,receiverType:"smsCode"},smsCode:{desc:r("common.sendEmail"),show:e.email,receiverType:"emailCode"}}},n=e.sendVerifyCodeMethod;return["prioritySMS","priorityEmail"].some((function(e){return n===e}))?tQ({},t[n][m]):t[n]}),[e,r,m]),C=iQ((function(e){return nQ(void 0,void 0,void 0,(function(){return rQ(this,(function(t){switch(t.label){case 0:return[4/*yield*/,a("emailCode"===e.receiverType?"/api/v2/email/send":"/api/v2/sms/send",tQ(tQ({},e),{scene:"emailCode"===e.receiverType?Oc.REGISTER_VERIFY_CODE:Ni.SCENE_TYPE_REGISTER}))];case 1:return[2/*return*/,t.sent()]}}))}))}),[a]),E=eQ(0,u);aQ((function(){var e;o.current&&(null===(e=o.current)||void 0===e||e.click())}),[]);var k=function(t){return nQ(void 0,void 0,void 0,(function(){var n,r,o;return rQ(this,(function(i){switch(i.label){case 0:return n="default"===t?m:w.receiverType,[4/*yield*/,C({phone:e.phone,phoneCountryCode:e.phoneCountryCode,email:e.email,receiverType:n})];case 1:return 200===(r=i.sent()).code?(v(n),[2/*return*/,!0]):(null===(o=r.onGuardHandling)||void 0===o||o.call(r),[2/*return*/,!1])}}))}))};return y().createElement("div",{className:"g2-view-container g2-view-invite"},y().createElement("div",{className:"g2-invite-content"},y().createElement("div",{className:"g2-view-invite-header"},y().createElement("div",{className:"title"},r("common.inputCaptcha")),y().createElement("div",{className:"tips"},r("common.verifyAccount",[b&&("emailCode"===m?_X(b):PX(b))])),y().createElement("div",{className:"tips errorTips"},r("common.captchaMaxErrorCount",[e.verifyCodeMaxErrCount]))),y().createElement(cT,{form:l,onFinish:function(t){return nQ(void 0,void 0,void 0,(function(){var n,r,o,s,c,l,u,d,f,p,h,v;return rQ(this,(function(g){switch(g.label){case 0:return n=t.code,[4/*yield*/,a("/api/v3/verify-invite-code",{code:n,receiverType:m,token:e.token})];case 1:return r=g.sent(),o=r.statusCode,s=r.onGuardHandling,200!==o?[3/*break*/,5]:(c=e.extendsFields,l=void 0===c?[]:c,u=e.extendsFieldsOptions,d=void 0===u?[]:u,f=e.enabledInfoFill,p={code:n,token:e.token,receiverType:m},h=null==l?void 0:l.filter((function(t){return"email"===t.name&&"internal"===t.type?!e.email:"phone"===t.name&&"internal"===t.type?!e.phone:"username"===t.name&&"internal"===t.type?!e.username:"name"!==t.name||"internal"!==t.type||!e.name})),v=Jq(h,d),f&&v.length>0?(null==i||i(LL.INVITE_COMPLETE,tQ(tQ({},e),{
|
|
28430
|
+
b=void 0===g||g,w=c.goBack,C=void 0===w?function(){return null==n?void 0:n(LL.LOGIN)}:w,E=null==s?void 0:s.cdnBase;return BZ((function(){return a.current=setInterval((function(){i((function(e){return e-1}))}),1e3),function(){return clearInterval(a.current)}}),[]),BZ((function(){o<=0&&(clearInterval(a.current),b&&(null==C||C()))}),[o,b,C]),y().createElement("div",{className:"g2-view-container g2-submit-success g2-view-container-submit-success"},y().createElement("div",{className:"g2-view-tabs g2-questions-send-success-pageWrap"},y().createElement(Hj,{className:"plate-submit-success",src:"".concat(E,"/questions-send-ok.png"),alt:"",width:157,height:120}),y().createElement("div",{className:"success-page-title "},u),y().createElement("div",{className:"success-page-message"},f),b&&y().createElement(y().Fragment,null,y().createElement(Tj,{className:"success-page-btn",onClick:function(){null==C||C()},text:h}),y().createElement("div",{className:"success-page-timer-tip"},o," ",v))))},zZ=function(){return zZ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},zZ.apply(this,arguments)},$Z=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},HZ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},WZ=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},GZ=y().useRef,KZ=(y().useState,y().useCallback,y().useEffect,function(){var e,t,n,r=_u().t,o=hL(),i=fL(),a=uL(),s=pL().changeModule,c=iL(),l=tX(),u=(l.get,l.post),d=WZ(cT.useForm(),1)[0],f=GZ(null),p=null==c?void 0:c.verifyCodeLength;return y().createElement("div",{className:"g2-view-container g2-view-invitation-apply"},y().createElement("div",{className:"g2-view-container-inner"},y().createElement("div",{className:"g2-view-header"},y().createElement("img",{src:null===(e=null==a?void 0:a.userPool)||void 0===e?void 0:e.logo,alt:"",className:"icon"}),y().createElement("div",{className:"g2-view-header-container"},y().createElement("div",{className:"invitation-welcome"},null===(t=null==a?void 0:a.inviter)||void 0===t?void 0:t.displayName," ",r("common.welcomeJoin")),y().createElement("div",{className:"title"},null===(n=null==a?void 0:a.userPool)||void 0===n?void 0:n.name))),y().createElement("div",{className:"g2-view-content"},y().createElement(cT,{layout:"vertical",name:"et-pre-check-email",onFinish:function(){return $Z(void 0,void 0,void 0,(function(){var e,t,n,i,c,l;return HZ(this,(function(p){switch(p.label){case 0:return p.trys.push([0,2,3,4]),null===(c=f.current)||void 0===c||c.onSpin(!0),[4/*yield*/,u("/api/v3/signup-by-invitation",zZ(zZ({},d.getFieldsValue()),{identifier:null==a?void 0:a.identifier,profile:zZ({},d.getFieldsValue())}))];case 1:return e=p.sent(),t=e.statusCode,n=e.message,i=e.data,200!==t?gC.error(n):null==s||s(LL.MESSAGE,{message:"PENDING"===i.status?r("common.pendingMsg",[o.title]):r("common.doneMsg")}),[3/*break*/,4];case 2:return p.sent(),[3/*break*/,4];case 3:return null===(l=f.current)||void 0===l||l.onSpin(!1),[7/*endfinally*/];case 4:return[2/*return*/]}}))}))},onFinishFailed:function(){return f.current.onError()},autoComplete:"off",form:d,className:"authing-g2-form-required-item-icon-after"},y().createElement(cT.Item,{name:"name",label:r("common.name"),rules:[{required:!0}],className:"authing-g2-input-form"},y().createElement(oO,{type:"text",size:"large",className:"authing-g2-input",autoComplete:"off"})),y().createElement(oU.Email,{className:"authing-g2-input-form",name:"email",checkRepeat:!0,label:su.t("common.email"),key:"internal email:email13",validateFirst:!0,required:!0},y().createElement(oO,{className:"authing-g2-input",autoComplete:"email",size:"large",placeholder:r("login.inputEmail")})),y().createElement(cT.Item,{validateTrigger:["onBlur","onChange"],className:"authing-g2-input-form",name:"emailCode",key:"internal email:code1432",rules:dX(r("common.captchaCode"))},y().createElement(Fq,{className:"authing-g2-input g2-send-code-input",autoComplete:"one-time-code",size:"large",placeholder:r("common.inputFourVerifyCode",{length:p}),maxLength:p,data:"",scene:Oc.VERIFY_CODE,fieldName:"email",form:d,onSendCodeBefore:function(){return d.validateFields(["email"])}})),y().createElement(cT.Item,{className:"authing-g2-sumbit-form"},y().createElement(Tj,{text:r("common.applyJoin"),className:"password",ref:f})))),y().createElement(kL,{langRange:null==o?void 0:o.langRange,onLangChange:null==i?void 0:i.onLangChange})))}),YZ=y().useMemo,JZ=function(e){var t=uL(),n=iL();OB();var r=YZ((function(){var n,r,o=null!==(n=null==e?void 0:e.message)&&void 0!==n?n:null==t?void 0:t.message;return null!==(r="".concat(o))&&void 0!==r?r:"".concat(su.t("user.contactAdministrator"))}),[null==t?void 0:t.message,null==e?void 0:e.message]);return y().createElement("div",{className:"g2-view-container g2-view-message"},y().createElement("div",{className:"g2-message-content"},y().createElement("div",{style:{display:"flex",justifyContent:"center"}},y().createElement("div",{style:{width:135,height:103,backgroundImage:"url(".concat(n.cdnBase,"/authing_message.svg?v=1)"),backgroundSize:"contain"}})),y().createElement("span",{className:"g2-message-text",dangerouslySetInnerHTML:{__html:r}})))},ZZ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},QZ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},XZ=y().useCallback,eQ=function(e,t){var n=JL(),r=fL(),o=aL().post,i=eX().authFlow,a=pL().changeModule,s=XZ((function(e){return ZZ(void 0,void 0,void 0,(function(){var i,s,c,l,u,d,f,p,h,m,v,g;return QZ(this,(function(y){switch(y.label){case 0:if(!(i=null==r?void 0:r.onBeforeRegister))return[3/*break*/,4];y.label=1;case 1:return y.trys.push([1,3,,4]),[4/*yield*/,i({type:e.verifyType,data:e},n)];case 2:return y.sent()?[3/*break*/,4]:(null===(h=null==t?void 0:t.current)||void 0===h||h.onSpin(!1),[2/*return*/]);case 3:return"string"==typeof(s=y.sent())?gC.error(s):gC.error(null==s?void 0:s.message),null===(m=null==t?void 0:t.current)||void 0===m||m.onSpin(!1),[2/*return*/];case 4:return[4/*yield*/,o("/api/v3/join-by-invitation",e)];case 5:return c=y.sent(),l=c.statusCode,u=c.code,c.apiCode,d=c.data,f=c.onGuardHandling,p=c.message,200===l?(null===(v=null==r?void 0:r.onRegister)||void 0===v||v.call(r,d,n),null==a||a(LL.INVITE_SUCCESS)):(null==f||f(),null===(g=null==r?void 0:r.onRegisterError)||void 0===g||g.call(r,{code:u,data:d,message:p})),[2/*return*/]}}))}))}),[n,i,a,r,o,t]);return s},tQ=function(){return tQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},tQ.apply(this,arguments)},nQ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},rQ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},oQ=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},iQ=y().useCallback,aQ=y().useEffect,sQ=y().useMemo,cQ=y().useRef,lQ=y().useState,uQ=function(){var e=uL(),t=fL(),n=hL(),r=_u().t,o=cQ(null);OB();var i=pL().changeModule,a=aL().post,s=iL(),c=null==s?void 0:s.verifyCodeLength,l=oQ(cT.useForm(),1)[0],u=cQ(null),d=oQ(lQ(!0),2),f=d[0],p=d[1],h=oQ(lQ("prioritySMS"===e.sendVerifyCodeMethod&&e.phone?"smsCode":"emailCode"),2),m=h[0],v=h[1],g=cQ(null),b=sQ((function(){return"emailCode"===m?e.email:"smsCode"===m?e.phone:void 0}),[e.email,e.phone,m]),w=sQ((function(){var t={prioritySMS:{emailCode:{desc:r("common.sendSms"),show:e.phone,receiverType:"smsCode"},smsCode:{desc:r("common.sendEmail"),show:e.email,receiverType:"emailCode"}},priorityEmail:{emailCode:{desc:r("common.sendSms"),show:e.phone,receiverType:"smsCode"},smsCode:{desc:r("common.sendEmail"),show:e.email,receiverType:"emailCode"}}},n=e.sendVerifyCodeMethod;return["prioritySMS","priorityEmail"].some((function(e){return n===e}))?tQ({},t[n][m]):t[n]}),[e,r,m]),C=iQ((function(e){return nQ(void 0,void 0,void 0,(function(){return rQ(this,(function(t){switch(t.label){case 0:return[4/*yield*/,a("emailCode"===e.receiverType?"/api/v2/email/send":"/api/v2/sms/send",tQ(tQ({},e),{scene:"emailCode"===e.receiverType?Oc.REGISTER_VERIFY_CODE:Ni.SCENE_TYPE_REGISTER}))];case 1:return[2/*return*/,t.sent()]}}))}))}),[a]),E=eQ(0,u);aQ((function(){var e;o.current&&(null===(e=o.current)||void 0===e||e.click())}),[]);var k=function(t){return nQ(void 0,void 0,void 0,(function(){var n,r,o;return rQ(this,(function(i){switch(i.label){case 0:return n="default"===t?m:w.receiverType,[4/*yield*/,C({phone:e.phone,phoneCountryCode:e.phoneCountryCode,email:e.email,receiverType:n})];case 1:return 200===(r=i.sent()).code?(v(n),[2/*return*/,!0]):(null===(o=r.onGuardHandling)||void 0===o||o.call(r),[2/*return*/,!1])}}))}))};return y().createElement("div",{className:"g2-view-container g2-view-invite"},y().createElement("div",{className:"g2-invite-content"},y().createElement("div",{className:"g2-view-invite-header"},y().createElement("div",{className:"title"},r("common.inputCaptcha")),y().createElement("div",{className:"tips"},r("common.verifyAccount",[b&&("emailCode"===m?_X(b):PX(b))])),y().createElement("div",{className:"tips errorTips"},r("common.captchaMaxErrorCount",[e.verifyCodeMaxErrCount]))),y().createElement(cT,{form:l,onFinish:function(t){return nQ(void 0,void 0,void 0,(function(){var n,r,o,s,c,l,u,d,f,p,h,v;return rQ(this,(function(g){switch(g.label){case 0:return n=t.code,[4/*yield*/,a("/api/v3/verify-invite-code",{code:n,receiverType:m,token:e.token})];case 1:return r=g.sent(),o=r.statusCode,s=r.onGuardHandling,200!==o?[3/*break*/,5]:(c=e.extendsFields,l=void 0===c?[]:c,u=e.extendsFieldsOptions,d=void 0===u?[]:u,f=e.enabledInfoFill,p={code:n,token:e.token,receiverType:m},h=null==l?void 0:l.filter((function(t){return"email"===t.name&&"internal"===t.type?!e.email:"phone"===t.name&&"internal"===t.type?!e.phone:"username"===t.name&&"internal"===t.type?!e.username:"name"!==t.name||"internal"!==t.type||!e.name})),v=Yq(h,d),f&&v.length>0?(null==i||i(LL.INVITE_COMPLETE,tQ(tQ({},e),{
|
|
28426
28431
|
// ...data,
|
|
28427
|
-
verifyAccount:b,metaData:v,originModule:LL.INVITE_AUTH,originContext:e,context:p})),[3/*break*/,4]):[3/*break*/,2]);case 2:return[4/*yield*/,E(p)];case 3:g.sent(),g.label=4;case 4:return[3/*break*/,6];case 5:null==s||s(),g.label=6;case 6:return[2/*return*/]}}))}))},onFinishFailed:function(){var e;return null===(e=u.current)||void 0===e?void 0:e.onError()},onValuesChange:function(e){e.code.filter((function(e){return Boolean(e)})).length>=c?p(!1):p(!0)}},y().createElement(Yj,{codeLength:c,name:"code"},y().createElement(vB,{length:c,showDivider:!0,gutter:"10px"})),y().createElement("div",{className:"resend_container"},y().createElement(
|
|
28432
|
+
verifyAccount:b,metaData:v,originModule:LL.INVITE_AUTH,originContext:e,context:p})),[3/*break*/,4]):[3/*break*/,2]);case 2:return[4/*yield*/,E(p)];case 3:g.sent(),g.label=4;case 4:return[3/*break*/,6];case 5:null==s||s(),g.label=6;case 6:return[2/*return*/]}}))}))},onFinishFailed:function(){var e;return null===(e=u.current)||void 0===e?void 0:e.onError()},onValuesChange:function(e){e.code.filter((function(e){return Boolean(e)})).length>=c?p(!1):p(!0)}},y().createElement(Yj,{codeLength:c,name:"code"},y().createElement(vB,{length:c,showDivider:!0,gutter:"10px"})),y().createElement("div",{className:"resend_container"},y().createElement(DU,{btnRef:o,beforeSend:function(){return nQ(void 0,void 0,void 0,(function(){return rQ(this,(function(e){switch(e.label){case 0:return[4/*yield*/,k("default")];case 1:return[2/*return*/,e.sent()]}}))}))},type:"link"})),y().createElement(Tj,{text:r("login.nextStep"),ref:u,disabled:f})),(null==w?void 0:w.show)&&y().createElement("div",{className:"resend_container"},y().createElement(DU,{btnRef:g,sendDesc:w.desc,beforeSend:function(){return nQ(void 0,void 0,void 0,(function(){return rQ(this,(function(e){switch(e.label){case 0:return[4/*yield*/,k("reSend")];case 1:return[2/*return*/,e.sent()]}}))}))},type:"link",className:"resend_code"})),y().createElement(kL,{langRange:null==n?void 0:n.langRange,onLangChange:null==t?void 0:t.onLangChange})))},dQ=function(){return dQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},dQ.apply(this,arguments)},fQ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},pQ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},hQ=function(){var e=uL(),t=hL(),n=fL(),r=_u().t,o=e.metaData,i=e.extendsFieldsI18n,a=e.extendsFields,s=e.canBack,c=void 0===s||s,l=e.registerInfoFillMsg,u=pL().changeModule,d=eQ();return y().createElement("div",{className:"g2-view-container g2-complete-info g2-invitation-complete"},y().createElement("div",{className:"g2-view-header"},c&&(null==e?void 0:e.originModule)&&y().createElement(_B,{onBack:function(){(null==e?void 0:e.originModule)&&(null==u||u(e.originModule,e.originContext))}},r("common.back")),y().createElement("div",{className:"content"},y().createElement("div",{className:"title"},r("common.invitation.completeInfo")),y().createElement("div",{className:"title-explain"},l||r("common.invitation.completeInfoDesc")))),y().createElement("div",{className:"g2-view-tabs g2-completeInfo-content"},y().createElement(uV,{extendsFieldsI18n:i,metaData:o,businessRequest:function(t){return fQ(void 0,void 0,void 0,(function(){var n,r,o,i,s,c,l,u;return pQ(this,(function(f){switch(f.label){case 0:return n=t.fieldValues,r=Jq(a,n),o=r.registerProfile,i=r.udf,s=null,c=null,Reflect.has(o,"phoneToken")&&(s=o.phoneToken,Reflect.deleteProperty(o,"phoneToken")),Reflect.has(o,"emailToken")&&(c=o.emailToken,Reflect.deleteProperty(o,"emailToken")),l={profile:dQ(dQ({},o),{customData:i}),options:{phonePassCodeForInformationCompletion:s,emailPassCodeForInformationCompletion:c}},u=dQ(dQ({},e.context),l),[4/*yield*/,null==d?void 0:d(u)];case 1:return f.sent(),[2/*return*/]}}))}))}})),y().createElement(kL,{langRange:null==t?void 0:t.langRange,onLangChange:null==n?void 0:n.onLangChange}))},mQ=function(e){var t=_u().t;return y().createElement(RV,{error:{name:"invite_expire",message:e.key===LL.INVITE_EXPIRE?t("common.inviteExpired"):t("common.pageExpired")}})},vQ=function(){var e=_u().t;return y().createElement(JZ,{message:e("common.inviteSuccess")})},gQ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},yQ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},bQ=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},wQ=y().useRef,CQ=function(){var e=_u().t,t=uL(),n=iL(),r=JL(),o=hL(),i=pL().changeModule;OB();var a=(null==n?void 0:n.resetPwdCustomLogo)||(null==o?void 0:o.logo),s=t.account,c=t.userId,l=t.goBack,u=t.token,d=uU(),f=d.getPassWordUnsafeText,p=d.setPasswordErrorTextShow,h=bQ(cT.useForm(),1)[0],m=eX().post,v=wQ(null);
|
|
28428
28433
|
/**
|
|
28429
28434
|
* initData
|
|
28430
|
-
*/return y().createElement("div",{className:"g2-view-container g2-forget-password g2-password-reset-pageWrap g2-password-reset-step2"},y().createElement("div",{className:"g2-view-header"},y().createElement(Hj,{src:
|
|
28435
|
+
*/return y().createElement("div",{className:"g2-view-container g2-forget-password g2-password-reset-pageWrap g2-password-reset-step2"},y().createElement("div",{className:"g2-view-header"},y().createElement(Hj,{src:a,size:48,borderRadius:4,alt:"",className:"icon"}),y().createElement("div",{className:"title"},e("login.resetPwd")),s&&y().createElement("div",{className:"title-explain"},e("login.resetPassword.resetPasswordText2",{account:s}))),y().createElement("div",{className:"g2-view-tabs"},y().createElement(cT,{name:"resetPassword",form:h,onFinish:function(){return gQ(void 0,void 0,void 0,(function(){var e,t,o,a,s;return yQ(this,(function(c){switch(c.label){case 0:return null===(o=v.current)||void 0===o||o.onSpin(!0),e=h.getFieldsValue(),[4/*yield*/,null===(s=null===(a=r.options)||void 0===a?void 0:a.encryptFunction)||void 0===s?void 0:s.call(a,e.password,n.publicKey)];case 1:return t=c.sent(),m("/api/v2/users/password/forget/link-reset-password",{token:u,newPassword:t}).then((function(e){var t;null===(t=v.current)||void 0===t||t.onSpin(!1);var n=e.code;n===TQ.UNSAFE_PASSWORD_TIP&&p(!0),200===n?
|
|
28431
28436
|
// events?.onPwdReset?.(authClient)
|
|
28432
|
-
null==
|
|
28437
|
+
null==i||i(LL.LOGIN):
|
|
28433
28438
|
// events?.onPwdResetError?.(r, authClient)
|
|
28434
|
-
gC.error(null==e?void 0:e.message)})).catch((function(e){
|
|
28439
|
+
gC.error(null==e?void 0:e.message)})).catch((function(e){v.current.onError(),
|
|
28435
28440
|
// props.onSendError(codeMethod, e)
|
|
28436
28441
|
// events?.onPwdResetError?.(e, authClient)
|
|
28437
|
-
gC.error(e.message)})),[2/*return*/]}}))}))},onFinishFailed:function(){var e;null===(e=null==
|
|
28442
|
+
gC.error(e.message)})),[2/*return*/]}}))}))},onFinishFailed:function(){var e;null===(e=null==v?void 0:v.current)||void 0===e||e.onError()},autoComplete:"off"},y().createElement(cT.Item,{className:"authing-g2-input-form-password",name:"password",validateTrigger:["onBlur"],rules:[{validateTrigger:"onBlur",validator:function(t,n){return gQ(this,void 0,void 0,(function(){var t,r,o;return yQ(this,(function(i){switch(i.label){case 0:return n&&0!==(null==n?void 0:n.length)?[3/*break*/,1]:[2/*return*/,Promise.reject(e("login.inputPwd"))];case 1:return[4/*yield*/,m("/api/v2/password/user-action/check",{password:n,userId:c})];case 2:return 200===(null==(t=i.sent())?void 0:t.code)?(null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.valid)?[2/*return*/,Promise.resolve(!0)]:[2/*return*/,Promise.reject(null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.message)]:[2/*return*/,Promise.reject(null==t?void 0:t.message)];case 3:return[2/*return*/]}}))}))}}]},y().createElement(rz,{className:"authing-g2-input",size:"large",placeholder:e("login.resetPassword.inputNewPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95",marginBottom:2}})})),y().createElement(cT.Item,{className:"authing-g2-input-form-password-repeat",name:"repeatPassword",validateFirst:!0,rules:[{required:!0,message:e("login.resetPassword.pleaseInputPassword")},function(t){var n=t.getFieldValue;return{validator:function(t,r){var o=n("password");return void 0===o&&void 0===r||o===r?Promise.resolve():Promise.reject(e("login.resetPassword.checkPasswordDiff"))}}}]},y().createElement(rz,{className:"authing-g2-input",size:"large",placeholder:e("login.resetPassword.confirmNewPwd"),prefix:y().createElement(JD,{type:"authing-a-lock-line1",style:{color:"#878A95",marginBottom:2}})})),f(),y().createElement(cT.Item,{className:"authing-g2-sumbit-form submit-form"},y().createElement(Tj,{className:"reset-password-button",text:e("login.resetPassword.reset"),ref:v})))),l&&y().createElement("div",{className:"g2-tips-line"},y().createElement("div",{className:"link-like back-to-login",onClick:l},e("login.resetPassword.back"))))},EQ=function(){return EQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},EQ.apply(this,arguments)},kQ=y().useEffect,SQ=y().useMemo,xQ="authing-ant";gC.config({prefixCls:"".concat(xQ,"-message")}),function(e){e.zhCn="zh-CN",e.enUs="en-US",e.jaJp="ja-JP",e.zhTw="zh-TW"}(dZ||(dZ={}));var _Q,PQ,TQ,OQ=((uZ={})[dZ.zhCn]=KD.zhCN,uZ[dZ.enUs]=KD.enUS,uZ[dZ.jaJp]=KD.jaJP,uZ[dZ.zhTw]=KD.zhTW,uZ),NQ=function(e){var t,n,r,o,i,a=e.guardProps,s=XD(nL).defaultMergedConfig,c=XD(nL).contextLoaded,l=dL().moduleName,u=aL(),d=pL().changeModule,f=(i=rL.Provider,{GuardButtonProvider:function(e){var t=e.children,n=QD(y().useState(!1),2),r=n[0],o=n[1];return y().createElement(i,{value:{spin:r,spinChange:function(e){o(e)}}},t)}}).GuardButtonProvider,p=SQ((function(){return s.loadingComponent}),[s]),h=(
|
|
28438
28443
|
// Error
|
|
28439
|
-
(t={})[LL.ERROR]=function(e){return y().createElement(
|
|
28444
|
+
(t={})[LL.ERROR]=function(e){return y().createElement(RV,{key:e})},
|
|
28440
28445
|
// Login
|
|
28441
28446
|
t[LL.LOGIN]=function(e){return y().createElement(HG,{key:e})},t[LL.RESET_ACCOUNT_NAME]=function(e){return y().createElement(HG,{key:e,isResetPage:!0})},
|
|
28442
28447
|
// 身份源绑定
|
|
@@ -28450,15 +28455,15 @@ t[LL.MFA]=function(e){return y().createElement(lY,{key:e})},
|
|
|
28450
28455
|
// 注册
|
|
28451
28456
|
t[LL.REGISTER]=function(e){return y().createElement(hJ,{key:e})},
|
|
28452
28457
|
// 下载 Authenticator
|
|
28453
|
-
t[LL.DOWNLOAD_AT]=function(e){return y().createElement(
|
|
28458
|
+
t[LL.DOWNLOAD_AT]=function(e){return y().createElement(IV,{key:e})},
|
|
28454
28459
|
// 忘记密码 -> 重置密码
|
|
28455
|
-
t[LL.FORGET_PWD]=function(e){return y().createElement(
|
|
28460
|
+
t[LL.FORGET_PWD]=function(e){return y().createElement(uz,{key:e})},
|
|
28456
28461
|
// 首次登录修改密码
|
|
28457
|
-
t[LL.FIRST_LOGIN_PASSWORD]=function(e){return y().createElement(
|
|
28462
|
+
t[LL.FIRST_LOGIN_PASSWORD]=function(e){return y().createElement(wq,{key:e})},
|
|
28458
28463
|
// 提示修改密码
|
|
28459
|
-
t[LL.NOTICE_PASSWORD_RESET]=function(e){return y().createElement(
|
|
28464
|
+
t[LL.NOTICE_PASSWORD_RESET]=function(e){return y().createElement(kq,{key:e})},
|
|
28460
28465
|
// 登陆安全策略 密码轮换
|
|
28461
|
-
t[LL.FORCED_PASSWORD_RESET]=function(e){return y().createElement(
|
|
28466
|
+
t[LL.FORCED_PASSWORD_RESET]=function(e){return y().createElement(Eq,{key:e})},
|
|
28462
28467
|
// 绑定 TOTP
|
|
28463
28468
|
t[LL.BIND_TOTP]=function(e){return y().createElement(jB,{key:e})},
|
|
28464
28469
|
// 问题反馈
|
|
@@ -28468,15 +28473,15 @@ t[LL.RECOVERY_CODE]=function(e){return y().createElement(qY,{key:e})},
|
|
|
28468
28473
|
// 提交成功
|
|
28469
28474
|
t[LL.SUBMIT_SUCCESS]=function(e){return y().createElement(bJ,{key:e})},
|
|
28470
28475
|
// 注册信息补全
|
|
28471
|
-
t[LL.REGISTER_COMPLETE_INFO]=function(e){return y().createElement(
|
|
28476
|
+
t[LL.REGISTER_COMPLETE_INFO]=function(e){return y().createElement(TV,{key:e})},
|
|
28472
28477
|
// 切换登录身份
|
|
28473
|
-
t[LL.SELECT_ACCOUNT_2_LOGIN]=function(e){return y().createElement(
|
|
28478
|
+
t[LL.SELECT_ACCOUNT_2_LOGIN]=function(e){return y().createElement(Nq,{key:e})},
|
|
28474
28479
|
// 登录信息补全
|
|
28475
|
-
t[LL.LOGIN_COMPLETE_INFO]=function(e){return y().createElement(
|
|
28480
|
+
t[LL.LOGIN_COMPLETE_INFO]=function(e){return y().createElement(PV,{key:e})},
|
|
28476
28481
|
// 注册密码补全
|
|
28477
|
-
t[LL.REGISTER_PASSWORD]=function(e){return y().createElement(
|
|
28482
|
+
t[LL.REGISTER_PASSWORD]=function(e){return y().createElement(Sq,{key:e})},
|
|
28478
28483
|
// 自助解锁
|
|
28479
|
-
t[LL.SELF_UNLOCK]=function(e){return y().createElement($J,{key:e})},t[LL.UNSAFE_PASSWORD_RESET]=function(e){return y().createElement(
|
|
28484
|
+
t[LL.SELF_UNLOCK]=function(e){return y().createElement($J,{key:e})},t[LL.UNSAFE_PASSWORD_RESET]=function(e){return y().createElement(Cq,{key:e})},t[LL.FLOW_SELECT_ACCOUNT]=function(e){return y().createElement(YJ,{key:e})},t[LL.TENANT_PORTAL]=function(e){return y().createElement(FZ,{key:e})},t[LL.New_SUBMIT_SUCCESS]=function(e){return y().createElement(VZ,{key:e})},t[LL.APPLY_INVITATION]=function(e){return y().createElement(KZ,{key:e})},t[LL.MESSAGE]=function(e){return y().createElement(JZ,{key:e})},t[LL.INVITE_AUTH]=function(e){return y().createElement(uQ,{key:e})},t[LL.INVITE_COMPLETE]=function(e){return y().createElement(hQ,{key:e})},t[LL.INVITE_EXPIRE]=function(e){return y().createElement(mQ,{key:e})},t[LL.INVITE_PAGE_EXPIRE]=function(e){return y().createElement(mQ,{key:e})},t[LL.INVITE_SUCCESS]=function(e){return y().createElement(vQ,{key:e})},t[LL.RESET_PASSWORD]=function(e){return y().createElement(CQ,{key:e})},t);
|
|
28480
28485
|
// 初始化 请求拦截器 (Error Code)
|
|
28481
28486
|
kQ((function(){if(u&&d){u.initErrorCodeInterceptor((function(e,t){var n;
|
|
28482
28487
|
// 判断有没有 flowHandle
|
|
@@ -28484,7 +28489,7 @@ t.flowHandle&&TL(t.flowHandle);var r=((n={})[PQ.CHANGE_MODULE]=function(){var e=
|
|
|
28484
28489
|
// 错误码处理回调 切换 module 和 错误信息提示
|
|
28485
28490
|
}),[u,d]);var m=SQ((function(){return c?
|
|
28486
28491
|
// 传入的渲染指令不正确的情况处理
|
|
28487
|
-
l&&h[l]?h[l]((new Date).toString()):y().createElement(
|
|
28492
|
+
l&&h[l]?h[l]((new Date).toString()):y().createElement(RV,{error:new Error("未知错误!moduleName 为 <b>".concat(l,"</b> 无法识别"))}):p||null}),[h,c,p,l]),v=SQ((function(){return a.visible}),[a.visible]),g=SQ((function(){return y().createElement(f,null,m)}),[f,m]);return y().createElement(aE,{prefixCls:xQ,locale:OQ[null!==(n=su.resolvedLanguage)&&void 0!==n?n:su.language]},s.mode===Ks.Modal?y().createElement(dA,{className:"authing-g2-render-module-modal",closeIcon:y().createElement(JD,{type:"authing-close-line",className:"g2-modal-close"}),closable:null===(r=s.clickCloseable)||void 0===r||r,open:v,onCancel:null==a?void 0:a.onClose,keyboard:s.escCloseable,maskClosable:!1,getContainer:null!==(o=s.target)&&void 0!==o&&o},y().createElement("div",{className:"authing-g2-render-module"},g)):y().createElement("div",{style:s.style,className:"authing-g2-render-module ".concat(s.__internalRequest__?"":"authing-g2-render-module-normal")},g))},IQ=function(e){if(!e)return!0;var t=function(e){return QG=e}(e);return fd()(t,e)},AQ=function(e){var t,n=e.guardProps,r=e.initState;return t=n.facePlugin,IQ(t),y().createElement(aj,{guardProps:n,initState:r},y().createElement(NQ,{guardProps:n}))},RQ=function(){return RQ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},RQ.apply(this,arguments)},MQ=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},DQ=y().memo,LQ=y().useEffect,FQ=y().useRef,jQ=y().useState,BQ=DQ((function(e){var t,n,r=e.config,o=FQ(null),i=MQ(jQ(!1),2),a=i[0],s=i[1];
|
|
28488
28493
|
// 锁定 Guard 中 window 指向
|
|
28489
28494
|
LQ((function(){if(null==o?void 0:o.current){var e=OX(o.current);ad(e),s(!0)}}),[]);
|
|
28490
28495
|
// 首页 init 数据
|
|
@@ -28536,11 +28541,11 @@ return Array.isArray(t)?
|
|
|
28536
28541
|
// 遍历数组,将每个对象转换为 { key, value }
|
|
28537
28542
|
t.forEach((function(e){try{var t="string"==typeof e?JSON.parse(e):e;n(t)}catch(e){}})):"object"==typeof t&&null!==t&&
|
|
28538
28543
|
// 如果是对象,直接提取键值对
|
|
28539
|
-
n(t),e};!function(e){e[e.NoCheck=0]="NoCheck",e[e.Low=1]="Low",e[e.Middle=2]="Middle",e[e.High=3]="High",e[e.AUTO=4]="AUTO",e[e.Custom=5]="Custom"}(gX||(gX={}));var bX=((rX={})[gX.NoCheck]={placeholder:function(){return su.t("login.inputPwd")},validateMessage:function(){return su.t("login.inputPwd")}},rX[gX.Low]={placeholder:function(){return su.t("login.setPwdLimit1")},validateMessage:function(){return su.t("login.setPwdLimitMsg1")}},rX[gX.Middle]={placeholder:function(){return su.t("login.login.setPwdLimit2")},validateMessage:function(){return su.t("login.setPwdLimitMsg2")}},rX[gX.High]={placeholder:function(){return su.t("login.login.setPwdLimit3")},validateMessage:function(){return su.t("login.setPwdLimitMsg3")}},rX[gX.AUTO]={placeholder:function(){return su.t("login.inputPwd")},validateMessage:function(){return su.t("login.inputPwd")}},rX[gX.Custom]={placeholder:function(){return su.t("login.inputPwd")},validateMessage:function(){return su.t("login.inputPwd")}},rX),wX=[/\d+/,/[a-zA-Z]/,/[`~!@#$%^&*()_\-+=<>?:"{}|,.\\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、]/],CX=function(e){return wX.map((function(t){return t.test(e)})).filter((function(e){return e})).length},EX=function(e,t,n,r
|
|
28544
|
+
n(t),e};!function(e){e[e.NoCheck=0]="NoCheck",e[e.Low=1]="Low",e[e.Middle=2]="Middle",e[e.High=3]="High",e[e.AUTO=4]="AUTO",e[e.Custom=5]="Custom"}(gX||(gX={}));var bX=((rX={})[gX.NoCheck]={placeholder:function(){return su.t("login.inputPwd")},validateMessage:function(){return su.t("login.inputPwd")}},rX[gX.Low]={placeholder:function(){return su.t("login.setPwdLimit1")},validateMessage:function(){return su.t("login.setPwdLimitMsg1")}},rX[gX.Middle]={placeholder:function(){return su.t("login.login.setPwdLimit2")},validateMessage:function(){return su.t("login.setPwdLimitMsg2")}},rX[gX.High]={placeholder:function(){return su.t("login.login.setPwdLimit3")},validateMessage:function(){return su.t("login.setPwdLimitMsg3")}},rX[gX.AUTO]={placeholder:function(){return su.t("login.inputPwd")},validateMessage:function(){return su.t("login.inputPwd")}},rX[gX.Custom]={placeholder:function(){return su.t("login.inputPwd")},validateMessage:function(){return su.t("login.inputPwd")}},rX),wX=[/\d+/,/[a-zA-Z]/,/[`~!@#$%^&*()_\-+=<>?:"{}|,.\\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、]/],CX=function(e){return wX.map((function(t){return t.test(e)})).filter((function(e){return e})).length},EX=function(e,t,n,r){var o,i;void 0===e&&(e=gX.NoCheck),void 0===t&&(t={});var a=eX().post,s=cX([],sX(dX(su.t("common.password"),n)),!1),c=(null!==(i=su.resolvedLanguage)&&void 0!==i||su.language,(o={})[gX.NoCheck]=cX([],sX(s),!1),o[gX.Low]=cX(cX([],sX(s),!1),[{validateTrigger:"onBlur",validator:function(e,t){return t&&t.length<6?Promise.reject(bX[gX.Low].validateMessage()):Promise.resolve()}}],!1),o[gX.Middle]=cX(cX([],sX(s),!1),[{validateTrigger:"onBlur",validator:function(e,t){return t&&(t.length<6||CX(t)<2)?Promise.reject(bX[gX.Middle].validateMessage()):Promise.resolve()}}],!1),o[gX.High]=cX(cX([],sX(s),!1),[{validateTrigger:"onBlur",validator:function(e,t){return t&&(t.length<6||CX(t)<3)?Promise.reject(bX[gX.High].validateMessage()):Promise.resolve(!0)}}],!1),o[gX.AUTO]=cX(cX([],sX(s),!1),[{validateTrigger:"onBlur",pattern:null==t?void 0:t.regex,message:"zh-CN"===su.resolvedLanguage&&(null==t?void 0:t.zhMessageOpen)?null==t?void 0:t.zhMessage:"en-US"===su.resolvedLanguage&&(null==t?void 0:t.enMessageOpen)?null==t?void 0:t.enMessage:"ja-JP"===su.resolvedLanguage&&(null==t?void 0:t.jaMessageOpen)?null==t?void 0:t.jaMessage:"ja-JP"===su.resolvedLanguage&&(null==t?void 0:t.jpMessageOpen)?null==t?void 0:t.jpMessage:"zh-TW"===su.resolvedLanguage&&(null==t?void 0:t.twMessageOpen)?null==t?void 0:t.twMessage:null==t?void 0:t.message}],!1),o[gX.Custom]=[
|
|
28540
28545
|
// ...required,
|
|
28541
|
-
{validateTrigger:"onBlur",validator:function(e,t){return iX(this,void 0,void 0,(function(){var e,n,
|
|
28546
|
+
{validateTrigger:"onBlur",validator:function(e,t){return iX(this,void 0,void 0,(function(){var e,n,o;return aX(this,(function(i){switch(i.label){case 0:return t&&0!==(null==t?void 0:t.length)?[3/*break*/,1]:[2/*return*/,Promise.reject(su.t("login.inputPwd"))];case 1:return[4/*yield*/,a("/api/v2/password/user-action/check",{password:t,userId:r})];case 2:return 200===(null==(e=i.sent())?void 0:e.code)?(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.valid)?[2/*return*/,Promise.resolve(!0)]:[2/*return*/,Promise.reject(null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.message)]:[2/*return*/,Promise.reject(null==e?void 0:e.message)];case 3:return[2/*return*/]}}))}))}}],o);return c[e]},kX=function(e,t,n,r,o){var i,a;void 0===e&&(e=gX.NoCheck),void 0===t&&(t={});var s=eX().post,c=cX([],sX(dX(su.t("common.password"),r)),!1),l=(null!==(a=su.resolvedLanguage)&&void 0!==a||su.language,(i={})[gX.NoCheck]=cX([],sX(c),!1),i[gX.Low]=cX(cX([],sX(c),!1),[{validateTrigger:n,validator:function(e,t){return t&&t.length<6?Promise.reject(bX[gX.Low].validateMessage()):Promise.resolve()}}],!1),i[gX.Middle]=cX(cX([],sX(c),!1),[{validateTrigger:n,validator:function(e,t){return t&&(t.length<6||CX(t)<2)?Promise.reject(bX[gX.Middle].validateMessage()):Promise.resolve()}}],!1),i[gX.High]=cX(cX([],sX(c),!1),[{validateTrigger:n,validator:function(e,t){return t&&(t.length<6||CX(t)<3)?Promise.reject(bX[gX.High].validateMessage()):Promise.resolve(!0)}}],!1),i[gX.AUTO]=cX(cX([],sX(c),!1),[{validateTrigger:n,pattern:null==t?void 0:t.regex,message:"zh-CN"===su.resolvedLanguage&&(null==t?void 0:t.zhMessageOpen)?null==t?void 0:t.zhMessage:"en-US"===su.resolvedLanguage&&(null==t?void 0:t.enMessageOpen)?null==t?void 0:t.enMessage:"ja-JP"===su.resolvedLanguage&&(null==t?void 0:t.jaMessageOpen)?null==t?void 0:t.jaMessage:"ja-JP"===su.resolvedLanguage&&(null==t?void 0:t.jpMessageOpen)?null==t?void 0:t.jpMessage:"zh-TW"===su.resolvedLanguage&&(null==t?void 0:t.twMessageOpen)?null==t?void 0:t.twMessage:null==t?void 0:t.message}],!1),i[gX.Custom]=[
|
|
28542
28547
|
// ...required,
|
|
28543
|
-
{validateTrigger:n,validator:function(e,t){return iX(this,void 0,void 0,(function(){var e,n,r
|
|
28548
|
+
{validateTrigger:n,validator:function(e,t){return iX(this,void 0,void 0,(function(){var e,n,r;return aX(this,(function(i){switch(i.label){case 0:return t&&0!==(null==t?void 0:t.length)?[3/*break*/,1]:[2/*return*/,Promise.reject(su.t("login.inputPwd"))];case 1:return[4/*yield*/,s("/api/v2/password/user-action/check",{password:t,userId:o})];case 2:return 200===(null==(e=i.sent())?void 0:e.code)?(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.valid)?[2/*return*/,Promise.resolve(!0)]:[2/*return*/,Promise.reject(null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.message)]:[2/*return*/,Promise.reject(null==e?void 0:e.message)];case 3:return[2/*return*/]}}))}))}}],i);return l[e]},SX=function(e){return new Promise((function(t){return setTimeout(t,e)}))},xX=function(e){switch(e){case Ws.Phone:case Ws.EmailCode:case Gs.EmailCode:return Gs.Phone;case Ws.Email:return Gs.Email;default:return e}},_X=function(e){var t=e.split("@");return t[0].substr(0,1)+"***"+"@"+t[1]},PX=function(e){return e.replace(/(\d{3})\d*(\d{4})/,"$1****$2")},TX=function(e,t){var n=Object.keys(e).filter((function(e){return e.startsWith("on")})),r=Object.keys(t).filter((function(e){return e.startsWith("on")}));return fd()(hd()(e,n),hd()(t,r))},OX=function(e){return"#document"===e.nodeName?e:OX(e.parentNode)},NX=function(e,t){var n,r,o,i,a=null==e?void 0:e.loginTabs.list,s=null!==(r=null===(n=null==e?void 0:e.verifyCodeTabConfig)||void 0===n?void 0:n.enabledLoginMethods)&&void 0!==r?r:[],c=null!==(i=null===(o=null==e?void 0:e.passwordTabConfig)||void 0===o?void 0:o.enabledLoginMethods)&&void 0!==i?i:[];// 支持的密码登录方式
|
|
28544
28549
|
// 通过手机验证码注册成功
|
|
28545
28550
|
return t===Ws.Phone?a.includes(Vs.PhoneCode)&&s.includes("phone-code")?{specifyDefaultLoginMethod:Vs.PhoneCode,lockMethod:"phone-code"}:a.includes(Vs.Password)&&c.includes("phone-password")?{specifyDefaultLoginMethod:Vs.Password}:void 0:
|
|
28546
28551
|
// 通过邮箱验证码注册成功
|