This commit is contained in:
Akko
2025-08-04 18:57:35 +02:00
parent 8cf6e78a79
commit 9495868c2e
5030 changed files with 518594 additions and 17609 deletions

View File

@@ -0,0 +1,6 @@
import type { FormatDetectionParser } from '../types';
/**
* Detects if the browser supports the AVIF image format.
* @memberof assets
*/
export declare const detectAvif: FormatDetectionParser;

View File

@@ -0,0 +1,21 @@
'use strict';
var Extensions = require('../../../extensions/Extensions.js');
var testImageFormat = require('../utils/testImageFormat.js');
"use strict";
const detectAvif = {
extension: {
type: Extensions.ExtensionType.DetectionParser,
priority: 1
},
test: async () => testImageFormat.testImageFormat(
// eslint-disable-next-line max-len
"data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="
),
add: async (formats) => [...formats, "avif"],
remove: async (formats) => formats.filter((f) => f !== "avif")
};
exports.detectAvif = detectAvif;
//# sourceMappingURL=detectAvif.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"detectAvif.js","sources":["../../../../src/assets/detections/parsers/detectAvif.ts"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions';\nimport { testImageFormat } from '../utils/testImageFormat';\n\nimport type { FormatDetectionParser } from '../types';\n\n/**\n * Detects if the browser supports the AVIF image format.\n * @memberof assets\n */\nexport const detectAvif: FormatDetectionParser = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 1,\n },\n test: async (): Promise<boolean> => testImageFormat(\n // eslint-disable-next-line max-len\n 'data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A='\n ),\n add: async (formats) => [...formats, 'avif'],\n remove: async (formats) => formats.filter((f) => f !== 'avif'),\n};\n"],"names":["ExtensionType","testImageFormat"],"mappings":";;;;;;AASO,MAAM,UAAoC,GAAA;AAAA,EAC7C,SAAW,EAAA;AAAA,IACP,MAAMA,wBAAc,CAAA,eAAA;AAAA,IACpB,QAAU,EAAA,CAAA;AAAA,GACd;AAAA,EACA,MAAM,YAA8BC,+BAAA;AAAA;AAAA,IAEhC,ybAAA;AAAA,GACJ;AAAA,EACA,KAAK,OAAO,OAAA,KAAY,CAAC,GAAG,SAAS,MAAM,CAAA;AAAA,EAC3C,MAAA,EAAQ,OAAO,OAAY,KAAA,OAAA,CAAQ,OAAO,CAAC,CAAA,KAAM,MAAM,MAAM,CAAA;AACjE;;;;"}

View File

@@ -0,0 +1,19 @@
import { ExtensionType } from '../../../extensions/Extensions.mjs';
import { testImageFormat } from '../utils/testImageFormat.mjs';
"use strict";
const detectAvif = {
extension: {
type: ExtensionType.DetectionParser,
priority: 1
},
test: async () => testImageFormat(
// eslint-disable-next-line max-len
"data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="
),
add: async (formats) => [...formats, "avif"],
remove: async (formats) => formats.filter((f) => f !== "avif")
};
export { detectAvif };
//# sourceMappingURL=detectAvif.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"detectAvif.mjs","sources":["../../../../src/assets/detections/parsers/detectAvif.ts"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions';\nimport { testImageFormat } from '../utils/testImageFormat';\n\nimport type { FormatDetectionParser } from '../types';\n\n/**\n * Detects if the browser supports the AVIF image format.\n * @memberof assets\n */\nexport const detectAvif: FormatDetectionParser = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 1,\n },\n test: async (): Promise<boolean> => testImageFormat(\n // eslint-disable-next-line max-len\n 'data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A='\n ),\n add: async (formats) => [...formats, 'avif'],\n remove: async (formats) => formats.filter((f) => f !== 'avif'),\n};\n"],"names":[],"mappings":";;;;AASO,MAAM,UAAoC,GAAA;AAAA,EAC7C,SAAW,EAAA;AAAA,IACP,MAAM,aAAc,CAAA,eAAA;AAAA,IACpB,QAAU,EAAA,CAAA;AAAA,GACd;AAAA,EACA,MAAM,YAA8B,eAAA;AAAA;AAAA,IAEhC,ybAAA;AAAA,GACJ;AAAA,EACA,KAAK,OAAO,OAAA,KAAY,CAAC,GAAG,SAAS,MAAM,CAAA;AAAA,EAC3C,MAAA,EAAQ,OAAO,OAAY,KAAA,OAAA,CAAQ,OAAO,CAAC,CAAA,KAAM,MAAM,MAAM,CAAA;AACjE;;;;"}

