mirror of https://github.com/allinssl/allinssl
2 lines
14 KiB
JavaScript
2 lines
14 KiB
JavaScript
import{d as e,c as t,o as r,a as n,m as a,s as o,n as s,r as i,aK as l,E as c,aL as u,I as d,$ as f,g as p,i as h,e as v,aM as _,z as g,C as m,f as w,U as y,aN as b,B as x,k as S}from"./main-Fcjzy_wF.js";import{u as C,I as B}from"./index-BzaYP_dt.js";import{l as k,a as O}from"./public-Ben4IZfp.js";import{u as z}from"./index-KVsSPPSy.js";import{L as M}from"./LockOutlined-N80qGkkE.js";import"./index-CopjO70k.js";const j={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},D=e({name:"CodeOutlined",render:function(e,a){return r(),t("svg",j,a[0]||(a[0]=[n("path",{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 0 0 308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 0 0-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z",fill:"currentColor"},null,-1)]))}}),P={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},I=e({name:"UserOutlined",render:function(e,a){return r(),t("svg",P,a[0]||(a[0]=[n("path",{d:"M858.5 763.6a374 374 0 0 0-80.6-119.5a375.63 375.63 0 0 0-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1c-.4.2-.8.3-1.2.5c-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 0 0-80.6 119.5A371.7 371.7 0 0 0 136 901.8a8 8 0 0 0 8 8.2h60c4.4 0 7.9-3.5 8-7.8c2-77.2 33-149.5 87.8-204.3c56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 0 0 8-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z",fill:"currentColor"},null,-1)]))}});var H="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function T(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function U(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var L={exports:{}};var R={exports:{}};const A=U(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var E;function F(){return E||(E=1,R.exports=(e=e||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==H&&H.crypto&&(r=H.crypto),!r)try{r=A}catch(v){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(v){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(v){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),o={},s=o.lib={},i=s.Base=function(){return{extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),l=s.WordArray=i.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,a=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<a;o++){var s=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=s<<24-(n+o)%4*8}else for(var i=0;i<a;i+=4)t[n+i>>>2]=r[i>>>2];return this.sigBytes+=a,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new l.init(t,e)}}),c=o.enc={},u=c.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],a=0;a<r;a++){var o=t[a>>>2]>>>24-a%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new l.init(r,t/2)}},d=c.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],a=0;a<r;a++){var o=t[a>>>2]>>>24-a%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new l.init(r,t)}},f=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,a=n.words,o=n.sigBytes,s=this.blockSize,i=o/(4*s),c=(i=t?e.ceil(i):e.max((0|i)-this._minBufferSize,0))*s,u=e.min(4*c,o);if(c){for(var d=0;d<c;d+=s)this._doProcessBlock(a,d);r=a.splice(0,c),n.sigBytes-=u}return new l.init(r,u)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=p.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new h.HMAC.init(e,r).finalize(t)}}});var h=o.algo={};return o}(Math),e)),R.exports;var e}var K,N;const V=T(K?L.exports:(K=1,L.exports=(N=F(),function(e){var t=N,r=t.lib,n=r.WordArray,a=r.Hasher,o=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var i=o.MD5=a.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,a=e[n];e[n]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var o=this._hash.words,i=e[t+0],f=e[t+1],p=e[t+2],h=e[t+3],v=e[t+4],_=e[t+5],g=e[t+6],m=e[t+7],w=e[t+8],y=e[t+9],b=e[t+10],x=e[t+11],S=e[t+12],C=e[t+13],B=e[t+14],k=e[t+15],O=o[0],z=o[1],M=o[2],j=o[3];O=l(O,z,M,j,i,7,s[0]),j=l(j,O,z,M,f,12,s[1]),M=l(M,j,O,z,p,17,s[2]),z=l(z,M,j,O,h,22,s[3]),O=l(O,z,M,j,v,7,s[4]),j=l(j,O,z,M,_,12,s[5]),M=l(M,j,O,z,g,17,s[6]),z=l(z,M,j,O,m,22,s[7]),O=l(O,z,M,j,w,7,s[8]),j=l(j,O,z,M,y,12,s[9]),M=l(M,j,O,z,b,17,s[10]),z=l(z,M,j,O,x,22,s[11]),O=l(O,z,M,j,S,7,s[12]),j=l(j,O,z,M,C,12,s[13]),M=l(M,j,O,z,B,17,s[14]),O=c(O,z=l(z,M,j,O,k,22,s[15]),M,j,f,5,s[16]),j=c(j,O,z,M,g,9,s[17]),M=c(M,j,O,z,x,14,s[18]),z=c(z,M,j,O,i,20,s[19]),O=c(O,z,M,j,_,5,s[20]),j=c(j,O,z,M,b,9,s[21]),M=c(M,j,O,z,k,14,s[22]),z=c(z,M,j,O,v,20,s[23]),O=c(O,z,M,j,y,5,s[24]),j=c(j,O,z,M,B,9,s[25]),M=c(M,j,O,z,h,14,s[26]),z=c(z,M,j,O,w,20,s[27]),O=c(O,z,M,j,C,5,s[28]),j=c(j,O,z,M,p,9,s[29]),M=c(M,j,O,z,m,14,s[30]),O=u(O,z=c(z,M,j,O,S,20,s[31]),M,j,_,4,s[32]),j=u(j,O,z,M,w,11,s[33]),M=u(M,j,O,z,x,16,s[34]),z=u(z,M,j,O,B,23,s[35]),O=u(O,z,M,j,f,4,s[36]),j=u(j,O,z,M,v,11,s[37]),M=u(M,j,O,z,m,16,s[38]),z=u(z,M,j,O,b,23,s[39]),O=u(O,z,M,j,C,4,s[40]),j=u(j,O,z,M,i,11,s[41]),M=u(M,j,O,z,h,16,s[42]),z=u(z,M,j,O,g,23,s[43]),O=u(O,z,M,j,y,4,s[44]),j=u(j,O,z,M,S,11,s[45]),M=u(M,j,O,z,k,16,s[46]),O=d(O,z=u(z,M,j,O,p,23,s[47]),M,j,i,6,s[48]),j=d(j,O,z,M,m,10,s[49]),M=d(M,j,O,z,B,15,s[50]),z=d(z,M,j,O,_,21,s[51]),O=d(O,z,M,j,S,6,s[52]),j=d(j,O,z,M,h,10,s[53]),M=d(M,j,O,z,b,15,s[54]),z=d(z,M,j,O,f,21,s[55]),O=d(O,z,M,j,w,6,s[56]),j=d(j,O,z,M,k,10,s[57]),M=d(M,j,O,z,g,15,s[58]),z=d(z,M,j,O,C,21,s[59]),O=d(O,z,M,j,v,6,s[60]),j=d(j,O,z,M,x,10,s[61]),M=d(M,j,O,z,p,15,s[62]),z=d(z,M,j,O,y,21,s[63]),o[0]=o[0]+O|0,o[1]=o[1]+z|0,o[2]=o[2]+M|0,o[3]=o[3]+j|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,a=8*t.sigBytes;r[a>>>5]|=128<<24-a%32;var o=e.floor(n/4294967296),s=n;r[15+(a+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(a+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(r.length+1),this._process();for(var i=this._hash,l=i.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return i},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,r,n,a,o,s){var i=e+(t&r|~t&n)+a+s;return(i<<o|i>>>32-o)+t}function c(e,t,r,n,a,o,s){var i=e+(t&n|r&~n)+a+s;return(i<<o|i>>>32-o)+t}function u(e,t,r,n,a,o,s){var i=e+(t^r^n)+a+s;return(i<<o|i>>>32-o)+t}function d(e,t,r,n,a,o,s){var i=e+(r^(t|~n))+a+s;return(i<<o|i>>>32-o)+t}t.MD5=a._createHelper(i),t.HmacMD5=a._createHmacHelper(i)}(Math),N.MD5))),{success:$}=s(),{handleError:W}=C(),G=a("login-store",(()=>{const e=i(null),t=i(""),r=z("login-token",""),n=i(!1),a=i({username:"",password:"",code:""}),o=z("remember-me",!1),s=i(null),{fetch:l,error:c,data:u,defaultData:d,message:f,loading:p}=k(),h=()=>{a.value.username="",a.value.password="",o.value=!1,c.value=null},v=async()=>{try{const{data:e}=await O();t.value=e.data}catch(e){W(e)}},_=()=>{const e=B("must_code",!1);n.value=1===Number(e),n.value&&v()};return{loading:p,codeImg:t,error:c,user:e,loginData:a,rememberMe:o,forgotPasswordRef:s,mustCode:n,handleLogin:async e=>{try{c.value=null,f.value=!0,await l(e);const{status:t}=u.value;if(!t)throw new Error(u.value.message);$("登录成功,正在跳转中..."),setTimeout((()=>location.href="/"),1e3),_()}catch(t){c.value=t.message,_()}},handleLogout:()=>{e.value=null,r.value=null,h(),location.href="/login"},handleGetCode:v,checkMustCode:_,resetForm:h,clearToken:()=>{r.value=null}}})),J=()=>{const e=localStorage.getItem("loginData");return e?JSON.parse(e):null},q=(e,t)=>{localStorage.setItem("loginData",JSON.stringify({username:e,password:t}))},Q=()=>{const e=(()=>{const e=G();return{...e,...o(e)}})(),{handleError:t}=C(),{error:r,loginData:n,handleLogin:a,resetForm:s,rememberMe:i,checkMustCode:p}=e,h=async e=>{var o;if(e.username.trim())if(e.password.trim())try{const t=(o=e.password,V(`${o}_bt_all_in_ssl`).toString());await a({...e,password:t}),i.value&&!r.value?q(e.username,e.password):r.value?n.value.password="":r.value||s()}catch(l){t(l)}else r.value=f("t_4_1744164840458");else r.value=f("t_3_1744164839524")},v=async e=>{e.preventDefault(),await h(n.value)},_=l();return _.run((()=>{c(r,(()=>{setTimeout((()=>{r.value=""}),5e3)})),u((()=>{_.stop()}))})),d((()=>{if(p(),i.value){const e=J();e&&(n.value=e)}})),{...e,handleSubmit:v,handleKeyup:e=>{"Enter"===e.key&&v(e)},handleLogin:h,getRememberData:J,setRememberData:q}},X="_container_13wi5_4",Y="_loginBox_13wi5_20",Z="_leftImageWrapper_13wi5_26",ee="_leftImage_13wi5_26",te="_leftSection_13wi5_51",re="_leftTitle_13wi5_59",ne="_logo_13wi5_63",ae="_rightSection_13wi5_76",oe="_title_13wi5_89",se="_formContainer_13wi5_95",ie="_formWrapper_13wi5_101",le="_formContent_13wi5_106",ce="_formInputs_13wi5_111",ue="_formActions_13wi5_130",de="_rememberSection_13wi5_135",fe="_error_13wi5_166",pe="_forgotPassword_13wi5_305",he="_icon_13wi5_310";const ve=e({setup(){const{loading:e,error:t,rememberMe:r,handleSubmit:n,handleKeyup:a,loginData:o,handleGetCode:s,codeImg:i,mustCode:l}=Q(),{isDark:c}=p(),u=h(["textColor2","actionColor","errorColor","primaryColor","primaryColorSuppl"]);return()=>{let d;return v("div",{style:u.value},[v("div",{class:X,style:`background-image:${c.value?"url(/static/images/login-bg-dark.svg)":"url(/static/images/login-bg.svg)"};`},[v("div",{class:Y},[v("div",{class:te},[v("h2",{class:re},[v("img",{src:"/static/images/logo.png",alt:"logo",class:ne},null),v("span",null,[f("t_0_1744164843238")])]),v("div",{class:Z},[v("img",{src:"/static/images/login-display.svg",alt:f("t_1_1744164835667"),class:ee},null)])]),v("div",{class:ae},[v("div",{class:se},[v("h1",{class:oe},[f("t_2_1744164839713")]),v(_,{onSubmit:n,class:ie},{default:()=>{return[v("div",{class:le},[v("div",{class:ce},[v(g,{"show-label":!1},{default:()=>[v(m,{value:o.value.username,"onUpdate:value":e=>o.value.username=e,onKeyup:a,disabled:e.value,placeholder:f("t_3_1744164839524"),clearable:!0,size:"large"},{prefix:()=>v(w,{component:I,class:he},null)})]}),v(g,{"show-label":!1},{default:()=>[v(m,{onKeyup:a,disabled:e.value,value:o.value.password,"onUpdate:value":e=>o.value.password=e,type:"password",placeholder:f("t_4_1744164840458"),clearable:!0,size:"large",showPasswordOn:"click"},{prefix:()=>v(w,{component:M,class:he},null)})]}),l.value?v(g,{"show-label":!1},{default:()=>[v(m,{onKeyup:a,disabled:e.value,value:o.value.code,"onUpdate:value":e=>o.value.code=e,type:"text",placeholder:f("t_25_1745289355721"),clearable:!0,size:"large",showPasswordOn:"click"},{prefix:()=>v(w,{component:D,class:he},null),suffix:()=>v("span",{onClick:s,title:f("t_0_1745936396853"),class:"w-[10rem] h-[4rem] mr-[-1.5rem] relative z-[999] cursor-pointer bg-slate-400 rounded-r-[6px]"},[v(y,{src:i.value,"preview-disabled":!0},null)])})]}):null]),v("div",{class:ue},[v("div",{class:de},[v(b,{checked:r.value,onUpdateChecked:e=>r.value=e},(c=d=f("t_5_1744164840468"),"function"==typeof c||"[object Object]"===Object.prototype.toString.call(c)&&!S(c)?d:{default:()=>[d]})),v("a",{class:pe,href:"https://www.bt.cn/bbs/thread-144776-1-1.html",target:"_blank"},[f("t_6_1744164838900")])]),t.value&&v("div",{class:fe},[t.value]),v(x,{type:"primary",size:"large",block:!0,loading:e.value,onClick:n},{default:()=>[e.value?f("t_7_1744164838625"):f("t_8_1744164839833")]})])])];var c}})])])])])])}}});export{ve as default};
|