2026-08-24 06:08:38 +00:00
|
|
|
// Module ID: 7637
|
|
|
|
|
// Function ID: 7638
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: queryGamesAutocomplete
|
2026-08-24 06:08:38 +00:00
|
|
|
// Dependencies: [6937, 636, 7638, 6938, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: queryGamesAutocomplete
|
|
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
// Module 7637 (queryGamesAutocomplete)
|
|
|
|
|
import GAME_AUTOCOMPLETE_MAX_QUERY_LENGTH from "GAME_AUTOCOMPLETE_MAX_QUERY_LENGTH" /* 6938 */;
|
|
|
|
|
import fetchStore from "fetchStore" /* 7638 */;
|
|
|
|
|
import closure_2 from "set" /* 6937 */;
|
|
|
|
|
import importDefaultResult from "debounce" /* 636 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
require = arg1;
|
|
|
|
|
let closure_3 = importDefaultResult((arg0) => {
|
|
|
|
|
const useGameAutocomplete = fetchStore.useGameAutocomplete;
|
2026-07-20 16:05:17 +00:00
|
|
|
const items = [arg0];
|
|
|
|
|
const many = useGameAutocomplete.fetchMany(items);
|
2026-08-24 06:08:38 +00:00
|
|
|
}, require("fetchStore").GAME_AUTOCOMPLETE_DEBOUNCE_MS, { leading: true, maxWait: require("fetchStore").GAME_AUTOCOMPLETE_DEBOUNCE_MAX_WAIT_MS });
|
|
|
|
|
const obj = { leading: true, maxWait: require("fetchStore").GAME_AUTOCOMPLETE_DEBOUNCE_MAX_WAIT_MS };
|
|
|
|
|
let result = require("set").fileFinishedImporting("modules/games/autocomplete/queryGamesAutocomplete.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-24 07:16:23 +00:00
|
|
|
export const queryGamesAutocomplete = function queryGamesAutocomplete(query) {
|
2026-08-24 06:08:38 +00:00
|
|
|
const result = GAME_AUTOCOMPLETE_MAX_QUERY_LENGTH.normalizeGameAutocompleteQuery(query);
|
2026-07-20 16:05:17 +00:00
|
|
|
let found = null;
|
|
|
|
|
if (null != result) {
|
|
|
|
|
callback(result);
|
2026-07-23 10:11:24 +00:00
|
|
|
closestResults = closestResults.getClosestResults(result);
|
2026-07-29 08:29:29 +00:00
|
|
|
if (closestResults == null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
closestResults = [];
|
|
|
|
|
}
|
2026-08-24 06:08:38 +00:00
|
|
|
found = closestResults.filter(GAME_AUTOCOMPLETE_MAX_QUERY_LENGTH.isGameAutocompleteResultAllowedInGameWidgets);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return found;
|
|
|
|
|
};
|