a
    [Xh_                  
   @   s  d Z ddlZddlmZmZm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mZ dd
lmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8 i Z9G dd deZ:dd Z;dd Z<dd Z=e<de<de<de<de<de<ddd Z>e<de=ddddd d!d"d# Z?e<d$e=d%d&d'd d!d(d) Z@e<d*d+d, ZAe<d-e<d.e<d/e<d0e<d1e<d2e=d3d4d5d6d7 ZBe<d8e=d9d:d;d<d3d d!d=d> ZCe<d?e=d9d:d;d<d3d@d d!dAdB ZDe<dCdDdE ZEe<dFe=dGd4d5dHdIdJ ZFdKdL ZGe<dMe=dNdOdP ZHe<dQe=dRdSdT ZIe<dUe=dVdWdX ZJe<dYe=dZd[d\d] ZKe<d^e=d_d`dadbdcd&ddde ZLe<dfe=d5dgdhdidjdkdldmdn ZMe<doe=dpdqdr ZNe<dse=dtdudvdwdx ZOe<dye=dzd{d|d} ZPd~d ZQe<de=ddddd ZRe<de=dddddddd ZSdd ZTe<de<de=dddd ZUe<de=dddddd ZVe<de<de=dddd ZWe<de=ddd ZXe<de=ddd ZYe<de=dddd ZZe<de=dddd Z[e<de=dddd Z\e<de=ddddd Z]e<de=ddddÄ Z^dS )zValidate properties expanders.    N)DimensionToken
IdentTokenNumberToken)parse_color   )INITIAL_VALUES   expand_font_variant)InvalidValuesPendingcheck_var_functionget_keywordget_single_keywordsplit_on_comma)&background_attachmentbackground_imagebackground_positionbackground_repeatbackground_sizeblock_ellipsisborder_image_sourceborder_image_sliceborder_image_widthborder_image_outsetborder_image_repeatborder_styleborder_widthboxcolumn_countcolumn_width
flex_basisflex_directionflex_grow_shrink	flex_wrapfont_family	font_sizefont_stretch
font_stylefont_variant_capsfont_weightgap	grid_linegrid_templateline_heightlist_style_imagelist_style_positionlist_style_typemask_border_modeother_colorsoverflow_wraptext_decoration_thicknessvalidate_non_shorthandc                       s(   e Zd ZdZ fddZdd Z  ZS )PendingExpanderz>Expander with validation done when defining calculated values.c                    s   t  ||jd  || _d S )Nname)super__init__keywords	validator)selftokensr<   	__class__ h/var/www/viveiro_mudafortebrasil/venv/lib/python3.9/site-packages/weasyprint/css/validation/expanders.pyr:      s    zPendingExpander.__init__c                 C   sJ   |  |D ]6\}}|dr0| j jd  | }||kr
|  S q
td S )N-r8   )r<   
startswithr;   KeyError)r=   r>   Z
wanted_keykeyvaluerA   rA   rB   validate!   s    

zPendingExpander.validate)__name__
__module____qualname____doc__r:   rH   __classcell__rA   rA   r?   rB   r7      s   r7   c                    s6   | D ],}t |rt| |  fdd|D   S qdS )z5Return pending expanders when var is found in tokens.c                    s   i | ]
}| qS rA   rA   .0r8   pendingrA   rB   
<dictcomp>0       z_find_var.<locals>.<dictcomp>N)r   r7   )r>   expanderexpanded_namestokenrA   rP   rB   	_find_var*   s    
rW   c                    s    fdd}|S )z1Decorator adding a function to the ``EXPANDERS``.c                    s    t vsJ  | t  < | S )z&Add ``function`` to the ``EXPANDERS``.)	EXPANDERS)functionproperty_namerA   rB   expander_decorator5   s    z$expander.<locals>.expander_decoratorrA   )r[   r\   rA   rZ   rB   rT   3   s    rT   c                     s&   | dd|rJ  fdd}|S )zDecorator helping expanders to handle ``inherit`` and ``initial``.

    Wrap an expander so that it does not have to handle the 'inherit' and
    'initial' cases, and can just yield name suffixes. Missing suffixes
    get the initial value.

    wants_base_urlFc                    s    t  fdd  S )z"Decorate the ``wrapped`` expander.c                 3   s&  t j||d}d}t|   dv r< fddD }d}nt| |}|rPd}|si }rj| ||}n
