"use strict";function t(t,e){var r=0,n=t.toString(),a=e.toString();try{r+=n.split(".")[1].length}catch(o){}try{r+=a.split(".")[1].length}catch(o){}return Number(n.replace(".",""))*Number(a.replace(".",""))/Math.pow(10,r)}require("../common/vendor.js"),require("../request/http.js"),exports.accDiv=function(e,r){var n=0,a=0;try{n=e.toString().split(".")[1].length}catch(o){}try{a=r.toString().split(".")[1].length}catch(o){}return t(Number(e.toString().replace(".",""))/Number(r.toString().replace(".","")),Math.pow(10,a-n))},exports.accMul=t,exports.accSub=function(t,e){var r,n,a;try{r=t.toString().split(".")[1].length}catch(o){r=0}try{n=e.toString().split(".")[1].length}catch(o){n=0}return((t*(a=Math.pow(10,Math.max(r,n)))-e*a)/a).toFixed(r>=n?r:n)},exports.getChgRateStr=function(t){if(t)return(t=String(t)).indexOf("-")>-1?(t=t.substr(1,t.length-1),"-"+parseFloat(t).toFixed(2)):0==parseFloat(t)?0:"+"+parseFloat(t).toFixed(2)},exports.getLocalDate=function(t){-1==t.indexOf("T")&&(t=t.replace(/-/g,"/"));let e=new Date(t),r=e.getFullYear(),n=e.getMonth()+1,a=e.getDate();return r+"-"+(n<10?"0"+n:n)+"-"+(a<10?"0"+a:a)},exports.getLocaleHourMinute=function(t){-1==t.indexOf("T")&&(t=t.replace(/-/g,"/"));let e=new Date(t),r=e.getHours(),n=e.getMinutes();return(r<10?"0"+r:r)+":"+(n<10?"0"+n:n)},exports.getLocaleMonthDayHourMinte=function(t){-1==t.indexOf("T")&&(t=t.replace(/-/g,"/"));let e=new Date(t),r=e.getMonth()+1,n=e.getDate(),a=e.getHours(),o=e.getMinutes();return(r<10?"0"+r:r)+"-"+(n<10?"0"+n:n)+" "+(a<10?"0"+a:a)+":"+(o<10?"0"+o:o)},exports.getLocaleTime=function(t){-1==t.indexOf("T")&&(t=t.replace(/-/g,"/"));let e=new Date(t),r=e.getFullYear(),n=e.getMonth()+1,a=e.getDate(),o=e.getHours(),i=e.getMinutes();return r+"-"+(n<10?"0"+n:n)+"-"+(a<10?"0"+a:a)+" "+(o<10?"0"+o:o)+":"+(i<10?"0"+i:i)},exports.getRateStr=function(t){if(t)return(t=String(t)).indexOf("-")>-1?(t=t.substr(1,t.length-1),parseFloat(t).toFixed(2)):0==parseFloat(t)?0:parseFloat(t).toFixed(2)},exports.getRateUpOrDown=function(t){if(t)return String(t).indexOf("-")>-1},exports.replaceAnswerLabel=function(t){return t.replace("<answer>","").replace("</answer>","")};
