tods-competition-factory 2.1.12 → 2.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  function factoryVersion() {
6
- return '2.1.12';
6
+ return '2.1.13';
7
7
  }
8
8
 
9
9
  const SINGLES_MATCHUP = 'SINGLES';
@@ -12251,13 +12251,10 @@ function pushGlobalLog(value, devContextOverride) {
12251
12251
  }
12252
12252
  function getGlobalLog(purge) {
12253
12253
  const globalLogCopy = globalLog.slice();
12254
- if (purge) {
12255
- globalLog.length = 0;
12256
- }
12257
12254
  return globalLogCopy;
12258
12255
  }
12259
12256
  function printGlobalLog(purge) {
12260
- const globalLogCopy = getGlobalLog(purge);
12257
+ const globalLogCopy = getGlobalLog();
12261
12258
  const modifiedText = globalLogCopy.map((line) => {
12262
12259
  const { color, keyColors, method, newline } = line;
12263
12260
  const methodColor = Object.keys(logColors).includes(color) ? logColors[color] : logColors.cyan;
@@ -25375,7 +25372,16 @@ function isActiveDownstream(params) {
25375
25372
  if (fmlcBYE)
25376
25373
  return false;
25377
25374
  const { targetMatchUps: { loserMatchUp, winnerMatchUp }, targetLinks, } = targetData;
25378
- const loserMatchUpExit = [DEFAULTED, WALKOVER$2].includes(loserMatchUp?.matchUpStatus);
25375
+ const loserTargetData = loserMatchUp &&
25376
+ positionTargets({
25377
+ matchUpId: loserMatchUp.matchUpId,
25378
+ inContextDrawMatchUps,
25379
+ drawDefinition,
25380
+ });
25381
+ const loserExitPropagation = loserTargetData?.targetMatchUps?.loserMatchUp;
25382
+ const loserIndex = loserTargetData?.targetMatchUps?.loserMatchUpDrawPositionIndex;
25383
+ const propagatedLoserParticipant = loserExitPropagation?.sides[loserIndex]?.participant;
25384
+ const loserMatchUpExit = [DEFAULTED, WALKOVER$2].includes(loserMatchUp?.matchUpStatus) && !propagatedLoserParticipant;
25379
25385
  const winnerDrawPositionsCount = winnerMatchUp?.drawPositions?.filter(Boolean).length || 0;
25380
25386
  if ((loserMatchUp?.winningSide && !loserMatchUpExit) ||
25381
25387
  (winnerMatchUp?.winningSide &&
@@ -25383,12 +25389,6 @@ function isActiveDownstream(params) {
25383
25389
  (!winnerMatchUp.feedRound || ![WALKOVER$2, DEFAULTED].includes(winnerMatchUp?.matchUpStatus)))) {
25384
25390
  return true;
25385
25391
  }
25386
- const loserTargetData = loserMatchUp &&
25387
- positionTargets({
25388
- matchUpId: loserMatchUp.matchUpId,
25389
- inContextDrawMatchUps,
25390
- drawDefinition,
25391
- });
25392
25392
  const winnerTargetData = winnerMatchUp &&
25393
25393
  positionTargets({
25394
25394
  matchUpId: winnerMatchUp.matchUpId,
@@ -28258,7 +28258,7 @@ function generateCandidate({ maxIterations = 4000, valueSortedPairings, pairingV
28258
28258
  proposedCandidates.push(initialProposal);
28259
28259
  let lowCandidateValue = initialProposal.value;
28260
28260
  let deltaCandidate = initialProposal;
28261
- let candidatesCount = 0;
28261
+ let candidatesCount = 1;
28262
28262
  let iterations = 0;
28263
28263
  let opponentCount = actors.length;
28264
28264
  let calculatedIterations;