/** * Sanitizes an HTML string by removing any tags that do not match the provided whitelist regular expressions. * If the input is not a string or the whitelist is not an array, the input string is returned as is. * * @param htmlString - The HTML string to sanitize. * @param whitelistRegExes - An array of regular expressions representing the whitelist of allowed tags. * @returns The sanitized HTML string. */ export declare function sanitizeHtml(htmlString: string, whitelistRegExes: RegExp[]): string; /** * Debounces a function, ensuring it is only executed after a specified wait time has passed since the last invocation. * @param func The function to debounce. * @param wait The wait time in milliseconds. * @returns A debounced version of the function. */ export declare function debounce any>(func: T, wait: number): (this: any, ...args: Parameters) => void; /** * Checks if an element is scrollable. * @param ele - The HTML element to check. * @returns True if the element is scrollable, false otherwise. */ export declare function isScrollable(ele: HTMLElement): boolean; /** * Returns the closest scrollable ancestor of the given element. * If no scrollable ancestor is found, the document element is returned as the default fallback. * @param ele - The element for which to find the closest scrollable ancestor. * @returns The closest scrollable ancestor element or the document element if none is found. */ export declare function getClosestScrollableAncestor(ele: HTMLElement | null): HTMLElement; /** * Checks if an element is visible within its scrollable ancestor. * * @param element - The element to check visibility for. * @returns A boolean indicating whether the element is visible. */ export declare function isElementVisibleWithScrollableAncestor(element: HTMLElement): boolean; /** * Detects if the device is mobile. * @returns {boolean} True if the device is mobile, otherwise false. */ export declare function isMobileDevice(): boolean; export declare const decodeHTML: (input: string) => string; /** * Process subtitle content to escape dangerous HTML while preserving mention formatting * @param subtitle The subtitle string that may contain HTML and mentions * @returns Processed string with dangerous HTML escaped but mentions preserved */ export declare function processSubtitleContent(subtitle: string): string; //# sourceMappingURL=util.d.ts.map