
    Mwgl	                     <   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	e      Z G d
 de      Z G d de	      Ze
Z G d de	      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      ZddZy)z
Excel specific descriptors
    )REL_NS)safe_string)Element   )MatchPatternMinMaxIntegerStringSequence)Serialisablec                       e Zd ZdZy)	HexBinaryz[0-9a-fA-F]+$N__name__
__module____qualname__pattern     Q/var/www/horilla/myenv/lib/python3.12/site-packages/openpyxl/descriptors/excel.pyr   r      s    Gr   r   c                       e Zd ZdZy)UniversalMeasurez$[0-9]+(\.[0-9]+)?(mm|cm|in|pt|pc|pi)Nr   r   r   r   r   r      s    5Gr   r   c                       e Zd ZdZeZdZdZy)	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     M
C
Cr   r   c                   *     e Zd ZdZdZdZ fdZ xZS )
Percentagez&((100)|([0-9][0-9]?))(\.[0-9][0-9]?)?%ii@B c                     t        |t              r-d|v r)|j                  dd      }t        t	        |      dz        }t
        |   ||       y )N% i  )
isinstancestrreplacer   floatsuper__set__selfinstancevalue	__class__s      r   r*   zPercentage.__set__3   sD    eS!cUlMM#r*Eet+,E%(r   )r   r   r   r   r   r   r*   __classcell__r/   s   @r   r!   r!   -   s    7G
C
C) )r   r!   c                   $    e Zd Z e       Z	 ddZy)	ExtensionNc                     || _         y N)uri)r,   r6   s     r   __init__zExtension.__init__>        r   r5   )r   r   r   r
   r6   r7   r   r   r   r3   r3   :   s    
(C r   r3   c                   (    e Zd Z ee      Z	 ddZy)ExtensionList)r   c                     || _         y r5   )ext)r,   r<   s     r   r7   zExtensionList.__init__H   r8   r   N)r   )r   r   r   r   r3   r<   r7   r   r   r   r:   r:   D   s    

+C r   r:   c                       e Zd ZeZdZy)RelationTN)r   r   r   r   	namespace
allow_noner   r   r   r>   r>   N   s    IJr   r>   c                       e Zd ZdZy)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   rB   rB   T   s    `Gr   rB   c                       e Zd ZdZy)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   rD   rD   Y   s    PGr   rD   c                   &     e Zd ZdZdZ fdZ x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                 J    ||j                         }t        | 	  ||       y r5   )upperr)   r*   r+   s      r   r*   zCellRange.__set__c   s"    KKME%(r   )r   r   r   r   r@   r*   r0   r1   s   @r   rF   rF   ^   s    nGJ) )r   rF   Nc                 B    |d|d| } t        | t        |            S )z?
    Override serialisation because explicit none required
    {})val)r   r   )tagnamer.   r?   s      r   _explicit_nonerN   j   s&     '17E 233r   r5   )r   openpyxl.xml.constantsr   openpyxl.compatr   openpyxl.xml.functionsr   r$   r   r   r	   r
   r   serialisabler   r   r   r   
Coordinater!   r3   r:   r>   rB   rD   rF   rN   r   r   r   <module>rT      s    * ' *  ' 
6| 6
  

) 
) L v a< a
Q< Q
	) 	)4r   