import{aY as Q,ax as $,aZ as ve,aX as de,az as ce,a$ as pe,an as A,aK as me,b0 as G,av as we,b1 as Ee,b2 as U,b3 as Te,b4 as ye,b5 as H,ap as K}from"./vendor-6dafcdec.js";import{ag as V}from"./utils-vendor-6e02b5fb.js";import{u as Pe,a as Le,s as X,R as M,b as Be,T as Ce}from"./index-c7c88076.js";import{u as J,A as j,R as _e,L as be}from"./locales-vendor-d4120c33.js";import{d as P,r as S,K as l,b as W,a2 as Z,h as R,f as Ae,k as q,P as ee,a as N,F as Re}from"./vue-vendor-0e3aae74.js";import{R as Se}from"./index-9afada78.js";import"./css-vendor-7a3fe519.js";import"./__commonjsHelpers__-042e6b4d.js";function De(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!W(e)}const xe=P({name:"RSignin",setup(){const e=S(),{t}=J(),r=Pe(),{signin:n}=r,{path:i}=_e,a=()=>({name:"Ray Admin",pwd:"123456"}),{router:s}=Le(),o=S(a()),g={name:{required:!0,message:t("views.login.index.NamePlaceholder"),trigger:["blur","input"]},pwd:{required:!0,message:t("views.login.index.PasswordPlaceholder"),trigger:["blur","input"]}};return{signinForm:o,loginFormRef:e,handleLogin:()=>{var u;(u=e.value)==null||u.validate(c=>{c||(X(!0),n(o.value).then(p=>{p.code===0&&setTimeout(()=>{X(!1),window.$message.success(`欢迎${o.value.name}登陆~`),V(j.token,"tokenValue"),V(j.signin,p.data),s.push(i)},2*1e3)}).catch(()=>{window.$message.error("不可以这样哟, 不可以哟")}))})},rules:g,t}},render(){let e;const{t}=this;return l(de,{model:this.signinForm,ref:"loginFormRef",rules:this.rules},{default:()=>[l(Q,{label:t("views.login.index.Name"),path:"name"},{default:()=>[l($,{value:this.signinForm.name,"onUpdate:value":r=>this.signinForm.name=r,placeholder:t("views.login.index.NamePlaceholder")},null)]}),l(Q,{label:t("views.login.index.Password"),path:"pwd"},{default:()=>[l($,{value:this.signinForm.pwd,"onUpdate:value":r=>this.signinForm.pwd=r,type:"password",placeholder:t("views.login.index.PasswordPlaceholder")},null)]}),l(ve,{style:["width: 100%","margin-to: 18px"],type:"primary",onClick:this.handleLogin.bind(this)},De(e=t("views.login.index.Login"))?e:{default:()=>[e]})]})}}),Ne=P({name:"RRegister",render(){return l(ce,{status:"info",title:"提示",description:"我实在是不想写了..."},null)}});/*! * qrcode.vue v3.3.4 * A Vue.js component to generate QRCode. * © 2017-2023 @scopewu(https://github.com/scopewu) * MIT License. */var I=function(){return I=Object.assign||function(t){for(var r,n=1,i=arguments.length;n>>7-e%8&1)==1},put:function(e,t){for(var r=0;r>>t-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Ie=re,w={glog:function(e){if(e<1)throw new Error("glog("+e+")");return w.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return w.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var v=0;v<8;v++)w.EXP_TABLE[v]=1<=0;)t^=h.G15<=0;)t^=h.G18<>>=1;return t},getPatternPosition:function(e){return h.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,r){switch(e){case y.PATTERN000:return(t+r)%2==0;case y.PATTERN001:return t%2==0;case y.PATTERN010:return r%3==0;case y.PATTERN011:return(t+r)%3==0;case y.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case y.PATTERN101:return t*r%2+t*r%3==0;case y.PATTERN110:return(t*r%2+t*r%3)%2==0;case y.PATTERN111:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new Y([1],0),r=0;r5&&(r+=3+a-5)}for(var n=0;n=7&&this.setupTypeNumber(e),this.dataCache==null&&(this.dataCache=T.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)};d.setupPositionProbePattern=function(e,t){for(var r=-1;r<=7;r++)if(!(e+r<=-1||this.moduleCount<=e+r))for(var n=-1;n<=7;n++)t+n<=-1||this.moduleCount<=t+n||(0<=r&&r<=6&&(n==0||n==6)||0<=n&&n<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=n&&n<=4?this.modules[e+r][t+n]=!0:this.modules[e+r][t+n]=!1)};d.getBestMaskPattern=function(){for(var e=0,t=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=L.getLostPoint(this);(r==0||e>n)&&(e=n,t=r)}return t};d.createMovieClip=function(e,t,r){var n=e.createEmptyMovieClip(t,r),i=1;this.make();for(var a=0;a>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(var r=0;r<18;r++){var n=!e&&(t>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}};d.setupTypeInfo=function(e,t){for(var r=this.errorCorrectLevel<<3|t,n=L.getBCHTypeInfo(r),i=0;i<15;i++){var a=!e&&(n>>i&1)==1;i<6?this.modules[i][8]=a:i<8?this.modules[i+1][8]=a:this.modules[this.moduleCount-15+i][8]=a}for(var i=0;i<15;i++){var a=!e&&(n>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=a:i<9?this.modules[8][15-i-1+1]=a:this.modules[8][15-i-1]=a}this.modules[this.moduleCount-8][8]=!e};d.mapData=function(e,t){for(var r=-1,n=this.moduleCount-1,i=7,a=0,s=this.moduleCount-1;s>0;s-=2)for(s==6&&s--;;){for(var o=0;o<2;o++)if(this.modules[n][s-o]==null){var g=!1;a>>i&1)==1);var f=L.getMask(t,n,s-o);f&&(g=!g),this.modules[n][s-o]=g,i--,i==-1&&(a++,i=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}};T.PAD0=236;T.PAD1=17;T.createData=function(e,t,r){for(var n=oe.getRSBlocks(e,t),i=new se,a=0;ao*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+o*8+")");for(i.getLengthInBits()+4<=o*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=o*8||(i.put(T.PAD0,8),i.getLengthInBits()>=o*8));)i.put(T.PAD1,8);return T.createBytes(i,n)};T.createBytes=function(e,t){for(var r=0,n=0,i=0,a=new Array(t.length),s=new Array(t.length),o=0;o=0?C.get(_):0}}for(var D=0,u=0;u>6),t+=String.fromCharCode(128|n&63)):n<55296||n>=57344?(t+=String.fromCharCode(224|n>>12),t+=String.fromCharCode(128|n>>6&63),t+=String.fromCharCode(128|n&63)):(r++,n=65536+((n&1023)<<10|e.charCodeAt(r)&1023),t+=String.fromCharCode(240|n>>18),t+=String.fromCharCode(128|n>>12&63),t+=String.fromCharCode(128|n>>6&63),t+=String.fromCharCode(128|n&63))}return t}function fe(e,t){t===void 0&&(t=0);var r=[];return e.forEach(function(n,i){var a=null;n.forEach(function(s,o){if(!s&&a!==null){r.push("M".concat(a+t," ").concat(i+t,"h").concat(o-a,"v1H").concat(a+t,"z")),a=null;return}if(o===n.length-1){if(!s)return;a===null?r.push("M".concat(o+t,",").concat(i+t," h1v1H").concat(o+t,"z")):r.push("M".concat(a+t,",").concat(i+t," h").concat(o+1-a,"v1H").concat(a+t,"z"));return}s&&a===null&&(a=o)})}),r.join("")}var z={value:{type:String,required:!0,default:""},size:{type:Number,default:100},level:{type:String,default:le,validator:function(e){return ge(e)}},background:{type:String,default:"#fff"},foreground:{type:String,default:"#000"},margin:{type:Number,required:!1,default:0}},Ke=I(I({},z),{renderAs:{type:String,required:!1,default:"canvas",validator:function(e){return["canvas","svg"].indexOf(e)>-1}}}),Ve=P({name:"QRCodeSvg",props:z,setup:function(e){var t=S(0),r=S(""),n=function(){var i=e.value,a=e.level,s=e.margin,o=ue(i,a).modules;t.value=o.length+s*2,r.value=fe(o,s)};return n(),Z(n),function(){return R("svg",{width:e.size,height:e.size,"shape-rendering":"crispEdges",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(t.value," ").concat(t.value)},[R("path",{fill:e.background,d:"M0,0 h".concat(t.value,"v").concat(t.value,"H0z")}),R("path",{fill:e.foreground,d:r.value})])}}}),Xe=P({name:"QRCodeCanvas",props:z,setup:function(e){var t=S(null),r=function(){var n=e.value,i=e.level,a=e.size,s=e.margin,o=e.background,g=e.foreground,f=ue(n,i).modules,u=f.length+s*2,c=t.value;if(c){var p=c.getContext("2d");if(p){var C=window.devicePixelRatio||1,_=a/u*C;c.height=c.width=a*C,p.scale(_,_),p.fillStyle=o,p.fillRect(0,0,u,u),p.fillStyle=g,Ge?p.fill(new Path2D(fe(f,s))):f.forEach(function(D,b){D.forEach(function(x,he){x&&p.fillRect(he+s,b+s,1,1)})})}}};return Ae(r),Z(r),function(){return R("canvas",{ref:t,style:{width:"".concat(e.size,"px"),height:"".concat(e.size,"px")}})}}}),je=P({name:"Qrcode",render:function(){var e=this.$props,t=e.renderAs,r=e.value,n=e.size,i=e.margin,a=e.level,s=e.background,o=e.foreground,g=n>>>0,f=i>>>0,u=ge(a)?a:le;return R(t==="svg"?Ve:Xe,{value:r,size:g,margin:f,level:u,background:s,foreground:o})},props:Ke});const Ye=P({name:"QRCodeSignin",setup(){const e=q({qrcodeValue:"https://github.com/XiaoDaiGua-Ray/xiaodaigua-ray.github.io"});return{...ee(e)}},render(){return l("div",{class:"qrcode-signin"},[l(je,{value:this.qrcodeValue,size:200},null)])}});function Je(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!W(e)}const We=P({name:"SSOSignin",setup(){return{ssoSigninOptions:[{icon:"github",key:"github",tooltipLabel:"Github登陆"},{icon:"google",key:"google",tooltipLabel:"Google登陆"},{icon:"twitter",key:"twitter",tooltipLabel:"Twitter登陆"}],handleSSOSigninClick:r=>{window.$message.info(`调用${r.tooltipLabel}`)}}},render(){let e;return l(A,{class:"sso-signin",align:"center",itemStyle:{display:"flex"}},Je(e=this.ssoSigninOptions.map(t=>l(pe,null,{trigger:()=>l(M,{name:t.icon,size:"24",cursor:"pointer",onClick:this.handleSSOSigninClick.bind(this,t)},null),default:()=>t.tooltipLabel})))?e:{default:()=>[e]})}}),ot=P({name:"RLogin",setup(){const{t:e}=J(),{layout:{copyright:t}}={pkg:{dependencies:{"@vueuse/core":"^9.1.0",axios:"^1.2.0",clipboard:"^2.0.11","crypto-js":"^4.1.1","currency.js":"^2.0.4",dayjs:"^1.11.7",echarts:"^5.4.0","lodash-es":"^4.17.21","naive-ui":"^2.34.4",pinia:"^2.0.17","pinia-plugin-persistedstate":"^2.4.0","print-js":"^1.6.0","qrcode.vue":"^3.3.4",sass:"^1.54.3",screenfull:"^6.0.2",vue:"^3.2.47","vue-i18n":"^9.2.2","vue-router":"^4.1.3",vuedraggable:"^4.1.0",xlsx:"^0.18.5"},devDependencies:{"@babel/core":"^7.20.2","@babel/eslint-parser":"^7.19.1","@commitlint/cli":"^17.4.2","@commitlint/config-conventional":"^17.4.2","@intlify/unplugin-vue-i18n":"^0.5.0","@types/crypto-js":"^4.1.1","@types/lodash-es":"^4.17.7","@types/scrollreveal":"^0.0.8","@typescript-eslint/eslint-plugin":"^5.61.0","@typescript-eslint/parser":"^5.61.0","@vitejs/plugin-vue":"^4.1.0","@vitejs/plugin-vue-jsx":"^3.0.1","@vue/eslint-config-prettier":"^7.1.0","@vue/eslint-config-typescript":"^11.0.3",autoprefixer:"^10.4.8",depcheck:"^1.4.3",eslint:"^8.44.0","eslint-config-prettier":"^8.8.0","eslint-config-standard-with-typescript":"^23.0.0","eslint-plugin-import":"^2.25.2","eslint-plugin-n":"^15.0.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-promise":"^6.0.0","eslint-plugin-react":"^7.31.10","eslint-plugin-vue":"^9.15.1",husky:"^8.0.3","lint-staged":"^13.1.0",postcss:"^8.1.0","postcss-px-to-viewport":"^1.1.1",prettier:"^2.7.1","rollup-plugin-visualizer":"^5.8.3","svg-sprite-loader":"^6.0.11",typescript:"^5.0.2","unplugin-auto-import":"^0.11.0","unplugin-vue-components":"^0.22.0",vite:"^4.3.9","vite-plugin-chunk-split":"^0.4.7","vite-plugin-compression":"^0.5.1","vite-plugin-ejs":"^1.6.4","vite-plugin-eslint":"^1.8.1","vite-plugin-imp":"^2.3.1","vite-plugin-inspect":"^0.7.26","vite-plugin-svg-icons":"^2.0.1","vite-svg-loader":"^3.4.0","vue-tsc":"^1.4.2"},name:"ray-template",version:"4.0.4"},layout:{copyright:"Copyright © 2022-present Ray",sideBarLogo:{icon:"ray",title:"Ray Template",url:"/dashboard",jumpType:"station"}},appPrimaryColor:{primaryColor:"#2d8cf0",primaryFadeColor:"rgba(45, 140, 240, 0.3)"}},r=q({tabsValue:"signin"}),{height:n,width:i}=me(),a=Be(),{updateLocale:s}=a;return{...ee(r),windowHeight:n,updateLocale:s,t:e,copyright:t,windowWidth:i}},render(){const{t:e}=this;return l("div",{class:["login"],style:[`height: ${this.windowHeight}px`,`--login-height: ${this.windowHeight}px`]},[l("div",{class:["login-wrapper",this.windowWidth>=1440?"login-wrapper--divider":""]},[l("div",{class:["login-wrapper__content"]},[l(A,{align:"center",class:"login-title__wrapper"},{default:()=>[l(M,{name:"ray",size:"48"},null),l(G,{class:"login-title",type:"info",size:28},{default:()=>[N("Ray Template")]})]}),l(A,{align:"center",class:"login-action__wrapper",itemStyle:{display:"flex"}},{default:()=>[l(Ce,null,null),l(we,{options:be,onSelect:t=>this.updateLocale(t)},{default:()=>[l(M,{customClassName:"login-icon",name:"language",size:"18"},null)]})]}),l(Ee,{cols:"s:1 m:1 l:2 xl:2 2xl:2",itemResponsive:!1,responsive:"screen"},{default:()=>[l(U,{span:"s:0 m:0 l:1 xl:1 2xl:1",class:"login__left-wrapper"},{default:()=>[l(A,{align:"center",vertical:!0},{default:()=>[l(M,{name:"login_bg",width:"368",height:"368"},null),l(G,{class:"login-title",type:"info",size:36},{default:()=>[N("开箱即用的中后台管理系统")]})]})]}),l(U,{span:1,class:"login__right-wrapper"},{default:()=>[l(Te,{class:"login__right-wrapper__content",embedded:!0,bordered:!1},{default:()=>[l(ye,{value:this.tabsValue,"onUpdate:value":t=>this.tabsValue=t,type:"line",animated:!0,size:"large"},{default:()=>l(Re,null,[l(H,{tab:e("views.login.index.Signin"),name:"signin"},{default:()=>[l(xe,null,null)]}),l(H,{tab:e("views.login.index.Register"),name:"register"},{default:()=>[l(Ne,null,null)]}),l(H,{tab:e("views.login.index.QRCodeSignin"),name:"qrcodeSignin"},{default:()=>[l(Ye,null,null)]})])}),l(K,null,{default:()=>[N("其他登陆方式")]}),l(We,null,null),l(K,null,{default:()=>[N("友情链接")]}),l(Se,null,null)]})]})]}),l(A,{align:"center",justify:"center",class:"login-copyright__wrapper",wrapItem:!1},{default:()=>[this.copyright]})])])])}});export{ot as default};