stateNumericHex(str, offset) {
        const startIdx = offset;
        while (offset < str.length) {
            const char = str.charCodeAt(offset);
            if (isNumber$2(char) || isHexadecimalCharacter(char)) {
                offset += 1;
            }
            else {
                this.addToNumericResult(str, startIdx, offset, 16);
                return this.emitNumericEntity(char, 3);
            }
        }
        this.addToNumericResult(str, startIdx, offset, 16);
        return -1;
    }
Parses a hexadecimal numeric entity.

Equivalent to the `Hexademical character reference state` in the HTML spec.

@param str The string containing the entity (or a continuation of the entity).
@param offset The current offset.
@returns The number of characters that were consumed, or -1 if the entity is incomplete.