PageSourceSearch

https://circle21.events/_next/static/chunks/pages/myclub/finances-6055d608902b0026.js

js circle21.events collected 2026-10-01 15:36:58 UTC 29,121 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9528],{72464:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/myclub/finances",function(){return n(323)}])},20310:function(e,t,n){"use strict";n.d(t,{Z:function(){return FetchingInterseptor}});var a=n(11527),l=n(50959),i=n(3124);function FetchingInterseptor(e){let{onIntersepting:t,height:n=100}=e,r=(0,l.useRef)(null),s=(0,i.Z)(r,{rootMargin:"0px 0px 500px 0px"});return(0,l.useEffect)(()=>{(null==s?void 0:s.isIntersecting)&&t()},[null==s?void 0:s.isIntersecting,t]),(0,a.jsx)("div",{ref:r,style:{height:n,width:100,opacity:0}})}},2247:function(e,t,n){"use strict";n.d(t,{U:function(){return l},Y:function(){return useGetMembers}});var a,l,i=n(23405),r=n(50951),s=n(17252);function useGetMembers(e,t,n,a,l,o,c,d){let u=["club_members",e,n,t,a,l,d,o,c],p=(0,i.N)(u,async i=>{let{pageParam:u}=i,p={per_page:20,page:u||1,role:t};n&&(p.keyword=n),a?"checkin"===a[0]?p.is_checked=a[1]:(p.sort=a[0],p.order=a[1]):p.is_checked="asc",null!=l&&(p.status=l),null!=d&&(p.user_id=d),o&&(p.date_from=o),c&&(p.date_to=c);let x=s.Z.stringify(p),{data:h}=await r.x1.get("/api/clubs/".concat(e,"/users?").concat(x));return h},{enabled:!!e,keepPreviousData:!0,getNextPageParam:e=>{if(e.current_page<e.last_page)return e.current_page+1}});return p}(a=l||(l={})).owner="owner",a.admin="admin",a.trainer="trainer",a.member="member",a.judge="judge"},13451:function(e,t,n){"use strict";n.d(t,{Z:function(){return ChartInfo}});var a=n(11527),l=n(92179),i=n(62585),r=n(58607),s=n(50455),o=n(16768),c=n(82187),d=n.n(c),u=n(19648);function ChartInfo(e){let{count:t,title:n,subtitle:c,countNewLine:p,list:x,style:h,className:m,prefix:g,suffix:f,separator:_=!0,withdraw:v,disqualified:y,expired:b,filterValue:j,filterOptions:Z,onFilterChange:w,decimalPlaces:S}=e;return(0,a.jsxs)(i.Z,{display:"flex",style:{flexDirection:p?"column":"row-reverse",gap:p?"24px":"16px",alignItems:p?"stretch":"center",...h},className:m,children:[(0,a.jsxs)(r.ZP,{item:!0,children:[(0,a.jsxs)(i.Z,{display:"flex",alignItems:"center",gap:2,justifyContent:"space-between",children:[n&&(0,a.jsx)(s.Z,{fontSize:"14px",fontWeight:"800",children:n}),Z&&w&&j&&(0,a.jsx)(l.Z,{isWidget:!0,theme:"dark",options:Z.map(e=>({label:e.label,value:e.value})),value:j||"",onChange:e=>w(e.target.value?[e.target.value]:[])})]}),c&&(0,a.jsx)(s.Z,{fontSize:"12px",fontWeight:"400",color:"var(--color-neutral500)",children:c})]}),!!(null==x?void 0:x.length)&&x.map((e,t)=>(0,a.jsxs)(r.ZP,{item:!0,className:d()({"pt-6 border-t border-neutral-700":_&&0===t}),children:[(0,a.jsx)(s.Z,{fontSize:"36px",fontWeight:"300",children:(0,a.jsx)(u.ZP,{decimals:S,end:e.count,prefix:g,suffix:f})}),(0,a.jsx)(s.Z,{fontSize:"12px",fontWeight:"400",color:"var(--color-neutral500)",children:e.label})]},t)),void 0!==t&&(y||v||b)?(0,a.jsx)(r.ZP,{item:!0,children:(0,a.jsxs)(s.Z,{fontSize:"36px",fontWeight:"300",display:"flex",alignItems:"center",gap:"12px",children:[(0,a.jsx)(u.ZP,{end:t}),!!v&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.Z,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:"var(--color-neutral600)"}}),(0,a.jsxs)(i.Z,{display:"flex",alignItems:"flex-end",gap:"4px",children:[(0,a.jsx)(u.ZP,{end:v}),(0,a.jsx)(s.Z,{fontSize:"14px",fontWeight:"400",color:"var(--color-neutral500)",pb:1,children:"WD"})]})]}),!!b&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.Z,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:"var(--color-neutral600)"}}),(0,a.jsxs)(i.Z,{display:"flex",alignItems:"flex-end",gap:"4px",children:[(0,a.jsx)(u.ZP,{end:b}),(0,a.jsx)(s.Z,{fontSize:"14px",fontWeight:"400",color:"var(--color-neutral500)",pb:1,children:"EX"})]})]}),!!y&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.Z,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:"var(--color-neutral600)"}}),(0,a.jsxs)(i.Z,{display:"flex",alignItems:"flex-end",gap:"4px",children:[(0,a.jsx)(u.ZP,{end:y}),(0,a.jsx)(s.Z,{fontSize:"14px",fontWeight:"400",color:"var(--color-neutral500)",pb:1,children:"DQ"})]})]})]})}):void 0!==t&&(0,a.jsx)(r.ZP,{item:!0,children:(0,a.jsx)(s.Z,{fontSize:"36px",fontWeight:"300",children:(0,a.jsx)(u.ZP,{decimals:S,end:t,prefix:g,suffix:f})})})]})}},80010:function(e,t,n){"use strict";n.d(t,{Z:function(){return useGetClubDashboard}});var a=n(34822),l=n(50951);function useGetClubDashboard(e){let{clubId:t,preventRefetch:n}=e;return(0,a.a)(["club-dashboard",t],async()=>{let{data:e}=await l.x1.get("/api/clubs/".concat(t,"/stats"),{params:{club_id:t}});return e},{enabled:!!t,refetchOnMount:!n,refetchOnWindowFocus:!n,staleTime:n?3e5:0,cacheTime:6e5})}},29368:function(e,t,n){"use strict";n.d(t,{Z:function(){return ChartWrapper}});var a=n(11527),l=n(62585);function ChartWrapper(e){let{children:t}=e;return(0,a.jsx)(l.Z,{height:"100%",px:3,py:3,borderRadius:2,sx:{backgroundColor:"var(--color-neutral750)"},children:t})}},1555:function(e,t,n){"use strict";n.d(t,{Z:function(){return ProgressStatsItem}});var a=n(11527),l=n(62585),i=n(61558);n(50959);var r=n(11237),s=n(6989),o=n(75821),c=n(92989);function ProgressStatsItem(e){var t;let{data:n,theme:d="dark",icon:u,stats:p,fontSize:x=12,stripes:h}=e,m=null!==n.maxParticipant&&void 0!==n.maxParticipant;return(0,a.jsxs)(l.Z,{mt:1.5,children:[(0,a.jsxs)(l.Z,{display:"flex",gap:1,alignItems:"center",lineHeight:"18px",mb:"
16px",children:[u,(0,a.jsxs)(l.Z,{fontSize:x,display:"flex",alignItems:"center",gap:"4px",children:[null!==(t=n.label)&&void 0!==t?t:"Not selected",(null==n?void 0:n.time)&&(0,a.jsxs)("span",{style:{marginLeft:4,color:"var(--color-neutral500)"},children:[" ",n.time]}),n.parentDivisionName&&(0,a.jsx)(c.Z,{title:"Part of: ".concat(n.parentDivisionName),children:(0,a.jsx)(l.Z,{display:"flex",alignItems:"center",children:(0,a.jsx)(o.s,{size:15,color:"dark"===d?"#fff":"#000"})})})]}),(0,a.jsx)(l.Z,{fontSize:x,marginLeft:"auto",fontWeight:"bold",display:"flex",alignItems:"center",gap:"4px",children:"number"===p?(0,a.jsx)(a.Fragment,{children:n.hideMaxParticipant?n.number:(0,a.jsxs)(a.Fragment,{children:[n.number," ",(0,a.jsx)("span",{style:{color:"var(--color-neutral500)"},children:"/"})," ",null!==n.maxParticipant&&void 0!==n.maxParticipant?(0,a.jsx)("span",{style:{color:"var(--color-neutral500)"},children:n.maxParticipant}):(0,a.jsx)(s.Yv2,{size:"14px",style:{color:"var(--color-neutral500)"}})]})}):"".concat(r.NM(n.percent,2),"%")})]}),(0,a.jsx)(i.Z,{variant:"determinate",value:n.percent,sx:{borderRadius:100,height:2,backgroundColor:"dark"===d?"#414141":"#DEDEDE","& .MuiLinearProgress-bar":{borderRadius:100,transition:"none",backgroundColor:m||!h?"dark"===d?"#DEDEDE":"#212121":"transparent",backgroundImage:!m&&h?"repeating-linear-gradient(\n            90deg,\n            ".concat("dark"===d?"#DEDEDE":"#212121"," 0 8px,\n      transparent 8px 12px\n          )"):"none",backgroundSize:"16px 100%",backgroundPosition:"0.5px 0"}}})]})}},61155:function(e,t,n){"use strict";n.d(t,{Z:function(){return ProgressStats}});var a=n(11527),l=n(50959),i=n(82363),r=n(1555),s=n(62585),o=n(50455),c=n(12949),d=n(46837),u=n(1122),p=n(96600),x=n(67904),h=n(38910);function ProgressStats(e){let{data:t,isCountry:n,theme:m="dark",fontSize:g=12,loading:f,stripes:_=!1,translate:v=!1}=e,{t:y}=(0,h.$G)(),b=(0,p.useRouter)(),j=b.query.competitionId,[Z,w]=(0,l.useState)("number"),{data:S}=(0,c.F)(),{displayCountryName:k}=(0,x.Z)(j);if(f){let e={animation:"wave",radius:4,light:"light"===m};return(0,a.jsxs)("div",{children:[(0,a.jsx)(d.Z,{...e,style:{marginTop:12},height:26}),(0,a.jsx)(d.Z,{...e,style:{marginTop:12},height:26}),(0,a.jsx)(d.Z,{...e,style:{marginTop:12},height:26}),(0,a.jsx)(d.Z,{...e,style:{marginTop:12},height:26}),(0,a.jsx)(d.Z,{...e,style:{marginTop:12},height:26}),(0,a.jsx)(d.Z,{...e,style:{marginTop:24},height:15})]})}return t.length?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.Z,{mb:"auto",flexGrow:1,children:t.map((e,t)=>{let l=n?(0,a.jsx)(u.Z,{country:e.label,size:15}):null,i=n?k(e.label):(null==S?void 0:S[e.label||"Not selected"])||e.label,s={...e,label:i};return(0,a.jsx)(r.Z,{data:s,stats:Z,icon:l,theme:m,fontSize:g,stripes:_},t)})}),(0,a.jsx)(s.Z,{mt:3,children:(0,a.jsx)(i.Z,{value:Z,onChange:w,theme:m,translate:v})})]}):(0,a.jsx)(s.Z,{display:"flex",height:"80%",width:"100%",justifyContent:"center",alignItems:"center",children:(0,a.jsx)(o.Z,{fontSize:g,children:v?y("myclub.common.progressStats.noData"):"No data available"})})}},70554:function(e,t,n){"use strict";n.d(t,{Z:function(){return RegisteredChart}});var a=n(11527),l=n(50959),i=n(43231),r=n(8476),s=n(15395),o=n(1133),c=n(70660),d=n(23728),u=n(38522),p=n(86503),x=n(46713),h=n(86041),m=n(4702),g=n(13627),f=n(40257),_=n(75091),v=n(31228),y=n(19999);function RegisteredChart(e){let{id:t,data:n,yAxisSuffix:i}=e;return(0,l.useLayoutEffect)(()=>{if(!n)return;let e=r.f.new(t),a=y.Z.new(e);e.dateFormatter.setAll({dateFormat:"MMM dd",dateFields:["valueX"]});var l,b,j=e.container.children.push(x.z.new(e,{focusable:!0,panX:!0,panY:!0,wheelX:"panX",wheelY:"zoomX",pinchZoomX:!0,paddingLeft:0,paddingBottom:0})),Z=j.xAxes.push(h.S.new(e,{maxDeviation:.5,groupData:!1,dateFormats:{day:"MMM dd"},baseInterval:{timeUnit:"day",count:1},renderer:m.n.new(e,{minGridDistance:65,minorGridEnabled:!0})}));Z.get("renderer").labels.template.setAll({fill:s.$_("#DEDEDE"),fontSize:10,paddingTop:20,paddingBottom:0}),Z.get("renderer").grid.template.setAll({stroke:s.$_("#fff"),strokeWidth:1,strokeOpacity:.2});var w=j.yAxes.push(g.m.new(e,{min:0,maxDeviation:1,renderer:f.j.new(e,{})}));w.get("renderer").labels.template.setAll(i?{visible:!0,fill:s.$_("#DEDEDE"),fontSize:10,text:"{value} ".concat(i)}:{visible:!1}),w.get("renderer").grid.template.setAll({disabled:!i,...i?{stroke:s.$_("#fff"),strokeWidth:1,strokeOpacity:.1}:{}}),a.rule("Grid",["base"]).setAll({strokeOpacity:1,stroke:s.$_("#9F9F9F"),strokeWidth:2,visible:!0}),e.setThemes([a]);let S=o.u.new(e,{pointerOrientation:"down",tooltipPosition:"pointer",keepTargetHover:!0,getFillFromSprite:!1,getStrokeFromSprite:!1,getLabelFillFromSprite:!1,autoTextColor:!1,labelText:"{valueX} : [bold]{valueY}[/]"});var k=j.series.push(_.e.new(e,{minBulletDistance:10,xAxis:Z,yAxis:w,valueYField:"value",valueXField:"date",stroke:s.$_("#fff"),showTooltipOn:"always",snapTooltip:!0,tooltip:S}));S.label.setAll({fill:s.$_("#fff"),fontSize:12}),null===(b=S.get("background"))||void 0===b||b.setAll({stroke:s.$_("#454548"),strokeOpacity:1,fill:s.$_("#343438"),fillOpacity:1}),k.strokes.template.setAll({strokeWidth:2}),k.data.processor=c.$.new(e,{dateFormat:"MMM dd",dateFields:["date"]}),k.data.setAll(n),n.length>1&&(l=new Date(n[n.length-1].date),k.events.once("datavalidated",function(){var t=Z.dateToPosition(l),n=Z.getSeriesItem(k,t,0);if(n){let t=d.W.new(e,{});t.children.push(u.T.new(e,{fill:s.$_("#fff"),rotation:45,draw:function(e){e.drawRect(-3,-3,6,6)}})),k.addBullet(n,p.g.new(e,{sprite:t}))}}));var D=j.set("cursor",v.L.new(e,{xAxis:Z}));return D.lineY.set("visible",!1),D.lineX.setAll({stroke:s.$_("#f89521"),strokeWidth:3,strokeDasharray:[]}),k.appear(1e3,100),j.appear(1e3,100),()=>{e.dispose()}},[n]),(0,a.jsx)("div",{id:t,style:{width:"100%",height:"238px"}})}i.cP("AM5C435379707")},82363:function(e,t,n){"use strict";n.d(t,{Z:function(){return StatsOptions}});var a=n(11527),l=n(50455),i=n(38910);function StatsOptions(e){let{value:t,onChange:n,theme:r="dark",fontSize:s=12,translate:o=!1}=e,{t:c}=(0,i.$G)(),d={displayAs:o?c("myclub.common.progressStats.displayAs"):"Display stats as:",percentages:o?c("myclub.common.progressStats.percentages"):"Percentages (%)",numbers:o?c("myclub.common.progressStats.numbers"):"Numbers"};return(0,a.jsxs)(l.Z,{fontSize:s,color:"var(--color-neutral500)",children:[d.displayAs," ",(0,a.jsx)(l.Z,{fontSize:s,style:{textDecoration:"underline",cursor:"pointer"},component:"a",color:"percent"===t?"dark"===r?"#fff":"#212121":void 0,onClick:()=>n("percent"),children:d.percentages})," ","|"," ",(0,a.jsx)(l.Z,{fontSize:s,style:{textDecoration:"underline",cursor:"pointer"},component:"a",color:"number"===t?"dark"===r?"#fff":"#212121":void 0,onClick:()=>n("number"),children:d.numbers})]})}},95471:function(e,t,n){"use strict";var a,l;n.d(t,{t:function(){return a}}),(l=a||(a={})).individuals="/api/export/individuals",l.individualsExcel="/api/export/excel/individuals",l.teams="/api/export/teams",l.teamsExcel="/api/export/excel/teams",l.judges="/api/export/judges",l.judgesExcel="/api/export/excel/judges",l.volunteers="/api/export/volunteers",l.volunteersExcel="/api/export/excel/volunteers",l.sponsors="/api/export/sponsors",l.leaderboard="/api/export/leaderboard",l.leaderboardAll="/api/export/leaderboard/all",l.organizationMembers="/api/export/organization-members",l.organizationMembersExcel="/api/export/excel/organization-members",l.heatDay="/api/export/heats",l.heatDayNew="/api/new/export/heats",l.heatDayOneSheet="/api/export/excel/heats",l.heatDayOneSheetNew="/api/new/export/excel/heats",l.athleteWaiwer="/api/competition-athletes/{competitionAthlete}/pdf",l.organiserWaiver="/api/organisers/{organiser}/pdf",l.ticketOrders="/api/export/excel/tickets",l.macroDay="/api/export/main-heats",l.macroDayNew="/api/new/export/main-heats",l.sections="/api/export/excel/sections",l.financeTable="/api/export/finance",l.financeTableExcel="/api/export/excel/finance",l.ticketingTable="/api/export/finance/tickets",l.ticketingTableExcel="/api/export/excel/finance/tickets",l.eventVolunteers="/api/export/organisers",l.eventVolunteersExcel="/api/export/excel/organisers",l.eventPromoCodes="/api/export/promotion-codes",l.eventPromoCodesExcel="/api/export/excel/promotion-codes",l.waitingList="/api/export/waiting-list",l.waitingListExcel="/api/export/excel/waiting-list",l.shopOrders="/api/export/shop-orders",l.shopOrdersExcel="/api/export/excel/shop-orders"},74014:function(e,t,n){"use strict";n.d(t,{Z:function(){return useExport}});var a=n(50951),l=n(88164),i=n(24341),r=n.n(i),s=n(50959),o=n(95471);function useExport(){let e=(0,s.useRef)(null),t=(0,l.D)(async t=>{let{type:n,extension:l,id:i,method:r="POST",...s}=t;
1e.current=new AbortController;let c=new Map;c.set("xlsx",{responseType:"blob"}),c.set("pdf",{responseType:"blob"});let d={...c.get(l)||{},signal:e.current.signal},u=new Map;u.set(o.t.athleteWaiwer,o.t.athleteWaiwer.replace("{competitionAthlete}",String(i)||"")),u.set(o.t.organiserWaiver,o.t.organiserWaiver.replace("{organiser}",String(i)||""));let p=u.get(n)||n;return"GET"===r?await a.x1.get(p,{...d,params:s,paramsSerializer:e=>e.config&&Array.isArray(e.config)?e.config.join("&"):Object.entries(e).filter(e=>{let[,t]=e;return null!=t&&""!==t}).map(e=>{let[t,n]=e;return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(n))}).join("&")}):await a.x1.post(p,s,d)}),n={csv:"text/csv;charset=utf-8;",xlsx:"application/octetstream",pdf:"application/pdf"},handleExport=async function(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{fileName:l=r()().format("Export DD.MM.YYYY, HH:mm"),otherParams:i,...s}=e,o=await t.mutateAsync({...s,...i}),c=e.extension||"csv",d=new Blob([o.data],{type:n[c]}),u=URL.createObjectURL(d);if(a){window.open(u,"_blank");return}let p=document.createElement("a");p.href=u,p.setAttribute("download","".concat(l,".").concat(c)),p.click()};return{handleExport,isLoading:t.isLoading,mutation:t,cancelRequest:()=>{var t;(null==e?void 0:null===(t=e.current)||void 0===t?void 0:t.abort())&&e.current.abort()}}}},29458:function(e,t,n){"use strict";n.d(t,{s:function(){return l}});var a=n(26660);let l=(0,a.Ue)(e=>({back:void 0,setBack:t=>e(()=>({back:t}))}))},65985:function(e,t,n){"use strict";n.d(t,{Z:function(){return LayoutContentHeader}});var a=n(11527),l=n(6043),i=n.n(l),r=n(11917),s=n.n(r),o=n(82187),c=n.n(o),d=n(92989),u=n(75821);function LayoutContentHeader(e){let{loading:t,children:n,actions:l,title:r,info:o,bar:p,keepTitle:x=!1,className:h}=e;return(0,a.jsxs)("div",{className:c()(s().header,{[s().noActions]:null===l,[h]:!!h}),children:[(0,a.jsx)("div",{className:s().header__loader,children:t&&(0,a.jsx)(i(),{className:s().header__loader__element,color:"#f89521"})}),p?(0,a.jsx)("div",{className:s().header__bar,children:p}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:x?s().header__title_visible:s().header__title,children:[r,o&&(0,a.jsx)(d.Z,{title:(0,a.jsx)("span",{className:"whitespace-pre-wrap text-xs",children:o}),placement:"right",children:(0,a.jsx)("span",{className:s().header__info,children:(0,a.jsx)(u.k,{size:14})})})]}),(0,a.jsx)("div",{className:c()(s().header__content,{[s().fullWidth]:!!h&&!x}),children:n}),null!==l&&(0,a.jsx)("div",{className:s().header__actions,children:l})]})]})}},323:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return F}});var a=n(11527),l=n(23405),i=n(17252),r=n(50951),s=n(96600),o=n(50959),c=n(76195),d=n(65985),u=n(20310),p=n(48691),x=n(55383),h=n(11333),m=n.n(h),g=n(58607),f=n(62585),_=n(50455),v=n(13451),y=n(29368),b=n(70554),j=n(61155),Z=n(80010),w=n(16455),S=n(74014),k=n(1984),D=n(55419),P=n(64456),M=n(2247),E=n(55911),R=n(65607),N=n(46837),C=n(26985),W=n(38910),ClubFinance=()=>{var e,t,n,h,z,F,L,A,I;let{t:T}=(0,W.$G)(),B=(0,s.useRouter)(),O=B.query.club_id,{renderCurrency:X,getCurrencySymbol:H}=(0,w.Z)(),[Y,G]=(0,o.useState)(),[$,U]=(0,o.useState)(""),[V,q]=(0,o.useState)(""),[J,Q]=(0,o.useState)(null),[K,ee]=(0,o.useState)(""),et=(0,x.N)(K,300),en=(0,M.Y)(Number(O)||void 0,void 0,et),ea=(0,o.useMemo)(()=>{var e,t;return null!==(t=null===(e=en.data)||void 0===e?void 0:e.pages.flatMap(e=>e.data))&&void 0!==t?t:[]},[en.data]),{handleExport:el,isLoading:ei,cancelRequest:er}=(0,S.Z)(),{data:es,isFetching:eo,hasNextPage:ec,fetchNextPage:ed}=function(e){let{id:t,isEnabled:n=!0,per_page:a=20,user_id:s,sort:o,sort_order:c,from:d,to:u}=e;return(0,l.N)(["club-finance",t,a,s,o,c,d,u],async e=>{let{pageParam:n=1}=e,l=i.Z.stringify({page:n,per_page:a,user_id:s,sort:o,sort_order:c,from:d,to:u},{skipNull:!0,skipEmptyString:!0}),{data:p}=await r.x1.get("api/clubs/".concat(t,"/payments?").concat(l));return p},{enabled:n&&!!t,keepPreviousData:!0,getNextPageParam:e=>e.current_page<e.last_page?e.current_page+1:void 0})}({id:Number(O)||void 0,isEnabled:!!O,user_id:(null==J?void 0:J.user_id)||void 0,sort:null==Y?void 0:Y[0],sort_order:null==Y?void 0:Y[1],from:$||void 0,to:V||void 0}),{data:eu}=(0,k.h)(Number(O)),ep=(0,o.useMemo)(()=>{var e;return null!==(e=null==es?void 0:es.pages.flatMap(e=>e.data))&&void 0!==e?e:[]},[es]),{data:ex,isFetching:eh}=(0,Z.Z)({clubId:O,preventRefetch:!0}),em=(null==ex?void 0:ex.payments)?ex.payments:void 0,[eg,ef]=(0,o.useState)(!1),e_=(0,o.useMemo)(()=>{var e;return(null!==(e=null==em?void 0:em.per_day)&&void 0!==e?e:[]).map(e=>({date:new Date(e.day),value:parseFloat(e.total_revenue)||0}))},[em]),ev=(0,o.useMemo)(()=>{var e,t,n;let a=(null!==(t=null==em?void 0:em.top_packages)&&void 0!==t?t:[]).slice(0,3),l=a.reduce((e,t)=>
1{var n;return e+(null!==(n=t.sales_count)&&void 0!==n?n:0)},0)||1,i=null!==(n=null==em?void 0:null===(e=em.total[0])||void 0===e?void 0:e.currency)&&void 0!==n?n:"";return a.map(e=>({label:e.package_name,number:e.sales_count,percent:l>0?Math.round(e.sales_count/l*100):0,hideMaxParticipant:!0,time:"".concat(X(parseFloat(e.total_revenue)||0,i))}))},[em]),ey=[{id:"member",content:T("myclub.pages.finances.table.member"),columnStyles:{minWidth:160}},{id:"email",content:T("myclub.pages.finances.table.email"),columnStyles:{minWidth:200}},{id:"package",content:T("myclub.pages.finances.table.package"),columnStyles:{minWidth:160}},{id:"price",content:T("myclub.pages.finances.table.price"),columnStyles:{minWidth:100}},{id:"created_at",content:T("myclub.pages.finances.table.paymentDate"),columnStyles:{minWidth:120}}],eb=(0,o.useMemo)(()=>ep.map((e,t)=>{var n,l,i;return{id:"".concat(e.user_id,"-").concat(e.package_id,"-").concat(t),columns:[{column:"member",content:(0,a.jsx)("span",{style:{fontWeight:"600",textTransform:"uppercase"},children:null!==(n=e.user_name)&&void 0!==n?n:"-"})},{column:"email",content:(0,a.jsx)("span",{children:null!==(l=e.user_email)&&void 0!==l?l:"-"})},{column:"package",content:(0,a.jsx)("span",{children:null!==(i=e.package_name)&&void 0!==i?i:"-"})},{column:"price",content:null!=e.price?"".concat(X(e.price,e.currency)):"-"},{column:"created_at",content:e.created_at?m()(e.created_at).format("DD.MM.YYYY."):"-"}]}}),[ep]),ej=(0,o.useCallback)(()=>{ec&&ed()},[ec,ed]),doExport=async()=>{let e="".concat(null==eu?void 0:eu.name," - ").concat(T("myclub.pages.finances.export.fileSuffix"));try{await el({type:"/api/clubs/".concat(O,"/payments/export"),method:"GET",fileName:e,otherParams:{from:$||void 0,to:V||void 0,user_id:(null==J?void 0:J.user_id)||void 0}})}catch(e){console.log(e)}},eZ=(0,o.useCallback)((e,t)=>{var n,l,i,r,s,o;return(0,a.jsxs)("li",{...e,style:{fontSize:14,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"flex",alignItems:"center",gap:8},children:[(0,a.jsx)(R.Z,{url:null!==(r=null==t?void 0:null===(n=t.user)||void 0===n?void 0:n.avatar_url)&&void 0!==r?r:void 0,name:null!==(s=null==t?void 0:null===(l=t.user)||void 0===l?void 0:l.name)&&void 0!==s?s:void 0,size:20}),(0,a.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:null!==(o=null==t?void 0:null===(i=t.user)||void 0===i?void 0:i.name)&&void 0!==o?o:""})]})},[]);return(0,o.useEffect)(()=>{$||V||J?ef(!0):ef(!1)},[$,V,J]),(0,a.jsxs)("div",{children:[(0,a.jsx)(d.Z,{title:T("myclub.pages.finances.overview.title")}),eh?(0,a.jsxs)(g.ZP,{container:!0,spacing:2,pb:2,children:[(0,a.jsx)(g.ZP,{item:!0,xs:12,sm:4,children:(0,a.jsx)(y.Z,{children:(0,a.jsxs)(f.Z,{className:"flex h-[120px] flex-col justify-between",children:[(0,a.jsx)(N.Z,{height:16,width:"50%"}),(0,a.jsx)(N.Z,{height:16,width:"35%"}),(0,a.jsx)(N.Z,{height:44,width:"45%"})]})})}),(0,a.jsx)(g.ZP,{item:!0,xs:12,sm:4,children:(0,a.jsx)(y.Z,{children:(0,a.jsxs)(f.Z,{className:"flex h-[120px] flex-col justify-between",children:[(0,a.jsx)(N.Z,{height:16,width:"50%"}),(0,a.jsx)(N.Z,{height:16,width:"35%"}),(0,a.jsx)(N.Z,{height:44,width:"45%"})]})})}),(0,a.jsx)(g.ZP,{item:!0,xs:12,sm:4,children:(0,a.jsx)(y.Z,{children:(0,a.jsxs)(f.Z,{className:"flex h-[120px] flex-col justify-between",children:[(0,a.jsx)(N.Z,{height:16,width:"50%"}),(0,a.jsx)(N.Z,{height:16,width:"35%"}),(0,a.jsx)(N.Z,{height:44,width:"45%"})]})})}),(0,a.jsx)(g.ZP,{item:!0,xs:12,lg:9,children:(0,a.jsxs)(y.Z,{children:[(0,a.jsx)(f.Z,{className:"mb-2 flex items-center justify-between",children:(0,a.jsxs)(f.Z,{className:"flex w-full flex-col gap-2",children:[(0,a.jsx)(N.Z,{height:16,width:"30%"}),(0,a.jsx)(N.Z,{height:14,width:"22%"})]})}),(0,a.jsx)(N.Z,{height:238,width:"100%"})]})}),(0,a.jsx)(g.ZP,{item:!0,xs:12,lg:3,children:(0,a.jsx)(y.Z,{children:(0,a.jsxs)(f.Z,{className:"flex min-h-[267px] flex-col",children:[(0,a.jsxs)(f.Z,{className:"mb-2 flex flex-col gap-2",children:[(0,a.jsx)(N.Z,{height:16,width:"60%"}),(0,a.jsx)(N.Z,{height:14,width:"45%"})]}),(0,a.jsxs)(f.Z,{className:"mt-2 flex flex-col gap-3",children:[(0,a.jsx)(N.Z,{height:26,width:"100%"}),(0,a.jsx)(N.Z,{height:26,width:"100%"}),(0,a.jsx)(N.Z,{height:26,width:"100%"})]})]})})})]}):em?(0,a.jsxs)(g.ZP,{container:!0,spacing:2,pb:2,children:[(0,a.jsx)(g.ZP,{item:!0,xs:12,sm:4,children:(0,a.jsx)(y.Z,{children:(0,a.jsx)(v.Z,{countNewLine:!0,count:null==em?void 0:null===(e=em.total[0])||void 0===e?void 0:e.sales_count,title:T("myclub.pages.finances.overview.totalSales"),subtitle:new Date().toLocaleDateString("en-US",{day:"numeric",month:"long"})})})}),(0,a.jsx)(g.ZP,{item:!0,xs:12,sm:4,children:(0,a.jsx)(y.Z,{children:(0,a.jsx)(v.Z,{countNewLine:!0,count:parseFloat(null==em?void 0:null===(t=em.total[0])||void 0===t?void 0:t.total_revenue)||0,decimalPlaces:2,suffix:"".concat(H(null!==(L=null==em?void 0:null===(n=em.total[0])||void 0===n?void 0:n.currency)&&void 0!==L?L:"")),title:T("myclub.pages.finances.overview.totalRevenue"),subtitle:new Date().toLocaleDateString("en-US",{day:"numeric",month:"long"})})})}),(0,a.jsx)(g.ZP,{item:!0,xs:12,sm:4,children:(0,a.jsx)(y.Z,{children:(0,a.jsx)(v.Z,{countNewLine:!0,count:parseFloat(null==em?void 0:null===(h=em.total[0])||void 0===h?void 0:h.average_sale)||0,decimalPlaces:2,suffix:"".concat(H(null!==(A=null==em?void 0:null===(z=em.total[0])||void 0===z?void 0:z.currency)&&void 0!==A?A:"")),title:T("myclub.pages.finances.overview.averageSale"),subtitle:new Date().toLocaleDateString("en-US",{day:"numeric",month:"long"})})})}),(0,a.jsx)(g.ZP,{item:!0,xs:12,lg:9,children:(0,a.jsxs)(y.Z,{children:[(0,a.jsx)(f.Z,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,children:(0,a.jsxs)(f.Z,{children:[(0,a.jsx)(_.Z,{fontSize:"14px",fontWeight:"800",children:T("myclub.pages.finances.overview.revenuePerDay")}),(0,a.jsx)(_.Z,{fontSize:"12px",fontWeight:"400",color:"var(--color-neutral500)",children:T("myclub.pages.finances.overview.dailyBreakdown")})]})}),(0,a.jsx)(b.Z,{id:"finance-revenue-per-day",data:e_,yAxisSuffix:H(null!==(I=null==em?void 0:null===(F=em.total[0])||void 0===F?void 0:F.currency)&&void 0!==I?I:"")})]})}),(0,a.jsx)(g.ZP,{item:!0,xs:12,lg:3,children:(0,a.jsx)(y.Z,{children:(0,a.jsxs)(f.Z,{height:"100%",display:"flex",flexDirection:"column",minHeight:267,children:[(0,a.jsxs)(f.Z,{mb:2,children:[(0,a.jsx)(_.Z,{fontSize:"14px",fontWeight:"800",children:T("myclub.pages.finances.overview.topPackages")}),(0,a.jsx)(_.Z,{fontSize:"12px",fontWeight:"400",color:"var(--color-neutral500)",children:T("myclub.pages.finances.overview.bySalesCount")}
1)]}),(0,a.jsx)(j.Z,{data:ev,translate:!0})]})})})]}):null,(0,a.jsx)(d.Z,{title:T("myclub.pages.finances.table.title"),actions:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(E.Z,{size:"small",theme:"light",value:J,options:ea,getOptionLabel:e=>{var t,n;return null!==(n=null==e?void 0:null===(t=e.user)||void 0===t?void 0:t.name)&&void 0!==n?n:""},isOptionEqualToValue:(e,t)=>(null==e?void 0:e.user_id)===(null==t?void 0:t.user_id),inputValue:K,onInputChange:(e,t)=>ee(t),onChange:(e,t)=>Q(t),filterOptions:e=>e,loading:en.isFetching,noOptionsText:T("myclub.pages.finances.filters.noMembersFound"),placeholder:T("myclub.pages.finances.filters.searchMember"),classes:{inputRoot:"!min-w-[180px]",option:"!text-[12px]"},renderOption:eZ}),(0,a.jsx)(p.Z,{value:$,onChange:e=>U(e.target.value),theme:"light",type:"date",size:"small",placeholder:T("myclub.pages.finances.filters.from"),keepPlaceholder:!0}),(0,a.jsx)(p.Z,{value:V,onChange:e=>q(e.target.value),theme:"light",type:"date",size:"small",placeholder:T("myclub.pages.finances.filters.to"),keepPlaceholder:!0}),(0,a.jsx)(D.Z,{variant:"outlined",onClick:()=>doExport(),loading:ei,children:(0,a.jsx)(P.D,{size:14})})]})}),0!==eb.length||eo?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.Z,{head:ey,body:eb,fetching:eo,skeleton:{rows:10,height:18}}),!eo&&(0,a.jsx)(u.Z,{onIntersepting:ej})]}):(0,a.jsx)(C.Z,{title:T("myclub.pages.finances.empty.title"),description:eg?T("myclub.pages.finances.empty.filtered"):T("myclub.pages.finances.empty.default")})]})},z=n(172);let Dashboard=()=>(0,a.jsx)(ClubFinance,{});var F=Dashboard;Dashboard.getLayout=e=>(0,a.jsx)(z.Z,{children:e})},11917:function(e){e.exports={displaySmallRegular:"style_displaySmallRegular__fjPKZ",displaySmallBold:"style_displaySmallBold__628Ny",displayXSmallBold:"style_displayXSmallBold__eJZk2",displayXSmallRegular:"style_displayXSmallRegular__Z9CSl",displayMediumRegular:"style_displayMediumRegular__gyct0",bodyLargeRegular:"style_bodyLargeRegular__B6yaY",bodyLargeBold:"style_bodyLargeBold__vJujx",bodyMediumRegular:"style_bodyMediumRegular__iLabx",bodyMediumBold:"style_bodyMediumBold__QHlh4",bodySmallRegular:"style_bodySmallRegular__XRoPX",bodySmallBold:"style_bodySmallBold__hSPCW",header__title:"style_header__title__f2ORe",header__title_visible:"style_header__title_visible__8g_UM",bodyXSmallBold:"style_bodyXSmallBold__A3suw",bodyXSmallRegular:"style_bodyXSmallRegular__A_MB9",actionLargeBold:"style_actionLargeBold__tfUaV",actionLargeMedium:"style_actionLargeMedium__TIecf",actionMediumMedium:"style_actionMediumMedium__Rwrdd",actionMediumBold:"style_actionMediumBold__my8Z1",actionMediumRegular:"style_actionMediumRegular___dyAH",actionSmallRegular:"style_actionSmallRegular__e8w0j",headerH1:"style_headerH1__z4e6J",headerRegular:"style_headerRegular__xpYs_",actionXSmallRegular:"style_actionXSmallRegular__T9X5n",actionSmallMedium:"style_actionSmallMedium__Zak4r",headingH1Bold:"style_headingH1Bold__GQLqG",headingH1Regular:"style_headingH1Regular__3Mfys",headingH2Bold:"style_headingH2Bold__DjJHE",headingH3Bold:"style_headingH3Bold___3E6f",headingH3Regular:"style_headingH3Regular__7NHyD",captionRegular:"style_captionRegular__3d9IV",header:"style_header__2CUoB",noActions:"style_noActions__7FQLL",header__content:"style_header__content__JoaLh",header__loader:"style_header__loader__2HtvV",header__loader__element:"style_header__loader__element__zadW5",header__info:"style_header__info__W_IA8",header__actions:"style_header__actions__1P1cY",header__bar:"style_header__bar__XFbo1",fullWidth:"style_fullWidth__O7oKd"}}},function(e){e.O(0,[8217,9714,9282,2734,1293,934,3871,3640,9774,2888,179],function(){return e(e.s=72464)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.