import{r as t,h as s,H as i}from"./p-b891c2f1.js";const a=class{constructor(s){t(this,s),this.value=0,this.unit="byte",this.display="short"}render(){if(isNaN(this.value))return"";const t="bit"===this.unit?["","kilo","mega","giga","tera"]:["","kilo","mega","giga","tera","peta"],s=Math.max(0,Math.min(Math.floor(Math.log10(this.value)/3),t.length-1)),i=t[s]+this.unit,a=parseFloat((this.value/Math.pow(1e3,s)).toPrecision(3));return new Intl.NumberFormat(this.locale,{style:"unit",unit:i,unitDisplay:this.display}).format(a)}};a.style=":host{display:inline-block}";const r=class{constructor(s){t(this,s)}render(){return s(i,null,s("slot",null))}};r.style=":host{display:block}::slotted(*:not(:last-child)){margin-bottom:var(--spacing)}";export{a as sc_format_bytes,r as sc_spacing}