
    Bh!                         S r SSKJrJr  SSKJrJr  SSKJrJ	r	J
r
Jr  SSKJr  SSKJrJr  S	S
KJr  S	SKJrJrJrJr  1 Skr\
" S	S	S5      r\
" S	S	S5      \	" S	S	S5      4rSS jrg)z/Validate properties, expanders and descriptors.    )SelectorErrorcompile_selector_list)parse_blocks_contents	serialize)FunctionBlock
IdentTokenLiteralTokenWhitespaceToken   )LOGGER   )InvalidValuesremove_whitespace   )	EXPANDERS)PREFIXPROPRIETARYUNSTABLEvalidate_non_shorthand>[   cuecaretpausepitchspeakcursorresizestressvolumeazimuthrichness	animation	elevation
transition	cue-after
cue-beforecaret-colorcaret-shapepause-afterpitch-rangeplay-duringspeech-ratewill-changefield-sizingpause-beforespeak-headertouch-actionvoice-familyscroll-marginspeak-numeralview-timelineanimation-namepointer-eventsscroll-paddingtimeline-scopeanimation-delayanimation-rangescroll-behaviorscroll-timelinescrollbar-colorscrollbar-widthscroll-snap-stopscroll-snap-typescrollbar-guttertransition-delayscroll-margin-topscroll-snap-alignspeak-punctuationanimation-durationanimation-timelinescroll-margin-leftscroll-padding-topview-timeline-axisview-timeline-nameanimation-directionanimation-fill-modeanimation-range-endoverscroll-behaviorscroll-margin-blockscroll-margin-rightscroll-padding-lefttransition-durationtransition-propertyview-timeline-insetanimation-play-statescroll-margin-bottomscroll-margin-inlinescroll-padding-blockscroll-padding-rightscroll-timeline-axisscroll-timeline-nameview-transition-nameanimation-compositionanimation-range-startoverscroll-behavior-xoverscroll-behavior-yscroll-padding-bottomscroll-padding-inlinescroll-margin-block-endscroll-margin-inline-endscroll-padding-block-endanimation-iteration-countanimation-timing-functionoverscroll-behavior-blockscroll-margin-block-startscroll-padding-inline-endoverscroll-behavior-inlinescroll-margin-inline-startscroll-padding-block-starttransition-timing-functionscroll-padding-inline-start&:rootNc           
   #   0	  ^#    UbT   [         U;   a>  U/ p#U H5  nU[         :X  a  UR                  [        5        M$  UR                  U5        M7     [	        U5      n[        SSS5      [        SSSU5      4nU GH  mTR                  S:X  a7  [        R                  " STR                  TR                  TR                  5        TR                  S:X  Ga#  Uc  Ma  / n/ /nTR                   H0  nUS	:X  a  UR                  / 5        M  US
   R                  U5        M2     U H  n	[         U	;   aB  TR                   H1  nU[         :X  a  UR                  U5        M   UR                  U5        M3     O=[        SSS5      [        SSSU5      4nUR                  / UQ[!        SSS5      PU	Q5        UR                  [        SSS	5      5        M     [#        U [%        TR&                  5      USS
 5       Sh  vN   TR                  S:w  a  GM  TR(                  n
U
R+                  S5      (       d  TR,                  n
U4S jnU
[.        ;   a  U" SS5        GM  U
R+                  [0        5      (       a  U
[3        [0        5      S nU[4        ;   a  Un
OU[6        ;   aO  [        R                  " STR(                  [        TR8                  5      TR                  TR                  U5        Un
OO[        R                  " STR(                  [        TR8                  5      TR                  TR                  U5        GM  U
R+                  S5      (       a"  U
R+                  S5      (       d  U" SS5        GM  [:        R<                  " U
[>        5      n[A        TR8                  5      n U(       d  [C        S5      e[E        U" XU 5      5      nTRH                  nU H=  u  nnUb  URK                  SS5      UU4mWT4v   M&  URK                  SS5      UU4v   M?     GM     g! [
         a    [        S[        U5       S35      ef = f GNK! [B         aI  nU" SURF                  (       a#  URF                  S   (       a  URF                  S   OS5         SnAGM  SnAff = f7f)zExpand shorthand properties, filter unsupported properties and values.

Log a warning for every ignored declaration.

Return a iterable of ``(name, value, important)`` tuples.

N'r   rr   iserrorzError: %s at %d:%d.zqualified-rule, declarationz--c                    > [        [        U 5      " STR                  [        TR                  5      TR
                  TR                  U5        g )NzIgnored `%s:%s` at %d:%d, %s.)getattrr   namer   valuesource_linesource_column)levelreasonr{   s     T/var/www/html/env/lib/python3.13/site-packages/weasyprint/css/validation/__init__.pyvalidation_error1preprocess_declarations.<locals>.validation_error   s?    FE"/  )K,=,=">'')B)BFL    debugz/the property does not apply for the print mediaz\Deprecated `%s:%s` at %d:%d, prefixes on unstable attributes are deprecated, use %r instead.zTIgnored `%s:%s` at %d:%d, prefix on this attribute is not supported, use %r instead.-zprefixed selectors are ignoredzno valuewarningr   zinvalid value_)&NESTING_SELECTORextend
ROOT_TOKENappendr   r   r   r	   r   typer   r   messager   r   preluder
   preprocess_declarationsr   contentr~   
startswith
lower_nameNOT_PRINT_MEDIAr   lenr   r   r   r   getr   r   r   listargs	importantreplace)base_urldeclarationsr   original_preludetoken	selectorsis_tokendeclaration_preludetoken_groupstoken_groupr~   r   unprefixed_name	validatortokensresultexcr   	long_namer   r{   s                       @r   r   r   r   s]     	;7* -4R'-E 00z2u-	 .
 .g6I
 Aq#&aD'(JJH#w&NN%##'')B)BD
 //"$4L$,,C< ''+ $++E2	 -
  ,#{2!,!4!4 $44/66x@/66u=	 "5 %Q3/%aD': <H (.. 0&!0&#21a#=0&$0& ' $**<1c+BC!  ," //0C0CD#CR(* * * },t$$))D	L ?"JL??6"""3v;<0O+-& H,&  $$i0A0A&B++[-F-F#% '&  $$i0A0A&B++[-F-F#% ??3(=(=W&FGMM$(>?	";#4#45	 #J//)F(;<F  ))	 &Iu"(00c:E9M,,''S15)CC !'I $  	;!Ig$6#7q 9::	;P*t  	"xxCHHQK_N 		sV   RAP FR2P=3F*R$Q AR#P::R 
R
=RRRR)N)__doc__
cssselect2r   r   tinycss2r   r   tinycss2.astr   r   r	   r
    r   utilsr   r   	expandersr   
propertiesr   r   r   r   r   r   r   r    r   r   <module>r      s`    5 ; 5 Q Q  4   M M`B  1c* !Q$jAv&>>
DDr   