View File

@@ -0,0 +1,6 @@
import type { FormatDetectionParser } from '../types';
/**
* Adds some default image formats to the detection parser
* @memberof assets
*/
export declare const detectDefaults: FormatDetectionParser;

View File

@@ -0,0 +1,18 @@
'use strict';
var Extensions = require('../../../extensions/Extensions.js');
"use strict";
const imageFormats = ["png", "jpg", "jpeg"];
const detectDefaults = {
extension: {
type: Extensions.ExtensionType.DetectionParser,
priority: -1
},
test: () => Promise.resolve(true),
add: async (formats) => [...formats, ...imageFormats],
remove: async (formats) => formats.filter((f) => !imageFormats.includes(f))
};
exports.detectDefaults = detectDefaults;
//# sourceMappingURL=detectDefaults.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"detectDefaults.js","sources":["../../../../src/assets/detections/parsers/detectDefaults.ts"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions';\n\nimport type { FormatDetectionParser } from '../types';\n\nconst imageFormats = ['png', 'jpg', 'jpeg'];\n\n/**\n * Adds some default image formats to the detection parser\n * @memberof assets\n */\nexport const detectDefaults = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: -1,\n },\n test: (): Promise<boolean> => Promise.resolve(true),\n add: async (formats) => [...formats, ...imageFormats],\n remove: async (formats) => formats.filter((f) => !imageFormats.includes(f)),\n} as FormatDetectionParser;\n"],"names":["ExtensionType"],"mappings":";;;;;AAIA,MAAM,YAAe,GAAA,CAAC,KAAO,EAAA,KAAA,EAAO,MAAM,CAAA,CAAA;AAMnC,MAAM,cAAiB,GAAA;AAAA,EAC1B,SAAW,EAAA;AAAA,IACP,MAAMA,wBAAc,CAAA,eAAA;AAAA,IACpB,QAAU,EAAA,CAAA,CAAA;AAAA,GACd;AAAA,EACA,IAAM,EAAA,MAAwB,OAAQ,CAAA,OAAA,CAAQ,IAAI,CAAA;AAAA,EAClD,KAAK,OAAO,OAAA,KAAY,CAAC,GAAG,OAAA,EAAS,GAAG,YAAY,CAAA;AAAA,EACpD,MAAA,EAAQ,OAAO,OAAA,KAAY,OAAQ,CAAA,MAAA,CAAO,CAAC,CAAA,KAAM,CAAC,YAAA,CAAa,QAAS,CAAA,CAAC,CAAC,CAAA;AAC9E;;;;"}

View File

@@ -0,0 +1,16 @@
import { ExtensionType } from '../../../extensions/Extensions.mjs';
"use strict";
const imageFormats = ["png", "jpg", "jpeg"];
const detectDefaults = {
extension: {
type: ExtensionType.DetectionParser,
priority: -1
},
test: () => Promise.resolve(true),
add: async (formats) => [...formats, ...imageFormats],
remove: async (formats) => formats.filter((f) => !imageFormats.includes(f))
};
export { detectDefaults };
//# sourceMappingURL=detectDefaults.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"detectDefaults.mjs","sources":["../../../../src/assets/detections/parsers/detectDefaults.ts"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions';\n\nimport type { FormatDetectionParser } from '../types';\n\nconst imageFormats = ['png', 'jpg', 'jpeg'];\n\n/**\n * Adds some default image formats to the detection parser\n * @memberof assets\n */\nexport const detectDefaults = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: -1,\n },\n test: (): Promise<boolean> => Promise.resolve(true),\n add: async (formats) => [...formats, ...imageFormats],\n remove: async (formats) => formats.filter((f) => !imageFormats.includes(f)),\n} as FormatDetectionParser;\n"],"names":[],"mappings":";;;AAIA,MAAM,YAAe,GAAA,CAAC,KAAO,EAAA,KAAA,EAAO,MAAM,CAAA,CAAA;AAMnC,MAAM,cAAiB,GAAA;AAAA,EAC1B,SAAW,EAAA;AAAA,IACP,MAAM,aAAc,CAAA,eAAA;AAAA,IACpB,QAAU,EAAA,CAAA,CAAA;AAAA,GACd;AAAA,EACA,IAAM,EAAA,MAAwB,OAAQ,CAAA,OAAA,CAAQ,IAAI,CAAA;AAAA,EAClD,KAAK,OAAO,OAAA,KAAY,CAAC,GAAG,OAAA,EAAS,GAAG,YAAY,CAAA;AAAA,EACpD,MAAA,EAAQ,OAAO,OAAA,KAAY,OAAQ,CAAA,MAAA,CAAO,CAAC,CAAA,KAAM,CAAC,YAAA,CAAa,QAAS,CAAA,CAAC,CAAC,CAAA;AAC9E;;;;"}

