o
    ðäjl	  ã                   @   s  d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	m
Z
mZmZ ddlmZ G dd	„ d	eƒZG d
d„ deƒZG dd„ de	ƒZe
ZG dd„ de	ƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZddd„ZdS ) z
Excel specific descriptors
é    )ÚREL_NS)Úsafe_string)ÚElementé   )ÚMatchPatternÚMinMaxÚIntegerÚStringÚSequence)ÚSerialisablec                   @   ó   e Zd ZdZdS )Ú	HexBinaryz[0-9a-fA-F]+$N©Ú__name__Ú
__module__Ú__qualname__Úpattern© r   r   ú^/var/www/ticemtrilhas/avaliacao_env/lib/python3.10/site-packages/openpyxl/descriptors/excel.pyr      ó    r   c                   @   r   )ÚUniversalMeasurez$[0-9]+(\.[0-9]+)?(mm|cm|in|pt|pc|pi)Nr   r   r   r   r   r      r   r   c                   @   s   e Zd ZdZeZdZdZdS )Ú	TextPointzt
    Size in hundredths of points.
    In theory other units of measurement can be used but these are unbounded
    i€åùÿi€ N)r   r   r   Ú__doc__ÚintÚexpected_typeÚminÚmaxr   r   r   r   r      s
    r   c                       s(   e Zd ZdZdZdZ‡ fdd„Z‡  ZS )Ú
Percentagez&((100)|([0-9][0-9]?))(\.[0-9][0-9]?)?%iÀ½ðÿi@B c                    s@   t |tƒrd|v r| dd¡}tt|ƒd ƒ}tƒ  ||¡ d S )Nú%Ú iè  )Ú
isinstanceÚstrÚreplacer   ÚfloatÚsuperÚ__set__©ÚselfÚinstanceÚvalue©Ú	__class__r   r   r%   3   s   zPercentage.__set__)r   r   r   r   r   r   r%   Ú__classcell__r   r   r*   r   r   -   s
    r   c                   @   s   e Zd Zeƒ Z	ddd„ZdS )Ú	ExtensionNc                 C   ó
   || _ d S ©N)Úuri)r'   r0   r   r   r   Ú__init__>   ó   
zExtension.__init__r/   )r   r   r   r	   r0   r1   r   r   r   r   r-   :   s    ÿr-   c                   @   s"   e Zd Zeed�Z	ddd„ZdS )ÚExtensionList)r   r   c                 C   r.   r/   )Úext)r'   r4   r   r   r   r1   H   r2   zExtensionList.__init__N)r   )r   r   r   r
   r-   r4   r1   r   r   r   r   r3   D   s    
ÿr3   c                   @   s   e Zd ZeZdZdS )ÚRelationTN)r   r   r   r   Ú	namespaceÚ
allow_noner   r   r   r   r5   N   s    r5   c                   @   r   )ÚBase64BinaryzP^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$Nr   r   r   r   r   r8   T   r   r8   c                   @   r   )ÚGuidz?{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\}Nr   r   r   r   r   r9   Y   r   r9   c                       s$   e Zd ZdZdZ‡ fdd„Z‡  ZS )Ú	CellRangez]^[$]?([A-Za-z]{1,3})[$]?(\d+)(:[$]?([A-Za-z]{1,3})[$]?(\d+)?)?$|^[A-Za-z]{1,3}:[A-Za-z]{1,3}$Tc                    s"   |d ur|  ¡ }tƒ  ||¡ d S r/   )Úupperr$   r%   r&   r*   r   r   r%   c   s   zCellRange.__set__)r   r   r   r   r7   r%   r,   r   r   r*   r   r:   ^   s    r:   Nc                 C   s$   |dur
d|| f } t | t|ƒd�S )z?
    Override serialisation because explicit none required
    Nz{%s}%s)Úval)r   r   )Útagnamer)   r6   r   r   r   Ú_explicit_nonej   s   r>   r/   )r   Úopenpyxl.xml.constantsr   Úopenpyxl.compatr   Úopenpyxl.xml.functionsr   r   r   r   r   r	   r
   Úserialisabler   r   r   r   Ú
Coordinater   r-   r3   r5   r8   r9   r:   r>   r   r   r   r   Ú<module>   s$   

