+
    bIi2                        Rt RtRt^ RIHt ^ RIHtHtHtH	t	H
t
HtHtHt ^ RIHt ^ RIHt R tR	 tR
 tR t ! R R ]4      t ! R R]4      t]R8X  d{   ^ RItR tR tR t^ RIHtHt ]! 4       t ] R,          t!]! R]!R7      t"R]"n#        R^ ]"RR^ 3R^]"RR^ 3R^ ] R,          RR^33 F   w  t$t%t&t't(t)])'       g   K  ]! ]$]&]%]'](4       K"  	  R# R# ) XPreformattedPythonPreformattedz3.5.20z:A 'rich preformatted text' widget allowing internal markup)	PyFontify)	Paragraph_handleBulletWidth	ParaLines_getFragWordsstringWidthgetAscentDescent	imgVRangeimgNormV)isSeq)	_dedenterc                    . p. pV R ,          pV. 8w  d   V^ ,          pVP                   pV^  VP                  R4      pV^ 8  dp   WV^,           R pVP                  VP                  VRV R7      4       VP                  V4       . pVR8w  d%   VP	                  ^ VP                  VR7      4       K  K  VP                  V4       K  V. 8w  d   VP                  V4       V# )NNN
Ntext )r   findappendcloneinsert)fragslinesclineWwtitlefts   &       ډC:\Users\petid\OneDrive\Desktop\Maestro\MAESTRO CLAUDE\MAESTRO\maestro-backend\venv\Lib\site-packages\reportlab/platypus/xpreformatted.py_getFragLinesr"      s    EEaA
r'aDFFaDFF4La4cdGELLae,-LLEby1777./  LLObyUL    c                     V P                  4       pR F!  p\        W44      '       g   K  \        W44       K#  	  V P                  W Vn        V.# )r   )r   r   )r   hasattrdelattrr   )blParastartstopfas   &&&  r!   _split_blParar,   &   s=    A1<< ll5&AG3Jr#   c                 $    V P                  R 4      # ) )countr   s   &r!   _countSpacesr0   .   s    ::c?r#   c                b   . p^ p^ pV  F  pVP                   R,          pVP                  WV34       \        VRR4      pV'       d&   \        VR^ 4      p\        VR4      '       d   Wn        V\        WeP                  VP                  4      ,          pWFP                  R4      ,          pK  	  W4V3# )zgiven a fragment list return a list of lists
[size, spaces, (f00,w00), ..., (f0n,w0n)]
each pair f,w represents a style and some string
r   cbDefnNwidthnormalizedValuer.   )	r   r   getattrr%   _normalizerr	   fontNamefontSizer/   )	r   maxWidthr   nsr*   r   cb_ws	   &&       r!   _getFragWordr>   8   s    
 	A	A	Avvay	!Qx%GA&Br+,,!)	[zz1::66 	
ZZ_  7Nr#   c                   :   a  ] tR t^Qt o RR ltR t]tR tRtV t	R# )r   Nc                D    WPn         V3R  lpV P                  WW4V4       R# )c                 L    R P                  \        T ;'       g    RV4      4      # )r   r   )joinr   )r   dedents   &&r!   <lambda>(XPreformatted.__init__.<locals>.<lambda>T   s    dii	$**"V8T.Ur#   N)caseSensitive_setup)selfr   style
bulletTextr   rF   rC   cleaners   &&&&&&& r!   __init__XPreformatted.__init__R   s     *&,UDG<r#   c                `	   ^ V n         \        V4      '       g   V.pMTp. p^ pW$,          pV P                  p\        VP                  4      p^ p\        V P                  Wb4       ^ V n        \        V R\        VRR4      4      p	V	R9  p
V P                  p\        V4      pV^8X  Ed   V^ ,          p\        VR4      '       d   VP                  pVP                  p\        W4      w  pp^ pVP                  P                  R4      pV F  p\!        VW4      pVV P                   8  d   VV n         \#        VV4      pVV,
          pVP%                  VVP                  R4      V34       V^,           pV\        V4      8  ;'       d    W$,          ;'       g
    VR,          pK  	  VP'                  VVVVVR7      pM]VP(                  pVP*                  pV F,  pV^ 8X  d   V^,          pMVP,                  p\#        VV4      pK.  	  VP'                  VVR7      p\#        V P.                  V4      V n        V# V^ 8:  dL   \1        ^ VP                  VP                  VP2                  VP                  RVP                  ,          . R7      # \5        V4       EF  p\7        VV4      w  pppV^ ,          ^ ,          pVP                  p\        VP                  V4      w  ppVP'                  4       .pV^ ,          ^,          VR,          n        VR	,           F  pV^ ,          P'                  4       pV^,          Vn        VP%                  V4       VP                  pVP                  pV
'       d_   \        VR
R4      p\        VR^ 4      '       d0   \9        \;        VP                  V4      VP<                  V4      w  ppM\        W4      w  ppM\        W4      w  pp\#        VV4      p\#        VV4      p\?        VV4      pK  	  V^,          pV\        V4      8  ;'       d    W$,          ;'       g
    VR,          p\#        VV4      pVV,
          pVV P                   8  d   VV n         VP%                  \1        VVVVVVVRR7      4       EK  	  \#        V P.                  V4      V n        \1        ^VR7      # )a_  
Returns a broken line structure. There are two cases

A) For the simple case of a single formatting input fragment the output is
    A fragment specifier with
        - kind = 0
        - fontName, fontSize, leading, textColor
        - lines=  A list of lines
        
            Each line has two items:
            
            1. unused width in points
            2. a list of words

