import{o as s,c as o,w as e,a as n,b as a,u as r,s as m}from"./app-DA7OTM4Q.js";import{i as h,c}from"./app-BT68AfZ-.js";import{m as d,_ as p}from"./app-BOiW3cCB.js";import{_ as l}from"./app-BBZP5Ezi.js";import"./app-CqkleIqs.js";import"./app-ZGhHKWIW.js";import"./app-C-GI59rl.js";import"./app-a9KqBnqw.js";import"./app-KNE_24OY.js";import"./app-Dxa5h-uG.js";import"./app-Zes_jb7S.js";import"./app-DokSVapq.js";import"./app-DuUYZNNT.js";import"./app-DSiZNBrr.js";import"./app-B_5dka6q.js";import"./app-BqY8p2gl.js";import"./app-CQwVTjAx.js";import"./app-WOreqTiW.js";import"./app-tdOn1PbY.js";import"./app-CVfeXVc-.js";function f(){h(this),this.username="",this.password="",this.passwordMd5="",this.encodedFrom=window.encodeURIComponent(this.from),this.isDemo&&(this.username="user",this.password="123456"),this.showOTP=!1,this.isSubmitting=!1,this.$delay(function(){this.changePassword()}),this.usernamePlaceholder="请输入用户名";var t=[];this.emailCanLogin&&t.push("邮箱"),this.mobileCanLogin&&t.push("手机号码"),t.length>0&&(this.usernamePlaceholder+="/"+t.join("/")),this.changeUsername=function(){},this.changePassword=function(){this.passwordMd5=d(this.password.trim())},this.moreOptionsVisible=!1,this.showMoreOptions=function(){this.moreOptionsVisible=!this.moreOptionsVisible},this.submitBefore=function(){this.isSubmitting=!0},this.submitDone=function(){this.isSubmitting=!1},this.submitSuccess=function(i){localStorage.setItem("sid",i.data.localSid),localStorage.setItem("ip",i.data.ip),this.$delay(function(){if(i.data.requireOTP){window.location="/login/otp?sid="+i.data.sid+"&remember="+(i.data.remember?1:0)+"&from="+window.encodeURIComponent(this.from);return}this.from.length==0?window.location="/dashboard":window.location=this.from})}}const u={class:"form-box"},w={__name:"index",setup(t){const i=c(new f);return(_,b)=>(s(),o(l,null,{default:e(()=>[n("div",u,[a(p,{ctx:r(i)},null,8,["ctx"])])]),_:1}))}};m({app:w,useRouter:!1});
