decord/source/modules/main_tabs_v2/UserSearchUtils.tsx

56 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 6903
// Function ID: 55029
2026-07-20 16:05:17 +00:00
// Name: cleanString
2026-07-24 07:16:23 +00:00
// Dependencies: [6904, 1917, 3767, 653, 1832, 3969, 2]
2026-07-20 16:05:17 +00:00
// Exports: getNames, getRelationshipType
2026-07-24 07:16:23 +00:00
// Module 6903 (cleanString)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_4 from "_isNativeReflectConstruct";
import closure_5 from "_isNativeReflectConstruct";
import { RelationshipTypes } from "ME";
const require = arg1;
2026-07-20 16:05:17 +00:00
function cleanString(globalName) {
2026-07-23 10:11:24 +00:00
const obj = require(1832) /* isNullOrEmpty */;
return require(1832) /* isNullOrEmpty */.stripDiacritics(globalName.toLocaleLowerCase()).trim();
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const result = require("_isNativeReflectConstruct").fileFinishedImporting("modules/main_tabs_v2/UserSearchUtils.tsx");
2026-07-20 16:05:17 +00:00
export { cleanString };
export const getRelationshipType = function getRelationshipType(id) {
const relationshipType = store.getRelationshipType(id);
let SUGGESTION = relationshipType;
if (relationshipType === RelationshipTypes.NONE) {
SUGGESTION = relationshipType;
if (null != suggestion.getSuggestion(id)) {
SUGGESTION = RelationshipTypes.SUGGESTION;
}
}
return SUGGESTION;
};
export const getNames = function getNames(user) {
const names = {};
const nick = store.getNickname(user.id);
if (null != nick) {
names[nick] = cleanString(nick).split(" ");
2026-07-23 10:11:24 +00:00
let str = cleanString(nick);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const globalName = importDefault(3969).getGlobalName(user);
2026-07-20 16:05:17 +00:00
if (tmp4) {
names[globalName] = cleanString(globalName).split(" ");
const str3 = cleanString(globalName);
}
2026-07-23 10:11:24 +00:00
const obj2 = importDefault(3969);
tmp4 = null != globalName && null == names[globalName];
2026-07-20 16:05:17 +00:00
names[user.username] = cleanString(user.username).split(" ");
2026-07-23 10:11:24 +00:00
nicknames = nicknames.getNicknames(user.id);
2026-07-20 16:05:17 +00:00
const item = nicknames.forEach((arg0) => {
if (null == names[arg0]) {
2026-07-23 10:11:24 +00:00
names[arg0] = outer1_7(arg0).split(" ");
const str = outer1_7(arg0);
2026-07-20 16:05:17 +00:00
}
});
return { names, nick };
};