| |}|D ]D\}}|v sJ |||v rtd|d d	| d
|||< qxD ]^}|dr| | }	n|}	||v r|| }
|st|
|	|dd\\}	}
nd}
|	|
fV  qdS )zWrap the expander.r8   base_urlF)inheritinitialc                    s   i | ]
}| qS rA   rA   rN   keywordrA   rB   rR   S   rS   zjgeneric_expander.<locals>.generic_expander_decorator.<locals>.generic_expander_wrapper.<locals>.<dictcomp>Tzgot multiple rC   z values in a z
 shorthandrequiredra   N)	functoolspartialr   rW   r   striprD   r6   )r>   r8   r_   rT   Zskip_validationresultsresultnew_name	new_tokenZactual_new_namerG   )rU   generic_expander_wrapperr]   wrappedrb   rB   rm   J   sJ    



zVgeneric_expander.<locals>.generic_expander_decorator.<locals>.generic_expander_wrapper)rf   wraps)rn   rU   r]   )rm   rn   rB   generic_expander_decoratorH   s    .z4generic_expander.<locals>.generic_expander_decorator)pop)rU   kwargsrq   rA   rp   rB   generic_expander=   s    2rt   zborder-colorzborder-stylezborder-widthmarginpaddingZbleedc           
      c   s$  g }dD ]P}| d }dkr2|| |  q||d|  | ||d   qtjt||d}t| || }r| E dH  dS t| dkr| d9 } nPt| dkr| d9 } n:t| d	kr| | d f7 } nt| dkrtd
