import{o as n,c as a,w as i,a as o,b as l,u as e,t as f,f as d,h as r,s as p}from"./app-SC54XQDl.js";/* empty css            */import{i as _,c as h}from"./app-Ba7ZqSpq.js";import{_ as b}from"./app-DFulsyXy.js";import{_ as g}from"./app-iiAIFCF5.js";import{_ as x}from"./app-CVQkwzlf.js";import{T as c}from"./app-CNHjdV6U.js";import{_ as S}from"./app-vNuZ2BVW.js";import"./app-Dw0jKdCD.js";import"./app-DnXuoh8P.js";import"./app-PPG0ZS4d.js";import"./app--Lj8zATS.js";import"./app-Ch8j4za4.js";import"./app-C2mBgI5Z.js";import"./app-DyP4Nide.js";import"./app-CDCZqmkG.js";import"./app-Bt2pXSov.js";function w(){_(this),this.otpCode="",this.isSubmitting=!1,this.encodedFrom=window.encodeURIComponent(this.from),this.$delay(function(){this.$find("form input[name='otpCode']").focus()}),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(s){localStorage.setItem("sid",s.data.localSid),localStorage.setItem("ip",s.data.ip),this.$delay(function(){this.from.length==0?window.location="/dashboard":window.location=this.from})}}const y={class:"form-box"},C=["value"],v=["value"],V={class:"flex flex-col gap-4 border-gray-200 border p-4 rounded-xl"},B={class:"field text-center"},$=o("div",{class:"ui field"}," 为了保护你的账户安全，需要进行OTP二次身份验证。 ",-1),O={class:"ui field"},D={class:"field"},N={class:"ui field cancel-login"},T=["href"],k={__name:"otp",setup(s){const t=h(new w);return(I,m)=>(n(),a(S,null,{default:i(()=>[o("div",y,[l(b,{action:"$",onBefore:e(t).submitBefore,onDone:e(t).submitDone,onSuccess:e(t).submitSuccess,disableCSRF:"",autocomplete:"off"},{default:i(()=>[o("input",{type:"hidden",name:"sid",value:e(t).sid},null,8,C),o("input",{type:"hidden",name:"remember",value:e(t).remember?1:0},null,8,v),o("div",V,[o("div",B,[o("h6",null,"登录"+f(e(t).systemName),1)]),$,o("div",O,[l(g,{beginIcon:"pi pi-barcode"},{default:i(()=>[l(x,{type:"text",fieldname:"otpCode",name:"otpCode",modelValue:e(t).otpCode,"onUpdate:modelValue":m[0]||(m[0]=u=>e(t).otpCode=u),placeholder:"请输入OTP动态密码",maxlength:"6",class:"w-full"},null,8,["modelValue"])]),_:1})]),o("div",D,[e(t).isSubmitting?r("",!0):(n(),a(c,{key:0,class:"w-full",type:"submit"},{default:i(()=>[d("验证")]),_:1})),e(t).isSubmitting?(n(),a(c,{key:1,class:"w-full",disabled:"",type:"submit"},{default:i(()=>[d("验证中...")]),_:1})):r("",!0)]),o("div",N,[o("a",{href:"/?from="+e(t).encodedFrom},"« 取消登录",8,T)])])]),_:1},8,["onBefore","onDone","onSuccess"])])]),_:1}))}};p({app:k,useRouter:!1});
