1 line
2.2 KiB
JavaScript
1 line
2.2 KiB
JavaScript
this.wc=this.wc||{},this.wc.number=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=445)}({445:function(e,t,n){"use strict";n.r(t),n.d(t,"numberFormat",(function(){return i})),n.d(t,"formatValue",(function(){return u})),n.d(t,"calculateDelta",(function(){return o}));const r=n(446);function i({precision:e=null,decimalSeparator:t=".",thousandSeparator:n=","},i){if("number"!=typeof i&&(i=parseFloat(i)),isNaN(i))return"";let u=parseInt(e,10);if(isNaN(u)){const[,e]=i.toString().split(".");u=e?e.length:0}return r(i,u,t,n)}function u(e,t,n){if(!Number.isFinite(n))return null;switch(t){case"average":return Math.round(n);case"number":return i({...e,precision:null},n)}}function o(e,t){return Number.isFinite(e)&&Number.isFinite(t)?0===t?0:Math.round((e-t)/t*100):null}},446:function(e,t,n){"use strict";e.exports=function(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var i=isFinite(+e)?+e:0,u=isFinite(+t)?Math.abs(t):0,o=void 0===r?",":r,a=void 0===n?".":n,c="";return(c=(u?function(e,t){if(-1===(""+e).indexOf("e"))return+(Math.round(e+"e+"+t)+"e-"+t);var n=(""+e).split("e"),r="";return+n[1]+t>0&&(r="+"),(+(Math.round(+n[0]+"e"+r+(+n[1]+t))+"e-"+t)).toFixed(t)}(i,u).toString():""+Math.round(i)).split("."))[0].length>3&&(c[0]=c[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,o)),(c[1]||"").length<u&&(c[1]=c[1]||"",c[1]+=new Array(u-c[1].length+1).join("0")),c.join(a)}}}); |