function chr4(){Math.random().toString(16).slice(-4)}function getId(t){if(t===void 0){t=""}return t+"-"+chr4()+chr4()+"-"+chr4()+"-"+chr4()+chr4()+chr4()}function filterIcon(t){return(t||"").replace(/(\:).+?(\:)/g,(function(t){return'<i class="'.concat(t.replaceAll(":",""),'"></i>')}))}function filterBold(t){return(t||"").replace(/(\*).+?(\*)/g,(function(t){return"<strong>".concat(t.replaceAll("*",""),"</strong>")}))}function filterItalic(t){return(t||"").replace(/(\_).+?(\_)/g,(function(t){return"<em>".concat(t.replaceAll("_",""),"</em>")}))}function filterCode(t){return(t||"").replace(/(\`).+?(\`)/g,(function(t){return"<code>".concat(t.replaceAll("`",""),"</code>")}))}function tinyMDtoHTML(t){return filterIcon(filterBold(filterItalic(filterCode(t))))}function getLangFromDocument(){return document.querySelector("html").getAttribute("lang")||"es"}function getLangFromBrowser(){var t=navigator.language;return t.substring(0,1)}function getLang(){var t=getLangFromDocument()||getLangFromBrowser();return["en","es"].includes(t)?t:"es"}function cls(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}return t.reduce((function(t,n){if(typeof n==="object"&&typeof n!=="string"){t=t.concat(Object.keys(n).filter((function(t){return n[t]})))}if(typeof n!=="object"&&typeof n==="string"){t.push(n)}return t}),[]).join(" ")}function getOverlayContainer(){if(!document.querySelector("body > x-overlay-container")){var t=document.createElement("x-overlay-container");document.querySelector("body").appendChild(t);return t}else{return document.querySelector("body > x-overlay-container")}}function getTooltipElement(){if(!getOverlayContainer().querySelector("x-tooltip-overlay")){var t=document.createElement("x-tooltip-overlay");var n=document.createElement("span");var e=document.createElement("div");t.setAttribute("role","tooltip");e.classList.add("tooltip-arrow");e.setAttribute("data-popper-arrow","true");t.appendChild(n);t.appendChild(e);getOverlayContainer().appendChild(t);return t}else{return getOverlayContainer().querySelector("x-tooltip-overlay")}}function getNotificationContainerElement(t){if(t===void 0){t="top"}if(!getOverlayContainer().querySelector("x-notification-".concat(t))){var n=document.createElement("x-notification-".concat(t));getOverlayContainer().appendChild(n);return n}else{return getOverlayContainer().querySelector("x-notification-".concat(t))}}export{getLang as a,getOverlayContainer as b,cls as c,getTooltipElement as d,getId as e,getNotificationContainerElement as g,tinyMDtoHTML as t};