@speleotica/frcsdata 5.0.0-beta.1 → 5.0.0-beta.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.
- package/ParseIssue.js +4 -4
- package/ParseIssue.js.map +1 -1
- package/SourceLoc.js +5 -5
- package/SourceLoc.js.map +1 -1
- package/chunksToLines.js +29 -131
- package/chunksToLines.js.map +1 -1
- package/cli/check-survey-correspondence.d.ts +2 -0
- package/cli/check-survey-correspondence.d.ts.map +1 -0
- package/cli/check-survey-correspondence.js +44 -0
- package/cli/check-survey-correspondence.js.map +1 -0
- package/cli/check-survey.d.ts.map +1 -1
- package/cli/check-survey.js +14 -75
- package/cli/check-survey.js.map +1 -1
- package/cli/parse-survey.js +4 -26
- package/cli/parse-survey.js.map +1 -1
- package/cli/summarize-survey.d.ts +2 -0
- package/cli/summarize-survey.d.ts.map +1 -0
- package/cli/summarize-survey.js +33 -0
- package/cli/summarize-survey.js.map +1 -0
- package/cli.js +61 -72
- package/cli.js.map +1 -1
- package/formatFrcsTripSummaryFile.d.ts +3 -0
- package/formatFrcsTripSummaryFile.d.ts.map +1 -0
- package/formatFrcsTripSummaryFile.js +33 -0
- package/formatFrcsTripSummaryFile.js.map +1 -0
- package/formatIssues.d.ts +10 -0
- package/formatIssues.d.ts.map +1 -0
- package/formatIssues.js +52 -0
- package/formatIssues.js.map +1 -0
- package/index.js +13 -13
- package/node/index.d.ts +3 -1
- package/node/index.d.ts.map +1 -1
- package/node/index.js +5 -19
- package/node/index.js.map +1 -1
- package/package.json +1 -1
- package/parseFrcsPlotFile.js +112 -245
- package/parseFrcsPlotFile.js.map +1 -1
- package/parseFrcsTripSummaryFile.d.ts +3 -1
- package/parseFrcsTripSummaryFile.d.ts.map +1 -1
- package/parseFrcsTripSummaryFile.js +53 -119
- package/parseFrcsTripSummaryFile.js.map +1 -1
- package/src/cli/check-survey-correspondence.ts +49 -0
- package/src/cli/check-survey.ts +8 -69
- package/src/cli/summarize-survey.ts +28 -0
- package/src/cli.ts +33 -0
- package/src/formatFrcsTripSummaryFile.ts +45 -0
- package/src/formatIssues.ts +97 -0
- package/src/parseFrcsTripSummaryFile.ts +8 -2
- package/src/survey/normalizeTeamMemberName.ts +3 -6
- package/src/survey/parseFrcsSurveyFile.ts +3 -17
- package/src/survey/summarizeSurvey.ts +51 -0
- package/src/unwrapInvalid.ts +3 -0
- package/string/index.d.ts +3 -1
- package/string/index.d.ts.map +1 -1
- package/string/index.js +7 -41
- package/string/index.js.map +1 -1
- package/survey/FrcsSurveyFile.js +1 -1
- package/survey/FrcsSurveyFile.js.map +1 -1
- package/survey/ZodFrcsSurveyFileJson.js +84 -86
- package/survey/ZodFrcsSurveyFileJson.js.map +1 -1
- package/survey/ZodFrcsSurveyFileToJson.js +78 -88
- package/survey/ZodFrcsSurveyFileToJson.js.map +1 -1
- package/survey/formatFrcsShot.js +45 -43
- package/survey/formatFrcsShot.js.map +1 -1
- package/survey/formatFrcsSurveyFile.js +52 -130
- package/survey/formatFrcsSurveyFile.js.map +1 -1
- package/survey/getColumnRanges.js +11 -19
- package/survey/getColumnRanges.js.map +1 -1
- package/survey/normalizeTeamMemberName.d.ts.map +1 -1
- package/survey/normalizeTeamMemberName.js +1 -5
- package/survey/normalizeTeamMemberName.js.map +1 -1
- package/survey/parseFrcsSurveyFile.d.ts.map +1 -1
- package/survey/parseFrcsSurveyFile.js +558 -750
- package/survey/parseFrcsSurveyFile.js.map +1 -1
- package/survey/parsers.js +20 -20
- package/survey/parsers.js.map +1 -1
- package/survey/summarizeSurvey.d.ts +6 -0
- package/survey/summarizeSurvey.d.ts.map +1 -0
- package/survey/summarizeSurvey.js +58 -0
- package/survey/summarizeSurvey.js.map +1 -0
- package/underlineSource.js +9 -17
- package/underlineSource.js.map +1 -1
- package/unwrapInvalid.d.ts +4 -0
- package/unwrapInvalid.d.ts.map +1 -0
- package/unwrapInvalid.js +10 -0
- package/unwrapInvalid.js.map +1 -0
- package/web/index.js +56 -116
- package/web/index.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseFrcsTripSummaryFile.js","names":["_unitized","require","
|
|
1
|
+
{"version":3,"file":"parseFrcsTripSummaryFile.js","names":["_unitized","require","tripSummaryRegex","parseFrcsTripSummaryFile","file","lines","indexBy","errors","tripSummaries","tripStartLine","lineNumber","team","shots","line","match","exec","tripNumber","parseInt","tripIndex","length","year","date","Date","totalLength","Unitize","feet","parseFloat","numShots","name","trim","excludedLength","numExcludedShots","push","split","trimmed","module","exports","default"],"sources":["src/parseFrcsTripSummaryFile.ts"],"sourcesContent":["import { FrcsTripSummary } from './FrcsTripSummary'\nimport { FrcsTripSummaryFile } from './FrcsTripSummaryFile'\nimport { SegmentParseError } from 'parse-segment'\nimport { Unitize } from '@speleotica/unitized'\n\nconst tripSummaryRegex =\n /^\\s*(\\d+)\\s+(\\d{1,2})\\/(\\s\\d|\\d\\d)\\/(\\d{2,4})\\s+(\\d+(?:\\.\\d*)?)\\s+(\\d+)\\s+(\\S.*)EXCLUDED:\\s*(\\d+(?:\\.\\d{2})?)\\s*(\\d+)/\n/**\n * Parses data from a STAT_sum.txt file. Here is an excerpt of the format:\n<pre> 1 2/15/81 258.60 17 ENTRANCE DROPS, JOE'S \"I LOVE MY WIFE TRAVERSE\", TRICKY TRAVERSE EXCLUDED: 0.00 0\n Peter Quick Keith Ortiz\n A1 AD1-AD3 AE1 AE1 SIDE\n AE9 SIDE AE10-AE9 AE13 SIDE AE15 SIDE\n AE20-AE11\n\n 3 3/ 6/81 2371.20 61 DOUG'S DEMISE (50 FT DROP), CHRIS CROSS, CRAWL ABOVE DROP EXCLUDED: 0.00 0\n Peter Quick Chris Gerace Phil Oden Chip Hopper\n A13 SIDE B1-B5 B2 SIDE B3 SIDE\n B6-B18 B17 SIDE B19-B38 B32 SIDE\n BS1-BS5 C1-C18 </pre>\n */\nexport default async function parseFrcsTripSummaryFile(\n file: string,\n lines: AsyncIterable<string>,\n {\n indexBy = 'tripNumber',\n }: {\n indexBy?: 'tripNumber' | 'occurrence'\n } = {}\n): Promise<FrcsTripSummaryFile> {\n const errors: Array<SegmentParseError> = []\n const tripSummaries: Array<FrcsTripSummary | undefined> = []\n\n let tripStartLine = -2\n let lineNumber = 0\n\n let team: Array<string> = []\n let shots: Array<string> = []\n\n for await (const line of lines) {\n lineNumber++\n\n const match = tripSummaryRegex.exec(line)\n if (match) {\n tripStartLine = lineNumber\n const tripNumber = parseInt(match[1])\n const tripIndex =\n indexBy === 'tripNumber' ? tripNumber - 1 : tripSummaries.length\n let year = parseInt(match[4])\n if (year < 1000) year += 1900\n const date = new Date(year, parseInt(match[2]) - 1, parseInt(match[3]))\n const totalLength = Unitize.feet(parseFloat(match[5]))\n const numShots = parseInt(match[6])\n const name = match[7].trim()\n const excludedLength = Unitize.feet(parseFloat(match[8]))\n const numExcludedShots = parseInt(match[9])\n team = []\n shots = []\n tripSummaries[tripIndex] = {\n tripNumber,\n tripIndex,\n date,\n totalLength,\n numShots,\n name,\n excludedLength,\n numExcludedShots,\n team,\n shots,\n }\n continue\n }\n if (lineNumber === tripStartLine + 1) {\n team.push(...line.trim().split(/\\s\\s+|\\t+/g))\n } else {\n const trimmed = line.trim()\n if (trimmed) shots.push(...trimmed.split(/\\s\\s+|\\t+/))\n }\n }\n\n return { errors, tripSummaries }\n}\n"],"mappings":";;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AAEA,MAAMC,gBAAgB,GACpB,uHAAuH;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,eAAeC,wBAAwBA,CACpDC,IAAY,EACZC,KAA4B,EAC5B;EACEC,OAAO,GAAG;AAGZ,CAAC,GAAG,CAAC,CAAC,EACwB;EAC9B,MAAMC,MAAgC,GAAG,EAAE;EAC3C,MAAMC,aAAiD,GAAG,EAAE;EAE5D,IAAIC,aAAa,GAAG,CAAC,CAAC;EACtB,IAAIC,UAAU,GAAG,CAAC;EAElB,IAAIC,IAAmB,GAAG,EAAE;EAC5B,IAAIC,KAAoB,GAAG,EAAE;EAE7B,WAAW,MAAMC,IAAI,IAAIR,KAAK,EAAE;IAC9BK,UAAU,EAAE;IAEZ,MAAMI,KAAK,GAAGZ,gBAAgB,CAACa,IAAI,CAACF,IAAI,CAAC;IACzC,IAAIC,KAAK,EAAE;MACTL,aAAa,GAAGC,UAAU;MAC1B,MAAMM,UAAU,GAAGC,QAAQ,CAACH,KAAK,CAAC,CAAC,CAAC,CAAC;MACrC,MAAMI,SAAS,GACbZ,OAAO,KAAK,YAAY,GAAGU,UAAU,GAAG,CAAC,GAAGR,aAAa,CAACW,MAAM;MAClE,IAAIC,IAAI,GAAGH,QAAQ,CAACH,KAAK,CAAC,CAAC,CAAC,CAAC;MAC7B,IAAIM,IAAI,GAAG,IAAI,EAAEA,IAAI,IAAI,IAAI;MAC7B,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAACF,IAAI,EAAEH,QAAQ,CAACH,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAEG,QAAQ,CAACH,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;MACvE,MAAMS,WAAW,GAAGC,iBAAO,CAACC,IAAI,CAACC,UAAU,CAACZ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;MACtD,MAAMa,QAAQ,GAAGV,QAAQ,CAACH,KAAK,CAAC,CAAC,CAAC,CAAC;MACnC,MAAMc,IAAI,GAAGd,KAAK,CAAC,CAAC,CAAC,CAACe,IAAI,CAAC,CAAC;MAC5B,MAAMC,cAAc,GAAGN,iBAAO,CAACC,IAAI,CAACC,UAAU,CAACZ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;MACzD,MAAMiB,gBAAgB,GAAGd,QAAQ,CAACH,KAAK,CAAC,CAAC,CAAC,CAAC;MAC3CH,IAAI,GAAG,EAAE;MACTC,KAAK,GAAG,EAAE;MACVJ,aAAa,CAACU,SAAS,CAAC,GAAG;QACzBF,UAAU;QACVE,SAAS;QACTG,IAAI;QACJE,WAAW;QACXI,QAAQ;QACRC,IAAI;QACJE,cAAc;QACdC,gBAAgB;QAChBpB,IAAI;QACJC;MACF,CAAC;MACD;IACF;IACA,IAAIF,UAAU,KAAKD,aAAa,GAAG,CAAC,EAAE;MACpCE,IAAI,CAACqB,IAAI,CAAC,GAAGnB,IAAI,CAACgB,IAAI,CAAC,CAAC,CAACI,KAAK,CAAC,YAAY,CAAC,CAAC;IAC/C,CAAC,MAAM;MACL,MAAMC,OAAO,GAAGrB,IAAI,CAACgB,IAAI,CAAC,CAAC;MAC3B,IAAIK,OAAO,EAAEtB,KAAK,CAACoB,IAAI,CAAC,GAAGE,OAAO,CAACD,KAAK,CAAC,WAAW,CAAC,CAAC;IACxD;EACF;EAEA,OAAO;IAAE1B,MAAM;IAAEC;EAAc,CAAC;AAClC;AAAC2B,MAAA,CAAAC,OAAA,GAAAA,OAAA,CAAAC,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
import chalk from 'chalk'
|
|
3
|
+
import { parseFrcsSurveyFile } from '../string/index'
|
|
4
|
+
import fs from 'fs/promises'
|
|
5
|
+
import { summarizeSurvey } from '../survey/summarizeSurvey'
|
|
6
|
+
import { parseFrcsTripSummaryFile } from '../node/index.js'
|
|
7
|
+
import { formatFrcsTripSummaryFile } from '../formatFrcsTripSummaryFile.js'
|
|
8
|
+
import { isDeepStrictEqual } from 'util'
|
|
9
|
+
|
|
10
|
+
export async function checkSurveyCorrespondence(
|
|
11
|
+
surveyFile: string,
|
|
12
|
+
summaryFile: string
|
|
13
|
+
) {
|
|
14
|
+
const source = await fs.readFile(surveyFile, 'utf8')
|
|
15
|
+
const parsedSurvey = await parseFrcsSurveyFile(surveyFile, source)
|
|
16
|
+
const parsedSummaries = (
|
|
17
|
+
await parseFrcsTripSummaryFile(summaryFile, { indexBy: 'occurrence' })
|
|
18
|
+
).tripSummaries.sort((a, b) => (a?.tripNumber ?? 0) - (b?.tripNumber ?? 0))
|
|
19
|
+
const convertedSummaries = summarizeSurvey(parsedSurvey, {
|
|
20
|
+
ignoreVerticalOfHShots: true,
|
|
21
|
+
}).tripSummaries.sort((a, b) => (a?.tripNumber ?? 0) - (b?.tripNumber ?? 0))
|
|
22
|
+
|
|
23
|
+
let errored = false
|
|
24
|
+
|
|
25
|
+
for (
|
|
26
|
+
let i = 0;
|
|
27
|
+
i < Math.max(parsedSummaries.length, convertedSummaries.length);
|
|
28
|
+
i++
|
|
29
|
+
) {
|
|
30
|
+
const parsed = parsedSummaries[i]
|
|
31
|
+
const converted = convertedSummaries[i]
|
|
32
|
+
|
|
33
|
+
const parsedLines = [
|
|
34
|
+
...formatFrcsTripSummaryFile({ tripSummaries: [parsed] }),
|
|
35
|
+
].slice(0, 2)
|
|
36
|
+
const convertedLines = [
|
|
37
|
+
...formatFrcsTripSummaryFile({ tripSummaries: [converted] }),
|
|
38
|
+
].slice(0, 2)
|
|
39
|
+
|
|
40
|
+
if (!isDeepStrictEqual(parsedLines, convertedLines)) {
|
|
41
|
+
errored = true
|
|
42
|
+
console.log(
|
|
43
|
+
convertedLines.map((line) => chalk.green('+' + line)).join('\n')
|
|
44
|
+
)
|
|
45
|
+
console.log(parsedLines.map((line) => chalk.red('-' + line)).join('\n'))
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
process.exit(errored ? 1 : 0)
|
|
49
|
+
}
|
package/src/cli/check-survey.ts
CHANGED
|
@@ -1,83 +1,22 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
2
|
import fs from 'fs/promises'
|
|
3
3
|
import parseFrcsSurveyFile from '../survey/parseFrcsSurveyFile'
|
|
4
|
-
import { underlineSource } from '../underlineSource.js'
|
|
5
4
|
import chalk from 'chalk'
|
|
5
|
+
import { formatIssues } from '../formatIssues.js'
|
|
6
6
|
|
|
7
7
|
export async function checkSurvey(file: string) {
|
|
8
8
|
const source = await fs.readFile(file, 'utf8')
|
|
9
9
|
const parsed = await parseFrcsSurveyFile(file, [source])
|
|
10
10
|
|
|
11
11
|
const issues = parsed.issues || []
|
|
12
|
-
for (const issue of issues) {
|
|
13
|
-
const { type, loc, message } = issue
|
|
14
|
-
const style = type === 'error' ? chalk.red : chalk.yellow
|
|
15
|
-
console.log(
|
|
16
|
-
`${style(
|
|
17
|
-
`${
|
|
18
|
-
type === 'error' ? chalk.red('✘') : chalk.yellow('⚠')
|
|
19
|
-
} ${`${type[0].toUpperCase()}${type.substring(1)}:`.padEnd(
|
|
20
|
-
8
|
|
21
|
-
)} ${message?.padEnd(40)}`
|
|
22
|
-
)} (${file}:${loc?.start?.line}:${loc?.start?.column})`
|
|
23
|
-
)
|
|
24
|
-
if (loc) {
|
|
25
|
-
console.log(underlineSource(source, loc, { underlineStyle: style }))
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const errorCount = issues.reduce(
|
|
30
|
-
(count, i) => (i.type === 'error' ? count + 1 : count),
|
|
31
|
-
0
|
|
32
|
-
)
|
|
33
|
-
const warningCount = issues.reduce(
|
|
34
|
-
(count, i) => (i.type === 'warning' ? count + 1 : count),
|
|
35
|
-
0
|
|
36
|
-
)
|
|
37
|
-
const trips = 'INVALID' in parsed ? parsed.INVALID.trips : parsed.trips
|
|
38
|
-
const tripCount = trips.length
|
|
39
|
-
const shotCount = trips.reduce(
|
|
40
|
-
(count, trip) =>
|
|
41
|
-
count +
|
|
42
|
-
('INVALID' in trip ? trip.INVALID.shots.length : trip.shots.length),
|
|
43
|
-
0
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
const fmtErrorCount = `✘ ${errorCount}`
|
|
47
|
-
const fmtWarningCount = `⚠ ${warningCount}`
|
|
48
|
-
const fmtTripCount = `${tripCount}`
|
|
49
|
-
const fmtShotCount = `${shotCount}`
|
|
50
|
-
|
|
51
|
-
const countWidth = Math.max(
|
|
52
|
-
fmtErrorCount.length,
|
|
53
|
-
fmtWarningCount.length,
|
|
54
|
-
fmtTripCount.length,
|
|
55
|
-
fmtShotCount.length
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
if (errorCount) {
|
|
59
|
-
console.log(
|
|
60
|
-
chalk.red(
|
|
61
|
-
`${fmtErrorCount.padStart(countWidth)} error${
|
|
62
|
-
errorCount === 1 ? '' : 's'
|
|
63
|
-
}`
|
|
64
|
-
)
|
|
65
|
-
)
|
|
66
|
-
}
|
|
67
|
-
if (warningCount) {
|
|
68
|
-
console.log(
|
|
69
|
-
chalk.yellow(
|
|
70
|
-
`${fmtWarningCount.padStart(countWidth)} warning${
|
|
71
|
-
warningCount === 1 ? '' : 's'
|
|
72
|
-
}`
|
|
73
|
-
)
|
|
74
|
-
)
|
|
75
|
-
}
|
|
76
|
-
console.log(
|
|
77
|
-
`${fmtTripCount.padStart(countWidth)} trip${tripCount === 1 ? '' : 's'}`
|
|
78
|
-
)
|
|
79
12
|
console.log(
|
|
80
|
-
|
|
13
|
+
formatIssues({
|
|
14
|
+
file,
|
|
15
|
+
source,
|
|
16
|
+
parsed,
|
|
17
|
+
errorStyle: chalk.red,
|
|
18
|
+
warningStyle: chalk.yellow,
|
|
19
|
+
})
|
|
81
20
|
)
|
|
82
21
|
|
|
83
22
|
process.exit(issues.some((i) => i.type === 'error') ? 1 : 0)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
import chalk from 'chalk'
|
|
3
|
+
import { formatIssues } from '../formatIssues'
|
|
4
|
+
import { parseFrcsSurveyFile } from '../string/index'
|
|
5
|
+
import fs from 'fs/promises'
|
|
6
|
+
import { formatFrcsTripSummaryFile } from '../formatFrcsTripSummaryFile'
|
|
7
|
+
import { summarizeSurvey as baseSummarizeSurvey } from '../survey/summarizeSurvey'
|
|
8
|
+
|
|
9
|
+
export async function summarizeSurvey(file: string) {
|
|
10
|
+
const source = await fs.readFile(file, 'utf8')
|
|
11
|
+
const parsed = await parseFrcsSurveyFile(file, source)
|
|
12
|
+
if ('INVALID' in parsed) {
|
|
13
|
+
console.log(
|
|
14
|
+
formatIssues({
|
|
15
|
+
file,
|
|
16
|
+
source,
|
|
17
|
+
parsed,
|
|
18
|
+
errorStyle: chalk.red,
|
|
19
|
+
warningStyle: chalk.yellow,
|
|
20
|
+
})
|
|
21
|
+
)
|
|
22
|
+
process.exit(1)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
for (const line of formatFrcsTripSummaryFile(baseSummarizeSurvey(parsed))) {
|
|
26
|
+
console.log(line)
|
|
27
|
+
}
|
|
28
|
+
}
|
package/src/cli.ts
CHANGED
|
@@ -27,4 +27,37 @@ void yargs(process.argv.slice(2))
|
|
|
27
27
|
await parseSurvey(file)
|
|
28
28
|
},
|
|
29
29
|
})
|
|
30
|
+
.command({
|
|
31
|
+
command: 'summarize-survey <file>',
|
|
32
|
+
describe: 'parse survey file and output trip summaries',
|
|
33
|
+
builder: (yargs) =>
|
|
34
|
+
yargs.positional('file', {
|
|
35
|
+
type: 'string',
|
|
36
|
+
demandOption: true,
|
|
37
|
+
}),
|
|
38
|
+
handler: async ({ file }) => {
|
|
39
|
+
const { summarizeSurvey } = await import('./cli/summarize-survey')
|
|
40
|
+
await summarizeSurvey(file)
|
|
41
|
+
},
|
|
42
|
+
})
|
|
43
|
+
.command({
|
|
44
|
+
command: 'check-survey-correspondence <surveyFile> <summaryFile>',
|
|
45
|
+
describe: 'parse survey file and output trip summaries',
|
|
46
|
+
builder: (yargs) =>
|
|
47
|
+
yargs
|
|
48
|
+
.positional('surveyFile', {
|
|
49
|
+
type: 'string',
|
|
50
|
+
demandOption: true,
|
|
51
|
+
})
|
|
52
|
+
.positional('summaryFile', {
|
|
53
|
+
type: 'string',
|
|
54
|
+
demandOption: true,
|
|
55
|
+
}),
|
|
56
|
+
handler: async ({ surveyFile, summaryFile }) => {
|
|
57
|
+
const { checkSurveyCorrespondence } = await import(
|
|
58
|
+
'./cli/check-survey-correspondence'
|
|
59
|
+
)
|
|
60
|
+
await checkSurveyCorrespondence(surveyFile, summaryFile)
|
|
61
|
+
},
|
|
62
|
+
})
|
|
30
63
|
.demandCommand().argv
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Length } from '@speleotica/unitized'
|
|
2
|
+
import { FrcsTripSummaryFile } from './FrcsTripSummaryFile.js'
|
|
3
|
+
|
|
4
|
+
const nameLength = 78
|
|
5
|
+
|
|
6
|
+
export function* formatFrcsTripSummaryFile(
|
|
7
|
+
file: FrcsTripSummaryFile
|
|
8
|
+
): Iterable<string> {
|
|
9
|
+
for (const summary of file.tripSummaries) {
|
|
10
|
+
if (!summary) continue
|
|
11
|
+
const {
|
|
12
|
+
tripNumber,
|
|
13
|
+
date,
|
|
14
|
+
totalLength,
|
|
15
|
+
numShots,
|
|
16
|
+
name,
|
|
17
|
+
excludedLength,
|
|
18
|
+
numExcludedShots,
|
|
19
|
+
team,
|
|
20
|
+
shots,
|
|
21
|
+
} = summary
|
|
22
|
+
const month = (date.getMonth() + 1).toFixed()
|
|
23
|
+
const day = date.getDate().toFixed()
|
|
24
|
+
const year = date.getFullYear().toFixed()
|
|
25
|
+
yield `${tripNumber.toFixed().padStart(3)} ${month.padStart(
|
|
26
|
+
2
|
|
27
|
+
)}/${day.padStart(2)}/${year.padStart(4)}${totalLength
|
|
28
|
+
.get(Length.feet)
|
|
29
|
+
.toFixed(2)
|
|
30
|
+
.padStart(10)}${numShots.toFixed().padStart(5)} ${name
|
|
31
|
+
.slice(0, nameLength)
|
|
32
|
+
.padEnd(nameLength)} EXCLUDED:${excludedLength
|
|
33
|
+
.get(Length.feet)
|
|
34
|
+
.toFixed(2)
|
|
35
|
+
.padStart(7)}${numExcludedShots.toFixed().padStart(3)}`
|
|
36
|
+
yield ' '.repeat(tripNumber >= 1000 ? 34 : 33) + team.join(' ')
|
|
37
|
+
for (let i = 0; i < shots.length; i += 4) {
|
|
38
|
+
yield ' '.repeat(tripNumber >= 1000 ? 36 : 35) +
|
|
39
|
+
shots
|
|
40
|
+
.slice(i, i + 4)
|
|
41
|
+
.map((s) => s.padEnd(14))
|
|
42
|
+
.join('')
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { FrcsSurveyFile, InvalidFrcsSurveyFile } from './survey/FrcsSurveyFile'
|
|
2
|
+
import {
|
|
3
|
+
FrcsSurveyFileJson,
|
|
4
|
+
InvalidFrcsSurveyFileJson,
|
|
5
|
+
} from './survey/FrcsSurveyFileJson.js'
|
|
6
|
+
import { underlineSource } from './underlineSource'
|
|
7
|
+
import { unwrapInvalid } from './unwrapInvalid.js'
|
|
8
|
+
|
|
9
|
+
export function formatIssues({
|
|
10
|
+
parsed,
|
|
11
|
+
source,
|
|
12
|
+
file,
|
|
13
|
+
errorStyle = (s) => s,
|
|
14
|
+
warningStyle = (s) => s,
|
|
15
|
+
}: {
|
|
16
|
+
parsed:
|
|
17
|
+
| FrcsSurveyFile
|
|
18
|
+
| InvalidFrcsSurveyFile
|
|
19
|
+
| FrcsSurveyFileJson
|
|
20
|
+
| InvalidFrcsSurveyFileJson
|
|
21
|
+
source: string
|
|
22
|
+
file: string
|
|
23
|
+
errorStyle?: (s: string) => string
|
|
24
|
+
warningStyle?: (s: string) => string
|
|
25
|
+
}) {
|
|
26
|
+
const issues = parsed.issues || []
|
|
27
|
+
const lines: string[] = []
|
|
28
|
+
for (const issue of issues) {
|
|
29
|
+
const { type, loc, message } = issue
|
|
30
|
+
const style = type === 'error' ? errorStyle : warningStyle
|
|
31
|
+
lines.push(
|
|
32
|
+
`${style(
|
|
33
|
+
`${
|
|
34
|
+
type === 'error' ? errorStyle('✘') : warningStyle('⚠')
|
|
35
|
+
} ${`${type[0].toUpperCase()}${type.substring(1)}:`.padEnd(
|
|
36
|
+
8
|
|
37
|
+
)} ${message?.padEnd(40)}`
|
|
38
|
+
)} (${file}:${loc?.start?.line}:${loc?.start?.column})`
|
|
39
|
+
)
|
|
40
|
+
if (loc) {
|
|
41
|
+
lines.push(underlineSource(source, loc, { underlineStyle: style }))
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const errorCount = issues.reduce(
|
|
46
|
+
(count, i) => (i.type === 'error' ? count + 1 : count),
|
|
47
|
+
0
|
|
48
|
+
)
|
|
49
|
+
const warningCount = issues.reduce(
|
|
50
|
+
(count, i) => (i.type === 'warning' ? count + 1 : count),
|
|
51
|
+
0
|
|
52
|
+
)
|
|
53
|
+
const trips = unwrapInvalid(parsed).trips
|
|
54
|
+
const tripCount = trips.length
|
|
55
|
+
const shotCount = trips.reduce(
|
|
56
|
+
(count, trip) => count + unwrapInvalid(trip).shots.length,
|
|
57
|
+
0
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
const fmtErrorCount = `✘ ${errorCount}`
|
|
61
|
+
const fmtWarningCount = `⚠ ${warningCount}`
|
|
62
|
+
const fmtTripCount = `${tripCount}`
|
|
63
|
+
const fmtShotCount = `${shotCount}`
|
|
64
|
+
|
|
65
|
+
const countWidth = Math.max(
|
|
66
|
+
fmtErrorCount.length,
|
|
67
|
+
fmtWarningCount.length,
|
|
68
|
+
fmtTripCount.length,
|
|
69
|
+
fmtShotCount.length
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
if (errorCount) {
|
|
73
|
+
lines.push(
|
|
74
|
+
errorStyle(
|
|
75
|
+
`${fmtErrorCount.padStart(countWidth)} error${
|
|
76
|
+
errorCount === 1 ? '' : 's'
|
|
77
|
+
}`
|
|
78
|
+
)
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
if (warningCount) {
|
|
82
|
+
lines.push(
|
|
83
|
+
warningStyle(
|
|
84
|
+
`${fmtWarningCount.padStart(countWidth)} warning${
|
|
85
|
+
warningCount === 1 ? '' : 's'
|
|
86
|
+
}`
|
|
87
|
+
)
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
lines.push(
|
|
91
|
+
`${fmtTripCount.padStart(countWidth)} trip${tripCount === 1 ? '' : 's'}`
|
|
92
|
+
)
|
|
93
|
+
lines.push(
|
|
94
|
+
`${fmtShotCount.padStart(countWidth)} shot${shotCount === 1 ? '' : 's'}`
|
|
95
|
+
)
|
|
96
|
+
return lines.join('\n')
|
|
97
|
+
}
|
|
@@ -21,7 +21,12 @@ const tripSummaryRegex =
|
|
|
21
21
|
*/
|
|
22
22
|
export default async function parseFrcsTripSummaryFile(
|
|
23
23
|
file: string,
|
|
24
|
-
lines: AsyncIterable<string
|
|
24
|
+
lines: AsyncIterable<string>,
|
|
25
|
+
{
|
|
26
|
+
indexBy = 'tripNumber',
|
|
27
|
+
}: {
|
|
28
|
+
indexBy?: 'tripNumber' | 'occurrence'
|
|
29
|
+
} = {}
|
|
25
30
|
): Promise<FrcsTripSummaryFile> {
|
|
26
31
|
const errors: Array<SegmentParseError> = []
|
|
27
32
|
const tripSummaries: Array<FrcsTripSummary | undefined> = []
|
|
@@ -39,7 +44,8 @@ export default async function parseFrcsTripSummaryFile(
|
|
|
39
44
|
if (match) {
|
|
40
45
|
tripStartLine = lineNumber
|
|
41
46
|
const tripNumber = parseInt(match[1])
|
|
42
|
-
const tripIndex =
|
|
47
|
+
const tripIndex =
|
|
48
|
+
indexBy === 'tripNumber' ? tripNumber - 1 : tripSummaries.length
|
|
43
49
|
let year = parseInt(match[4])
|
|
44
50
|
if (year < 1000) year += 1900
|
|
45
51
|
const date = new Date(year, parseInt(match[2]) - 1, parseInt(match[3]))
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
export function normalizeTeamMemberName(name: string) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
(match, head, tail) => `${head}${tail.toLowerCase()}`
|
|
6
|
-
)
|
|
7
|
-
}
|
|
2
|
+
name = name.replace(/(\S)(\S*)/g, (match, head, tail) =>
|
|
3
|
+
match.toUpperCase() === match ? `${head}${tail.toLowerCase()}` : match
|
|
4
|
+
)
|
|
8
5
|
name = name.replace(/_/g, ' ')
|
|
9
6
|
return name
|
|
10
7
|
}
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
parseAzimuth,
|
|
34
34
|
} from './parsers'
|
|
35
35
|
import { normalizeTeamMemberName } from './normalizeTeamMemberName'
|
|
36
|
+
import { unwrapInvalid } from '../unwrapInvalid'
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
39
|
* Parses a raw cdata.fr survey file. These look like so:
|
|
@@ -202,7 +203,7 @@ export default async function parseFrcsSurveyFile(
|
|
|
202
203
|
day = parseInt(dateMatch[11])
|
|
203
204
|
year = parseInt(dateMatch[12])
|
|
204
205
|
}
|
|
205
|
-
tripDate = new Date(year <
|
|
206
|
+
tripDate = new Date(year < 60 ? year + 2000 : year, month - 1, day)
|
|
206
207
|
} else {
|
|
207
208
|
addIssue(
|
|
208
209
|
'warning',
|
|
@@ -566,18 +567,7 @@ export default async function parseFrcsSurveyFile(
|
|
|
566
567
|
|
|
567
568
|
if (trip) trips.push(trip)
|
|
568
569
|
|
|
569
|
-
trips
|
|
570
|
-
.map((trip, index) => ({ trip: unwrapInvalid(trip), index }))
|
|
571
|
-
.sort((a, b) => {
|
|
572
|
-
const aDate = unwrapInvalid(a.trip.header).date
|
|
573
|
-
const bDate = unwrapInvalid(b.trip.header).date
|
|
574
|
-
return (
|
|
575
|
-
(aDate != null && bDate != null
|
|
576
|
-
? aDate.getTime() - bDate.getTime()
|
|
577
|
-
: 0) || a.index - b.index
|
|
578
|
-
)
|
|
579
|
-
})
|
|
580
|
-
.forEach(({ trip }, index) => (trip.tripNumber = index + 1))
|
|
570
|
+
trips.forEach((trip, index) => (unwrapInvalid(trip).tripNumber = index + 1))
|
|
581
571
|
|
|
582
572
|
if (
|
|
583
573
|
!issues.some((i) => i.type === 'error') &&
|
|
@@ -856,7 +846,3 @@ export default async function parseFrcsSurveyFile(
|
|
|
856
846
|
}
|
|
857
847
|
}
|
|
858
848
|
}
|
|
859
|
-
|
|
860
|
-
function unwrapInvalid<T>(t: T): T extends { INVALID: infer I } ? I : T {
|
|
861
|
-
return (t instanceof Object && 'INVALID' in t ? t.INVALID : t) as any
|
|
862
|
-
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Length, UnitizedNumber } from '@speleotica/unitized'
|
|
2
|
+
import { FrcsTripSummaryFile } from '../FrcsTripSummaryFile.js'
|
|
3
|
+
import { FrcsSurveyFile, InvalidFrcsSurveyFile } from './FrcsSurveyFile.js'
|
|
4
|
+
import { unwrapInvalid } from '../unwrapInvalid.js'
|
|
5
|
+
|
|
6
|
+
export function summarizeSurvey(
|
|
7
|
+
parsed: FrcsSurveyFile | InvalidFrcsSurveyFile,
|
|
8
|
+
options?: { ignoreVerticalOfHShots?: boolean }
|
|
9
|
+
) {
|
|
10
|
+
const summary: FrcsTripSummaryFile = {
|
|
11
|
+
tripSummaries: [],
|
|
12
|
+
}
|
|
13
|
+
let tripIndex = 0
|
|
14
|
+
for (const trip of unwrapInvalid(parsed).trips) {
|
|
15
|
+
const { tripNumber, header, units, shots } = unwrapInvalid(trip)
|
|
16
|
+
const { name, date, team } = unwrapInvalid(header)
|
|
17
|
+
const distanceUnit = unwrapInvalid(units).distanceUnit || Length.feet
|
|
18
|
+
let totalLength = new UnitizedNumber(0, distanceUnit)
|
|
19
|
+
let excludedLength = new UnitizedNumber(0, distanceUnit)
|
|
20
|
+
let numExcludedShots = 0
|
|
21
|
+
|
|
22
|
+
for (const shot of unwrapInvalid(shots)) {
|
|
23
|
+
const { distance, horizontalDistance, excludeDistance } =
|
|
24
|
+
unwrapInvalid(shot)
|
|
25
|
+
const statDistance =
|
|
26
|
+
options?.ignoreVerticalOfHShots && horizontalDistance
|
|
27
|
+
? horizontalDistance
|
|
28
|
+
: distance
|
|
29
|
+
if (statDistance) totalLength = totalLength.add(statDistance)
|
|
30
|
+
if (excludeDistance) {
|
|
31
|
+
numExcludedShots++
|
|
32
|
+
if (statDistance) excludedLength = excludedLength.add(statDistance)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
summary.tripSummaries.push({
|
|
37
|
+
tripNumber: tripNumber ?? NaN,
|
|
38
|
+
tripIndex: tripIndex++,
|
|
39
|
+
date: date || new Date(NaN),
|
|
40
|
+
name: name || '',
|
|
41
|
+
team: team || [],
|
|
42
|
+
numShots: shots.length,
|
|
43
|
+
totalLength,
|
|
44
|
+
numExcludedShots,
|
|
45
|
+
excludedLength,
|
|
46
|
+
shots: [],
|
|
47
|
+
})
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return summary
|
|
51
|
+
}
|
package/string/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const parseFrcsSurveyFile: (file: string, str: string, rest_0?: import("../survey/FrcsSurveyFile").ParseFrcsSurveyFileOptions | undefined) => Promise<import("..").FrcsSurveyFile | import("../survey/FrcsSurveyFile").InvalidFrcsSurveyFile>;
|
|
2
2
|
export declare const parseFrcsPlotFile: (file: string, str: string) => Promise<import("..").FrcsPlotFile>;
|
|
3
|
-
export declare const parseFrcsTripSummaryFile: (file: string, str: string
|
|
3
|
+
export declare const parseFrcsTripSummaryFile: (file: string, str: string, rest_0?: {
|
|
4
|
+
indexBy?: "tripNumber" | "occurrence";
|
|
5
|
+
} | undefined) => Promise<import("..").FrcsTripSummaryFile>;
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
package/string/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/string/index.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,mBAAmB,SAHvB,MAAM,OAAO,MAAM,wLAG8C,CAAA;AAC1E,eAAO,MAAM,iBAAiB,SAfrB,MAAM,OAAO,MAAM,uCAeyC,CAAA;AACrE,eAAO,MAAM,wBAAwB,SAhB5B,MAAM,OAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/string/index.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,mBAAmB,SAHvB,MAAM,OAAO,MAAM,wLAG8C,CAAA;AAC1E,eAAO,MAAM,iBAAiB,SAfrB,MAAM,OAAO,MAAM,uCAeyC,CAAA;AACrE,eAAO,MAAM,wBAAwB,SAhB5B,MAAM,OAAO,MAAM;;2DAkB3B,CAAA"}
|
package/string/index.js
CHANGED
|
@@ -5,49 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.parseFrcsTripSummaryFile = exports.parseFrcsSurveyFile = exports.parseFrcsPlotFile = void 0;
|
|
8
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
-
var _wrapAsyncGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapAsyncGenerator"));
|
|
10
|
-
var _awaitAsyncGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/awaitAsyncGenerator"));
|
|
11
|
-
var _asyncGeneratorDelegate2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncGeneratorDelegate"));
|
|
12
8
|
var _parseFrcsSurveyFile2 = _interopRequireDefault(require("../survey/parseFrcsSurveyFile.js"));
|
|
13
9
|
var _parseFrcsPlotFile2 = _interopRequireDefault(require("../parseFrcsPlotFile.js"));
|
|
14
10
|
var _parseFrcsTripSummaryFile2 = _interopRequireDefault(require("../parseFrcsTripSummaryFile.js"));
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
function linesOf(_x) {
|
|
18
|
-
return _linesOf.apply(this, arguments);
|
|
11
|
+
async function* linesOf(s) {
|
|
12
|
+
yield* s.split(/\r\n?|\n/gm);
|
|
19
13
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return _context.delegateYield((0, _asyncGeneratorDelegate2["default"])(_asyncIterator(s.split(/\r\n?|\n/gm)), _awaitAsyncGenerator2["default"]), "t0", 1);
|
|
26
|
-
case 1:
|
|
27
|
-
case "end":
|
|
28
|
-
return _context.stop();
|
|
29
|
-
}
|
|
30
|
-
}, _callee);
|
|
31
|
-
}));
|
|
32
|
-
return _linesOf.apply(this, arguments);
|
|
33
|
-
}
|
|
34
|
-
var convertLineBased = function convertLineBased(fn) {
|
|
35
|
-
return function (file, str) {
|
|
36
|
-
for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
37
|
-
rest[_key - 2] = arguments[_key];
|
|
38
|
-
}
|
|
39
|
-
return fn.apply(void 0, [file, linesOf(str)].concat(rest));
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
var convertChunkBased = function convertChunkBased(fn) {
|
|
43
|
-
return function (file, str) {
|
|
44
|
-
for (var _len2 = arguments.length, rest = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
45
|
-
rest[_key2 - 2] = arguments[_key2];
|
|
46
|
-
}
|
|
47
|
-
return fn.apply(void 0, [file, [str]].concat(rest));
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
var parseFrcsSurveyFile = exports.parseFrcsSurveyFile = convertChunkBased(_parseFrcsSurveyFile2["default"]);
|
|
51
|
-
var parseFrcsPlotFile = exports.parseFrcsPlotFile = convertLineBased(_parseFrcsPlotFile2["default"]);
|
|
52
|
-
var parseFrcsTripSummaryFile = exports.parseFrcsTripSummaryFile = convertLineBased(_parseFrcsTripSummaryFile2["default"]);
|
|
14
|
+
const convertLineBased = fn => (file, str, ...rest) => fn(file, linesOf(str), ...rest);
|
|
15
|
+
const convertChunkBased = fn => (file, str, ...rest) => fn(file, [str], ...rest);
|
|
16
|
+
const parseFrcsSurveyFile = exports.parseFrcsSurveyFile = convertChunkBased(_parseFrcsSurveyFile2.default);
|
|
17
|
+
const parseFrcsPlotFile = exports.parseFrcsPlotFile = convertLineBased(_parseFrcsPlotFile2.default);
|
|
18
|
+
const parseFrcsTripSummaryFile = exports.parseFrcsTripSummaryFile = convertLineBased(_parseFrcsTripSummaryFile2.default);
|
|
53
19
|
//# sourceMappingURL=index.js.map
|
package/string/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_parseFrcsSurveyFile2","_interopRequireDefault","require","_parseFrcsPlotFile2","_parseFrcsTripSummaryFile2","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_parseFrcsSurveyFile2","_interopRequireDefault","require","_parseFrcsPlotFile2","_parseFrcsTripSummaryFile2","linesOf","s","split","convertLineBased","fn","file","str","rest","convertChunkBased","parseFrcsSurveyFile","exports","_parseFrcsSurveyFile","parseFrcsPlotFile","_parseFrcsPlotFile","parseFrcsTripSummaryFile","_parseFrcsTripSummaryFile"],"sources":["../../src/string/index.ts"],"sourcesContent":["import _parseFrcsSurveyFile from '../survey/parseFrcsSurveyFile'\nimport _parseFrcsPlotFile from '../parseFrcsPlotFile'\nimport _parseFrcsTripSummaryFile from '../parseFrcsTripSummaryFile'\n\nasync function* linesOf(s: string): AsyncIterable<string> {\n yield* s.split(/\\r\\n?|\\n/gm)\n}\nconst convertLineBased =\n <T, Rest extends any[]>(\n fn: (\n file: string,\n lines: AsyncIterable<string>,\n ...rest: Rest\n ) => Promise<T>\n ) =>\n (file: string, str: string, ...rest: Rest): Promise<T> =>\n fn(file, linesOf(str), ...rest)\n\nconst convertChunkBased =\n <T, Rest extends any[]>(\n fn: (\n file: string,\n lines: Iterable<string> | AsyncIterable<string>,\n ...rest: Rest\n ) => Promise<T>\n ) =>\n (file: string, str: string, ...rest: Rest): Promise<T> =>\n fn(file, [str], ...rest)\n\nexport const parseFrcsSurveyFile = convertChunkBased(_parseFrcsSurveyFile)\nexport const parseFrcsPlotFile = convertLineBased(_parseFrcsPlotFile)\nexport const parseFrcsTripSummaryFile = convertLineBased(\n _parseFrcsTripSummaryFile\n)\n"],"mappings":";;;;;;;AAAA,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,0BAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,gBAAgBG,OAAOA,CAACC,CAAS,EAAyB;EACxD,OAAOA,CAAC,CAACC,KAAK,CAAC,YAAY,CAAC;AAC9B;AACA,MAAMC,gBAAgB,GAElBC,EAIe,IAEjB,CAACC,IAAY,EAAEC,GAAW,EAAE,GAAGC,IAAU,KACvCH,EAAE,CAACC,IAAI,EAAEL,OAAO,CAACM,GAAG,CAAC,EAAE,GAAGC,IAAI,CAAC;AAEnC,MAAMC,iBAAiB,GAEnBJ,EAIe,IAEjB,CAACC,IAAY,EAAEC,GAAW,EAAE,GAAGC,IAAU,KACvCH,EAAE,CAACC,IAAI,EAAE,CAACC,GAAG,CAAC,EAAE,GAAGC,IAAI,CAAC;AAErB,MAAME,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAGD,iBAAiB,CAACG,6BAAoB,CAAC;AACnE,MAAMC,iBAAiB,GAAAF,OAAA,CAAAE,iBAAA,GAAGT,gBAAgB,CAACU,2BAAkB,CAAC;AAC9D,MAAMC,wBAAwB,GAAAJ,OAAA,CAAAI,wBAAA,GAAGX,gBAAgB,CACtDY,kCACF,CAAC","ignoreList":[]}
|
package/survey/FrcsSurveyFile.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.defaultFrcsShotColumnConfig = void 0;
|
|
7
7
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
const defaultFrcsShotColumnConfig = exports.defaultFrcsShotColumnConfig = {
|
|
10
10
|
toStation: 5,
|
|
11
11
|
fromStation: 5,
|
|
12
12
|
distance: 6,
|