ray-template/assets/index-5901f1fc.js
2023-07-05 16:46:26 +08:00

7 lines
24 KiB
JavaScript

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<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},I.apply(this,arguments)},te={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},ke=te;function ne(e){this.mode=ke.MODE_8BIT_BYTE,this.data=e}ne.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}};var Me=ne,F={L:1,M:0,Q:3,H:2},k=F;function E(e,t){this.totalCount=e,this.dataCount=t}E.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];E.getRSBlocks=function(e,t){var r=E.getRsBlockTable(e,t);if(r==null)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var n=r.length/3,i=new Array,a=0;a<n;a++)for(var s=r[a*3+0],o=r[a*3+1],g=r[a*3+2],f=0;f<s;f++)i.push(new E(o,g));return i};E.getRsBlockTable=function(e,t){switch(t){case k.L:return E.RS_BLOCK_TABLE[(e-1)*4+0];case k.M:return E.RS_BLOCK_TABLE[(e-1)*4+1];case k.Q:return E.RS_BLOCK_TABLE[(e-1)*4+2];case k.H:return E.RS_BLOCK_TABLE[(e-1)*4+3];default:return}};var Oe=E;function re(){this.buffer=new Array,this.length=0}re.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(var r=0;r<t;r++)this.putBit((e>>>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<<v;for(var v=8;v<256;v++)w.EXP_TABLE[v]=w.EXP_TABLE[v-4]^w.EXP_TABLE[v-5]^w.EXP_TABLE[v-6]^w.EXP_TABLE[v-8];for(var v=0;v<255;v++)w.LOG_TABLE[w.EXP_TABLE[v]]=v;var ie=w,B=ie;function O(e,t){if(e.length==null)throw new Error(e.length+"/"+t);for(var r=0;r<e.length&&e[r]==0;)r++;this.num=new Array(e.length-r+t);for(var n=0;n<e.length-r;n++)this.num[n]=e[n+r]}O.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),r=0;r<this.getLength();r++)for(var n=0;n<e.getLength();n++)t[r+n]^=B.gexp(B.glog(this.get(r))+B.glog(e.get(n)));return new O(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=B.glog(this.get(0))-B.glog(e.get(0)),r=new Array(this.getLength()),n=0;n<this.getLength();n++)r[n]=this.get(n);for(var n=0;n<e.getLength();n++)r[n]^=B.gexp(B.glog(e.get(n))+t);return new O(r,0).mod(e)}};var ae=O,m=te,Y=ae,He=ie,y={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},h={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;h.getBCHDigit(t)-h.getBCHDigit(h.G15)>=0;)t^=h.G15<<h.getBCHDigit(t)-h.getBCHDigit(h.G15);return(e<<10|t)^h.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;h.getBCHDigit(t)-h.getBCHDigit(h.G18)>=0;)t^=h.G18<<h.getBCHDigit(t)-h.getBCHDigit(h.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;e!=0;)t++,e>>>=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;r<e;r++)t=t.multiply(new Y([1,He.gexp(r)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case m.MODE_NUMBER:return 10;case m.MODE_ALPHA_NUM:return 9;case m.MODE_8BIT_BYTE:return 8;case m.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case m.MODE_NUMBER:return 12;case m.MODE_ALPHA_NUM:return 11;case m.MODE_8BIT_BYTE:return 16;case m.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else if(t<41)switch(e){case m.MODE_NUMBER:return 14;case m.MODE_ALPHA_NUM:return 13;case m.MODE_8BIT_BYTE:return 16;case m.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}else throw new Error("type:"+t)},getLostPoint:function(e){for(var t=e.getModuleCount(),r=0,n=0;n<t;n++)for(var i=0;i<t;i++){for(var a=0,s=e.isDark(n,i),o=-1;o<=1;o++)if(!(n+o<0||t<=n+o))for(var g=-1;g<=1;g++)i+g<0||t<=i+g||o==0&&g==0||s==e.isDark(n+o,i+g)&&a++;a>5&&(r+=3+a-5)}for(var n=0;n<t-1;n++)for(var i=0;i<t-1;i++){var f=0;e.isDark(n,i)&&f++,e.isDark(n+1,i)&&f++,e.isDark(n,i+1)&&f++,e.isDark(n+1,i+1)&&f++,(f==0||f==4)&&(r+=3)}for(var n=0;n<t;n++)for(var i=0;i<t-6;i++)e.isDark(n,i)&&!e.isDark(n,i+1)&&e.isDark(n,i+2)&&e.isDark(n,i+3)&&e.isDark(n,i+4)&&!e.isDark(n,i+5)&&e.isDark(n,i+6)&&(r+=40);for(var i=0;i<t;i++)for(var n=0;n<t-6;n++)e.isDark(n,i)&&!e.isDark(n+1,i)&&e.isDark(n+2,i)&&e.isDark(n+3,i)&&e.isDark(n+4,i)&&!e.isDark(n+5,i)&&e.isDark(n+6,i)&&(r+=40);for(var u=0,i=0;i<t;i++)for(var n=0;n<t;n++)e.isDark(n,i)&&u++;var c=Math.abs(100*u/t/t-50)/5;return r+=c*10,r}},Fe=h,ze=Me,oe=Oe,se=Ie,L=Fe,Qe=ae;function T(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var d=T.prototype;d.addData=function(e){var t=new ze(e);this.dataList.push(t),this.dataCache=null};d.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]};d.getModuleCount=function(){return this.moduleCount};d.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=oe.getRSBlocks(e,this.errorCorrectLevel),r=new se,n=0,i=0;i<t.length;i++)n+=t[i].dataCount;for(var i=0;i<this.dataList.length;i++){var a=this.dataList[i];r.put(a.mode,4),r.put(a.getLength(),L.getLengthInBits(a.mode,e)),a.write(r)}if(r.getLengthInBits()<=n*8)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())};d.makeImpl=function(e,t){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[r][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=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<this.modules.length;a++)for(var s=a*i,o=0;o<this.modules[a].length;o++){var g=o*i,f=this.modules[a][o];f&&(n.beginFill(0,100),n.moveTo(g,s),n.lineTo(g+i,s),n.lineTo(g+i,s+i),n.lineTo(g,s+i),n.endFill())}return n};d.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)this.modules[e][6]==null&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)};d.setupPositionAdjustPattern=function(){for(var e=L.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var r=0;r<e.length;r++){var n=e[t],i=e[r];if(this.modules[n][i]==null)for(var a=-2;a<=2;a++)for(var s=-2;s<=2;s++)a==-2||a==2||s==-2||s==2||a==0&&s==0?this.modules[n+a][i+s]=!0:this.modules[n+a][i+s]=!1}};d.setupTypeNumber=function(e){for(var t=L.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!e&&(t>>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<e.length&&(g=(e[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;a<r.length;a++){var s=r[a];i.put(s.mode,4),i.put(s.getLength(),L.getLengthInBits(s.mode,e)),s.write(i)}for(var o=0,a=0;a<n.length;a++)o+=n[a].dataCount;if(i.getLengthInBits()>o*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<t.length;o++){var g=t[o].dataCount,f=t[o].totalCount-g;n=Math.max(n,g),i=Math.max(i,f),a[o]=new Array(g);for(var u=0;u<a[o].length;u++)a[o][u]=255&e.buffer[u+r];r+=g;var c=L.getErrorCorrectPolynomial(f),p=new Qe(a[o],c.getLength()-1),C=p.mod(c);s[o]=new Array(c.getLength()-1);for(var u=0;u<s[o].length;u++){var _=u+C.getLength()-s[o].length;s[o][u]=_>=0?C.get(_):0}}for(var D=0,u=0;u<t.length;u++)D+=t[u].totalCount;for(var b=new Array(D),x=0,u=0;u<n;u++)for(var o=0;o<t.length;o++)u<a[o].length&&(b[x++]=a[o][u]);for(var u=0;u<i;u++)for(var o=0;o<t.length;o++)u<s[o].length&&(b[x++]=s[o][u]);return b};var $e=T,le="H",Ge=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}();function ue(e,t){var r=F[t],n=new $e(-1,r);return n.addData(Ue(e)),n.make(),n}function ge(e){return e in F}function Ue(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t+=String.fromCharCode(n):n<2048?(t+=String.fromCharCode(192|n>>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};