Compare commits

..
4 changed files with 2213 additions and 2037 deletions

No files matched your search

+2117 -1955
View File
File diff suppressed because it is too large. Load diff
+55 -67
View File
@@ -682,7 +682,7 @@ importers:
version: 3.1.1
fast-xml-parser:
specifier: ^5.11.1
version: 5.11.1
version: 5.12.1
fast_array_intersect:
specifier: ^1.1.0
version: 1.1.0
@@ -1466,7 +1466,7 @@ importers:
version: 4.6.7
node:
specifier: runtime:24.x
version: runtime:24.21.0
version: runtime:24.22.3
oxfmt:
specifier: ^0.57.0
version: 0.57.0(svelte@5.56.4(@typescript-eslint/types@8.62.1))
@@ -3541,8 +3541,8 @@ packages:
resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==}
engines: {node: '>= 16'}
'@nodable/entities@3.0.0':
resolution: {integrity: sha512-8L9xFeTYKhm49xfIypoe2W5wV1m/3Z58kT+7kR9A8OyFxcPduI4VmxaUMQyKYrRjUoLLSXv6EKKID5Tvj9cUVw==}
'@nodable/entities@3.1.0':
resolution: {integrity: sha512-LsS/DjHr+uDM647Gru/cA8+J3a3HfhttwCKLyuoyN7yXTFCxKBtSgMQBvrW9yNPa2/zDRUNuGPaH5QUFoa4arQ==}
'@nodelib/fs.scandir@2.1.5':
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
@@ -7232,11 +7232,11 @@ packages:
fast-uri@3.1.3:
resolution: {integrity: sha512-i70LwGWUduXqzicKXWshooq+sWL1K3WUU5rKZNG/0i3a1OSoX3HqhH5WbWwTmqWfor4urUakGPiRQcleRZTwOg==}
fast-xml-builder@1.2.1:
resolution: {integrity: sha512-tPb5TTWfgfVx5BNSi2xV0eLr89POeXXn0dXIsCJ9m1narrWxeIyx6je9d7Rce/3NyXLbvuQmLkxq+RuxMWejvw==}
fast-xml-builder@1.3.2:
resolution: {integrity: sha512-OX91VSlShLPDgRZV7tk/YQ4l8tT75QziF5Ixg8g4PFbCVPjuTWwN+yQfAxLJ0dufJpprdOd6HlM74Jhd39TcBQ==}
fast-xml-parser@5.11.1:
resolution: {integrity: sha512-TBw6K/fxoQGGjCmZDw9w/ZwP3uDcnTM4YH/g+PFRWr8sbe5idXtxNN6vITh4+1ruCZaho6uBFurElsA7F0zzgw==}
fast-xml-parser@5.12.1:
resolution: {integrity: sha512-wR8dO/fx+z8C5exuem1e7BKOWvjsuzvjS/tvA/Xu3Z1zQqJGcXrPzXbcAiaMgp2KjreEROcTkmnnisrcmJ2hYQ==}
hasBin: true
fast_array_intersect@1.1.0:
@@ -8155,8 +8155,8 @@ packages:
resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==}
engines: {node: '>=10'}
is-unsafe@2.0.2:
resolution: {integrity: sha512-HgbIHPBH0KHHCcjLfGsCvhtPTVxjaAZlXjwdz7/GQC40SjSe4sfQsar8J5VFo8JOSbarkpV0OLG95bbaNd9aAQ==}
is-unsafe@2.0.3:
resolution: {integrity: sha512-ZBllczCCO267vgdFb6Tq3pv+LhHaCiGMdr+ZsuL+OopruAg7S+3ZDs1vD0RPC0uSrkjzbraxaGjtX1YBxjPeFQ==}
is-upper-case@1.1.2:
resolution: {integrity: sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw==}
@@ -9216,7 +9216,7 @@ packages:
resolution: {integrity: sha512-X75ZN8DCLftGM5iKwoYLA3rjnrAEs97MkzvSd4q2746Tgpg8b8XWiBGiBG4ZpgcAqBgtgPHTiAc8ZMCvZuikDw==}
engines: {node: '>=10'}
node@runtime:24.21.0:
node@runtime:24.22.3:
resolution:
type: variations
variants:
@@ -9224,9 +9224,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-rseyRkr7mfB4wZywbSAdVDvTsxHLoHEoK84bF8l+WLs=
integrity: sha256-aT/ojEqF5+Fy7BMvdg5ns5JbLWRCyxyzp0tz/Pgx9wo=
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-aix-ppc64.tar.gz
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-aix-ppc64.tar.gz
targets:
- cpu: ppc64
os: aix
@@ -9234,9 +9234,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-vtfupTJeEQjzLOUijd1qXw8IpJnuQqp0Qq6lg3AvYFc=
integrity: sha256-/24X1IdLdtJyISuQjMAg1ugV+6Wmx+qqBq3XJYQDB/0=
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-darwin-arm64.tar.gz
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-darwin-arm64.tar.gz
targets:
- cpu: arm64
os: darwin
@@ -9244,9 +9244,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-FGLLOzBGuBXPjqQ209pFDsGp8R2sflpGsK2lMF1+gJc=
integrity: sha256-l3YUrwUEyBBF5/2FWW28oOX5UblmgVFtra/tzKjER/c=
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-darwin-x64.tar.gz
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-darwin-x64.tar.gz
targets:
- cpu: x64
os: darwin
@@ -9254,9 +9254,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-ckKCw7Q67JmKqVJzgEZbRdIp4CG1gDX19PYwleq/5dU=
integrity: sha256-JhryryUN/X6fJc8VHRsnE6Ct+PEKmtEWxJR/aGJ6/+g=
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-linux-arm64.tar.gz
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-linux-arm64.tar.gz
targets:
- cpu: arm64
os: linux
@@ -9264,9 +9264,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-UcXVMGbukpILYXg7A7Buy5nzZhFg97Fcp36EdBFaZ7w=
integrity: sha256-uksmreH3s/W6Z1aFaBXeWONTdGAE5+RsyDgkOmy/Mpk=
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-linux-ppc64le.tar.gz
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-linux-ppc64le.tar.gz
targets:
- cpu: ppc64le
os: linux
@@ -9274,9 +9274,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-Xy+jdCLgx13jXBaG/lHXgyTywqj+LMI5pB2cAAop2Tg=
integrity: sha256-2PhDl8FHjA7QwbKTQ2Ju0PXxoJhd8MWXXDDwwDg2Yx8=
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-linux-s390x.tar.gz
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-linux-s390x.tar.gz
targets:
- cpu: s390x
os: linux
@@ -9284,9 +9284,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-PWNAX8ZaDS0pdsHwvC/Se7C9ByEkaecFqsPwOuWrTJw=
integrity: sha256-VJm2Y/Yscgk3FdqY9K6m+DQnrYurnPnHXwkk4ORWzhQ=
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-linux-x64-musl.tar.gz
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-linux-x64-musl.tar.gz
targets:
- cpu: x64
os: linux
@@ -9295,9 +9295,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-bh24fvWLiBnl1UAu/xU2SRsY7djre+5e94l4duiNxf8=
integrity: sha256-Bh7D4wYhFXBbVrUfqcwzCrUNNLaWk4fU5LGlDGgJrMI=
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-linux-x64.tar.gz
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-linux-x64.tar.gz
targets:
- cpu: x64
os: linux
@@ -9305,10 +9305,10 @@ packages:
archive: zip
bin:
node: node.exe
integrity: sha256-h3mxveHTn41CDjtXqmV7OYka9DTT3kSpGQRM7AZ4WSE=
prefix: node-v24.21.0-win-arm64
integrity: sha256-s8x0opWznU8nMnHpb1jAbdKzV1fKEqvsZMfQWYtDTxQ=
prefix: node-v24.22.3-win-arm64
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-win-arm64.zip
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-win-arm64.zip
targets:
- cpu: arm64
os: win32
@@ -9316,10 +9316,10 @@ packages:
archive: zip
bin:
node: node.exe
integrity: sha256-FY92hbRN5R9sDfHRU1JsvNPhvHOajfxgdyHO913p5UE=
prefix: node-v24.21.0-win-x64
integrity: sha256-5hKvmfYmq0FeoiWva85clx/rRIy1yuJQuxw/pQxffZ8=
prefix: node-v24.22.3-win-x64
type: binary
url: https://nodejs.org/download/release/v24.21.0/node-v24.21.0-win-x64.zip
url: https://nodejs.org/download/release/v24.22.3/node-v24.22.3-win-x64.zip
targets:
- cpu: x64
os: win32
@@ -9327,9 +9327,9 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-MEiwgR4VjKDYZytZyDmGF2PhREkpgNjSmzad/uRXR+Q=
integrity: sha256-JIyWqE9sgzhka5/XO/ElEkZ4+PsI218jAj9GIFXg7tw=
type: binary
url: https://unofficial-builds.nodejs.org/download/release/v24.21.0/node-v24.21.0-linux-arm64-musl.tar.gz
url: https://unofficial-builds.nodejs.org/download/release/v24.22.3/node-v24.22.3-linux-arm64-musl.tar.gz
targets:
- cpu: arm64
os: linux
@@ -9338,14 +9338,14 @@ packages:
archive: tarball
bin:
node: bin/node
integrity: sha256-AacT402pjntNKjGR7nyj+T3QOE0aLvI8N5shYe5uEzo=
integrity: sha256-LbT4pAq+X1tdEZlkIj/tycTHxefGMpAa6GCvUix4RLI=
type: binary
url: https://unofficial-builds.nodejs.org/download/release/v24.21.0/node-v24.21.0-linux-x64-musl.tar.gz
url: https://unofficial-builds.nodejs.org/download/release/v24.22.3/node-v24.22.3-linux-x64-musl.tar.gz
targets:
- cpu: x64
os: linux
libc: musl
version: 24.21.0
version: 24.22.3
hasBin: true
nodemailer@9.0.1:
@@ -9667,10 +9667,6 @@ packages:
resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}
engines: {node: '>=8'}
path-expression-matcher@1.6.1:
resolution: {integrity: sha512-h7bxdzhHk8Knyc4Tj+jMaa7fEEoUJy7p1qtbVgkYg1Uhpe5Np5VuGXCRZnkZvU+Q42M1vStt0ifa3ueykRJPmQ==}
engines: {node: '>=14.0.0'}
path-expression-matcher@1.6.2:
resolution: {integrity: sha512-enSlaiat05iasnzmgNxRj8reFdj3puY2QpNgP1aPIaVfT6nn9ICuPoFlKHk8EN22HcwewshO+mN2DGbkCEOtqQ==}
engines: {node: '>=14.0.0'}
@@ -10702,8 +10698,8 @@ packages:
strip-literal@3.1.0:
resolution: {integrity: sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==}
strnum@2.4.2:
resolution: {integrity: sha512-rDG3Ah4TV0k1hWvLSzkZtMmLN9+eS+h3knq4MP6A42Y3Yh5qGNnOUs1jJkoSr8FG5dsL28c7KgkIBzSEykqtuw==}
strnum@2.5.1:
resolution: {integrity: sha512-UM4nTLWzQiDBseVxUGxN0wJzIk0UU89Qi7pKXz9qISo+lhviJikTuikBsK/oFRlpvYHvSdz0TVoLyQ+sEpYwxA==}
strtok3@10.3.5:
resolution: {integrity: sha512-ki4hZQfh5rX0QDLLkOCj+h+CVNkqmp/CMf8v8kZpkNVK6jGQooMytqzLZYUVYIZcFZ6yDB70EfD8POcFXiF5oA==}
@@ -11874,10 +11870,6 @@ packages:
resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==}
engines: {node: '>=18'}
xml-naming@0.1.0:
resolution: {integrity: sha512-k8KO9hrMyNk6tUWqUfkTEZbezRRpONVOzUTnc97VnCvyj6Tf9lyUR9EDAIeiVLv56jsMcoXEwjW8Kv5yPY52lw==}
engines: {node: '>=16.0.0'}
xml-naming@0.3.0:
resolution: {integrity: sha512-ghig2TBE/H11aOVgmahA3MhimvkBr6JIYknH/Dhdk10nXwdbIqBJsbfMxpvFPG8bAw77gN29aQWvKpmVoPlvPQ==}
engines: {node: '>=16.0.0'}
@@ -14421,7 +14413,7 @@ snapshots:
'@noble/hashes@1.3.2': {}
'@nodable/entities@3.0.0': {}
'@nodable/entities@3.1.0': {}
'@nodelib/fs.scandir@2.1.5':
dependencies:
@@ -18181,18 +18173,18 @@ snapshots:
fast-uri@3.1.3: {}
fast-xml-builder@1.2.1:
fast-xml-builder@1.3.2:
dependencies:
path-expression-matcher: 1.6.1
xml-naming: 0.1.0
fast-xml-parser@5.11.1:
dependencies:
'@nodable/entities': 3.0.0
fast-xml-builder: 1.2.1
is-unsafe: 2.0.2
path-expression-matcher: 1.6.2
strnum: 2.4.2
xml-naming: 0.3.0
fast-xml-parser@5.12.1:
dependencies:
'@nodable/entities': 3.1.0
fast-xml-builder: 1.3.2
is-unsafe: 2.0.3
path-expression-matcher: 1.6.2
strnum: 2.5.1
xml-naming: 0.3.0
fast_array_intersect@1.1.0: {}
@@ -19143,7 +19135,7 @@ snapshots:
is-unicode-supported@0.1.0: {}
is-unsafe@2.0.2: {}
is-unsafe@2.0.3: {}
is-upper-case@1.1.2:
dependencies:
@@ -19794,7 +19786,7 @@ snapshots:
dependencies:
commander: 13.1.0
docx: 9.7.1
fast-xml-parser: 5.11.1
fast-xml-parser: 5.12.1
image-size: 2.0.2
katex: 0.16.47
marked: 15.0.12
@@ -20290,7 +20282,7 @@ snapshots:
util: 0.12.5
vm-browserify: 1.1.2
node@runtime:24.21.0: {}
node@runtime:24.22.3: {}
nodemailer@9.0.1: {}
@@ -20693,8 +20685,6 @@ snapshots:
path-exists@4.0.0: {}
path-expression-matcher@1.6.1: {}
path-expression-matcher@1.6.2: {}
path-is-absolute@1.0.1: {}
@@ -21913,7 +21903,7 @@ snapshots:
dependencies:
js-tokens: 9.0.1
strnum@2.4.2:
strnum@2.5.1:
dependencies:
anynum: 1.0.1
@@ -23310,8 +23300,6 @@ snapshots:
xml-name-validator@5.0.0: {}
xml-naming@0.1.0: {}
xml-naming@0.3.0: {}
xml-parse-from-string@1.0.1: {}
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { useI18n } from 'vue-i18n';
import {
format,
formatISO,
formatISO9075,
formatRFC3339,
@@ -10,6 +11,7 @@ import {
getUnixTime,
isDate,
isValid,
parse,
parseISO,
} from 'date-fns';
import { ticksFromDate, ticksToDate } from 'tick-time';
@@ -129,6 +131,12 @@ const formats: DateFormat[] = [
toDate: (date) => lDAPTimestampToDate(date),
formatMatcher: isLDAPTimestamp,
},
{
name: 'Julian Date (YYYY/DDD)',
fromDate: (date) => format(date, 'yyyy/DDD'),
toDate: (date) => parse(date, 'yyyy/DDD', new Date()),
formatMatcher: (date) => /\d{4}\/\d{3}/.test(date || ''),
},
{
name: 'Win32 FileTime/LDAP 18 digits Timestamp',
fromDate: (date) => dateToWin32FileTime(date),
@@ -139,7 +147,7 @@ const formats: DateFormat[] = [
name: '.Net ticks',
fromDate: (date) => ticksFromDate(date),
toDate: (date) => ticksToDate(date) || new Date(),
formatMatcher: (date) => /\d+/.test(date || ''),
formatMatcher: (date) => /^\d+$/.test(date || ''),
},
];
@@ -18,58 +18,71 @@ const { t } = useI18n();
const input = useQueryParam({ tool: 'mac-conv', name: 'addr', defaultValue: 'AA:BB:CC:DD:EE:FF' });
const convertMulti = (value: string, converter: (mac: string) => string): string => {
const macs = value.split(/[\s,;]+/).filter((mac) => mac.trim() !== '');
return macs
.map((mac) => {
try {
return converter(mac);
} catch (error) {
return t('tools.mac-address-converter.texts.error-invalid-mac-address', [mac]);
}
})
.join('\n');
};
const formats = computed(() => [
{
label: t('tools.mac-address-converter.texts.label-canonical-ietf-format'),
value: convertMacCanonicalIETF(input.value),
value: convertMulti(input.value, convertMacCanonicalIETF),
},
{
label: t('tools.mac-address-converter.texts.label-canonical-format'),
value: convertMacCanonical(input.value),
value: convertMulti(input.value, convertMacCanonical),
},
{
label: t('tools.mac-address-converter.texts.label-canonical-ieee-format'),
value: convertMacCanonicalIEEE(input.value),
value: convertMulti(input.value, convertMacCanonicalIEEE),
},
{
label: t('tools.mac-address-converter.texts.label-cisco'),
value: convertMacCISCO(input.value),
value: convertMulti(input.value, convertMacCISCO),
},
{
label: t('tools.mac-address-converter.texts.label-hex'),
value: convertMacToNumber(input.value).toString(16),
value: convertMulti(input.value, (mac) => convertMacToNumber(mac).toString(16)),
},
{
label: t('tools.mac-address-converter.texts.label-decimal'),
value: convertMacToNumber(input.value).toString(10),
value: convertMulti(input.value, (mac) => convertMacToNumber(mac).toString(10)),
},
{
label: t('tools.mac-address-converter.texts.label-eui-64-canonical-ietf-format'),
value: convertMacToEUI64CanonicalIETF(input.value, false),
value: convertMulti(input.value, (mac) => convertMacToEUI64CanonicalIETF(mac, false)),
},
{
label: t('tools.mac-address-converter.texts.label-eui-64-canonical-ieee-format'),
value: convertMacToEUI64CanonicalIEEE(input.value, false),
value: convertMulti(input.value, (mac) => convertMacToEUI64CanonicalIEEE(mac, false)),
},
{
label: t('tools.mac-address-converter.texts.label-eui-64-cisco'),
value: convertMacToEUI64CISCO(input.value, false),
value: convertMulti(input.value, (mac) => convertMacToEUI64CISCO(mac, false)),
},
{
label: t('tools.mac-address-converter.texts.label-eui-64-ipv6-canonical-ietf-format'),
value: convertMacToEUI64CanonicalIETF(input.value, true),
value: convertMulti(input.value, (mac) => convertMacToEUI64CanonicalIETF(mac, true)),
},
{
label: t('tools.mac-address-converter.texts.label-eui-64-ipv6-canonical-ieee-format'),
value: convertMacToEUI64CanonicalIEEE(input.value, true),
value: convertMulti(input.value, (mac) => convertMacToEUI64CanonicalIEEE(mac, true)),
},
{
label: t('tools.mac-address-converter.texts.label-eui-64-ipv6-cisco'),
value: convertMacToEUI64CISCO(input.value, true),
value: convertMulti(input.value, (mac) => convertMacToEUI64CISCO(mac, true)),
},
{
label: t('tools.mac-address-converter.texts.label-link-local-ipv6'),
value: convertMacToLinkLocalIPv6(input.value),
value: convertMulti(input.value, (mac) => convertMacToLinkLocalIPv6(mac)),
},
]);
@@ -86,8 +99,10 @@ const inputLabelAlignmentConfig = {
v-model:value="input"
:label="t('tools.mac-address-converter.texts.label-mac-address')"
size="large"
:placeholder="t('tools.mac-address-converter.texts.placeholder-type-a-mac-address')"
:placeholder="t('tools.mac-address-converter.texts.placeholder-type-mac-address')"
clearable
multiline
rows="3"
autocomplete="off"
autocorrect="off"
autocapitalize="off"
@@ -103,6 +118,9 @@ const inputLabelAlignmentConfig = {
:value="format.value"
:label="format.label"
v-bind="inputLabelAlignmentConfig"
multiline
autosize
rows="1"
mb-1
/>
</c-card>