t|  t	|| D ]"\}}	t
|	g||dd\}|V  qdS )z>Expand properties setting a token for the four sides of a box.z-topz-rightz-bottomz-leftrC   Nr^   r      r      %Expected 1 to 4 token components got Trd   )rfindappendrf   rg   expand_four_sidesrW   itemslenr   zipr6   )
r>   r8   r_   rU   suffixirT   rj   Zexpanded_namerV   rA   rA   rB   r~   }   s4    	(


r~   zborder-radiuszborder-top-left-radiuszborder-top-right-radiuszborder-bottom-right-radiuszborder-bottom-left-radiusT)r]   c           
      c   s.  g  }}g }| D ]P}|j dkrV|jdkrV||u rL|| d krFtdqT|}q`tdq|| q|sr|dd }||fD ]j}t|dkr|d9 }qzt|d	kr|d	9 }qzt|d
kr||d  qzt|dkrztdt| qzd}t|t||D ].\}	} d|	 d}t| ||dd || fV  qdS )z-Validator for the ``border-radius`` property.literal/rx   z"Expected value after "/" separatorzExpected only one "/" separatorNr   ry   r   rz   r{   )ztop-leftz	top-rightzbottom-rightzbottom-leftzborder-z-radiusTrd   )typerG   r   r}   r   r   r6   )
r>   r8   r_   currentZ
horizontalZverticalrV   valuesZcornersZcornerrA   rA   rB   border_radius   s8    



r   z
list-style-type	-position-imagec           	      c   s   d }}d}| D ]t}t |dkr.|d7 }|}qt|g|durHd}d}n0t|gdur\d}nt|gdurtd	}d}nt||gfV  q|s|rd	|gfV  |d8 }|s|rd|gfV  |d8 }|rtdS )
zyExpand the ``list-style`` shorthand property.

    See https://www.w3.org/TR/CSS21/generate.html#propdef-list-style

    Fr   noner   Nr   Tr   r   )r   r/   r0   r1   r   )	r>   r8   r_   Ztype_specifiedZimage_specifiedZ
none_countrV   
none_tokenr   rA   rA   rB   expand_list_style   s2    r   Zborderc                 c   s*   dD ] }t | || |D ]
}|V  qqdS )zlExpand the ``border`` shorthand property.

    See https://www.w3.org/TR/CSS21/box.html#propdef-border

    rw   N)expand_border_side)r>   r8   r_   r   Znew_proprA   rA   rB   expand_border   s    r   z
border-topzborder-rightzborder-bottomzborder-leftzcolumn-ruleoutline-width-color-stylec                 c   sX   | D ]N}t |durd}n,t|gdur.d}nt|gdurBd}nt||gfV  qdS )ztExpand the ``border-*`` shorthand properties.

    See https://www.w3.org/TR/CSS21/box.html#propdef-border-top

    Nr   r   r   )r   r   r   r   )r>   r8   rV   r   rA   rA   rB   r     s    r   zborder-image-outset-repeat-slice-sourcec                 c   sN  t | } | rJt| dd |r4d| dgfV  qt| dd r| dg}| rvt| dd rv|| d qPd|fV  qt| dd st| d dkrD| dg}| rt|| dd  r|| d qd|fV  | r| d jdkr| d jd	kr| d nq| st	t
| dd r| dg}| rjt
|| dd  rj|| d q:d
|fV  | r| d jdkr| d jd	kr| d nqn6| r| d jdkr| d jd	kr| d nt	| st	t| dd r>| dg}| r2t|| dd  r2|| d qd|fV  nt	qt	qdS )z}Expand the ``border-image-*`` shorthand properties.

    See https://drafts.csswg.org/css-backgrounds/#the-border-image

    Nr   r   r   r   fillr   r   r   r   r   )listr   rr   r   r}   r   r   r   rG   r   r   r   r>   r8   r_   ZrepeatsZslicesZwidthsZoutsetsrA   rA   rB   expand_border_image!  sN    	"
 
 &r   zmask-border-modec                 c   sv  t | } | rrt| dd |r4d| dgfV  qt| dd rXd| dgfV  qt| dd r| dg}| rt| dd r|| d qtd|fV  qt| dd st| d dkrl| dg}| rt|| dd  r|| d qd|fV  | r| d jd	kr| d j	d
kr| d nq| sDt
t| dd r| dg}| rt|| dd  r|| d qbd|fV  | r| d jd	kr| d j	d
kr| d nqn6| r| d jd	kr| d j	d
kr| d nt
| st
t| dd rf| dg}| rZt|| dd  rZ|| d q*d|fV  nt
qt
qdS )zvExpand the ``mask-border-*`` shorthand properties.

    See https://drafts.fxtf.org/css-masking/#the-mask-border

    Nr   r   r   r   r   r   r   r   r   r   r   )r   r   rr   r2   r   r}   r   r   r   rG   r   r   r   r   rA   rA   rB   expand_mask_bordera  sR    	"
 
 &r   Z
backgroundc                 #   s
  dt | }|dv r,D ]}||fV  qdS tjt| d}t| | }r^| E dH  dS d fdd	}tt| }|t|dd	\}}	d
d |	 D }
|D ]0} || \}}| D ]\}}|
| 	| qq|
 D ]\}}||ddd fV  qd|fV  dS )zwExpand the ``background`` shorthand property.

    See https://drafts.csswg.org/css-backgrounds-3/#the-background

    )background-colorzbackground-imagezbackground-repeatzbackground-attachmentzbackground-positionzbackground-sizezbackground-clipzbackground-origin)ra   r`   Nr^   Fc                    sl  i   fdd}| d d d } | r|dt | dd  d d d rR| dd = q| dd  }|rz|dt|rz|   q|dt|r|   q|dt |r|   q|dt|r|   qd	t|  d  D ]}| | d  d d d }t|}|d ur|d
|sJ | | d = | r| d jdkr| d j	dkrdt|  d  D ]N}| | d d d d }t
|}|d ur^|d|sJ | | d = q^ qq|d urq|dt|r|   | dd  }|dt|r|   q|dt| qtq dtd }	D ]2}
|
 vr0|
dkr0t|
dd d  |
< q0|	 fS )Nc                    s.   |d u rdS d|  } |  v r"t | | < dS )NFzbackground-Tr   )r8   rG   ri   rA   rB   add  s    
z3expand_background.<locals>.parse_layer.<locals>.addrx   repeatcolorimage
attachment)ry   rz   r   r   positionr   r   )rz   r   sizeoriginZclipr   Zbackground_colorrC   _r   )r   Zsingle_valuer3   rr   r   r   r   r   r   rG   r   r   r   r   replace)r>   final_layerr   rV   nZn_tokensr   r   Z
next_tokenr   r8   r_   rU   r   rB   parse_layer  sn    






