tods-competition-factory 1.7.17 → 1.7.18

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.
@@ -7765,6 +7765,9 @@ function initializeParticipantId({ participantMap, participantId }) {
7765
7765
  groupParticipantIds: [],
7766
7766
  pairParticipantIds: [],
7767
7767
  teamParticipantIds: [],
7768
+ seedings: {},
7769
+ rankings: {},
7770
+ ratings: {},
7768
7771
  groups: [],
7769
7772
  teams: []
7770
7773
  },
@@ -21289,7 +21292,7 @@ function newDrawDefinition({
21289
21292
  return Object.assign(drawDefinition, { drawId, drawType, matchUpType });
21290
21293
  }
21291
21294
 
21292
- var collectionDefinitions$f = [
21295
+ var collectionDefinitions$g = [
21293
21296
  {
21294
21297
  collectionName: "Male Singles",
21295
21298
  matchUpFormat: "SET3-S:6/TB7",
@@ -21331,17 +21334,17 @@ var collectionDefinitions$f = [
21331
21334
  gender: "MIXED"
21332
21335
  }
21333
21336
  ];
21334
- var tieFormatName$f = "USTA_GOLD_TEAM_CHALLENGE";
21335
- var winCriteria$f = {
21337
+ var tieFormatName$g = "USTA_GOLD_TEAM_CHALLENGE";
21338
+ var winCriteria$g = {
21336
21339
  valueGoal: 9
21337
21340
  };
21338
21341
  var USTA_GOLD_TEAM_CHALLENGE_FORMAT = {
21339
- collectionDefinitions: collectionDefinitions$f,
21340
- tieFormatName: tieFormatName$f,
21341
- winCriteria: winCriteria$f
21342
+ collectionDefinitions: collectionDefinitions$g,
21343
+ tieFormatName: tieFormatName$g,
21344
+ winCriteria: winCriteria$g
21342
21345
  };
21343
21346
 
21344
- var collectionDefinitions$e = [
21347
+ var collectionDefinitions$f = [
21345
21348
  {
21346
21349
  collectionName: "Round 1",
21347
21350
  matchUpCount: 3,
@@ -21364,19 +21367,19 @@ var collectionDefinitions$e = [
21364
21367
  scoreValue: 1
21365
21368
  }
21366
21369
  ];
21367
- var tieFormatName$e = "Doubles Shuffle";
21370
+ var tieFormatName$f = "Doubles Shuffle";
21368
21371
  var unrestrictedSelections = true;
21369
- var winCriteria$e = {
21372
+ var winCriteria$f = {
21370
21373
  aggregateValue: true
21371
21374
  };
21372
21375
  var TEAM_AGGREGATION_TIE_FORMAT = {
21373
- collectionDefinitions: collectionDefinitions$e,
21374
- tieFormatName: tieFormatName$e,
21376
+ collectionDefinitions: collectionDefinitions$f,
21377
+ tieFormatName: tieFormatName$f,
21375
21378
  unrestrictedSelections: unrestrictedSelections,
21376
- winCriteria: winCriteria$e
21379
+ winCriteria: winCriteria$f
21377
21380
  };
21378
21381
 
21379
- var collectionDefinitions$d = [
21382
+ var collectionDefinitions$e = [
21380
21383
  {
21381
21384
  collectionName: "Male Singles",
21382
21385
  gender: "MALE",
@@ -21402,17 +21405,17 @@ var collectionDefinitions$d = [
21402
21405
  matchUpValue: 1
21403
21406
  }
21404
21407
  ];
21405
- var tieFormatName$d = "USTA_SOUTHERN_LEVEL_5";
21406
- var winCriteria$d = {
21408
+ var tieFormatName$e = "USTA_SOUTHERN_LEVEL_5";
21409
+ var winCriteria$e = {
21407
21410
  valueGoal: 8
21408
21411
  };
21409
21412
  var USTA_SOUTHERN_LEVEL_5_TIE_FORMAT = {
21410
- collectionDefinitions: collectionDefinitions$d,
21411
- tieFormatName: tieFormatName$d,
21412
- winCriteria: winCriteria$d
21413
+ collectionDefinitions: collectionDefinitions$e,
21414
+ tieFormatName: tieFormatName$e,
21415
+ winCriteria: winCriteria$e
21413
21416
  };
21414
21417
 
21415
- var collectionDefinitions$c = [
21418
+ var collectionDefinitions$d = [
21416
21419
  {
21417
21420
  category: {
21418
21421
  ageCategoryCode: "16U"
@@ -21464,17 +21467,17 @@ var collectionDefinitions$c = [
21464
21467
  ]
21465
21468
  }
21466
21469
  ];
21467
- var tieFormatName$c = "USTA_SECTION_BATTLE";
21468
- var winCriteria$c = {
21470
+ var tieFormatName$d = "USTA_SECTION_BATTLE";
21471
+ var winCriteria$d = {
21469
21472
  valueGoal: 9
21470
21473
  };
21471
21474
  var USTA_SECTION_BATTLE_TIE_FORMAT = {
21472
- collectionDefinitions: collectionDefinitions$c,
21473
- tieFormatName: tieFormatName$c,
21474
- winCriteria: winCriteria$c
21475
+ collectionDefinitions: collectionDefinitions$d,
21476
+ tieFormatName: tieFormatName$d,
21477
+ winCriteria: winCriteria$d
21475
21478
  };
21476
21479
 
21477
- var collectionDefinitions$b = [
21480
+ var collectionDefinitions$c = [
21478
21481
  {
21479
21482
  collectionName: "Male Singles",
21480
21483
  gender: "MALE",
@@ -21516,11 +21519,47 @@ var collectionDefinitions$b = [
21516
21519
  matchUpValue: 1
21517
21520
  }
21518
21521
  ];
21519
- var tieFormatName$b = "USTA_INTERSECTIONAL";
21520
- var winCriteria$b = {
21522
+ var tieFormatName$c = "USTA_INTERSECTIONAL";
21523
+ var winCriteria$c = {
21521
21524
  valueGoal: 8
21522
21525
  };
21523
21526
  var USTA_INTERSECTIONAL_TIE_FORMAT = {
21527
+ collectionDefinitions: collectionDefinitions$c,
21528
+ tieFormatName: tieFormatName$c,
21529
+ winCriteria: winCriteria$c
21530
+ };
21531
+
21532
+ var collectionDefinitions$b = [
21533
+ {
21534
+ scoreValue: 1,
21535
+ matchUpType: "SINGLES",
21536
+ collectionName: "Men's Singles",
21537
+ matchUpFormat: "SET1-S:T60",
21538
+ gender: "MALE",
21539
+ matchUpCount: 1
21540
+ },
21541
+ {
21542
+ scoreValue: 1,
21543
+ matchUpType: "SINGLES",
21544
+ collectionName: "Women's Singles",
21545
+ matchUpFormat: "SET1-S:T60",
21546
+ gender: "FEMALE",
21547
+ matchUpCount: 1
21548
+ },
21549
+ {
21550
+ matchUpValue: 1,
21551
+ matchUpType: "DOUBLES",
21552
+ collectionName: "Mixed Doubles",
21553
+ matchUpFormat: "SET1-S:T60",
21554
+ gender: "MIXED",
21555
+ matchUpCount: 1
21556
+ }
21557
+ ];
21558
+ var tieFormatName$b = "Time Tennis Pro Circuit";
21559
+ var winCriteria$b = {
21560
+ aggregateValue: true
21561
+ };
21562
+ var TIME_TENNIS_PRO_TIE_FORMAT = {
21524
21563
  collectionDefinitions: collectionDefinitions$b,
21525
21564
  tieFormatName: tieFormatName$b,
21526
21565
  winCriteria: winCriteria$b
@@ -21563,6 +21602,58 @@ var DOMINANT_DUO_MIXED_TIE_FORMAT = {
21563
21602
  };
21564
21603
 
21565
21604
  var collectionDefinitions$9 = [
21605
+ {
21606
+ scoreValue: 1,
21607
+ matchUpType: "SINGLES",
21608
+ collectionName: "Men's Singles",
21609
+ matchUpFormat: "SET1-S:T60",
21610
+ gender: "MALE",
21611
+ matchUpCount: 3
21612
+ },
21613
+ {
21614
+ scoreValue: 1,
21615
+ matchUpType: "SINGLES",
21616
+ collectionName: "Women's Singles",
21617
+ matchUpFormat: "SET1-S:T60",
21618
+ gender: "FEMALE",
21619
+ matchUpCount: 3
21620
+ },
21621
+ {
21622
+ scoreValue: 1,
21623
+ matchUpType: "DOUBLES",
21624
+ collectionName: "Men's Doubles",
21625
+ matchUpFormat: "SET1-S:T60",
21626
+ gender: "MALE",
21627
+ matchUpCount: 1
21628
+ },
21629
+ {
21630
+ matchUpValue: 1,
21631
+ matchUpType: "DOUBLES",
21632
+ collectionName: "Women's Doubles",
21633
+ matchUpFormat: "SET1-S:T60",
21634
+ gender: "FEMALE",
21635
+ matchUpCount: 1
21636
+ },
21637
+ {
21638
+ matchUpValue: 1,
21639
+ matchUpType: "DOUBLES",
21640
+ collectionName: "Mixed Doubles",
21641
+ matchUpFormat: "SET1-S:T60",
21642
+ gender: "MIXED",
21643
+ matchUpCount: 1
21644
+ }
21645
+ ];
21646
+ var tieFormatName$9 = "Time Tennis Dual";
21647
+ var winCriteria$9 = {
21648
+ aggregateValue: true
21649
+ };
21650
+ var TIME_TENNIS_DUAL_TIE_FORMAT = {
21651
+ collectionDefinitions: collectionDefinitions$9,
21652
+ tieFormatName: tieFormatName$9,
21653
+ winCriteria: winCriteria$9
21654
+ };
21655
+
21656
+ var collectionDefinitions$8 = [
21566
21657
  {
21567
21658
  category: {
21568
21659
  ageCategoryCode: "14U"
@@ -21637,22 +21728,22 @@ var collectionGroups$1 = [
21637
21728
  }
21638
21729
  }
21639
21730
  ];
21640
- var tieFormatName$9 = "USTA_BREWER_CUP";
21641
- var winCriteria$9 = {
21731
+ var tieFormatName$8 = "USTA_BREWER_CUP";
21732
+ var winCriteria$8 = {
21642
21733
  valueGoal: 4
21643
21734
  };
21644
21735
  var USTA_BREWER_CUP_TIE_FORMAT = {
21645
- collectionDefinitions: collectionDefinitions$9,
21736
+ collectionDefinitions: collectionDefinitions$8,
21646
21737
  collectionGroups: collectionGroups$1,
21647
- tieFormatName: tieFormatName$9,
21648
- winCriteria: winCriteria$9
21738
+ tieFormatName: tieFormatName$8,
21739
+ winCriteria: winCriteria$8
21649
21740
  };
21650
21741
 
21651
- var winCriteria$8 = {
21742
+ var winCriteria$7 = {
21652
21743
  valueGoal: 23
21653
21744
  };
21654
- var tieFormatName$8 = "USTA_OZAKI_CUP";
21655
- var collectionDefinitions$8 = [
21745
+ var tieFormatName$7 = "USTA_OZAKI_CUP";
21746
+ var collectionDefinitions$7 = [
21656
21747
  {
21657
21748
  category: {
21658
21749
  ageCategoryCode: "18U"
@@ -21875,12 +21966,12 @@ var collectionDefinitions$8 = [
21875
21966
  }
21876
21967
  ];
21877
21968
  var USTA_OZAKI_CUP_TIE_FORMAT = {
21878
- winCriteria: winCriteria$8,
21879
- tieFormatName: tieFormatName$8,
21880
- collectionDefinitions: collectionDefinitions$8
21969
+ winCriteria: winCriteria$7,
21970
+ tieFormatName: tieFormatName$7,
21971
+ collectionDefinitions: collectionDefinitions$7
21881
21972
  };
21882
21973
 
21883
- var collectionDefinitions$7 = [
21974
+ var collectionDefinitions$6 = [
21884
21975
  {
21885
21976
  collectionName: "Doubles",
21886
21977
  matchUpCount: 1,
@@ -21896,17 +21987,17 @@ var collectionDefinitions$7 = [
21896
21987
  matchUpValue: 1
21897
21988
  }
21898
21989
  ];
21899
- var tieFormatName$7 = "DOMINANT_DUO";
21900
- var winCriteria$7 = {
21990
+ var tieFormatName$6 = "DOMINANT_DUO";
21991
+ var winCriteria$6 = {
21901
21992
  valueGoal: 2
21902
21993
  };
21903
21994
  var DOMINANT_DUO_TIE_FORMAT = {
21904
- collectionDefinitions: collectionDefinitions$7,
21905
- tieFormatName: tieFormatName$7,
21906
- winCriteria: winCriteria$7
21995
+ collectionDefinitions: collectionDefinitions$6,
21996
+ tieFormatName: tieFormatName$6,
21997
+ winCriteria: winCriteria$6
21907
21998
  };
21908
21999
 
21909
- var collectionDefinitions$6 = [
22000
+ var collectionDefinitions$5 = [
21910
22001
  {
21911
22002
  collectionName: "Doubles",
21912
22003
  matchUpCount: 3,
@@ -21922,17 +22013,17 @@ var collectionDefinitions$6 = [
21922
22013
  matchUpValue: 1
21923
22014
  }
21924
22015
  ];
21925
- var tieFormatName$6 = "USTA_COLLEGE";
21926
- var winCriteria$6 = {
22016
+ var tieFormatName$5 = "USTA_COLLEGE";
22017
+ var winCriteria$5 = {
21927
22018
  valueGoal: 4
21928
22019
  };
21929
22020
  var USTA_COLLEGE_TIE_FORMAT = {
21930
- collectionDefinitions: collectionDefinitions$6,
21931
- tieFormatName: tieFormatName$6,
21932
- winCriteria: winCriteria$6
22021
+ collectionDefinitions: collectionDefinitions$5,
22022
+ tieFormatName: tieFormatName$5,
22023
+ winCriteria: winCriteria$5
21933
22024
  };
21934
22025
 
21935
- var collectionDefinitions$5 = [
22026
+ var collectionDefinitions$4 = [
21936
22027
  {
21937
22028
  collectionName: "Male Singles",
21938
22029
  matchUpCount: 6,
@@ -21962,17 +22053,17 @@ var collectionDefinitions$5 = [
21962
22053
  matchUpValue: 1
21963
22054
  }
21964
22055
  ];
21965
- var tieFormatName$5 = "USTA_LEVEL_1";
21966
- var winCriteria$5 = {
22056
+ var tieFormatName$4 = "USTA_LEVEL_1";
22057
+ var winCriteria$4 = {
21967
22058
  valueGoal: 10
21968
22059
  };
21969
22060
  var USTA_LEVEL_1_TIE_FORMAT = {
21970
- collectionDefinitions: collectionDefinitions$5,
21971
- tieFormatName: tieFormatName$5,
21972
- winCriteria: winCriteria$5
22061
+ collectionDefinitions: collectionDefinitions$4,
22062
+ tieFormatName: tieFormatName$4,
22063
+ winCriteria: winCriteria$4
21973
22064
  };
21974
22065
 
21975
- var collectionDefinitions$4 = [
22066
+ var collectionDefinitions$3 = [
21976
22067
  {
21977
22068
  collectionName: "Female Doubles",
21978
22069
  gender: "FEMALE",
@@ -22030,63 +22121,11 @@ var collectionDefinitions$4 = [
22030
22121
  scoreValue: 1
22031
22122
  }
22032
22123
  ];
22033
- var tieFormatName$4 = "USTA_WTT_ITT";
22034
- var winCriteria$4 = {
22035
- aggregateValue: true
22036
- };
22037
- var USTA_WTT_ITT_TIE_FORMAT = {
22038
- collectionDefinitions: collectionDefinitions$4,
22039
- tieFormatName: tieFormatName$4,
22040
- winCriteria: winCriteria$4
22041
- };
22042
-
22043
- var collectionDefinitions$3 = [
22044
- {
22045
- scoreValue: 1,
22046
- matchUpType: "SINGLES",
22047
- collectionName: "Men's Singles",
22048
- matchUpFormat: "SET1-S:T60",
22049
- gender: "MALE",
22050
- matchUpCount: 3
22051
- },
22052
- {
22053
- scoreValue: 1,
22054
- matchUpType: "SINGLES",
22055
- collectionName: "Women's Singles",
22056
- matchUpFormat: "SET1-S:T60",
22057
- gender: "FEMALE",
22058
- matchUpCount: 3
22059
- },
22060
- {
22061
- scoreValue: 1,
22062
- matchUpType: "DOUBLES",
22063
- collectionName: "Men's Doubles",
22064
- matchUpFormat: "SET1-S:T60",
22065
- gender: "MALE",
22066
- matchUpCount: 1
22067
- },
22068
- {
22069
- matchUpValue: 1,
22070
- matchUpType: "DOUBLES",
22071
- collectionName: "Women's Doubles",
22072
- matchUpFormat: "SET1-S:T60",
22073
- gender: "FEMALE",
22074
- matchUpCount: 1
22075
- },
22076
- {
22077
- matchUpValue: 1,
22078
- matchUpType: "DOUBLES",
22079
- collectionName: "Mixed Doubles",
22080
- matchUpFormat: "SET1-S:T60",
22081
- gender: "MIXED",
22082
- matchUpCount: 1
22083
- }
22084
- ];
22085
- var tieFormatName$3 = "Time Tennis";
22124
+ var tieFormatName$3 = "USTA_WTT_ITT";
22086
22125
  var winCriteria$3 = {
22087
22126
  aggregateValue: true
22088
22127
  };
22089
- var TIME_TENNIS_TIE_FORMAT = {
22128
+ var USTA_WTT_ITT_TIE_FORMAT = {
22090
22129
  collectionDefinitions: collectionDefinitions$3,
22091
22130
  tieFormatName: tieFormatName$3,
22092
22131
  winCriteria: winCriteria$3
@@ -22280,7 +22319,8 @@ const DOMINANT_DUO = "DOMINANT_DUO";
22280
22319
  const DOMINANT_DUO_MIXED = "DOMINANT_DUO_MIXED";
22281
22320
  const LAVER_CUP = "LAVER_CUP";
22282
22321
  const TEAM_DOUBLES_3_AGGREGATION = "TEAM_DOUBLES_3_AGGREGATION";
22283
- const TIME_TENNIS = "TIME_TENNIS";
22322
+ const TIME_TENNIS_DUAL = "TIME_TENNIS_DUAL";
22323
+ const TIME_TENNIS_PRO_CIRCUIT = "TIME_TENNIS_PRO_CIRCUIT";
22284
22324
  const USTA_BREWER_CUP = "USTA_BREWER_CUP";
22285
22325
  const USTA_OZAKI_CUP = "USTA_OZAKI_CUP";
22286
22326
  const USTA_COLLEGE = "USTA_COLLEGE";
@@ -22350,7 +22390,8 @@ const namedFormats = {
22350
22390
  [DOMINANT_DUO]: DOMINANT_DUO_TIE_FORMAT,
22351
22391
  [DOMINANT_DUO_MIXED]: DOMINANT_DUO_MIXED_TIE_FORMAT,
22352
22392
  [TEAM_DOUBLES_3_AGGREGATION]: TEAM_AGGREGATION_TIE_FORMAT,
22353
- [TIME_TENNIS]: TIME_TENNIS_TIE_FORMAT,
22393
+ [TIME_TENNIS_DUAL]: TIME_TENNIS_DUAL_TIE_FORMAT,
22394
+ [TIME_TENNIS_PRO_CIRCUIT]: TIME_TENNIS_PRO_TIE_FORMAT,
22354
22395
  [USTA_BREWER_CUP]: USTA_BREWER_CUP_TIE_FORMAT,
22355
22396
  [USTA_OZAKI_CUP]: USTA_OZAKI_CUP_TIE_FORMAT,
22356
22397
  [USTA_COLLEGE]: USTA_COLLEGE_TIE_FORMAT,
@@ -22367,7 +22408,7 @@ const tieFormatDefaults = (params) => {
22367
22408
  const namedFormat = params?.namedFormat && Object.keys(namedFormats).includes(params.namedFormat) ? params.namedFormat : STANDARD;
22368
22409
  const uuids = Array.isArray(params?.uuids) ? params?.uuids : [];
22369
22410
  let tieFormat;
22370
- const { category, gender } = params?.event || {};
22411
+ const { category, gender } = params?.event ?? {};
22371
22412
  const template = makeDeepCopy(namedFormats[namedFormat], false, true);
22372
22413
  if (!template.hydrate) {
22373
22414
  template.collectionDefinitions.forEach(
@@ -22381,14 +22422,14 @@ const tieFormatDefaults = (params) => {
22381
22422
  },
22382
22423
  collectionDefinitions: [
22383
22424
  {
22384
- collectionId: uuids?.pop() || UUID(),
22425
+ collectionId: uuids?.pop() ?? UUID(),
22385
22426
  matchUpFormat: FORMAT_ATP_DOUBLES,
22386
22427
  matchUpType: TypeEnum.Doubles,
22387
22428
  collectionName: "Doubles",
22388
22429
  ...template.doubles
22389
22430
  },
22390
22431
  {
22391
- collectionId: uuids?.pop() || UUID(),
22432
+ collectionId: uuids?.pop() ?? UUID(),
22392
22433
  matchUpType: TypeEnum.Singles,
22393
22434
  matchUpFormat: FORMAT_STANDARD,
22394
22435
  collectionName: "Singles",