import{g as t}from"./p-57204abc.js";function n(t,n){const o=n?`slot[name="${n}"]`:"slot:not([name])";return t.shadowRoot?t.shadowRoot.querySelector(o):t.querySelector(o)}function o(o="",s=true){return(e,l)=>{if(!("__slots"in e)){e.__slots={}}if(!("slot"in e)){e.__slot=null}const{componentDidLoad:i,disconnectedCallback:c}=e;function r(){const i=t(this);const c=n(i,o);const r=e[l].bind(this,c);const a={slot:c,host:i,slotName:o,handler:r};if(!c){console.error("The requested slot was not found");return}if(o==""){e.__slot=a}else{e.__slots[o]=a}c.addEventListener("slotChange",r);if(s){r()}}e.componentDidLoad=function(){r.apply(this);return i&&i.apply(this)};e.disconnectedCallback=function(){if(e.__slot){e.__slot.slot.removeEventListener("slotChange",e.__slot.handler);e.__slot=null}Object.values(e.__slots).forEach((({slotName:t,slot:n,handler:o})=>{n.removeEventListener("slotChange",o);delete e.__slots[t]}));return c&&c.apply(this)}}}export{o as S};
//# sourceMappingURL=p-6aba5da2.js.map