z&expand_background.<locals>.parse_layerT)r   c                 S   s   i | ]\}}||gqS rA   rA   )rO   rF   rG   rA   rA   rB   rR      rS   z%expand_background.<locals>.<dictcomp>rx   r   )F)
r   rf   rg   expand_backgroundrW   r   reversedr   nextr}   )r>   r8   r_   rc   rT   rj   r   Zlayersr   Z
last_layerri   r   ZlayerrG   r   rA   r   rB   r     s.    Dr   ztext-decoration-line
-thicknessc           	      c   s   g }g }g }g }d}| D ]}t |}|dv rN|| |r@tq|dkrd}q|dv rj|r^t|| qt|r|rzt|| qt|gr|rt|| qtq|rd|fV  |rd|fV  |rd|fV  |rd	|fV  d
S )z2Expand the ``text-decoration`` shorthand property.F)r   Z	underlineZoverlinezline-throughZblinkr   T)ZsoliddoubleZdottedZdashedZwavyr   r   r   r   N)r   r}   r   r   r5   )	r>   r8   liner   styleZ	thicknessZnone_in_linerV   rc   rA   rA   rB   expand_text_decoration
  sD    




r   c                 c   sb   t | }|ddd }|dv r,|| fV  n2|dkrZt| d j| d jd}||gfV  ntdS )zExpand legacy ``page-break-before`` and ``page-break-after`` properties.

    See https://www.w3.org/TR/css-break-3/#page-break-properties

    rC   r   )autoleftrightavoidalwaysr   pageN)r   splitr   source_linesource_columnr   )r>   r8   rc   rk   rV   rA   rA   rB   expand_page_break_before_after5  s    r   zpage-break-afterzbreak-afterc                 C   s
   t | |S )ztExpand legacy ``page-break-after`` property.

    See https://www.w3.org/TR/css-break-3/#page-break-properties

    r   r>   r8   rA   rA   rB   expand_page_break_afterG  s    r   zpage-break-beforezbreak-beforec                 C   s
   t | |S )zuExpand legacy ``page-break-before`` property.

    See https://www.w3.org/TR/css-break-3/#page-break-properties

    r   r   rA   rA   rB   expand_page_break_beforeR  s    r   zpage-break-insidebreak-insidec                 c   s$   t | }|dv rd| fV  ntdS )zyExpand the legacy ``page-break-inside`` property.

    See https://www.w3.org/TR/css-break-3/#page-break-properties

    )r   r   r   N)r   r   r>   r8   rc   rA   rA   rB   expand_page_break_inside]  s    r   columnscolumn-widthcolumn-countc                 c   s   d}t | dkr.t| d dkr.| ddd } | D ]D}t|gdurR|dkrRd}nt|gdurfd}nt||gfV  q2t | dkr|dkrdnd}t| d j| d jd}||gfV  dS )	z*Expand the ``columns`` shorthand property.Nr   r   r   rx   r   r   r   )r   r   r    r   r   r   r   r   )r>   r8   rV   rA   rA   rB   expand_columnsl  s     r   zfont-variantz-alternatesz-capsz-east-asianz
-ligaturesz-numericc                 C   s   t | S )zoExpand the ``font-variant`` shorthand property.

    https://www.w3.org/TR/css-fonts-3/#font-variant-prop

    r	   r   rA   rA   rB   font_variant  s    	r   font-variant-caps-weight-stretch-sizeline-height-familyc                 c   sb  t | }|dv rtdtt| } tdD ]}|  }t|dkrFq,t|gdurZd}n@t|gdurnd}n,t	|gdurd}nt
|gdurd	}n q||gfV  | s,tq,| st|  }t|gdu rtd
|gfV  | st|  }|jdkr0|jdkr0|  }t|gdu r"td|gfV  n
| | |   t| du rTtd| fV  dS )z_Expand the ``font`` shorthand property.

    https://www.w3.org/TR/css-fonts-3/#font-prop

    )captionZiconmenuzmessage-boxzsmall-captionz
