
    @6i                     Z    d Z ddlmZ ddlmZ ddlmZ defdZdefdZedefd       Zy	)
zURI.   )email)url)	validatorvaluec                 (    | j                  d      syy)Nzfile:///FT
startswithr   s    Q/home/azureuser/techstart-app/venv/lib/python3.12/site-packages/validators/uri.py	_file_urlr      s    J'    c                 (    | j                  d      syy)Nzipfs://FTr   r
   s    r   	_ipfs_urlr      s    I&r   c                     syt         fddD              rt               S  j                  d      rt         t	        d      d       S  j                  d      rt               S  j                  d      rt               S  j                  d      ry	 j                  d
      ry	 j                  d      ry	 j                  d      ry	 j                  d      ry	y)a  Return whether or not given value is a valid URI.

    Examples:
        >>> uri('mailto:example@domain.com')
        True
        >>> uri('file:path.txt')
        ValidationError(func=uri, args={'value': 'file:path.txt'})

    Args:
        value:
            URI to validate.

    Returns:
        (Literal[True]): If `value` is a valid URI.
        (ValidationError): If `value` is an invalid URI.
    Fc              3   @   K   | ]  }j                  |        y w)Nr   ).0itemr   s     r   	<genexpr>zuri.<locals>.<genexpr>0   s&        	s   >   ftpgitircsshftpshttprtmprtspsftphttpsrtmpstelnetzmailto:Nzfile:zipfs:zmagnet:?Tztel:zdata:zurn:zurc:)anyr   r	   r   lenr   r   r
   s   `r   urir#      s    $ 
  
 & 5z 	"U3y>+,--     
#     r   N)	__doc__r   r   utilsr   strr   r   r#    r   r   <module>r(      sI    
   S S  Ls L Lr   