o
    gl	                     @   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   T/var/www/html/api-tag/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
    ii 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]?)?%ii@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$   

