a
    ţd˘  ă                   @   s`   d dl mZ d dlmZ d dlmZ edddZedddZedd	d
Z	e
dddZdS )é    )Ú
ModuleType)ÚVersion)Úversion)Úreturnc                  C   s   d} z:t d}t|t| k r2td|  d| dd l}|W S  ty } z:td|  d|  d|  d	|  d
|jd  
|W Y d }~n
d }~0 0 d S )Nz1.4.0Ú
vegafusionz'The vegafusion package must be version ú or greater. Found version r   zVThe "vegafusion" data transformer and chart.transformed_data feature requires
version z or greater of the 'vegafusion-python-embed' and 'vegafusion' packages.
These can be installed with pip using:
    pip install "vegafusion[embed]>=zR"
Or with conda using:
    conda install -c conda-forge "vegafusion-python-embed>=z" "vegafusion>=ú"

ImportError: )Úimportlib_versionr   ÚImportErrorr   Úargs)Úmin_versionr   ZvfÚerrŠ r   ú`/var/www/html/stable-diffusion-webui/venv/lib/python3.9/site-packages/altair/utils/_importers.pyÚimport_vegafusion   s6    ˙˙˙ýűúů˙	÷r   c                  C   s   d} z:t d}t|t| k r2td|  d| dd l}|W S  ty } z4td|  d|  d|  d	|jd  |W Y d }~n
d }~0 0 d S )
Nz0.13.0zvl-convert-pythonz.The vl-convert-python package must be version r   r   zLThe vl-convert Vega-Lite compiler and image export feature requires
version zz or greater of the 'vl-convert-python' package. 
This can be installed with pip using:
   pip install "vl-convert-python>=z@"
or conda:
   conda install -c conda-forge "vl-convert-python>=r   )r	   r   r
   Z
vl_convertr   )r   r   Zvlcr   r   r   r   Úimport_vl_convert   s2    ˙˙˙ýűú˙řr   c                  C   s   d} z>t d}t|t| k r2td|  d| dd lm} |W S  ty } z4td|  d|  d|  d	|jd  |W Y d }~n
d }~0 0 d S )
Nz11.0.0Zpyarrowz$The pyarrow package must be version r   r   z=Usage of the DataFrame Interchange Protocol requires
version zd or greater of the pyarrow package. 
This can be installed with pip using:
   pip install "pyarrow>=z6"
or conda:
   conda install -c conda-forge "pyarrow>=r   )r	   r   r
   Zpyarrow.interchangeZinterchanger   )r   r   Úpir   r   r   r   Úimport_pyarrow_interchange7   s2    ˙˙˙ýűú˙řr   c                   C   s&   zt   W dS  ty    Y dS 0 d S )NTF)r   r
   r   r   r   r   Úpyarrow_availableP   s
    r   N)Útypesr   Zpackaging.versionr   Úimportlib.metadatar   r	   r   r   r   Úboolr   r   r   r   r   Ú<module>   s   