def __init__(self, router_data: dict | None = None):
        """Initialize the PageData object based on router_data.

        Args:
            router_data: the router_data dict.
        """
        if router_data:
            object.__setattr__(
                self,
                "host",
                router_data.get(constants.RouteVar.HEADERS, {}).get("origin", ""),
            )
            object.__setattr__(
                self, "path", router_data.get(constants.RouteVar.PATH, "")
            )
            object.__setattr__(
                self, "raw_path", router_data.get(constants.RouteVar.ORIGIN, "")
            )
            object.__setattr__(self, "full_path", f"{self.host}{self.path}")
            object.__setattr__(self, "full_raw_path", f"{self.host}{self.raw_path}")
            object.__setattr__(
                self, "params", router_data.get(constants.RouteVar.QUERY, {})
            )
        else:
            object.__setattr__(self, "host", "")
            object.__setattr__(self, "path", "")
            object.__setattr__(self, "raw_path", "")
            object.__setattr__(self, "full_path", "")
            object.__setattr__(self, "full_raw_path", "")
            object.__setattr__(self, "params", {})
Initialize the PageData object based on router_data.

        Args:
            router_data: the router_data dict.
        
reflex/istate/data.py