+
    	i                     \    R t ^ RIHt ^ RIt^ RIt^RIHt ^RIHt ^RI	H
t
 R tR tR tR# )	zApply CSS to SVG documents.)urljoinN)preprocess_descriptors)LOGGER)	parse_urlc           	   #    "   V EF  pVP                   R8X  Ed   VP                  R8X  d   VP                  f   \        P                  ! VP
                  4      pVP                   R
9  d   Kh  \        \        W&P                  4      4      p\        P                  ! V P                  VR4      P                  4       4      pVP                  4       p\        WW#V4       Rj  xL
  K  VP                  R8X  d   Ve   Ve   \        P                  ! VP                  4      p	\        \!        RW)4      4      p
R FJ  pW9  g   K  \"        P$                  ! RVP'                  RR4      VP(                  VP*                  4        EK}  	  VP-                  W4       EK  EK  EK  EK  VP                   R	8X  g   EK  Vx  EK  	  R#  L5i)z.Find rules among stylesheet rules and imports.zat-ruleimportNtext/cssz	font-facez3Missing %s descriptor in '@font-face' rule at %d:%d_-zqualified-rule)stringurl)srcfont_family)typelower_at_keywordcontenttinycss2parse_one_component_valuepreluder   r   valueparse_stylesheet	fetch_urldecodegeturlfind_stylesheets_rulesparse_blocks_contentsdictr   r   warningreplacesource_linesource_columnadd_font_face)treestylesheet_rulesr   font_configurl_fetcherrule	url_tokencss_url
stylesheetr   rule_descriptorskeys   &&&&&       X/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/weasyprint/svg/css.pyr   r      s{     99	!$$0T\\5I$>>t||L	>>)::#GC$AB%66NN7J7>>@B
nn&1cE E E&&+5*{/F&<<T\\JG'+.{CI(K$56"NN!(),S#)> $ 0 0$2D2DF "  6 $112BP 0G* 6  YY**J= !Es    CGG  AGA.G5Gc                x   . p. p\         P                  ! V 4       F  pVP                  R8X  g   K  VP                  P	                  R4      '       d   K9  \         P
                  ! VP                  4      P                  4       pVP                  '       d   TMTpVP                  VP                  V34       K  	  W3# )z+Parse declarations in a given rule content.declarationr
   )r   r   r   name
startswith	serializer   strip	importantappend
lower_name)inputnormal_declarationsimportant_declarationsr.   r   declarationss   &     r,   parse_declarationsr:   2   s    55e< -$$//44&&{'8'89??AE*5*?*?*?&(  !7!7 ?@ = 66    c           	     |   \         P                  ! 4       p\         P                  ! 4       p. pV P                  P                  4        Fu  pVP                  R8X  g   K  VP                  RR4      R8X  g   K/  VP                  '       g   KC  VP                  \        P                  ! VP                  RRR7      4       Kw  	  V F  p\        WWV4       F  p	\        V	P                  4      w  r \         P                  ! V	P                  4      pT F[  pTP&                  e   K  TP(                  '       d   K'  T
'       d   TP+                  Y4       T'       g   KJ  TP+                  Y4       K]  	  K  	  K  	  WE3#   \         P                  P                    d$   p\"        P$                  ! RT4        Rp? K  Rp?ii ; i)z8Find stylesheets and return rule matchers in given tree.z!{http://www.w3.org/2000/svg}styler   r   T)skip_commentsskip_whitespacez(Failed to apply CSS rule in SVG rule: %sN)
cssselect2Matcheretree_elementitertaggettextr4   r   r   r   r:   r   compile_selector_listr   parserSelectorErrorr   r   pseudo_elementnever_matchesadd_selector)r"   r   r$   r%   normal_matcherimportant_matcherstylesheetselementr)   r&   r7   r8   	selectors	exceptionselectors   &&&&           r,   parse_stylesheetsrS   D   sq   '')N"**, K%%**,KK>>FJ/:= x88D$ H I - "
*#KAD:L;7&<<T\\J	
 &++3$222*&33$;--)66$> &A "* ,, $$22 >	Ks   - E99F;F66F;)__doc__urllib.parser   r?   r   css.validation.descriptorsr   loggerr   utilsr   r   r:   rS    r;   r,   <module>rZ      s*    !     ?   J7$)-r;   