B) When there is more than one input formatting fragment the out put is
    A fragment specifier with
        - kind = 1
        - lines =  A list of fragments each having fields:
        
            - extraspace (needed for justified)
            - fontSize
            - words=word list
            - each word is itself a fragment with
            - various settings

This structure can be used to easily draw paragraphs with the various alignments.
You can supply either a single width or a list of widths; the latter will have its
last item repeated until necessary. A 2-element list is useful when there is a
different first line indent; a longer list could be created to facilitate custom wraps
around irregular objects.autoLeadingr   r   r   r.   )kindr   ascentdescentr8   )rP   r   )rP   r8   r7   	textColorrQ   rR   r      NNr2   Nr3   T)
extraSpace	wordCountwordsr8   rQ   rR   currentWidthpreformatted)r   offgɿ) 
_width_maxr   rI   floatr8   r   rJ   heightr5   r   lenr%   r7   r
   r   splitr	   maxr   r   rP   r   rY   r3   r   rS   r"   r>   r   r   valignmin) rH   r3   	maxWidthsr   linenor9   rI   	fFontSizerequiredWidthrO   
calcBoundsr   nFragsr*   r8   r7   rQ   rR   rP   LlrY   rV   r'   r:   r   maxSize	maxAscent
minDescentrX   r   r2   s    &&                              r!   
breakLinesXPreformatted.breakLinesW   s)   @ U||%Yi$

%..)	 	4??5;d=}R1PQ 
2


E
19aAq  ::::"28"E&&,,t$A#.q#CL#doo5t$']$CM!),!6JLL*QWWS\,!GH#AXF%c)n4JJ9J[[iXZmH  d%vg_ghvvAQw'(t'(~~$']$CM  d%8TZZ6DJMQY!ennu~~&+ooennUYZ_ZhZhUh"$& & #5)%1!H%="aaDG**(8G(L%	:!"1ab	2A!

AQ4AFLLO zzH zzH!!(8D!9"6'!44-6xh7WX^XeXefn-oNGF.>x.QOFG*:8*M!'(3G #If 5I!$Z!8J! $ !!#i.0FFY5FWW)TV- #L ?%4
$//1\4?Y*qPU`gpy  CM  [g  uy  z  {= *@ TZZ6DJ!511r#   c                    \         # )N)r,   )rH   s   &r!   _get_split_blParaFunc#XPreformatted._get_split_blParaFunc   s    r#   )r]   rF   r_   r3   )NNrU       )
__name__
__module____qualname____firstlineno__rL   rp   breakLinesCJKrs   __static_attributes____classdictcell____classdict__s   @r!   r   r   Q   s"     =
xt M r#   c                   V   a  ] tR t^t o RtRRRRRRRRRRRR/tRR	 ltR
 tR tRt	V t
R# )r   zGUsed for syntax-colored Python code, otherwise like XPreformatted.
    restcommentkeyword	parameter
identifierstringNc           	         V'       d!   V P                  V P                  V4      4      p\        P                  WW#WER 7       R# ))rJ   rC   r   N)fontify
escapeHtmlr   rL   )rH   r   rI   rJ   rC   r   s   &&&&&&r!   rL   PythonPreformatted.__init__   s1    << 56Dt5far#   c                r    VP                  R R4      pVP                  RR4      pVP                  RR4      pV# )&z&amp;<z&lt;>z&gt;)replace)rH   r   r;   s   && r!   r   PythonPreformatted.escapeHtml   s7    LLg&IIc6"IIc6"r#   c                   V^ ,          R8X  d
   VR,          p\         P                  ! V4      pRp^ pV F?  w  rVrxW1WF ,           pV P                  V,          w  rW9,           WV ,           V