View File

@@ -0,0 +1,6 @@
import type { FormatDetectionParser } from '../types';
/**
* Detects if the browser supports the MP4 video format.
* @memberof assets
*/
export declare const detectMp4: FormatDetectionParser;

View File

@@ -0,0 +1,18 @@
'use strict';
var Extensions = require('../../../extensions/Extensions.js');
var testVideoFormat = require('../utils/testVideoFormat.js');
"use strict";
const detectMp4 = {
extension: {
type: Extensions.ExtensionType.DetectionParser,
priority: 0
},
test: async () => testVideoFormat.testVideoFormat("video/mp4"),
add: async (formats) => [...formats, "mp4", "m4v"],
remove: async (formats) => formats.filter((f) => f !== "mp4" && f !== "m4v")
};
exports.detectMp4 = detectMp4;
//# sourceMappingURL=detectMp4.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"detectMp4.js","sources":["../../../../src/assets/detections/parsers/detectMp4.ts"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions';\nimport { testVideoFormat } from '../utils/testVideoFormat';\n\nimport type { FormatDetectionParser } from '../types';\n\n/**\n * Detects if the browser supports the MP4 video format.\n * @memberof assets\n */\nexport const detectMp4 = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 0,\n },\n test: async (): Promise<boolean> => testVideoFormat('video/mp4'),\n add: async (formats) => [...formats, 'mp4', 'm4v'],\n remove: async (formats) => formats.filter((f) => f !== 'mp4' && f !== 'm4v'),\n} as FormatDetectionParser;\n"],"names":["ExtensionType","testVideoFormat"],"mappings":";;;;;;AASO,MAAM,SAAY,GAAA;AAAA,EACrB,SAAW,EAAA;AAAA,IACP,MAAMA,wBAAc,CAAA,eAAA;AAAA,IACpB,QAAU,EAAA,CAAA;AAAA,GACd;AAAA,EACA,IAAA,EAAM,YAA8BC,+BAAA,CAAgB,WAAW,CAAA;AAAA,EAC/D,KAAK,OAAO,OAAA,KAAY,CAAC,GAAG,OAAA,EAAS,OAAO,KAAK,CAAA;AAAA,EACjD,MAAA,EAAQ,OAAO,OAAA,KAAY,OAAQ,CAAA,MAAA,CAAO,CAAC,CAAM,KAAA,CAAA,KAAM,KAAS,IAAA,CAAA,KAAM,KAAK,CAAA;AAC/E;;;;"}

View File

@@ -0,0 +1,16 @@
import { ExtensionType } from '../../../extensions/Extensions.mjs';
import { testVideoFormat } from '../utils/testVideoFormat.mjs';
"use strict";
const detectMp4 = {
extension: {
type: ExtensionType.DetectionParser,
priority: 0
},
test: async () => testVideoFormat("video/mp4"),
add: async (formats) => [...formats, "mp4", "m4v"],
remove: async (formats) => formats.filter((f) => f !== "mp4" && f !== "m4v")
};
export { detectMp4 };
//# sourceMappingURL=detectMp4.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"detectMp4.mjs","sources":["../../../../src/assets/detections/parsers/detectMp4.ts"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions';\nimport { testVideoFormat } from '../utils/testVideoFormat';\n\nimport type { FormatDetectionParser } from '../types';\n\n/**\n * Detects if the browser supports the MP4 video format.\n * @memberof assets\n */\nexport const detectMp4 = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 0,\n },\n test: async (): Promise<boolean> => testVideoFormat('video/mp4'),\n add: async (formats) => [...formats, 'mp4', 'm4v'],\n remove: async (formats) => formats.filter((f) => f !== 'mp4' && f !== 'm4v'),\n} as FormatDetectionParser;\n"],"names":[],"mappings":";;;;AASO,MAAM,SAAY,GAAA;AAAA,EACrB,SAAW,EAAA;AAAA,IACP,MAAM,aAAc,CAAA,eAAA;AAAA,IACpB,QAAU,EAAA,CAAA;AAAA,GACd;AAAA,EACA,IAAA,EAAM,YAA8B,eAAA,CAAgB,WAAW,CAAA;AAAA,EAC/D,KAAK,OAAO,OAAA,KAAY,CAAC,GAAG,OAAA,EAAS,OAAO,KAAK,CAAA;AAAA,EACjD,MAAA,EAAQ,OAAO,OAAA,KAAY,OAAQ,CAAA,MAAA,CAAO,CAAC,CAAM,KAAA,CAAA,KAAM,KAAS,IAAA,CAAA,KAAM,KAAK,CAAA;AAC/E;;;;"}

