import{r as i}from"./p-e97fde0a.js";import{m as t}from"./p-3f6362a4.js";const s={kg:"kilogram",lb:"pound",g:"gram",oz:"ounce"};const n=class{constructor(t){i(this,t);this.value=0;this.locale=undefined;this.type="decimal";this.noGrouping=false;this.currency="USD";this.currencyDisplay="symbol";this.minimumIntegerDigits=undefined;this.minimumFractionDigits=null;this.maximumFractionDigits=undefined;this.minimumSignificantDigits=undefined;this.maximumSignificantDigits=undefined;this.noConvert=undefined;this.unit="lb"}render(){if(isNaN(this.value)){return""}const i=navigator.language||(navigator===null||navigator===void 0?void 0:navigator.browserLanguage)||(navigator.languages||["en"])[0];const n=this.noConvert||this.type!=="currency"?this.value:t(this.value,this.currency.toUpperCase());const r=n%1==0?0:2;return new Intl.NumberFormat(this.locale||i,{style:this.type,currency:this.currency.toUpperCase(),currencyDisplay:this.currencyDisplay,useGrouping:!this.noGrouping,minimumIntegerDigits:this.minimumIntegerDigits,minimumFractionDigits:this.minimumFractionDigits!==null?this.minimumFractionDigits:r,maximumFractionDigits:this.maximumFractionDigits,minimumSignificantDigits:this.minimumSignificantDigits,maximumSignificantDigits:this.maximumSignificantDigits,unit:s[this.unit]}).format(n)}};export{n as sc_format_number};
//# sourceMappingURL=p-b12b08e4.entry.js.map