from __future__ import annotations

# These imports preserve the historical module-level compatibility surface.
import copy
import json
from datetime import datetime, time as dt_time, timedelta, timezone
from statistics import median
from typing import TYPE_CHECKING, Any, Callable

from backend.data.numbers import non_nan_number as _number
from backend.data.providers.ifind_client import IfindError, IfindHttpClient
from backend.data.providers.tushare_client import TushareClient, TushareError
from backend.features.market.insights_auction import (
    MarketAuctionInsightsMixin as _MarketAuctionInsightsMixin,
)
from backend.features.market.insights_auction_data import (
    MarketAuctionDataMixin as _MarketAuctionDataMixin,
)
from backend.features.market.insights_auction_scoring import (
    MarketAuctionScoringMixin as _MarketAuctionScoringMixin,
)
from backend.features.market.insights_context import (
    CHINA_TIMEZONE,
    MarketInsightsContextMixin as _MarketInsightsContextMixin,
    _display_date,
)
from backend.features.market.insights_popularity import (
    MarketPopularityInsightsMixin as _MarketPopularityInsightsMixin,
)
from backend.features.market.insights_themes import (
    MarketThemeInsightsMixin as _MarketThemeInsightsMixin,
)


class MarketInsightsService(
    _MarketInsightsContextMixin,
    _MarketAuctionScoringMixin,
    _MarketAuctionDataMixin,
    _MarketAuctionInsightsMixin,
    _MarketThemeInsightsMixin,
    _MarketPopularityInsightsMixin,
):
    """Read-only market features backed by Tushare and shared SQLite caches."""

    pass