View File

@@ -0,0 +1,6 @@
import type { FormatDetectionParser } from '../types';
/**
* Detects if the browser supports the OGV video format.
* @memberof assets
*/
export declare const detectOgv: FormatDetectionParser;

View File

@@ -0,0 +1,18 @@
'use strict';
var Extensions = require('../../../extensions/Extensions.js');
var testVideoFormat = require('../utils/testVideoFormat.js');
"use strict";
const detectOgv = {
extension: {
type: Extensions.ExtensionType.DetectionParser,
priority: 0
},
test: async () => testVideoFormat.testVideoFormat("video/ogg"),
add: async (formats) => [...formats, "ogv"],
remove: async (formats) => formats.filter((f) => f !== "ogv")
};
exports.detectOgv = detectOgv;
//# sourceMappingURL=detectOgv.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"detectOgv.js","sources":["../../../../src/assets/detections/parsers/detectOgv.ts"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions';\nimport { testVideoFormat } from '../utils/testVideoFormat';\n\nimport type { FormatDetectionParser } from '../types';\n\n/**\n * Detects if the browser supports the OGV video format.\n * @memberof assets\n */\nexport const detectOgv = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 0,\n },\n test: async (): Promise<boolean> => testVideoFormat('video/ogg'),\n add: async (formats) => [...formats, 'ogv'],\n remove: async (formats) => formats.filter((f) => f !== 'ogv'),\n} as FormatDetectionParser;\n"],"names":["ExtensionType","testVideoFormat"],"mappings":";;;;;;AASO,MAAM,SAAY,GAAA;AAAA,EACrB,SAAW,EAAA;AAAA,IACP,MAAMA,wBAAc,CAAA,eAAA;AAAA,IACpB,QAAU,EAAA,CAAA;AAAA,GACd;AAAA,EACA,IAAA,EAAM,YAA8BC,+BAAA,CAAgB,WAAW,CAAA;AAAA,EAC/D,KAAK,OAAO,OAAA,KAAY,CAAC,GAAG,SAAS,KAAK,CAAA;AAAA,EAC1C,MAAA,EAAQ,OAAO,OAAY,KAAA,OAAA,CAAQ,OAAO,CAAC,CAAA,KAAM,MAAM,KAAK,CAAA;AAChE;;;;"}

View File

@@ -0,0 +1,16 @@
import { ExtensionType } from '../../../extensions/Extensions.mjs';
import { testVideoFormat } from '../utils/testVideoFormat.mjs';
"use strict";
const detectOgv = {
extension: {
type: ExtensionType.DetectionParser,
priority: 0
},
test: async () => testVideoFormat("video/ogg"),
add: async (formats) => [...formats, "ogv"],
remove: async (formats) => formats.filter((f) => f !== "ogv")
};
export { detectOgv };
//# sourceMappingURL=detectOgv.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"detectOgv.mjs","sources":["../../../../src/assets/detections/parsers/detectOgv.ts"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions';\nimport { testVideoFormat } from '../utils/testVideoFormat';\n\nimport type { FormatDetectionParser } from '../types';\n\n/**\n * Detects if the browser supports the OGV video format.\n * @memberof assets\n */\nexport const detectOgv = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 0,\n },\n test: async (): Promise<boolean> => testVideoFormat('video/ogg'),\n add: async (formats) => [...formats, 'ogv'],\n remove: async (formats) => formats.filter((f) => f !== 'ogv'),\n} as FormatDetectionParser;\n"],"names":[],"mappings":";;;;AASO,MAAM,SAAY,GAAA;AAAA,EACrB,SAAW,EAAA;AAAA,IACP,MAAM,aAAc,CAAA,eAAA;AAAA,IACpB,QAAU,EAAA,CAAA;AAAA,GACd;AAAA,EACA,IAAA,EAAM,YAA8B,eAAA,CAAgB,WAAW,CAAA;AAAA,EAC/D,KAAK,OAAO,OAAA,KAAY,CAAC,GAAG,SAAS,KAAK,CAAA;AAAA,EAC1C,MAAA,EAAQ,OAAO,OAAY,KAAA,OAAA,CAAQ,OAAO,CAAC,CAAA,KAAM,MAAM,KAAK,CAAA;AAChE;;;;"}

