import{bq as e,by as n,bz as t,aZ as o}from"./index.3938ccd1.js";function r(e){if(!1===e)return 0;if(!0===e||void 0===e)return 1;const n=parseInt(e,10);return isNaN(n)?0:n}var p=e({name:"close-popup",beforeMount(e,{value:p}){const a={depth:r(p),handler(o){0!==a.depth&&setTimeout((()=>{const r=n(e);void 0!==r&&t(r,o,a.depth)}))},handlerKey(e){!0===o(e,13)&&a.handler(e)}};e.__qclosepopup=a,e.addEventListener("click",a.handler),e.addEventListener("keyup",a.handlerKey)},updated(e,{value:n,oldValue:t}){n!==t&&(e.__qclosepopup.depth=r(n))},beforeUnmount(e){const n=e.__qclosepopup;e.removeEventListener("click",n.handler),e.removeEventListener("keyup",n.handlerKey),delete e.__qclosepopup}});export{p as C};
