import{c as t,M as e,V as s}from"./p-dcc98162.js";var c=function(t,e,s,c){var n,i=arguments.length,o=i<3?e:null===c?c=Object.getOwnPropertyDescriptor(e,s):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,c);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(o=(i<3?n(o):i>3?n(e,s,o):n(e,s))||o);return i>3&&o&&Object.defineProperty(e,s,o),o};class n extends s{constructor(t){super(),this.mutationObserver=null,this.observerEntry=t}connectedCallback(){this.mutationObserver&&this.observeMutationObserver()}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect()}componentDidLoad(){this.initMutationObserver(),this.observeMutationObserver()}initMutationObserver(){this.mutationObserver=new MutationObserver((async t=>{this.observerEntry.mutationFilter&&!this.observerEntry.mutationFilter(t,this.host)||this.observerEntry.callback(t)}))}observeMutationObserver(){const t=this.observerEntry.target?this.observerEntry.target():this.host;t&&this.mutationObserver&&this.mutationObserver.observe(t,this.observerEntry.options)}}c([t()],n.prototype,"host",void 0),c([e("connectedCallback")],n.prototype,"connectedCallback",null),c([e("disconnectedCallback")],n.prototype,"disconnectedCallback",null),c([e("componentDidLoad")],n.prototype,"componentDidLoad",null);export{n as M}