import{d as L,a as y,N as R,r as z,o as V,P as F,b as l,z as h,E as g,e as H,f as N,s as t,t as B,g as s,Z as a,l as $,A as m,w as r,_ as W,S as G,J}from"./vue.BxlDVA1H.js";import{u as K,L as U}from"./index.lP_uh0LI.js";import{f as u}from"./formatTime.in1fXasu.js";import{_ as Z}from"./_plugin-vue_export-helper.DlAUqK2U.js";const j={class:"layout-lock-screen"},O={class:"layout-lock-screen-date-box"},Q={class:"layout-lock-screen-date-box-time"},X={class:"layout-lock-screen-date-box-minutes"},ee={class:"layout-lock-screen-date-box-info"},oe={class:"layout-lock-screen-date-top"},te={class:"layout-lock-screen-login"},ne={class:"layout-lock-screen-login-box"},se={class:"layout-lock-screen-login-box-value"},ie={class:"layout-lock-screen-login-icon"},ce=L({name:"layoutLockScreen"}),le=L({...ce,setup(ae){const d=y(),f=y(),T=K(),{themeConfig:i}=R(T),e=z({transparency:1,downClientY:0,moveDifference:0,isShowLoockLogin:!1,isFlags:!1,querySelectorEl:"",time:{hm:"",s:"",mdq:""},setIntervalTime:0,isShowLockScreen:!1,isShowLockScreenIntervalTime:0,lockScreenPassword:""}),D=o=>{e.isFlags=!0,e.downClientY=o.clientY},x=o=>{e.isFlags=!0,e.downClientY=o.touches[0].clientY},b=o=>{e.moveDifference=o.clientY-e.downClientY,v()},C=o=>{e.moveDifference=o.touches[0].clientY-e.downClientY,v()},v=()=>{if(e.isFlags){const o=e.querySelectorEl,n=e.transparency-=1/200;if(e.moveDifference>=0)return!1;o.setAttribute("style",`top:${e.moveDifference}px;cursor:pointer;opacity:${n};`),e.moveDifference<-400&&(o.setAttribute("style",`top:${-o.clientHeight}px;cursor:pointer;transition:all 0.3s ease;`),e.moveDifference=-o.clientHeight,setTimeout(()=>{var c;o&&((c=o.parentNode)==null||c.removeChild(o))},300)),e.moveDifference===-o.clientHeight&&(e.isShowLoockLogin=!0,f.value.focus())}},p=()=>{e.isFlags=!1,e.transparency=1,e.moveDifference>=-400&&e.querySelectorEl.setAttribute("style","top:0px;opacity:1;transition:all 0.3s ease;")},I=()=>{J(()=>{e.querySelectorEl=d.value})},k=()=>{e.time.hm=u(new Date,"HH:MM"),e.time.s=u(new Date,"SS"),e.time.mdq=u(new Date,"mm月dd日，WWW")},M=()=>{k(),e.setIntervalTime=window.setInterval(()=>{k()},1e3)},E=()=>{i.value.isLockScreen?e.isShowLockScreenIntervalTime=window.setInterval(()=>{if(i.value.lockScreenTime<=1)return e.isShowLockScreen=!0,S(),!1;i.value.lockScreenTime--},1e3):clearInterval(e.isShowLockScreenIntervalTime)},S=()=>{i.value.isDrawer=!1,U.set("themeConfig",i.value)},_=()=>{i.value.isLockScreen=!1,i.value.lockScreenTime=30,S()};return V(()=>{I(),M(),E()}),F(()=>{window.clearInterval(e.setIntervalTime),window.clearInterval(e.isShowLockScreenIntervalTime)}),(o,n)=>{const c=l("SvgIcon"),Y=l("ele-Right"),A=l("el-icon"),q=l("el-button"),P=l("el-input");return h((N(),H("div",null,[n[5]||(n[5]=t("div",{class:"layout-lock-screen-mask"},null,-1)),t("div",{class:B(["layout-lock-screen-img",{"layout-lock-screen-filter":e.isShowLoockLogin}])},null,2),t("div",j,[t("div",{class:"layout-lock-screen-date",ref_key:"layoutLockScreenDateRef",ref:d,onMousedown:D,onMousemove:b,onMouseup:p,onTouchstart:a(x,["stop"]),onTouchmove:a(C,["stop"]),onTouchend:a(p,["stop"])},[t("div",O,[t("div",Q,[$(m(e.time.hm),1),t("span",X,m(e.time.s),1)]),t("div",ee,m(e.time.mdq),1)]),t("div",oe,[s(c,{name:"ele-Top"}),n[2]||(n[2]=t("div",{class:"layout-lock-screen-date-top-text"},"上滑解锁",-1))])],544),s(G,{name:"el-zoom-in-center"},{default:r(()=>[h(t("div",te,[t("div",ne,[n[3]||(n[3]=t("div",{class:"layout-lock-screen-login-box-img"},[t("img",{src:"https://img2.baidu.com/it/u=1978192862,2048448374&fm=253&fmt=auto&app=138&f=JPEG?w=504&h=500"})],-1)),n[4]||(n[4]=t("div",{class:"layout-lock-screen-login-box-name"},"Administrator",-1)),t("div",se,[s(P,{placeholder:"请输入密码",ref_key:"layoutLockScreenInputRef",ref:f,modelValue:e.lockScreenPassword,"onUpdate:modelValue":n[0]||(n[0]=w=>e.lockScreenPassword=w),onKeyup:n[1]||(n[1]=W(a(w=>_(),["stop"]),["enter","native"]))},{append:r(()=>[s(q,{onClick:_},{default:r(()=>[s(A,{class:"el-input__icon"},{default:r(()=>[s(Y)]),_:1})]),_:1})]),_:1},8,["modelValue"])])]),t("div",ie,[s(c,{name:"ele-Microphone",size:20}),s(c,{name:"ele-AlarmClock",size:20}),s(c,{name:"ele-SwitchButton",size:20})])],512),[[g,e.isShowLoockLogin]])]),_:1})])],512)),[[g,e.isShowLockScreen]])}}}),fe=Z(le,[["__scopeId","data-v-b03db225"]]);export{fe as default};