status-barzSystem fonts are not supportedry   normalNr   r   r   r   r   r   r   r   r   )r   r   r   r   rangerr   r   r(   r)   r*   r'   r&   r   rG   r.   r}   reverser%   )r>   r8   Zexpand_font_keywordr   rV   r   rA   rA   rB   expand_font  sN    	
r   z	word-wrapoverflow-wrapc                 c   s"   t | }|du rtd| fV  dS )zhExpand the ``word-wrap`` legacy property.

    See https://www.w3.org/TR/css-text-3/#overflow-wrap

    Nr   )r4   r   r   rA   rA   rB   expand_word_wrap  s    r   Zflex-grow-shrink-basisc                 c   s  t | }|dkrj| d j| d j }}t||ddd}t||d}d|gfV  d|gfV  d|gfV  njd\}}}	d	\}
}}| D ]}|jd
ko|jdkot|
|f }|s|st|g}|dur|}	d}q|
st	|g}|du rt
n
|}d}
qq|s t	|g}|du rt
n
|}d}qqt
q| d j| d j }}t| rRt|nd}t| rlt|nd}t||||t|}t||||t|}|st||dddd}	d|gfV  d|gfV  d|	gfV  dS )zExpand the ``flex`` property.r   r   0r   r   r   r   )r   r   N)FFFnumberNTZpx)r   r   r   r   r   r   	int_valueallr!   r#   r   float
is_integerintstrr   )r>   r8   rc   r   columnZ
zero_token
auto_tokenZgrowshrinkZbasisZ
grow_foundZshrink_foundZbasis_foundrV   Zforced_flex_factorZ	new_basisZnew_growZ
new_shrinkZint_growZ
int_shrinkZ
grow_tokenZshrink_tokenrA   rA   rB   expand_flex  s^    





r   z	flex-flowflex-direction	flex-wrapc                 c   s   t | dkrr| | ddd fD ]L}t|d g}t|d g}|r|rd|d gfV  d|d gfV   qqtn^t | dkrt| d g}|rd| d gfV  qt| d g}|rd| d gfV  qtntdS )z"Expand the ``flex-flow`` property.r   Nrx   r   r   r   r   )r   r"   r$   r   )r>   r8   Zsorted_tokens	directionwraprA   rA   rB   expand_flex_flow  s$    r   c           	      c   s4  | d j | d j }}t||d}t| dkrft| d dkrfd|gfV  d|gfV  d|gfV  d S g g}| D ]2}|jdkr|jdkr|g  qp|d	 | qpt|d
krt|d }t|d }|r|rd|d fV  d|d fV  d|gfV  d S |d }nt	nt|dkr(|g}nt	t	d S )Nr   r   r   -columns-rows-areasr   r   rx   r   )
r   r   r   r   r   r   rG   r}   r-   r   )	r>   r8   r   r   r   Zslash_separatedrV   rowsr   rA   rA   rB   _expand_grid_template;  s6    
r   grid-templater   r   r   c                 c   s   t | |E dH  dS )z&Expand the ``grid-template`` property.N)r   r   rA   rA   rB   expand_grid_template]  s    r   Zgridz-template-columnsz-template-rows-template-areas-auto-columns
-auto-rows
-auto-flowc                 c   s  | d j | d j }}t||d}t||d}t||d}t||d}ztt| d}W n tyj   Y nR0 |D ]"\}}	d|dd	  |	fV  qpd
|gfV  d|gfV  d|gfV  dS g g}
| D ]2}|jdkr|jdkr|
	g  q|
d	 	| qt
|
dkrtd}d}g g d}t|
| }|D ]\} \}}d}| D ]}t|dkrz|sl|rp||krpt|}|}nPt|dkr|s|r||krtd}|}n|| d	 kr|	| ntqDq0|st|dkrdnd}|dkr|n|}d|r||fn|ffV  d| dt|| fV  d| d|gfV  d| d|gfV  d| dt|| fV  d|gfV  dS )zExpand the ``grid`` property.r   r   r   rowr   r   z
-template-rC   rx   r   r   r   Nr   r   r   )r   r   Fdensez	auto-flowTz-auto-sr   )r   r   r   tupler   r   r   r   rG   r}   r   r   r   r   )r>   r8   r   r   r   r   r   templaterF   rG   Zsplit_tokensrV   Z
auto_trackr   Z	templatesiterabletrackZtrack_templatesZauto_flow_tokenZnon_auto_trackZauto_track_tokenrA   rA   rB   expand_gridd  sn    

r  c           
      c   s  g g}| D ]2}|j dkr.|jdkr.|g  q
