password-manager/frontend/delta/js/Filesize/filesize.min.js.map
2015-11-23 16:10:44 +01:00

1 line
6.2 KiB
Plaintext

{"version":3,"file":"filesize.min.js","sources":["filesize.js"],"names":["global","bit","si","bits","bytes","filesize","arg","descriptor","undefined","arguments","result","skip","val","e","base","ceil","neg","num","output","round","unix","spacer","suffixes","isNaN","Error","exponent","Number","Math","floor","log","pow","toFixed","test","toLowerCase","charAt","value","suffix","join","exports","module","define","window"],"mappings":";;;;AAAA,cAYA,SAAWA,GACV,GAAIC,GAAM,KACNC,GACHC,MAAO,IAAK,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,MACtDC,OAAQ,IAAK,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,OAWpDC,EAAW,SAAUC,GACxB,GAAIC,GAA8BC,SAAjBC,UAAU,MAAwBA,UAAU,GAEzDC,KACAC,GAAO,EACPC,EAAM,EACNC,EAAIL,OACJM,EAAON,OACPL,EAAOK,OACPO,EAAOP,OACPQ,EAAMR,OACNS,EAAMT,OACNU,EAASV,OACTW,EAAQX,OACRY,EAAOZ,OACPa,EAASb,OACTc,EAAWd,MAEf,IAAIe,MAAMjB,GACT,KAAM,IAAIkB,OAAM,oBAoFjB,OAjFArB,GAAOI,EAAWJ,QAAS,EAC3BiB,EAAOb,EAAWa,QAAS,EAC3BN,EAA2BN,SAApBD,EAAWO,KAAqBP,EAAWO,KAAO,EACzDK,EAA6BX,SAArBD,EAAWY,MAAsBZ,EAAWY,MAAQC,EAAO,EAAI,EACvEC,EAA+Bb,SAAtBD,EAAWc,OAAuBd,EAAWc,OAASD,EAAO,GAAK,IAC3EE,EAAmCd,SAAxBD,EAAWe,SAAyBf,EAAWe,YAC1DJ,EAA+BV,SAAtBD,EAAWW,OAAuBX,EAAWW,OAAS,SAC/DL,EAA4BL,SAAxBD,EAAWkB,SAAyBlB,EAAWkB,SAAW,GAC9DR,EAAMS,OAAOpB,GACbU,EAAY,EAANC,EACNF,EAAOD,EAAO,EAAI,IAAO,KAGrBE,IACHC,GAAOA,GAII,IAARA,GACHP,EAAO,GAAK,EAGXA,EAAO,GADJU,EACS,GAEA,OAIH,KAANP,GAAYU,MAAMV,MACrBA,EAAIc,KAAKC,MAAMD,KAAKE,IAAIZ,GAAOU,KAAKE,IAAId,KAIrCF,EAAI,IACPD,EAAa,IAAPA,GAAeC,EAAI,GACzBA,EAAI,GAIJD,EADY,IAATE,EACGG,EAAMU,KAAKG,IAAI,EAAO,GAAJjB,GAElBI,EAAMU,KAAKG,IAAI,IAAMjB,GAGxBV,IACHS,EAAY,EAANA,EAEFA,EAAMG,IACTH,GAAYG,EACZF,MAIFH,EAAO,GAAKgB,OAAOd,EAAImB,QAAQlB,EAAI,EAAIM,EAAQ,IAC/CT,EAAO,GAAKR,EAAGC,EAAO,OAAS,SAASU,IAEnCF,GAAQS,IACRjB,GAAQF,EAAI+B,KAAKtB,EAAO,MAC3BA,EAAO,GAAKA,EAAO,GAAGuB,eAGvBvB,EAAO,GAAKA,EAAO,GAAGwB,OAAO,GAEX,MAAdxB,EAAO,IACVA,EAAO,GAAKiB,KAAKC,MAAMlB,EAAO,IAC9BA,EAAO,GAAK,IACDP,GAAsB,MAAdO,EAAO,KAC1BA,EAAO,GAAK,OAMXM,IACHN,EAAO,IAAMA,EAAO,IAIrBA,EAAO,GAAKY,EAASZ,EAAO,KAAOA,EAAO,GAG3B,UAAXQ,EACIR,EAGO,aAAXQ,EACIL,EAGO,WAAXK,GACMiB,MAAOzB,EAAO,GAAI0B,OAAQ1B,EAAO,IAGpCA,EAAO2B,KAAKhB,GAIG,oBAAZiB,SACVC,OAAOD,QAAUjC,EACW,kBAAXmC,QACjBA,OAAO,WACN,MAAOnC,KAGRL,EAAOK,SAAWA,GAEC,mBAAXL,QAAyBA,OAASyC","sourcesContent":["\"use strict\";\n\n/**\n * filesize\n *\n * @author Jason Mulligan <jason.mulligan@avoidwork.com>\n * @copyright 2015 Jason Mulligan <jason.mulligan@avoidwork.com>\n * @license BSD-3-Clause\n * @link http://filesizejs.com\n * @module filesize\n * @version 3.1.3\n */\n(function (global) {\n\tvar bit = /b$/;\n\tvar si = {\n\t\tbits: [\"B\", \"kb\", \"Mb\", \"Gb\", \"Tb\", \"Pb\", \"Eb\", \"Zb\", \"Yb\"],\n\t\tbytes: [\"B\", \"kB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"]\n\t};\n\n\t/**\n * filesize\n *\n * @method filesize\n * @param {Mixed} arg String, Int or Float to transform\n * @param {Object} descriptor [Optional] Flags\n * @return {String} Readable file size String\n */\n\tvar filesize = function (arg) {\n\t\tvar descriptor = arguments[1] === undefined ? {} : arguments[1];\n\n\t\tvar result = [];\n\t\tvar skip = false;\n\t\tvar val = 0;\n\t\tvar e = undefined,\n\t\t base = undefined,\n\t\t bits = undefined,\n\t\t ceil = undefined,\n\t\t neg = undefined,\n\t\t num = undefined,\n\t\t output = undefined,\n\t\t round = undefined,\n\t\t unix = undefined,\n\t\t spacer = undefined,\n\t\t suffixes = undefined;\n\n\t\tif (isNaN(arg)) {\n\t\t\tthrow new Error(\"Invalid arguments\");\n\t\t}\n\n\t\tbits = descriptor.bits === true;\n\t\tunix = descriptor.unix === true;\n\t\tbase = descriptor.base !== undefined ? descriptor.base : 2;\n\t\tround = descriptor.round !== undefined ? descriptor.round : unix ? 1 : 2;\n\t\tspacer = descriptor.spacer !== undefined ? descriptor.spacer : unix ? \"\" : \" \";\n\t\tsuffixes = descriptor.suffixes !== undefined ? descriptor.suffixes : {};\n\t\toutput = descriptor.output !== undefined ? descriptor.output : \"string\";\n\t\te = descriptor.exponent !== undefined ? descriptor.exponent : -1;\n\t\tnum = Number(arg);\n\t\tneg = num < 0;\n\t\tceil = base > 2 ? 1000 : 1024;\n\n\t\t// Flipping a negative number to determine the size\n\t\tif (neg) {\n\t\t\tnum = -num;\n\t\t}\n\n\t\t// Zero is now a special case because bytes divide by 1\n\t\tif (num === 0) {\n\t\t\tresult[0] = 0;\n\n\t\t\tif (unix) {\n\t\t\t\tresult[1] = \"\";\n\t\t\t} else {\n\t\t\t\tresult[1] = \"B\";\n\t\t\t}\n\t\t} else {\n\t\t\t// Determining the exponent\n\t\t\tif (e === -1 || isNaN(e)) {\n\t\t\t\te = Math.floor(Math.log(num) / Math.log(ceil));\n\t\t\t}\n\n\t\t\t// Exceeding supported length, time to reduce & multiply\n\t\t\tif (e > 8) {\n\t\t\t\tval = val * (1000 * (e - 8));\n\t\t\t\te = 8;\n\t\t\t}\n\n\t\t\tif (base === 2) {\n\t\t\t\tval = num / Math.pow(2, e * 10);\n\t\t\t} else {\n\t\t\t\tval = num / Math.pow(1000, e);\n\t\t\t}\n\n\t\t\tif (bits) {\n\t\t\t\tval = val * 8;\n\n\t\t\t\tif (val > ceil) {\n\t\t\t\t\tval = val / ceil;\n\t\t\t\t\te++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresult[0] = Number(val.toFixed(e > 0 ? round : 0));\n\t\t\tresult[1] = si[bits ? \"bits\" : \"bytes\"][e];\n\n\t\t\tif (!skip && unix) {\n\t\t\t\tif (bits && bit.test(result[1])) {\n\t\t\t\t\tresult[1] = result[1].toLowerCase();\n\t\t\t\t}\n\n\t\t\t\tresult[1] = result[1].charAt(0);\n\n\t\t\t\tif (result[1] === \"B\") {\n\t\t\t\t\tresult[0] = Math.floor(result[0]);\n\t\t\t\t\tresult[1] = \"\";\n\t\t\t\t} else if (!bits && result[1] === \"k\") {\n\t\t\t\t\tresult[1] = \"K\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Decorating a 'diff'\n\t\tif (neg) {\n\t\t\tresult[0] = -result[0];\n\t\t}\n\n\t\t// Applying custom suffix\n\t\tresult[1] = suffixes[result[1]] || result[1];\n\n\t\t// Returning Array, Object, or String (default)\n\t\tif (output === \"array\") {\n\t\t\treturn result;\n\t\t}\n\n\t\tif (output === \"exponent\") {\n\t\t\treturn e;\n\t\t}\n\n\t\tif (output === \"object\") {\n\t\t\treturn { value: result[0], suffix: result[1] };\n\t\t}\n\n\t\treturn result.join(spacer);\n\t};\n\n\t// CommonJS, AMD, script tag\n\tif (typeof exports !== \"undefined\") {\n\t\tmodule.exports = filesize;\n\t} else if (typeof define === \"function\") {\n\t\tdefine(function () {\n\t\t\treturn filesize;\n\t\t});\n\t} else {\n\t\tglobal.filesize = filesize;\n\t}\n})(typeof global !== \"undefined\" ? global : window);"]}