@utilix-tech/sdk 0.26.0 → 0.28.0
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/CHANGELOG.md +7 -0
- package/README.md +25 -7
- package/dist/{chunk-XMKJYVKB.js → chunk-47DTCCQJ.js} +346 -1
- package/dist/{chunk-HP6C4VBX.js → chunk-I63BCOAG.js} +35 -1
- package/dist/index.cjs +379 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{media-9HEpTPGA.d.cts → media-cuxfzXxw.d.cts} +56 -2
- package/dist/{media-9HEpTPGA.d.ts → media-cuxfzXxw.d.ts} +56 -2
- package/dist/tools/media.cjs +345 -0
- package/dist/tools/media.d.cts +1 -1
- package/dist/tools/media.d.ts +1 -1
- package/dist/tools/media.js +1 -1
- package/dist/tools/units.cjs +34 -0
- package/dist/tools/units.d.cts +1 -1
- package/dist/tools/units.d.ts +1 -1
- package/dist/tools/units.js +1 -1
- package/dist/{units-D2wEimKG.d.cts → units-COt5uI20.d.cts} +27 -2
- package/dist/{units-D2wEimKG.d.ts → units-COt5uI20.d.ts} +27 -2
- package/package.json +1 -1
package/dist/tools/media.cjs
CHANGED
|
@@ -755,10 +755,355 @@ function readIcoInfo(bytes) {
|
|
|
755
755
|
}
|
|
756
756
|
return { imageCount: count, images };
|
|
757
757
|
}
|
|
758
|
+
var FLAC_TAG_FIELDS = {
|
|
759
|
+
TITLE: "title",
|
|
760
|
+
ARTIST: "artist",
|
|
761
|
+
ALBUM: "album",
|
|
762
|
+
DATE: "date",
|
|
763
|
+
GENRE: "genre",
|
|
764
|
+
TRACKNUMBER: "trackNumber"
|
|
765
|
+
};
|
|
766
|
+
function readU24BE(bytes, offset) {
|
|
767
|
+
return bytes[offset] << 16 | bytes[offset + 1] << 8 | bytes[offset + 2];
|
|
768
|
+
}
|
|
769
|
+
function readVorbisComment(bytes, start, end) {
|
|
770
|
+
let offset = start;
|
|
771
|
+
if (offset + 4 > end) return null;
|
|
772
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
773
|
+
const vendorLength = view.getUint32(offset, true);
|
|
774
|
+
offset += 4;
|
|
775
|
+
if (offset + vendorLength > end) return null;
|
|
776
|
+
const vendor = Buffer.from(bytes.subarray(offset, offset + vendorLength)).toString("utf8");
|
|
777
|
+
offset += vendorLength;
|
|
778
|
+
if (offset + 4 > end) return null;
|
|
779
|
+
const commentCount = view.getUint32(offset, true);
|
|
780
|
+
offset += 4;
|
|
781
|
+
const tags = {};
|
|
782
|
+
for (let i = 0; i < commentCount; i++) {
|
|
783
|
+
if (offset + 4 > end) break;
|
|
784
|
+
const commentLength = view.getUint32(offset, true);
|
|
785
|
+
offset += 4;
|
|
786
|
+
if (offset + commentLength > end) break;
|
|
787
|
+
const comment = Buffer.from(bytes.subarray(offset, offset + commentLength)).toString("utf8");
|
|
788
|
+
offset += commentLength;
|
|
789
|
+
const eq = comment.indexOf("=");
|
|
790
|
+
if (eq > 0) {
|
|
791
|
+
const key = comment.slice(0, eq).toUpperCase();
|
|
792
|
+
const value = comment.slice(eq + 1);
|
|
793
|
+
tags[key] = value;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
return { vendor, tags };
|
|
797
|
+
}
|
|
798
|
+
function readFlacInfo(bytes) {
|
|
799
|
+
if (bytes.length < 4) return { error: "File is too small to be a valid FLAC file" };
|
|
800
|
+
if (readAscii4(bytes, 0) !== "fLaC") return { error: 'Not a FLAC file (missing "fLaC" marker)' };
|
|
801
|
+
let offset = 4;
|
|
802
|
+
let streamInfo = null;
|
|
803
|
+
let vorbisComment = null;
|
|
804
|
+
while (offset + 4 <= bytes.length) {
|
|
805
|
+
const header = bytes[offset];
|
|
806
|
+
const isLast = (header & 128) !== 0;
|
|
807
|
+
const blockType = header & 127;
|
|
808
|
+
const length = readU24BE(bytes, offset + 1);
|
|
809
|
+
const dataStart = offset + 4;
|
|
810
|
+
const dataEnd = dataStart + length;
|
|
811
|
+
if (dataEnd > bytes.length) return { error: "Truncated metadata block" };
|
|
812
|
+
if (blockType === 0) {
|
|
813
|
+
if (length < 34) return { error: "Truncated STREAMINFO block" };
|
|
814
|
+
const minBlockSize = bytes[dataStart] << 8 | bytes[dataStart + 1];
|
|
815
|
+
const maxBlockSize = bytes[dataStart + 2] << 8 | bytes[dataStart + 3];
|
|
816
|
+
const minFrameSize = readU24BE(bytes, dataStart + 4);
|
|
817
|
+
const maxFrameSize = readU24BE(bytes, dataStart + 7);
|
|
818
|
+
let packed = 0n;
|
|
819
|
+
for (let i = 0; i < 8; i++) packed = packed << 8n | BigInt(bytes[dataStart + 10 + i]);
|
|
820
|
+
const sampleRate = Number(packed >> 44n & 0xfffffn);
|
|
821
|
+
const channels = Number(packed >> 41n & 0x7n) + 1;
|
|
822
|
+
const bitsPerSample = Number(packed >> 36n & 0x1fn) + 1;
|
|
823
|
+
const totalSamples = Number(packed & 0xfffffffffn);
|
|
824
|
+
if (sampleRate <= 0) return { error: "Invalid sample rate in STREAMINFO block" };
|
|
825
|
+
streamInfo = {
|
|
826
|
+
sampleRate,
|
|
827
|
+
channels,
|
|
828
|
+
bitsPerSample,
|
|
829
|
+
totalSamples,
|
|
830
|
+
durationSeconds: Math.round(totalSamples / sampleRate * 1e3) / 1e3,
|
|
831
|
+
minBlockSize,
|
|
832
|
+
maxBlockSize,
|
|
833
|
+
minFrameSize,
|
|
834
|
+
maxFrameSize
|
|
835
|
+
};
|
|
836
|
+
} else if (blockType === 4) {
|
|
837
|
+
vorbisComment = readVorbisComment(bytes, dataStart, dataEnd);
|
|
838
|
+
}
|
|
839
|
+
offset = dataEnd;
|
|
840
|
+
if (isLast) break;
|
|
841
|
+
}
|
|
842
|
+
if (!streamInfo) return { error: "No STREAMINFO block found in this FLAC file" };
|
|
843
|
+
const result = { ...streamInfo };
|
|
844
|
+
if (vorbisComment) {
|
|
845
|
+
result.vendor = vorbisComment.vendor;
|
|
846
|
+
result.tags = vorbisComment.tags;
|
|
847
|
+
for (const [key, field] of Object.entries(FLAC_TAG_FIELDS)) {
|
|
848
|
+
if (vorbisComment.tags[key] !== void 0) result[field] = vorbisComment.tags[key];
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
return result;
|
|
852
|
+
}
|
|
853
|
+
function readU64BE(bytes, offset) {
|
|
854
|
+
return readU32BE(bytes, offset) * 4294967296 + readU32BE(bytes, offset + 4);
|
|
855
|
+
}
|
|
856
|
+
function readMp4Boxes(bytes, start, end) {
|
|
857
|
+
const boxes = [];
|
|
858
|
+
let offset = start;
|
|
859
|
+
while (offset + 8 <= end) {
|
|
860
|
+
let size = readU32BE(bytes, offset);
|
|
861
|
+
const type = readAscii4(bytes, offset + 4);
|
|
862
|
+
let headerSize = 8;
|
|
863
|
+
if (size === 1) {
|
|
864
|
+
if (offset + 16 > end) break;
|
|
865
|
+
size = readU64BE(bytes, offset + 8);
|
|
866
|
+
headerSize = 16;
|
|
867
|
+
} else if (size === 0) {
|
|
868
|
+
size = end - offset;
|
|
869
|
+
}
|
|
870
|
+
if (size < headerSize || offset + size > end) break;
|
|
871
|
+
boxes.push({ type, start: offset + headerSize, end: offset + size });
|
|
872
|
+
offset += size;
|
|
873
|
+
}
|
|
874
|
+
return boxes;
|
|
875
|
+
}
|
|
876
|
+
function findMp4Box(boxes, type) {
|
|
877
|
+
return boxes.find((b) => b.type === type);
|
|
878
|
+
}
|
|
879
|
+
function parseMp4Mvhd(bytes, box) {
|
|
880
|
+
const o = box.start;
|
|
881
|
+
if (o >= box.end) return null;
|
|
882
|
+
const version = bytes[o];
|
|
883
|
+
if (version === 1) {
|
|
884
|
+
if (o + 32 > box.end) return null;
|
|
885
|
+
return { timescale: readU32BE(bytes, o + 20), duration: readU64BE(bytes, o + 24) };
|
|
886
|
+
}
|
|
887
|
+
if (o + 20 > box.end) return null;
|
|
888
|
+
return { timescale: readU32BE(bytes, o + 12), duration: readU32BE(bytes, o + 16) };
|
|
889
|
+
}
|
|
890
|
+
function parseMp4Tkhd(bytes, box) {
|
|
891
|
+
const o = box.start;
|
|
892
|
+
if (o >= box.end) return null;
|
|
893
|
+
const version = bytes[o];
|
|
894
|
+
const fixedFieldsSize = version === 1 ? 4 + 8 + 8 + 4 + 4 + 8 : 4 + 4 + 4 + 4 + 4 + 4;
|
|
895
|
+
const afterDuration = o + fixedFieldsSize;
|
|
896
|
+
const matrixStart = afterDuration + 8 + 2 + 2 + 2 + 2;
|
|
897
|
+
const widthOffset = matrixStart + 36;
|
|
898
|
+
if (widthOffset + 8 > box.end) return null;
|
|
899
|
+
return { width: readU32BE(bytes, widthOffset) / 65536, height: readU32BE(bytes, widthOffset + 4) / 65536 };
|
|
900
|
+
}
|
|
901
|
+
function parseMp4Hdlr(bytes, box) {
|
|
902
|
+
const o = box.start;
|
|
903
|
+
if (o + 12 > box.end) return null;
|
|
904
|
+
return readAscii4(bytes, o + 8);
|
|
905
|
+
}
|
|
906
|
+
function parseMp4StsdCodec(bytes, box) {
|
|
907
|
+
const o = box.start;
|
|
908
|
+
if (o + 8 > box.end) return null;
|
|
909
|
+
const entryCount = readU32BE(bytes, o + 4);
|
|
910
|
+
if (entryCount < 1) return null;
|
|
911
|
+
const entryStart = o + 8;
|
|
912
|
+
if (entryStart + 8 > box.end) return null;
|
|
913
|
+
return readAscii4(bytes, entryStart + 4);
|
|
914
|
+
}
|
|
915
|
+
function parseMp4StsdVideoDims(bytes, box) {
|
|
916
|
+
const o = box.start;
|
|
917
|
+
if (o + 8 > box.end) return null;
|
|
918
|
+
const entryCount = readU32BE(bytes, o + 4);
|
|
919
|
+
if (entryCount < 1) return null;
|
|
920
|
+
const entryStart = o + 8;
|
|
921
|
+
if (entryStart + 36 > box.end) return null;
|
|
922
|
+
return {
|
|
923
|
+
width: bytes[entryStart + 32] << 8 | bytes[entryStart + 33],
|
|
924
|
+
height: bytes[entryStart + 34] << 8 | bytes[entryStart + 35]
|
|
925
|
+
};
|
|
926
|
+
}
|
|
927
|
+
function parseMp4(bytes) {
|
|
928
|
+
const topBoxes = readMp4Boxes(bytes, 0, bytes.length);
|
|
929
|
+
const ftyp = findMp4Box(topBoxes, "ftyp");
|
|
930
|
+
const moov = findMp4Box(topBoxes, "moov");
|
|
931
|
+
if (!moov) return { error: "No moov box found (not a valid or fully-downloaded MP4 file)" };
|
|
932
|
+
const result = { format: "mp4" };
|
|
933
|
+
if (ftyp && ftyp.start + 4 <= ftyp.end) result.majorBrand = readAscii4(bytes, ftyp.start);
|
|
934
|
+
const moovBoxes = readMp4Boxes(bytes, moov.start, moov.end);
|
|
935
|
+
const mvhd = findMp4Box(moovBoxes, "mvhd");
|
|
936
|
+
if (mvhd) {
|
|
937
|
+
const info = parseMp4Mvhd(bytes, mvhd);
|
|
938
|
+
if (info && info.timescale > 0) result.durationSeconds = Math.round(info.duration / info.timescale * 1e3) / 1e3;
|
|
939
|
+
}
|
|
940
|
+
for (const trak of moovBoxes.filter((b) => b.type === "trak")) {
|
|
941
|
+
const trakBoxes = readMp4Boxes(bytes, trak.start, trak.end);
|
|
942
|
+
const mdia = findMp4Box(trakBoxes, "mdia");
|
|
943
|
+
if (!mdia) continue;
|
|
944
|
+
const mdiaBoxes = readMp4Boxes(bytes, mdia.start, mdia.end);
|
|
945
|
+
const hdlr = findMp4Box(mdiaBoxes, "hdlr");
|
|
946
|
+
const handlerType = hdlr ? parseMp4Hdlr(bytes, hdlr) : null;
|
|
947
|
+
const minf = findMp4Box(mdiaBoxes, "minf");
|
|
948
|
+
if (!minf) continue;
|
|
949
|
+
const stbl = findMp4Box(readMp4Boxes(bytes, minf.start, minf.end), "stbl");
|
|
950
|
+
if (!stbl) continue;
|
|
951
|
+
const stsd = findMp4Box(readMp4Boxes(bytes, stbl.start, stbl.end), "stsd");
|
|
952
|
+
const codec = stsd ? parseMp4StsdCodec(bytes, stsd) : null;
|
|
953
|
+
if (handlerType === "vide") {
|
|
954
|
+
if (codec) result.videoCodec = codec;
|
|
955
|
+
const tkhd = findMp4Box(trakBoxes, "tkhd");
|
|
956
|
+
const dims = tkhd ? parseMp4Tkhd(bytes, tkhd) : null;
|
|
957
|
+
if (dims && dims.width > 0 && dims.height > 0) {
|
|
958
|
+
result.width = Math.round(dims.width);
|
|
959
|
+
result.height = Math.round(dims.height);
|
|
960
|
+
} else if (stsd) {
|
|
961
|
+
const pixelDims = parseMp4StsdVideoDims(bytes, stsd);
|
|
962
|
+
if (pixelDims && pixelDims.width > 0 && pixelDims.height > 0) {
|
|
963
|
+
result.width = pixelDims.width;
|
|
964
|
+
result.height = pixelDims.height;
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
} else if (handlerType === "soun") {
|
|
968
|
+
if (codec) result.audioCodec = codec;
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
if (result.durationSeconds === void 0 && !result.videoCodec && !result.audioCodec) {
|
|
972
|
+
return { error: "Could not find any usable track metadata in this MP4 file's moov box" };
|
|
973
|
+
}
|
|
974
|
+
return result;
|
|
975
|
+
}
|
|
976
|
+
function ebmlVintLength(firstByte) {
|
|
977
|
+
if (firstByte === 0) return 0;
|
|
978
|
+
let mask = 128;
|
|
979
|
+
let length = 1;
|
|
980
|
+
while (length <= 8 && (firstByte & mask) === 0) {
|
|
981
|
+
mask >>= 1;
|
|
982
|
+
length++;
|
|
983
|
+
}
|
|
984
|
+
return length;
|
|
985
|
+
}
|
|
986
|
+
function readEbmlId(bytes, offset) {
|
|
987
|
+
if (offset >= bytes.length) return null;
|
|
988
|
+
const length = ebmlVintLength(bytes[offset]);
|
|
989
|
+
if (length === 0 || offset + length > bytes.length) return null;
|
|
990
|
+
let id = 0;
|
|
991
|
+
for (let i = 0; i < length; i++) id = id * 256 + bytes[offset + i];
|
|
992
|
+
return { id, length };
|
|
993
|
+
}
|
|
994
|
+
function readEbmlSize(bytes, offset) {
|
|
995
|
+
if (offset >= bytes.length) return null;
|
|
996
|
+
const length = ebmlVintLength(bytes[offset]);
|
|
997
|
+
if (length === 0 || offset + length > bytes.length) return null;
|
|
998
|
+
const mask = 255 >> length;
|
|
999
|
+
let value = bytes[offset] & mask;
|
|
1000
|
+
let allOnes = value === mask;
|
|
1001
|
+
for (let i = 1; i < length; i++) {
|
|
1002
|
+
value = value * 256 + bytes[offset + i];
|
|
1003
|
+
if (bytes[offset + i] !== 255) allOnes = false;
|
|
1004
|
+
}
|
|
1005
|
+
return { value, length, unknown: allOnes };
|
|
1006
|
+
}
|
|
1007
|
+
function readEbmlUint(bytes, offset, length) {
|
|
1008
|
+
let value = 0;
|
|
1009
|
+
for (let i = 0; i < length; i++) value = value * 256 + bytes[offset + i];
|
|
1010
|
+
return value;
|
|
1011
|
+
}
|
|
1012
|
+
function readEbmlFloat(bytes, offset, length) {
|
|
1013
|
+
if (offset + length > bytes.length) return 0;
|
|
1014
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset + offset, length);
|
|
1015
|
+
if (length === 4) return view.getFloat32(0, false);
|
|
1016
|
+
if (length === 8) return view.getFloat64(0, false);
|
|
1017
|
+
return 0;
|
|
1018
|
+
}
|
|
1019
|
+
function ebmlChildren(bytes, start, end) {
|
|
1020
|
+
const children = [];
|
|
1021
|
+
let offset = start;
|
|
1022
|
+
while (offset < end) {
|
|
1023
|
+
const idInfo = readEbmlId(bytes, offset);
|
|
1024
|
+
if (!idInfo) break;
|
|
1025
|
+
const sizeInfo = readEbmlSize(bytes, offset + idInfo.length);
|
|
1026
|
+
if (!sizeInfo) break;
|
|
1027
|
+
const dataStart = offset + idInfo.length + sizeInfo.length;
|
|
1028
|
+
const dataEnd = sizeInfo.unknown ? end : Math.min(dataStart + sizeInfo.value, end);
|
|
1029
|
+
children.push({ id: idInfo.id, dataStart, dataEnd });
|
|
1030
|
+
offset = dataEnd;
|
|
1031
|
+
}
|
|
1032
|
+
return children;
|
|
1033
|
+
}
|
|
1034
|
+
var EBML_ID_SEGMENT = 408125543;
|
|
1035
|
+
var EBML_ID_INFO = 357149030;
|
|
1036
|
+
var EBML_ID_TIMECODE_SCALE = 2807729;
|
|
1037
|
+
var EBML_ID_DURATION = 17545;
|
|
1038
|
+
var EBML_ID_TRACKS = 374648427;
|
|
1039
|
+
var EBML_ID_TRACK_ENTRY = 174;
|
|
1040
|
+
var EBML_ID_TRACK_TYPE = 131;
|
|
1041
|
+
var EBML_ID_CODEC_ID = 134;
|
|
1042
|
+
var EBML_ID_VIDEO = 224;
|
|
1043
|
+
var EBML_ID_PIXEL_WIDTH = 176;
|
|
1044
|
+
var EBML_ID_PIXEL_HEIGHT = 186;
|
|
1045
|
+
var EBML_ID_CLUSTER = 524531317;
|
|
1046
|
+
function readVideoInfo(bytes) {
|
|
1047
|
+
if (bytes.length < 12) return { error: "File is too small to be a valid video file" };
|
|
1048
|
+
if (readAscii4(bytes, 4) === "ftyp") return parseMp4(bytes);
|
|
1049
|
+
if (bytes[0] === 26 && bytes[1] === 69 && bytes[2] === 223 && bytes[3] === 163) return parseWebm(bytes);
|
|
1050
|
+
return { error: 'Not a recognized MP4 or WebM file (missing an "ftyp" box or an EBML header signature)' };
|
|
1051
|
+
}
|
|
1052
|
+
function parseWebm(bytes) {
|
|
1053
|
+
const top = ebmlChildren(bytes, 0, bytes.length);
|
|
1054
|
+
const segment = top.find((c) => c.id === EBML_ID_SEGMENT);
|
|
1055
|
+
if (!segment) return { error: "No Segment element found (not a valid WebM/Matroska file)" };
|
|
1056
|
+
const result = { format: "webm" };
|
|
1057
|
+
let timecodeScale = 1e6;
|
|
1058
|
+
let rawDuration;
|
|
1059
|
+
for (const child of ebmlChildren(bytes, segment.dataStart, segment.dataEnd)) {
|
|
1060
|
+
if (child.id === EBML_ID_CLUSTER) break;
|
|
1061
|
+
if (child.id === EBML_ID_INFO) {
|
|
1062
|
+
for (const f of ebmlChildren(bytes, child.dataStart, child.dataEnd)) {
|
|
1063
|
+
if (f.id === EBML_ID_TIMECODE_SCALE) timecodeScale = readEbmlUint(bytes, f.dataStart, f.dataEnd - f.dataStart) || 1e6;
|
|
1064
|
+
else if (f.id === EBML_ID_DURATION) rawDuration = readEbmlFloat(bytes, f.dataStart, f.dataEnd - f.dataStart);
|
|
1065
|
+
}
|
|
1066
|
+
} else if (child.id === EBML_ID_TRACKS) {
|
|
1067
|
+
for (const entry of ebmlChildren(bytes, child.dataStart, child.dataEnd)) {
|
|
1068
|
+
if (entry.id !== EBML_ID_TRACK_ENTRY) continue;
|
|
1069
|
+
let trackType;
|
|
1070
|
+
let codecId;
|
|
1071
|
+
let pixelWidth;
|
|
1072
|
+
let pixelHeight;
|
|
1073
|
+
for (const f of ebmlChildren(bytes, entry.dataStart, entry.dataEnd)) {
|
|
1074
|
+
if (f.id === EBML_ID_TRACK_TYPE) trackType = readEbmlUint(bytes, f.dataStart, f.dataEnd - f.dataStart);
|
|
1075
|
+
else if (f.id === EBML_ID_CODEC_ID) codecId = Buffer.from(bytes.subarray(f.dataStart, f.dataEnd)).toString("ascii").replace(/\0+$/, "");
|
|
1076
|
+
else if (f.id === EBML_ID_VIDEO) {
|
|
1077
|
+
for (const v of ebmlChildren(bytes, f.dataStart, f.dataEnd)) {
|
|
1078
|
+
if (v.id === EBML_ID_PIXEL_WIDTH) pixelWidth = readEbmlUint(bytes, v.dataStart, v.dataEnd - v.dataStart);
|
|
1079
|
+
else if (v.id === EBML_ID_PIXEL_HEIGHT) pixelHeight = readEbmlUint(bytes, v.dataStart, v.dataEnd - v.dataStart);
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
if (trackType === 1) {
|
|
1084
|
+
if (codecId) result.videoCodec = codecId;
|
|
1085
|
+
if (pixelWidth) result.width = pixelWidth;
|
|
1086
|
+
if (pixelHeight) result.height = pixelHeight;
|
|
1087
|
+
} else if (trackType === 2) {
|
|
1088
|
+
if (codecId) result.audioCodec = codecId;
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
if (rawDuration !== void 0 && timecodeScale > 0) {
|
|
1094
|
+
result.durationSeconds = Math.round(rawDuration * timecodeScale / 1e9 * 1e3) / 1e3;
|
|
1095
|
+
}
|
|
1096
|
+
if (result.durationSeconds === void 0 && !result.videoCodec && !result.audioCodec) {
|
|
1097
|
+
return { error: "Could not find any usable metadata in this WebM file's Segment element" };
|
|
1098
|
+
}
|
|
1099
|
+
return result;
|
|
1100
|
+
}
|
|
758
1101
|
|
|
759
1102
|
exports.readExifData = readExifData;
|
|
1103
|
+
exports.readFlacInfo = readFlacInfo;
|
|
760
1104
|
exports.readIcoInfo = readIcoInfo;
|
|
761
1105
|
exports.readId3Tags = readId3Tags;
|
|
762
1106
|
exports.readImageInfo = readImageInfo;
|
|
763
1107
|
exports.readPdfMetadata = readPdfMetadata;
|
|
1108
|
+
exports.readVideoInfo = readVideoInfo;
|
|
764
1109
|
exports.readWavInfo = readWavInfo;
|
package/dist/tools/media.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { E as ExifData, a as ExifError, I as IcoImageEntry,
|
|
1
|
+
export { E as ExifData, a as ExifError, F as FlacInfo, b as FlacInfoError, I as IcoImageEntry, c as IcoInfo, d as IcoInfoError, e as Id3Tags, f as Id3TagsError, g as ImageFormat, h as ImageInfo, i as ImageInfoError, P as PdfMetadata, j as PdfMetadataError, V as VideoInfo, k as VideoInfoError, W as WavInfo, l as WavInfoError, r as readExifData, n as readFlacInfo, o as readIcoInfo, p as readId3Tags, q as readImageInfo, s as readPdfMetadata, t as readVideoInfo, u as readWavInfo } from '../media-cuxfzXxw.cjs';
|
package/dist/tools/media.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { E as ExifData, a as ExifError, I as IcoImageEntry,
|
|
1
|
+
export { E as ExifData, a as ExifError, F as FlacInfo, b as FlacInfoError, I as IcoImageEntry, c as IcoInfo, d as IcoInfoError, e as Id3Tags, f as Id3TagsError, g as ImageFormat, h as ImageInfo, i as ImageInfoError, P as PdfMetadata, j as PdfMetadataError, V as VideoInfo, k as VideoInfoError, W as WavInfo, l as WavInfoError, r as readExifData, n as readFlacInfo, o as readIcoInfo, p as readId3Tags, q as readImageInfo, s as readPdfMetadata, t as readVideoInfo, u as readWavInfo } from '../media-cuxfzXxw.js';
|
package/dist/tools/media.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { readExifData, readIcoInfo, readId3Tags, readImageInfo, readPdfMetadata, readWavInfo } from '../chunk-
|
|
1
|
+
export { readExifData, readFlacInfo, readIcoInfo, readId3Tags, readImageInfo, readPdfMetadata, readVideoInfo, readWavInfo } from '../chunk-47DTCCQJ.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
package/dist/tools/units.cjs
CHANGED
|
@@ -1560,6 +1560,39 @@ function calculateVideoBitrate(input) {
|
|
|
1560
1560
|
}
|
|
1561
1561
|
return { error: 'mode must be "size-from-bitrate" or "bitrate-from-size"' };
|
|
1562
1562
|
}
|
|
1563
|
+
function calculateRuleOf72(value, direction) {
|
|
1564
|
+
if (!Number.isFinite(value) || value <= 0) return { error: "Value must be a positive number" };
|
|
1565
|
+
if (direction !== "rate-to-years" && direction !== "years-to-rate") {
|
|
1566
|
+
return { error: 'Direction must be "rate-to-years" or "years-to-rate"' };
|
|
1567
|
+
}
|
|
1568
|
+
const round4 = (n) => Math.round(n * 1e4) / 1e4;
|
|
1569
|
+
if (direction === "rate-to-years") {
|
|
1570
|
+
const ratePercent = value;
|
|
1571
|
+
const ruleOf72Estimate2 = 72 / ratePercent;
|
|
1572
|
+
const exactValue2 = Math.log(2) / Math.log(1 + ratePercent / 100);
|
|
1573
|
+
const errorPercent2 = (ruleOf72Estimate2 - exactValue2) / exactValue2 * 100;
|
|
1574
|
+
return {
|
|
1575
|
+
direction,
|
|
1576
|
+
ratePercent: round4(ratePercent),
|
|
1577
|
+
years: round4(exactValue2),
|
|
1578
|
+
ruleOf72Estimate: round4(ruleOf72Estimate2),
|
|
1579
|
+
exactValue: round4(exactValue2),
|
|
1580
|
+
errorPercent: round4(errorPercent2)
|
|
1581
|
+
};
|
|
1582
|
+
}
|
|
1583
|
+
const years = value;
|
|
1584
|
+
const ruleOf72Estimate = 72 / years;
|
|
1585
|
+
const exactValue = (Math.pow(2, 1 / years) - 1) * 100;
|
|
1586
|
+
const errorPercent = (ruleOf72Estimate - exactValue) / exactValue * 100;
|
|
1587
|
+
return {
|
|
1588
|
+
direction,
|
|
1589
|
+
ratePercent: round4(exactValue),
|
|
1590
|
+
years: round4(years),
|
|
1591
|
+
ruleOf72Estimate: round4(ruleOf72Estimate),
|
|
1592
|
+
exactValue: round4(exactValue),
|
|
1593
|
+
errorPercent: round4(errorPercent)
|
|
1594
|
+
};
|
|
1595
|
+
}
|
|
1563
1596
|
|
|
1564
1597
|
exports.BASE_LABELS = BASE_LABELS;
|
|
1565
1598
|
exports.BASE_PREFIXES = BASE_PREFIXES;
|
|
@@ -1583,6 +1616,7 @@ exports.calculateDiscount = calculateDiscount;
|
|
|
1583
1616
|
exports.calculateLoan = calculateLoan;
|
|
1584
1617
|
exports.calculateMarginMarkup = calculateMarginMarkup;
|
|
1585
1618
|
exports.calculatePercentageChange = calculatePercentageChange;
|
|
1619
|
+
exports.calculateRuleOf72 = calculateRuleOf72;
|
|
1586
1620
|
exports.calculateSimpleInterest = calculateSimpleInterest;
|
|
1587
1621
|
exports.calculateTax = calculateTax;
|
|
1588
1622
|
exports.calculateTimeValue = calculateTimeValue;
|
package/dist/tools/units.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BreakEvenInput, j as BreakEvenResult, k as ByteConvertResult, l as ByteUnit, C as COMMON_CURRENCIES, m as COMMON_LOCALES, n as COMMON_PERMISSIONS, o as COMMON_RATIOS, p as COMMON_SIZES, q as COMMON_TAX_RATES, r as COMMON_TIP_PERCENTAGES, s as COMMON_VIEWPORTS, t as CardValidationResult, v as CompoundInterestResult, w as CompoundYearRow, D as Dimensions, x as DiscountField, y as DiscountInput, z as DiscountResult, F as FilePermissions, E as FormatOptions, I as IbanValidationResult, G as IpConversion, H as IsbnFormat, J as IsbnResult, L as LoanResult, M as MarginMarkupField, K as MarginMarkupInput, N as MarginMarkupResult, O as NotationStyle, P as NumberBase, Q as PercentChangeDirection, R as PercentageChangeResult, S as Permission, T as PxConvertResult, U as
|
|
1
|
+
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BreakEvenInput, j as BreakEvenResult, k as ByteConvertResult, l as ByteUnit, C as COMMON_CURRENCIES, m as COMMON_LOCALES, n as COMMON_PERMISSIONS, o as COMMON_RATIOS, p as COMMON_SIZES, q as COMMON_TAX_RATES, r as COMMON_TIP_PERCENTAGES, s as COMMON_VIEWPORTS, t as CardValidationResult, v as CompoundInterestResult, w as CompoundYearRow, D as Dimensions, x as DiscountField, y as DiscountInput, z as DiscountResult, F as FilePermissions, E as FormatOptions, I as IbanValidationResult, G as IpConversion, H as IsbnFormat, J as IsbnResult, L as LoanResult, M as MarginMarkupField, K as MarginMarkupInput, N as MarginMarkupResult, O as NotationStyle, P as NumberBase, Q as PercentChangeDirection, R as PercentageChangeResult, S as Permission, T as PxConvertResult, U as RuleOf72Direction, V as RuleOf72Result, W as SemverVersion, X as SimpleInterestResult, Y as SubnetInfo, Z as SuccessiveDiscountResult, _ as SuccessiveDiscountStep, $ as TaxDirection, a0 as TaxResult, a1 as TimeValueDirection, a2 as TimeValueResult, a3 as TipSplitResult, a4 as VideoBitrateInput, a5 as VideoBitrateMode, a6 as VideoBitrateResult, a7 as ViewportConvertResult, a8 as applySuccessiveDiscounts, a9 as autoFormat, aa as bumpVersion, ab as calcAspectRatio, ac as calcSubnet, ad as calculateBreakEven, ae as calculateCompoundInterest, af as calculateDiscount, ag as calculateLoan, ah as calculateMarginMarkup, ai as calculatePercentageChange, aj as calculateRuleOf72, ak as calculateSimpleInterest, al as calculateTax, am as calculateTimeValue, an as calculateTipSplit, ao as calculateVideoBitrate, ap as compareSemver, aq as convert, ar as convertAprApy, as as convertBytes, at as convertIp, au as coverBox, av as decimalToIp, aw as decimalToIpCidr, ax as describePermissions, ay as fitIntoBox, az as formatNumber, aA as formatValue, aB as formatVwValue, aC as formatWithSeparator, aD as gcd, aE as ipFromBinary, aF as ipFromDecimal, aG as ipFromHex, aH as ipToBinary, aI as ipToDecimal, aJ as ipToDecimalCidr, aK as ipToHex, aL as ipToOctal, aM as isValid, aN as isValidCidr, aO as isValidIp, aP as isValidIpv4, aQ as marginToMarkup, aR as markupToMargin, aS as octalToPermissions, aT as parseFileSize, aU as parseInput, aV as parseNumberString, aW as parseSemver, aX as permissionsToChmod, aY as permissionsToOctal, aZ as permissionsToSymbolic, a_ as ptToPx, a$ as pxToAll, b0 as pxToViewport, b1 as remToPx, b2 as satisfiesRange, b3 as scaleByHeight, b4 as scaleByWidth, b5 as sortVersions, b6 as splitSubnet, b7 as symbolicToPermissions, b8 as validateBarcode, b9 as validateCardNumber, ba as validateIban, bb as validateIsbn, bc as viewportToPx } from '../units-COt5uI20.cjs';
|
package/dist/tools/units.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BreakEvenInput, j as BreakEvenResult, k as ByteConvertResult, l as ByteUnit, C as COMMON_CURRENCIES, m as COMMON_LOCALES, n as COMMON_PERMISSIONS, o as COMMON_RATIOS, p as COMMON_SIZES, q as COMMON_TAX_RATES, r as COMMON_TIP_PERCENTAGES, s as COMMON_VIEWPORTS, t as CardValidationResult, v as CompoundInterestResult, w as CompoundYearRow, D as Dimensions, x as DiscountField, y as DiscountInput, z as DiscountResult, F as FilePermissions, E as FormatOptions, I as IbanValidationResult, G as IpConversion, H as IsbnFormat, J as IsbnResult, L as LoanResult, M as MarginMarkupField, K as MarginMarkupInput, N as MarginMarkupResult, O as NotationStyle, P as NumberBase, Q as PercentChangeDirection, R as PercentageChangeResult, S as Permission, T as PxConvertResult, U as
|
|
1
|
+
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BreakEvenInput, j as BreakEvenResult, k as ByteConvertResult, l as ByteUnit, C as COMMON_CURRENCIES, m as COMMON_LOCALES, n as COMMON_PERMISSIONS, o as COMMON_RATIOS, p as COMMON_SIZES, q as COMMON_TAX_RATES, r as COMMON_TIP_PERCENTAGES, s as COMMON_VIEWPORTS, t as CardValidationResult, v as CompoundInterestResult, w as CompoundYearRow, D as Dimensions, x as DiscountField, y as DiscountInput, z as DiscountResult, F as FilePermissions, E as FormatOptions, I as IbanValidationResult, G as IpConversion, H as IsbnFormat, J as IsbnResult, L as LoanResult, M as MarginMarkupField, K as MarginMarkupInput, N as MarginMarkupResult, O as NotationStyle, P as NumberBase, Q as PercentChangeDirection, R as PercentageChangeResult, S as Permission, T as PxConvertResult, U as RuleOf72Direction, V as RuleOf72Result, W as SemverVersion, X as SimpleInterestResult, Y as SubnetInfo, Z as SuccessiveDiscountResult, _ as SuccessiveDiscountStep, $ as TaxDirection, a0 as TaxResult, a1 as TimeValueDirection, a2 as TimeValueResult, a3 as TipSplitResult, a4 as VideoBitrateInput, a5 as VideoBitrateMode, a6 as VideoBitrateResult, a7 as ViewportConvertResult, a8 as applySuccessiveDiscounts, a9 as autoFormat, aa as bumpVersion, ab as calcAspectRatio, ac as calcSubnet, ad as calculateBreakEven, ae as calculateCompoundInterest, af as calculateDiscount, ag as calculateLoan, ah as calculateMarginMarkup, ai as calculatePercentageChange, aj as calculateRuleOf72, ak as calculateSimpleInterest, al as calculateTax, am as calculateTimeValue, an as calculateTipSplit, ao as calculateVideoBitrate, ap as compareSemver, aq as convert, ar as convertAprApy, as as convertBytes, at as convertIp, au as coverBox, av as decimalToIp, aw as decimalToIpCidr, ax as describePermissions, ay as fitIntoBox, az as formatNumber, aA as formatValue, aB as formatVwValue, aC as formatWithSeparator, aD as gcd, aE as ipFromBinary, aF as ipFromDecimal, aG as ipFromHex, aH as ipToBinary, aI as ipToDecimal, aJ as ipToDecimalCidr, aK as ipToHex, aL as ipToOctal, aM as isValid, aN as isValidCidr, aO as isValidIp, aP as isValidIpv4, aQ as marginToMarkup, aR as markupToMargin, aS as octalToPermissions, aT as parseFileSize, aU as parseInput, aV as parseNumberString, aW as parseSemver, aX as permissionsToChmod, aY as permissionsToOctal, aZ as permissionsToSymbolic, a_ as ptToPx, a$ as pxToAll, b0 as pxToViewport, b1 as remToPx, b2 as satisfiesRange, b3 as scaleByHeight, b4 as scaleByWidth, b5 as sortVersions, b6 as splitSubnet, b7 as symbolicToPermissions, b8 as validateBarcode, b9 as validateCardNumber, ba as validateIban, bb as validateIsbn, bc as viewportToPx } from '../units-COt5uI20.js';
|
package/dist/tools/units.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCompoundInterest, calculateDiscount, calculateLoan, calculateMarginMarkup, calculatePercentageChange, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx } from '../chunk-
|
|
1
|
+
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBreakEven, calculateCompoundInterest, calculateDiscount, calculateLoan, calculateMarginMarkup, calculatePercentageChange, calculateRuleOf72, calculateSimpleInterest, calculateTax, calculateTimeValue, calculateTipSplit, calculateVideoBitrate, compareSemver, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, viewportToPx } from '../chunk-I63BCOAG.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
|
@@ -627,6 +627,28 @@ interface VideoBitrateResult {
|
|
|
627
627
|
declare function calculateVideoBitrate(input: VideoBitrateInput): VideoBitrateResult | {
|
|
628
628
|
error: string;
|
|
629
629
|
};
|
|
630
|
+
type RuleOf72Direction = 'rate-to-years' | 'years-to-rate';
|
|
631
|
+
interface RuleOf72Result {
|
|
632
|
+
direction: RuleOf72Direction;
|
|
633
|
+
ratePercent: number;
|
|
634
|
+
years: number;
|
|
635
|
+
ruleOf72Estimate: number;
|
|
636
|
+
exactValue: number;
|
|
637
|
+
errorPercent: number;
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Estimate how many years it takes an investment to double at a given annual
|
|
641
|
+
* rate (direction "rate-to-years"), or the rate needed to double in a given
|
|
642
|
+
* number of years (direction "years-to-rate"), using the Rule of 72 shortcut
|
|
643
|
+
* (72 / rate, or 72 / years). Also computes the exact result from the
|
|
644
|
+
* logarithmic doubling-time formula ln(2) / ln(1 + rate/100), so the two can
|
|
645
|
+
* be compared: the Rule of 72 is most accurate for rates roughly between 6%
|
|
646
|
+
* and 10% and drifts further from the exact value outside that range. Pure
|
|
647
|
+
* arithmetic, no live rate feed.
|
|
648
|
+
*/
|
|
649
|
+
declare function calculateRuleOf72(value: number, direction: RuleOf72Direction): RuleOf72Result | {
|
|
650
|
+
error: string;
|
|
651
|
+
};
|
|
630
652
|
|
|
631
653
|
type units_AmortizationRow = AmortizationRow;
|
|
632
654
|
type units_AprApyDirection = AprApyDirection;
|
|
@@ -673,6 +695,8 @@ type units_PercentChangeDirection = PercentChangeDirection;
|
|
|
673
695
|
type units_PercentageChangeResult = PercentageChangeResult;
|
|
674
696
|
type units_Permission = Permission;
|
|
675
697
|
type units_PxConvertResult = PxConvertResult;
|
|
698
|
+
type units_RuleOf72Direction = RuleOf72Direction;
|
|
699
|
+
type units_RuleOf72Result = RuleOf72Result;
|
|
676
700
|
type units_SemverVersion = SemverVersion;
|
|
677
701
|
type units_SimpleInterestResult = SimpleInterestResult;
|
|
678
702
|
type units_SubnetInfo = SubnetInfo;
|
|
@@ -698,6 +722,7 @@ declare const units_calculateDiscount: typeof calculateDiscount;
|
|
|
698
722
|
declare const units_calculateLoan: typeof calculateLoan;
|
|
699
723
|
declare const units_calculateMarginMarkup: typeof calculateMarginMarkup;
|
|
700
724
|
declare const units_calculatePercentageChange: typeof calculatePercentageChange;
|
|
725
|
+
declare const units_calculateRuleOf72: typeof calculateRuleOf72;
|
|
701
726
|
declare const units_calculateSimpleInterest: typeof calculateSimpleInterest;
|
|
702
727
|
declare const units_calculateTax: typeof calculateTax;
|
|
703
728
|
declare const units_calculateTimeValue: typeof calculateTimeValue;
|
|
@@ -756,7 +781,7 @@ declare const units_validateIban: typeof validateIban;
|
|
|
756
781
|
declare const units_validateIsbn: typeof validateIsbn;
|
|
757
782
|
declare const units_viewportToPx: typeof viewportToPx;
|
|
758
783
|
declare namespace units {
|
|
759
|
-
export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_SuccessiveDiscountResult as SuccessiveDiscountResult, type units_SuccessiveDiscountStep as SuccessiveDiscountStep, type units_TaxDirection as TaxDirection, type units_TaxResult as TaxResult, type units_TimeValueDirection as TimeValueDirection, type units_TimeValueResult as TimeValueResult, type units_TipSplitResult as TipSplitResult, type units_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBreakEven as calculateBreakEven, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateDiscount as calculateDiscount, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculatePercentageChange as calculatePercentageChange, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_calculateVideoBitrate as calculateVideoBitrate, units_compareSemver as compareSemver, units_convert as convert, units_convertAprApy as convertAprApy, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_marginToMarkup as marginToMarkup, units_markupToMargin as markupToMargin, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_validateBarcode as validateBarcode, units_validateCardNumber as validateCardNumber, units_validateIban as validateIban, units_validateIsbn as validateIsbn, units_viewportToPx as viewportToPx };
|
|
784
|
+
export { type units_AmortizationRow as AmortizationRow, type units_AprApyDirection as AprApyDirection, type units_AprApyResult as AprApyResult, type units_AspectRatioResult as AspectRatioResult, units_BASE_LABELS as BASE_LABELS, units_BASE_PREFIXES as BASE_PREFIXES, units_BYTE_UNITS as BYTE_UNITS, type units_BarcodeFormat as BarcodeFormat, type units_BarcodeValidationResult as BarcodeValidationResult, type units_BaseConvertResult as BaseConvertResult, type units_BreakEvenInput as BreakEvenInput, type units_BreakEvenResult as BreakEvenResult, type units_ByteConvertResult as ByteConvertResult, type units_ByteUnit as ByteUnit, units_COMMON_CURRENCIES as COMMON_CURRENCIES, units_COMMON_LOCALES as COMMON_LOCALES, units_COMMON_PERMISSIONS as COMMON_PERMISSIONS, units_COMMON_RATIOS as COMMON_RATIOS, units_COMMON_SIZES as COMMON_SIZES, units_COMMON_TAX_RATES as COMMON_TAX_RATES, units_COMMON_TIP_PERCENTAGES as COMMON_TIP_PERCENTAGES, units_COMMON_VIEWPORTS as COMMON_VIEWPORTS, type units_CardValidationResult as CardValidationResult, type units_CompoundInterestResult as CompoundInterestResult, type units_CompoundYearRow as CompoundYearRow, type units_Dimensions as Dimensions, type units_DiscountField as DiscountField, type units_DiscountInput as DiscountInput, type units_DiscountResult as DiscountResult, type units_FilePermissions as FilePermissions, type units_FormatOptions as FormatOptions, type units_IbanValidationResult as IbanValidationResult, type units_IpConversion as IpConversion, type units_IsbnFormat as IsbnFormat, type units_IsbnResult as IsbnResult, type units_LoanResult as LoanResult, type units_MarginMarkupField as MarginMarkupField, type units_MarginMarkupInput as MarginMarkupInput, type units_MarginMarkupResult as MarginMarkupResult, type units_NotationStyle as NotationStyle, type units_NumberBase as NumberBase, type units_PercentChangeDirection as PercentChangeDirection, type units_PercentageChangeResult as PercentageChangeResult, type units_Permission as Permission, type units_PxConvertResult as PxConvertResult, type units_RuleOf72Direction as RuleOf72Direction, type units_RuleOf72Result as RuleOf72Result, type units_SemverVersion as SemverVersion, type units_SimpleInterestResult as SimpleInterestResult, type units_SubnetInfo as SubnetInfo, type units_SuccessiveDiscountResult as SuccessiveDiscountResult, type units_SuccessiveDiscountStep as SuccessiveDiscountStep, type units_TaxDirection as TaxDirection, type units_TaxResult as TaxResult, type units_TimeValueDirection as TimeValueDirection, type units_TimeValueResult as TimeValueResult, type units_TipSplitResult as TipSplitResult, type units_VideoBitrateInput as VideoBitrateInput, type units_VideoBitrateMode as VideoBitrateMode, type units_VideoBitrateResult as VideoBitrateResult, type units_ViewportConvertResult as ViewportConvertResult, units_applySuccessiveDiscounts as applySuccessiveDiscounts, units_autoFormat as autoFormat, units_bumpVersion as bumpVersion, units_calcAspectRatio as calcAspectRatio, units_calcSubnet as calcSubnet, units_calculateBreakEven as calculateBreakEven, units_calculateCompoundInterest as calculateCompoundInterest, units_calculateDiscount as calculateDiscount, units_calculateLoan as calculateLoan, units_calculateMarginMarkup as calculateMarginMarkup, units_calculatePercentageChange as calculatePercentageChange, units_calculateRuleOf72 as calculateRuleOf72, units_calculateSimpleInterest as calculateSimpleInterest, units_calculateTax as calculateTax, units_calculateTimeValue as calculateTimeValue, units_calculateTipSplit as calculateTipSplit, units_calculateVideoBitrate as calculateVideoBitrate, units_compareSemver as compareSemver, units_convert as convert, units_convertAprApy as convertAprApy, units_convertBytes as convertBytes, units_convertIp as convertIp, units_coverBox as coverBox, units_decimalToIp as decimalToIp, units_decimalToIpCidr as decimalToIpCidr, units_describePermissions as describePermissions, units_fitIntoBox as fitIntoBox, units_formatNumber as formatNumber, units_formatValue as formatValue, units_formatVwValue as formatVwValue, units_formatWithSeparator as formatWithSeparator, units_gcd as gcd, units_ipFromBinary as ipFromBinary, units_ipFromDecimal as ipFromDecimal, units_ipFromHex as ipFromHex, units_ipToBinary as ipToBinary, units_ipToDecimal as ipToDecimal, units_ipToDecimalCidr as ipToDecimalCidr, units_ipToHex as ipToHex, units_ipToOctal as ipToOctal, units_isValid as isValid, units_isValidCidr as isValidCidr, units_isValidIp as isValidIp, units_isValidIpv4 as isValidIpv4, units_marginToMarkup as marginToMarkup, units_markupToMargin as markupToMargin, units_octalToPermissions as octalToPermissions, units_parseFileSize as parseFileSize, units_parseInput as parseInput, units_parseNumberString as parseNumberString, units_parseSemver as parseSemver, units_permissionsToChmod as permissionsToChmod, units_permissionsToOctal as permissionsToOctal, units_permissionsToSymbolic as permissionsToSymbolic, units_ptToPx as ptToPx, units_pxToAll as pxToAll, units_pxToViewport as pxToViewport, units_remToPx as remToPx, units_satisfiesRange as satisfiesRange, units_scaleByHeight as scaleByHeight, units_scaleByWidth as scaleByWidth, units_sortVersions as sortVersions, units_splitSubnet as splitSubnet, units_symbolicToPermissions as symbolicToPermissions, units_validateBarcode as validateBarcode, units_validateCardNumber as validateCardNumber, units_validateIban as validateIban, units_validateIsbn as validateIsbn, units_viewportToPx as viewportToPx };
|
|
760
785
|
}
|
|
761
786
|
|
|
762
|
-
export { type
|
|
787
|
+
export { type TaxDirection as $, type AmortizationRow as A, BASE_LABELS as B, COMMON_CURRENCIES as C, type Dimensions as D, type FormatOptions as E, type FilePermissions as F, type IpConversion as G, type IsbnFormat as H, type IbanValidationResult as I, type IsbnResult as J, type MarginMarkupInput as K, type LoanResult as L, type MarginMarkupField as M, type MarginMarkupResult as N, type NotationStyle as O, type NumberBase as P, type PercentChangeDirection as Q, type PercentageChangeResult as R, type Permission as S, type PxConvertResult as T, type RuleOf72Direction as U, type RuleOf72Result as V, type SemverVersion as W, type SimpleInterestResult as X, type SubnetInfo as Y, type SuccessiveDiscountResult as Z, type SuccessiveDiscountStep as _, type AprApyDirection as a, pxToAll as a$, type TaxResult as a0, type TimeValueDirection as a1, type TimeValueResult as a2, type TipSplitResult as a3, type VideoBitrateInput as a4, type VideoBitrateMode as a5, type VideoBitrateResult as a6, type ViewportConvertResult as a7, applySuccessiveDiscounts as a8, autoFormat as a9, formatValue as aA, formatVwValue as aB, formatWithSeparator as aC, gcd as aD, ipFromBinary as aE, ipFromDecimal as aF, ipFromHex as aG, ipToBinary as aH, ipToDecimal as aI, ipToDecimalCidr as aJ, ipToHex as aK, ipToOctal as aL, isValid as aM, isValidCidr as aN, isValidIp as aO, isValidIpv4 as aP, marginToMarkup as aQ, markupToMargin as aR, octalToPermissions as aS, parseFileSize as aT, parseInput as aU, parseNumberString as aV, parseSemver as aW, permissionsToChmod as aX, permissionsToOctal as aY, permissionsToSymbolic as aZ, ptToPx as a_, bumpVersion as aa, calcAspectRatio as ab, calcSubnet as ac, calculateBreakEven as ad, calculateCompoundInterest as ae, calculateDiscount as af, calculateLoan as ag, calculateMarginMarkup as ah, calculatePercentageChange as ai, calculateRuleOf72 as aj, calculateSimpleInterest as ak, calculateTax as al, calculateTimeValue as am, calculateTipSplit as an, calculateVideoBitrate as ao, compareSemver as ap, convert as aq, convertAprApy as ar, convertBytes as as, convertIp as at, coverBox as au, decimalToIp as av, decimalToIpCidr as aw, describePermissions as ax, fitIntoBox as ay, formatNumber as az, type AprApyResult as b, pxToViewport as b0, remToPx as b1, satisfiesRange as b2, scaleByHeight as b3, scaleByWidth as b4, sortVersions as b5, splitSubnet as b6, symbolicToPermissions as b7, validateBarcode as b8, validateCardNumber as b9, validateIban as ba, validateIsbn as bb, viewportToPx as bc, type AspectRatioResult as c, BASE_PREFIXES as d, BYTE_UNITS as e, type BarcodeFormat as f, type BarcodeValidationResult as g, type BaseConvertResult as h, type BreakEvenInput as i, type BreakEvenResult as j, type ByteConvertResult as k, type ByteUnit as l, COMMON_LOCALES as m, COMMON_PERMISSIONS as n, COMMON_RATIOS as o, COMMON_SIZES as p, COMMON_TAX_RATES as q, COMMON_TIP_PERCENTAGES as r, COMMON_VIEWPORTS as s, type CardValidationResult as t, units as u, type CompoundInterestResult as v, type CompoundYearRow as w, type DiscountField as x, type DiscountInput as y, type DiscountResult as z };
|