,           pTpKA  	  W1VR ,           pV# )z/Return a fontified version of some Python code.r   rT   r   N)r   r   formats)rH   codetagsfontifiedCodeposkr   jdummyr;   es   &&         r!   r   PythonPreformatted.fontify   s     7d?8D  &"NA!)K7M<<?DA)-q	9A=MC	 # &ST
2r#    )r   r   )z<font color="green"></font>)z<font color="blue"><b>z</b></font>)z<font color="black">r   )z<font color="red">r   )z<font color="gray">r   )Nru   N)rv   rw   rx   ry   __doc__r   rL   r   r   r{   r|   r}   s   @r!   r   r      sK      	x:@:89<Gb
 r#   __main__Nc                    \        R \        V 4      ,          4       V P                  P                  p\	        V4      p\
        P                  P                  p\        V4       Fz  pW,          pVP                  p\	        V4      pV! RWGVP                  3,          4       \        V4       F$  pV! RWV,          P                  3,          4       K&  	  \        4        K|  	  R# )z(
############dumpXPreforemattedLines(%s)zline%d: %d(%d)
  z %d:'%s'N)printstrr'   r   r`   sysstdoutwriterangerX   rW   r   )	Pr   r:   outwrl   linerX   nwordsr   s	   &        r!   dumpXPreformattedLinesr     s    9CFBCu:ZZqA8DJJEZF%$..(AAB6]Z8== 112 #G r#   c           	         \        R \        V 4      ,          4       V P                  p\        V4      p\	        V4       F'  p\        RW1V,          P
                  3,          4       K)  	  \        P                  P                  p^ p\        V4       Fr  p^ p\        VR4       FT  pV! RW2V^ ,          3,          4       V^,           pVR,           F  pV! RV^,          ,          4       K  	  \        4        KV  	  V^,           pKt  	  R# )z(
############dumpXPreforemattedFrags(%s)zfrag%d: '%s'ih  zfrag%d.%d: size=%drT   z '%s'N)r   r   r   r`   r   r   r   r   r   r"   r   )r   r   r:   rl   r   rk   r   r   s   &       r!   dumpXPreformattedFragsr     s    9CFBCu:qA.AQx}}#556  ZZu%AA"1S))Q1Q4L89E2A1Q4(  * AA &r#   c                     \        WVR 7      p\        V4       VP                  W44      w  rg\        V4       VP	                  W44      p\        V4       V F!  p	V	P                  W44       \        V	4       RpK#  	  R# ))rC   i  N)r   r   wrapr   ra   )
r   rI   rC   aWaHr   r   hSr;   s
   &&&&&     r!   try_itr   #  sd    
&
1q!ffRnq!GGBNq!AFF2M"1%B r#   )getSampleStyleSheetParagraphStyleBodyTextdiscussiontext)parent	Helveticaa?  


The <font name=courier color=green>CMYK</font> or subtractive

method follows the way a printer
mixes three pigments (cyan, magenta, and yellow) to form colors.
Because mixing chemicals is more difficult than combining light there
is a fourth parameter for darkness.  For example a chemical
combination of the <font name=courier color=green>CMY</font> pigments generally never makes a perfect

black -- instead producing a muddy color -- so, to get black printers
don't use the <font name=courier color=green>CMY</font> pigments but use a direct black ink.  Because
<font name=courier color=green>CMYK</font> maps more directly to the way printer hardware works it may
be the case that &amp;| &amp; | colors specified in <font name=courier color=green>CMYK</font> will provide better fidelity
and better control when printed.


g     |@gffffffE@av  

   This is a non rearranging form of the <b>Paragraph</b> class;
   <b><font color=red>XML</font></b> tags are allowed in <i>text</i> and have the same

      meanings as for the <b>Paragraph</b> class.
   As for <b>Preformatted</b>, if dedent is non zero <font color=red size=+1>dedent</font>
       common leading spaces will be removed from the
   front of each line.

z    <font color=blue>class </font><font color=red>FastXMLParser</font>:
        # Nonsense method
        def nonsense(self):
            self.foo = 'bar'
Codeg333333@)r   r   )*__all____version__r   reportlab.libr   reportlab.platypus.paragraphr   r   r   r   r	   r
   r   r   reportlab.lib.utilsr   reportlab.platypus.flowablesr   r"   r,   r0   r>   r   r   rv   r   r   r   r   reportlab.lib.stylesr   r   
styleSheetBDTstyler7   r   rC   rI   r   r   activer   r#   r!   <module>r      s-   H #R R R % 2,2DI DL' 'R Z&
 I$&J:A-a8G!G2$ gudA%1&
 wtQ
 
 z&5#q*=$0+fUBFJ 66$uVBr2K$0i r#   