decord/source/13243_BestFitMatcher.js

34 lines
1.2 KiB
JavaScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 13243
// Function ID: 101989
2026-07-20 16:05:17 +00:00
// Name: BestFitMatcher
2026-07-27 11:26:19 +00:00
// Dependencies: [13239]
2026-07-20 16:05:17 +00:00
2026-07-27 11:26:19 +00:00
// Module 13243 (BestFitMatcher)
2026-07-23 10:11:24 +00:00
const require = arg1;
const dependencyMap = arg6;
2026-07-20 16:05:17 +00:00
arg5.BestFitMatcher = function BestFitMatcher(arg0, arr) {
const items = [];
const reduced = arr.reduce((arg0, str) => {
2026-07-23 10:11:24 +00:00
const replaced = str.replace(items(outer1_1[0]).UNICODE_EXTENSION_SEQUENCE_REGEX, "");
2026-07-20 16:05:17 +00:00
items.push(replaced);
arg0[replaced] = str;
return arg0;
}, {});
2026-07-27 11:26:19 +00:00
const findBestMatchResult = items(13239).findBestMatch(items, arg0);
2026-07-20 16:05:17 +00:00
let prop;
if (tmp3) {
const arr2 = reduced[findBestMatchResult.matchedDesiredLocale];
const tmp6 = reduced[findBestMatchResult.matchedDesiredLocale].slice(findBestMatchResult.matchedDesiredLocale.length) || undefined;
prop = findBestMatchResult.matchedSupportedLocale;
const tmp5 = reduced[findBestMatchResult.matchedDesiredLocale].slice(findBestMatchResult.matchedDesiredLocale.length) || undefined;
}
if (prop) {
let obj = { locale: prop, extension: tmp5 };
return obj;
} else {
obj = { locale: arg2() };
return obj;
}
2026-07-23 10:11:24 +00:00
tmp3 = findBestMatchResult.matchedSupportedLocale && findBestMatchResult.matchedDesiredLocale;
2026-07-20 16:05:17 +00:00
};