
    `                     h    d dl mZ d dlZd dlmZ ddlmZ  ej        d          Zed             ZdS )    )absolute_importN)UUID   )	validatorz4^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$c                     t          | t                    rdS 	 t                              |           S # t          $ r Y dS w xY w)a`  
    Return whether or not given value is a valid UUID.

    If the value is valid UUID this function returns ``True``, otherwise
    :class:`~validators.utils.ValidationFailure`.

    This validator is based on `WTForms UUID validator`_.

    .. _WTForms UUID validator:
       https://github.com/wtforms/wtforms/blob/master/wtforms/validators.py

    Examples::

        >>> uuid('2bc1c94f-0deb-43e9-92a1-4775189ec9f8')
        True

        >>> uuid('2bc1c94f 0deb-43e9-92a1-4775189ec9f8')
        ValidationFailure(func=uuid, ...)

    .. versionadded:: 0.2

    :param value: UUID value to validate
    TF)
isinstancer   patternmatch	TypeError)values    /lib/python3.11/site-packages/validators/uuid.pyuuidr      sT    2 % t}}U###   uus   3 
A A)	
__future__r   rer   r   utilsr   compiler	        r   <module>r      s{    & & & & & & 				            
"*L
M
M     r   