UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

5 lines 1.8 kB
/*! * KoliBri - The accessible HTML-Standard */ import{L as n,v as t,C as e,D as o,E as i,A as s}from"./common-Cx_AGO_M.js";import{E as r}from"./index-BQlHOxik.js";const a=()=>{try{const n=t();if(!n||typeof n.querySelector!=="function"){return}const i=n.querySelector('meta[name="kolibri"]');if(i&&i.hasAttribute("content")){const n=i.getAttribute("content");if(typeof n==="string"){e(n.includes("experimental-mode=true"));o(n.includes("color-contrast-analysis=true"))}}}catch(n){}};const c=()=>{let n=i().KoliBri;if(n===undefined){n={};Object.defineProperty(i(),"KoliBri",{value:n,writable:false})}return n};const u=()=>{a();n.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${r.kolibriVersion}\n\t`,{forceLog:true})};const l=()=>{if(c().adviceShown!==true){Object.defineProperty(c(),"adviceShown",{get:function(){return true}});n.debug(`\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n`)}};let f=()=>Math.floor(Math.random()*16777215).toString(16);if(s()){f=()=>"nonce"}const m=n=>`${n}-${f()}`;const p=(n,t)=>{const e=n.lastIndexOf("-");if(e===-1)return`${n}-${t}`;const o=n.slice(e+1);const i=o==="nonce"||/^[0-9a-f]+$/.test(o);return i?`${n.slice(0,e)}-${t}-${o}`:`${n}-${t}`};export{p as a,m as c,u as i,f as n,l as r}; //# sourceMappingURL=dev.utils-02Sl9bQo.js.map