|d | q
dt|  krV|ks\n tg }|D ](} t|  }sxt|| t| V  qdt|j|j	d}t| }dkrt
|d d d d hk}|rt|d n|f}	||  ||d  |	V  |d  kr|k rLn n4t
|d d d d hk}|rDt|d n|fV  |d  krd|k rn n4t
|d d d d hk}|rt|d n|fV  d S )	Nr   r   rx   r   r   r   r   rz   )r   rG   r}   r   r   r,   r  r   r   r   set)
r>   Z
max_numberZ
grid_linesrV   ZvalidationsZ
validationr   linesZcustom_identrG   rA   rA   rB   _expand_grid_column_row_area  s6    


r	  zgrid-columnzgrid-rowz-startz-endc                 c   s2   t | d}t|dD ]\} }d| | fV  qdS )z,Expand the ``grid-[column|row]`` properties.r   )startendrC   Nr	  r   )r>   r8   tokens_listsiderA   rA   rB   expand_grid_column_row  s    
r  z	grid-areazgrid-row-startzgrid-row-endzgrid-column-startzgrid-column-endc                 c   s6   t | d}d}t||D ]\} }d| | fV  qdS )z"Expand the ``grid-area`` property.ry   )z	row-startzcolumn-startzrow-endz
column-endzgrid-Nr  )r>   r8   r  Zsidesr  rA   rA   rB   expand_grid_area  s    
r  zgrid-gapr+   
column-gaprow-gapc                 c   s   t | dkr2t| du rtd| fV  d| fV  nht | dkrt| dd t| dd  }}d||fv rptd| dd fV  d| dd fV  ntdS )zExpand the ``gap`` property.r   Nr  r  r   r   )r   r+   r   )r>   r8   Z
column_gapZrow_gaprA   rA   rB   
expand_gap  s    
"r  zgrid-column-gapc                 c   s"   t | }|du rtd| fV  dS )z+Expand legacy ``grid-column-gap`` property.Nr  r+   r   r   rA   rA   rB   expand_legacy_column_gap  s    r  zgrid-row-gapc                 c   s"   t | }|du rtd| fV  dS )z(Expand legacy ``grid-row-gap`` property.Nr  r  r   rA   rA   rB   expand_legacy_row_gap  s    r  zplace-contentzalign-contentzjustify-contentc                 C   s   t dS )z&Expand the ``place-content`` property.Nr   r   rA   rA   rB   expand_place_content  s    r  zplace-itemszalign-itemszjustify-itemsc                 C   s   t dS )z$Expand the ``place-items`` property.Nr   r   rA   rA   rB   expand_place_items  s    r  z
place-selfz
align-selfzjustify-selfc                 C   s   t dS )z#Expand the ``place-self`` property.Nr   r   rA   rA   rB   expand_place_self  s    r  z
line-clamp	max-linescontinueblock-ellipsisc           
      c   s  t | dkrt| }|dkrp| d j| d j }}t||d}t||d}d|gfV  d|gfV  d|gfV  nx| d jdkr| d jd	ur| d j| d j }}t||d}t||d
}d| d gfV  d|gfV  d|gfV  ntnt | dkr| d jdkr| d j}t| d g}	|r|	d	ur| d j| d j }}t||d
}d| d gfV  d|gfV  d| d gfV  ntntntd	S )z#Expand the ``line-clamp`` property.r   r   r   r   r  r  r  r   Ndiscardr   )	r   r   r   r   r   r   r   r   r   )
r>   r8   rc   r   r   r   r   Zdiscard_token	max_linesZellipsisrA   rA   rB   expand_line_clamp  s<    
r  z
text-align-all-lastc                 c   s   t | dkrt| }|du r t|dkrL| d j| d j }}t||d}n| d }d|gfV  |dkr| d j| d j }}t||d}n|}d|gfV  ntdS )	z#Expand the ``text-align`` property.r   Nzjustify-allr   Zjustifyr   r
  r!  )r   r   r   r   r   r   )r>   r8   rc   r   r   Z	align_allZ
align_lastrA   rA   rB   expand_text_align>  s    r"  )_rL   rf   Ztinycss2.astr   r   r   Ztinycss2.color4r   Z
propertiesr   Zdescriptorsr
   utilsr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   rX   r7   rW   rT   rt   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r	  r  r  r  r  r  r  r  r  r  r"  rA   rA   rA   rB   <module>   s   
	
@$%)

=?
f)		
	F
8"
<
&