tods-competition-factory 1.8.33 → 1.8.34

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.
@@ -2929,7 +2929,7 @@ var matchUpFormatCode = {
2929
2929
  };
2930
2930
 
2931
2931
  function factoryVersion() {
2932
- return '1.8.33';
2932
+ return '1.8.34';
2933
2933
  }
2934
2934
 
2935
2935
  function getObjectTieFormat(obj) {
@@ -9706,7 +9706,7 @@ function getAllStructureMatchUps(_a) {
9706
9706
  matchUps: matchUps,
9707
9707
  };
9708
9708
  function addMatchUpContext(_a) {
9709
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
9709
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
9710
9710
  var scheduleVisibilityFilters = _a.scheduleVisibilityFilters, sourceDrawPositionRanges = _a.sourceDrawPositionRanges, drawPositionsRanges = _a.drawPositionsRanges, initialRoundOfPlay = _a.initialRoundOfPlay, additionalContext = _a.additionalContext, roundNamingProfile = _a.roundNamingProfile, tieDrawPositions = _a.tieDrawPositions, appliedPolicies = _a.appliedPolicies, isCollectionBye = _a.isCollectionBye, matchUpTieId = _a.matchUpTieId, isRoundRobin = _a.isRoundRobin, roundProfile = _a.roundProfile, sideLineUps = _a.sideLineUps, matchUp = _a.matchUp, event = _a.event;
9711
9711
  additionalContext = additionalContext !== null && additionalContext !== void 0 ? additionalContext : {};
9712
9712
  var tieFormat = (_b = resolveTieFormat({
@@ -9727,7 +9727,7 @@ function getAllStructureMatchUps(_a) {
9727
9727
  (drawDefinition === null || drawDefinition === void 0 ? void 0 : drawDefinition.matchUpType) ||
9728
9728
  ((event === null || event === void 0 ? void 0 : event.eventType) !== TEAM$1 && (event === null || event === void 0 ? void 0 : event.eventType));
9729
9729
  var matchUpStatus = isCollectionBye ? BYE : matchUp.matchUpStatus;
9730
- var _z = getMatchUpScheduleDetails({
9730
+ var _1 = getMatchUpScheduleDetails({
9731
9731
  scheduleVisibilityFilters: scheduleVisibilityFilters,
9732
9732
  afterRecoveryTimes: afterRecoveryTimes,
9733
9733
  tournamentRecord: tournamentRecord,
@@ -9736,7 +9736,7 @@ function getAllStructureMatchUps(_a) {
9736
9736
  matchUpType: matchUpType,
9737
9737
  matchUp: matchUp,
9738
9738
  event: event,
9739
- }), schedule = _z.schedule, endDate = _z.endDate;
9739
+ }), schedule = _1.schedule, endDate = _1.endDate;
9740
9740
  var drawPositions = (_f = tieDrawPositions !== null && tieDrawPositions !== void 0 ? tieDrawPositions : matchUp.drawPositions) !== null && _f !== void 0 ? _f : [];
9741
9741
  var collectionPosition = matchUp.collectionPosition, collectionId = matchUp.collectionId, roundPosition = matchUp.roundPosition;
9742
9742
  var roundNumber = (_g = matchUp.roundNumber) !== null && _g !== void 0 ? _g : additionalContext.roundNumber;
@@ -9767,28 +9767,28 @@ function getAllStructureMatchUps(_a) {
9767
9767
  var sourceDrawPositionRoundRanges = sourceDrawPositionRanges === null || sourceDrawPositionRanges === void 0 ? void 0 : sourceDrawPositionRanges[roundNumber];
9768
9768
  // if part of a tie matchUp and collectionDefinition has a category definition, prioritize
9769
9769
  var matchUpCategory = (collectionDefinition === null || collectionDefinition === void 0 ? void 0 : collectionDefinition.category)
9770
- ? __assign(__assign({}, ((context === null || context === void 0 ? void 0 : context.category) || {})), collectionDefinition.category) : context === null || context === void 0 ? void 0 : context.category;
9771
- var processCodes = (((_o = matchUp.processCodes) === null || _o === void 0 ? void 0 : _o.length) && matchUp.processCodes) ||
9772
- (((_p = collectionDefinition === null || collectionDefinition === void 0 ? void 0 : collectionDefinition.processCodes) === null || _p === void 0 ? void 0 : _p.length) &&
9770
+ ? __assign(__assign({}, ((context === null || context === void 0 ? void 0 : context.category) || {})), collectionDefinition.category) : (_o = context === null || context === void 0 ? void 0 : context.category) !== null && _o !== void 0 ? _o : event === null || event === void 0 ? void 0 : event.category;
9771
+ var processCodes = (((_p = matchUp.processCodes) === null || _p === void 0 ? void 0 : _p.length) && matchUp.processCodes) ||
9772
+ (((_q = collectionDefinition === null || collectionDefinition === void 0 ? void 0 : collectionDefinition.processCodes) === null || _q === void 0 ? void 0 : _q.length) &&
9773
9773
  (collectionDefinition === null || collectionDefinition === void 0 ? void 0 : collectionDefinition.processCodes)) ||
9774
- (((_q = structure === null || structure === void 0 ? void 0 : structure.processCodes) === null || _q === void 0 ? void 0 : _q.length) && (structure === null || structure === void 0 ? void 0 : structure.processCodes)) ||
9775
- (((_r = drawDefinition === null || drawDefinition === void 0 ? void 0 : drawDefinition.processCodes) === null || _r === void 0 ? void 0 : _r.length) && (drawDefinition === null || drawDefinition === void 0 ? void 0 : drawDefinition.processCodes)) ||
9776
- (((_s = event === null || event === void 0 ? void 0 : event.processCodes) === null || _s === void 0 ? void 0 : _s.length) && (event === null || event === void 0 ? void 0 : event.processCodes)) ||
9774
+ (((_r = structure === null || structure === void 0 ? void 0 : structure.processCodes) === null || _r === void 0 ? void 0 : _r.length) && (structure === null || structure === void 0 ? void 0 : structure.processCodes)) ||
9775
+ (((_s = drawDefinition === null || drawDefinition === void 0 ? void 0 : drawDefinition.processCodes) === null || _s === void 0 ? void 0 : _s.length) && (drawDefinition === null || drawDefinition === void 0 ? void 0 : drawDefinition.processCodes)) ||
9776
+ (((_t = event === null || event === void 0 ? void 0 : event.processCodes) === null || _t === void 0 ? void 0 : _t.length) && (event === null || event === void 0 ? void 0 : event.processCodes)) ||
9777
9777
  (tournamentRecord === null || tournamentRecord === void 0 ? void 0 : tournamentRecord.processCodes);
9778
9778
  var competitiveProfile = (contextProfile === null || contextProfile === void 0 ? void 0 : contextProfile.withCompetitiveness) &&
9779
9779
  getMatchUpCompetitiveProfile(__assign(__assign({}, contextContent), { matchUp: matchUp }));
9780
9780
  // necessry for SINGLES/DOUBLES matchUps that are part of TEAM tournaments
9781
- var finishingPositionRange = (_t = matchUp.finishingPositionRange) !== null && _t !== void 0 ? _t : additionalContext.finishingPositionRange;
9781
+ var finishingPositionRange = (_u = matchUp.finishingPositionRange) !== null && _u !== void 0 ? _u : additionalContext.finishingPositionRange;
9782
9782
  // order is important here as Round Robin matchUps already have inContext structureId
9783
9783
  var onlyDefined = function (obj) { return definedAttributes(obj, undefined, true); };
9784
9784
  var matchUpWithContext = __assign(__assign(__assign({}, onlyDefined(context)), onlyDefined({
9785
9785
  matchUpFormat: matchUp.matchUpType === TEAM$1 ? undefined : matchUpFormat,
9786
9786
  tieFormat: matchUp.matchUpType !== TEAM$1 ? undefined : tieFormat,
9787
+ gender: (_v = collectionDefinition === null || collectionDefinition === void 0 ? void 0 : collectionDefinition.gender) !== null && _v !== void 0 ? _v : event === null || event === void 0 ? void 0 : event.gender,
9787
9788
  roundOfPlay: stage !== QUALIFYING &&
9788
9789
  isConvertableInteger(initialRoundOfPlay) &&
9789
9790
  initialRoundOfPlay + (roundNumber || 0),
9790
- endDate: (_u = matchUp.endDate) !== null && _u !== void 0 ? _u : endDate,
9791
- gender: collectionDefinition === null || collectionDefinition === void 0 ? void 0 : collectionDefinition.gender,
9791
+ endDate: (_w = matchUp.endDate) !== null && _w !== void 0 ? _w : endDate,
9792
9792
  discipline: event === null || event === void 0 ? void 0 : event.discipline,
9793
9793
  category: matchUpCategory,
9794
9794
  finishingPositionRange: finishingPositionRange,
@@ -9816,9 +9816,9 @@ function getAllStructureMatchUps(_a) {
9816
9816
  drawId: drawId,
9817
9817
  stage: stage,
9818
9818
  })), makeDeepCopy(onlyDefined(matchUp), true, true));
9819
- if (matchUpFormat && ((_v = matchUp.score) === null || _v === void 0 ? void 0 : _v.scoreStringSide1)) {
9819
+ if (matchUpFormat && ((_x = matchUp.score) === null || _x === void 0 ? void 0 : _x.scoreStringSide1)) {
9820
9820
  var parsedFormat = parse(matchUpFormat);
9821
- var _0 = parsedFormat !== null && parsedFormat !== void 0 ? parsedFormat : {}, bestOf_1 = _0.bestOf, finalSetFormat_1 = _0.finalSetFormat, setFormat_1 = _0.setFormat;
9821
+ var _2 = parsedFormat !== null && parsedFormat !== void 0 ? parsedFormat : {}, bestOf_1 = _2.bestOf, finalSetFormat_1 = _2.finalSetFormat, setFormat_1 = _2.setFormat;
9822
9822
  if ((finalSetFormat_1 === null || finalSetFormat_1 === void 0 ? void 0 : finalSetFormat_1.tiebreakSet) ||
9823
9823
  (setFormat_1 === null || setFormat_1 === void 0 ? void 0 : setFormat_1.tiebreakSet) ||
9824
9824
  (setFormat_1 === null || setFormat_1 === void 0 ? void 0 : setFormat_1.timed)) {
@@ -9838,12 +9838,12 @@ function getAllStructureMatchUps(_a) {
9838
9838
  }
9839
9839
  }
9840
9840
  if (Array.isArray(drawPositions)) {
9841
- var _1 = getOrderedDrawPositions({
9841
+ var _3 = getOrderedDrawPositions({
9842
9842
  drawPositions: drawPositions,
9843
9843
  roundProfile: roundProfile,
9844
9844
  roundNumber: roundNumber,
9845
- }), orderedDrawPositions = _1.orderedDrawPositions, displayOrder = _1.displayOrder;
9846
- var isFeedRound_1 = (_w = roundProfile === null || roundProfile === void 0 ? void 0 : roundProfile[roundNumber]) === null || _w === void 0 ? void 0 : _w.feedRound;
9845
+ }), orderedDrawPositions = _3.orderedDrawPositions, displayOrder = _3.displayOrder;
9846
+ var isFeedRound_1 = (_y = roundProfile === null || roundProfile === void 0 ? void 0 : roundProfile[roundNumber]) === null || _y === void 0 ? void 0 : _y.feedRound;
9847
9847
  var reversedDisplayOrder_1 = displayOrder[0] !== orderedDrawPositions[0];
9848
9848
  // ensure there are two sides generated
9849
9849
  var sideDrawPositions = orderedDrawPositions
@@ -9936,7 +9936,7 @@ function getAllStructureMatchUps(_a) {
9936
9936
  }
9937
9937
  var inferGender = (contextProfile === null || contextProfile === void 0 ? void 0 : contextProfile.inferGender) &&
9938
9938
  (!matchUpWithContext.gender || matchUpWithContext.gender === MIXED) &&
9939
- ((_x = matchUpWithContext.sides) === null || _x === void 0 ? void 0 : _x.length) === 2 &&
9939
+ ((_z = matchUpWithContext.sides) === null || _z === void 0 ? void 0 : _z.length) === 2 &&
9940
9940
  matchUpWithContext.matchUpType !== TEAM$1;
9941
9941
  if (inferGender) {
9942
9942
  var sideGenders = matchUpWithContext.sides.map(function (side) {
@@ -9958,7 +9958,7 @@ function getAllStructureMatchUps(_a) {
9958
9958
  }
9959
9959
  if (matchUpWithContext.tieMatchUps) {
9960
9960
  var isCollectionBye_1 = matchUpWithContext.matchUpStatus === BYE;
9961
- var lineUps_1 = (_y = matchUpWithContext.sides) === null || _y === void 0 ? void 0 : _y.map(function (_a) {
9961
+ var lineUps_1 = (_0 = matchUpWithContext.sides) === null || _0 === void 0 ? void 0 : _0.map(function (_a) {
9962
9962
  var participant = _a.participant, drawPosition = _a.drawPosition, sideNumber = _a.sideNumber, lineUp = _a.lineUp;
9963
9963
  var teamParticipant = (participant === null || participant === void 0 ? void 0 : participant.participantType) === TEAM$1 && participant;
9964
9964
  var teamParticipantValues = teamParticipant &&
@@ -10011,7 +10011,7 @@ function getAllStructureMatchUps(_a) {
10011
10011
  var readyToScore = scoringActive && hasParticipants && hasNoWinner;
10012
10012
  Object.assign(matchUpWithContext, { readyToScore: readyToScore, hasContext: true });
10013
10013
  if (hasParticipants) {
10014
- var _2 = getCheckedInParticipantIds({ matchUp: matchUpWithContext }), allParticipantsCheckedIn = _2.allParticipantsCheckedIn, checkedInParticipantIds = _2.checkedInParticipantIds;
10014
+ var _4 = getCheckedInParticipantIds({ matchUp: matchUpWithContext }), allParticipantsCheckedIn = _4.allParticipantsCheckedIn, checkedInParticipantIds = _4.checkedInParticipantIds;
10015
10015
  Object.assign(matchUpWithContext, {
10016
10016
  allParticipantsCheckedIn: allParticipantsCheckedIn,
10017
10017
  checkedInParticipantIds: checkedInParticipantIds,