@speleotica/frcsdata 4.0.0 → 4.0.1
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/FrcsPlotFile.js +5 -1
- package/FrcsPlotShot.js +5 -1
- package/FrcsShot.js +4 -5
- package/FrcsSurveyFile.js +5 -1
- package/FrcsTrip.js +5 -1
- package/FrcsTripSummary.js +5 -1
- package/FrcsTripSummaryFile.js +5 -1
- package/es/FrcsPlotFile.js +5 -1
- package/es/FrcsPlotShot.js +5 -1
- package/es/FrcsShot.js +5 -6
- package/es/FrcsSurveyFile.js +5 -1
- package/es/FrcsTrip.js +5 -1
- package/es/FrcsTripSummary.js +5 -1
- package/es/FrcsTripSummaryFile.js +5 -1
- package/es/formatFrcsShot.js +5 -19
- package/es/formatFrcsShot.spec.js +8 -17
- package/es/index.js +21 -33
- package/es/node/index.js +2 -10
- package/es/node/parseFrcsPlotFile.spec.js +1 -5
- package/es/node/parseFrcsSurveyFile.spec.js +2 -6
- package/es/node/parseFrcsTripSummaryFile.spec.js +1 -5
- package/es/parseFrcsPlotFile.js +1 -26
- package/es/parseFrcsSurveyFile.js +45 -95
- package/es/parseFrcsTripSummaryFile.js +1 -12
- package/es/string/index.js +2 -9
- package/es/string/parseFrcsPlotFile.spec.js +1 -5
- package/es/string/parseFrcsSurveyFile.spec.js +8 -14
- package/formatFrcsShot.js +5 -19
- package/formatFrcsShot.spec.js +4 -15
- package/index.js +20 -32
- package/node/index.js +1 -9
- package/node/parseFrcsPlotFile.spec.js +165 -180
- package/node/parseFrcsSurveyFile.spec.js +306 -321
- package/node/parseFrcsTripSummaryFile.spec.js +83 -106
- package/package.json +15 -15
- package/parseFrcsPlotFile.js +224 -318
- package/parseFrcsSurveyFile.js +411 -452
- package/parseFrcsTripSummaryFile.js +102 -142
- package/string/index.js +10 -27
- package/string/parseFrcsPlotFile.spec.js +165 -180
- package/string/parseFrcsSurveyFile.spec.js +598 -689
- package/yarn.lock +1285 -702
package/parseFrcsSurveyFile.js
CHANGED
|
@@ -1,119 +1,95 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = parseFrcsSurveyFile;
|
|
9
|
-
|
|
10
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
-
|
|
12
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
-
|
|
14
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
15
|
-
|
|
16
|
-
var _asyncIterator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncIterator"));
|
|
17
|
-
|
|
18
11
|
var _parseSegment = require("parse-segment");
|
|
19
|
-
|
|
20
12
|
var _unitized = require("@speleotica/unitized");
|
|
21
|
-
|
|
22
13
|
var _FrcsShot = require("./FrcsShot");
|
|
23
|
-
|
|
14
|
+
function _asyncIterator(iterable) { var method, async, sync, retry = 2; for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) { if (async && null != (method = iterable[async])) return method.call(iterable); if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable)); async = "@@asyncIterator", sync = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
|
|
15
|
+
function AsyncFromSyncIterator(s) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var done = r.done; return Promise.resolve(r.value).then(function (value) { return { value: value, done: done }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(s) { this.s = s, this.n = s.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, "return": function _return(value) { var ret = this.s["return"]; return void 0 === ret ? Promise.resolve({ value: value, done: !0 }) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments)); }, "throw": function _throw(value) { var thr = this.s["return"]; return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(s); }
|
|
24
16
|
function parseNumber(s, unit) {
|
|
25
17
|
var value = parseFloat(s);
|
|
26
18
|
if (isNaN(value)) return null;
|
|
27
19
|
return new _unitized.UnitizedNumber(value, unit);
|
|
28
20
|
}
|
|
29
|
-
|
|
30
21
|
function parseAzimuth(s, unit) {
|
|
31
22
|
var parsed = parseNumber(s, unit);
|
|
32
23
|
return (parsed === null || parsed === void 0 ? void 0 : parsed.get(_unitized.Angle.degrees)) === 360 ? _unitized.Unitize.degrees(0) : parsed;
|
|
33
24
|
}
|
|
34
|
-
|
|
35
25
|
function parseKind(kind) {
|
|
36
26
|
switch (kind) {
|
|
37
27
|
case 'H':
|
|
38
28
|
return _FrcsShot.FrcsShotKind.Horizontal;
|
|
39
|
-
|
|
40
29
|
case 'D':
|
|
41
30
|
return _FrcsShot.FrcsShotKind.Diagonal;
|
|
42
|
-
|
|
43
31
|
default:
|
|
44
32
|
return _FrcsShot.FrcsShotKind.Normal;
|
|
45
33
|
}
|
|
46
34
|
}
|
|
47
|
-
|
|
48
35
|
function parseLengthUnit(unit) {
|
|
49
36
|
switch (unit) {
|
|
50
37
|
case 'FI':
|
|
51
38
|
return _unitized.Length.inches;
|
|
52
|
-
|
|
39
|
+
case 'FF':
|
|
53
40
|
case 'FT':
|
|
54
41
|
return _unitized.Length.feet;
|
|
55
|
-
|
|
42
|
+
case 'MT':
|
|
56
43
|
case 'M ':
|
|
57
44
|
return _unitized.Length.meters;
|
|
58
45
|
}
|
|
59
|
-
|
|
60
46
|
return null;
|
|
61
47
|
}
|
|
62
|
-
|
|
63
48
|
function parseAngleUnit(unit) {
|
|
64
49
|
switch (unit) {
|
|
65
50
|
case 'D':
|
|
66
51
|
return _unitized.Angle.degrees;
|
|
67
|
-
|
|
68
52
|
case 'G':
|
|
69
53
|
return _unitized.Angle.gradians;
|
|
70
|
-
|
|
71
54
|
case 'M':
|
|
72
55
|
return _unitized.Angle.milsNATO;
|
|
73
56
|
}
|
|
74
|
-
|
|
75
57
|
return null;
|
|
76
|
-
}
|
|
77
|
-
|
|
58
|
+
}
|
|
78
59
|
|
|
60
|
+
// determines if a cell contains a valid station name.
|
|
79
61
|
function isValidStation(s) {
|
|
80
62
|
return /^\s*\S+\s*$/.test(s);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
63
|
+
}
|
|
64
|
+
// determines if a cell contains a valid unsigned integer.
|
|
84
65
|
function isValidUInt(s) {
|
|
85
66
|
return /^\s*[0-9]+\s*$/.test(s);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
67
|
+
}
|
|
68
|
+
// determines if a cell contains a valid float.
|
|
89
69
|
function isValidFloat(s) {
|
|
90
70
|
return /^\s*[-+]?([0-9]+(\.[0-9]*)?|\.[0-9]+)\s*$/.test(s);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
71
|
+
}
|
|
72
|
+
// determines if a cell contains a valid unsigned float or whitespace.
|
|
94
73
|
function isValidOptFloat(s) {
|
|
95
74
|
return /^\s*[-+]?[0-9]*(\.[0-9]*)?\s*$/.test(s);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
75
|
+
}
|
|
76
|
+
// determines if a cell contains a valid unsigned float or whitespace.
|
|
99
77
|
function isValidOptUFloat(s) {
|
|
100
78
|
return /^\s*[0-9]*(\.[0-9]*)?\s*$/.test(s);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
79
|
+
}
|
|
80
|
+
// determines if a cell contains a valid unsigned float.
|
|
104
81
|
function isValidUFloat(s) {
|
|
105
82
|
return /^\s*([0-9]+(\.[0-9]*)?|\.[0-9]+)\s*$/.test(s);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
83
|
+
}
|
|
84
|
+
// determines if a cell contains a valid inclination or whitespace.
|
|
109
85
|
function isValidOptInclination(s) {
|
|
110
86
|
return /^\s*[-+]?[0-9]*(\.[0-9]*)?\s*$/.test(s);
|
|
111
87
|
}
|
|
112
|
-
|
|
113
88
|
function parseLrud(s, unit) {
|
|
114
89
|
var value = parseFloat(s);
|
|
115
90
|
return !Number.isFinite(value) || value < 0 ? null : new _unitized.UnitizedNumber(value, unit);
|
|
116
91
|
}
|
|
92
|
+
|
|
117
93
|
/**
|
|
118
94
|
* Parses a raw cdata.fr survey file. These look like so:
|
|
119
95
|
*
|
|
@@ -159,214 +135,229 @@ FI B DD
|
|
|
159
135
|
...</pre>
|
|
160
136
|
*
|
|
161
137
|
*/
|
|
162
|
-
|
|
163
|
-
|
|
164
138
|
function parseFrcsSurveyFile(_x, _x2) {
|
|
165
139
|
return _parseFrcsSurveyFile.apply(this, arguments);
|
|
166
140
|
}
|
|
167
|
-
|
|
168
141
|
function _parseFrcsSurveyFile() {
|
|
169
|
-
_parseFrcsSurveyFile = (0, _asyncToGenerator2["default"])(
|
|
170
|
-
|
|
171
|
-
_regenerator["default"].mark(function _callee(file, // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
142
|
+
_parseFrcsSurveyFile = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(file,
|
|
143
|
+
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
172
144
|
lines) {
|
|
173
|
-
var cave, location, trips, errors, tripName, tripTeam, tripDate, inTripComment, tripCommentStartLine, tripCommentEndLine, tripComment, commentLines, trip, inBlockComment, section, getComment, lineNumber,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
if (!commentLines) return null;
|
|
181
|
-
var comment = commentLines.join('\n').trim();
|
|
182
|
-
commentLines = null;
|
|
183
|
-
return comment || null;
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
cave = null;
|
|
187
|
-
location = null;
|
|
188
|
-
trips = [];
|
|
189
|
-
errors = [];
|
|
190
|
-
inTripComment = true;
|
|
191
|
-
tripCommentStartLine = 1;
|
|
192
|
-
tripCommentEndLine = -1;
|
|
193
|
-
tripComment = [];
|
|
145
|
+
var cave, location, trips, errors, tripName, tripTeam, tripDate, inTripComment, tripCommentStartLine, tripCommentEndLine, tripComment, commentLines, trip, inBlockComment, section, getComment, lineNumber, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _loop, _iterator, _step, _ret;
|
|
146
|
+
return _regenerator["default"].wrap(function _callee$(_context2) {
|
|
147
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
148
|
+
case 0:
|
|
149
|
+
getComment = function _getComment() {
|
|
150
|
+
if (!commentLines) return null;
|
|
151
|
+
var comment = commentLines.join('\n').trim();
|
|
194
152
|
commentLines = null;
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
153
|
+
return comment || null;
|
|
154
|
+
};
|
|
155
|
+
cave = null;
|
|
156
|
+
location = null;
|
|
157
|
+
trips = [];
|
|
158
|
+
errors = [];
|
|
159
|
+
inTripComment = true;
|
|
160
|
+
tripCommentStartLine = 1;
|
|
161
|
+
tripCommentEndLine = -1;
|
|
162
|
+
tripComment = [];
|
|
163
|
+
commentLines = null;
|
|
164
|
+
trip = null;
|
|
165
|
+
inBlockComment = false;
|
|
166
|
+
lineNumber = 0;
|
|
167
|
+
_iteratorAbruptCompletion = false;
|
|
168
|
+
_didIteratorError = false;
|
|
169
|
+
_context2.prev = 15;
|
|
170
|
+
_loop = /*#__PURE__*/_regenerator["default"].mark(function _loop() {
|
|
171
|
+
var line, errored, thisLineNumber, error, validate, match, _match, k, team, month, day, year, _match2, part, distanceUnit, azimuthUnit, inclinationUnit, backsightAzimuthCorrected, backsightInclinationCorrected, hasBacksightAzimuth, hasBacksightInclination, _trip, shots, _trip$header, _azimuthUnit, _inclinationUnit, _distanceUnit, inches, fromStr, lStr, rStr, uStr, dStr, up, down, left, right, toStr, _shot, fromLrudMatch, fromLruds, _fromLrudMatch$1$trim, _fromLrudMatch$1$trim2, _left, _right, _up, _down, azmFsStr, azmBsStr, incFsStr, incBsStr, kind, distance, horizontalDistance, verticalDistance, frontsightInclination, backsightInclination, excludeDistance, isSplay, feetStr, inchesStr, invalid, _feetStr, h, v, d, _v, frontsightAzimuth, backsightAzimuth, shot;
|
|
172
|
+
return _regenerator["default"].wrap(function _loop$(_context) {
|
|
173
|
+
while (1) switch (_context.prev = _context.next) {
|
|
174
|
+
case 0:
|
|
175
|
+
line = _step.value;
|
|
176
|
+
errored = false;
|
|
177
|
+
thisLineNumber = lineNumber;
|
|
178
|
+
error = function error(message, startColumn, endColumn) {
|
|
179
|
+
errored = true;
|
|
180
|
+
errors.push(new _parseSegment.SegmentParseError(message, new _parseSegment.Segment({
|
|
181
|
+
value: line,
|
|
182
|
+
source: file,
|
|
183
|
+
startLine: thisLineNumber,
|
|
184
|
+
startCol: 0
|
|
185
|
+
}).substring(startColumn, endColumn)));
|
|
186
|
+
};
|
|
187
|
+
validate = function validate(startColumn, endColumn, fieldName, validator) {
|
|
188
|
+
var field = line.substring(startColumn, endColumn);
|
|
189
|
+
if (!validator(field)) {
|
|
190
|
+
error((field.trim() ? 'Invalid ' : 'Missing ') + fieldName, startColumn, endColumn);
|
|
191
|
+
}
|
|
192
|
+
return field;
|
|
193
|
+
};
|
|
194
|
+
lineNumber++;
|
|
195
|
+
if (lineNumber === 1) {
|
|
196
|
+
match = /^\s*([^,]+)(,(.*))?/.exec(line);
|
|
197
|
+
if (match) {
|
|
198
|
+
cave = match[1].trim();
|
|
199
|
+
if (match[3]) {
|
|
200
|
+
location = match[3].trim();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
237
203
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
204
|
+
if (!(line.charAt(0) === ' ' && line.charAt(1) === '*')) {
|
|
205
|
+
_context.next = 12;
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
inTripComment = !inTripComment;
|
|
209
|
+
if (inTripComment) {
|
|
210
|
+
section = undefined;
|
|
211
|
+
tripComment = [];
|
|
212
|
+
tripCommentStartLine = lineNumber;
|
|
213
|
+
} else {
|
|
214
|
+
tripCommentEndLine = lineNumber;
|
|
215
|
+
}
|
|
216
|
+
_context.next = 107;
|
|
217
|
+
break;
|
|
218
|
+
case 12:
|
|
219
|
+
if (!inTripComment) {
|
|
220
|
+
_context.next = 18;
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
if (lineNumber === tripCommentStartLine + 1) {
|
|
224
|
+
tripName = line && line.trim();
|
|
225
|
+
} else if (lineNumber === tripCommentStartLine + 2) {
|
|
226
|
+
_match = /^(.+?)\s*[-.]\s*(\d+)\/(\d+)\/(\d+)$/.exec(line && line.trim());
|
|
227
|
+
if (_match) {
|
|
228
|
+
k = 1;
|
|
229
|
+
team = _match[k++];
|
|
230
|
+
month = parseInt(_match[k++]);
|
|
231
|
+
day = parseInt(_match[k++]);
|
|
232
|
+
year = parseInt(_match[k++]);
|
|
233
|
+
tripDate = new Date(year < 70 ? year + 2000 : year, month - 1, day);
|
|
234
|
+
tripTeam = team.split(team.indexOf(';') >= 0 ? /\s*;\s*/g : /\s*,\s*/g);
|
|
235
|
+
}
|
|
236
|
+
} else if (lineNumber > 1) {
|
|
237
|
+
tripComment.push(line);
|
|
238
|
+
}
|
|
239
|
+
_match2 = /^\*\*\*([^*])\*\*\*/.exec(line);
|
|
257
240
|
if (_match2) {
|
|
258
|
-
|
|
259
|
-
var team = _match2[k++];
|
|
260
|
-
var month = parseInt(_match2[k++]);
|
|
261
|
-
var day = parseInt(_match2[k++]);
|
|
262
|
-
var year = parseInt(_match2[k++]);
|
|
263
|
-
tripDate = new Date(year < 70 ? year + 2000 : year, month - 1, day);
|
|
264
|
-
tripTeam = team.split(team.indexOf(';') >= 0 ? /\s*;\s*/g : /\s*,\s*/g);
|
|
241
|
+
section = _match2[1].trim();
|
|
265
242
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
243
|
+
_context.next = 107;
|
|
244
|
+
break;
|
|
245
|
+
case 18:
|
|
246
|
+
if (!(line.charAt(0) === '*')) {
|
|
247
|
+
_context.next = 23;
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
inBlockComment = !inBlockComment;
|
|
251
|
+
if (inBlockComment) commentLines = [];else if (commentLines) {
|
|
252
|
+
part = line.substring(1).trim();
|
|
253
|
+
if (part && commentLines) commentLines.push(part);
|
|
254
|
+
}
|
|
255
|
+
_context.next = 107;
|
|
256
|
+
break;
|
|
257
|
+
case 23:
|
|
258
|
+
if (!inBlockComment) {
|
|
259
|
+
_context.next = 27;
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
if (commentLines) commentLines.push(line);
|
|
263
|
+
_context.next = 107;
|
|
264
|
+
break;
|
|
265
|
+
case 27:
|
|
266
|
+
if (!(lineNumber === tripCommentEndLine + 1)) {
|
|
267
|
+
_context.next = 44;
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
// FT CC DD
|
|
271
|
+
// 01234567
|
|
272
|
+
distanceUnit = parseLengthUnit(line.slice(0, 2));
|
|
273
|
+
if (!distanceUnit) {
|
|
274
|
+
distanceUnit = _unitized.Length.feet;
|
|
275
|
+
error('Invalid distance unit', 0, 2);
|
|
276
|
+
}
|
|
277
|
+
azimuthUnit = parseAngleUnit(line[6]);
|
|
278
|
+
if (!azimuthUnit) {
|
|
279
|
+
azimuthUnit = _unitized.Angle.degrees;
|
|
280
|
+
error('Invalid azimuth unit', 6, 7);
|
|
281
|
+
}
|
|
282
|
+
inclinationUnit = parseAngleUnit(line[7]);
|
|
283
|
+
if (!inclinationUnit) {
|
|
284
|
+
inclinationUnit = _unitized.Angle.degrees;
|
|
285
|
+
error('Invalid inclination unit', 7, 8);
|
|
286
|
+
}
|
|
287
|
+
backsightAzimuthCorrected = line[3] === 'C';
|
|
288
|
+
backsightInclinationCorrected = line[4] === 'C';
|
|
289
|
+
hasBacksightAzimuth = line[3] !== ' ' && line[3] !== '-';
|
|
290
|
+
hasBacksightInclination = line[4] !== ' ' && line[4] !== '-';
|
|
291
|
+
if (!/[-CB ]/.test(line[3])) {
|
|
292
|
+
error('Invalid backsight azimuth type', 3, 4);
|
|
293
|
+
}
|
|
294
|
+
if (!/[-CB ]/.test(line[4])) {
|
|
295
|
+
error('Invalid backsight inclination type', 4, 5);
|
|
296
|
+
}
|
|
297
|
+
trip = {
|
|
298
|
+
header: {
|
|
299
|
+
name: tripName || '',
|
|
300
|
+
comment: tripComment && tripComment.join('\n') || null,
|
|
301
|
+
section: section,
|
|
302
|
+
date: tripDate,
|
|
303
|
+
team: tripTeam,
|
|
304
|
+
distanceUnit: distanceUnit,
|
|
305
|
+
azimuthUnit: azimuthUnit,
|
|
306
|
+
inclinationUnit: inclinationUnit,
|
|
307
|
+
backsightAzimuthCorrected: backsightAzimuthCorrected,
|
|
308
|
+
backsightInclinationCorrected: backsightInclinationCorrected,
|
|
309
|
+
hasBacksightAzimuth: hasBacksightAzimuth,
|
|
310
|
+
hasBacksightInclination: hasBacksightInclination
|
|
311
|
+
},
|
|
312
|
+
shots: []
|
|
313
|
+
};
|
|
314
|
+
trips.push(trip);
|
|
315
|
+
_context.next = 107;
|
|
316
|
+
break;
|
|
317
|
+
case 44:
|
|
318
|
+
if (!trip) {
|
|
319
|
+
_context.next = 107;
|
|
320
|
+
break;
|
|
321
|
+
}
|
|
322
|
+
_trip = trip, shots = _trip.shots, _trip$header = _trip.header, _azimuthUnit = _trip$header.azimuthUnit, _inclinationUnit = _trip$header.inclinationUnit;
|
|
323
|
+
_distanceUnit = trip.header.distanceUnit;
|
|
324
|
+
inches = _distanceUnit === _unitized.Length.inches;
|
|
325
|
+
if (inches) _distanceUnit = _unitized.Length.feet;
|
|
326
|
+
|
|
327
|
+
// rigorously check the values in all the columns to make sure this
|
|
328
|
+
// is really a survey shot line, just in case any stray comments are
|
|
329
|
+
// not properly delimited.
|
|
330
|
+
|
|
331
|
+
// from station name
|
|
332
|
+
if (/\S/.test(line.substring(5, 10))) {
|
|
333
|
+
_context.next = 51;
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
return _context.abrupt("return", "continue");
|
|
337
|
+
case 51:
|
|
338
|
+
fromStr = validate(5, 10, 'from station', isValidStation); // Sadly I have found negative LRUD values in Chip's format and apparently
|
|
339
|
+
// his program doesn't fail on them, so I have to accept them here
|
|
340
|
+
// isValidOptFloat instead of isValidOptUFloat
|
|
341
|
+
lStr = validate(40, 43, 'left', isValidOptFloat);
|
|
342
|
+
rStr = validate(43, 46, 'right', isValidOptFloat);
|
|
343
|
+
uStr = validate(46, 49, 'up', isValidOptFloat);
|
|
344
|
+
dStr = validate(49, 52, 'down', isValidOptFloat);
|
|
345
|
+
if (!errored) {
|
|
346
|
+
_context.next = 58;
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
return _context.abrupt("return", "continue");
|
|
350
|
+
case 58:
|
|
351
|
+
up = parseLrud(uStr, _distanceUnit);
|
|
352
|
+
down = parseLrud(dStr, _distanceUnit);
|
|
353
|
+
left = parseLrud(lStr, _distanceUnit);
|
|
354
|
+
right = parseLrud(rStr, _distanceUnit); // to station name
|
|
355
|
+
toStr = line.substring(0, 5);
|
|
356
|
+
if (toStr.trim()) {
|
|
357
|
+
_context.next = 67;
|
|
358
|
+
break;
|
|
359
|
+
}
|
|
360
|
+
_shot = {
|
|
370
361
|
from: fromStr.trim(),
|
|
371
362
|
to: null,
|
|
372
363
|
kind: _FrcsShot.FrcsShotKind.Normal,
|
|
@@ -385,234 +376,202 @@ function _parseFrcsSurveyFile() {
|
|
|
385
376
|
comment: getComment()
|
|
386
377
|
};
|
|
387
378
|
shots.push(_shot);
|
|
388
|
-
return "continue";
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
_up = _fromLrudMatch$1$trim2[2],
|
|
406
|
-
_down = _fromLrudMatch$1$trim2[3];
|
|
407
|
-
|
|
408
|
-
fromLruds = {
|
|
409
|
-
left: _left,
|
|
410
|
-
right: _right,
|
|
411
|
-
up: _up,
|
|
412
|
-
down: _down
|
|
413
|
-
};
|
|
414
|
-
} // azimuth and inclination
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
var azmFsStr = validate(19, 25, 'azimuth', isValidOptUFloat);
|
|
418
|
-
var azmBsStr = validate(25, 30, 'azimuth', isValidOptUFloat);
|
|
419
|
-
var incFsStr = line.substring(30, 35);
|
|
420
|
-
var incBsStr = line.substring(35, 40);
|
|
421
|
-
if (errored) return "continue";
|
|
422
|
-
var kind;
|
|
423
|
-
var distance;
|
|
424
|
-
var horizontalDistance;
|
|
425
|
-
var verticalDistance;
|
|
426
|
-
var frontsightInclination;
|
|
427
|
-
var backsightInclination;
|
|
428
|
-
var excludeDistance;
|
|
429
|
-
var isSplay; // parse distance
|
|
430
|
-
|
|
431
|
-
if (inches) {
|
|
432
|
-
var feetStr = line.substring(10, 14);
|
|
433
|
-
var inchesStr = line.substring(14, 17); // feet and inches are not both optional
|
|
379
|
+
return _context.abrupt("return", "continue");
|
|
380
|
+
case 67:
|
|
381
|
+
if (!isValidStation(toStr)) {
|
|
382
|
+
error('Invalid station name', 0, 5);
|
|
383
|
+
}
|
|
384
|
+
fromLrudMatch = new RegExp("^\\s+".concat(fromStr.trim().replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), "((\\s+(\\d+(\\.\\d*)?|\\.\\d+)){4})")).exec(line.substring(52));
|
|
385
|
+
if (fromLrudMatch) {
|
|
386
|
+
_fromLrudMatch$1$trim = fromLrudMatch[1].trim().split(/\s+/g).map(function (s) {
|
|
387
|
+
return parseLrud(s, _distanceUnit);
|
|
388
|
+
}), _fromLrudMatch$1$trim2 = (0, _slicedToArray2["default"])(_fromLrudMatch$1$trim, 4), _left = _fromLrudMatch$1$trim2[0], _right = _fromLrudMatch$1$trim2[1], _up = _fromLrudMatch$1$trim2[2], _down = _fromLrudMatch$1$trim2[3];
|
|
389
|
+
fromLruds = {
|
|
390
|
+
left: _left,
|
|
391
|
+
right: _right,
|
|
392
|
+
up: _up,
|
|
393
|
+
down: _down
|
|
394
|
+
};
|
|
395
|
+
}
|
|
434
396
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
397
|
+
// azimuth and inclination
|
|
398
|
+
azmFsStr = validate(19, 25, 'azimuth', isValidOptUFloat);
|
|
399
|
+
azmBsStr = validate(25, 30, 'azimuth', isValidOptUFloat);
|
|
400
|
+
incFsStr = line.substring(30, 35);
|
|
401
|
+
incBsStr = line.substring(35, 40);
|
|
402
|
+
if (!errored) {
|
|
403
|
+
_context.next = 76;
|
|
404
|
+
break;
|
|
405
|
+
}
|
|
406
|
+
return _context.abrupt("return", "continue");
|
|
407
|
+
case 76:
|
|
408
|
+
if (!inches) {
|
|
409
|
+
_context.next = 89;
|
|
410
|
+
break;
|
|
411
|
+
}
|
|
412
|
+
feetStr = line.substring(10, 14);
|
|
413
|
+
inchesStr = line.substring(14, 17); // feet and inches are not both optional
|
|
414
|
+
if (!(!isValidUInt(feetStr) && !isValidUInt(inchesStr))) {
|
|
415
|
+
_context.next = 83;
|
|
416
|
+
break;
|
|
417
|
+
}
|
|
418
|
+
invalid = feetStr.trim() || inchesStr.trim();
|
|
419
|
+
error(invalid ? 'Invalid distance' : 'Missing distance', 10, 17);
|
|
420
|
+
return _context.abrupt("return", "continue");
|
|
421
|
+
case 83:
|
|
422
|
+
// sometimes inches are omitted, hence the || 0...I'm assuming it's possible
|
|
440
423
|
// for feet to be omitted as well
|
|
441
|
-
|
|
442
|
-
|
|
443
424
|
distance = _unitized.Unitize.inches(parseFloat(inchesStr) || 0).add(_unitized.Unitize.feet(parseFloat(feetStr) || 0));
|
|
444
|
-
kind = parseKind(line[17]);
|
|
425
|
+
kind = parseKind(line[17]);
|
|
426
|
+
// NOTE there are two columns around here that can contain a *.
|
|
445
427
|
// I think they might represent different values, but thisis confused by
|
|
446
428
|
// the fact that for ft/in shots, if there is a D or H flag it occupies the
|
|
447
429
|
// first column that can contain a * for decimal feet shots
|
|
448
|
-
|
|
449
430
|
excludeDistance = line[18] === '*' || line[18] === 's';
|
|
450
431
|
isSplay = line[18] === 's';
|
|
451
|
-
|
|
432
|
+
_context.next = 94;
|
|
433
|
+
break;
|
|
434
|
+
case 89:
|
|
452
435
|
// decimal feet are not optional
|
|
453
|
-
|
|
454
|
-
|
|
436
|
+
_feetStr = validate(10, 16, 'distance', isValidUFloat);
|
|
455
437
|
distance = new _unitized.UnitizedNumber(parseFloat(_feetStr), _distanceUnit);
|
|
456
438
|
kind = parseKind(line[16]);
|
|
457
439
|
excludeDistance = line[17] === '*' || line[17] === 's';
|
|
458
440
|
isSplay = line[17] === 's';
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
} // convert horizontal and diagonal shots to standard
|
|
464
|
-
// in this case incFs is the vertical offset between stations
|
|
465
|
-
// fortunately it appears we can always count on incFs being specified
|
|
466
|
-
// and incBs not being specified for these types of shots
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
if (kind === _FrcsShot.FrcsShotKind.Horizontal) {
|
|
470
|
-
// distance is horizontal offset and incFsStr is vertical offset
|
|
471
|
-
horizontalDistance = distance;
|
|
472
|
-
var h = horizontalDistance.get(_distanceUnit);
|
|
473
|
-
var v = parseFloat(incFsStr);
|
|
474
|
-
verticalDistance = new _unitized.UnitizedNumber(v, _distanceUnit);
|
|
475
|
-
distance = new _unitized.UnitizedNumber(Math.sqrt(h * h + v * v), _distanceUnit);
|
|
476
|
-
frontsightInclination = _unitized.Angle.atan2(verticalDistance, horizontalDistance);
|
|
477
|
-
backsightInclination = null;
|
|
478
|
-
} else if (kind === _FrcsShot.FrcsShotKind.Diagonal) {
|
|
479
|
-
// distance is as usual, but incFsStr is vertical offset
|
|
480
|
-
var d = distance.get(_distanceUnit);
|
|
481
|
-
|
|
482
|
-
var _v = parseFloat(incFsStr);
|
|
483
|
-
|
|
484
|
-
verticalDistance = new _unitized.UnitizedNumber(_v, _distanceUnit);
|
|
485
|
-
frontsightInclination = _unitized.Angle.asin(_v / d);
|
|
486
|
-
backsightInclination = null;
|
|
487
|
-
} else {
|
|
488
|
-
// frontsight inclination
|
|
489
|
-
validate(30, 35, 'inclination', isValidOptInclination); // frontsight inclination
|
|
490
|
-
|
|
491
|
-
validate(35, 40, 'inclination', isValidOptInclination);
|
|
492
|
-
frontsightInclination = parseNumber(incFsStr, _inclinationUnit);
|
|
493
|
-
backsightInclination = parseNumber(incBsStr, _inclinationUnit);
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
if (errored) return "continue";
|
|
497
|
-
var frontsightAzimuth = parseAzimuth(azmFsStr, _azimuthUnit);
|
|
498
|
-
var backsightAzimuth = parseAzimuth(azmBsStr, _azimuthUnit);
|
|
499
|
-
|
|
500
|
-
if (!frontsightInclination && !backsightInclination) {
|
|
501
|
-
frontsightInclination = _unitized.Unitize.degrees(0);
|
|
502
|
-
}
|
|
441
|
+
case 94:
|
|
442
|
+
if (kind !== _FrcsShot.FrcsShotKind.Normal) {
|
|
443
|
+
validate(30, 35, 'vertical-distance', isValidFloat);
|
|
444
|
+
}
|
|
503
445
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
446
|
+
// convert horizontal and diagonal shots to standard
|
|
447
|
+
// in this case incFs is the vertical offset between stations
|
|
448
|
+
// fortunately it appears we can always count on incFs being specified
|
|
449
|
+
// and incBs not being specified for these types of shots
|
|
450
|
+
if (kind === _FrcsShot.FrcsShotKind.Horizontal) {
|
|
451
|
+
// distance is horizontal offset and incFsStr is vertical offset
|
|
452
|
+
horizontalDistance = distance;
|
|
453
|
+
h = horizontalDistance.get(_distanceUnit);
|
|
454
|
+
v = parseFloat(incFsStr);
|
|
455
|
+
verticalDistance = new _unitized.UnitizedNumber(v, _distanceUnit);
|
|
456
|
+
distance = new _unitized.UnitizedNumber(Math.sqrt(h * h + v * v), _distanceUnit);
|
|
457
|
+
frontsightInclination = _unitized.Angle.atan2(verticalDistance, horizontalDistance);
|
|
458
|
+
backsightInclination = null;
|
|
459
|
+
} else if (kind === _FrcsShot.FrcsShotKind.Diagonal) {
|
|
460
|
+
// distance is as usual, but incFsStr is vertical offset
|
|
461
|
+
d = distance.get(_distanceUnit);
|
|
462
|
+
_v = parseFloat(incFsStr);
|
|
463
|
+
verticalDistance = new _unitized.UnitizedNumber(_v, _distanceUnit);
|
|
464
|
+
frontsightInclination = _unitized.Angle.asin(_v / d);
|
|
465
|
+
backsightInclination = null;
|
|
466
|
+
} else {
|
|
467
|
+
// frontsight inclination
|
|
468
|
+
validate(30, 35, 'inclination', isValidOptInclination);
|
|
469
|
+
// frontsight inclination
|
|
470
|
+
validate(35, 40, 'inclination', isValidOptInclination);
|
|
471
|
+
frontsightInclination = parseNumber(incFsStr, _inclinationUnit);
|
|
472
|
+
backsightInclination = parseNumber(incBsStr, _inclinationUnit);
|
|
473
|
+
}
|
|
474
|
+
if (!errored) {
|
|
475
|
+
_context.next = 98;
|
|
476
|
+
break;
|
|
477
|
+
}
|
|
478
|
+
return _context.abrupt("return", "continue");
|
|
479
|
+
case 98:
|
|
480
|
+
frontsightAzimuth = parseAzimuth(azmFsStr, _azimuthUnit);
|
|
481
|
+
backsightAzimuth = parseAzimuth(azmBsStr, _azimuthUnit);
|
|
482
|
+
if (!frontsightInclination && !backsightInclination) {
|
|
483
|
+
frontsightInclination = _unitized.Unitize.degrees(0);
|
|
484
|
+
}
|
|
485
|
+
shot = {
|
|
486
|
+
from: fromStr.trim(),
|
|
487
|
+
to: toStr.trim(),
|
|
488
|
+
kind: kind,
|
|
489
|
+
distance: distance,
|
|
490
|
+
frontsightAzimuth: frontsightAzimuth,
|
|
491
|
+
backsightAzimuth: backsightAzimuth,
|
|
492
|
+
frontsightInclination: frontsightInclination,
|
|
493
|
+
backsightInclination: backsightInclination,
|
|
494
|
+
toLruds: {
|
|
495
|
+
left: left,
|
|
496
|
+
right: right,
|
|
497
|
+
up: up,
|
|
498
|
+
down: down
|
|
499
|
+
},
|
|
500
|
+
excludeDistance: excludeDistance,
|
|
501
|
+
comment: getComment()
|
|
502
|
+
};
|
|
503
|
+
if (isSplay) shot.isSplay = true;
|
|
504
|
+
if (fromLruds) shot.fromLruds = fromLruds;
|
|
505
|
+
if (horizontalDistance) shot.horizontalDistance = horizontalDistance;
|
|
506
|
+
if (verticalDistance) shot.verticalDistance = verticalDistance;
|
|
507
|
+
shots.push(shot);
|
|
508
|
+
case 107:
|
|
509
|
+
case "end":
|
|
510
|
+
return _context.stop();
|
|
527
511
|
}
|
|
528
|
-
};
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
_step = _context.sent;
|
|
538
|
-
_iteratorNormalCompletion = _step.done;
|
|
539
|
-
_context.next = 24;
|
|
540
|
-
return _step.value;
|
|
541
|
-
|
|
542
|
-
case 24:
|
|
543
|
-
_value = _context.sent;
|
|
544
|
-
|
|
545
|
-
if (_iteratorNormalCompletion) {
|
|
546
|
-
_context.next = 32;
|
|
547
|
-
break;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
_ret = _loop();
|
|
551
|
-
|
|
552
|
-
if (!(_ret === "continue")) {
|
|
553
|
-
_context.next = 29;
|
|
554
|
-
break;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
return _context.abrupt("continue", 29);
|
|
558
|
-
|
|
559
|
-
case 29:
|
|
560
|
-
_iteratorNormalCompletion = true;
|
|
561
|
-
_context.next = 18;
|
|
512
|
+
}, _loop);
|
|
513
|
+
});
|
|
514
|
+
_iterator = _asyncIterator(lines);
|
|
515
|
+
case 18:
|
|
516
|
+
_context2.next = 20;
|
|
517
|
+
return _iterator.next();
|
|
518
|
+
case 20:
|
|
519
|
+
if (!(_iteratorAbruptCompletion = !(_step = _context2.sent).done)) {
|
|
520
|
+
_context2.next = 28;
|
|
562
521
|
break;
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
522
|
+
}
|
|
523
|
+
return _context2.delegateYield(_loop(), "t0", 22);
|
|
524
|
+
case 22:
|
|
525
|
+
_ret = _context2.t0;
|
|
526
|
+
if (!(_ret === "continue")) {
|
|
527
|
+
_context2.next = 25;
|
|
566
528
|
break;
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
case "end":
|
|
612
|
-
return _context.stop();
|
|
613
|
-
}
|
|
529
|
+
}
|
|
530
|
+
return _context2.abrupt("continue", 25);
|
|
531
|
+
case 25:
|
|
532
|
+
_iteratorAbruptCompletion = false;
|
|
533
|
+
_context2.next = 18;
|
|
534
|
+
break;
|
|
535
|
+
case 28:
|
|
536
|
+
_context2.next = 34;
|
|
537
|
+
break;
|
|
538
|
+
case 30:
|
|
539
|
+
_context2.prev = 30;
|
|
540
|
+
_context2.t1 = _context2["catch"](15);
|
|
541
|
+
_didIteratorError = true;
|
|
542
|
+
_iteratorError = _context2.t1;
|
|
543
|
+
case 34:
|
|
544
|
+
_context2.prev = 34;
|
|
545
|
+
_context2.prev = 35;
|
|
546
|
+
if (!(_iteratorAbruptCompletion && _iterator["return"] != null)) {
|
|
547
|
+
_context2.next = 39;
|
|
548
|
+
break;
|
|
549
|
+
}
|
|
550
|
+
_context2.next = 39;
|
|
551
|
+
return _iterator["return"]();
|
|
552
|
+
case 39:
|
|
553
|
+
_context2.prev = 39;
|
|
554
|
+
if (!_didIteratorError) {
|
|
555
|
+
_context2.next = 42;
|
|
556
|
+
break;
|
|
557
|
+
}
|
|
558
|
+
throw _iteratorError;
|
|
559
|
+
case 42:
|
|
560
|
+
return _context2.finish(39);
|
|
561
|
+
case 43:
|
|
562
|
+
return _context2.finish(34);
|
|
563
|
+
case 44:
|
|
564
|
+
return _context2.abrupt("return", {
|
|
565
|
+
cave: cave,
|
|
566
|
+
location: location,
|
|
567
|
+
trips: trips,
|
|
568
|
+
errors: errors
|
|
569
|
+
});
|
|
570
|
+
case 45:
|
|
571
|
+
case "end":
|
|
572
|
+
return _context2.stop();
|
|
614
573
|
}
|
|
615
|
-
}, _callee, null, [[15,
|
|
574
|
+
}, _callee, null, [[15, 30, 34, 44], [35,, 39, 43]]);
|
|
616
575
|
}));
|
|
617
576
|
return _parseFrcsSurveyFile.apply(this, arguments);
|
|
618
577
|
}
|