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AgB,CAAC,sBAAuB,EAAQ,yBAA0B,IAGvE,EAAS,EAAG,CAEf,OAAO,EADc,EAAe,EAAQ,EAAQ,OAAQ,GAC7B,EAAY,EAAM,EACnD,CAEC,MAAM,EAAW,KAAK,IAAI,KAAK,MAAM,EAAQ,QA7Df,iBADnB,EA8D+C,GA5DlD,KAAK,IAAI,GAGV,EAAM,GAAkB,KAAK,IAAI,KAyD4B,KAAK,IAAI,MAAQ,EAAM,GAAU,GAAI,EAAM,OAAS,GA9D7G,MA+DX,EAvDc,EAAC,EAAgB,KAC/B,GAA8B,iBAAnB,EACV,OAAO,EAAiB,EAGzB,MAAM,EAAc,EAAiB,OAAO,GACtC,EAAY,EAAiB,OAAO,GAC1C,OAAO,OAAO,GAAgB,OAAO,GAAa,CAAQ,EAgDjD,CAAO,GAAS,EAAQ,OAAS,KAAO,MAAS,GAErD,IACJ,EAAS,EAAO,YAAY,IAO7B,OAAO,EAJc,EAAe,OAAO,GAAS,EAAQ,OAAQ,GAIrC,EAFlB,EAAM,EAGpB,Q","file":"/npm/pretty-bytes@7.0.0/index.js/+esm","sourceRoot":"","sourcesContent":["/**\n * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0.\n * Original file: /npm/pretty-bytes@7.0.0/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","const BYTE_UNITS = [\n\t'B',\n\t'kB',\n\t'MB',\n\t'GB',\n\t'TB',\n\t'PB',\n\t'EB',\n\t'ZB',\n\t'YB',\n];\n\nconst BIBYTE_UNITS = [\n\t'B',\n\t'KiB',\n\t'MiB',\n\t'GiB',\n\t'TiB',\n\t'PiB',\n\t'EiB',\n\t'ZiB',\n\t'YiB',\n];\n\nconst BIT_UNITS = [\n\t'b',\n\t'kbit',\n\t'Mbit',\n\t'Gbit',\n\t'Tbit',\n\t'Pbit',\n\t'Ebit',\n\t'Zbit',\n\t'Ybit',\n];\n\nconst BIBIT_UNITS = [\n\t'b',\n\t'kibit',\n\t'Mibit',\n\t'Gibit',\n\t'Tibit',\n\t'Pibit',\n\t'Eibit',\n\t'Zibit',\n\t'Yibit',\n];\n\n/*\nFormats the given number using `Number#toLocaleString`.\n- If locale is a string, the value is expected to be a locale-key (for example: `de`).\n- If locale is true, the system default locale is used for translation.\n- If no value for locale is specified, the number is returned unmodified.\n*/\nconst toLocaleString = (number, locale, options) => {\n\tlet result = number;\n\tif (typeof locale === 'string' || Array.isArray(locale)) {\n\t\tresult = number.toLocaleString(locale, options);\n\t} else if (locale === true || options !== undefined) {\n\t\tresult = number.toLocaleString(undefined, options);\n\t}\n\n\treturn result;\n};\n\nconst log10 = numberOrBigInt => {\n\tif (typeof numberOrBigInt === 'number') {\n\t\treturn Math.log10(numberOrBigInt);\n\t}\n\n\tconst string = numberOrBigInt.toString(10);\n\n\treturn string.length + Math.log10('0.' + string.slice(0, 15));\n};\n\nconst log = numberOrBigInt => {\n\tif (typeof numberOrBigInt === 'number') {\n\t\treturn Math.log(numberOrBigInt);\n\t}\n\n\treturn log10(numberOrBigInt) * Math.log(10);\n};\n\nconst divide = (numberOrBigInt, divisor) => {\n\tif (typeof numberOrBigInt === 'number') {\n\t\treturn numberOrBigInt / divisor;\n\t}\n\n\tconst integerPart = numberOrBigInt / BigInt(divisor);\n\tconst remainder = numberOrBigInt % BigInt(divisor);\n\treturn Number(integerPart) + (Number(remainder) / divisor);\n};\n\nexport default function prettyBytes(number, options) {\n\tif (typeof number !== 'bigint' && !Number.isFinite(number)) {\n\t\tthrow new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);\n\t}\n\n\toptions = {\n\t\tbits: false,\n\t\tbinary: false,\n\t\tspace: true,\n\t\t...options,\n\t};\n\n\tconst UNITS = options.bits\n\t\t? (options.binary ? BIBIT_UNITS : BIT_UNITS)\n\t\t: (options.binary ? BIBYTE_UNITS : BYTE_UNITS);\n\n\tconst separator = options.space ? ' ' : '';\n\n\tif (options.signed && (typeof number === 'number' ? number === 0 : number === 0n)) {\n\t\treturn ` 0${separator}${UNITS[0]}`;\n\t}\n\n\tconst isNegative = number < 0;\n\tconst prefix = isNegative ? '-' : (options.signed ? '+' : '');\n\n\tif (isNegative) {\n\t\tnumber = -number;\n\t}\n\n\tlet localeOptions;\n\n\tif (options.minimumFractionDigits !== undefined) {\n\t\tlocaleOptions = {minimumFractionDigits: options.minimumFractionDigits};\n\t}\n\n\tif (options.maximumFractionDigits !== undefined) {\n\t\tlocaleOptions = {maximumFractionDigits: options.maximumFractionDigits, ...localeOptions};\n\t}\n\n\tif (number < 1) {\n\t\tconst numberString = toLocaleString(number, options.locale, localeOptions);\n\t\treturn prefix + numberString + separator + UNITS[0];\n\t}\n\n\tconst exponent = Math.min(Math.floor(options.binary ? log(number) / Math.log(1024) : log10(number) / 3), UNITS.length - 1);\n\tnumber = divide(number, (options.binary ? 1024 : 1000) ** exponent);\n\n\tif (!localeOptions) {\n\t\tnumber = number.toPrecision(3);\n\t}\n\n\tconst numberString = toLocaleString(Number(number), options.locale, localeOptions);\n\n\tconst unit = UNITS[exponent];\n\n\treturn prefix + numberString + separator + unit;\n}\n"]}