"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue");function d(n){let o=!1,c;const t=u.effectScope(!0);return(...l)=>(o||(c=t.run(()=>n(...l)),o=!0),c)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const m=d(()=>{const n=u.ref([]),o=t=>n.value.includes(t),c=t=>{n.value=t};return{aclList:u.readonly(n),checkPermission:o,setPermission:c}});function f(n){return!!(n&&n.nodeType===8)}const p=()=>{const{checkPermission:n}=m(),o="acl",c=`v-${o}`,t=new WeakMap,l=(e,i)=>{const s=t.get(e);let{parentEl:a,comment:r}=s;if(n(i))r&&r.nodeType===8&&r.nodeValue===c&&(a==null||a.replaceChild(e,r),t.set(e,{parentEl:e.parentElement,parentNode:e.parentNode}));else{if(r)return;r=document.createComment(c),a==null||a.replaceChild(r,e),t.set(e,{...s,comment:r})}};return{name:o,directiveLifeCycle:{mounted(e,i){t.set(e,{parentEl:e.parentElement,parentNode:e.parentNode}),l(e,i.value)},updated(e,i){l(e,i.value)},unmounted(e){const{parentEl:i,comment:s}=t.get(e);s&&f(s)&&s.nodeValue===c&&(i==null||i.removeChild(s)),t.delete(e)}}}},v=[p],y=n=>{v.map(o=>{const{name:c,directiveLifeCycle:t}=o();n.directive(c,t)})};exports.installDirective=y;
//# sourceMappingURL=install.js.map
