§
    VfºdÁ  ã                   ó<   — d Z ddlZddlmZ ddlmZ dZd„ Zdd„ZdS )	zj
Provides a function to open the system browser to either search or go directly
to a function's reference
é    N)Ú	urlencode)Ú__version__zhttps://www.statsmodels.org/c                 ój  — t           }|r|dz  }n|dz  }| €|S t          | t          ¦  «        r|dz  }|t          d| i¦  «        z  }|dz  }nf	 | } | j        }| j        }|                     d¦  «        st          d¦  «        ‚|d	z  }||d
z   |z   dz   z  }n# t          $ r t          d¦  «        ‚w xY w|S )zw
    Parse inputs and return a correctly formatted URL or raises ValueError
    if the input is not understandable
    zstable/zdevel/Nzsearch.html?Úqz &check_keywords=yes&area=defaultzstatsmodels.z!Function must be from statsmodelsz
generated/ú.z.htmlzInput not understood)	ÚBASE_URLÚ
isinstanceÚstrr   Ú__name__Ú
__module__Ú
startswithÚ
ValueErrorÚAttributeError)ÚfuncÚstableÚurlÚ	func_nameÚfunc_modules        ú5lib/python3.11/site-packages/statsmodels/tools/web.pyÚ_generate_urlr      s  € õ
 €CØð ØˆyÑˆˆàˆx‰ˆà€|Øˆ
Ý	D#Ñ	Ô	ð 5Øˆ~ÑˆØy˜#˜t˜Ñ%Ô%Ñ%ˆØÐ1Ñ1ˆˆð		5ØˆDØœˆIØœ/ˆKØ×)Ò)¨.Ñ9Ô9ð FÝ Ð!DÑEÔEÐEØ<ÑˆCØ; Ñ$ yÑ0°7Ñ:Ñ:ˆCˆCøÝð 	5ð 	5ð 	5ÝÐ3Ñ4Ô4Ð4ð	5øøøà€Js   ÁAB ÂB0c                 ór   — dt           vrt           n|}t          | |¦  «        }t          j        |¦  «         dS )ay  
    Opens a browser and displays online documentation

    Parameters
    ----------
    func : {str, callable}
        Either a string to search the documentation or a function
    stable : bool
        Flag indicating whether to use the stable documentation (True) or
        the development documentation (False).  If not provided, opens
        the stable documentation if the current version of statsmodels is a
        release

    Examples
    --------
    >>> import statsmodels.api as sm

    Documentation site

    >>> sm.webdoc()

    Search for glm in docs

    >>> sm.webdoc('glm')

    Go to current generated help for OLS

    >>> sm.webdoc(sm.OLS, stable=False)

    Notes
    -----
    By default, open stable documentation if the current version of
    statsmodels is a release.  Otherwise opens the development documentation.

    Uses the default system browser.
    ÚdevN)r   r   Ú
webbrowserÚopen)r   r   Úurl_or_errors      r   Úwebdocr   ,   s<   € ðJ "­Ð4Ð4[ˆ[¸&€FÝ   vÑ.Ô.€LÝ„OLÑ!Ô!Ð!Øˆ4ó    )NN)	Ú__doc__r   Úurllib.parser   Ústatsmodelsr   r   r   r   © r   r   ú<module>r"      ss   ððð ð Ð Ð Ð Ø "Ð "Ð "Ð "Ð "Ð "à #Ð #Ð #Ð #Ð #Ð #à)€ðð ð ð>(ð (ð (ð (ð (ð (r   