System.register(["./index-legacy-b5b2d9a0.js","./vnode-legacy-e7b1a051.js","./index-legacy-8e2f9955.js","./scroll-legacy-52796f86.js"],(function(e,n){"use strict";var t,o,u,i,a,c,s,r,l,d,f,v,m,y,p,g,h,b,x,E,M,w,k,L;return{setters:[function(e){t=e.ao,o=e.a0,u=e.a1,i=e.a2,a=e.a4,c=e.h,s=e.ab,r=e.bK,l=e.e,d=e.bL,f=e.a6,v=e.m,m=e.G,y=e.aO,p=e.y,g=e.aV},function(e){h=e.P},function(e){b=e.I,x=e.t,E=e.W,M=e.Z,w=e.Q,k=e.$},function(e){L=e.a}],execute:function(){var n=e("a",(function(e){if(!e)return{onClick:t,onMousedown:t,onMouseup:t};var n=!1,o=!1;return{onClick:function(t){n&&o&&e(t),n=o=!1},onMousedown:function(e){n=e.target===e.currentTarget},onMouseup:function(e){o=e.target===e.currentTarget}}})),Y=o({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:u([String,Array,Object])},zIndex:{type:u([String,Number])}}),C=i({name:"ElOverlay",props:Y,emits:{click:function(e){return e instanceof MouseEvent}},setup:function(e,t){var o=t.slots,u=t.emit,i=a("overlay"),l=n(e.customMaskEvent?void 0:function(e){u("click",e)}),d=l.onClick,f=l.onMousedown,v=l.onMouseup;return function(){return e.mask?c("div",{class:[i.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:d,onMousedown:f,onMouseup:v},[s(o,"default")],h.STYLE|h.CLASS|h.PROPS,["onClick","onMouseup","onMousedown"]):r("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[s(o,"default")])}}});e("E",C),e("u",(function(e,n,t,o){var u={offsetX:0,offsetY:0},i=function(n,t){if(e.value){var i=u.offsetX,a=u.offsetY,c=e.value.getBoundingClientRect(),s=c.left,r=c.top,l=c.width,d=c.height,f=-s+i,v=-r+a,m=document.documentElement.clientWidth-s-l+i,y=document.documentElement.clientHeight-r-d+a;(null==o?void 0:o.value)||(n=Math.min(Math.max(n,f),m),t=Math.min(Math.max(t,v),y)),u.offsetX=n,u.offsetY=t,e.value.style.transform="translate(".concat(b(n),", ").concat(b(t),")")}},a=function(e){var n=e.clientX,t=e.clientY,o=u.offsetX,a=u.offsetY,c=function(e){var u=o+e.clientX-n,c=a+e.clientY-t;i(u,c)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",(function e(){document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",e)}))},c=function(){n.value&&e.value&&(n.value.removeEventListener("mousedown",a),window.removeEventListener("resize",s))},s=function(){var e=u.offsetX,n=u.offsetY;i(e,n)};return l((function(){d((function(){t.value?n.value&&e.value&&(n.value.addEventListener("mousedown",a),window.addEventListener("resize",s)):c()}))})),f((function(){c()})),{resetPosition:function(){u.offsetX=0,u.offsetY=0,e.value&&(e.value.style.transform="")},updatePosition:s}})),e("b",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(e)||x("[useLockscreen]","You need to pass a ref param to this function");var t=n.ns||a("popup"),o=m((function(){return t.bm("parent","hidden")}));if(y&&!E(document.body,o.value)){var u=0,i=!1,c="0",s=function(){setTimeout((function(){"undefined"!=typeof document&&i&&document&&(document.body.style.width=c,k(document.body,o.value))}),200)};p(e,(function(e){if(e){(i=!E(document.body,o.value))&&(c=document.body.style.width,M(document.body,o.value)),u=L(t.namespace.value);var n=document.documentElement.clientHeight<document.body.scrollHeight,a=w(document.body,"overflowY");u>0&&(n||"scroll"===a)&&i&&(document.body.style.width="calc(100% - ".concat(u,"px)"))}else s()})),g((function(){return s()}))}}))}}}));
