import{E as l,Fb as o,Rd as f,Sb as a,Ta as c,V as r,Ya as u,ka as n,ma as h,na as m}from"./chunk-4HFZZ7HS.js";import{e as d}from"./chunk-SZAW6ZBW.js";var E,g=d(()=>{h();m();f();f();E=(()=>{class e{constructor(t){this._elRef=t,this.listening=!1,this.clickOutside=new c}ngOnInit(){this.globalClick=l(document,"click").pipe(r(1),n(()=>{this.listening=!0})).subscribe(t=>{this.onGlobalClick(t)})}ngOnDestroy(){this.globalClick&&this.globalClick.unsubscribe()}onGlobalClick(t){t instanceof MouseEvent&&this.listening===!0&&(this.isDescendant(this._elRef.nativeElement,t.target)===!0?this.clickOutside.emit({target:t.target||null,value:!1}):this.clickOutside.emit({target:t.target||null,value:!0}))}isDescendant(t,s){let i=s;for(;i!==null;){if(i===t)return!0;i=i.parentNode}return!1}static{this.\u0275fac=function(s){return new(s||e)(o(u))}}static{this.\u0275dir=a({type:e,selectors:[["","sdClickOutside",""]],outputs:{clickOutside:"clickOutside"}})}}return e})()});export{E as a,g as b};
