import{__awaiter,__generator}from"tslib";var observeLevels=function(e,r,t){if(typeof MutationObserver==="undefined"){return}var n=new MutationObserver((function(e){e=e.filter((function(e){return e.target.nodeName===r.toLocaleUpperCase()}));if(e.length>0){t()}}));n.observe(e,{childList:true,subtree:true,attributes:true,characterData:true});return n};var readSubLevels=function(e,r){return __awaiter(void 0,void 0,void 0,(function(){var t,n,a,u,i,s;return __generator(this,(function(o){switch(o.label){case 0:t=Array.from(e.querySelectorAll(r));n=[];a=0,u=t;o.label=1;case 1:if(!(a<u.length))return[3,4];i=u[a];return[4,i.getLevelInfo()];case 2:s=o.sent();n.push(s);o.label=3;case 3:a++;return[3,1];case 4:return[2,n]}}))}))};export{observeLevels as o,readSubLevels as r};