View File

@@ -0,0 +1,6 @@
import type { FormatDetectionParser } from '../types';
/**
* Detects if the browser supports the WebM video format.
* @memberof assets
*/
export declare const detectWebm: FormatDetectionParser;

View File

@@ -0,0 +1,18 @@
'use strict';
var Extensions = require('../../../extensions/Extensions.js');
var testVideoFormat = require('../utils/testVideoFormat.js');
"use strict";
const detectWebm = {
extension: {
type: Extensions.ExtensionType.DetectionParser,
priority: 0
},
test: async () => testVideoFormat.testVideoFormat("video/webm"),
add: async (formats) => [...formats, "webm"],
remove: async (formats) => formats.filter((f) => f !== "webm")
};
exports.detectWebm = detectWebm;
//# sourceMappingURL=detectWebm.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"detectWebm.js","sources":["../../../../src/assets/detections/parsers/detectWebm.ts"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions';\nimport { testVideoFormat } from '../utils/testVideoFormat';\n\nimport type { FormatDetectionParser } from '../types';\n\n/**\n * Detects if the browser supports the WebM video format.\n * @memberof assets\n */\nexport const detectWebm = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 0,\n },\n test: async (): Promise<boolean> => testVideoFormat('video/webm'),\n add: async (formats) => [...formats, 'webm'],\n remove: async (formats) => formats.filter((f) => f !== 'webm'),\n} as FormatDetectionParser;\n"],"names":["ExtensionType","testVideoFormat"],"mappings":";;;;;;AASO,MAAM,UAAa,GAAA;AAAA,EACtB,SAAW,EAAA;AAAA,IACP,MAAMA,wBAAc,CAAA,eAAA;AAAA,IACpB,QAAU,EAAA,CAAA;AAAA,GACd;AAAA,EACA,IAAA,EAAM,YAA8BC,+BAAA,CAAgB,YAAY,CAAA;AAAA,EAChE,KAAK,OAAO,OAAA,KAAY,CAAC,GAAG,SAAS,MAAM,CAAA;AAAA,EAC3C,MAAA,EAAQ,OAAO,OAAY,KAAA,OAAA,CAAQ,OAAO,CAAC,CAAA,KAAM,MAAM,MAAM,CAAA;AACjE;;;;"}

View File

@@ -0,0 +1,16 @@
import { ExtensionType } from '../../../extensions/Extensions.mjs';
import { testVideoFormat } from '../utils/testVideoFormat.mjs';
"use strict";
const detectWebm = {
extension: {
type: ExtensionType.DetectionParser,
priority: 0
},
test: async () => testVideoFormat("video/webm"),
add: async (formats) => [...formats, "webm"],
remove: async (formats) => formats.filter((f) => f !== "webm")
};
export { detectWebm };
//# sourceMappingURL=detectWebm.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"detectWebm.mjs","sources":["../../../../src/assets/detections/parsers/detectWebm.ts"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions';\nimport { testVideoFormat } from '../utils/testVideoFormat';\n\nimport type { FormatDetectionParser } from '../types';\n\n/**\n * Detects if the browser supports the WebM video format.\n * @memberof assets\n */\nexport const detectWebm = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 0,\n },\n test: async (): Promise<boolean> => testVideoFormat('video/webm'),\n add: async (formats) => [...formats, 'webm'],\n remove: async (formats) => formats.filter((f) => f !== 'webm'),\n} as FormatDetectionParser;\n"],"names":[],"mappings":";;;;AASO,MAAM,UAAa,GAAA;AAAA,EACtB,SAAW,EAAA;AAAA,IACP,MAAM,aAAc,CAAA,eAAA;AAAA,IACpB,QAAU,EAAA,CAAA;AAAA,GACd;AAAA,EACA,IAAA,EAAM,YAA8B,eAAA,CAAgB,YAAY,CAAA;AAAA,EAChE,KAAK,OAAO,OAAA,KAAY,CAAC,GAAG,SAAS,MAAM,CAAA;AAAA,EAC3C,MAAA,EAAQ,OAAO,OAAY,KAAA,OAAA,CAAQ,OAAO,CAAC,CAAA,KAAM,MAAM,MAAM,CAAA;AACjE;;;;"}

