import{ax as s}from"./index.js";const a="http://rep.report.caixiao365.com/admin/Everyday/",y=(t={})=>s.request("post",`${a}departEveryDay`,{data:t}),l=(t={})=>s.request("post",`${a}departEveryMonth`,{data:t}),d=(t={})=>s.request("post",`${a}companyEveryMonth`,{data:t}),f=(t={})=>s.request("post",`${a}companyEvery`,{data:t});function p(t,i){let r,e,n;try{r=t.toString().split(".")[1].length}catch{r=0}try{e=i.toString().split(".")[1].length}catch{e=0}return n=Math.pow(10,Math.max(r,e)),(t*n+i*n)/n}function h(t,i){let r=0,e=0,n,o;try{r=t.toString().split(".")[1].length}catch{}try{e=i.toString().split(".")[1].length}catch{}return n=Number(t.toString().replace(".","")),o=Number(i.toString().replace(".","")),u(n/o,Math.pow(10,e-r))}function u(t,i){let r=0,e=t.toString(),n=i.toString();try{r+=e.split(".")[1].length}catch{}try{r+=n.split(".")[1].length}catch{}return Number(e.replace(".",""))*Number(n.replace(".",""))/Math.pow(10,r)}function g(t,i){let r,e,n,o;try{r=t.toString().split(".")[1].length}catch{r=0}try{e=i.toString().split(".")[1].length}catch{e=0}return n=Math.pow(10,Math.max(r,e)),o=r>=e?r:e,((t*n-i*n)/n).toFixed(o)}function b(t){return t==="NaN"||Number(t)===0?"0":t<1e3&&t>0||t<0&&t>-1e3?t:h(t,1e4).toFixed(2)+"W"}function M(t){const i=Object.keys(t[0]);return t.reduce((r,e)=>i.reduce((n,o)=>({...n,[o]:p(r[o]||0,e[o])}),{}),{})}function S(t){return t?Number(t).toFixed(2):0}export{p as a,f as b,M as c,h as d,y as e,l as f,S as g,d as h,u as m,g as s,b as u};
