tods-competition-factory 1.8.36 → 1.8.37
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/forge/generate.mjs +16 -10
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/query.d.ts +3 -1
- package/dist/forge/query.mjs +16 -10
- package/dist/forge/query.mjs.map +1 -1
- package/dist/forge/transform.mjs +8 -5
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/index.mjs +21 -11
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +29 -11
- package/dist/tods-competition-factory.development.cjs.js.map +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -2404,7 +2404,7 @@ const matchUpFormatCode = {
|
|
|
2404
2404
|
};
|
|
2405
2405
|
|
|
2406
2406
|
function factoryVersion() {
|
|
2407
|
-
return "1.8.
|
|
2407
|
+
return "1.8.37";
|
|
2408
2408
|
}
|
|
2409
2409
|
|
|
2410
2410
|
function getObjectTieFormat(obj) {
|
|
@@ -15787,15 +15787,16 @@ function addNationalityCode({
|
|
|
15787
15787
|
persons.forEach(annotatePerson);
|
|
15788
15788
|
}
|
|
15789
15789
|
|
|
15790
|
-
function addIndividualParticipants({ participantMap }) {
|
|
15790
|
+
function addIndividualParticipants({ participantMap, template }) {
|
|
15791
15791
|
const participantObjects = Object.values(participantMap);
|
|
15792
15792
|
for (const participantObject of participantObjects) {
|
|
15793
15793
|
const participant = participantObject.participant;
|
|
15794
15794
|
if (participant.individualParticipantIds?.length) {
|
|
15795
15795
|
participant.individualParticipants = [];
|
|
15796
15796
|
for (const participantId of participant.individualParticipantIds) {
|
|
15797
|
+
const source = participantMap[participantId].participant;
|
|
15797
15798
|
participant.individualParticipants.push(
|
|
15798
|
-
|
|
15799
|
+
template ? attributeFilter({ template, source }) : source
|
|
15799
15800
|
);
|
|
15800
15801
|
}
|
|
15801
15802
|
}
|
|
@@ -15972,8 +15973,10 @@ function getParticipantMap({
|
|
|
15972
15973
|
withIOC
|
|
15973
15974
|
});
|
|
15974
15975
|
}
|
|
15975
|
-
if (withIndividualParticipants)
|
|
15976
|
-
|
|
15976
|
+
if (withIndividualParticipants) {
|
|
15977
|
+
const template = isObject(withIndividualParticipants) ? withIndividualParticipants : void 0;
|
|
15978
|
+
addIndividualParticipants({ participantMap, template });
|
|
15979
|
+
}
|
|
15977
15980
|
return { participantMap };
|
|
15978
15981
|
}
|
|
15979
15982
|
function signedIn(participant) {
|
|
@@ -16033,7 +16036,7 @@ function initializeParticipantId({ participantMap, participantId }) {
|
|
|
16033
16036
|
participantMap[participantId] = {
|
|
16034
16037
|
structureParticipation: {},
|
|
16035
16038
|
potentialMatchUps: {},
|
|
16036
|
-
scheduleConflicts:
|
|
16039
|
+
scheduleConflicts: {},
|
|
16037
16040
|
scheduleItems: [],
|
|
16038
16041
|
participant: {
|
|
16039
16042
|
groupParticipantIds: [],
|
|
@@ -28014,15 +28017,16 @@ function getParticipantEntries(params) {
|
|
|
28014
28017
|
const itemIsPrior = consideredMinutes >= scheduledMinutes;
|
|
28015
28018
|
const timeOverlap = scheduledMinutesDifference && !isNaN(scheduledMinutesDifference) ? minutesDifference <= scheduledMinutesDifference : itemIsPrior && timeStringMinutes(consideredItem.scheduledTime) < timeStringMinutes(notBeforeTime);
|
|
28016
28019
|
if (timeOverlap && !(bothPotential && sameDraw) && itemIsPrior) {
|
|
28017
|
-
|
|
28020
|
+
const key = [scheduleItem.matchUpId, consideredItem.matchUpId].sort().join("|");
|
|
28021
|
+
participantAggregator.scheduleConflicts[key] = {
|
|
28018
28022
|
priorScheduledMatchUpId: scheduleItem.matchUpId,
|
|
28019
28023
|
matchUpIdWithConflict: consideredItem.matchUpId
|
|
28020
|
-
}
|
|
28024
|
+
};
|
|
28021
28025
|
}
|
|
28022
28026
|
}
|
|
28023
28027
|
}
|
|
28024
28028
|
const pid = participantAggregator.participant.participantId;
|
|
28025
|
-
if (participantAggregator.scheduleConflicts.length) {
|
|
28029
|
+
if (Object.keys(participantAggregator.scheduleConflicts).length) {
|
|
28026
28030
|
participantIdsWithConflicts.push(pid);
|
|
28027
28031
|
}
|
|
28028
28032
|
participantMap[pid].scheduleConflicts = participantAggregator.scheduleConflicts;
|
|
@@ -28250,7 +28254,7 @@ function getParticipants$1(params) {
|
|
|
28250
28254
|
return definedAttributes(
|
|
28251
28255
|
{
|
|
28252
28256
|
...participant,
|
|
28253
|
-
scheduleConflicts: scheduleAnalysis ? scheduleConflicts : void 0,
|
|
28257
|
+
scheduleConflicts: scheduleAnalysis ? Object.values(scheduleConflicts) : void 0,
|
|
28254
28258
|
draws: withDraws || withRankingProfile ? participantDraws : void 0,
|
|
28255
28259
|
events: withEvents || withRankingProfile ? Object.values(events) : void 0,
|
|
28256
28260
|
matchUps: withMatchUps || withRankingProfile ? Object.values(matchUps2) : void 0,
|
|
@@ -28277,12 +28281,14 @@ function getParticipants$1(params) {
|
|
|
28277
28281
|
tournamentRecord
|
|
28278
28282
|
});
|
|
28279
28283
|
if (withIndividualParticipants) {
|
|
28284
|
+
const template2 = isObject(withIndividualParticipants) ? withIndividualParticipants : void 0;
|
|
28280
28285
|
for (const participant of filteredParticipants) {
|
|
28281
28286
|
for (const individualParticipantId of participant.individualParticipantIds ?? []) {
|
|
28282
28287
|
if (!participant.individualParticipants)
|
|
28283
28288
|
participant.individualParticipants = [];
|
|
28289
|
+
const source = ppMap.get(individualParticipantId);
|
|
28284
28290
|
participant.individualParticipants.push(
|
|
28285
|
-
|
|
28291
|
+
template2 ? attributeFilter({ template: template2, source }) : source
|
|
28286
28292
|
);
|
|
28287
28293
|
}
|
|
28288
28294
|
}
|
|
@@ -62171,6 +62177,7 @@ var lastNames = [
|
|
|
62171
62177
|
"Ampleforth",
|
|
62172
62178
|
"Atreides",
|
|
62173
62179
|
"Austen",
|
|
62180
|
+
"Bach",
|
|
62174
62181
|
"Banks",
|
|
62175
62182
|
"Barrington",
|
|
62176
62183
|
"Batty",
|
|
@@ -62201,6 +62208,7 @@ var lastNames = [
|
|
|
62201
62208
|
"Eisenstein",
|
|
62202
62209
|
"Eldritch",
|
|
62203
62210
|
"Elliot",
|
|
62211
|
+
"Escher",
|
|
62204
62212
|
"Eyre",
|
|
62205
62213
|
"Faulkner",
|
|
62206
62214
|
"Fukuoka",
|
|
@@ -62370,6 +62378,7 @@ var firstMale = [
|
|
|
62370
62378
|
"James",
|
|
62371
62379
|
"Jared",
|
|
62372
62380
|
"Joe",
|
|
62381
|
+
"Johann",
|
|
62373
62382
|
"Julian",
|
|
62374
62383
|
"John Michael",
|
|
62375
62384
|
"Jonathan",
|
|
@@ -62380,6 +62389,7 @@ var firstMale = [
|
|
|
62380
62389
|
"Malachi",
|
|
62381
62390
|
"Mark",
|
|
62382
62391
|
"Masanobu",
|
|
62392
|
+
"Maurits",
|
|
62383
62393
|
"Michael",
|
|
62384
62394
|
"Mustapha",
|
|
62385
62395
|
"Neil",
|