2 lines
19 KiB
JavaScript
2 lines
19 KiB
JavaScript
import{d as Z,a as R,m as oe,o as M,b as Q,e as a,i as fe,n as ge,r as z,p as re,q as le,c as se,s as ce,v as V,x as k,h as l,t as G,T as Ee,y as Te,z as we,A as Ie,w as g,f as d,$,g as de,C as Se,D as xe,E as Ce,B as Oe,_ as ye,F as pe,G as Xe,H as Re,I as be,J as Ve,K as te,L as Ae,M as Pe,N as Ye,O as De,P as Me,Q as Le,R as Be,S as Ne,U as Ue,V as ke,W as ze,X as He}from"./index--PhRNylI.js";const Fe={class:"absolute-lt z-1 size-full overflow-hidden"},We={class:"absolute -right-300px -top-900px lt-sm:-right-100px lt-sm:-top-1170px"},$e={height:"1337",width:"1337"},Ge={id:"linearGradient-2",x1:"0.79",y1:"0.62",x2:"0.21",y2:"0.86"},je=["stop-color"],Qe=["stop-color"],Ze={class:"absolute -bottom-400px -left-200px lt-sm:-bottom-760px lt-sm:-left-100px"},Je={height:"896",width:"967.8852157128662"},qe={id:"linearGradient-3",x1:"0.5",y1:"0",x2:"0.5",y2:"1"},Ke=["stop-color"],et=["stop-color"],tt=Z({name:"WaveBg",__name:"wave-bg",props:{themeColor:{}},setup(r){const S=r,E=R(()=>oe(S.themeColor,200)),s=R(()=>oe(S.themeColor,500));return(A,c)=>(M(),Q("div",Fe,[a("div",We,[(M(),Q("svg",$e,[a("defs",null,[c[0]||(c[0]=a("path",{id:"path-1",opacity:"1","fill-rule":"evenodd",d:"M1337,668.5 C1337,1037.455193874239 1037.455193874239,1337 668.5,1337 C523.6725684305388,1337 337,1236 370.50000000000006,1094 C434.03835568300906,824.6732385973953 6.906089672974592e-14,892.6277623047779 0,668.5000000000001 C0,299.5448061257611 299.5448061257609,1.1368683772161603e-13 668.4999999999999,0 C1037.455193874239,0 1337,299.544806125761 1337,668.5Z"},null,-1)),a("linearGradient",Ge,[a("stop",{offset:"0","stop-color":E.value,"stop-opacity":"1"},null,8,je),a("stop",{offset:"1","stop-color":s.value,"stop-opacity":"1"},null,8,Qe)])]),c[1]||(c[1]=a("g",{opacity:"1"},[a("use",{"xlink:href":"#path-1",fill:"url(#linearGradient-2)","fill-opacity":"1"})],-1))]))]),a("div",Ze,[(M(),Q("svg",Je,[a("defs",null,[c[2]||(c[2]=a("path",{id:"path-2",opacity:"1","fill-rule":"evenodd",d:"M896,448 C1142.6325445712241,465.5747656464056 695.2579309733121,896 448,896 C200.74206902668806,896 5.684341886080802e-14,695.2579309733121 0,448.0000000000001 C0,200.74206902668806 200.74206902668791,5.684341886080802e-14 447.99999999999994,0 C695.2579309733121,0 475,418 896,448Z"},null,-1)),a("linearGradient",qe,[a("stop",{offset:"0","stop-color":s.value,"stop-opacity":"1"},null,8,Ke),a("stop",{offset:"1","stop-color":E.value,"stop-opacity":"1"},null,8,et)])]),c[3]||(c[3]=a("g",{opacity:"1"},[a("use",{"xlink:href":"#path-2",fill:"url(#linearGradient-3)","fill-opacity":"1"})],-1))]))])]))}}),ot="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAELklEQVRYR+2YW2wUZRTH//9vtlCoF9IoIklT3PqgPGi326hoetuaGEhIr9SgCYkkgt2WGOQVCca+GavWdr0GjD4YhG3RB3hply1LQA1tEQIxEXapGI2pEkys9LIzx2ylYWfY6e5sF0oi+7hzzvl+3/9855xvhrjNf7zN+XAHcL4Z+n8o6JWTeYt++W25S596AIZy6TB+n3yo+Nchlk8vmIIVowdXU9c3Q1gDSilBlQwjgBAYFGDvdF58/4milqvZwDpOcXWsb5Uh8hmBqkwXFMhlCN8aX5LXNbRy/T+Z+iXsHAFWRXs3QGQPyLucLDJrK5DgUXdTsxPfjAEro8E3Ce50EtxsKxPTwCPH3U2jTmJkBJgWTnAMxDeGMEoa0xQ+LJQnCD4HYFkCyAC3RdwN3U7gMkpxRTTYrMD91sCJIgCxV5R6O1Jcfy7VwonqLoj9/CqB2kF341qncGkBvRe+ureAWpRgoalCBecMFzcdK24YymZRJz5zprgq1tsJwXYL3CVZGvdGHmwZc7JQtra2gE+f712ep2QUYP714DJhaJrXLqXZQszlZwtYdSHoB9ljVk/ePVrSZFL0ZkAlxzQBVseCT8WhZhRThtFB8plk9Zi/qCi8cv0fNxvKFrDy4oF11NXXIFy2EII4iBcG3Y03VLZT8OqRd5aFPduvOEpxRayvXolxAKB2g6NgEhobBlc1HHYKY7WvHf5wtVAPgegIlbbZ9seUZ7AyFnwewi9pGoUyDmhrB931kfnC1ZwOeKlLP8GZJi6QLSFP2yep4toXSbT3ZQAfX3O6omt8Nhd9r/aHQAUMOQywYBZo5uZD2ThQ2rbPCjlnH6yI9rUryE5DU75ctJaake46Be4DuDjF8dFBNA94/AdtiySVxIlpMlTS8td801o70vMigM9huTda2lhcKHVHPO2HZv/P6LIwX7hk/+qzPSvUJGMkrg8AQYTkroRdXMlE+HH/twsG6BsOdJHYZlaO/lBZ6weOiiSXqs3Gqj0TeAxx+T75DIpgwjC0onD51pQD4JaluPrkR/cpFT9DcoVp84LOgTL/DjtBbglgou+puHwB8lEznPxJw1XSX77VtgizBvQNBw4RMqB7xt4Lc3c8lQKJaQHoO4R8ydz0/7MWoCXk8c85MrMC9J3qaafw/WtQlwXST+F3BnAeYB4obgJ1BJIuG+YtiKAjVOZ/Pd1ZdwzoG+4uBtSPpjaRbhXLcwF3hzytb2TilgVgT5BkYybBrTYC+Rvg5nRpdTRJrIs8+VPXPQXj2i4ItxC4O2NQQUQnN4U9rRcz9nH64p4ceM2lziX5Y4s3KHCdUHwE77ecMkMEp6BwhIa2Z6DslZRvfulgHafYLuCas58WLp2aLCFUga70qxOFU6dPFL2W1feYeaU43Y5z/TxnCuYabMEuC043ckdBp4pZ7f8FE5psOI1g6fwAAAAASUVORK5CYII=",st=["width","height"],at=["width","height"],nt=["width","height"],it=a("div",{class:"loading-gif_"},[a("span"),a("span"),a("span"),a("span"),a("span")],-1),lt=[it],ct={class:"auth-control_"},rt={class:"range-text"},dt=a("div",null,null,-1),pt=a("div",null,null,-1),ut=a("div",null,null,-1),ht=[dt,pt,ut],_t=Z({__name:"App",props:{type:{type:String,default:"modal"},canvasWidth:{type:Number,default:310},canvasHeight:{type:Number,default:160},show:{type:Boolean,default:!1},puzzleScale:{type:Number,default:1},sliderSize:{type:Number,default:50},range:{type:Number,default:10},zIndex:{type:Number,default:999},imgs:{type:Array,default:null},successText:{type:String,default:"验证通过!"},failText:{type:String,default:"验证失败,请重试"},sliderText:{type:String,default:"拖动滑块完成拼图"},className:{type:String,default:""}},emits:["success","fail","close","reset"],setup(r,{expose:S,emit:E}){const s=r;fe(()=>{document.addEventListener("mousemove",O,!1),document.addEventListener("mouseup",T,!1),document.addEventListener("touchmove",O,{passive:!1}),document.addEventListener("touchend",T,!1),t.isInside=s.type==="inside",s.show&&(!t.isInside&&document.body.classList.add("vue-puzzle-overflow"),F())}),ge(()=>{t.timer1&&clearTimeout(t.timer1),document.removeEventListener("mousemove",O,!1),document.removeEventListener("mouseup",T,!1),document.removeEventListener("touchmove",O,!1),document.removeEventListener("touchend",T,!1)});const A=z(),c=z(),m=z(),b=z(),t=re({isInside:!1,mouseDown:!1,startWidth:50,startX:0,newX:0,pinX:0,pinY:0,loading:!1,isCanSlide:!1,error:!1,infoBoxShow:!1,infoText:"",infoBoxFail:!1,timer1:void 0,closeDown:!1,isSuccess:!1,imgIndex:-1,isSubmting:!1});le(()=>s.show,o=>{o?(!t.isInside&&document.body.classList.add("vue-puzzle-overflow"),F()):(t.isSubmting=!1,t.isSuccess=!1,t.infoBoxShow=!1,document.body.classList.remove("vue-puzzle-overflow"))}),le(()=>s.type,o=>{o==="inside"?(t.isInside=!0,document.body.classList.remove("vue-puzzle-overflow")):t.isInside=!1});const x=R(()=>{const o=t.startWidth+t.newX-t.startX;return o<u.value?u.value:o>s.canvasWidth?s.canvasWidth:o}),p=R(()=>Math.round(Math.max(Math.min(s.puzzleScale,2),.2)*52.5+6)),u=R(()=>Math.max(Math.min(Math.round(s.sliderSize),Math.round(s.canvasWidth*.5)),10)),f=R(()=>s.zIndex!==999?`z-index:${s.zIndex}`:""),h=()=>{!t.mouseDown&&!t.isSubmting&&(t.timer1&&clearTimeout(t.timer1),E("close"))},C=()=>{t.isInside||(t.closeDown=!0)},P=()=>{t.closeDown&&h(),t.closeDown=!1},Y=o=>{var n;t.isCanSlide&&(t.mouseDown=!0,t.startWidth=((n=A.value)==null?void 0:n.clientWidth)||0,t.newX=o.clientX!==void 0?o.clientX:o.changedTouches[0].clientX,t.startX=o.clientX!==void 0?o.clientX:o.changedTouches[0].clientX)},O=o=>{t.mouseDown&&(o.preventDefault(),t.newX=o.clientX!==void 0?o.clientX:o.changedTouches[0].clientX)},T=()=>{t.mouseDown&&(t.mouseDown=!1,ue())},L=(o=!1)=>{var n;if(t.loading&&!o)return;t.loading=!0,t.isCanSlide=!1;const _=c.value,v=m.value,w=b.value,e=_==null?void 0:_.getContext("2d",{willReadFrequently:!0}),y=v==null?void 0:v.getContext("2d"),j=w==null?void 0:w.getContext("2d");if(!e||!y||!j){console.error("not found ctx / ctx2 / ctx3");return}const _e=navigator.userAgent.indexOf("Firefox")>=0&&navigator.userAgent.indexOf("Windows")>=0,X=document.createElement("img");if(e.fillStyle="rgba(255,255,255,1)",j.fillStyle="rgba(255,255,255,1)",e.clearRect(0,0,s.canvasWidth,s.canvasHeight),y.clearRect(0,0,s.canvasWidth,s.canvasHeight),t.pinX=i(p.value+20,s.canvasWidth-p.value-10),t.pinY=i(20,s.canvasHeight-p.value-10),X.crossOrigin="anonymous",X.onload=()=>{const[I,q,K,ee]=J(X),ae=Math.random(),ne=Math.random(),ie=Math.random(),me=Math.random(),W=ae<.33?-1:ae<.66?0:1,N=ne<.33?-1:ne<.66?0:1,U=ie<.33?-1:ie<.66?0:1;let D=me<.6?1:0;W===N&&N===U&&U===D&&D===0&&(D=1),e.save(),B(e,W,N,U,D),e.closePath(),_e?(e.clip(),e.save(),e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowColor="#000",e.shadowBlur=3,e.fill(),e.restore()):(e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowColor="#000",e.shadowBlur=3,e.fill(),e.clip()),e.drawImage(X,I,q,K,ee),j.fillRect(0,0,s.canvasWidth,s.canvasHeight),j.drawImage(X,I,q,K,ee),e.globalCompositeOperation="source-atop",B(e,W,N,U,D),e.arc(t.pinX+Math.ceil(p.value/2),t.pinY+Math.ceil(p.value/2),p.value*1.2,0,Math.PI*2,!0),e.closePath(),e.shadowColor="rgba(255, 255, 255, .8)",e.shadowOffsetX=-1,e.shadowOffsetY=-1,e.shadowBlur=Math.min(Math.ceil(8*s.puzzleScale),12),e.fillStyle="#ffffaa",e.fill();const ve=e.getImageData(t.pinX-3,t.pinY-20,t.pinX+p.value+5,t.pinY+p.value+5);y.putImageData(ve,0,t.pinY-20),e.restore(),e.clearRect(0,0,s.canvasWidth,s.canvasHeight),e.save(),B(e,W,N,U,D),e.globalAlpha=.8,e.fillStyle="#ffffff",e.fill(),e.restore(),e.save(),e.globalCompositeOperation="source-atop",B(e,W,N,U,D),e.arc(t.pinX+Math.ceil(p.value/2),t.pinY+Math.ceil(p.value/2),p.value*1.2,0,Math.PI*2,!0),e.shadowColor="#000",e.shadowOffsetX=2,e.shadowOffsetY=2,e.shadowBlur=16,e.fill(),e.restore(),e.save(),e.globalCompositeOperation="destination-over",e.drawImage(X,I,q,K,ee),e.restore(),t.loading=!1,t.isCanSlide=!0},X.onerror=()=>{L(!0)},!o&&(n=s.imgs)!=null&&n.length){let I=i(0,s.imgs.length-1);I===t.imgIndex&&(I===s.imgs.length-1?I=0:I++),t.imgIndex=I,X.src=s.imgs[I]}else X.src=H()},i=(o,n)=>Math.ceil(Math.random()*(n-o)+o),J=o=>{const n=o.width/o.height,_=s.canvasWidth/s.canvasHeight;let v=0,w=0,e=0,y=0;return n>_?(y=s.canvasHeight,e=n*y,w=0,v=(s.canvasWidth-e)/2):(e=s.canvasWidth,y=e/n,v=0,w=(s.canvasHeight-y)/2),[v,w,e,y]},B=(o,n,_,v,w)=>{const e=Math.ceil(15*s.puzzleScale);o.beginPath(),o.moveTo(t.pinX,t.pinY),o.lineTo(t.pinX+e,t.pinY),o.arcTo(t.pinX+e,t.pinY+n*e/2,t.pinX+e+e/2,t.pinY+n*e/2,e/2),o.arcTo(t.pinX+e+e,t.pinY+n*e/2,t.pinX+e+e,t.pinY,e/2),o.lineTo(t.pinX+e+e+e,t.pinY),o.lineTo(t.pinX+e+e+e,t.pinY+e),o.arcTo(t.pinX+e+e+e+_*e/2,t.pinY+e,t.pinX+e+e+e+_*e/2,t.pinY+e+e/2,e/2),o.arcTo(t.pinX+e+e+e+_*e/2,t.pinY+e+e,t.pinX+e+e+e,t.pinY+e+e,e/2),o.lineTo(t.pinX+e+e+e,t.pinY+e+e+e),o.lineTo(t.pinX+e+e,t.pinY+e+e+e),o.arcTo(t.pinX+e+e,t.pinY+e+e+e+v*e/2,t.pinX+e+e/2,t.pinY+e+e+e+v*e/2,e/2),o.arcTo(t.pinX+e,t.pinY+e+e+e+v*e/2,t.pinX+e,t.pinY+e+e+e,e/2),o.lineTo(t.pinX,t.pinY+e+e+e),o.lineTo(t.pinX,t.pinY+e+e),o.arcTo(t.pinX+w*e/2,t.pinY+e+e,t.pinX+w*e/2,t.pinY+e+e/2,e/2),o.arcTo(t.pinX+w*e/2,t.pinY+e,t.pinX,t.pinY+e,e/2),o.lineTo(t.pinX,t.pinY)},H=()=>{const o=document.createElement("canvas"),n=o.getContext("2d");if(!n)return console.error("not found ctx"),"";o.width=s.canvasWidth,o.height=s.canvasHeight,n.fillStyle=`rgb(${i(100,255)},${i(100,255)},${i(100,255)})`,n.fillRect(0,0,s.canvasWidth,s.canvasHeight);for(let _=0;_<12;_++)if(n.fillStyle=`rgb(${i(100,255)},${i(100,255)},${i(100,255)})`,n.strokeStyle=`rgb(${i(100,255)},${i(100,255)},${i(100,255)})`,i(0,2)>1)n.save(),n.rotate(i(-90,90)*Math.PI/180),n.fillRect(i(-20,o.width-20),i(-20,o.height-20),i(10,o.width/2+10),i(10,o.height/2+10)),n.restore();else{n.beginPath();const v=i(-Math.PI,Math.PI);n.arc(i(0,o.width),i(0,o.height),i(10,o.height/2+10),v,v+Math.PI*1.5),n.closePath(),n.fill()}return o.toDataURL("image/png")},ue=()=>{t.isSubmting=!0;const o=x.value-u.value-(p.value-u.value)*((x.value-u.value)/(s.canvasWidth-u.value)),n=t.pinX-3-o;Math.abs(n)<s.range?(t.infoText=s.successText,t.infoBoxFail=!1,t.infoBoxShow=!0,t.isCanSlide=!1,t.isSuccess=!0,t.timer1&&clearTimeout(t.timer1),t.timer1=setTimeout(()=>{t.isSubmting=!1,E("success",n,{deviation:n,offsetX:o,pinX:t.pinX-3})},800)):(t.infoText=s.failText,t.infoBoxFail=!0,t.infoBoxShow=!0,t.isCanSlide=!1,E("fail",n,{deviation:n,offsetX:o,pinX:t.pinX-3}),t.timer1&&clearTimeout(t.timer1),t.timer1=setTimeout(()=>{t.isSubmting=!1,F()},800))},he=()=>{t.infoBoxFail=!1,t.infoBoxShow=!1,t.isCanSlide=!1,t.isSuccess=!1,t.startWidth=u.value,t.startX=0,t.newX=0},F=o=>{t.isSubmting||(he(),L(),o&&E("reset"))};return S({reset:F}),(o,n)=>(M(),se(Ee,{to:"body",disabled:t.isInside},[a("div",{class:k(["vue-puzzle-vcode",{inside_:t.isInside,show_:r.show},r.className]),style:V(l(f)),onMousedown:C,onMouseup:P,onTouchstartPassive:C,onTouchend:P},[a("div",{class:"vue-auth-box_",onMousedown:n[3]||(n[3]=ce(()=>{},["stop"])),onTouchstart:n[4]||(n[4]=ce(()=>{},["stop"]))},[a("div",{class:"auth-body_",style:V(`width:${r.canvasWidth}px;height: ${r.canvasHeight}px`)},[a("canvas",{ref_key:"canvas1",ref:c,class:"auth-canvas1_",width:r.canvasWidth,height:r.canvasHeight},null,8,st),a("canvas",{ref_key:"canvas3",ref:b,class:k(["auth-canvas3_",{show:t.isSuccess}]),width:r.canvasWidth,height:r.canvasHeight},null,10,at),a("canvas",{ref_key:"canvas2",ref:m,class:"auth-canvas2_",width:l(p),height:r.canvasHeight,style:V(`width:${l(p)}px;height:${r.canvasHeight}px;transform:translateX(${l(x)-l(u)-(l(p)-l(u))*((l(x)-l(u))/(r.canvasWidth-l(u)))}px)`)},null,12,nt),a("div",{class:k(["loading-box_",{hide_:!t.loading}])},lt,2),a("div",{class:k(["info-box_",{show:t.infoBoxShow},{fail:t.infoBoxFail}])},G(t.infoText),3),a("div",{class:k(["flash_",{show:t.isSuccess}]),style:V(`transform: translateX(${t.isSuccess?`${r.canvasWidth+r.canvasHeight*.578}px`:`-${r.canvasHeight*.578}px`}) skew(-30deg, 0);`)},null,6),a("img",{class:"reset_",onClick:n[0]||(n[0]=_=>F(!0)),src:ot})],4),a("div",ct,[a("div",{class:"range-box",style:V(`height:${l(u)}px;width:${r.canvasWidth}px`)},[a("div",rt,G(r.sliderText),1),a("div",{class:"range-slider",ref_key:"rangeSlider",ref:A,style:V(`width:${l(x)}px`)},[a("div",{class:k(["range-btn",{isDown:t.mouseDown}]),style:V(`width:${l(u)}px`),onMousedown:n[1]||(n[1]=_=>Y(_)),onTouchstart:n[2]||(n[2]=_=>Y(_))},ht,38)],4)],4)])],32)],38)],8,["disabled"]))}}),mt={BASE_URL:"/snail-job",DEV:!1,MODE:"prod",PROD:!0,SSR:!1,VITE_APP_DEFAULT_TOKEN:"SJ_Wyz3dmsdbDOkDujOTSSoBjGQP1BMsVnj",VITE_APP_DESC:"A flexible, reliable, and fast platform for distributed task retry and distributed task scheduling.",VITE_APP_TITLE:"Snail Job",VITE_APP_VERSION:"1.2.0-beta2",VITE_AUTH_ROUTE_MODE:"static",VITE_AUTOMATICALLY_DETECT_UPDATE:"Y",VITE_BASE_URL:"/snail-job",VITE_HTTP_PROXY:"Y",VITE_ICONIFY_URL:"/snail-job/iconify",VITE_ICON_LOCAL_PREFIX:"icon-local",VITE_ICON_PREFIX:"icon",VITE_LOGIN_CODE:"N",VITE_MENU_ICON:"mdi:menu",VITE_ROUTER_HISTORY_MODE:"hash",VITE_ROUTE_HOME:"home",VITE_SERVICE_BASE_URL:"/snail-job",VITE_SERVICE_EXPIRED_TOKEN_CODES:"9999,9998,3333",VITE_SERVICE_LOGOUT_CODES:"8888,8889",VITE_SERVICE_MODAL_LOGOUT_CODES:"5001",VITE_SERVICE_SUCCESS_CODE:"1",VITE_SOURCE_MAP:"N",VITE_STATIC_SUPER_ROLE:"R_SUPER",VITE_STORAGE_PREFIX:"",VITE_UPDATE_NOTIFY:"N"},vt=Z({name:"PwdLogin",__name:"pwd-login",setup(r){const S=Te(),{formRef:E,validate:s}=we(),{defaultRequiredRule:A}=Ie(),c=re({userName:"",password:""}),m={userName:A,password:A};async function b(){const h=Ve(c.password);await S.login(c.userName,h)}const t=z(!1),x=async()=>{const{VITE_LOGIN_CODE:h}=mt;if(await s(),h==="Y"){t.value=!0;return}b()},p=()=>{t.value=!1},u=()=>{b()},f={padding:0};return(h,C)=>{const P=xe,Y=Ce,O=Oe,T=ye,L=pe,i=Xe,J=Re,B=be;return M(),se(B,{ref_key:"formRef",ref:E,model:c,rules:m,size:"large","show-label":!1,onKeydown:Se(b,["enter"])},{default:g(()=>[d(Y,{path:"userName"},{default:g(()=>[d(P,{value:c.userName,"onUpdate:value":C[0]||(C[0]=H=>c.userName=H),placeholder:l($)("page.login.common.userNamePlaceholder")},null,8,["value","placeholder"])]),_:1}),d(Y,{path:"password"},{default:g(()=>[d(P,{value:c.password,"onUpdate:value":C[1]||(C[1]=H=>c.password=H),type:"password","show-password-on":"click",placeholder:l($)("page.login.common.passwordPlaceholder")},null,8,["value","placeholder"])]),_:1}),d(J,{vertical:"",size:24},{default:g(()=>[d(i,{show:t.value,row:"",style:f},{trigger:g(()=>[d(O,{type:"primary",size:"large",round:"",block:"",loading:l(S).loginLoading,onClick:x},{default:g(()=>[de(G(l($)("page.login.common.login")),1)]),_:1},8,["loading"])]),default:g(()=>[d(L,{title:l($)("page.login.common.codeTip"),"header-style":{padding:"10px 24px"}},{"header-extra":g(()=>[d(O,{text:"",onClick:p},{icon:g(()=>[d(T,{"local-icon":"close"})]),_:1})]),default:g(()=>[d(l(_t),{type:"inside",show:"",onSuccess:u,onClose:p})]),_:1},8,["title"])]),_:1},8,["show"])]),_:1})]),_:1},8,["model"])}}}),ft={BASE_URL:"/snail-job",DEV:!1,MODE:"prod",PROD:!0,SSR:!1,VITE_APP_DEFAULT_TOKEN:"SJ_Wyz3dmsdbDOkDujOTSSoBjGQP1BMsVnj",VITE_APP_DESC:"A flexible, reliable, and fast platform for distributed task retry and distributed task scheduling.",VITE_APP_TITLE:"Snail Job",VITE_APP_VERSION:"1.2.0-beta2",VITE_AUTH_ROUTE_MODE:"static",VITE_AUTOMATICALLY_DETECT_UPDATE:"Y",VITE_BASE_URL:"/snail-job",VITE_HTTP_PROXY:"Y",VITE_ICONIFY_URL:"/snail-job/iconify",VITE_ICON_LOCAL_PREFIX:"icon-local",VITE_ICON_PREFIX:"icon",VITE_LOGIN_CODE:"N",VITE_MENU_ICON:"mdi:menu",VITE_ROUTER_HISTORY_MODE:"hash",VITE_ROUTE_HOME:"home",VITE_SERVICE_BASE_URL:"/snail-job",VITE_SERVICE_EXPIRED_TOKEN_CODES:"9999,9998,3333",VITE_SERVICE_LOGOUT_CODES:"8888,8889",VITE_SERVICE_MODAL_LOGOUT_CODES:"5001",VITE_SERVICE_SUCCESS_CODE:"1",VITE_SOURCE_MAP:"N",VITE_STATIC_SUPER_ROLE:"R_SUPER",VITE_STORAGE_PREFIX:"",VITE_UPDATE_NOTIFY:"N"},gt={class:"w-400px lt-sm:w-300px"},Et={class:"flex-y-center justify-between"},Tt={class:"flex text-28px text-primary font-500 lt-sm:text-22px"},wt={class:"mt-3px pl-12px text-16px color-#00000072 font-600"},It={class:"i-flex-col"},St={class:"pt-24px"},xt={class:"pt-0px"},Ct={class:"pt-12px text-center"},yt=Z({name:"login",__name:"index",props:{module:{}},setup(r){const S=r,{VITE_APP_VERSION:E}=ft,s=z(`${te.get("version")||E}`);(async()=>{const{data:f,error:h}=await Be();if(!h&&f){s.value=f,te.set("version",f);return}te.remove("version")})();const c=Ae(),m=Pe(),b={"pwd-login":{label:Ne["pwd-login"],component:vt}},t=R(()=>b[S.module||"pwd-login"]),x=R(()=>m.darkMode?oe(m.themeColor,600):m.themeColor),p=R(()=>{const f="#ffffff",h=m.darkMode?.5:.2;return Ye(f,m.themeColor,h)}),u=f=>{window.open(f,"_blank")};return(f,h)=>{const C=tt,P=Ue,Y=ke,O=ze,T=He,L=pe;return M(),Q("div",{class:"relative size-full flex-center overflow-hidden",style:V({backgroundColor:p.value})},[d(C,{"theme-color":x.value},null,8,["theme-color"]),d(L,{bordered:!1,class:"relative z-4 w-auto rd-12px"},{default:g(()=>[a("div",gt,[a("header",Et,[d(P,{class:"fill-primary text-64px lt-sm:text-48px"}),a("h3",Tt,[de(G(l($)("system.title"))+" ",1),a("span",wt,"v"+G(s.value),1)]),a("div",It,[d(Y,{"theme-schema":l(m).themeScheme,"show-tooltip":!1,class:"text-20px lt-sm:text-18px",onSwitch:l(m).toggleThemeScheme},null,8,["theme-schema","onSwitch"]),d(O,{lang:l(c).locale,"lang-options":l(c).localeOptions,"show-tooltip":!1,onChangeLang:l(c).changeLocale},null,8,["lang","lang-options","onChangeLang"])])]),a("main",St,[a("div",xt,[d(De,{name:l(m).page.animateMode,mode:"out-in",appear:""},{default:g(()=>[(M(),se(Me(t.value.component)))]),_:1},8,["name"])]),a("div",Ct,[d(T,{"tooltip-content":"Mail",class:"color-#272636 dark:color-#f0f2f5",icon:"simple-icons:maildotru",onClick:h[0]||(h[0]=i=>u("mailto:598092184@qq.com"))}),d(T,{class:"color-#c71d23","tooltip-content":"Gitee",icon:"simple-icons:gitee",onClick:h[1]||(h[1]=i=>u("https://gitee.com/aizuda/snail-job"))}),d(T,{"tooltip-content":"Github",class:"color-#010409 dark:color-#e6edf3",icon:"simple-icons:github",onClick:h[2]||(h[2]=i=>u("https://github.com/aizuda/snail-job"))})]),d(Le)])])]),_:1})],4)}}});export{yt as default};
|