import{r as W,b as Be,n as Pe,w as Q,d as Z,i as bt,e as O,f as a,m as ie,g as Ue,h as wt,j as We,T as $e,k as qe,l as Ve,v as Ge,p as xt,q as Dt,F as kt,s as St,t as Tt,x as fe,y as Ct,z as Ot,o as te,A as le,B as S,a as D,C as X,D as oe,E as ve,c as Ke,G as Bt,H as Pt,I as Je,J as Mt,K as zt,L as At,M as It,N as _t,O as ce}from"./index-b9299550.js";import{_ as Rt}from"./Echart.vue_vue_type_script_setup_true_lang-13f48e98.js";import{o as jt,w as Lt,a as Yt,u as xe,c as K,b as Me,B as Et,m as L,n as N,d as ne,e as ee,g as Ht,r as Ft,f as Nt,h as Ut,p as ze,t as Y,i as De,j as Wt,k as Ze,l as $t,q as Qe,s as qt,v as Ae,x as ke,P as Vt,y as Gt,H as Ie,z as Se,A as _e,C as ge,D as Xe,E as Kt,F as Jt,G as et,I as Zt,J as Qt,K as Re,L as Xt,M as je,N as ea}from"./index-ed80e5da.js";import{E as ta}from"./el-card-0ae6fb5f.js";import{E as aa}from"./el-skeleton-item-246b599e.js";import{l as tt,p as oa}from"./echarts-data-3449ae3b.js";import{_ as la}from"./MemberStatisticsCard.vue_vue_type_script_setup_true_lang-a41ea762.js";import{P as na}from"./index-43a257cc.js";import{T as sa,g as ra,a as ia}from"./ToBeDone-54f82a75.js";import{c as ue}from"./permission-ffdfcbe8.js";import{f as ca}from"./formatTime-988372b6.js";import{_ as ua}from"./_plugin-vue_export-helper-1b428a4d.js";import"./member-10bd79e3.js";import"./ToBeDoneDialog-36a8b15d.js";import"./Dialog-f2c6d513.js";let da=2e3;const[ma,io]=K("config-provider"),pa=Symbol(ma),[fa,at]=K("icon"),he=ne(Z({name:fa,props:{dot:Boolean,tag:L("i"),name:String,size:N,badge:N,color:String,badgeProps:Object,classPrefix:String},setup(e,{slots:t}){const o=bt(pa,null),m=O(()=>e.classPrefix||(o==null?void 0:o.iconPrefix)||at());return()=>{const{tag:r,dot:v,name:b,size:y,badge:u,color:w}=e,i=(h=>h==null?void 0:h.includes("/"))(b);return a(Et,ie({dot:v,tag:r,class:[m.value,i?"":`${m.value}-${b}`],style:{color:w,fontSize:Me(y)},content:u},e.badgeProps),{default:()=>{var h;return[(h=t.default)==null?void 0:h.call(t),i&&a("img",{class:at("image"),src:b},null)]}})}}})),[va,ye]=K("loading"),ga=Array(12).fill(null).map((e,t)=>a("i",{class:ye("line",String(t+1))},null)),ha=a("svg",{class:ye("circular"),viewBox:"25 25 50 50"},[a("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),ot=ne(Z({name:va,props:{size:N,type:L("circular"),color:String,vertical:Boolean,textSize:N,textColor:String},setup(e,{slots:t}){const o=O(()=>ee({color:e.color},Ht(e.size))),m=()=>{const v=e.type==="spinner"?ga:ha;return a("span",{class:ye("spinner",e.type),style:o.value},[t.icon?t.icon():v])},r=()=>{var v;if(t.default)return a("span",{class:ye("text"),style:{fontSize:Me(e.textSize),color:(v=e.textColor)!=null?v:e.color}},[t.default()])};return()=>{const{type:v,vertical:b}=e;return a("div",{class:ye([v,{vertical:b}]),"aria-live":"polite","aria-busy":!0},[m(),r()])}}})),[ya,de]=K("button"),ba=ne(Z({name:ya,props:ee({},Ft,{tag:L("button"),text:String,icon:String,type:L("default"),size:L("normal"),color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,iconPrefix:String,nativeType:L("button"),loadingSize:N,loadingText:String,loadingType:String,iconPosition:L("left")}),emits:["click"],setup(e,{emit:t,slots:o}){const m=Nt(),r=()=>e.loading?o.loading?o.loading():a(ot,{size:e.loadingSize,type:e.loadingType,class:de("loading")},null):o.icon?a("div",{class:de("icon")},[o.icon()]):e.icon?a(he,{name:e.icon,class:de("icon"),classPrefix:e.iconPrefix},null):void 0,v=()=>{let u;if(u=e.loading?e.loadingText:o.default?o.default():e.text,u)return a("span",{class:de("text")},[u])},b=()=>{const{color:u,plain:w}=e;if(u){const i={color:w?u:"white"};return w||(i.background=u),u.includes("gradient")?i.border=0:i.borderColor=u,i}},y=u=>{e.loading?ze(u):e.disabled||(t("click",u),m())};return()=>{const{tag:u,type:w,size:i,block:h,round:k,plain:g,square:C,loading:E,disabled:M,hairline:_,nativeType:H,iconPosition:U}=e,V=[de([w,i,{plain:g,block:h,round:k,square:C,loading:E,disabled:M,hairline:_}]),{[Ut]:_}];return a(u,{type:H,class:V,style:b(),disabled:M,onClick:y},{default:()=>[a("div",{class:de("content")},[U==="left"&&r(),v(),U==="right"&&r()])]})}}})),wa={show:Boolean,zIndex:N,overlay:Y,duration:N,teleport:[String,Object],lockScroll:Y,lazyRender:Y,beforeClose:Function,overlayStyle:Object,overlayClass:De,transitionAppear:Boolean,closeOnClickOverlay:Y};let be=0;const lt="van-overflow-hidden";function nt(e){const t=W(!1);return Q(e,o=>{o&&(t.value=o)},{immediate:!0}),o=>()=>t.value?o():null}const st=()=>{var e;const{scopeId:t}=((e=We())==null?void 0:e.vnode)||{};return t?{[t]:""}:null},[xa,Da]=K("overlay"),ka=ne(Z({name:xa,props:{show:Boolean,zIndex:N,duration:N,className:De,lockScroll:Y,lazyRender:Y,customStyle:Object,teleport:[String,Object]},setup(e,{slots:t}){const o=W(),m=nt(()=>e.show||!e.lazyRender)(()=>{var r;const v=ee(qt(e.zIndex),e.customStyle);return Ae(e.duration)&&(v.animationDuration=`${e.duration}s`),Ve(a("div",{ref:o,style:v,class:[Da(),e.className]},[(r=t.default)==null?void 0:r.call(t)]),[[Ge,e.show]])});return Qe("touchmove",r=>{e.lockScroll&&ze(r,!0)},{target:o}),()=>{const r=a($e,{name:"van-fade",appear:!0},{default:m});return e.teleport?a(qe,{to:e.teleport},{default:()=>[r]}):r}}})),Sa=ee({},wa,{round:Boolean,position:L("center"),closeIcon:L("cross"),closeable:Boolean,transition:String,iconPrefix:String,closeOnPopstate:Boolean,closeIconPosition:L("top-right"),safeAreaInsetTop:Boolean,safeAreaInsetBottom:Boolean}),[Ta,rt]=K("popup"),it=ne(Z({name:Ta,inheritAttrs:!1,props:Sa,emits:["open","close","opened","closed","keydown","update:show","clickOverlay","clickCloseIcon"],setup(e,{emit:t,attrs:o,slots:m}){let r,v;const b=W(),y=W(),u=nt(()=>e.show||!e.lazyRender),w=O(()=>{const d={zIndex:b.value};return Ae(e.duration)&&(d[e.position==="center"?"animationDuration":"transitionDuration"]=`${e.duration}s`),d}),i=()=>{r||(r=!0,b.value=e.zIndex!==void 0?+e.zIndex:++da,t("open"))},h=()=>{r&&Gt(e.beforeClose,{done(){r=!1,t("close"),t("update:show",!1)}})},k=d=>{t("clickOverlay",d),e.closeOnClickOverlay&&h()},g=()=>{if(e.overlay)return a(ka,ie({show:e.show,class:e.overlayClass,zIndex:b.value,duration:e.duration,customStyle:e.overlayStyle,role:e.closeOnClickOverlay?"button":void 0,tabindex:e.closeOnClickOverlay?0:void 0},st(),{onClick:k}),{default:m["overlay-content"]})},C=d=>{t("clickCloseIcon",d),h()},E=()=>{if(e.closeable)return a(he,{role:"button",tabindex:0,name:e.closeIcon,class:[rt("close-icon",e.closeIconPosition),Ie],classPrefix:e.iconPrefix,onClick:C},null)};let M;const _=()=>{M&&clearTimeout(M),M=setTimeout(()=>{t("opened")})},H=()=>t("closed"),U=d=>t("keydown",d),V=u(()=>{var d;const{round:n,position:s,safeAreaInsetTop:f,safeAreaInsetBottom:P}=e;return Ve(a("div",ie({ref:y,style:w.value,role:"dialog",tabindex:0,class:[rt({round:n,[s]:s}),{"van-safe-area-top":f,"van-safe-area-bottom":P}],onKeydown:U},o,st()),[(d=m.default)==null?void 0:d.call(m),E()]),[[Ge,e.show]])}),p=()=>{const{position:d,transition:n,transitionAppear:s}=e;return a($e,{name:n||(d==="center"?"van-fade":`van-popup-slide-${d}`),appear:s,onAfterEnter:_,onAfterLeave:H},{default:V})};return Q(()=>e.show,d=>{d&&!r&&(i(),o.tabindex===0&&Pe(()=>{var n;(n=y.value)==null||n.focus()})),!d&&r&&(r=!1,t("close"))}),ke({popupRef:y}),function(d,n){const s=Wt(),f=A=>{s.move(A);const G=s.deltaY.value>0?"10":"01",J=$t(A.target,d.value),{scrollHeight:l,offsetHeight:c,scrollTop:T}=J;let x="11";T===0?x=c>=l?"00":"01":T+c>=l&&(x="10"),x==="11"||!s.isVertical()||parseInt(x,2)&parseInt(G,2)||ze(A,!0)},P=()=>{document.addEventListener("touchstart",s.start),document.addEventListener("touchmove",f,{passive:!1}),be||document.body.classList.add(lt),be++},B=()=>{be&&(document.removeEventListener("touchstart",s.start),document.removeEventListener("touchmove",f),be--,be||document.body.classList.remove(lt))},q=()=>n()&&B();Ze(()=>n()&&P()),Ue(q),wt(q),Q(n,A=>{A?P():B()})}(y,()=>e.show&&e.lockScroll),Qe("popstate",()=>{e.closeOnPopstate&&(h(),v=!1)}),Be(()=>{e.show&&i()}),xt(()=>{v&&(t("update:show",!0),v=!1)}),Ue(()=>{e.show&&e.teleport&&(h(),v=!0)}),Dt(Vt,()=>e.show),()=>e.teleport?a(qe,{to:e.teleport},{default:()=>[g(),p()]}):a(kt,null,[g(),p()])}}));K("picker-toolbar");const Ca={title:String,cancelButtonText:String,confirmButtonText:String},ct=ee({loading:Boolean,readonly:Boolean,allowHtml:Boolean,optionHeight:Se(44),showToolbar:Y,swipeDuration:Se(1e3),visibleOptionNum:Se(6)},Ca);ee({},ct,{columns:_e(),modelValue:_e(),toolbarPosition:L("top"),columnsFieldNames:Object});let we=0;const[Oa,me]=K("toast"),Ba=["show","overlay","teleport","transition","overlayClass","overlayStyle","closeOnClickOverlay","zIndex"];var ut=Z({name:Oa,props:{icon:String,show:Boolean,type:L("text"),overlay:Boolean,message:N,iconSize:N,duration:Xe(2e3),position:L("middle"),teleport:[String,Object],wordBreak:String,className:De,iconPrefix:String,transition:L("van-fade"),loadingType:String,forbidClick:Boolean,overlayClass:De,overlayStyle:Object,closeOnClick:Boolean,closeOnClickOverlay:Boolean,zIndex:N},emits:["update:show"],setup(e,{emit:t,slots:o}){let m,r=!1;const v=()=>{const h=e.show&&e.forbidClick;r!==h&&(r=h,r?(we||document.body.classList.add("van-toast--unclickable"),we++):we&&(we--,we||document.body.classList.remove("van-toast--unclickable")))},b=h=>t("update:show",h),y=()=>{e.closeOnClick&&b(!1)},u=()=>clearTimeout(m),w=()=>{const{icon:h,type:k,iconSize:g,iconPrefix:C,loadingType:E}=e;return h||k==="success"||k==="fail"?a(he,{name:h||k,size:g,class:me("icon"),classPrefix:C},null):k==="loading"?a(ot,{class:me("loading"),size:g,type:E},null):void 0},i=()=>{const{type:h,message:k}=e;return o.message?a("div",{class:me("text")},[o.message()]):Ae(k)&&k!==""?h==="html"?a("div",{key:0,class:me("text"),innerHTML:String(k)},null):a("div",{class:me("text")},[k]):void 0};return Q(()=>[e.show,e.forbidClick],v),Q(()=>[e.show,e.type,e.message,e.duration],()=>{u(),e.show&&e.duration>0&&(m=setTimeout(()=>{b(!1)},e.duration))}),Be(v),St(v),()=>a(it,ie({class:[me([e.position,e.wordBreak==="normal"?"break-normal":e.wordBreak,{[e.type]:!e.icon}]),e.className],lockScroll:!1,onClick:y,onClosed:u,"onUpdate:show":b},ge(e,Ba)),{default:()=>[w(),i()]})}});let Te=[],dt=ee({},{icon:"",type:"text",message:"",className:"",overlay:!1,onClose:void 0,onOpened:void 0,duration:2e3,teleport:"body",iconSize:void 0,iconPrefix:void 0,position:"middle",transition:"van-fade",forbidClick:!1,loadingType:void 0,overlayClass:"",overlayStyle:void 0,closeOnClick:!1,closeOnClickOverlay:!1});const Pa=new Map;function Ma(){const{instance:e,unmount:t}=function(o){const m=Tt(o),r=document.createElement("div");return document.body.appendChild(r),{instance:m.mount(r),unmount(){m.unmount(),document.body.removeChild(r)}}}({setup(){const o=W(""),{open:m,state:r,close:v,toggle:b}=function(){const u=fe({show:!1}),w=k=>{u.show=k},i=k=>{ee(u,k,{transitionAppear:!0}),w(!0)},h=()=>w(!1);return ke({open:i,close:h,toggle:w}),{open:i,close:h,state:u,toggle:w}}(),y=()=>{};return Q(o,u=>{r.message=u}),We().render=()=>a(ut,ie(r,{onClosed:y,"onUpdate:show":b}),null),{open:m,close:v,message:o}}});return e}function mt(e={}){if(!Kt)return{};const t=function(){if(!Te.length){const r=Ma();Te.push(r)}return Te[Te.length-1]}(),o=Jt(m=e)?m:{message:m};var m;return t.open(ee({},dt,Pa.get(o.type||dt.type),o)),t}ne(ut);const[za,z,ae]=K("calendar");function se(e,t){const o=e.getFullYear(),m=t.getFullYear();if(o===m){const r=e.getMonth(),v=t.getMonth();return r===v?0:r>v?1:-1}return o>m?1:-1}function $(e,t){const o=se(e,t);if(o===0){const m=e.getDate(),r=t.getDate();return m===r?0:m>r?1:-1}return o}const pe=e=>new Date(e),pt=e=>Array.isArray(e)?e.map(pe):pe(e);function Le(e,t){const o=pe(e);return o.setDate(o.getDate()+t),o}function Ye(e,t){const o=pe(e);return o.setMonth(o.getMonth()+t),o.getDate()!==e.getDate()&&o.setDate(0),o}function ft(e,t){const o=pe(e);return o.setFullYear(o.getFullYear()+t),o.getDate()!==e.getDate()&&o.setDate(0),o}const Ee=e=>Le(e,-1),He=e=>Le(e,1),vt=e=>Ye(e,-1),gt=e=>Ye(e,1),ht=e=>ft(e,-1),yt=e=>ft(e,1),Ce=()=>{const e=new Date;return e.setHours(0,0,0,0),e};ee({},ct,{modelValue:_e(),filter:Function,formatter:{type:Function,default:(e,t)=>t}});const[Aa]=K("calendar-day");var Ia=Z({name:Aa,props:{item:et(Object),color:String,index:Number,offset:Xe(0),rowHeight:String},emits:["click","clickDisabledDate"],setup(e,{emit:t,slots:o}){const m=O(()=>{var u;const{item:w,index:i,color:h,offset:k,rowHeight:g}=e,C={height:g};if(w.type==="placeholder")return C.width="100%",C;if(i===0&&(C.marginLeft=100*k/7+"%"),h)switch(w.type){case"end":case"start":case"start-end":case"multiple-middle":case"multiple-selected":C.background=h;break;case"middle":C.color=h}return k+(((u=w.date)==null?void 0:u.getDate())||1)>28&&(C.marginBottom=0),C}),r=()=>{e.item.type!=="disabled"?t("click",e.item):t("clickDisabledDate",e.item)},v=()=>{const{topInfo:u}=e.item;if(u||o["top-info"])return a("div",{class:z("top-info")},[o["top-info"]?o["top-info"](e.item):u])},b=()=>{const{bottomInfo:u}=e.item;if(u||o["bottom-info"])return a("div",{class:z("bottom-info")},[o["bottom-info"]?o["bottom-info"](e.item):u])},y=()=>{const{item:u,color:w,rowHeight:i}=e,{type:h}=u,k=[v(),o.text?o.text(e.item):e.item.text,b()];return h==="selected"?a("div",{class:z("selected-day"),style:{width:i,height:i,background:w}},[k]):k};return()=>{const{type:u,className:w}=e.item;return u==="placeholder"?a("div",{class:z("day"),style:m.value},null):a("div",{role:"gridcell",style:m.value,class:[z("day",u),w],tabindex:u==="disabled"?void 0:-1,onClick:r},[y()])}}});const[_a]=K("calendar-month");var Ra=Z({name:_a,props:{date:et(Date),type:String,color:String,minDate:Date,maxDate:Date,showMark:Boolean,rowHeight:N,formatter:Function,lazyRender:Boolean,currentDate:[Date,Array],allowSameDay:Boolean,showSubtitle:Boolean,showMonthTitle:Boolean,firstDayOfWeek:Number},emits:["click","clickDisabledDate"],setup(e,{emit:t,slots:o}){const[m,r]=Zt(),v=W(),b=W(),y=((p,d)=>{const n=W(),s=()=>{n.value=xe(p).height};return Be(()=>{if(Pe(s),d)for(let f=1;f<=3;f++)setTimeout(s,100*f)}),jt(()=>Pe(s)),Q([Lt,Yt],s),n})(b),u=O(()=>{return p=e.date,ae("monthTitle",p.getFullYear(),p.getMonth()+1);var p}),w=O(()=>Me(e.rowHeight)),i=O(()=>{const p=e.date.getDate(),d=(e.date.getDay()-p%7+8)%7;return e.firstDayOfWeek?(d+7-e.firstDayOfWeek)%7:d}),h=O(()=>{return p=e.date.getFullYear(),d=e.date.getMonth()+1,32-new Date(p,d-1,32).getDate();var p,d}),k=O(()=>m.value||!e.lazyRender),g=p=>{const{type:d,minDate:n,maxDate:s,currentDate:f}=e;if(n&&$(p,n)<0||s&&$(p,s)>0)return"disabled";if(f===null)return"";if(Array.isArray(f)){if(d==="multiple")return(P=>{const B=q=>e.currentDate.some(A=>$(A,q)===0);if(B(P)){const q=Ee(P),A=He(P),G=B(q),J=B(A);return G&&J?"multiple-middle":G?"end":J?"start":"multiple-selected"}return""})(p);if(d==="range")return(P=>{const[B,q]=e.currentDate;if(!B)return"";const A=$(P,B);if(!q)return A===0?"start":"";const G=$(P,q);return e.allowSameDay&&A===0&&G===0?"start-end":A===0?"start":G===0?"end":A>0&&G<0?"middle":""})(p)}else if(d==="single")return $(p,f)===0?"selected":"";return""},C=p=>{if(e.type==="range"){if(p==="start"||p==="end")return ae(p);if(p==="start-end")return`${ae("start")}/${ae("end")}`}},E=()=>{if(e.showMonthTitle)return a("div",{class:z("month-title")},[o["month-title"]?o["month-title"]({date:e.date,text:u.value}):u.value])},M=()=>{if(e.showMark&&k.value)return a("div",{class:z("month-mark")},[e.date.getMonth()+1])},_=O(()=>{const p=Math.ceil((h.value+i.value)/7);return Array(p).fill({type:"placeholder"})}),H=O(()=>{const p=[],d=e.date.getFullYear(),n=e.date.getMonth();for(let s=1;s<=h.value;s++){const f=new Date(d,n,s),P=g(f);let B={date:f,type:P,text:s,bottomInfo:C(P)};e.formatter&&(B=e.formatter(B)),p.push(B)}return p}),U=O(()=>H.value.filter(p=>p.type==="disabled")),V=(p,d)=>a(Ia,{item:p,index:d,color:e.color,offset:i.value,rowHeight:w.value,onClick:n=>t("click",n),onClickDisabledDate:n=>t("clickDisabledDate",n)},ge(o,["top-info","bottom-info","text"]));return ke({getTitle:()=>u.value,getHeight:()=>y.value,setVisible:r,scrollToDate:(p,d)=>{if(v.value){const n=xe(v.value),s=_.value.length,f=(Math.ceil((d.getDate()+i.value)/7)-1)*n.height/s;Qt(p,n.top+f+p.scrollTop-xe(p).top)}},disabledDays:U}),()=>a("div",{class:z("month"),ref:b},[E(),a("div",{ref:v,role:"grid",class:z("days")},[M(),(k.value?H:_).value.map(V)])])}});const[ja]=K("calendar-header");var La=Z({name:ja,props:{date:Date,minDate:Date,maxDate:Date,title:String,subtitle:String,showTitle:Boolean,showSubtitle:Boolean,firstDayOfWeek:Number,switchMode:L("none")},emits:["clickSubtitle","panelChange"],setup(e,{slots:t,emit:o}){const m=O(()=>e.date&&e.minDate&&se(vt(e.date),e.minDate)<0),r=O(()=>e.date&&e.minDate&&se(ht(e.date),e.minDate)<0),v=O(()=>e.date&&e.maxDate&&se(gt(e.date),e.maxDate)>0),b=O(()=>e.date&&e.maxDate&&se(yt(e.date),e.maxDate)>0),y=()=>{if(e.showTitle){const g=e.title||ae("title"),C=t.title?t.title():g;return a("div",{class:z("header-title")},[C])}},u=g=>o("clickSubtitle",g),w=g=>o("panelChange",g),i=g=>{const C=e.switchMode==="year-month",E=t[g?"next-month":"prev-month"],M=t[g?"next-year":"prev-year"],_=g?v.value:m.value,H=g?b.value:r.value,U=g?"arrow":"arrow-left",V=g?"arrow-double-right":"arrow-double-left",p=a("view",{class:z("header-action",{disabled:_}),onClick:_?void 0:()=>w((g?gt:vt)(e.date))},[E?E({disabled:_}):a(he,{class:{[Ie]:!_},name:U},null)]),d=C&&a("view",{class:z("header-action",{disabled:H}),onClick:H?void 0:()=>w((g?yt:ht)(e.date))},[M?M({disabled:H}):a(he,{class:{[Ie]:!H},name:V},null)]);return g?[p,d]:[d,p]},h=()=>{if(e.showSubtitle){const g=t.subtitle?t.subtitle({date:e.date,text:e.subtitle}):e.subtitle,C=e.switchMode!=="none";return a("div",{class:z("header-subtitle",{"with-swicth":C}),onClick:u},[C?[i(),a("div",{class:z("header-subtitle-text")},[g]),i(!0)]:g])}},k=()=>{const{firstDayOfWeek:g}=e,C=ae("weekdays"),E=[...C.slice(g,7),...C.slice(0,g)];return a("div",{class:z("weekdays")},[E.map(M=>a("span",{class:z("weekday")},[M]))])};return()=>a("div",{class:z("header")},[y(),h(),k()])}}),Ya=Z({name:za,props:{show:Boolean,type:L("single"),switchMode:L("none"),title:String,color:String,round:Y,readonly:Boolean,poppable:Y,maxRange:Se(null),position:L("bottom"),teleport:[String,Object],showMark:Y,showTitle:Y,formatter:Function,rowHeight:N,confirmText:String,rangePrompt:String,lazyRender:Y,showConfirm:Y,defaultDate:[Date,Array],allowSameDay:Boolean,showSubtitle:Y,closeOnPopstate:Y,showRangePrompt:Y,confirmDisabledText:String,closeOnClickOverlay:Y,safeAreaInsetTop:Boolean,safeAreaInsetBottom:Y,minDate:{type:Date,validator:Re},maxDate:{type:Date,validator:Re},firstDayOfWeek:{type:N,default:0,validator:e=>e>=0&&e<=6}},emits:["select","confirm","unselect","monthShow","overRange","update:show","clickSubtitle","clickDisabledDate","panelChange"],setup(e,{emit:t,slots:o}){const m=O(()=>e.switchMode!=="none"),r=O(()=>e.minDate||m.value?e.minDate:Ce()),v=O(()=>e.maxDate||m.value?e.maxDate:Ye(Ce(),6)),b=(l,c=r.value,T=v.value)=>c&&$(l,c)===-1?c:T&&$(l,T)===1?T:l,y=(l=e.defaultDate)=>{const{type:c,allowSameDay:T}=e;if(l===null)return l;const x=Ce();if(c==="range"){Array.isArray(l)||(l=[]),l.length===1&&$(l[0],x)===1&&(l=[]);const F=r.value,I=v.value;return[b(l[0]||x,F,I?T?I:Ee(I):void 0),b(l[1]||(T?x:He(x)),F?T?F:He(F):void 0)]}return c==="multiple"?Array.isArray(l)?l.map(F=>b(F)):[b(x)]:(l&&!Array.isArray(l)||(l=x),b(l))};let u;const w=W(),i=W(y()),h=W((()=>(Array.isArray(i.value)?i.value[0]:i.value)||b(Ce()))()),k=W(),[g,C]=Xt(),E=O(()=>e.firstDayOfWeek?+e.firstDayOfWeek%7:0),M=O(()=>{const l=[];if(!r.value||!v.value)return l;const c=new Date(r.value);c.setDate(1);do l.push(new Date(c)),c.setMonth(c.getMonth()+1);while(se(c,v.value)!==1);return l}),_=O(()=>{if(i.value){if(e.type==="range")return!i.value[0]||!i.value[1];if(e.type==="multiple")return!i.value.length}return!i.value}),H=()=>{const l=ea(w.value),c=l+u,T=M.value.map((R,j)=>g.value[j].getHeight());if(c>T.reduce((R,j)=>R+j,0)&&l>0)return;let x,F=0;const I=[-1,-1];for(let R=0;R=l&&(I[1]=R,x||(x=j,I[0]=R),g.value[R].showed||(g.value[R].showed=!0,t("monthShow",{date:j.date,title:j.getTitle()}))),F+=T[R]}M.value.forEach((R,j)=>{const re=j>=I[0]-1&&j<=I[1]+1;g.value[j].setVisible(re)}),x&&(k.value=x)},U=l=>{m.value?h.value=l:je(()=>{M.value.some((c,T)=>se(c,l)===0&&(w.value&&g.value[T].scrollToDate(w.value,l),!0)),H()})},V=()=>{if(!e.poppable||e.show)if(i.value){const l=e.type==="single"?i.value:i.value[0];Re(l)&&U(l)}else m.value||je(H)},p=()=>{e.poppable&&!e.show||(m.value||je(()=>{u=Math.floor(xe(w).height)}),V())},d=(l=y())=>{i.value=l,V()},n=l=>{h.value=l,t("panelChange",{date:l})},s=()=>{var l;return t("confirm",(l=i.value)!=null?l:pt(i.value))},f=(l,c)=>{const T=x=>{i.value=x,t("select",pt(x))};if(c&&e.type==="range"&&!(F=>{const{maxRange:I,rangePrompt:R,showRangePrompt:j}=e;return!(I&&function(re){const Oe=re[0].getTime();return(re[1].getTime()-Oe)/864e5+1}(F)>+I&&(j&&mt(R||ae("rangePrompt",I)),t("overRange"),1))})(l))return void T([l[0],Le(l[0],+e.maxRange-1)]);T(l),c&&!e.showConfirm&&s()},P=O(()=>g.value.reduce((l,c)=>{var T,x;return l.push(...(x=(T=c.disabledDays)==null?void 0:T.value)!=null?x:[]),l},[])),B=l=>{if(e.readonly||!l.date)return;const{date:c}=l,{type:T}=e;if(T==="range"){if(!i.value)return void f([c]);const[x,F]=i.value;if(x&&!F){const I=$(c,x);if(I===1){const R=((j,re,Oe)=>{var Fe;return(Fe=j.find(Ne=>$(re,Ne.date)===-1&&$(Ne.date,Oe)===-1))==null?void 0:Fe.date})(P.value,x,c);if(R){const j=Ee(R);$(x,j)===-1?f([x,j]):f([c])}else f([x,c],!0)}else I===-1?f([c]):e.allowSameDay&&f([c,c],!0)}else f([c])}else if(T==="multiple"){if(!i.value)return void f([c]);const x=i.value,F=x.findIndex(I=>$(I,c)===0);if(F!==-1){const[I]=x.splice(F,1);t("unselect",pe(I))}else e.maxRange&&x.length>=+e.maxRange?mt(e.rangePrompt||ae("rangePrompt",e.maxRange)):f([...x,c])}else f(c,!0)},q=l=>t("update:show",l),A=(l,c)=>{const T=c!==0||!e.showSubtitle;return a(Ra,ie({ref:m.value?k:C(c),date:l,currentDate:i.value,showMonthTitle:T,firstDayOfWeek:E.value,lazyRender:!m.value&&e.lazyRender,maxDate:v.value,minDate:r.value},ge(e,["type","color","showMark","formatter","rowHeight","showSubtitle","allowSameDay"]),{onClick:B,onClickDisabledDate:x=>t("clickDisabledDate",x)}),ge(o,["top-info","bottom-info","month-title","text"]))},G=()=>{if(o.footer)return o.footer();if(e.showConfirm){const l=o["confirm-text"],c=_.value,T=c?e.confirmDisabledText:e.confirmText;return a(ba,{round:!0,block:!0,type:"primary",color:e.color,class:z("confirm"),disabled:c,nativeType:"button",onClick:s},{default:()=>[l?l({disabled:c}):T||ae("confirm")]})}},J=()=>{var l,c;return a("div",{class:z()},[a(La,{date:(l=k.value)==null?void 0:l.date,maxDate:v.value,minDate:r.value,title:e.title,subtitle:(c=k.value)==null?void 0:c.getTitle(),showTitle:e.showTitle,showSubtitle:e.showSubtitle,switchMode:e.switchMode,firstDayOfWeek:E.value,onClickSubtitle:T=>t("clickSubtitle",T),onPanelChange:n},ge(o,["title","subtitle","prev-month","prev-year","next-month","next-year"])),a("div",{ref:w,class:z("body"),onScroll:m.value?void 0:H},[m.value?A(h.value,0):M.value.map(A)]),a("div",{class:[z("footer"),{"van-safe-area-bottom":e.safeAreaInsetBottom}]},[G()])])};return Q(()=>e.show,p),Q(()=>[e.type,e.minDate,e.maxDate,e.switchMode],()=>d(y(i.value))),Q(()=>e.defaultDate,l=>{d(l)}),ke({reset:d,scrollToDate:U,getSelectedDate:()=>i.value}),Ze(p),()=>e.poppable?a(it,{show:e.show,class:z("popup"),round:e.round,position:e.position,closeable:e.showTitle||e.showSubtitle,teleport:e.teleport,closeOnPopstate:e.closeOnPopstate,safeAreaInsetTop:e.safeAreaInsetTop,closeOnClickOverlay:e.closeOnClickOverlay,"onUpdate:show":q},{default:J}):J()}});const Ea=ne(Ya),Ha={class:"h-3 flex justify-between items-center"},Fa={key:0,class:"!w-240px flex"},Na={class:"h-3 flex justify-between items-center"},Ua={class:"h-3 flex justify-between items-center"},Wa={class:"h-3 flex justify-between items-center"},$a=Z({name:"Home",__name:"Index",setup(e){const{t}=Pt(),o=Ct(),m=O(()=>o.getMobile),r=W(null),v=Ot(()=>{r.value.getList()},1e3),b=W(!0),y=fe({orderTime:"",orderStatrTime:"",orderEndTime:"",mobileOrderTimeShow:!1}),u=O(()=>ue(["sale:merchant-apply:query"])||ue(["product:spuApply:query"])),w=O(()=>ue(["trade:order:query"])),i=O(()=>ue(["distri:pt-profit:query"])),h=O(()=>ue(["distri:consumption-top-up-log:ptTopUpWithUserTopUpList"])),k=O(()=>ue(["statistics:member:query"]));let g;function C(n){g=n}const E=new Date(2024,5,12);let M=fe(tt);const _=async(n,s)=>{const f=await ra({startTime:n,endTime:s});_t(M,"xAxis.data",f.xaxis.data);const P=f==null?void 0:f.series.map(B=>({count:B.count,value:B.money/100}));M.series[0].data=P,g&&g.setOption(M,!0)};function H(n){y.orderStatrTime=n[0],y.orderEndTime=n[1],_(y.orderStatrTime,y.orderEndTime)}function U(){y.mobileOrderTimeShow=!0}function V(n){y.mobileOrderTimeShow=!1,y.orderStatrTime=Je(n[0]).format("YYYY-MM-DD"),y.orderEndTime=Je(n[1]).format("YYYY-MM-DD"),_(y.orderStatrTime,y.orderEndTime)}const p=fe(oa),d=fe({title:{text:"",left:"center",top:"2%"},dataset:{dimensions:["date","consumptionPoints"],source:[]},legend:{show:!1},series:[{name:"\u603B\u989D",type:"line",smooth:!0,areaStyle:null}],tooltip:{trigger:"axis",axisPointer:{type:"cross"},formatter:n=>{const s=n[0].data.consumptionPoints;return`${t("form.dates")}: ${n[0].name}
${t("workplace.topUpAmountOnTheDay")}: \uFFE5${s}`}},xAxis:{type:"category",boundaryGap:!1,axisTick:{show:!1},axisLabel:{formatter:n=>ca(n,"MM-DD")}},yAxis:{axisTick:{show:!1},axisLabel:{margin:2,formatter:function(n,s){return n>=1e4&&n<1e7?n=n/1e4+"\u4E07":n>=1e7&&(n=n/1e7+"\u5343\u4E07"),n}},nameGap:30},grid:{left:35},dataZoom:[{type:"inside",start:0,end:100,zoomOnMouseWheel:"shift",moveOnMouseMove:!0,moveOnMouseWheel:!0}],axisPointer:{type:"none"}});return(async()=>{const n=[];w.value&&n.push(_()),i.value&&n.push((async()=>{const s=await na.getPtProfitPage({pageNo:1,pageSize:10});p.series[0].data=[{value:ce(s==null?void 0:s.list[0].profit),name:"\u5229\u6DA6(\u7852\u6CFD\u6E90)"},{value:ce(s==null?void 0:s.list[0].ptTotalAdd),name:"\u5E73\u53F0\u603B\u6536\u5165"},{value:ce(s==null?void 0:s.list[0].ptAdd),name:"\u5E73\u53F0\u670D\u52A1\u8D39"},{value:ce(s==null?void 0:s.list[0].ptGrossAdd),name:"\u5E73\u53F0\u5B58\u4F59"}]})()),h.value&&n.push((async()=>{const s=await ia();if(d.dataset&&d.dataset.source){const f=s.topUpList.length;s.topUpList.slice(Math.max(f-7,0)),d.title.text=`${t("common.total")}: \uFFE5${ce(s.totalConsumptionPoints)}`,d.dataset.source=s.topUpList.map(P=>({date:P.date,consumptionPoints:ce(P.consumptionPoints)})),f>7&&(d.dataZoom[0].start=(f-7)/f*100)}})()),n.length>0&&await Promise.any(n),b.value=!1})(),(n,s)=>{const f=aa,P=ta,B=Mt,q=zt,A=At,G=Ea,J=Rt,l=It;return te(),le(l,{class:"mt-8px",gutter:8,justify:"space-between"},{default:S(()=>[D(u)?(te(),le(B,{key:0,xl:12,lg:12,md:24,sm:24,xs:24,class:"mb-8px"},{default:S(()=>[a(P,{shadow:"never"},{header:S(()=>[X("div",{class:"h-3 flex justify-between items-center cursor-pointer",onClick:s[0]||(s[0]=(...c)=>D(v)&&D(v)(...c))},[X("span",null,oe(D(t)("workplace.toDo")),1)])]),default:S(()=>[a(f,{loading:D(b),animated:""},{default:S(()=>[a(sa,{ref_key:"toBeDoneRef",ref:r},null,512)]),_:1},8,["loading"])]),_:1})]),_:1})):ve("",!0),D(w)?(te(),le(B,{key:1,xl:12,lg:12,md:24,sm:24,xs:24,class:"mb-8px"},{default:S(()=>[a(P,{shadow:"never"},{header:S(()=>[X("div",Ha,[X("span",null,oe(D(t)("workplace.order")),1),D(m)?!D(m)||D(y).orderStatrTime||D(y).orderEndTime?(te(),Ke("span",{key:2,style:{"font-size":"14px"},onClick:U},oe(D(y).orderStatrTime)+" - "+oe(D(y).orderEndTime),1)):(te(),le(A,{key:1,onClick:U},{default:S(()=>[Bt(oe(D(t)("analysis.selectDate")),1)]),_:1})):(te(),Ke("div",Fa,[a(q,{modelValue:D(y).orderTime,"onUpdate:modelValue":s[1]||(s[1]=c=>D(y).orderTime=c),"value-format":"YYYY-MM-DD",type:"daterange","start-placeholder":D(t)("analysis.startDate"),"end-placeholder":D(t)("analysis.endDate"),"default-time":[new Date("1"),new Date("1")],onChange:H},null,8,["modelValue","start-placeholder","end-placeholder","default-time"])])),a(G,{show:D(y).mobileOrderTimeShow,"onUpdate:show":s[2]||(s[2]=c=>D(y).mobileOrderTimeShow=c),type:"range","min-date":D(E),onConfirm:V},null,8,["show","min-date"])])]),default:S(()=>[a(f,{loading:D(b),animated:""},{default:S(()=>[a(l,null,{default:S(()=>[a(B,null,{default:S(()=>[a(f,{loading:D(b),animated:""},{default:S(()=>[a(J,{options:D(tt),height:250,onChartInit:C},null,8,["options"])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1},8,["loading"])]),_:1})]),_:1})):ve("",!0),D(i)?(te(),le(B,{key:2,xl:12,lg:12,md:24,sm:24,xs:24,class:"mb-8px"},{default:S(()=>[a(P,{shadow:"never"},{header:S(()=>[X("div",Na,[X("span",null,oe(D(t)("workplace.ptProfit")),1)])]),default:S(()=>[a(f,{loading:D(b),animated:""},{default:S(()=>[a(l,null,{default:S(()=>[a(B,null,{default:S(()=>[a(f,{loading:D(b),animated:""},{default:S(()=>[a(J,{options:D(p),height:280},null,8,["options"])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1},8,["loading"])]),_:1})]),_:1})):ve("",!0),D(k)?(te(),le(B,{key:3,xl:12,lg:12,md:24,sm:24,xs:24,class:"mb-8px"},{default:S(()=>[a(P,{shadow:"never"},{header:S(()=>[X("div",Ua,[X("span",null,oe(D(t)("workplace.numberOfConsumers")),1)])]),default:S(()=>[a(f,{loading:D(b),animated:""},{default:S(()=>[a(l,null,{default:S(()=>[a(B,null,{default:S(()=>[a(la)]),_:1})]),_:1})]),_:1},8,["loading"])]),_:1})]),_:1})):ve("",!0),D(h)?(te(),le(B,{key:4,xl:12,lg:12,md:24,sm:24,xs:24,class:"mb-8px"},{default:S(()=>[a(P,{shadow:"never"},{header:S(()=>[X("div",Wa,[X("span",null,oe(D(t)("workplace.topUp")),1)])]),default:S(()=>[a(f,{loading:D(b),animated:""},{default:S(()=>[a(l,null,{default:S(()=>[a(B,null,{default:S(()=>[a(J,{height:300,options:D(d)},null,8,["options"])]),_:1})]),_:1})]),_:1},8,["loading"])]),_:1})]),_:1})):ve("",!0)]),_:1})}}}),qa=ua($a,[["__scopeId","data-v-954b2acd"]]);export{qa as default};