1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.isPLPStream = isPLPStream;
|
7 | exports.readPLPStream = readPLPStream;
|
8 | exports.readValue = readValue;
|
9 | var _metadataParser = require("./metadata-parser");
|
10 | var _dataType = require("./data-type");
|
11 | var _iconvLite = _interopRequireDefault(require("iconv-lite"));
|
12 | var _sprintfJs = require("sprintf-js");
|
13 | var _guidParser = require("./guid-parser");
|
14 | var _helpers = require("./token/helpers");
|
15 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16 | const NULL = (1 << 16) - 1;
|
17 | const MAX = (1 << 16) - 1;
|
18 | const THREE_AND_A_THIRD = 3 + 1 / 3;
|
19 | const MONEY_DIVISOR = 10000;
|
20 | const PLP_NULL = 0xFFFFFFFFFFFFFFFFn;
|
21 | const UNKNOWN_PLP_LEN = 0xFFFFFFFFFFFFFFFEn;
|
22 | const DEFAULT_ENCODING = 'utf8';
|
23 | function readTinyInt(buf, offset) {
|
24 | return (0, _helpers.readUInt8)(buf, offset);
|
25 | }
|
26 | function readSmallInt(buf, offset) {
|
27 | return (0, _helpers.readInt16LE)(buf, offset);
|
28 | }
|
29 | function readInt(buf, offset) {
|
30 | return (0, _helpers.readInt32LE)(buf, offset);
|
31 | }
|
32 | function readBigInt(buf, offset) {
|
33 | let value;
|
34 | ({
|
35 | offset,
|
36 | value
|
37 | } = (0, _helpers.readBigInt64LE)(buf, offset));
|
38 | return new _helpers.Result(value.toString(), offset);
|
39 | }
|
40 | function readReal(buf, offset) {
|
41 | return (0, _helpers.readFloatLE)(buf, offset);
|
42 | }
|
43 | function readFloat(buf, offset) {
|
44 | return (0, _helpers.readDoubleLE)(buf, offset);
|
45 | }
|
46 | function readSmallMoney(buf, offset) {
|
47 | let value;
|
48 | ({
|
49 | offset,
|
50 | value
|
51 | } = (0, _helpers.readInt32LE)(buf, offset));
|
52 | return new _helpers.Result(value / MONEY_DIVISOR, offset);
|
53 | }
|
54 | function readMoney(buf, offset) {
|
55 | let high;
|
56 | ({
|
57 | offset,
|
58 | value: high
|
59 | } = (0, _helpers.readInt32LE)(buf, offset));
|
60 | let low;
|
61 | ({
|
62 | offset,
|
63 | value: low
|
64 | } = (0, _helpers.readUInt32LE)(buf, offset));
|
65 | return new _helpers.Result((low + 0x100000000 * high) / MONEY_DIVISOR, offset);
|
66 | }
|
67 | function readBit(buf, offset) {
|
68 | let value;
|
69 | ({
|
70 | offset,
|
71 | value
|
72 | } = (0, _helpers.readUInt8)(buf, offset));
|
73 | return new _helpers.Result(!!value, offset);
|
74 | }
|
75 | function readValue(buf, offset, metadata, options) {
|
76 | const type = metadata.type;
|
77 | switch (type.name) {
|
78 | case 'Null':
|
79 | return new _helpers.Result(null, offset);
|
80 | case 'TinyInt':
|
81 | {
|
82 | return readTinyInt(buf, offset);
|
83 | }
|
84 | case 'SmallInt':
|
85 | {
|
86 | return readSmallInt(buf, offset);
|
87 | }
|
88 | case 'Int':
|
89 | {
|
90 | return readInt(buf, offset);
|
91 | }
|
92 | case 'BigInt':
|
93 | {
|
94 | return readBigInt(buf, offset);
|
95 | }
|
96 | case 'IntN':
|
97 | {
|
98 | let dataLength;
|
99 | ({
|
100 | offset,
|
101 | value: dataLength
|
102 | } = (0, _helpers.readUInt8)(buf, offset));
|
103 | switch (dataLength) {
|
104 | case 0:
|
105 | return new _helpers.Result(null, offset);
|
106 | case 1:
|
107 | return readTinyInt(buf, offset);
|
108 | case 2:
|
109 | return readSmallInt(buf, offset);
|
110 | case 4:
|
111 | return readInt(buf, offset);
|
112 | case 8:
|
113 | return readBigInt(buf, offset);
|
114 | default:
|
115 | throw new Error('Unsupported dataLength ' + dataLength + ' for IntN');
|
116 | }
|
117 | }
|
118 | case 'Real':
|
119 | {
|
120 | return readReal(buf, offset);
|
121 | }
|
122 | case 'Float':
|
123 | {
|
124 | return readFloat(buf, offset);
|
125 | }
|
126 | case 'FloatN':
|
127 | {
|
128 | let dataLength;
|
129 | ({
|
130 | offset,
|
131 | value: dataLength
|
132 | } = (0, _helpers.readUInt8)(buf, offset));
|
133 | switch (dataLength) {
|
134 | case 0:
|
135 | return new _helpers.Result(null, offset);
|
136 | case 4:
|
137 | return readReal(buf, offset);
|
138 | case 8:
|
139 | return readFloat(buf, offset);
|
140 | default:
|
141 | throw new Error('Unsupported dataLength ' + dataLength + ' for FloatN');
|
142 | }
|
143 | }
|
144 | case 'SmallMoney':
|
145 | {
|
146 | return readSmallMoney(buf, offset);
|
147 | }
|
148 | case 'Money':
|
149 | return readMoney(buf, offset);
|
150 | case 'MoneyN':
|
151 | {
|
152 | let dataLength;
|
153 | ({
|
154 | offset,
|
155 | value: dataLength
|
156 | } = (0, _helpers.readUInt8)(buf, offset));
|
157 | switch (dataLength) {
|
158 | case 0:
|
159 | return new _helpers.Result(null, offset);
|
160 | case 4:
|
161 | return readSmallMoney(buf, offset);
|
162 | case 8:
|
163 | return readMoney(buf, offset);
|
164 | default:
|
165 | throw new Error('Unsupported dataLength ' + dataLength + ' for MoneyN');
|
166 | }
|
167 | }
|
168 | case 'Bit':
|
169 | {
|
170 | return readBit(buf, offset);
|
171 | }
|
172 | case 'BitN':
|
173 | {
|
174 | let dataLength;
|
175 | ({
|
176 | offset,
|
177 | value: dataLength
|
178 | } = (0, _helpers.readUInt8)(buf, offset));
|
179 | switch (dataLength) {
|
180 | case 0:
|
181 | return new _helpers.Result(null, offset);
|
182 | case 1:
|
183 | return readBit(buf, offset);
|
184 | default:
|
185 | throw new Error('Unsupported dataLength ' + dataLength + ' for BitN');
|
186 | }
|
187 | }
|
188 | case 'VarChar':
|
189 | case 'Char':
|
190 | {
|
191 | const codepage = metadata.collation.codepage;
|
192 | let dataLength;
|
193 | ({
|
194 | offset,
|
195 | value: dataLength
|
196 | } = (0, _helpers.readUInt16LE)(buf, offset));
|
197 | if (dataLength === NULL) {
|
198 | return new _helpers.Result(null, offset);
|
199 | }
|
200 | return readChars(buf, offset, dataLength, codepage);
|
201 | }
|
202 | case 'NVarChar':
|
203 | case 'NChar':
|
204 | {
|
205 | let dataLength;
|
206 | ({
|
207 | offset,
|
208 | value: dataLength
|
209 | } = (0, _helpers.readUInt16LE)(buf, offset));
|
210 | if (dataLength === NULL) {
|
211 | return new _helpers.Result(null, offset);
|
212 | }
|
213 | return readNChars(buf, offset, dataLength);
|
214 | }
|
215 | case 'VarBinary':
|
216 | case 'Binary':
|
217 | {
|
218 | let dataLength;
|
219 | ({
|
220 | offset,
|
221 | value: dataLength
|
222 | } = (0, _helpers.readUInt16LE)(buf, offset));
|
223 | if (dataLength === NULL) {
|
224 | return new _helpers.Result(null, offset);
|
225 | }
|
226 | return readBinary(buf, offset, dataLength);
|
227 | }
|
228 | case 'Text':
|
229 | {
|
230 | let textPointerLength;
|
231 | ({
|
232 | offset,
|
233 | value: textPointerLength
|
234 | } = (0, _helpers.readUInt8)(buf, offset));
|
235 | if (textPointerLength === 0) {
|
236 | return new _helpers.Result(null, offset);
|
237 | }
|
238 |
|
239 | // Textpointer
|
240 | ({
|
241 | offset
|
242 | } = readBinary(buf, offset, textPointerLength));
|
243 |
|
244 | // Timestamp
|
245 | ({
|
246 | offset
|
247 | } = readBinary(buf, offset, 8));
|
248 | let dataLength;
|
249 | ({
|
250 | offset,
|
251 | value: dataLength
|
252 | } = (0, _helpers.readUInt32LE)(buf, offset));
|
253 | return readChars(buf, offset, dataLength, metadata.collation.codepage);
|
254 | }
|
255 | case 'NText':
|
256 | {
|
257 | let textPointerLength;
|
258 | ({
|
259 | offset,
|
260 | value: textPointerLength
|
261 | } = (0, _helpers.readUInt8)(buf, offset));
|
262 | if (textPointerLength === 0) {
|
263 | return new _helpers.Result(null, offset);
|
264 | }
|
265 |
|
266 | // Textpointer
|
267 | ({
|
268 | offset
|
269 | } = readBinary(buf, offset, textPointerLength));
|
270 |
|
271 | // Timestamp
|
272 | ({
|
273 | offset
|
274 | } = readBinary(buf, offset, 8));
|
275 | let dataLength;
|
276 | ({
|
277 | offset,
|
278 | value: dataLength
|
279 | } = (0, _helpers.readUInt32LE)(buf, offset));
|
280 | return readNChars(buf, offset, dataLength);
|
281 | }
|
282 | case 'Image':
|
283 | {
|
284 | let textPointerLength;
|
285 | ({
|
286 | offset,
|
287 | value: textPointerLength
|
288 | } = (0, _helpers.readUInt8)(buf, offset));
|
289 | if (textPointerLength === 0) {
|
290 | return new _helpers.Result(null, offset);
|
291 | }
|
292 |
|
293 | // Textpointer
|
294 | ({
|
295 | offset
|
296 | } = readBinary(buf, offset, textPointerLength));
|
297 |
|
298 | // Timestamp
|
299 | ({
|
300 | offset
|
301 | } = readBinary(buf, offset, 8));
|
302 | let dataLength;
|
303 | ({
|
304 | offset,
|
305 | value: dataLength
|
306 | } = (0, _helpers.readUInt32LE)(buf, offset));
|
307 | return readBinary(buf, offset, dataLength);
|
308 | }
|
309 | case 'SmallDateTime':
|
310 | {
|
311 | return readSmallDateTime(buf, offset, options.useUTC);
|
312 | }
|
313 | case 'DateTime':
|
314 | {
|
315 | return readDateTime(buf, offset, options.useUTC);
|
316 | }
|
317 | case 'DateTimeN':
|
318 | {
|
319 | let dataLength;
|
320 | ({
|
321 | offset,
|
322 | value: dataLength
|
323 | } = (0, _helpers.readUInt8)(buf, offset));
|
324 | switch (dataLength) {
|
325 | case 0:
|
326 | return new _helpers.Result(null, offset);
|
327 | case 4:
|
328 | return readSmallDateTime(buf, offset, options.useUTC);
|
329 | case 8:
|
330 | return readDateTime(buf, offset, options.useUTC);
|
331 | default:
|
332 | throw new Error('Unsupported dataLength ' + dataLength + ' for DateTimeN');
|
333 | }
|
334 | }
|
335 | case 'Time':
|
336 | {
|
337 | let dataLength;
|
338 | ({
|
339 | offset,
|
340 | value: dataLength
|
341 | } = (0, _helpers.readUInt8)(buf, offset));
|
342 | if (dataLength === 0) {
|
343 | return new _helpers.Result(null, offset);
|
344 | }
|
345 | return readTime(buf, offset, dataLength, metadata.scale, options.useUTC);
|
346 | }
|
347 | case 'Date':
|
348 | {
|
349 | let dataLength;
|
350 | ({
|
351 | offset,
|
352 | value: dataLength
|
353 | } = (0, _helpers.readUInt8)(buf, offset));
|
354 | if (dataLength === 0) {
|
355 | return new _helpers.Result(null, offset);
|
356 | }
|
357 | return readDate(buf, offset, options.useUTC);
|
358 | }
|
359 | case 'DateTime2':
|
360 | {
|
361 | let dataLength;
|
362 | ({
|
363 | offset,
|
364 | value: dataLength
|
365 | } = (0, _helpers.readUInt8)(buf, offset));
|
366 | if (dataLength === 0) {
|
367 | return new _helpers.Result(null, offset);
|
368 | }
|
369 | return readDateTime2(buf, offset, dataLength, metadata.scale, options.useUTC);
|
370 | }
|
371 | case 'DateTimeOffset':
|
372 | {
|
373 | let dataLength;
|
374 | ({
|
375 | offset,
|
376 | value: dataLength
|
377 | } = (0, _helpers.readUInt8)(buf, offset));
|
378 | if (dataLength === 0) {
|
379 | return new _helpers.Result(null, offset);
|
380 | }
|
381 | return readDateTimeOffset(buf, offset, dataLength, metadata.scale);
|
382 | }
|
383 | case 'NumericN':
|
384 | case 'DecimalN':
|
385 | {
|
386 | let dataLength;
|
387 | ({
|
388 | offset,
|
389 | value: dataLength
|
390 | } = (0, _helpers.readUInt8)(buf, offset));
|
391 | if (dataLength === 0) {
|
392 | return new _helpers.Result(null, offset);
|
393 | }
|
394 | return readNumeric(buf, offset, dataLength, metadata.precision, metadata.scale);
|
395 | }
|
396 | case 'UniqueIdentifier':
|
397 | {
|
398 | let dataLength;
|
399 | ({
|
400 | offset,
|
401 | value: dataLength
|
402 | } = (0, _helpers.readUInt8)(buf, offset));
|
403 | switch (dataLength) {
|
404 | case 0:
|
405 | return new _helpers.Result(null, offset);
|
406 | case 0x10:
|
407 | return readUniqueIdentifier(buf, offset, options);
|
408 | default:
|
409 | throw new Error((0, _sprintfJs.sprintf)('Unsupported guid size %d', dataLength - 1));
|
410 | }
|
411 | }
|
412 | case 'Variant':
|
413 | {
|
414 | let dataLength;
|
415 | ({
|
416 | offset,
|
417 | value: dataLength
|
418 | } = (0, _helpers.readUInt32LE)(buf, offset));
|
419 | if (dataLength === 0) {
|
420 | return new _helpers.Result(null, offset);
|
421 | }
|
422 | return readVariant(buf, offset, options, dataLength);
|
423 | }
|
424 | default:
|
425 | {
|
426 | throw new Error('Invalid type!');
|
427 | }
|
428 | }
|
429 | }
|
430 | function isPLPStream(metadata) {
|
431 | switch (metadata.type.name) {
|
432 | case 'VarChar':
|
433 | case 'NVarChar':
|
434 | case 'VarBinary':
|
435 | {
|
436 | return metadata.dataLength === MAX;
|
437 | }
|
438 | case 'Xml':
|
439 | {
|
440 | return true;
|
441 | }
|
442 | case 'UDT':
|
443 | {
|
444 | return true;
|
445 | }
|
446 | }
|
447 | }
|
448 | function readUniqueIdentifier(buf, offset, options) {
|
449 | let data;
|
450 | ({
|
451 | value: data,
|
452 | offset
|
453 | } = readBinary(buf, offset, 0x10));
|
454 | return new _helpers.Result(options.lowerCaseGuids ? (0, _guidParser.bufferToLowerCaseGuid)(data) : (0, _guidParser.bufferToUpperCaseGuid)(data), offset);
|
455 | }
|
456 | function readNumeric(buf, offset, dataLength, _precision, scale) {
|
457 | let sign;
|
458 | ({
|
459 | offset,
|
460 | value: sign
|
461 | } = (0, _helpers.readUInt8)(buf, offset));
|
462 | sign = sign === 1 ? 1 : -1;
|
463 | let value;
|
464 | if (dataLength === 5) {
|
465 | ({
|
466 | offset,
|
467 | value
|
468 | } = (0, _helpers.readUInt32LE)(buf, offset));
|
469 | } else if (dataLength === 9) {
|
470 | ({
|
471 | offset,
|
472 | value
|
473 | } = (0, _helpers.readUNumeric64LE)(buf, offset));
|
474 | } else if (dataLength === 13) {
|
475 | ({
|
476 | offset,
|
477 | value
|
478 | } = (0, _helpers.readUNumeric96LE)(buf, offset));
|
479 | } else if (dataLength === 17) {
|
480 | ({
|
481 | offset,
|
482 | value
|
483 | } = (0, _helpers.readUNumeric128LE)(buf, offset));
|
484 | } else {
|
485 | throw new Error((0, _sprintfJs.sprintf)('Unsupported numeric dataLength %d', dataLength));
|
486 | }
|
487 | return new _helpers.Result(value * sign / Math.pow(10, scale), offset);
|
488 | }
|
489 | function readVariant(buf, offset, options, dataLength) {
|
490 | let baseType;
|
491 | ({
|
492 | value: baseType,
|
493 | offset
|
494 | } = (0, _helpers.readUInt8)(buf, offset));
|
495 | const type = _dataType.TYPE[baseType];
|
496 | let propBytes;
|
497 | ({
|
498 | value: propBytes,
|
499 | offset
|
500 | } = (0, _helpers.readUInt8)(buf, offset));
|
501 | dataLength = dataLength - propBytes - 2;
|
502 | switch (type.name) {
|
503 | case 'UniqueIdentifier':
|
504 | return readUniqueIdentifier(buf, offset, options);
|
505 | case 'Bit':
|
506 | return readBit(buf, offset);
|
507 | case 'TinyInt':
|
508 | return readTinyInt(buf, offset);
|
509 | case 'SmallInt':
|
510 | return readSmallInt(buf, offset);
|
511 | case 'Int':
|
512 | return readInt(buf, offset);
|
513 | case 'BigInt':
|
514 | return readBigInt(buf, offset);
|
515 | case 'SmallDateTime':
|
516 | return readSmallDateTime(buf, offset, options.useUTC);
|
517 | case 'DateTime':
|
518 | return readDateTime(buf, offset, options.useUTC);
|
519 | case 'Real':
|
520 | return readReal(buf, offset);
|
521 | case 'Float':
|
522 | return readFloat(buf, offset);
|
523 | case 'SmallMoney':
|
524 | return readSmallMoney(buf, offset);
|
525 | case 'Money':
|
526 | return readMoney(buf, offset);
|
527 | case 'Date':
|
528 | return readDate(buf, offset, options.useUTC);
|
529 | case 'Time':
|
530 | {
|
531 | let scale;
|
532 | ({
|
533 | value: scale,
|
534 | offset
|
535 | } = (0, _helpers.readUInt8)(buf, offset));
|
536 | return readTime(buf, offset, dataLength, scale, options.useUTC);
|
537 | }
|
538 | case 'DateTime2':
|
539 | {
|
540 | let scale;
|
541 | ({
|
542 | value: scale,
|
543 | offset
|
544 | } = (0, _helpers.readUInt8)(buf, offset));
|
545 | return readDateTime2(buf, offset, dataLength, scale, options.useUTC);
|
546 | }
|
547 | case 'DateTimeOffset':
|
548 | {
|
549 | let scale;
|
550 | ({
|
551 | value: scale,
|
552 | offset
|
553 | } = (0, _helpers.readUInt8)(buf, offset));
|
554 | return readDateTimeOffset(buf, offset, dataLength, scale);
|
555 | }
|
556 | case 'VarBinary':
|
557 | case 'Binary':
|
558 | {
|
559 | // maxLength (unused?)
|
560 | ({
|
561 | offset
|
562 | } = (0, _helpers.readUInt16LE)(buf, offset));
|
563 | return readBinary(buf, offset, dataLength);
|
564 | }
|
565 | case 'NumericN':
|
566 | case 'DecimalN':
|
567 | {
|
568 | let precision;
|
569 | ({
|
570 | value: precision,
|
571 | offset
|
572 | } = (0, _helpers.readUInt8)(buf, offset));
|
573 | let scale;
|
574 | ({
|
575 | value: scale,
|
576 | offset
|
577 | } = (0, _helpers.readUInt8)(buf, offset));
|
578 | return readNumeric(buf, offset, dataLength, precision, scale);
|
579 | }
|
580 | case 'VarChar':
|
581 | case 'Char':
|
582 | {
|
583 | // maxLength (unused?)
|
584 | ({
|
585 | offset
|
586 | } = (0, _helpers.readUInt16LE)(buf, offset));
|
587 | let collation;
|
588 | ({
|
589 | value: collation,
|
590 | offset
|
591 | } = (0, _metadataParser.readCollation)(buf, offset));
|
592 | return readChars(buf, offset, dataLength, collation.codepage);
|
593 | }
|
594 | case 'NVarChar':
|
595 | case 'NChar':
|
596 | {
|
597 | // maxLength (unused?)
|
598 | ({
|
599 | offset
|
600 | } = (0, _helpers.readUInt16LE)(buf, offset));
|
601 |
|
602 | // collation (unused?)
|
603 | ({
|
604 | offset
|
605 | } = (0, _metadataParser.readCollation)(buf, offset));
|
606 | return readNChars(buf, offset, dataLength);
|
607 | }
|
608 | default:
|
609 | throw new Error('Invalid type!');
|
610 | }
|
611 | }
|
612 | function readBinary(buf, offset, dataLength) {
|
613 | if (buf.length < offset + dataLength) {
|
614 | throw new _helpers.NotEnoughDataError(offset + dataLength);
|
615 | }
|
616 | return new _helpers.Result(buf.slice(offset, offset + dataLength), offset + dataLength);
|
617 | }
|
618 | function readChars(buf, offset, dataLength, codepage) {
|
619 | if (buf.length < offset + dataLength) {
|
620 | throw new _helpers.NotEnoughDataError(offset + dataLength);
|
621 | }
|
622 | return new _helpers.Result(_iconvLite.default.decode(buf.slice(offset, offset + dataLength), codepage ?? DEFAULT_ENCODING), offset + dataLength);
|
623 | }
|
624 | function readNChars(buf, offset, dataLength) {
|
625 | if (buf.length < offset + dataLength) {
|
626 | throw new _helpers.NotEnoughDataError(offset + dataLength);
|
627 | }
|
628 | return new _helpers.Result(buf.toString('ucs2', offset, offset + dataLength), offset + dataLength);
|
629 | }
|
630 | async function readPLPStream(parser) {
|
631 | while (parser.buffer.length < parser.position + 8) {
|
632 | await parser.waitForChunk();
|
633 | }
|
634 | const expectedLength = parser.buffer.readBigUInt64LE(parser.position);
|
635 | parser.position += 8;
|
636 | if (expectedLength === PLP_NULL) {
|
637 | return null;
|
638 | }
|
639 | const chunks = [];
|
640 | let currentLength = 0;
|
641 | while (true) {
|
642 | while (parser.buffer.length < parser.position + 4) {
|
643 | await parser.waitForChunk();
|
644 | }
|
645 | const chunkLength = parser.buffer.readUInt32LE(parser.position);
|
646 | parser.position += 4;
|
647 | if (!chunkLength) {
|
648 | break;
|
649 | }
|
650 | while (parser.buffer.length < parser.position + chunkLength) {
|
651 | await parser.waitForChunk();
|
652 | }
|
653 | chunks.push(parser.buffer.slice(parser.position, parser.position + chunkLength));
|
654 | parser.position += chunkLength;
|
655 | currentLength += chunkLength;
|
656 | }
|
657 | if (expectedLength !== UNKNOWN_PLP_LEN) {
|
658 | if (currentLength !== Number(expectedLength)) {
|
659 | throw new Error('Partially Length-prefixed Bytes unmatched lengths : expected ' + expectedLength + ', but got ' + currentLength + ' bytes');
|
660 | }
|
661 | }
|
662 | return chunks;
|
663 | }
|
664 | function readSmallDateTime(buf, offset, useUTC) {
|
665 | let days;
|
666 | ({
|
667 | offset,
|
668 | value: days
|
669 | } = (0, _helpers.readUInt16LE)(buf, offset));
|
670 | let minutes;
|
671 | ({
|
672 | offset,
|
673 | value: minutes
|
674 | } = (0, _helpers.readUInt16LE)(buf, offset));
|
675 | let value;
|
676 | if (useUTC) {
|
677 | value = new Date(Date.UTC(1900, 0, 1 + days, 0, minutes));
|
678 | } else {
|
679 | value = new Date(1900, 0, 1 + days, 0, minutes);
|
680 | }
|
681 | return new _helpers.Result(value, offset);
|
682 | }
|
683 | function readDateTime(buf, offset, useUTC) {
|
684 | let days;
|
685 | ({
|
686 | offset,
|
687 | value: days
|
688 | } = (0, _helpers.readInt32LE)(buf, offset));
|
689 | let threeHundredthsOfSecond;
|
690 | ({
|
691 | offset,
|
692 | value: threeHundredthsOfSecond
|
693 | } = (0, _helpers.readInt32LE)(buf, offset));
|
694 | const milliseconds = Math.round(threeHundredthsOfSecond * THREE_AND_A_THIRD);
|
695 | let value;
|
696 | if (useUTC) {
|
697 | value = new Date(Date.UTC(1900, 0, 1 + days, 0, 0, 0, milliseconds));
|
698 | } else {
|
699 | value = new Date(1900, 0, 1 + days, 0, 0, 0, milliseconds);
|
700 | }
|
701 | return new _helpers.Result(value, offset);
|
702 | }
|
703 | function readTime(buf, offset, dataLength, scale, useUTC) {
|
704 | let value;
|
705 | switch (dataLength) {
|
706 | case 3:
|
707 | {
|
708 | ({
|
709 | value,
|
710 | offset
|
711 | } = (0, _helpers.readUInt24LE)(buf, offset));
|
712 | break;
|
713 | }
|
714 | case 4:
|
715 | {
|
716 | ({
|
717 | value,
|
718 | offset
|
719 | } = (0, _helpers.readUInt32LE)(buf, offset));
|
720 | break;
|
721 | }
|
722 | case 5:
|
723 | {
|
724 | ({
|
725 | value,
|
726 | offset
|
727 | } = (0, _helpers.readUInt40LE)(buf, offset));
|
728 | break;
|
729 | }
|
730 | default:
|
731 | {
|
732 | throw new Error('unreachable');
|
733 | }
|
734 | }
|
735 | if (scale < 7) {
|
736 | for (let i = scale; i < 7; i++) {
|
737 | value *= 10;
|
738 | }
|
739 | }
|
740 | let date;
|
741 | if (useUTC) {
|
742 | date = new Date(Date.UTC(1970, 0, 1, 0, 0, 0, value / 10000));
|
743 | } else {
|
744 | date = new Date(1970, 0, 1, 0, 0, 0, value / 10000);
|
745 | }
|
746 | Object.defineProperty(date, 'nanosecondsDelta', {
|
747 | enumerable: false,
|
748 | value: value % 10000 / Math.pow(10, 7)
|
749 | });
|
750 | return new _helpers.Result(date, offset);
|
751 | }
|
752 | function readDate(buf, offset, useUTC) {
|
753 | let days;
|
754 | ({
|
755 | offset,
|
756 | value: days
|
757 | } = (0, _helpers.readUInt24LE)(buf, offset));
|
758 | if (useUTC) {
|
759 | return new _helpers.Result(new Date(Date.UTC(2000, 0, days - 730118)), offset);
|
760 | } else {
|
761 | return new _helpers.Result(new Date(2000, 0, days - 730118), offset);
|
762 | }
|
763 | }
|
764 | function readDateTime2(buf, offset, dataLength, scale, useUTC) {
|
765 | let time;
|
766 | ({
|
767 | offset,
|
768 | value: time
|
769 | } = readTime(buf, offset, dataLength - 3, scale, useUTC));
|
770 | let days;
|
771 | ({
|
772 | offset,
|
773 | value: days
|
774 | } = (0, _helpers.readUInt24LE)(buf, offset));
|
775 | let date;
|
776 | if (useUTC) {
|
777 | date = new Date(Date.UTC(2000, 0, days - 730118, 0, 0, 0, +time));
|
778 | } else {
|
779 | date = new Date(2000, 0, days - 730118, time.getHours(), time.getMinutes(), time.getSeconds(), time.getMilliseconds());
|
780 | }
|
781 | Object.defineProperty(date, 'nanosecondsDelta', {
|
782 | enumerable: false,
|
783 | value: time.nanosecondsDelta
|
784 | });
|
785 | return new _helpers.Result(date, offset);
|
786 | }
|
787 | function readDateTimeOffset(buf, offset, dataLength, scale) {
|
788 | let time;
|
789 | ({
|
790 | offset,
|
791 | value: time
|
792 | } = readTime(buf, offset, dataLength - 5, scale, true));
|
793 | let days;
|
794 | ({
|
795 | offset,
|
796 | value: days
|
797 | } = (0, _helpers.readUInt24LE)(buf, offset));
|
798 |
|
799 | // time offset?
|
800 | ({
|
801 | offset
|
802 | } = (0, _helpers.readUInt16LE)(buf, offset));
|
803 | const date = new Date(Date.UTC(2000, 0, days - 730118, 0, 0, 0, +time));
|
804 | Object.defineProperty(date, 'nanosecondsDelta', {
|
805 | enumerable: false,
|
806 | value: time.nanosecondsDelta
|
807 | });
|
808 | return new _helpers.Result(date, offset);
|
809 | }
|
810 | module.exports.readValue = readValue;
|
811 | module.exports.isPLPStream = isPLPStream;
|
812 | module.exports.readPLPStream = readPLPStream;
|
813 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbWV0YWRhdGFQYXJzZXIiLCJyZXF1aXJlIiwiX2RhdGFUeXBlIiwiX2ljb252TGl0ZSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJfc3ByaW50ZkpzIiwiX2d1aWRQYXJzZXIiLCJfaGVscGVycyIsIm9iaiIsIl9fZXNNb2R1bGUiLCJkZWZhdWx0IiwiTlVMTCIsIk1BWCIsIlRIUkVFX0FORF9BX1RISVJEIiwiTU9ORVlfRElWSVNPUiIsIlBMUF9OVUxMIiwiVU5LTk9XTl9QTFBfTEVOIiwiREVGQVVMVF9FTkNPRElORyIsInJlYWRUaW55SW50IiwiYnVmIiwib2Zmc2V0IiwicmVhZFVJbnQ4IiwicmVhZFNtYWxsSW50IiwicmVhZEludDE2TEUiLCJyZWFkSW50IiwicmVhZEludDMyTEUiLCJyZWFkQmlnSW50IiwidmFsdWUiLCJyZWFkQmlnSW50NjRMRSIsIlJlc3VsdCIsInRvU3RyaW5nIiwicmVhZFJlYWwiLCJyZWFkRmxvYXRMRSIsInJlYWRGbG9hdCIsInJlYWREb3VibGVMRSIsInJlYWRTbWFsbE1vbmV5IiwicmVhZE1vbmV5IiwiaGlnaCIsImxvdyIsInJlYWRVSW50MzJMRSIsInJlYWRCaXQiLCJyZWFkVmFsdWUiLCJtZXRhZGF0YSIsIm9wdGlvbnMiLCJ0eXBlIiwibmFtZSIsImRhdGFMZW5ndGgiLCJFcnJvciIsImNvZGVwYWdlIiwiY29sbGF0aW9uIiwicmVhZFVJbnQxNkxFIiwicmVhZENoYXJzIiwicm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