tods-competition-factory 0.89.0 → 0.90.2

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.
@@ -249,7 +249,7 @@ const matchUpFormatCode = {
249
249
  };
250
250
 
251
251
  function factoryVersion() {
252
- return '0.89.0';
252
+ return '0.90.2';
253
253
  }
254
254
 
255
255
  const FORMAT_STANDARD = 'SET3-S:6/TB7'; // Best of 3 Tiebreak Sets to 6
@@ -7379,7 +7379,7 @@ const countries = [{
7379
7379
  phone: '263'
7380
7380
  }];
7381
7381
 
7382
- var collectionDefinitions$9 = [
7382
+ var collectionDefinitions$d = [
7383
7383
  {
7384
7384
  collectionName: "Doubles",
7385
7385
  matchUpCount: 3,
@@ -7395,17 +7395,17 @@ var collectionDefinitions$9 = [
7395
7395
  matchUpValue: 1
7396
7396
  }
7397
7397
  ];
7398
- var tieFormatName$8 = "COLLEGE_D3";
7399
- var winCriteria$9 = {
7398
+ var tieFormatName$c = "COLLEGE_D3";
7399
+ var winCriteria$d = {
7400
7400
  valueGoal: 5
7401
7401
  };
7402
7402
  var COLLEGE_D3$1 = {
7403
- collectionDefinitions: collectionDefinitions$9,
7404
- tieFormatName: tieFormatName$8,
7405
- winCriteria: winCriteria$9
7403
+ collectionDefinitions: collectionDefinitions$d,
7404
+ tieFormatName: tieFormatName$c,
7405
+ winCriteria: winCriteria$d
7406
7406
  };
7407
7407
 
7408
- var collectionDefinitions$8 = [
7408
+ var collectionDefinitions$c = [
7409
7409
  {
7410
7410
  collectionName: "Doubles",
7411
7411
  collectionValue: 1,
@@ -7421,17 +7421,17 @@ var collectionDefinitions$8 = [
7421
7421
  matchUpValue: 1
7422
7422
  }
7423
7423
  ];
7424
- var tieFormatName$7 = "COLLEGE_DEFAULT";
7425
- var winCriteria$8 = {
7424
+ var tieFormatName$b = "COLLEGE_DEFAULT";
7425
+ var winCriteria$c = {
7426
7426
  valueGoal: 5
7427
7427
  };
7428
7428
  var COLLEGE_DEFAULT$1 = {
7429
- collectionDefinitions: collectionDefinitions$8,
7430
- tieFormatName: tieFormatName$7,
7431
- winCriteria: winCriteria$8
7429
+ collectionDefinitions: collectionDefinitions$c,
7430
+ tieFormatName: tieFormatName$b,
7431
+ winCriteria: winCriteria$c
7432
7432
  };
7433
7433
 
7434
- var collectionDefinitions$7 = [
7434
+ var collectionDefinitions$b = [
7435
7435
  {
7436
7436
  collectionName: "Doubles",
7437
7437
  matchUpCount: 3,
@@ -7447,21 +7447,21 @@ var collectionDefinitions$7 = [
7447
7447
  matchUpValue: 1
7448
7448
  }
7449
7449
  ];
7450
- var tieFormatName$6 = "COLLEGE_JUCO";
7451
- var winCriteria$7 = {
7450
+ var tieFormatName$a = "COLLEGE_JUCO";
7451
+ var winCriteria$b = {
7452
7452
  valueGoal: 5
7453
7453
  };
7454
7454
  var COLLEGE_JUCO$1 = {
7455
- collectionDefinitions: collectionDefinitions$7,
7456
- tieFormatName: tieFormatName$6,
7457
- winCriteria: winCriteria$7
7455
+ collectionDefinitions: collectionDefinitions$b,
7456
+ tieFormatName: tieFormatName$a,
7457
+ winCriteria: winCriteria$b
7458
7458
  };
7459
7459
 
7460
- var collectionDefinitions$6 = [
7460
+ var collectionDefinitions$a = [
7461
7461
  {
7462
7462
  collectionName: "Doubles",
7463
7463
  matchUpCount: 1,
7464
- matchUpFormat: "SET1-S:6/TB10",
7464
+ matchUpFormat: "SET1-S:8/TB7",
7465
7465
  matchUpType: "DOUBLES",
7466
7466
  matchUpValue: 1
7467
7467
  },
@@ -7473,20 +7473,55 @@ var collectionDefinitions$6 = [
7473
7473
  matchUpValue: 1
7474
7474
  }
7475
7475
  ];
7476
- var tieFormatName$5 = "DOMINANT_DUO";
7477
- var winCriteria$6 = {
7476
+ var tieFormatName$9 = "DOMINANT_DUO";
7477
+ var winCriteria$a = {
7478
7478
  valueGoal: 2
7479
7479
  };
7480
7480
  var DOMINANT_DUO_TIE_FORMAT = {
7481
- collectionDefinitions: collectionDefinitions$6,
7482
- tieFormatName: tieFormatName$5,
7483
- winCriteria: winCriteria$6
7481
+ collectionDefinitions: collectionDefinitions$a,
7482
+ tieFormatName: tieFormatName$9,
7483
+ winCriteria: winCriteria$a
7484
7484
  };
7485
7485
 
7486
- var winCriteria$5 = {
7486
+ var collectionDefinitions$9 = [
7487
+ {
7488
+ collectionName: "Mixed Doubles",
7489
+ matchUpCount: 1,
7490
+ matchUpFormat: "SET1-S:8/TB7",
7491
+ matchUpType: "DOUBLES",
7492
+ matchUpValue: 1
7493
+ },
7494
+ {
7495
+ collectionName: "Boys Singles",
7496
+ matchUpCount: 1,
7497
+ gender: "MALE",
7498
+ matchUpFormat: "SET3-S:6/TB7-F:TB10",
7499
+ matchUpType: "SINGLES",
7500
+ matchUpValue: 1
7501
+ },
7502
+ {
7503
+ collectionName: "Girls Singles",
7504
+ gender: "FEMALE",
7505
+ matchUpCount: 1,
7506
+ matchUpFormat: "SET3-S:6/TB7-F:TB10",
7507
+ matchUpType: "SINGLES",
7508
+ matchUpValue: 1
7509
+ }
7510
+ ];
7511
+ var tieFormatName$8 = "DOMINANT_DUO_MIXED";
7512
+ var winCriteria$9 = {
7513
+ valueGoal: 2
7514
+ };
7515
+ var DOMINANT_DUO_MIXED_TIE_FORMAT = {
7516
+ collectionDefinitions: collectionDefinitions$9,
7517
+ tieFormatName: tieFormatName$8,
7518
+ winCriteria: winCriteria$9
7519
+ };
7520
+
7521
+ var winCriteria$8 = {
7487
7522
  valueGoal: 13
7488
7523
  };
7489
- var collectionDefinitions$5 = [
7524
+ var collectionDefinitions$8 = [
7490
7525
  {
7491
7526
  collectionGroupNumber: 1,
7492
7527
  matchUpType: "DOUBLES",
@@ -7545,12 +7580,12 @@ var collectionGroups = [
7545
7580
  }
7546
7581
  ];
7547
7582
  var LAVER_CUP_TIE_FORMAT = {
7548
- winCriteria: winCriteria$5,
7549
- collectionDefinitions: collectionDefinitions$5,
7583
+ winCriteria: winCriteria$8,
7584
+ collectionDefinitions: collectionDefinitions$8,
7550
7585
  collectionGroups: collectionGroups
7551
7586
  };
7552
7587
 
7553
- var collectionDefinitions$4 = [
7588
+ var collectionDefinitions$7 = [
7554
7589
  {
7555
7590
  collectionName: "Round 1",
7556
7591
  matchUpCount: 3,
@@ -7573,19 +7608,117 @@ var collectionDefinitions$4 = [
7573
7608
  scoreValue: 1
7574
7609
  }
7575
7610
  ];
7576
- var tieFormatName$4 = "Doubles Shuffle";
7611
+ var tieFormatName$7 = "Doubles Shuffle";
7577
7612
  var unrestrictedSelections = true;
7578
- var winCriteria$4 = {
7613
+ var winCriteria$7 = {
7579
7614
  aggregateValue: true
7580
7615
  };
7581
7616
  var TEAM_AGGREGATION_TIE_FORMAT = {
7582
- collectionDefinitions: collectionDefinitions$4,
7583
- tieFormatName: tieFormatName$4,
7617
+ collectionDefinitions: collectionDefinitions$7,
7618
+ tieFormatName: tieFormatName$7,
7584
7619
  unrestrictedSelections: unrestrictedSelections,
7585
- winCriteria: winCriteria$4
7620
+ winCriteria: winCriteria$7
7586
7621
  };
7587
7622
 
7588
- var collectionDefinitions$3 = [
7623
+ var collectionDefinitions$6 = [
7624
+ {
7625
+ category: {
7626
+ ageCategoryCode: "14U"
7627
+ },
7628
+ collectionName: "14U Singles",
7629
+ matchUpCount: 2,
7630
+ matchUpFormat: "SET3-S:6/TB7-F:TB10",
7631
+ matchUpType: "SINGLES",
7632
+ matchUpValue: 1
7633
+ },
7634
+ {
7635
+ category: {
7636
+ ageCategoryCode: "16U"
7637
+ },
7638
+ collectionName: "16U Singles",
7639
+ matchUpCount: 2,
7640
+ matchUpFormat: "SET3-S:6/TB7-F:TB10",
7641
+ matchUpType: "SINGLES",
7642
+ matchUpValue: 1
7643
+ },
7644
+ {
7645
+ category: {
7646
+ ageCategoryCode: "18U"
7647
+ },
7648
+ collectionName: "18U Singles",
7649
+ matchUpCount: 2,
7650
+ matchUpFormat: "SET3-S:6/TB7-F:TB10",
7651
+ matchUpType: "SINGLES",
7652
+ matchUpValue: 1
7653
+ },
7654
+ {
7655
+ category: {
7656
+ ageCategoryCode: "14U"
7657
+ },
7658
+ collectionName: "14U Doubles",
7659
+ matchUpCount: 1,
7660
+ matchUpFormat: "SET1-S:8/TB7",
7661
+ matchUpType: "DOUBLES",
7662
+ matchUpValue: 1
7663
+ },
7664
+ {
7665
+ category: {
7666
+ ageCategoryCode: "16U"
7667
+ },
7668
+ collectionName: "16U Doubles",
7669
+ matchUpCount: 1,
7670
+ matchUpFormat: "SET1-S:8/TB7",
7671
+ matchUpType: "DOUBLES",
7672
+ matchUpValue: 1
7673
+ },
7674
+ {
7675
+ category: {
7676
+ ageCategoryCode: "18U"
7677
+ },
7678
+ collectionName: "18U Doubles",
7679
+ matchUpCount: 1,
7680
+ matchUpFormat: "SET1-S:8/TB7",
7681
+ matchUpType: "DOUBLES",
7682
+ matchUpValue: 1
7683
+ }
7684
+ ];
7685
+ var tieFormatName$6 = "USTA_BREWER_CUP";
7686
+ var winCriteria$6 = {
7687
+ valueGoal: 5
7688
+ };
7689
+ var USTA_BREWER_CUP_TIE_FORMAT = {
7690
+ collectionDefinitions: collectionDefinitions$6,
7691
+ tieFormatName: tieFormatName$6,
7692
+ winCriteria: winCriteria$6
7693
+ };
7694
+
7695
+ var collectionDefinitions$5 = [
7696
+ {
7697
+ collectionName: "Doubles",
7698
+ matchUpCount: 3,
7699
+ matchUpFormat: "SET1-S:8/TB7@7",
7700
+ matchUpType: "DOUBLES",
7701
+ matchUpValue: 1
7702
+ },
7703
+ {
7704
+ collectionName: "Singles",
7705
+ matchUpCount: 6,
7706
+ matchUpFormat: "SET1-S:8",
7707
+ matchUpType: "SINGLES",
7708
+ matchUpValue: 1
7709
+ }
7710
+ ];
7711
+ var tieFormatName$5 = "USTA_COLLEGE";
7712
+ var winCriteria$5 = {
7713
+ valueGoal: 5
7714
+ };
7715
+ var USTA_COLLEGE_TIE_FORMAT = {
7716
+ collectionDefinitions: collectionDefinitions$5,
7717
+ tieFormatName: tieFormatName$5,
7718
+ winCriteria: winCriteria$5
7719
+ };
7720
+
7721
+ var collectionDefinitions$4 = [
7589
7722
  {
7590
7723
  collectionName: "Boys Singles",
7591
7724
  matchUpCount: 6,
@@ -7622,17 +7755,17 @@ var collectionDefinitions$3 = [
7622
7755
  matchUpValue: 1
7623
7756
  }
7624
7757
  ];
7625
- var tieFormatName$3 = "USTA_INTERSECTIONAL";
7626
- var winCriteria$3 = {
7758
+ var tieFormatName$4 = "USTA_INTERSECTIONAL";
7759
+ var winCriteria$4 = {
7627
7760
  valueGoal: 8
7628
7761
  };
7629
7762
  var USTA_INTERSECTIONAL_TIE_FORMAT = {
7630
- collectionDefinitions: collectionDefinitions$3,
7631
- tieFormatName: tieFormatName$3,
7632
- winCriteria: winCriteria$3
7763
+ collectionDefinitions: collectionDefinitions$4,
7764
+ tieFormatName: tieFormatName$4,
7765
+ winCriteria: winCriteria$4
7633
7766
  };
7634
7767
 
7635
- var collectionDefinitions$2 = [
7768
+ var collectionDefinitions$3 = [
7636
7769
  {
7637
7770
  collectionName: "Boys Singles",
7638
7771
  matchUpCount: 6,
@@ -7662,17 +7795,17 @@ var collectionDefinitions$2 = [
7662
7795
  matchUpValue: 1
7663
7796
  }
7664
7797
  ];
7665
- var tieFormatName$2 = "USTA_LEVEL_1";
7666
- var winCriteria$2 = {
7798
+ var tieFormatName$3 = "USTA_LEVEL_1";
7799
+ var winCriteria$3 = {
7667
7800
  valueGoal: 10
7668
7801
  };
7669
7802
  var USTA_LEVEL_1_TIE_FORMAT = {
7670
- collectionDefinitions: collectionDefinitions$2,
7671
- tieFormatName: tieFormatName$2,
7672
- winCriteria: winCriteria$2
7803
+ collectionDefinitions: collectionDefinitions$3,
7804
+ tieFormatName: tieFormatName$3,
7805
+ winCriteria: winCriteria$3
7673
7806
  };
7674
7807
 
7675
- var collectionDefinitions$1 = [
7808
+ var collectionDefinitions$2 = [
7676
7809
  {
7677
7810
  collectionName: "Boys Singles",
7678
7811
  matchUpCount: 6,
@@ -7695,11 +7828,62 @@ var collectionDefinitions$1 = [
7695
7828
  matchUpValue: 1
7696
7829
  }
7697
7830
  ];
7698
- var tieFormatName$1 = "USTA_SOUTHERN_LEVEL_5";
7699
- var winCriteria$1 = {
7831
+ var tieFormatName$2 = "USTA_SOUTHERN_LEVEL_5";
7832
+ var winCriteria$2 = {
7700
7833
  valueGoal: 8
7701
7834
  };
7702
7835
  var USTA_SOUTHERN_LEVEL_5_TIE_FORMAT = {
7836
+ collectionDefinitions: collectionDefinitions$2,
7837
+ tieFormatName: tieFormatName$2,
7838
+ winCriteria: winCriteria$2
7839
+ };
7840
+
7841
+ var collectionDefinitions$1 = [
7842
+ {
7843
+ collectionName: "Boys Singles",
7844
+ matchUpCount: 1,
7845
+ gender: "MALE",
7846
+ matchUpFormat: "SET3-S:6/TB7-F:TB10",
7847
+ matchUpType: "SINGLES",
7848
+ matchUpValue: 1
7849
+ },
7850
+ {
7851
+ collectionName: "Girls Singles",
7852
+ gender: "FEMALE",
7853
+ matchUpCount: 1,
7854
+ matchUpFormat: "SET3-S:6/TB7-F:TB10",
7855
+ matchUpType: "SINGLES",
7856
+ matchUpValue: 1
7857
+ },
7858
+ {
7859
+ collectionName: "Boys Doubles",
7860
+ gender: "MALE",
7861
+ matchUpCount: 1,
7862
+ matchUpFormat: "SET1-S:8/TB7",
7863
+ matchUpType: "DOUBLES",
7864
+ matchUpValue: 1
7865
+ },
7866
+ {
7867
+ collectionName: "Girls Doubles",
7868
+ gender: "FEMALE",
7869
+ matchUpCount: 1,
7870
+ matchUpFormat: "SET1-S:8/TB7",
7871
+ matchUpType: "DOUBLES",
7872
+ matchUpValue: 1
7873
+ },
7874
+ {
7875
+ collectionName: "Mixed Doubles",
7876
+ matchUpCount: 1,
7877
+ matchUpFormat: "SET1-S:8/TB7",
7878
+ matchUpType: "DOUBLES",
7879
+ matchUpValue: 1
7880
+ }
7881
+ ];
7882
+ var tieFormatName$1 = "USTA_WTT";
7883
+ var winCriteria$1 = {
7884
+ valueGoal: 3
7885
+ };
7886
+ var USTA_WTT_TIE_FORMAT = {
7703
7887
  collectionDefinitions: collectionDefinitions$1,
7704
7888
  tieFormatName: tieFormatName$1,
7705
7889
  winCriteria: winCriteria$1
@@ -7757,11 +7941,15 @@ const tieFormats = {
7757
7941
  COLLEGE_DEFAULT: COLLEGE_DEFAULT$1,
7758
7942
  COLLEGE_JUCO: COLLEGE_JUCO$1,
7759
7943
  DOMINANT_DUO: DOMINANT_DUO_TIE_FORMAT,
7944
+ DOMINANT_DUO_MIXED: DOMINANT_DUO_MIXED_TIE_FORMAT,
7760
7945
  LAVER_CUP: LAVER_CUP_TIE_FORMAT,
7761
7946
  TEAM_DOUBLES_3_AGGREGATION: TEAM_AGGREGATION_TIE_FORMAT,
7947
+ USTA_BREWER_CUP: USTA_BREWER_CUP_TIE_FORMAT,
7948
+ USTA_COLLEGE: USTA_COLLEGE_TIE_FORMAT,
7762
7949
  USTA_INTERSECTIONAL: USTA_INTERSECTIONAL_TIE_FORMAT,
7763
7950
  USTA_LEVEL_1: USTA_LEVEL_1_TIE_FORMAT,
7764
7951
  USTA_SOUTHERN_LEVEL_5: USTA_SOUTHERN_LEVEL_5_TIE_FORMAT,
7952
+ USTA_WTT: USTA_WTT_TIE_FORMAT,
7765
7953
  USTA_ZONAL: USTA_ZONAL_TIE_FORMAT
7766
7954
  };
7767
7955
 
@@ -39655,7 +39843,7 @@ function getExitProfiles({
39655
39843
  };
39656
39844
 
39657
39845
  function addExitProfiles(exitProfiles, exitProfile, stage, structureId, targetRound) {
39658
- if (!exitProfiles[structureId]) exitProfiles[structureId] = []; // initialStructure of CONSOLATION and PLAYOFF do not need to be captured
39846
+ if (!exitProfiles[structureId]) exitProfiles[structureId] = []; // initialStructure of CONSOLATION and PLAY_OFF do not need to be captured
39659
39847
 
39660
39848
  if (!(exitProfile === '0' && [CONSOLATION, PLAY_OFF].includes(stage))) exitProfiles[structureId].push(exitProfile);
39661
39849
  const relevantLinks = links.filter(link => link.source.structureId === structureId && link.source.roundNumber >= targetRound);
@@ -40742,7 +40930,7 @@ function addParticipantScaleItem({
40742
40930
 
40743
40931
  const scaleItemAttributes = scaleItem && Object.keys(scaleItem);
40744
40932
  const requiredAttributes = ['scaleType', 'eventType', 'scaleName'];
40745
- const validScaleItem = requiredAttributes.filter(attribute => scaleItemAttributes.includes(attribute)).length === requiredAttributes.length;
40933
+ const validScaleItem = requiredAttributes.filter(attribute => scaleItemAttributes.includes(attribute) && scaleItem[attribute]).length === requiredAttributes.length;
40746
40934
  if (!validScaleItem) return {
40747
40935
  error: INVALID_SCALE_ITEM
40748
40936
  };
@@ -44032,23 +44220,31 @@ const COLLEGE_DEFAULT = 'COLLEGE_DEFAULT';
44032
44220
  const COLLEGE_JUCO = 'COLLEGE_JUCO';
44033
44221
  const COLLEGE_D3 = 'COLLEGE_D3';
44034
44222
  const DOMINANT_DUO = 'DOMINANT_DUO';
44223
+ const DOMINANT_DUO_MIXED = 'DOMINANT_DUO_MIXED';
44035
44224
  const LAVER_CUP = 'LAVER_CUP';
44036
44225
  const TEAM_DOUBLES_3_AGGREGATION = 'TEAM_DOUBLES_3_AGGREGATION';
44226
+ const USTA_BREWER_CUP = 'USTA_BREWER_CUP';
44227
+ const USTA_COLLEGE = 'USTA_COLLEGE';
44037
44228
  const USTA_LEVEL_1 = 'USTA_LEVEL_1';
44038
- const USTA_ZONAL = 'USTA_ZONAL';
44039
44229
  const USTA_INTERSECTIONAL = 'USTA_INTERSECTIONAL';
44040
44230
  const USTA_SOUTHERN_LEVEL_5 = 'USTA_SOUTHERN_LEVEL_5';
44231
+ const USTA_WTT = 'USTA_WTT';
44232
+ const USTA_ZONAL = 'USTA_ZONAL';
44041
44233
  const tieFormatConstants = {
44042
44234
  COLLEGE_D3,
44043
44235
  COLLEGE_DEFAULT,
44044
44236
  COLLEGE_JUCO,
44045
44237
  DOMINANT_DUO,
44238
+ DOMINANT_DUO_MIXED,
44046
44239
  LAVER_CUP,
44047
44240
  TEAM_DOUBLES_3_AGGREGATION,
44048
- USTA_LEVEL_1,
44049
- USTA_ZONAL,
44241
+ USTA_BREWER_CUP,
44242
+ USTA_COLLEGE,
44050
44243
  USTA_INTERSECTIONAL,
44051
- USTA_SOUTHERN_LEVEL_5
44244
+ USTA_LEVEL_1,
44245
+ USTA_SOUTHERN_LEVEL_5,
44246
+ USTA_WTT,
44247
+ USTA_ZONAL
44052
44248
  };
44053
44249
 
44054
44250
  const namedFormats = {
@@ -44111,10 +44307,14 @@ const namedFormats = {
44111
44307
  },
44112
44308
  [LAVER_CUP]: LAVER_CUP_TIE_FORMAT,
44113
44309
  [DOMINANT_DUO]: DOMINANT_DUO_TIE_FORMAT,
44310
+ [DOMINANT_DUO_MIXED]: DOMINANT_DUO_MIXED_TIE_FORMAT,
44114
44311
  [TEAM_DOUBLES_3_AGGREGATION]: TEAM_AGGREGATION_TIE_FORMAT,
44312
+ [USTA_BREWER_CUP]: USTA_BREWER_CUP_TIE_FORMAT,
44313
+ [USTA_COLLEGE]: USTA_COLLEGE_TIE_FORMAT,
44115
44314
  [USTA_INTERSECTIONAL]: USTA_INTERSECTIONAL_TIE_FORMAT,
44116
44315
  [USTA_LEVEL_1]: USTA_LEVEL_1_TIE_FORMAT,
44117
44316
  [USTA_SOUTHERN_LEVEL_5]: USTA_SOUTHERN_LEVEL_5_TIE_FORMAT,
44317
+ [USTA_WTT]: USTA_WTT_TIE_FORMAT,
44118
44318
  [USTA_ZONAL]: USTA_ZONAL_TIE_FORMAT
44119
44319
  };
44120
44320
  const tieFormatDefaults = ({
@@ -53139,6 +53339,7 @@ function generateEventWithFlights({
53139
53339
  tieFormatName,
53140
53340
  discipline,
53141
53341
  eventLevel,
53342
+ timeItems,
53142
53343
  ballType,
53143
53344
  category
53144
53345
  } = eventProfile;
@@ -53206,6 +53407,13 @@ function generateEventWithFlights({
53206
53407
  });
53207
53408
  }
53208
53409
 
53410
+ if (Array.isArray(timeItems)) {
53411
+ timeItems.forEach(timeItem => addEventTimeItem({
53412
+ event,
53413
+ timeItem
53414
+ }));
53415
+ }
53416
+
53209
53417
  if (typeof policyDefinitions === 'object') {
53210
53418
  for (const policyType of Object.keys(policyDefinitions)) {
53211
53419
  attachEventPolicies({
@@ -53215,8 +53423,10 @@ function generateEventWithFlights({
53215
53423
  event: newEvent
53216
53424
  });
53217
53425
  }
53218
- }
53426
+ } // only update on event since category is used in participant generation
53219
53427
 
53428
+
53429
+ if (newEvent.category) newEvent.category.categoryName = categoryName;
53220
53430
  let result = addEvent({
53221
53431
  tournamentRecord,
53222
53432
  event: newEvent
@@ -53295,6 +53505,7 @@ function generateEventWithDraw({
53295
53505
  alternatesCount = 0,
53296
53506
  generate = true,
53297
53507
  eventExtensions,
53508
+ timeItems,
53298
53509
  drawExtensions,
53299
53510
  completionGoal,
53300
53511
  drawSize = 32,
@@ -53332,6 +53543,14 @@ function generateEventWithDraw({
53332
53543
  category,
53333
53544
  eventId
53334
53545
  };
53546
+
53547
+ if (Array.isArray(timeItems)) {
53548
+ timeItems.forEach(timeItem => addEventTimeItem({
53549
+ event,
53550
+ timeItem
53551
+ }));
53552
+ }
53553
+
53335
53554
  let {
53336
53555
  eventAttributes
53337
53556
  } = drawProfile;
@@ -53377,7 +53596,9 @@ function generateEventWithDraw({
53377
53596
  participantType,
53378
53597
  idPrefix,
53379
53598
  category
53380
- });
53599
+ }); // update categoryName **after** generating participants
53600
+
53601
+ if (event.category) event.category.categoryName = categoryName;
53381
53602
 
53382
53603
  if (tournamentRecord) {
53383
53604
  const result = addParticipants({