tods-competition-factory 1.7.15 → 1.7.17

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.
package/dist/index.mjs CHANGED
@@ -333,7 +333,7 @@ const matchUpFormatCode = {
333
333
  };
334
334
 
335
335
  function factoryVersion() {
336
- return "1.7.15";
336
+ return "1.7.17";
337
337
  }
338
338
 
339
339
  function getObjectTieFormat(obj) {
@@ -13480,7 +13480,7 @@ const ratingsParameters = {
13480
13480
  }
13481
13481
  };
13482
13482
 
13483
- var collectionDefinitions$h = [
13483
+ var collectionDefinitions$i = [
13484
13484
  {
13485
13485
  collectionName: "Doubles",
13486
13486
  matchUpCount: 3,
@@ -13496,17 +13496,17 @@ var collectionDefinitions$h = [
13496
13496
  matchUpValue: 1
13497
13497
  }
13498
13498
  ];
13499
- var tieFormatName$h = "COLLEGE_D3";
13500
- var winCriteria$h = {
13499
+ var tieFormatName$i = "COLLEGE_D3";
13500
+ var winCriteria$i = {
13501
13501
  valueGoal: 5
13502
13502
  };
13503
13503
  var COLLEGE_D3$1 = {
13504
- collectionDefinitions: collectionDefinitions$h,
13505
- tieFormatName: tieFormatName$h,
13506
- winCriteria: winCriteria$h
13504
+ collectionDefinitions: collectionDefinitions$i,
13505
+ tieFormatName: tieFormatName$i,
13506
+ winCriteria: winCriteria$i
13507
13507
  };
13508
13508
 
13509
- var collectionDefinitions$g = [
13509
+ var collectionDefinitions$h = [
13510
13510
  {
13511
13511
  collectionName: "Doubles",
13512
13512
  collectionValue: 1,
@@ -13522,17 +13522,17 @@ var collectionDefinitions$g = [
13522
13522
  matchUpValue: 1
13523
13523
  }
13524
13524
  ];
13525
- var tieFormatName$g = "COLLEGE_DEFAULT";
13526
- var winCriteria$g = {
13525
+ var tieFormatName$h = "COLLEGE_DEFAULT";
13526
+ var winCriteria$h = {
13527
13527
  valueGoal: 5
13528
13528
  };
13529
13529
  var COLLEGE_DEFAULT$1 = {
13530
- collectionDefinitions: collectionDefinitions$g,
13531
- tieFormatName: tieFormatName$g,
13532
- winCriteria: winCriteria$g
13530
+ collectionDefinitions: collectionDefinitions$h,
13531
+ tieFormatName: tieFormatName$h,
13532
+ winCriteria: winCriteria$h
13533
13533
  };
13534
13534
 
13535
- var collectionDefinitions$f = [
13535
+ var collectionDefinitions$g = [
13536
13536
  {
13537
13537
  collectionName: "Doubles",
13538
13538
  matchUpCount: 3,
@@ -13548,17 +13548,17 @@ var collectionDefinitions$f = [
13548
13548
  matchUpValue: 1
13549
13549
  }
13550
13550
  ];
13551
- var tieFormatName$f = "COLLEGE_JUCO";
13552
- var winCriteria$f = {
13551
+ var tieFormatName$g = "COLLEGE_JUCO";
13552
+ var winCriteria$g = {
13553
13553
  valueGoal: 5
13554
13554
  };
13555
13555
  var COLLEGE_JUCO$1 = {
13556
- collectionDefinitions: collectionDefinitions$f,
13557
- tieFormatName: tieFormatName$f,
13558
- winCriteria: winCriteria$f
13556
+ collectionDefinitions: collectionDefinitions$g,
13557
+ tieFormatName: tieFormatName$g,
13558
+ winCriteria: winCriteria$g
13559
13559
  };
13560
13560
 
13561
- var collectionDefinitions$e = [
13561
+ var collectionDefinitions$f = [
13562
13562
  {
13563
13563
  collectionName: "Doubles",
13564
13564
  matchUpCount: 1,
@@ -13574,17 +13574,17 @@ var collectionDefinitions$e = [
13574
13574
  matchUpValue: 1
13575
13575
  }
13576
13576
  ];
13577
- var tieFormatName$e = "DOMINANT_DUO";
13578
- var winCriteria$e = {
13577
+ var tieFormatName$f = "DOMINANT_DUO";
13578
+ var winCriteria$f = {
13579
13579
  valueGoal: 2
13580
13580
  };
13581
13581
  var DOMINANT_DUO_TIE_FORMAT = {
13582
- collectionDefinitions: collectionDefinitions$e,
13583
- tieFormatName: tieFormatName$e,
13584
- winCriteria: winCriteria$e
13582
+ collectionDefinitions: collectionDefinitions$f,
13583
+ tieFormatName: tieFormatName$f,
13584
+ winCriteria: winCriteria$f
13585
13585
  };
13586
13586
 
13587
- var collectionDefinitions$d = [
13587
+ var collectionDefinitions$e = [
13588
13588
  {
13589
13589
  collectionName: "Mixed Doubles",
13590
13590
  gender: "MIXED",
@@ -13610,17 +13610,17 @@ var collectionDefinitions$d = [
13610
13610
  matchUpValue: 1
13611
13611
  }
13612
13612
  ];
13613
- var tieFormatName$d = "DOMINANT_DUO_MIXED";
13614
- var winCriteria$d = {
13613
+ var tieFormatName$e = "DOMINANT_DUO_MIXED";
13614
+ var winCriteria$e = {
13615
13615
  valueGoal: 2
13616
13616
  };
13617
13617
  var DOMINANT_DUO_MIXED_TIE_FORMAT = {
13618
- collectionDefinitions: collectionDefinitions$d,
13619
- tieFormatName: tieFormatName$d,
13620
- winCriteria: winCriteria$d
13618
+ collectionDefinitions: collectionDefinitions$e,
13619
+ tieFormatName: tieFormatName$e,
13620
+ winCriteria: winCriteria$e
13621
13621
  };
13622
13622
 
13623
- var collectionDefinitions$c = [
13623
+ var collectionDefinitions$d = [
13624
13624
  {
13625
13625
  collectionGroupNumber: 1,
13626
13626
  matchUpType: "DOUBLES",
@@ -13678,18 +13678,18 @@ var collectionGroups$1 = [
13678
13678
  groupName: "Day 3"
13679
13679
  }
13680
13680
  ];
13681
- var tieFormatName$c = "LAVER_CUP";
13682
- var winCriteria$c = {
13681
+ var tieFormatName$d = "LAVER_CUP";
13682
+ var winCriteria$d = {
13683
13683
  valueGoal: 13
13684
13684
  };
13685
13685
  var LAVER_CUP_TIE_FORMAT = {
13686
- collectionDefinitions: collectionDefinitions$c,
13686
+ collectionDefinitions: collectionDefinitions$d,
13687
13687
  collectionGroups: collectionGroups$1,
13688
- tieFormatName: tieFormatName$c,
13689
- winCriteria: winCriteria$c
13688
+ tieFormatName: tieFormatName$d,
13689
+ winCriteria: winCriteria$d
13690
13690
  };
13691
13691
 
13692
- var collectionDefinitions$b = [
13692
+ var collectionDefinitions$c = [
13693
13693
  {
13694
13694
  collectionName: "Round 1",
13695
13695
  matchUpCount: 3,
@@ -13712,15 +13712,67 @@ var collectionDefinitions$b = [
13712
13712
  scoreValue: 1
13713
13713
  }
13714
13714
  ];
13715
- var tieFormatName$b = "Doubles Shuffle";
13715
+ var tieFormatName$c = "Doubles Shuffle";
13716
13716
  var unrestrictedSelections = true;
13717
- var winCriteria$b = {
13717
+ var winCriteria$c = {
13718
13718
  aggregateValue: true
13719
13719
  };
13720
13720
  var TEAM_AGGREGATION_TIE_FORMAT = {
13721
+ collectionDefinitions: collectionDefinitions$c,
13722
+ tieFormatName: tieFormatName$c,
13723
+ unrestrictedSelections: unrestrictedSelections,
13724
+ winCriteria: winCriteria$c
13725
+ };
13726
+
13727
+ var collectionDefinitions$b = [
13728
+ {
13729
+ scoreValue: 1,
13730
+ matchUpType: "SINGLES",
13731
+ collectionName: "Men's Singles",
13732
+ matchUpFormat: "SET1-S:T60",
13733
+ gender: "MALE",
13734
+ matchUpCount: 3
13735
+ },
13736
+ {
13737
+ scoreValue: 1,
13738
+ matchUpType: "SINGLES",
13739
+ collectionName: "Women's Singles",
13740
+ matchUpFormat: "SET1-S:T60",
13741
+ gender: "FEMALE",
13742
+ matchUpCount: 3
13743
+ },
13744
+ {
13745
+ scoreValue: 1,
13746
+ matchUpType: "DOUBLES",
13747
+ collectionName: "Men's Doubles",
13748
+ matchUpFormat: "SET1-S:T60",
13749
+ gender: "MALE",
13750
+ matchUpCount: 1
13751
+ },
13752
+ {
13753
+ matchUpValue: 1,
13754
+ matchUpType: "DOUBLES",
13755
+ collectionName: "Women's Doubles",
13756
+ matchUpFormat: "SET1-S:T60",
13757
+ gender: "FEMALE",
13758
+ matchUpCount: 1
13759
+ },
13760
+ {
13761
+ matchUpValue: 1,
13762
+ matchUpType: "DOUBLES",
13763
+ collectionName: "Mixed Doubles",
13764
+ matchUpFormat: "SET1-S:T60",
13765
+ gender: "MIXED",
13766
+ matchUpCount: 1
13767
+ }
13768
+ ];
13769
+ var tieFormatName$b = "Time Tennis";
13770
+ var winCriteria$b = {
13771
+ aggregateValue: true
13772
+ };
13773
+ var TIME_TENNIS_TIE_FORMAT = {
13721
13774
  collectionDefinitions: collectionDefinitions$b,
13722
13775
  tieFormatName: tieFormatName$b,
13723
- unrestrictedSelections: unrestrictedSelections,
13724
13776
  winCriteria: winCriteria$b
13725
13777
  };
13726
13778
 
@@ -14498,6 +14550,7 @@ const tieFormats = {
14498
14550
  DOMINANT_DUO_MIXED: DOMINANT_DUO_MIXED_TIE_FORMAT,
14499
14551
  LAVER_CUP: LAVER_CUP_TIE_FORMAT,
14500
14552
  TEAM_DOUBLES_3_AGGREGATION: TEAM_AGGREGATION_TIE_FORMAT,
14553
+ TIME_TENNIS: TIME_TENNIS_TIE_FORMAT,
14501
14554
  USTA_BREWER_CUP: USTA_BREWER_CUP_TIE_FORMAT,
14502
14555
  USTA_OZAKI_CUP: USTA_OZAKI_CUP_TIE_FORMAT,
14503
14556
  USTA_COLLEGE: USTA_COLLEGE_TIE_FORMAT,
@@ -29739,7 +29792,6 @@ function updateTieFormat({
29739
29792
  event,
29740
29793
  uuids
29741
29794
  }) {
29742
- console.log("booo", { matchUp });
29743
29795
  const stack = "updateTieFormat";
29744
29796
  const tournamentId = tournamentRecord?.tournamentId;
29745
29797
  let modifiedStructuresCount = 0;
@@ -37083,7 +37135,7 @@ function matchUpActions$2({
37083
37135
  const availableIndividualParticipants = inContextDualMatchUp?.sides?.map(
37084
37136
  (side2) => side2.participant.individualParticipants.filter(
37085
37137
  ({ participantId: participantId2, person }) => !existingParticipantIds?.includes(participantId2) && (!gender || gender === ANY || person.sex === gender || // case where one gendered member has been assigned
37086
- gender === MIXED && assignedGender && person.sex !== assignedGender)
37138
+ gender === MIXED && !assignedGender || assignedGender && person.sex !== assignedGender)
37087
37139
  )
37088
37140
  );
37089
37141
  const availableParticipants = sideNumber ? availableIndividualParticipants?.[sideNumber - 1] : availableIndividualParticipants?.map((available2, i) => ({
@@ -43650,17 +43702,19 @@ function generateAndPopulatePlayoffStructures(params) {
43650
43702
  loserMatchUp
43651
43703
  }
43652
43704
  } = targetData;
43653
- const targetStructureId = loserTargetLink.target.structureId;
43654
- const targetDrawPosition = loserMatchUp.drawPositions[loserMatchUpDrawPositionIndex];
43655
- const result = assignDrawPositionBye$1({
43656
- drawPosition: targetDrawPosition,
43657
- structureId: targetStructureId,
43658
- tournamentRecord,
43659
- drawDefinition,
43660
- event
43661
- });
43662
- if (result.error)
43663
- console.log(result.error);
43705
+ if (loserTargetLink && loserMatchUp) {
43706
+ const targetStructureId = loserTargetLink.target.structureId;
43707
+ const targetDrawPosition = loserMatchUp.drawPositions[loserMatchUpDrawPositionIndex];
43708
+ const result = assignDrawPositionBye$1({
43709
+ drawPosition: targetDrawPosition,
43710
+ structureId: targetStructureId,
43711
+ tournamentRecord,
43712
+ drawDefinition,
43713
+ event
43714
+ });
43715
+ if (result.error)
43716
+ console.log(result.error);
43717
+ }
43664
43718
  });
43665
43719
  const matchUpModifications = [];
43666
43720
  const goesToMap = addGoesTo({
@@ -55466,6 +55520,7 @@ const DOMINANT_DUO = "DOMINANT_DUO";
55466
55520
  const DOMINANT_DUO_MIXED = "DOMINANT_DUO_MIXED";
55467
55521
  const LAVER_CUP = "LAVER_CUP";
55468
55522
  const TEAM_DOUBLES_3_AGGREGATION = "TEAM_DOUBLES_3_AGGREGATION";
55523
+ const TIME_TENNIS = "TIME_TENNIS";
55469
55524
  const USTA_BREWER_CUP = "USTA_BREWER_CUP";
55470
55525
  const USTA_OZAKI_CUP = "USTA_OZAKI_CUP";
55471
55526
  const USTA_COLLEGE = "USTA_COLLEGE";
@@ -55485,6 +55540,7 @@ const tieFormatConstants = {
55485
55540
  DOMINANT_DUO_MIXED,
55486
55541
  LAVER_CUP,
55487
55542
  TEAM_DOUBLES_3_AGGREGATION,
55543
+ TIME_TENNIS,
55488
55544
  USTA_BREWER_CUP,
55489
55545
  USTA_OZAKI_CUP,
55490
55546
  USTA_COLLEGE,
@@ -55555,6 +55611,7 @@ const namedFormats = {
55555
55611
  [DOMINANT_DUO]: DOMINANT_DUO_TIE_FORMAT,
55556
55612
  [DOMINANT_DUO_MIXED]: DOMINANT_DUO_MIXED_TIE_FORMAT,
55557
55613
  [TEAM_DOUBLES_3_AGGREGATION]: TEAM_AGGREGATION_TIE_FORMAT,
55614
+ [TIME_TENNIS]: TIME_TENNIS_TIE_FORMAT,
55558
55615
  [USTA_BREWER_CUP]: USTA_BREWER_CUP_TIE_FORMAT,
55559
55616
  [USTA_OZAKI_CUP]: USTA_OZAKI_CUP_TIE_FORMAT,
55560
55617
  [USTA_COLLEGE]: USTA_COLLEGE_TIE_FORMAT,
@@ -60561,6 +60618,7 @@ var lastNames = [
60561
60618
  "Midgely",
60562
60619
  "Mond",
60563
60620
  "Montoya",
60621
+ "Moore",
60564
60622
  "Murry",
60565
60623
  "Nagle",
60566
60624
  "Nearing",
@@ -60624,6 +60682,8 @@ var firstFemale = [
60624
60682
  "Erin",
60625
60683
  "Eva",
60626
60684
  "Evelyn",
60685
+ "Heather",
60686
+ "Helen",
60627
60687
  "Hermia",
60628
60688
  "Hypatia",
60629
60689
  "Imogen",
@@ -60631,8 +60691,6 @@ var firstFemale = [
60631
60691
  "Jasmine",
60632
60692
  "Juliana",
60633
60693
  "Juliet",
60634
- "Heather",
60635
- "Helen",
60636
60694
  "Katniss",
60637
60695
  "Leeloo",
60638
60696
  "Lenina",
@@ -60678,6 +60736,7 @@ var firstMale = [
60678
60736
  "Axel",
60679
60737
  "Barda",
60680
60738
  "Bill",
60739
+ "Bruce",
60681
60740
  "Charles",
60682
60741
  "Chris",
60683
60742
  "Darwin",
@@ -60713,6 +60772,7 @@ var firstMale = [
60713
60772
  "Michael",
60714
60773
  "Mustapha",
60715
60774
  "Neil",
60775
+ "Nikola",
60716
60776
  "Octavio",
60717
60777
  "Palmer",
60718
60778
  "Paul",
@@ -60721,12 +60781,14 @@ var firstMale = [
60721
60781
  "Rick",
60722
60782
  "Rincewind",
60723
60783
  "Roy",
60784
+ "Shannon",
60724
60785
  "Sheldon",
60725
60786
  "Stafford",
60726
60787
  "Stanislaw",
60727
60788
  "Stanley",
60728
60789
  "Syme",
60729
60790
  "Thorstein",
60791
+ "Thomas",
60730
60792
  "Tyrone",
60731
60793
  "Vizzini",
60732
60794
  "Walton",
@@ -60735,7 +60797,8 @@ var firstMale = [
60735
60797
  "Wendell",
60736
60798
  "Westley",
60737
60799
  "William",
60738
- "Winston"
60800
+ "Winston",
60801
+ "Zoran"
60739
60802
  ];
60740
60803
  var namesData$1 = {
60741
60804
  lastNames: lastNames,