
    !ih                    <    d dl mZ d dlmZmZmZ ddZddZd	dZy)
    )annotations)FillTypeLineTypeZInterpc                    t        | t              r	 t        j                  |    S | S # t        $ r}t        d|  d      |d}~ww xY w)zCoerce a FillType or string value to a FillType.

    Args:
        fill_type (FillType or str): Value to convert.

    Return:
        FillType: Converted value.
    'z' is not a valid FillTypeN)
isinstancestrr   __members__KeyError
ValueError)	fill_typees     Q/var/www/html/dev/engine/venv/lib/python3.12/site-packages/contourpy/enum_util.pyas_fill_typer      X     )S!	N''	22   	Nq+DEFAM	N   ' 	AA  Ac                    t        | t              r	 t        j                  |    S | S # t        $ r}t        d|  d      |d}~ww xY w)zCoerce a LineType or string value to a LineType.

    Args:
        line_type (LineType or str): Value to convert.

    Return:
        LineType: Converted value.
    r   z' is not a valid LineTypeN)r	   r
   r   r   r   r   )	line_typer   s     r   as_line_typer      r   r   c                    t        | t              r	 t        j                  |    S | S # t        $ r}t        d|  d      |d}~ww xY w)zCoerce a ZInterp or string value to a ZInterp.

    Args:
        z_interp (ZInterp or str): Value to convert.

    Return:
        ZInterp: Converted value.
    r   z' is not a valid ZInterpN)r	   r
   r   r   r   r   )z_interpr   s     r   as_z_interpr   *   sW     (C 	L&&x00   	Lq
*BCD!K	Lr   N)r   zFillType | strreturnr   )r   zLineType | strr   r   )r   zZInterp | strr   r   )	
__future__r   contourpy._contourpyr   r   r   r   r   r        r   <module>r      s    " < <$$r   