var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var n=[];for(let e=0;e<256;++e)n.push((e+256).toString(16).slice(1));function r(e,t=0){return(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+`-`+n[e[t+4]]+n[e[t+5]]+`-`+n[e[t+6]]+n[e[t+7]]+`-`+n[e[t+8]]+n[e[t+9]]+`-`+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase()}var i,a=new Uint8Array(16);function o(){if(!i){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);i=crypto.getRandomValues.bind(crypto)}return i(a)}var s={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function c(e,t,n){e||={};let i=e.random??e.rng?.()??o();if(i.length<16)throw Error(`Random bytes length must be >= 16`);if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=i[e];return t}return r(i)}function l(e,t,n){return s.randomUUID&&!t&&!e?s.randomUUID():c(e,t,n)}var u=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,d=t({customAlphabet:()=>m,customRandom:()=>p,nanoid:()=>h,random:()=>f,urlAlphabet:()=>u}),f=e=>crypto.getRandomValues(new Uint8Array(e)),p=(e,t,n)=>{let r=(2<<Math.log2(e.length-1))-1,i=-~(1.6*r*t/e.length);return(a=t)=>{let o=``;for(;;){let t=n(i),s=i|0;for(;s--;)if(o+=e[t[s]&r]||``,o.length>=a)return o}}},m=(e,t=21)=>p(e,t|0,f),h=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=u[n[e]&63];return t},g=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,_=(e=21)=>{let t=``,n=e|0;for(;n--;)t+=g[Math.random()*64|0];return t},{customAlphabet:v,nanoid:y,random:b}=d,x=_,S=50*1e3,C=`abcdefghijklmnopqrstuvwxyz`,w=26,T=v(C,w);function E(e){return String(Math.floor(e*100)).replace(/\d{6}$/,`,$&`).replace(/\d{3}$/,`,$&`)}function D(e,t){let n=O(e,t),r=Object.keys(n.chars),i=r.length,a=``,o=r.reduce((e,t)=>e+n.chars[t],0)/i;for(let e of r.sort()){let t=n.chars[e]/o;a+=`<div class="dot" style="
      background: hsl(${200*t}, 100%, 50%);
      width: ${100/i}%;
    ">${e}</div>`}document.body.innerHTML+=`<section>
    <span>${E(S*1e3/n.time)} ops/sec</span>
    <h2>${n.title}</h2>
    ${a}
  </section>`}function O(e,t){let n={},r=[],i,a=Date.now();for(i=0;i<S;i++)r.push(t());let o=Date.now();for(i=0;i<S;i++){let t=r[i];e===`uuid/v4`&&(t=t.replace(/-./g,``));for(let e of t)n[e]||(n[e]=0),n[e]+=1}return{chars:n,time:o-a,title:e}}var k=[()=>D(`ideal`,()=>{let e=[];for(let t=0;t<w;t++)e.push(C[t]);return e}),()=>D(`nanoid`,()=>y()),()=>D(`nanoid2`,()=>T()),()=>D(`uuid/v4`,()=>l()),()=>D(`nanoid/non-secure`,()=>x()),()=>D(`random % alphabet`,()=>[...b(w)].map(e=>C[e%26]))];function A(){k.length!==0&&(k.shift()(),setTimeout(A,10))}var j=``;for(let e=0;e<10;e++)j+=`<div>${y()}</div>`;document.body.innerHTML=`<main>${j}</main>`,A();