RenderableType): Any renderable or string.
            options (Optional[ConsoleOptions], optional): Options to use when measuring, or None
                to use default options. Defaults to None.

        Returns:
            Measurement: A measurement of the renderable.
        """
        measurement = Measurement.get(self, options or self.options, renderable)
        return measurement

    def render(
        self, renderable: RenderableType, options: Optional[ConsoleOptions] = None
    ) -> Iterable[Segment]:
        """Render an object in to an iterable of `Segment` instances.

        This method contains the logic for rendering objects with the console protocol.
        You are unlikely to need to use it directly, unless you are extending the library.

        Args:
            renderable (RenderableType): An object supporting the console protocol, or
                an object that may be converted to a string.
            options (ConsoleOptions, optional): An options object, or None to use self.options. Defaults to None.

        Returns:
            Iterable[Segment]: An iterable of segments that may be rendered.
        """

        _options = options or self.options
        if _options.max_width < 1:
            # No space to render anything. This prevents potential recursion errors.
            return
        render_iterable: RenderResult

        renderable = rich_cast(renderable)
        if hasattr(renderable, "__rich_console__") and not isclass(renderable):
            render_iterable = renderable.__rich_console__(self, _options)  # type: ignore[union-attr]
        elif isinstance(renderable, str):
            text_renderable = self.render_str(
                renderable, highlight=_options.highlight, markup=_options.markup
            )
            render_iterable = text_renderable.__rich_console__(self, _options)
        else:
            raise errors.NotRenderableError(
                f"Unable to render {renderable!r}; "
                "A str, Segment or object with __rich_console__ methodvar WSB;(function(n){class t{constructor(t){this.target=t;n.Host.bindBootstrapDone(()=>{n.Host.bindKeyDown((i,r)=>{t.hasFocus()&&(i=n.getRtlAdjustedKey(i),i===37?(this.moveFocus("left",i),sj_pd(r)):i===39?(this.moveFocus("right",i),sj_pd(r)):i===38?this.moveFocus("up",i):i===40&&this.moveFocus("down",i))})})}ensureInit(){if(!this.getWinJS())if(typeof _w.WinJS_Init=="function")SearchAppWinJS.initXYFocus(_w);else{const n="WinJS_Init has not been initialized";SharedLogHelper.LogError("MsbPreviewPaneViewModel.checkAndInitWinJS",undefined,n);_w.bfbWsbTel&&bfbWsbTel.logError("Wsb Preview Pane XYFocus Not Ready",n)}}moveFocus(n,t){if(this.target.hasFocus()){let u=!1;const i=this.getXYFocus();let r=null;i&&(r=i.findNextFocusElement(n),r&&(u=i._xyFocus(n,t)));const f=t===37&&!u;this.target.onAfterMoveFocus(f,r)}}getWinJS(){return _w.WinJS}getXYFocus(){const n=this.getWinJS();return n&&n.UI&&n.UI.XYFocus}}n.XyFocusKeyNavManager=t})(WSB||(WSB={}))