View File

@@ -0,0 +1,6 @@
import type { FormatDetectionParser } from '../types';
/**
* Detects if the browser supports the WebP image format.
* @memberof assets
*/
export declare const detectWebp: FormatDetectionParser;

View File

@@ -0,0 +1,20 @@
'use strict';
var Extensions = require('../../../extensions/Extensions.js');
var testImageFormat = require('../utils/testImageFormat.js');
"use strict";
const detectWebp = {
extension: {
type: Extensions.ExtensionType.DetectionParser,
priority: 0
},
test: async () => testImageFormat.testImageFormat(
"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="
),
add: async (formats) => [...formats, "webp"],
remove: async (formats) => formats.filter((f) => f !== "webp")
};
exports.detectWebp = detectWebp;
//# sourceMappingURL=detectWebp.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"detectWebp.js","sources":["../../../../src/assets/detections/parsers/detectWebp.ts"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions';\nimport { testImageFormat } from '../utils/testImageFormat';\n\nimport type { FormatDetectionParser } from '../types';\n\n/**\n * Detects if the browser supports the WebP image format.\n * @memberof assets\n */\nexport const detectWebp = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 0,\n },\n test: async (): Promise<boolean> => testImageFormat(\n 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA='\n ),\n add: async (formats) => [...formats, 'webp'],\n remove: async (formats) => formats.filter((f) => f !== 'webp'),\n} as FormatDetectionParser;\n"],"names":["ExtensionType","testImageFormat"],"mappings":";;;;;;AASO,MAAM,UAAa,GAAA;AAAA,EACtB,SAAW,EAAA;AAAA,IACP,MAAMA,wBAAc,CAAA,eAAA;AAAA,IACpB,QAAU,EAAA,CAAA;AAAA,GACd;AAAA,EACA,MAAM,YAA8BC,+BAAA;AAAA,IAChC,6EAAA;AAAA,GACJ;AAAA,EACA,KAAK,OAAO,OAAA,KAAY,CAAC,GAAG,SAAS,MAAM,CAAA;AAAA,EAC3C,MAAA,EAAQ,OAAO,OAAY,KAAA,OAAA,CAAQ,OAAO,CAAC,CAAA,KAAM,MAAM,MAAM,CAAA;AACjE;;;;"}

View File

@@ -0,0 +1,18 @@
import { ExtensionType } from '../../../extensions/Extensions.mjs';
import { testImageFormat } from '../utils/testImageFormat.mjs';
"use strict";
const detectWebp = {
extension: {
type: ExtensionType.DetectionParser,
priority: 0
},
test: async () => testImageFormat(
"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="
),
add: async (formats) => [...formats, "webp"],
remove: async (formats) => formats.filter((f) => f !== "webp")
};
export { detectWebp };
//# sourceMappingURL=detectWebp.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"detectWebp.mjs","sources":["../../../../src/assets/detections/parsers/detectWebp.ts"],"sourcesContent":["import { ExtensionType } from '../../../extensions/Extensions';\nimport { testImageFormat } from '../utils/testImageFormat';\n\nimport type { FormatDetectionParser } from '../types';\n\n/**\n * Detects if the browser supports the WebP image format.\n * @memberof assets\n */\nexport const detectWebp = {\n extension: {\n type: ExtensionType.DetectionParser,\n priority: 0,\n },\n test: async (): Promise<boolean> => testImageFormat(\n 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA='\n ),\n add: async (formats) => [...formats, 'webp'],\n remove: async (formats) => formats.filter((f) => f !== 'webp'),\n} as FormatDetectionParser;\n"],"names":[],"mappings":";;;;AASO,MAAM,UAAa,GAAA;AAAA,EACtB,SAAW,EAAA;AAAA,IACP,MAAM,aAAc,CAAA,eAAA;AAAA,IACpB,QAAU,EAAA,CAAA;AAAA,GACd;AAAA,EACA,MAAM,YAA8B,eAAA;AAAA,IAChC,6EAAA;AAAA,GACJ;AAAA,EACA,KAAK,OAAO,OAAA,KAAY,CAAC,GAAG,SAAS,MAAM,CAAA;AAAA,EAC3C,MAAA,EAAQ,OAAO,OAAY,KAAA,OAAA,CAAQ,OAAO,CAAC,CAAA,KAAM,MAAM,MAAM,CAAA;AACjE;;;;"}