var c;(h=>{function a(t,o){let e=Array(),r=window.getComputedStyle(t);for(let l of o)e.push(`${l}:${r.getPropertyValue(l)}`);return e.join("; ").concat("; ")}h.extractStyles=a;function i(){let t=document.styleSheets.length,o=document.createElement("style");document.head.appendChild(o);for(let e=0;e<t;e++){let r=document.styleSheets[e];try{for(let l=0;l<r.cssRules.length;l++){let s=r.cssRules.item(l);s&&n(s,o.sheet)}}catch(l){if(l instanceof DOMException)console.warn('Could not read stylesheet, try adding crossorigin="anonymous"',r,l);else throw l}}return o}h.convertPseudoClasses=i;function d(t){var o,e,r;for(let l=document.styleSheets.length-1;l>=0;--l){let s=(r=(e=(o=document==null?void 0:document.styleSheets)==null?void 0:o.item(l))==null?void 0:e.cssRules)==null?void 0:r.item(0);if(s instanceof CSSStyleRule&&s.selectorText.trim()===t)return!0}return!1}h.stylesAreInstalled=d;function n(t,o){if(t instanceof CSSImportRule)try{if(!t.styleSheet)return;for(let e of t.styleSheet.cssRules)n(e,o)}catch(e){if(e instanceof DOMException)console.warn("Could not traverse CSS import",t,e);else throw e}else if(t instanceof CSSStyleRule){if(!t.selectorText)return;let e=t.selectorText.replaceAll(":focus",".-focus-").replaceAll(":focus-visible",".-focus-visible-").replaceAll(":hover",".-hover-").replaceAll(":disabled",".-disabled-").replaceAll(":invalid",".-invalid-").replaceAll(":valid",".-valid-").replaceAll("::placeholder-shown",".-placeholder-shown").replaceAll(":placeholder-shown",".-placeholder-shown").replaceAll("::placeholder",".-placeholder-").replaceAll(":placeholder",".-placeholder-");e!==t.selectorText&&o.insertRule(`${e}{${t.style.cssText}}`)}}})(c||(c={}));export{c as a};
