/*!
 * KoliBri - The accessible HTML-Standard
 */
import{U as t,L as o,t as i,y as e,W as n,P as s,X as l,Y as a,Z as r,p as c,_ as f,J as d,$ as u}from"./common-Dd0zJQbD.js";import{i as p,r as m}from"./dev.utils-D2KUwuu5.js";import"./index-C_yiBYg2.js";const v=()=>{let t=e().KoliBri;return void 0===t&&(t={},Object.defineProperty(e(),"KoliBri",{value:t,writable:!1})),t};function L(t,e){try{Object.defineProperty(v(),t,{get:function(){return e}})}catch(e){o.debug(`KoliBri property ${t} is already bind.`)}}const y=(t,e)=>o.debug(`${t} ${e?"":"not "}activated`),h=()=>{if(p(),t()&&(m(),L("a11yColorContrast",n),L("querySelector",s),L("querySelectorAll",l),L("querySelectorColors",a),L("utils",function(){return r}),L("parseJson",c),L("stringifyJson",f),y("Development mode",t()),y("Experimental mode",d()),y("Color contrast analysis",u()),setTimeout(()=>{try{const t=i(),e=null==t?void 0:t.body;if(t&&e&&"function"==typeof t.createElement){const o=t.createElement("svg");o.setAttribute("aria-label","KoliBri-DevTools"),o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("role","toolbar"),o.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),o.innerHTML='<svg\n  xmlns="http://www.w3.org/2000/svg"\n  width="50"\n  height="50"\n  viewBox="0 0 600 600"\n>\n  <path d="M353 322L213 304V434L353 322Z" fill="#047" />\n  <path d="M209 564V304L149 434L209 564Z" fill="#047" />\n  <path d="M357 316L417 250L361 210L275 244L357 316Z" fill="#047" />\n  <path d="M353 318L35 36L213 300L353 318Z" fill="#047" />\n  <path d="M329 218L237 92L250 222L272 241L329 218Z" fill="#047" />\n  <path d="M391 286L565 272L421 252L391 286Z" fill="#047" />\n</svg>',e.appendChild(o)}}catch(t){o.debug(["Could not initialize DevTools UI (likely in SSR/test environment):",t])}},100),u())){const t=setTimeout(()=>{clearTimeout(t);try{const t=i(),e=null==t?void 0:t.body;t&&e&&"function"==typeof t.createElement&&setInterval(()=>{r.queryHtmlElementColors(t.createElement("div"),n(e),!1,!1)},1e4)}catch(t){o.debug(["Could not initialize color contrast analysis:",t])}},2500)}};export{h as initialize};