1import{_ as e,a4 as a,r as l,n as t,g as s,q as n,f as o,v as i,y as u,a9 as c,X as r,R as d,S as m,T as p,N as f,ao as g,U as v,V as b,G as h,Y as y,m as w,as as _,c as T,z as k,a5 as V,e as S,H as x,ar as Y,au as D,a7 as M,k as O,u as I,ai as L,w as C,o as U,a6 as j,aa as A,ab as F,F as E,x as P,B as W,t as N,D as R,$ as B,b as q,W as H,d as z,aV as K,ad as X,aW as Z,aX as J}from"./index-M5qy_4Wm.js";import{H as G}from"./hostAppBar-Nsn6mbm2.js";import{a as $}from"./date-CrrqCBL3.js";import{C as Q}from"./customInputNew-BA6e7JlB.js";import{C as ee}from"./customInput-CRuVXa_j.js";import{T as ae}from"./timePicker-Dw_3Eha9.js";import{g as le}from"./dateTimeFormater-C88j8ARD.js";import"./customSearch-sElyVGsZ.js";import"./drawerIcon-D6p8KgWU.js";const te=e({__name:"removeParticipant",props:{value:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:y}){const w=y,{notify:_}=g();function T(){w("update:modelValue",!1),Y()}const k=a(""),V=a("");async function S(){const{venue:e,leagueName:a}=function(e){const a=new URL(e).pathname.split("/");return{venue:a[1],leagueName:a[3]}}(V.value),l=await r(d(f("venues/".concat(e,"/event-list/league")),p("slug"),m(a))).then(e=>Object.values(e.val()||{})[0]);if(l)if(null==l?void 0:l.isOfficial){const a=await r(v("venues/watl/league/".concat(l.officialLeague,"/").concat(l.currentSeason))).then(e=>e.val());a&&function(e,a,l,t){if(!(null==l?void 0:l.standings))return _({group:"notifyMessages",type:"error",title:"League ".concat((null==a?void 0:a.title)||""," has no standings â nothing to remove")});let s,n;for(let[o,i]of Object.entries(l.standings))if(i.code===t){s=i,n=o;break}if(!n)return _({group:"notifyMessages",type:"error",title:"Participant ".concat(t," in ").concat(a.title," not found")});if(s.leagues){const l=x(s,e,a);console.log("updatedStandings",l),h(v("venues/watl/league/".concat(a.officialLeague,"/").concat(a.currentSeason,"/standings/").concat(n)),l).then(()=>{_({group:"notifyMessages",type:"success",title:"Participant ".concat(t," in ").concat(a.title," has been removed")})})}else console.log("standings single league",s),b(v("venues/watl/league/".concat(a.officialLeague,"/").concat(a.currentSeason,"/standings/").concat(n))).then(()=>{_({group:"notifyMessages",type:"success",title:"Participant ".concat(t," has been completely removed")})});for(let o=1;o<=8;o++){const t=null==l?void 0:l["Week".concat(o)];if(!(null==t?void 0:t.players))continue;const s=t.players[n];if(s)if(s.leagues){const l=x(s,e,a);console.log("updatedWeek",l),h(v("venues/watl/league/".concat(a.officialLeague,"/").concat(a.currentSeason,"/Week").concat(o,"/players/").concat(n)),l)}else console.log("weekData single league",s),b(v("venues/watl/league/".concat(a.officialLeague,"/").concat(a.currentSeason,"/Week").concat(o,"/players/").concat(n)))}}(e,l,a,k.value)}else _({group:"notifyMessages",type:"error",title:"League ".concat(a," from ").concat(e," is not official")});else _({group:"notifyMessages",type:"error",title:"League ".concat(a," from ").concat(e," not found"),text:"Please check correct league link"})}function x(e,a,l){const t=JSON.parse(JSON.stringify(e));delete t.leagues;let s=[...e.leagues,t].filter(e=>e.venue!==a||e.leagueSlug!==l.slug),n={...s[0],leagues:null};if(s.length>1){let e=s.sort((e,a)=>a.score-e.score);n={...e[0],leagues:e.slice(1)}}return n}const Y=()=>{k.value="",V.value=""};return(a,r)=>{const d=l("v-card-title"),m=l("v-icon"),p=l("v-card-text"),f=l("v-card-actions"),g=l("v-card"),v=l("v-dialog");return s(),t(v,{modelValue:e.value,"onUpdate:modelValue":r[2]||(r[2]=e=>w("update:modelValue",e))},{default:n(()=>[o(g,{tile:"",class:"wrapper"},{default:n(()=>[o(d,{class:"px-6 pt-8 cardTitle"},{default:n(()=>[...r[3]||(r[3]=[u("Remove participants from global leaderboard",-1)])]),_:1}),i("button",{class:"close",onClick:T},[o(m,{size:"24"},{default:n(()=>[...r[4]||(r[4]=[u("mdi-close",-1)])]),_:1})]),o(p,null,{default:n(()=>[i("div",null,[o(Q,{topText:"Participant code",placeholder:"EX: SL73 or TSL73",class:"mb-4",modelValue:k.value,"onUpdate:modelValue":r[0]||(r[0]=e=>k.value=e),modelModifiers:{trim:!0}},null,8,["modelValue"]),o(Q,{topText:"Sanctioned League link",placeholder:"https://axethrowing.org...",class:"leagueInput",modelValue:V.value,"onUpdate:modelValue":r[1]||(r[1]=e=>V.value=e),modelModifiers:{trim:!0}},null,8,["modelValue"]),r[5]||(r[5]=i("p",{class:"linkExample"}," EX: https://axethrowing.org/angry-birds/league/2025_official_season_2_hatchet ",-1))])]),_:1}),o(f,{class:"buttons px-4"},{default:n(()=>[o(c,{variant:"outlined",width:"120",color:"var(--clr-light-grey)",onClick:Y},{default:n(()=>[...r[6]||(r[6]=[u("clear",-1)])]),_:1}),o(c,{disabled:k.value.length<4||!V.value.length,variant:"outlined",width:"120",color:"var(--clr-light-grey)",onClick:S},{default:n(()=>[...r[7]||(r[7]=[u("remove",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}}},[["__scopeId","data-v-de2c8314"]]),se={class:"d-flex flex-column"},ne={class:"legueCompetitiorsRequirements"},oe={key:1}
1,ie=e({__name:"nonCompliantLeagues",props:{value:{type:Boolean,required:!0},season:{type:Object,required:!0},selectedYear:{type:Number,required:!0}},emits:["update:modelValue"],setup(e,{emit:g}){const b=y(),h=w(),D=g,M=e;let O=_({"watl_standard-league":4,"watl_big-axe-league":4,"watl_duals-league":2,"wktl_standard-league":4,"wktl_duals-league":2});const I=a(!1);async function L(){I.value=!0;const e=await r(x("venues")).then(e=>e.val()),a=await async function(e){let a,l=[];for(let t in b.seasonYears)b.seasonYears[t]===+M.selectedYear&&(a=t);return Object.keys(e).forEach(e=>{["watl","admin-test-test"].includes(e)||l.push(new Promise(async(l,t)=>{const s=await r(d(f("venues/".concat(e,"/event-list/league")),p("currentSeason"),m(a))).then(e=>e.val()||{});l(Object.values(s).filter(e=>e.seasonName===M.season.value&&e.isOfficial).map(a=>({...a,venue:e})))}))}),await Promise.all(l).then(e=>{let a=[];return e.filter(e=>e.length>0).forEach(e=>{a.push(...e)}),a})}(e),l=await async function(e){let a=[];return e.forEach(e=>{a.push(new Promise((a,l)=>{r(v("venues/".concat(e.venue,"/league/").concat(e.slug,"/").concat(e.currentSeason,"/standings"))).then(l=>{const t=l.val()||{},s=Object.values(t).filter(e=>e.gp>0).length;a({...e,competitors:s})})}))}),await Promise.all(a).then(e=>e.filter(e=>e.competitors>0&&e.competitors<+O["".concat(e.rules,"_").concat(e.leagueType)]))}(a);!function(e){const a=[["Venue","venue"],["Discipline","discipline"],["League","title"],["Participants","competitors"],["Link","link"]].filter(Boolean);let l="";for(let s in a)l+=a[s][0]+",";l+="\n",e.forEach(e=>{for(const t of a){let a="";a="discipline"===t[1]?h.disciplines["".concat(e.rules,"_").concat(e.leagueType)]:"link"===t[1]?"".concat("https://axethrowing.org","/").concat(e.venue,"/league/").concat(e.slug):e[t[1]],l+="".concat((""+a).replaceAll(",","").replaceAll('"',"").replaceAll("â",""),",")}l+="\n"});const t="non-compliant-leagues-".concat(M.selectedYear,"-").concat(M.season.title);Y(l,t)}(l),I.value=!1,D("update:modelValue",!1)}const C=T(()=>Object.values(O).some(e=>!e||0===+e||+e<0));function U(){D("update:modelValue",!1),O={"watl_standard-league":4,"watl_big-axe-league":4,"watl_duals-league":2,"wktl_standard-league":4,"wktl_duals-league":2}}return(a,r)=>{const d=l("v-card-title"),m=l("v-icon"),p=l("v-card-text"),f=l("v-progress-circular"),g=l("v-card-actions"),v=l("v-card"),b=l("v-dialog");return s(),t(b,{modelValue:e.value,"onUpdate:modelValue":r[5]||(r[5]=e=>D("update:modelValue",e)),class:"nonCompliantLeaguesDialog",onAfterLeave:U},{default:n(()=>[o(v,{tile:"",class:"cardWrapper"},{default:n(()=>[o(d,null,{default:n(()=>[...r[6]||(r[6]=[u("Export non-compliant leagues",-1)])]),_:1}),i("button",{class:"close",onClick:U},[o(m,{size:"24"},{default:n(()=>[...r[7]||(r[7]=[u("mdi-close",-1)])]),_:1})]),o(p,null,{default:n(()=>[i("div",se,[r[18]||(r[18]=i("p",{class:"mb-2 subTitle"},[u(" League minimums "),i("a",{href:"https://worldaxethrowingleague.com/how-to-run-a-watl-league/",target:"_blank"},"(source)")],-1)),r[19]||(r[19]=i("p",{class:"mb-2"}," The number of unique competitors required for a discipline in league to be sanctioned are: ",-1)),i("ul",ne,[i("li",{class:k({noValid:+V(O)["watl_standard-league"]<=0})},[r[8]||(r[8]=u(" Hatchet: ",-1)),o(ee,{modelValue:V(O)["watl_standard-league"],"onUpdate:modelValue":r[0]||(r[0]=e=>V(O)["watl_standard-league"]=e),modelModifiers:{number:!0},inputType:"number",class:"participantsInput"},null,8,["modelValue"]),r[9]||(r[9]=i("span",null,"participants",-1))],2),i("li",{class:k({noValid:+V(O)["watl_big-axe-league"]<=0})},[r[10]||(r[10]=u(" Big Axe: ",-1)),o(ee,{modelValue:V(O)["watl_big-axe-league"],"onUpdate:modelValue":r[1]||(r[1]=e=>V(O)["watl_big-axe-league"]=e),modelModifiers:{number:!0},inputType:"number",class:"participantsInput"},null,8,["modelValue"]),r[11]||(r[11]=i("span",null,"participants",-1))],2),i("li",{class:k({noValid:+V(O)["watl_duals-league"]<=0})},[r[12]||(r[12]=u(" Hatchet Duals: ",-1)),o(ee,{modelValue:V(O)["watl_duals-league"],"onUpdate:modelValue":r[2]||(r[2]=e=>V(O)["watl_duals-league"]=e),inputType:"number",class:"participantsInput"},null,8,["modelValue"]),r[13]||(r[13]=i("span",null,"participants",-1))],2),i("li",{class:k({noValid:+V(O)["wktl_standard-league"]<=0})},[r[14]||(r[14]=u(" Knife: ",-1)),o(ee,{modelValue:V(O)["wktl_standard-league"],"onUpdate:modelValue":r[3]||(r[3]=e=>V(O)["wktl_standard-league"]=e),modelModifiers:{number:!0},inputType:"number",class:"participantsInput"},null,8,["modelValue"]),r[15]||(r[15]=i("span",null,"participants",-1))],2),i("li",{class:k({noValid:+V(O)["wktl_duals-league"]<=0})}
1,[r[16]||(r[16]=u(" Knife Duals: ",-1)),o(ee,{modelValue:V(O)["wktl_duals-league"],"onUpdate:modelValue":r[4]||(r[4]=e=>V(O)["wktl_duals-league"]=e),modelModifiers:{number:!0},inputType:"number",class:"participantsInput"},null,8,["modelValue"]),r[17]||(r[17]=i("span",null,"participants",-1))],2)])])]),_:1}),o(g,{class:"buttons px-4"},{default:n(()=>[o(c,{variant:"outlined",width:"120",color:"var(--clr-light-grey)",disabled:C.value,onClick:L},{default:n(()=>[I.value?(s(),t(f,{key:0,color:"var(--clr-light-grey)",height:"2",indeterminate:""})):(s(),S("span",oe,"export"))]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}}},[["__scopeId","data-v-38a11059"]]),ue={class:"newContainer content"},ce={class:"d-flex justify-space-between align-center mb-6"},re={class:"seasons"},de={class:"d-flex align-center mb-6"},me={class:"tableBody"},pe={class:"d-flex flex-column"},fe={class:"dateInputs"},ge={class:"dateItem"},ve=["min","max"],be={class:"dateItem"},he={class:"dateInputs"},ye={class:"dateItem"},we=["min","max"],_e={class:"dateItem"},Te={class:"dateInputs"},ke={class:"dateItem"},Ve=["min"],Se={class:"dateItem"},xe={key:0,style:{color:"red"}},Ye={key:1,style:{color:"red"}},De=e({__name:"hostsSeasons",setup(e){z();const m=q(),p=y(),{mobile:g}=D();let v=M(!1);const b=O(),w=I();let Q=M(!1),ee=a({show:!1,season:null}),se=_({start:!0,end:!0,publish:!0,wrongOrder:!1});const ne=[{title:"Season 1",value:"Winter"},{title:"Season 2",value:"Spring"},{title:"Season 3",value:"Summer"},{title:"Season 4",value:"Fall"}],oe=T(()=>{if(v.value)return ne;{let e=w.venueSeasons[Me.value],a=Object.keys(e||{});return a.length?ne.filter(e=>!a.includes(e.value)):ne}}),De=M(!1);let Me=M(p.currentYear),Oe=(new Date).getTime();L(Oe).format("YYYY-MM-DD");const Ie=T(()=>Object.values(w.venueSeasons[Me.value]||{}).sort((e,a)=>e.dates.start<a.dates.start?-1:1).map(e=>{let a=new Date(e.dates.publish).toLocaleString("en-US",{timeZone:"America/New_York",hour12:!1}),l=new Date(e.dates.start).toLocaleString("en-US",{timeZone:"America/New_York",hour12:!1}),t=new Date(e.dates.end).toLocaleString("en-US",{timeZone:"America/New_York",hour12:!1}),s={publish:L(a).format("MMMM D, YYYY"),start:L(l).format("MMMM D, YYYY"),end:L(t).format("MMMM D, YYYY"),publishTime:Fe(a),startTime:Fe(l),endTime:Fe(t)};return{...e,dates:s}})),Le=T(()=>{const e=(new Date).getFullYear();let a=[String(e),String(e+1)],l=Object.keys(w.venueSeasons||{});return[...new Set([...a,...l])].map(e=>({title:e,value:e}))}),Ce=T(()=>{var e;return Object.keys(w.venueSeasons[Me.value]||{}).length?null==(e=oe.value[0])?void 0:e.value:"Winter"});let Ue=_({year:Me.value,value:Ce.value,start:"",end:"",publish:"",publishTime:"00:00",startTime:"00:00",endTime:"23:59"});C(()=>Me.value,e=>{Ue.year=e});const je=T(()=>![se.publish,se.start,se.end].includes(!1)&&!se.wrongOrder);function Ae(){if(function(){["publish","start","end"].forEach(e=>{se[e]=!!Ue[e].length});let e=new Date("".concat(Ue.end,", ").concat(Ue.endTime)).getTime(),a=new Date("".concat(Ue.start,", ").concat(Ue.startTime)).getTime(),l=new Date("".concat(Ue.publish,", ").concat(Ue.publishTime)).getTime();se.publish=l<=a&&l<=e,se.start=a>=l&&a<=e,se.end=e>=a&&e>=l,Ue.end.length&&Ue.start.length&&Ue.publish.length&&[se.publish,se.start,se.end].includes(!1)?se.wrongOrder=!0:se.wrongOrder=!1}(),!je.value)return;let e=ne.find(e=>e.value===Ue.value).title,a={};Pe.value.forEach(e=>{a["".concat(e.rules,"_").concat(e.leagueType)]=e.slug});let l={start:$(Ue.start,Ue.startTime),end:$(Ue.end,Ue.endTime),publish:$(Ue.publish,Ue.publishTime)},t={[Ue.value]:{title:e,value:Ue.value,dates:l,..."custom"!==w.venue.type&&{globalLeagues:a}||{}}},s="custom"!==w.venue.type?"watl":m.params.locationSlug;h(x("/".concat(w.venue.rules,"/seasons/").concat(s,"/").concat(Ue.year)),t).then(()=>{"custom"===w.venue.type||v.value||Pe.value.forEach(e=>{let a="";for(let[t,s]of Object.entries(p.seasonYears))+s===+Ue.year&&(a=t);let l={...e,currentSeason:a,currentWeek:{completed:!0,name:"Week1",type:"Round Robin"},completed:!1,date:"",time:"",pin:!1,isOfficial:!0,officialLeague:"",hide:!1,archive:!1,seasonName:Ue.value,type:"League",suffix:"",createdBy:b.user[".key"]};H(f("/venues/watl/event-list/league/"),l).then(()=>{let l={};for(let e=1;e<=7;
1e++)l["Week".concat(e)]={name:"Week".concat(e),type:"Round Robin",completed:!0};h(f("/venues/watl/league-list/".concat(e.slug,"/").concat(a)),l)})}),Q.value=!1})}function Fe(e){const a=new Date(e),l="0"+a.getHours(),t="0"+a.getMinutes();return l.slice(-2)+":"+t.slice(-2)}C(()=>Q.value,e=>{e||(Ue.value=Ce.value,Ue.year=Me.value,Ue.start="",Ue.end="",Ue.publish="",Ue.publishTime="00:00",Ue.startTime="00:00",Ue.endTime="23:59",se.start=!0,se.end=!0,se.publish=!0,se.wrongOrder=!1,v.value=!1,function(e){var a;let l=Object.keys(e[Me.value]||{});Ue.value=l.length?null==(a=oe.value[0])?void 0:a.value:"Fall"}(w.venueSeasons))});const Ee=T(()=>{let e=ne.find(e=>e.value===Ue.value).title;return{title:e,slug:e.toLowerCase().replaceAll(" ","_")}}),Pe=T(()=>[{title:"Official WKTL ".concat(Ee.value.title," ").concat(Ue.year),slug:"official_wktl_".concat(Ee.value.slug,"_").concat(Ue.year),rules:"wktl",leagueType:"standard-league",gamePlayRules:"before_2024",img:"https://firebasestorage.googleapis.com/v0/b/forged-7adb7.appspot.com/o/wktl-logo.png?alt=media&token=956e2f88-c0bf-4060-9b63-7456f412f41d"},{title:"Official WKTL Duals ".concat(Ee.value.title," ").concat(Ue.year),slug:"official_wktl_duals_".concat(Ee.value.slug,"_").concat(Ue.year),rules:"wktl",leagueType:"duals-league",gamePlayRules:"before_2024",img:"https://firebasestorage.googleapis.com/v0/b/forged-7adb7.appspot.com/o/wktl-logo.png?alt=media&token=956e2f88-c0bf-4060-9b63-7456f412f41d"},{title:"Official Hatchet ".concat(Ee.value.title," ").concat(Ue.year),slug:"official_hatchet_".concat(Ee.value.slug,"_").concat(Ue.year),rules:"watl",leagueType:"standard-league",gamePlayRules:"since_2025",img:"https://firebasestorage.googleapis.com/v0/b/forged-7adb7.appspot.com/o/global%2Fundefined%2Fplayers%2Fundefined%2FWATL-flag-graphic-butcher.webp?alt=media&token=cc34c2b3-87f1-45b5-9499-10d808ef146f"},{title:"Official Duals ".concat(Ee.value.title," ").concat(Ue.year),slug:"official_duals_".concat(Ee.value.slug,"_").concat(Ue.year),rules:"watl",leagueType:"duals-league",gamePlayRules:"since_2025",img:"https://firebasestorage.googleapis.com/v0/b/forged-7adb7.appspot.com/o/global%2Fundefined%2Fplayers%2Fundefined%2FWATL-flag-graphic-butcher.webp?alt=media&token=cc34c2b3-87f1-45b5-9499-10d808ef146f"},{title:"Official Big Axe ".concat(Ee.value.title," ").concat(Ue.year),slug:"official_big_axe_".concat(Ee.value.slug,"_").concat(Ue.year),rules:"watl",leagueType:"big-axe-league",gamePlayRules:"since_2025",img:"https://firebasestorage.googleapis.com/v0/b/forged-7adb7.appspot.com/o/global%2Fundefined%2Fplayers%2Fundefined%2FWATL-flag-graphic-butcher.webp?alt=media&token=cc34c2b3-87f1-45b5-9499-10d808ef146f"}]);async function We(e){const a=await async function(e){var a;const l=await r(d(x("/watl/players"),X(),K(5e3))).then(e=>e.val()),t=new Date(e.dates.publish).getTime(),s=new Date(e.dates.end).getTime();let n,o=(new Date).getTime();if(o>=t&&o<=s)n=s;else if(o>s){const l=ne.findIndex(a=>a.value===e.value),t=null==(a=ne[l+1])?void 0:a.value;if(t&&w.venueSeasons[Me.value][t])n=w.venueSeasons[Me.value][t].dates.start;else if(!t||t&&!w.venueSeasons[Me.value][t]){n=o+864e5}}let i=[];for(let[u,c]of Object.entries(l)){const e=le(u);e>=t&&e<=n&&i.push(c)}return i}(e),l=function(e){const a=[["Player ID","code"],["Division","division"],["First name","first"],["Last name","last"],["Full Name","fullName"],["Email","email"],["COUNTRY","country"],["STATE","state"],["Venue","venue"]].filter(Boolean);let l="";for(let t in a)l+=a[t][0]+",";return l+="\n",e.forEach(e=>{var t;for(const s of a){let a="";"code"===s[1]?a=e.code:"venue"===s[1]?a=e.venue||"":"division"===s[1]?a=e.division||"-":"first"===s[1]?a=e.first||"":"last"===s[1]?a=e.last||"":"email"===s[1]?a=e.email||"":"fullName"===s[1]?a="".concat(e.first," ").concat(e.last):"country"===s[1]?a=e.country?Z[e.country]:"":"state"===s[1]&&(a=e.state?null==(t=J[e.country])?void 0:t.split("|")[e.state]:""),l+="".concat((""+a).replaceAll(",","").replaceAll('"',"").replaceAll("â",""),",")}l+="\n"}),l}(a),t="".concat(Me.value,"_").concat(e.title);Y(l,t)}function Ne(){De.value=!0}return U(()=>{}),(e,a)=>{const r=l("v-spacer"),d=l("v-icon"),m=l("v-list-item"),f=l("v-list"),b=l("v-menu"),h=l("v-tooltip"),y=l("v-divider"),_=l("v-btn"),T=l("v-table"),x=l("v-card-title"),Y=l("v-card-text"),D=l("v-card-actions"),M=l("v-card"),O=l("v-dialog");return s(),S("div",null,[o(G,{title:"Seasons","hide-search-input":""}),i("div",ue,[i("div",ce,[a[19]||(a[19]=i("div",{class:"contentTitle"},"Season Management",-1)),o(c,{variant:"flat",class:"mr-0",onClick:a[0]||(a[0]=e=>j(Q)?Q.value=!0:Q=!0),disabled:4===Object.keys(V(w).venueSeasons[V(Me)]||{}).length},{default:n(()=>[...a[18]||(a[18]=[i("span",null,"add season",-1)])]),_:1},8,["disabled"])]),i("div",re,[i("div",de,[o(A,{items:Le.value,value:V(Me),onUpdatedSelectValue:a[1]||(a[1]=e=>j(Me)?Me.value=e:Me=e),class:"yearFilter"},null,8,["items","value"]),o(r),V(g)?(s(),t(b,{key:0},{activator:n(({props:e})=>[o(d,F(e,{class:"ml-2 text-h4",color:"#1CA4F1",icon:"mdi-information-outline"}),null,16)]),default:n(()=>[o(f,null,{default:n(()=>[o(m,null,{default:n(()=>[...a[20]||(a[20]=[i("p",null,"Commissioners can add a maximum of four seasons per year",-1),i("p",null," Commissioners can edit seasons, but only for the current year ",-1)])]),_:1})]),_:1})]),_:1})):(s(),t(h,{key:1},{activator:n(({props:e})=>[o(d,F(e,{class:"ml-2 text-h3 pointer",color:"#1CA4F1",icon:"mdi-information-outline"}),null,16)]),default:n(()=>[a[21]||(a[21]=i("p",null,"A maximum of four seasons can be added per year.",-1)),a[22]||(a[22]=i("p",null,"All dates and times are displayed in Eastern Time (ET).",-1))]),_:1}))]),o(T,{class:"seasonTable"},{default:n(()=>[a[28]||(a[28]=i("thead",{class:"tableHead"},[i("tr",null,[i("th",null,"season name"),i("th",null,"publish date"),i("th",null,"Start date"),i("th",null,"end date"),i("th",null,"actions")])],-1)),i("tbody",me,[(s(!0),S(E,null,P(Ie.value,e=>
1(s(),S("tr",null,[i("td",null,W(e.title),1),i("td",null,W(e.dates.publish),1),i("td",null,W(e.dates.start),1),i("td",null,W(e.dates.end),1),i("td",null,[o(_,{icon:""},{default:n(()=>[o(d,{color:"#0B2E7D",class:"moreIcon"},{default:n(()=>[...a[23]||(a[23]=[u(" mdi-dots-horizontal",-1)])]),_:1}),o(b,{activator:"parent",location:"bottom end",transition:"fade-transition"},{default:n(()=>[o(f,{density:"compact","min-width":"120",rounded:"lg",slim:""},{default:n(()=>[o(m,{class:"actionsItem",onClick:a=>function(e){v.value=!0,Ue.year=Me.value,Ue.value=e.value,Ue.start=L(e.dates.start).format("YYYY-MM-DD"),Ue.end=L(e.dates.end).format("YYYY-MM-DD"),Ue.publish=L(e.dates.publish).format("YYYY-MM-DD"),Ue.publishTime=e.dates.publishTime,Ue.startTime=e.dates.startTime,Ue.endTime=e.dates.endTime,Q.value=!0}(e)},{default:n(()=>[...a[24]||(a[24]=[u(" edit",-1)])]),_:1},8,["onClick"]),o(y),o(m,{class:"actionsItem",disabled:V(p).currentYear-V(Me)>2,onClick:a=>We(e)},{default:n(()=>[...a[25]||(a[25]=[u("export new players",-1)])]),_:1},8,["disabled","onClick"]),o(y),o(m,{class:"actionsItem",onClick:Ne},{default:n(()=>[...a[26]||(a[26]=[u("Remove participants from global leaderboard",-1)])]),_:1}),o(y),o(m,{class:"actionsItem",onClick:a=>function(e){ee.value.season=e,ee.value.show=!0}(e)},{default:n(()=>[...a[27]||(a[27]=[u("export non-compliant leagues",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024)])]))),256))])]),_:1})])]),o(O,{class:"seasonDialog","max-width":"700",modelValue:V(Q),"onUpdate:modelValue":a[15]||(a[15]=e=>j(Q)?Q.value=e:Q=e)},{default:n(()=>[o(M,{tile:"",class:"wrapper"},{default:n(()=>[o(x,{class:"px-6 pt-8 cardTitle"},{default:n(()=>[u(W(V(v)?"Edit":"Add")+" Season",1)]),_:1}),o(Y,null,{default:n(()=>[i("div",pe,[a[29]||(a[29]=i("label",null,"Season year",-1)),o(A,{class:"mb-5",items:[{title:V(Me),value:V(Me)}],value:V(Ue).year,disabled:V(v),onUpdatedSelectValue:a[2]||(a[2]=e=>V(Ue).year=e)},null,8,["items","value","disabled"]),a[30]||(a[30]=i("label",null,"Season name",-1)),o(A,{class:"mb-5",items:oe.value,value:V(Ue).value,disabled:V(v),onUpdatedSelectValue:a[3]||(a[3]=e=>V(Ue).value=e)},null,8,["items","value","disabled"]),i("div",fe,[i("div",ge,[i("label",{class:k({invalidDate:!V(se).publish})},"Publish Date",2),R(i("input",{class:"input mb-5 mr-2",type:"date",min:V(L)(V(Oe)).format("YYYY-MM-DD"),max:V(Ue).start,placeholder:"mm/dd/yyyy",autocomplete:"off",onInput:a[4]||(a[4]=()=>V(se).publish=!0),"onUpdate:modelValue":a[5]||(a[5]=e=>V(Ue).publish=e)},null,40,ve),[[B,V(Ue).publish]])]),i("div",be,[i("label",{class:k({invalidDate:!V(se).publish})},"Publish Time",2),o(ae,{modelValue:V(Ue).publishTime,"onUpdate:modelValue":a[6]||(a[6]=e=>V(Ue).publishTime=e),class:"mb-2"},null,8,["modelValue"])])]),i("div",he,[i("div",ye,[i("label",{class:k({invalidDate:!V(se).start})},"Start Date",2),R(i("input",{class:"input mb-5 mr-2",type:"date",min:V(Ue).publish,max:V(Ue).end,placeholder:"mm/dd/yyyy",autocomplete:"off",onInput:a[7]||(a[7]=()=>V(se).start=!0),"onUpdate:modelValue":a[8]||(a[8]=e=>V(Ue).start=e)},null,40,we),[[B,V(Ue).start]])]),i("div",_e,[i("label",{class:k({invalidDate:!V(se).publish})},"Start Time",2),o(ae,{modelValue:V(Ue).startTime,"onUpdate:modelValue":a[9]||(a[9]=e=>V(Ue).startTime=e),class:"mb-2"},null,8,["modelValue"])])]),i("div",Te,[i("div",ke,[i("label",{class:k({invalidDate:!V(se).end})},"End Date ",2),R(i("input",{class:"input mb-5 mr-2",type:"date",min:V(Ue).start,placeholder:"mm/dd/yyyy",autocomplete:"off","onUpdate:modelValue":a[10]||(a[10]=e=>V(Ue).end=e),onInput:a[11]||(a[11]=()=>V(se).end=!0)},null,40,Ve),[[B,V(Ue).end]])]),i("div",Se,[i("label",{class:k({invalidDate:!V(se).publish})},"End Time",2),o(ae,{modelValue:V(Ue).endTime,"onUpdate:modelValue":a[12]||(a[12]=e=>V(Ue).endTime=e),class:"mb-2"},null,8,["modelValue"])])]),[V(se).end,V(se).start,V(se).publish].includes(!1)&&!V(se).wrongOrder?(s(),S("p",xe," Failed "+W(V(v)?"to save changes to the season":"to add the new season")+". Ensure all fields are correctly filled and try again. ",1)):V(se).wrongOrder?(s(),S("p",Ye," Please check the dates. The start date must come after the publish date, and the end date must be later than the start date. ")):N("",!0)]),i("button",{class:"close",onClick:a[13]||(a[13]=e=>j(Q)?Q.value=!1:Q=!1)},[o(d,{size:"24"},{default:n(()=>[...a[31]||(a[31]=[u("mdi-close",-1)])]),_:1})]),o(d,F(e.props,{class:"ml-2 text-h4",color:"#1CA4F1",icon:"mdi-information-outline"}),null,16),a[32]||(a[32]=i("span",null," All dates and times are displayed in Eastern Time (ET).",-1))]),_:1}),o(D,{class:"buttons px-4"},{default:n(()=>[o(c,{variant:"outlined",width:"120",color:"var(--clr-light-grey)",onClick:a[14]||(a[14]=e=>j(Q)?Q.value=!1:Q=!1)},{default:n(()=>[...a[33]||(a[33]=[u("Cancel",-1)])]),_:1}),o(c,{variant:"flat",width:"120",onClick:Ae},{default:n(()=>
1[u(W(V(v)?"save":"add"),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),o(te,{modelValue:De.value,"onUpdate:modelValue":a[16]||(a[16]=e=>De.value=e)},null,8,["modelValue"]),o(ie,{modelValue:V(ee).show,"onUpdate:modelValue":a[17]||(a[17]=e=>V(ee).show=e),season:V(ee).season,"selected-year":V(Me)},null,8,["modelValue","season","selected-year"])])}}},[["__scopeId","data-v-a3d2a514"]]);export{De as default};
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.