| 1 |
- !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}System.register([],(function(e,n){"use strict";return{execute:function(){e({b:function(t,e){return t.reduce((function(t,n,r){var o=Math.floor(r/e);return t[o]||(t[o]=[]),t[o].push(n),t}),[])},c:function(t,e){return(t/e*100).toFixed(2)},d:function(t,e){if(!t.length)return 0;var n=t.reduce((function(t,n){return t+n[e]}),0);return console.log("sum",n),n/t.length},p:function(e,n){if(0===arguments.length||!e)return null;var r,o=n||"{y}-{m}-{d} {h}:{i}:{s}";"string"==typeof e&&e.indexOf("/")&&(e=(e=(e=e.replace(/-/g,"/")).replace(/T/g," ")).replace(/\.+\d{0,6}/,""));"object"===t(e)?r=e:("string"==typeof e&&(e=/^[0-9]+$/.test(e)?parseInt(e):e.replace(new RegExp(/-/gm),"/")),"number"==typeof e&&10===e.toString().length&&(e*=1e3),r=new Date(e));var u={y:r.getFullYear(),m:r.getMonth()+1,d:r.getDate(),h:r.getHours(),i:r.getMinutes(),s:r.getSeconds(),a:r.getDay()};return o.replace(/{([ymdhisa])+}/g,(function(t,e){var n=u[e];return"a"===e?["日","一","二","三","四","五","六"][n]:n.toString().padStart(2,"0")}))},s:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];function e(t){t.children&&Array.isArray(t.children)&&(t.children.sort((function(t,e){return t.sort-e.sort})),t.children.forEach((function(t){e(t)})))}t.sort((function(t,e){return t.sort-e.sort}));for(var n=0;n<t.length;n++)e(t[n])}});e("a",(function(t){return(t/1024/1024).toFixed(2)+"MB"})),e("g",(function(t){return t?t.indexOf("video")>-1?"video":t.indexOf("audio")>-1?"audio":t.indexOf("image")>-1?"image":"other":null}))}}}))}();
|