PageSourceSearch

https://axethrowing.org/assets/playoffScheduling-legacy-C6iIjScK.js

js axethrowing.org collected 2026-09-24 11:42:00 UTC 7,691 bytes, 1 lines download raw bytes

1System.register(["./index-legacy-BtJkYB7P.js"],function(e,t){"use strict";var i,a,r,s,n,o,l,h,g;return{setters:[e=>{i=e.u,a=e.X,r=e.Y,s=e.ad,n=e.W,o=e.T,l=e.E,h=e.V,g=e.k}],execute:function(){e("p",{setup:()=>({eventStore:r(),generalStore:g()}),methods:{convertRoundToNumber:e=>parseInt(e.substring(1))+1,verifyIfGameCanBeCreated(e,t,i,a,r){const s=o(`${this.dblocation}/${e}${t}/${i}/${a}`);n(s).then(t=>{let s=t.val();s.player1&&s.player2&&this.createGame("On Standby",s.player1,s.player2,e,r,i,a,"Cage 1")})},createGame(e,t,i,a,r,s,n,g){void 0===t.rank&&(t.rank=0),void 0===i.rank&&(i.rank=0),h(o(`${this.dblocation}/game-list`),{player1:{playerid:t.playerid,first:t.first,last:t.last,alias:t.alias,pic:t.pic,team:t.team||{logo:"none",name:"No Team"},rank:t.rank,seedPosition:t.seedPosition,division:t.division||"amateur",wktlDivision:t.wktlDivision||"recreational"},player2:{playerid:i.playerid,first:i.first,last:i.last,alias:i.alias,pic:i.pic,team:i.team||{logo:"none",name:"No Team"},rank:i.rank,seedPosition:i.seedPosition,division:i.division||"amateur",wktlDivision:i.wktlDivision||"recreational"},type:"playoff",bracket:a,bracketSide:r,bracketRound:s,bracketGame:n,arena:g,status:e}).then(e=>{l(o(`${this.dblocation}/game-data/${e.key}`),{player1:{playerid:t.playerid,first:t.first,last:t.last,alias:t.alias,pic:t.pic,team:t.team||{logo:"none",name:"No Team"},rank:t.rank,seedPosition:t.seedPosition,division:t.division||"amateur",wktlDivision:t.wktlDivision||"recreational"},player2:{playerid:i.playerid,first:i.first,last:i.last,alias:i.alias,pic:i.pic,team:i.team||{logo:"none",name:"No Team"},rank:i.rank,seedPosition:i.seedPosition,division:i.division||"amateur",wktlDivision:i.wktlDivision||"recreational"},round:1,round1:{player1:{sum:0},player2:{sum:0}},round2:{player1:{sum:0},player2:{sum:0}},round3:{player1:{sum:0},player2:{sum:0}},round4:{player1:{sum:0},player2:{sum:0}},round5:{player1:{sum:0},player2:{sum:0}},round6:{player1:{sum:0},player2:{sum:0}},throws:{player1:{sum:0},player2:{sum:0}},winner:"none"}).then(e=>{this.activeTab=2})})},sendWinnerNextRoundBracketA(e,t,i,a,r){let s=this.roundToString(i+1),n=this.gameToString(Math.ceil(e/2)),o=this.isEven(e)?"player2":"player1";this.isRoundEnd(t,i,e)?this.playoffWinner(a,r):this.savePlayer("left","bracket",s,n,o,a)},isEven:e=>e%2==0,roundToString:e=>e<10?"r0"+e:"r"+e,gameToString:e=>e<10?"g0"+e:"g"+e,stringToNum:e=>parseInt(e.substr(1)),declareWinner(e,t,i,a,r,s,n,o="single"){if("bracket"===e)if("double"===o){let s,o,l,h=this.roundToString(t+1),g=this.gameToString(Math.ceil(i/2)),d=this.isEven(i)?"player2":"player1";this.isRoundEnd(e,t,i)?this.savePlayer("left","finals","r01","g01","player1",a):this.savePlayer("left","bracket",h,g,d,a),2===n&&this.savePlayer("left","finals","r01","g01","player2",r,!1),n<32?1===t?(s=this.roundToString(t),o=this.gameToString(Math.ceil(i/2)),l=this.isEven(i)?"player2":"player1"):2===t?(s=this.roundToString(2*(t-1)),o=this.gameToString(Math.ceil(n/4+1-i)),l="player1"):(s=this.roundToString(2*(t-1)),o=this.gameToString(Math.ceil(i)),l="player1"):32==n?1===t?(s=this.roundToString(t),o=this.gameToString(Math.ceil(i/2)),l=this.isEven(i)?"player2":"player1"):2===t?(s=this.roundToString(2*(t-1)),o=this.gameToString(Math.ceil(n/4+1-i)),l="player1"):3===t?(s=this.roundToString(2*(t-1)),o=Math.ceil(n/16+1-i),i>n/16&&(o=n/8+o),o=this.gameToString(o),l="player1"):4===t?(s=this.roundToString(2*(t-1)),o=this.gameToString(Math.ceil(n/16+1-i)),l="player1"):(s=this.roundToString(2*(t-1)),o=this.gameToString(Math.ceil(i)),l="player1"):64==n?1===t?(s=this.roundToString(t),o=this.gameToString(Math.ceil(i/2)),l=this.isEven(i)?"player2":"player1"):2===t?(s=this.roundToString(2*(t-1)),o=this.gameToString(Math.ceil(n/4+1-i)),l="player1"):3===t?(s=this.roundToString(2*(t-1)),o=Math.ceil(n/16+1-i),i>n/16&&(o=n/8+o),o=this.gameToString(o),l="player1"):4===t?(s=this.roundToString(2*(t-1)),o=Math.ceil(n/16-(2-i)),i>n/32&&(o=2-n/16+i),o=this.gameToString(o),l="player1"):(s=this.roundToString(2*(t-1)),o=this.gameToString(Math.ceil(i)),l="player1"):128==n?1===t?(s=this.roundToString(t),o=this.gameToString(Math.ceil(i/2)),l=this.isEven(i)?"player2":"player1"):2===t?(s=this.roundToString(2*(t-1)),o=this.gameToString(Math.ceil(n/4+1-i)),l="player1"):3===t?(s=this.roundToString(2*(t-1)),o=Math.ceil(n/16+1-i),i>n/16&&(o=n/8+o),o=this.gameToString(o),l="player1"):4===t?(s=this.roundToString(2*(t-1)),o=Math.ceil(n/32+i),i>n/32&&(o=Math.ceil(n/32+i-8)),o=this.gameToString(o),l="player1"):(s=this.roundToString(2*(t-1)),o=this.gameToString(Math.ceil(i)),l="player1"):n>128&&(1===t?(s=this.roundToString(t),o=this.gameToString(Math.ceil(i/2)),l=this.isEven(i)?"player2":"player1"):2===t?(s=this.roundToString(2*(t-1)),o=this.gameToString(Math.ceil(n/4+1-i)),l="player1"):3===t?(s=this.roundToString(2*(t-1)),o=Math.ceil(n/16+1-i),i>n/16&&(o=n/8+o),o=this.gameToString(o),l="player1"):4===t?(s=this.roundToString(2*(t-1)),o=Math.ceil(n/32+i),i>n/32&&(o=Math.ceil(n/32+i-16)),o=this.gameToString(o),l="player1"):5===t?(s=this.roundToString(2*(t-1)),o=this.gameToString(Math.ceil(i)),l="player1"):6===t?(s=this.roundToString(2*(t-1)),o=this.gameToString(Math.ceil(n/64+1-i))):(s=this.roundToString(2*(t-1)),o=this.gameToString(Math.ceil(i)),l="player1")),this.savePlayer("left","bracketB",s,o,l,r),t<=2&&this.isRoundBbye(s,o)&&this.declareWinner("bracketB",this.stringToNum(s),this.stringToNum(o),r,"","player2",n)}else this.sendWinnerNextRoundBracketA(i,e,t,a,r);else if("bracketB"===e){let r,s,n;r=this.roundToString(t+1),s=this.isEven(t)?this.gameToString(Math.ceil(i/2)):this.gameToString(i),n=this.isEven(t)?this.isEven(i)?"player2":"player1":"player2",this.isRoundEnd(e,t,i)?this.savePlayer("left","finals","r01","g01","player2",a):this.savePlayer("left","bracketB",r,s,n,a)}else"finals"===e&&(1===t?"pw1"===s?this.playoffWinner(a,r):(this.savePlayer("left","finals","r02","g01","player1",r,!1),this.savePlayer("left","finals","r02","g01","player2",a)):2===t&&this.playoffWinner(a,r))},isRoundEnd(e,t,i){const a="bracket"===e?"bracketAnotes":"bracketBnotes",r=this.roundToString(t);return!!(r&&this.settings[a]&&this.settings[a][r])&&"end"===this.settings[a][r][this.gameToString(i)]},isRoundBbye(e,t){return!!this.settings.bracketBnotes[e]&&"bye"===this.settings.bracketBnotes[e][t]},savePlayer(e,t,i,a,r,s,n=!0){let h="right"===e?"2":"";s&&"object"==typeof s?(s.rank||(s.rank=0),l(o(`${this.dblocation}/${t}${h}/${i}/${a}/${r}`),{alias:s.alias,first:s.first,last:s.last,pic:s.pic,playerid:s.playerid,pts:0,team:s.team||{logo:"none",name:"No Team"},rank:s.rank,seedPosition:s.seedPosition,division:s.division||"amateur",wktlDivision:s.wktlDivision||"recreational"}).then(()=>{n&&this.verifyIfGameCanBeCreated(t,h,i,a,e)})):console.warn("savePlayer: skipping, player is missing",{side:e,bracket:t,round:i,game:a,playerNum:r})},playoffWinner(e,t){l(o(`${this.dblocation}/settings`),{placedFirst:e,placedSecond:t}).finally(()=>{"League"!==this.eventStore.selectedEvent.type||this.eventStore.selectedEvent.slug.includes("marathon")||(async()=>{const e=i(),t=a(),l=r(),h=e.venue[".key"]||e.venue.locationSlug,g=e.venue.customer,d=l.selectedEvent.slug,y=[...(await s.get(`https://us-central1-forged-7adb7.cloudfunctions.net/payments/getInvoiceItems?customer=${g}`)).data.items||[]].filter(e=>e.metadata.venue===h&&e.metadata.event===d)[0],c=y?.quantity;let p=0;const u=await n(o(`/venues/${h}/league/${d}/${t.getYearSeason}/standings`));u.exists()&&(p=Object.keys(u.val()).length),c<p&&s.post("https://us-central1-forged-7adb7.cloudfunctions.net/payments/slackNotification",{currentPlayersNumber:p,billedPlayersNumber:c,venue:h,event:d}).catch(e=>{console.log(e)})})()})}}})}}});

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.