
    i92i                     4   S SK r S SK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Jr  S SKJr  SSKJrJr   " S	 S
\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r\ " S S 5      5       r\ " S! S"5      5       r " S# S$\ R@                  5      r! " S% S&\!5      r"\"" 5       \!l#         " S' S(\!5      r$\$" 5       \!l%         " S) S*\!5      r&\&" 5       \!l'         " S+ S,\!5      r(\(" 5       \!l)         " S- S.\!5      r*\*" 5       \!l+         " S/ S0\!5      r,\," 5       \!l-         " S1 S2\!5      r.\." 5       \!l/         " S3 S4\5      r0 " S5 S6\5      r1 " S7 S8\5      r2 " S9 S:\5      r3 " S; S<\5      r4 " S= S>\5      r5 " S? S@\5      r6 " SA SB\5      r7 " SC SD\5      r8 " SE SF\5      r9 " SG SH\5      r: " SI SJ\5      r; " SK SL\5      r< " SM SN\5      r= " SO SP\5      r> " SQ SR\5      r? " SS ST\5      r@ " SU SV\5      rA " SW SX\5      rB " SY SZ\5      rC " S[ S\\5      rD " S] S^\5      rE " S_ S`\5      rF " Sa Sb\5      rG " Sc Sd\5      rH " Se Sf\5      rI " Sg Sh\5      rJ " Si Sj\5      rK " Sk Sl\5      rL " Sm Sn\5      rM " So Sp\5      rN " Sq Sr\5      rO " Ss St\5      rP " Su Sv\5      rQ " Sw Sx\5      rR " Sy Sz\5      rS " S{ S|\5      rTg)}    N)	dataclass)EnumFlagIntEnumIntFlag)intern)OptionalTupleUnion)convert_to_device_color   )Namewrap_in_local_contextc                       \ rS rSrSr SrSrg)SignatureFlag   r       N)__name__
__module____qualname____firstlineno__SIGNATURES_EXISTAPPEND_ONLY__static_attributes__r       D/home/james-whalen/.local/lib/python3.13/site-packages/fpdf/enums.pyr   r      s    AKr   r   c                   ,    \ rS rSrSr\SS j5       rSrg)CoerciveEnum   zQAn enumeration that provides a helper to coerce strings into enumeration members.c                 F   [        X5      (       a  U$ [        U[        5      (       a	   U " U5      $ [        U SU R
                   35      e! [         a     Of = f U(       a  X   $ XR                  5          $ ! [         a     Of = f[        U SU R
                   35      e)ag  
Attempt to coerce `value` into a member of this enumeration.

If value is already a member of this enumeration it is returned unchanged.
Otherwise, if it is a string, attempt to convert it as an enumeration value. If
that fails, attempt to convert it (case insensitively, by upcasing) as an
enumeration name.

If all different conversion attempts fail, an exception is raised.

Args:
    value (Enum, str): the value to be coerced.

Raises:
    ValueError: if `value` is a string but neither a member by name nor value.
    TypeError: if `value`'s type is neither a member of the enumeration nor a
        string.
 is not a valid z cannot be converted to a )
isinstancestr
ValueErrorupperKeyErrorr   	TypeError)clsvaluecase_sensitives      r   coerceCoerciveEnum.coerce   s    * e!!LeS!!5z! 5'!;CLL>JKK  %3szK[[]9KK  w&6s||nEFFs)   A 
AA
A9 'A9 9
BBr   N)Fr   r   r   r   __doc__classmethodr,   r   r   r   r   r   r      s    W#L #Lr   r   c                   (    \ rS rSrSr\S 5       rSrg)CoerciveIntEnumA   z`
An enumeration that provides a helper to coerce strings and integers into
enumeration members.
c                 6   [        X5      (       a  U$ [        U[        5      (       a   XR                  5          $ [        U[        5      (       a  U " U5      $ [        U SU R
                   35      e! [         a    [	        U SU R
                   35      Sef = f)a  
Attempt to coerce `value` into a member of this enumeration.

If value is already a member of this enumeration it is returned unchanged.
Otherwise, if it is a string, attempt to convert it (case insensitively, by
upcasing) as an enumeration name. Otherwise, if it is an int, attempt to
convert it as an enumeration value.

Otherwise, an exception is raised.

Args:
    value (IntEnum, str, int): the value to be coerced.

Raises:
    ValueError: if `value` is an int but not a member of this enumeration.
    ValueError: if `value` is a string but not a member by name.
    TypeError: if `value`'s type is neither a member of the enumeration nor an
        int or a string.
r"   N cannot convert to a r#   r$   r&   r'   r%   r   intr(   )r)   r*   s     r   r,   CoerciveIntEnum.coerceG   s    * e!!LeS!!U;;=)) eS!!u:5'!6s||nEFF  U E7*:3<<.!IJPTTUs   A2 2&Br   Nr.   r   r   r   r2   r2   A   s    
  G  Gr   r2   c                   (    \ rS rSrSr\S 5       rSrg)CoerciveIntFlagk   z
Enumerated constants that can be combined using the bitwise operators,
with a helper to coerce strings and integers into enumeration members.
c                    [        X5      (       a  U$ [        U[        5      (       a   XR                  5          $ [        U[        5      (       a  U " U5      $ [        U SU R
                   35      e! [         a     Of = f XS   R                  5          nUSS  H  nX UR                  5          -  nM     U$ ! [         a    [	        U SU R
                   35      Sef = f)a  
Attempt to coerce `value` into a member of this enumeration.

If value is already a member of this enumeration it is returned unchanged.
Otherwise, if it is a string, attempt to convert it (case insensitively, by
upcasing) as an enumeration name. Otherwise, if it is an int, attempt to
convert it as an enumeration value.
Otherwise, an exception is raised.

Args:
    value (IntEnum, str, int): the value to be coerced.

Raises:
    ValueError: if `value` is an int but not a member of this enumeration.
    ValueError: if `value` is a string but not a member by name.
    TypeError: if `value`'s type is neither a member of the enumeration nor an
        int or a string.
r   r   Nr"   r5   r6   )r)   r*   flagschars       r   r,   CoerciveIntFlag.coerceq   s    ( e!!LeS!!;;=)) eS!!u:5'!6s||nEFF  U!HNN,-!!"ID!

$55E & U E7*:3<<.!IJPTTUs   A2 2
A?>A?7B; ;&C!r   Nr.   r   r   r   r:   r:   k   s    
 &G &Gr   r:   c                   :    \ rS rSrSr\" S5      r \" S5      rSrg)WrapMode   z7Defines how to break and wrap lines in multi-line text.WORDCHARr   N)	r   r   r   r   r/   r   rC   rD   r   r   r   r   rA   rA      s    =&>D&>Dr   rA   c                   p    \ rS rSrSr\" S5      r \" S5      r \" S5      r \" S5      r	 \" S5      r
Srg	)
CharVPos   z;Defines the vertical position of text relative to the line.SUPSUBNOMDENOMLINEr   N)r   r   r   r   r/   r   rH   rI   rJ   rK   rL   r   r   r   r   rF   rF      sA    A
-C
-C
-C7OE&>Dr   rF   c                      ^  \ rS rSrSr\" S5      r \" S5      r \" S5      r \" S5      r	 \" S5      r
 \U 4S j5       rS	rU =r$ )
Align   z$Defines how to render text in a cellCENTERX_CENTERLEFTRIGHTJUSTIFYc                    > US:X  a  U R                   $ [        U[        5      (       a  UR                  5       n[        X ]  U5      $ N )Lr#   r$   r&   superr,   r)   r*   	__class__s     r   r,   Align.coerce   s;    B;55LeS!!KKMES%e,,r   r   )r   r   r   r   r/   r   CXrX   RJr0   r,   r   __classcell__r[   s   @r   rN   rN      sY    *xAzA8vAwAyA - -r   rN   c                   l   ^  \ rS rSrSr\" S5      r \" S5      r \" S5      r \	U 4S j5       r
SrU =r$ )VAlign   zHDefines how to vertically render text in a cell.
Default value is MIDDLEMIDDLETOPBOTTOMc                 D   > US:X  a  U R                   $ [        X ]  U5      $ rV   )MrY   r,   rZ   s     r   r,   VAlign.coerce   s#    B;55LS%e,,r   r   )r   r   r   r   r/   r   rj   TBr0   r,   r   ra   rb   s   @r   rd   rd      sD     	xAuACxAF - -r   rd   c                   x   ^  \ rS rSrSrSr Sr Sr Sr Sr	 \
S 5       rSS	 jrSS
 jr\U 4S j5       rSrU =r$ )TextEmphasis   zz
Indicates use of bold / italics / underline.

This enum values can be combined with & and | operators:
    style = B | I
r   r   r         c                 ~   ^  SR                  U 4S jT R                  R                  R                  5        5       5      $ )NrW   c              3   D   >#    U  H  u  pUT-  (       d  M  Uv   M     g 7fNr   ).0namer*   selfs      r   	<genexpr>%TextEmphasis.style.<locals>.<genexpr>  s       
$F[T%RV,DD$Fs    	 )joinr[   __members__itemsrx   s   `r   styleTextEmphasis.style   s4    ww 
$(NN$>$>$D$D$F
 
 	
r   c                 
    X-  $ ru   r   rx   r*   s     r   addTextEmphasis.add  s
    |r   c                 t   ^ [         R                  SR                  U4S jU R                   5       5      5      $ )NrW   c              3   J   >#    U  H  oTR                   ;  d  M  Uv   M     g 7fru   )r   )rv   sr*   s     r   ry   &TextEmphasis.remove.<locals>.<genexpr>  s     Bz!ekk-AAAzs   #	#)ro   r,   r{   r   r   s    `r   removeTextEmphasis.remove	  s,    ""GGBtzzBB
 	
r   c                 n  > [        U[        5      (       a  US:X  a  U R                  $ UR                  5       S:X  a  U R                  $ UR                  5       S:X  a  U R
                  $ UR                  5       S:X  a  U R                  $ UR                  5       S:X  a  U R                  $ [        X ]'  U5      $ )NrW   BOLDITALICS	UNDERLINESTRIKETHROUGH)
r#   r$   NONEr&   rm   IUSrY   r,   rZ   s     r   r,   TextEmphasis.coerce  s    eS!!{xx{{}&uu{{}	)uu{{}+uu{{}/uuS%e,,r   r   )r*   ro   )r   r   r   r   r/   r   rm   r   r   r   propertyr   r   r   r0   r,   r   ra   rb   s   @r   ro   ro      sb     D	A
	A	A	A
 



 - -r   ro   c                   (    \ rS rSrSrSr Sr SrSrg)MethodReturnValuei  z
Defines the return value(s) of a FPDF content-rendering method.

This enum values can be combined with & and | operators:
    PAGE_BREAK | LINES
r   r   rq   r   N)	r   r   r   r   r/   
PAGE_BREAKLINESHEIGHTr   r   r   r   r   r     s!     JJE[F=r   r   c                      ^  \ rS rSrSrSr Sr Sr Sr Sr	 \\-  \-  \	-  r
 Sr \U 4S	 j5       rU 4S
 jrU 4S jrS rSrU =r$ )CellBordersLayouti0  a  Defines how to render cell borders in table

The integer value of `border` determines which borders are applied. Below are some common examples:

- border=1 (LEFT): Only the left border is enabled.
- border=3 (LEFT | RIGHT): Both the left and right borders are enabled.
- border=5 (LEFT | TOP): The left and top borders are enabled.
- border=12 (TOP | BOTTOM): The top and bottom borders are enabled.
- border=15 (ALL): All borders (left, right, top, bottom) are enabled.
- border=16 (INHERIT): Inherit the border settings from the parent element.

Using `border=3` will combine LEFT and RIGHT borders, as it represents the
bitwise OR of `LEFT (1)` and `RIGHT (2)`.
r   r   r   rq   rr      c                 n   > [        U[        5      (       a  US:  a  [        S5      e[        TU ]  U5      $ Nr   z,INHERIT cannot be combined with other values)r#   r7   r%   rY   r,   rZ   s     r   r,   CellBordersLayout.coerceU  s1    eS!!ebjKLLw~e$$r   c                 H   > [         TU ]  U5      nUS:  a  [        S5      eU$ r   )rY   __and__r%   rx   r*   r[   s     r   r   CellBordersLayout.__and__[  s)    &2:KLLr   c                 H   > [         TU ]  U5      nUS:  a  [        S5      eU$ r   )rY   __or__r%   r   s     r   r   CellBordersLayout.__or__a  s)    u%2:KLLr   c                    / nU [         R                  -  (       a  UR                  S5        U [         R                  -  (       a  UR                  S5        U [         R                  -  (       a  UR                  S5        U [         R
                  -  (       a  UR                  S5        U(       a  SR                  U5      $ S$ )NrX   r_   rl   rm   rW   r   )r   rR   appendrS   rg   rh   r{   )rx   
border_strs     r   __str__CellBordersLayout.__str__g  s    
#(((c"#)))c"#'''c"#***c"&0rwwz"<f<r   r   )r   r   r   r   r/   r   rR   rS   rg   rh   ALLINHERITr0   r,   r   r   r   r   ra   rb   s   @r   r   r   0  sv     D(D.E/
C-F0
,
v
%C)G>% %

= 
=r   r   c                       \ rS rSr% SrSr\\   \S'   Sr	\
\\\\\4   4   \S'   Sr\\   \S'   Sr\\S'   Sr\\S	'   \S
 5       rS rS r\S 5       rS rS rS rSS jrSS jrSS jrS r\S 5       rS rSrg)TableBorderStyleit  zA helper class for drawing one border of a table

Attributes:
    thickness: The thickness of the border. If None use default. If <= 0 don't draw the border.
    color: The color of the border. If None use default.
N	thicknesscolordash        gapphasec                 d    [        U [        5      (       a  U $ U (       a
  [        5       $ [        SS9$ )z[
From boolean or TableBorderStyle input, convert to definite TableBorderStyle class object
r   r   r#   r   )should_draws    r   	from_boolTableBorderStyle.from_bool  s/    
 k#344#%%#..r   c                     U R                   SL=(       a/    U R                   S:  =(       a    U R                   UR                  :g  $ )zTReturn True if this style changes the thickness of the draw command, False otherwiseNr   r   
line_widthrx   pdfs     r   _changes_thickness#TableBorderStyle._changes_thickness  s;     NN$& 1$1#..0	
r   c                 ^    U R                   SL=(       a    U R                   UR                  :g  $ )zPReturn True if this style changes the color of the draw command, False otherwiseN)r   
draw_colorr   s     r   _changes_colorTableBorderStyle._changes_color  s#    zz%F$***FFr   c                 J    U R                   U R                  U R                  S.$ )zGReturn dict object specifying dash in the same format as the pdf objectr   r   r   r   r~   s    r   	dash_dictTableBorderStyle.dash_dict  s     		$((TZZHHr   c                 ^    U R                   SL=(       a    U R                  UR                  :g  $ )zOReturn True if this style changes the dash of the draw command, False otherwiseN)r   r   dash_patternr   s     r   _changes_dashTableBorderStyle._changes_dash  s%    yy$K3;K;K)KKr   c                     U R                  5       =(       aA    U R                  U5      =(       d)    U R                  U5      =(       d    U R                  U5      $ )zUReturn True if this style changes the any aspect of the draw command, False otherwise)should_renderr   r   r   r   s     r   changes_strokeTableBorderStyle.changes_stroke  sL    !!# 
$ '&&s+'!!#&	
r   c                 J    U R                   SL =(       d    U R                   S:  $ )zDReturn True if this style produces a visible stroke, False otherwiseNr   r   r~   s    r   r   TableBorderStyle.should_render  s    ~~%=#)==r   c                 T    Uc  U R                   OUR                  nUc  / $ X1-  S S3/$ )zUReturn list with string for the draw command to change thickness (empty if no change).2fz wr   )rx   scaler   r   s       r   _get_change_thickness_command.TableBorderStyle._get_change_thickness_command  s5    &)kDNNs~~	&rJ	0A#/Fb-I,JJr   c                     Uc  U R                   nOUR                  nUc  / $ [        U5      R                  5       R	                  5       /$ )zQReturn list with string for the draw command to change color (empty if no change))r   r   r   	serializer&   )rx   r   r   s      r   _get_change_line_color_command/TableBorderStyle._get_change_line_color_command  sN    ;JJENNE } 	
 *%0::<BBDE	
r   c                     Uc  U R                   OUR                  nUS   US   US   penUc  / $ US::  a  S/$ US::  a  SXA-  S SXa-  S S	3/$ SXA-  S S
XQ-  S SXa-  S S	3/$ )zPReturn list with string for the draw command to change dash (empty if no change)r   r   r   r   z[] 0 d[z.3fz] z d )r   r   )rx   r   r   r   r   r   r   s          r   _get_change_dash_command)TableBorderStyle._get_change_dash_command  s    &)kDNNs7G7G	$V,i.>	'@R5<I19:!8S)EM#+>bABBDL%Qs{3&7r%-9LBOPPr   c                 j    U R                  U5      U R                  5       -   U R                  U5      -   $ )zQReturn list of strings for the draw command to change stroke (empty if no change))r   r   r   )rx   r   s     r   get_change_stroke_commands+TableBorderStyle.get_change_stroke_commands  s;     ))%011340078	
r   c                 (    U S SUS SUS SUS S3/$ )zQReturn list with string for the command to draw a line at the specified endpointsr   r   z m z l Sr   )x1y1x2y2s       r   get_line_command!TableBorderStyle.get_line_command  s.     c(!Bs83r#ha3xt<==r   c                     U R                  5       (       d  / $ U R                  U5      (       a7  U R                  UR                  S9U R	                  X#XE5      -   n[        U5      $ U R	                  X#XE5      $ )zm
Get draw commands for this section of a cell border. x and y are presumed to be already
shifted and scaled.
)r   )r   r   r   kr   r   )rx   r   r   r   r   r   draw_commandss          r   get_draw_commands"TableBorderStyle.get_draw_commands  sz    
 !!##Is## ;;ee < %%bb56M )77$$RR44r   r   ru   ) r   r   r   r   r/   r   r	   float__annotations__r   r   r7   r
   r   r   r   staticmethodr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   t  s     "&Ix%.2E5eCcM**+2 D(5/ CE5/ /
G I IL
>K



Q
 > >5r   r   c                       \ rS rSr% SrSr\\\4   \	S'   Sr
\\\4   \	S'   Sr\\\4   \	S'   Sr\\\4   \	S'   S r\S	 5       rSS jrS rS rS rS\4S jrSS jrSrg
)TableCellStylei  a  A helper class for drawing all the borders of one cell in a table

Attributes:
    left: bool or TableBorderStyle specifying the style of the cell's left border
    bottom: bool or TableBorderStyle specifying the style of the cell's bottom border
    right: bool or TableBorderStyle specifying the style of the cell's right border
    top: bool or TableBorderStyle specifying the style of the cell's top border
Fleftbottomrighttopc                   ^ [        S U R                  U R                  U R                  U R                  4 5       5      (       a  [        S U R                  U R                  U R                  U R                  4 5       5      (       a  g[        S U R                  U R                  U R                  U R                  4 5       5      (       a  g g[        S U R                  U R                  U R                  U R                  4 5       5      (       aI  U R                  m[        U4S jU R                  U R                  U R                  4 5       5      (       a  T$ g)	zRReturn bool or TableBorderStyle if all borders have the same style, otherwise Nonec              3   B   #    U  H  n[        U[        5      v   M     g 7fru   )r#   boolrv   borders     r   ry   :TableCellStyle._get_common_border_style.<locals>.<genexpr>  s!      
H vt$$H   c              3   $   #    U  H  ov   M     g 7fru   r   r   s     r   ry   r     s     W(Vf6(Vs   Tc              3   .   #    U  H  o(       + v   M     g 7fru   r   r   s     r   ry   r    s      )Wv

)Ws   Fc              3   B   #    U  H  n[        U[        5      v   M     g 7fru   r   r   s     r   ry   r    s"      
H v/00Hr  c              3   ,   >#    U  H	  oT:H  v   M     g 7fru   r   )rv   r   commons     r   ry   r    s     V2UV#2Us   N)allr   r   r   r   )rx   r  s    @r   _get_common_border_style'TableCellStyle._get_common_border_style  s    
99dkk4::txxH
 
 
 WDKKTXX(VWWW *.))T[[$**dhh)W      
99dkk4::txxH
 
 
 YYFV4;;

DHH2UVVVr   c                 \    U c  / $ [        U 5      R                  5       R                  5       /$ )zSReturn list with string for command to change device color (empty list if no color))r   r   lower)r   s    r   get_change_fill_color_command,TableCellStyle.get_change_fill_color_command  s7    
 } 	
 *%0::<BBDE	
r   Nc           
      F   UR                   U-
  nUR                   U-
  nUR                  nX'-  nX7-  nXG-  nXW-  nU R                  5       nUc  U R                  X#XEX5      O+USL a  U R	                  X#XEX5      OU R                  X#XEXXx5      u  pU
(       a  [        U	5      n	U	$ )zn
Get list of primitive commands to draw the cell border for this cell, and fill it with the
given fill color.
F)hr   r	  _draw_when_no_common_style_draw_with_no_border_draw_all_borders_the_samer   )rx   r   r   r   r   r   
fill_colorr   common_border_styler   
needs_wraps              r   r    TableCellStyle.get_draw_commands  s     UURZUURZ



";;= #* ++BBCL '%/ ))""#J44BCU 	" 1-@Mr   c           
      f   Sn/ nUbV  XeR                   :w  a"  SnUR                  U R                  U5      5        UR                  US SUS SX1-
  S SX$-
  S S35        UR                  [        R                  U R                  5      R                  XQXAU5      [        R                  U R                  5      R                  XQXCU5      -   [        R                  U R                  5      R                  XSXCU5      -   [        R                  U R                  5      R                  XQX#U5      -   5        X4$ )zIGet draw commands for case when some of the borders have different stylesFTr   r    re f)r  extendr  r   r   r   r   r   r   r   r   	rx   r   r   r   r   r   r  r  r   s	            r   r  )TableCellStyle._draw_when_no_common_style9  s(   
!^^+!
$$T%G%G
%ST  Bs81RHAbgc]!BGC=PU!VW&&tyy1CCCRUWX((5GG ((4FF	 ((2DD		
 ((r   c           
          Sn/ nUbV  XeR                   :w  a"  SnUR                  U R                  U5      5        UR                  US SUS SX1-
  S SX$-
  S S35        X4$ )zFGet draw commands for case when all of the borders are off / not drawnFTr   r   r  )r  r  r  r   r  s	            r   r  #TableCellStyle._draw_with_no_borderR  sw    
!^^+!
$$T%G%G
%ST  Bs81RHAbgc]!BGC=PU!VW((r   c	           
         Sn	/ n
[        U[        5      (       a8  UR                  U5      (       a"  U
R                  UR	                  U5      5        Sn	UbY  XeR
                  :w  a"  Sn	U
R                  U R                  U5      5        U
R                  US SUS SX1-
  S SX$-
  S S35        X4$ U
R                  US SUS SX1-
  S SX$-
  S S35        X4$ )zCGet draw commands for case when all the borders have the same styleFTr   r   z re Bz re S)r#   r   r   r  r   r  r  r   )rx   r   r   r   r   r   r  r   r  r  r   s              r   r  )TableCellStyle._draw_all_borders_the_same^  s     
!1
 
!0055  !4!O!OPU!VWJ!^^+!
$$T%G%G
%ST  Bs81RHAbgc]!BGC=PU!VW ((   Bs81RHAbgc]!BGC=PU!VW((r   cell_borderc           	         U[         R                  :X  a  U $ [        [        U[         R                  -  5      [        U[         R
                  -  5      [        U[         R                  -  5      [        U[         R                  -  5      S9$ )z-Allow override by CellBordersLayout mechanismr   r   r   r   )r   r   r   r   rR   rh   rS   rg   )rx   r!  s     r   override_cell_border#TableCellStyle.override_cell_borderv  s|     /777 		
  +(9(>(>>?K*;*B*BBC;):)@)@@A'8'<'<<=			
r   c                 b    UR                  SR                  U R                  XX4XVS95      5        g)zL
Draw the cell border for this cell, and fill it with the given fill color.
r   )r  N)_outr{   r   )rx   r   r   r   r   r   r  s          r   draw_cell_borderTableCellStyle.draw_cell_border  s.     	HHT++CRR+WX	
r   r   ru   )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     s     +0D%&&
'/,1FE$(()1+0E5''(0).Ct%%	&.* 
 
B)2
))0
0A 

r   r   c                   T    \ rS rSrSr\R                  S\4S j5       r\	S 5       r
Srg)TableBordersLayouti  a  
Customizable class for setting the drawing style of cell borders for the whole table.
cell_style_getter is an abstract method that derived classes must implement. All current classes
do not use self, but it is available in case a very complicated derived class needs to refer to
stored internal data.

Standard TableBordersLayouts are available as static members of this class

Attributes:
    cell_style_getter: a callable that takes row_num, column_num,
        num_heading_rows, num_rows, num_columns; and returns the drawing style of
        the cell border (as a TableCellStyle object)
    ALL: static TableBordersLayout that draws all table cells borders
    NONE: static TableBordersLayout that draws no table cells borders
    INTERNAL: static TableBordersLayout that draws only internal horizontal & vertical borders
    MINIMAL: static TableBordersLayout that draws only the top horizontal border, below the
        headings, and internal vertical borders
    HORIZONTAL_LINES: static TableBordersLayout that draws only horizontal lines
    NO_HORIZONTAL_LINES: static TableBordersLayout that draws all cells border except interior
        horizontal lines after the headings
    SINGLE_TOP_LINE: static TableBordersLayout that draws only the top horizontal border, below
        the headings
returnc                     [         e)a  Specify the desired TableCellStyle for the given position in the table

Args:
    row_idx: the 0-based index of the row in the table
    col_idx: the 0-based logical index of the cell in the row. If colspan > 1, this indexes
        into non-null cells. e.g. if there are two cells with colspan = 3, then col_idx will
        be 0 or 1
    col_pos: the 0-based physical position of the cell in the row. If colspan > 1, this
        indexes into all cells including null ones. e.g. e.g. if there are two cells with
        colspan = 3, then col_pos will be 0 or 3
    num_heading_rows: the number of rows in the table heading
    num_rows: the total number of rows in the table
    num_col_idx: the number of non-null cells. e.g. if there are two cells with colspan = 3,
        then num_col_idx = 2
    num_col_pos: the full width of the table in physical cells. e.g. if there are two cells
        with colspan = 3, then num_col_pos = 6
Returns:
    TableCellStyle for the given position in the table
)NotImplementedErrorrx   row_idxcol_idxcol_posnum_heading_rowsnum_rowsnum_col_idxnum_col_poss           r   cell_style_getter$TableBordersLayout.cell_style_getter  s
    < "!r   c                     [        X5      (       a  U$ [        U[        5      (       a-   [        XR                  5       5      n[        X 5      (       a  U$  [	        U SU R
                   35      e! [         a     N&f = f)aa  
Attempt to coerce `value` into a member of this class.

If value is already a member of this enumeration it is returned unchanged.
Otherwise, if it is a string, attempt to convert it as an enumeration value. If
that fails, attempt to convert it (case insensitively, by upcasing) as an
enumeration name.

If all different conversion attempts fail, an exception is raised.

Args:
    value (Enum, str): the value to be coerced.

Raises:
    ValueError: if `value` is a string but neither a member by name nor value.
    TypeError: if `value`'s type is neither a member of the enumeration nor a
        string.
r"   )r#   r$   getattrr&   r%   r   )r)   r*   coerced_values      r   r,   TableBordersLayout.coerce  s}    * e!!LeS!! '[[] ;m11(( 2
 E7"23<<.ABB  s   *A/ /
A<;A<r   N)r   r   r   r   r/   abcabstractmethodr   r7  r0   r,   r   r   r   r   r+  r+    sA    0 	" 
" "> C Cr   r+  c                       \ rS rSrSrS rSrg)TableBordersLayoutAlli  z"Class for drawing all cell bordersc                     [        SSSSS9$ )NTr#  r   r/  s           r   r7  'TableBordersLayoutAll.cell_style_getter  s     4DdKKr   r   Nr   r   r   r   r/   r7  r   r   r   r   r@  r@    s    ,
Lr   r@  c                       \ rS rSrSrS rSrg)TableBordersLayoutNonei  z#Class for drawing zero cell bordersc                     [        SSSSS9$ )NFr#  rB  r/  s           r   r7  (TableBordersLayoutNone.cell_style_getter  s     5eOOr   r   NrD  r   r   r   rF  rF    s    -
Pr   rF  c                       \ rS rSrSrS rSrg)TableBordersLayoutInternali  z9Class to draw only internal horizontal & vertical bordersc                 :    [        US:  XS-
  :  X&S-
  :  US:  S9$ Nr   r   r#  rB  r/  s           r   r7  ,TableBordersLayoutInternal.cell_style_getter  s3     1\)!O+!	
 	
r   r   NrD  r   r   r   rJ  rJ    s
    C
r   rJ  c                       \ rS rSrSrS rSrg)TableBordersLayoutMinimali)  za
Class to draw only the top horizontal border, below the headings, and internal vertical borders
c                 X    [        US:  X:  X&S-
  :  SUs=:  =(       a    U:*  S9$ s  S9$ rL  rB  r/  s           r   r7  +TableBordersLayoutMinimal.cell_style_getter.  sH     1-!O+G////	
 	
 0	
 	
r   r   NrD  r   r   r   rO  rO  )  s    
r   rO  c                       \ rS rSrSrS rSrg)!TableBordersLayoutHorizontalLinesiD  z#Class to draw only horizontal linesc                 *    [        SXS-
  :  SUS:  S9$ )NFr   r   r#  rB  r/  s           r   r7  3TableBordersLayoutHorizontalLines.cell_style_getterG  s(     \)!	
 	
r   r   NrD  r   r   r   rS  rS  D  s
    -
r   rS  c                       \ rS rSrSrS rSrg)#TableBordersLayoutNoHorizontalLinesi]  zRClass to draw all cells border except interior horizontal lines after the headingsc                 (    [        SXS-
  :H  SX:*  S9$ )NTr   r#  rB  r/  s           r   r7  5TableBordersLayoutNoHorizontalLines.cell_style_getter`  s'     l*+	
 	
r   r   NrD  r   r   r   rW  rW  ]  s
    \
r   rW  c                       \ rS rSrSrS rSrg)TableBordersLayoutSingleTopLineiv  zClass to draw a single top linec                 $    [        SXS-
  :*  SSS9$ )NFr   r#  rB  r/  s           r   r7  1TableBordersLayoutSingleTopLine.cell_style_gettery  s#     wQ*>>eQV
 	
r   r   NrD  r   r   r   r[  r[  v  s
    )
r   r[  c                      ^  \ rS rSrSr\" S5      r \" S5      r \" S5      r \" S5      r	 \" S5      r
 \" S5      r \U 4S	 j5       rS
 rSrU =r$ )TableCellFillModei  z!Defines which table cells to fillr   r   ROWSCOLUMNS	EVEN_ROWSEVEN_COLUMNSc                 \   > [        [        USS5      5      (       a  U$ [        TU ]  U5      $ )zgAny class that has a .should_fill_cell() method is considered a valid 'TableCellFillMode' (duck-typing)should_fill_cellN)callabler:  rY   r,   rZ   s     r   r,   TableCellFillMode.coerce  s.     GE#5t<==Lw~e$$r   c                     X R                   L a  gX R                  L a  gX R                  L a  US-  S:H  $ X R                  L a  US-  S:H  $ X R                  L a  US-  S:H  $ X R
                  L a  US-  S:H  $ [        e)NFTr   r   r   )r   r   r`  ra  rb  rc  r.  )rx   ijs      r   re  "TableCellFillMode.should_fill_cell  s    998899q5A:<<q5A:>>!q5A:$$$q5A:!!r   r   )r   r   r   r   r/   r   r   r   r`  ra  rb  rc  r0   r,   re  r   ra   rb   s   @r   r_  r_    so    '&>D
-C&>D'YG*{#I(.)L+ % %" "r   r_  c                   6    \ rS rSr\" S5      r \" S5      rSrg)	TableSpani  ROWCOLr   N)r   r   r   r   r   rn  ro  r   r   r   r   rm  rm    s    
-C:
-C=r   rm  c                   "    \ rS rSrSrSr SrSrg)TableHeadingsDisplayi  z2Defines how the table headings should be displayedr   r   r   N)r   r   r   r   r/   r   ON_TOP_OF_EVERY_PAGEr   r   r   r   rq  rq    s    8DE_r   rq  c                      ^  \ rS rSrSr\" S5      r \" S5      r \" S5      r \	S 5       r
\	S 5       r\	S 5       r\U 4S	 j5       rS
rU =r$ )RenderStylei  zDefines how to render shapesDRAWFILL	DRAW_FILLc                 T    U R                   SU R                  SU R                  S0U    $ )Nr   frm   )DFDFr~   s    r   operatorRenderStyle.operator  s&    TVVS$''37==r   c                 6    X R                   U R                  4;   $ ru   )rz  r|  r~   s    r   is_drawRenderStyle.is_draw      (((r   c                 6    X R                   U R                  4;   $ ru   )r{  r|  r~   s    r   is_fillRenderStyle.is_fill  r  r   c                 V   > U(       d  U R                   $ US:X  a  Sn[        X ]  U5      $ )NFDr|  )rz  rY   r,   rZ   s     r   r,   RenderStyle.coerce  s+    55LD=ES%e,,r   r   )r   r   r   r   r/   r   rz  r{  r|  r   r}  r  r  r0   r,   r   ra   rb   s   @r   rt  rt    s    "vA 	vA
 
	B> > ) ) ) ) - -r   rt  c                   8    \ rS rSrSrSrSrSrSrSr	Sr
S	rS
rSrg)TextModei  z:Values described in PDF spec section 'Text Rendering Mode'r   r   r      rq            r   N)r   r   r   r   r/   rv  STROKEFILL_STROKE	INVISIBLE	FILL_CLIPSTROKE_CLIPFILL_STROKE_CLIPCLIPr   r   r   r   r  r    s.    @DFKIIKDr   r  c                       \ rS rSrSr\" S5      r \" S5      r \" S5      r \" S5      r	 \" S5      r
 \" S5      r \" S	5      r \" S
5      rSrg)XPosi  zFPositional values in horizontal direction for use after printing text.rR   rS   STARTENDWCONTrP   LMARGINRMARGINr   N)r   r   r   r   r/   r   rR   rS   r  r  r  rP   r  r  r   r   r   r   r  r    sh    L&>D7OE%7OE
-C7OE9HFYG0YG/r   r  c                   p    \ rS rSrSr\" S5      r \" S5      r \" S5      r \" S5      r	 \" S5      r
Srg	)
YPosi  zCPositional values in vertical direction for use after printing textrg   LASTNEXTTMARGINBMARGINr   N)r   r   r   r   r/   r   rg   r  r  r  r  r   r   r   r   r  r    sC    I
-C%&>D=&>D/YG/YG0r   r  c                   8    \ rS rSrSrSrSrSrSrSr	Sr
S	rS
rSrg)Anglei0  zTDirection values used for mirror transformations specifying the angle of mirror lineZ   r   i     -   i;        r   N)r   r   r   r   r/   NORTHEASTSOUTHWEST	NORTHEAST	SOUTHEAST	SOUTHWEST	NORTHWESTr   r   r   r   r  r  0  s-    ZEDEDIIIIr   r  c                       \ rS rSrSr\" S5      r \" S5      r \" S5      r \" S5      r	 \" S5      r
 \" S5      rS	rg
)
PageLayouti=  zASpecify the page layout shall be used when the document is opened
SinglePage	OneColumnTwoColumnLeftTwoColumnRightTwoPageLeftTwoPageRightr   N)r   r   r   r   r/   r   SINGLE_PAGE
ONE_COLUMNTWO_COLUMN_LEFTTWO_COLUMN_RIGHTTWO_PAGE_LEFTTWO_PAGE_RIGHTr   r   r   r   r  r  =  sU    G|$K k"J%?+OK,-L'MJ.)NKr   r  c                       \ rS rSrSr\" S5      r \" S5      r \" S5      r \" S5      r	 \" S5      r
 \" S5      rS	rg
)PageModeiS  zBSpecifying how to display the document on exiting full-screen modeUseNoneUseOutlines	UseThumbs
FullScreenUseOCUseAttachmentsr   N)r   r   r   r   r/   r   USE_NONEUSE_OUTLINES
USE_THUMBSFULL_SCREENUSE_OCUSE_ATTACHMENTSr   r   r   r   r  r  S  sR    HIH;&Lk"J|$KV']F*+,Or   r  c                   X    \ rS rSrSr\" S5      r\" S5      r\" S5      r\" S5      r	Sr
g)	TextMarkupTypeii  z#Subtype of a text markup annotation	Highlight	UnderlineSquiggly	StrikeOutr   N)r   r   r   r   r/   r   	HIGHLIGHTr   SQUIGGLY
STRIKE_OUTr   r   r   r   r  r  i  s-    )[!I[!IJHk"Jr   r  c                   6   \ rS rSrSr\" S5      r \" S5      r \" S5      r \" S5      r	 \" S5      r
 \" S5      r \" S	5      r \" S
5      r \" S5      r \" S5      r \" S5      r \" S5      r \" S5      r \" S5      r \" S5      r \" S5      rSrg)	BlendModeiu  zLAn enumeration of the named standard named blend functions supported by PDF.NormalMultiplyScreenOverlayDarkenLighten
ColorDodge	ColorBurn	HardLight	SoftLight
Difference	ExclusionHue
SaturationColor
Luminosityr   N)r   r   r   r   r/   r   NORMALMULTIPLYSCREENOVERLAYDARKENLIGHTENCOLOR_DODGE
COLOR_BURN
HARD_LIGHT
SOFT_LIGHT
DIFFERENCE	EXCLUSIONHUE
SATURATIONCOLOR
LUMINOSITYr   r   r   r   r  r  u  s    R(^F<JH<(^F 9oG (^FA9oGB|$K k"J k"J k"J l#JV[!I
 u+C l#J
 ME
 l#Jr   r  c                       \ rS rSrSr\" S5      r \" S5      r \" S5      r \" S5      r	 \" S5      r
 \" S5      r \" S	5      r \" S
5      r \" S5      r \" S5      r \" S5      r \" S5      rSrg)CompositingOperationi  z5An enumeration of Porter-Duff compositing operations.ClearSourceDestination
SourceOverDestinationOverSourceInDestinationIn	SourceOutDestinationOut
SourceAtopDestinationAtopXORr   N)r   r   r   r   r/   r   CLEARSOURCEDESTINATIONSOURCE_OVERDESTINATION_OVER	SOURCE_INDESTINATION_IN
SOURCE_OUTDESTINATION_OUTSOURCE_ATOPDESTINATION_ATOPr  r   r   r   r   r  r    s    ;ME(^F }%K%|$K>-.>Z Ii/*Nik"JU+,OU|$K C-. C
u+CUr   r  c                   N    \ rS rSrSr Sr Sr Sr Sr Sr	 Sr
 S	r S
r SrSrg)AnnotationFlagi  r   r   rq   rr   r       @            r   N)r   r   r   r   r  HIDDENPRINTNO_ZOOM	NO_ROTATENO_VIEW	READ_ONLYLOCKEDTOGGLE_NO_VIEWLOCKED_CONTENTSr   r   r   r   r  r    s^    I FZE<G`I\G_I F NNOUr   r  c                   x    \ rS rSrSr\" S5      r\" S5      r\" S5      r\" S5      r	\" S5      r
\" S5      rS	rg
)AnnotationNamei  CThe name of an icon that shall be used in displaying the annotationNoteCommentHelp	ParagraphNewParagraphInsertr   N)r   r   r   r   r/   r   NOTECOMMENTHELP	PARAGRAPHNEW_PARAGRAPHINSERTr   r   r   r   r#  r#    s=    I<D9oG<D[!I(M(^Fr   r#  c                   H    \ rS rSrSr\" S5      r\" S5      r\" S5      rSr	g)FileAttachmentAnnotationNamei  r$  PushPinGraphPushPinPaperclipTagr   N)
r   r   r   r   r/   r   PUSH_PINGRAPH_PUSH_PINPAPERCLIP_TAGr   r   r   r   r2  r2    s"    IIH.)N(Mr   r2  c                   "    \ rS rSrSrSr SrSrg)IntersectionRulei  a  
An enumeration representing the two possible PDF intersection rules.

The intersection rule is used by the renderer to determine which points are
considered to be inside the path and which points are outside the path. This
primarily affects fill rendering and clipping paths.
nonzeroevenoddr   Nr   r   r   r   r/   NONZEROEVENODDr   r   r   r   r:  r:    s     G Gr   r:  c                   @    \ rS rSrSrSr Sr Sr Sr Sr	 Sr
 S	rS
rg)PathPaintRulei:  zi
An enumeration of the PDF drawing directives that determine how the renderer should
paint a given path.
r   ry  zf*rm   zB*nautor   N)r   r   r   r   r/   r  FILL_NONZEROFILL_EVENODDSTROKE_FILL_NONZEROSTROKE_FILL_EVENODD
DONT_PAINTAUTOr   r   r   r   rA  rA  :  sY     FL
 L
   J Dr   rA  c                   "    \ rS rSrSrSr SrSrg)ClippingPathIntersectionRuleip  zSAn enumeration of the PDF drawing directives that define a path as a clipping path.WzW*r   Nr=  r   r   r   rK  rK  p  s    YG Gr   rK  c                   (    \ rS rSrSrSr Sr SrSrg)StrokeCapStylei  z
An enumeration of values defining how the end of a stroke should be rendered.

This affects the ends of the segments of dashed strokes, as well.
r   r   r   r   N)	r   r   r   r   r/   BUTTROUNDSQUAREr   r   r   r   rN  rN    s+     D E Fr   rN  c                   (    \ rS rSrSrSr Sr SrSrg)StrokeJoinStylei  zb
An enumeration of values defining how the corner joining two path components should
be rendered.
r   r   r   r   N)	r   r   r   r   r/   MITERrP  BEVELr   r   r   r   rS  rS    s+    
 E
 E Er   rS  c                       \ rS rSrSr\" S5      r\" S5      r\" S5      r\" S5      r	\" S5      r
\" S5      r\" S	5      r\" S
5      r\" S5      r\" S5      rSrg)PDFStyleKeysi  z?An enumeration of the graphics state parameter dictionary keys.caBMCASALWLCLJMLrz  SMaskr   N)r   r   r   r   r/   r   
FILL_ALPHA
BLEND_MODESTROKE_ALPHASTROKE_ADJUSTMENTSTROKE_WIDTHSTROKE_CAP_STYLESTROKE_JOIN_STYLESTROKE_MITER_LIMITSTROKE_DASH_PATTERN	SOFT_MASKr   r   r   r   rW  rW    sd    EdJdJ:LT
:LDzT
ds)WIr   rW  c                   $    \ rS rSrSrSrSrSrSrg)Corneri  	TOP_RIGHTTOP_LEFTBOTTOM_RIGHTBOTTOM_LEFTr   N)	r   r   r   r   rm  rn  ro  rp  r   r   r   r   rl  rl    s    IH!LKr   rl  c                   .    \ rS rSrSrSr Sr Sr SrSr	g)	FontDescriptorFlagsi  zAn enumeration of the flags for the unsigned 32-bit integer entry in the font descriptor specifying various
characteristics of the font. Bit positions are numbered from 1 (low-order) to 32 (high-order).
r   rq   r  i   r   N)
r   r   r   r   r/   FIXED_PITCHSYMBOLICITALIC
FORCE_BOLDr   r   r   r   rr  rr    s7     K
 H
 F Jr   rr  c                   h    \ rS rSrSrSr Sr Sr Sr Sr	 Sr
 S	r S
r \S 5       r\S 5       rSrg)AccessPermissioni  zJPermission flags will translate as an integer on the encryption dictionaryrq   rr   r   r  r  r  i   i   c                 >    Sn[        [        5       H  nX-  nM	     U$ )zAll flags enabledr   )listrx  )r)   result
permissions      r   r  AccessPermission.all	  s&     /0J(F 1r   c                     g)zAll flags disabledr   r   )r)   s    r   noneAccessPermission.none  s     r   r   N)r   r   r   r   r/   PRINT_LOW_RESMODIFYCOPY
ANNOTATION
FILL_FORMSCOPY_FOR_ACCESSIBILITYASSEMBLEPRINT_HIGH_RESr0   r  r  r   r   r   r   rx  rx    sl    P"MF)D9J$J.+VHM#N.   r   rx  c                   (    \ rS rSrSrSrSrSrSrSr	g)	EncryptionMethodi  z,Algorithm to be used to encrypt the documentr   r   r   r  r   N)
r   r   r   r   r/   NO_ENCRYPTIONRC4AES_128AES_256r   r   r   r   r  r    s    2M
CGGr   r  c                   ^    \ rS rSrSr\" S5      r \" S5      r \" S5      r \" S5      r	Sr
g)	TextDirectioni   z)Text rendering direction for text shapingLTRRTLTTBBTTr   N)r   r   r   r   r/   r   r  r  r  r  r   r   r   r   r  r     s5    /
-C
-C
-C
-Cr   r  c                   L    \ rS rSrSr\" S5      r \" S5      r \" S5      rSr	g)OutputIntentSubTypei0  z%Definition for Output Intent SubtypesGTS_PDFX	GTS_PDFA1	ISO_PDFE1r   N)
r   r   r   r   r/   r   PDFXPDFAISOPDFr   r   r   r   r  r  0  s,    +
D2D6+F6r   r  c                   v    \ rS rSrSr\" S5      r \" S5      r \" S5      r \" S5      r	 \" S5      r
 SrS	rg)
PageLabelStylei=  zStyle of the page labelrz  r_   rAaNr   )r   r   r   r   r/   r   NUMBERUPPER_ROMANLOWER_ROMANUPPER_LETTERLOWER_LETTERr   r   r   r   r   r  r  =  sI    C[F+K+K#;L>#;L>Dr   r  c                   L    \ rS rSrSr\" S5      r \" S5      r \" S5      rSr	g)DuplexiS  zZThe paper handling option that shall be used when printing the file from the print dialog.SimplexDuplexFlipShortEdgeDuplexFlipLongEdger   N)
r   r   r   r   r/   r   SIMPLEXDUPLEX_FLIP_SHORT_EDGEDUPLEX_FLIP_LONG_EDGEr   r   r   r   r  r  S  s/    `9oG!"784 !563r   r  c                   d    \ rS rSr\" S5      r\" S5      r\" S5      r\" S5      r\" S5      r	Sr
g)	PageBoundariesi`  ArtBoxBleedBoxCropBoxMediaBoxTrimBoxr   N)r   r   r   r   r   ART_BOX	BLEED_BOXCROP_BOX	MEDIA_BOXTRIM_BOXr   r   r   r   r  r  `  s1    8nGZ IIHZ IIHr   r  c                   R   ^  \ rS rSr\" S5      r\" S5      r\U 4S j5       rSr	U =r
$ )PageOrientationih  PrX   c                 j   > [        U[        5      (       a  UR                  5       n[        X ]  U5      $ ru   )r#   r$   r&   rY   r,   rZ   s     r   r,   PageOrientation.coercem  s+    eS!!KKMES%e,,r   r   )r   r   r   r   r   PORTRAIT	LANDSCAPEr0   r,   r   ra   rb   s   @r   r  r  h  s)    c{HsI - -r   r  c                       \ rS rSr\" S5      r\" S5      r\" S5      r\" S5      r\" S5      r	\" S5      r
\" S5      r\" S	5      rS
rg)PDFResourceTypeit  	ExtGState
ColorSpacePatternShadingXObjectFontProcSet
Propertiesr   N)r   r   r   r   r   EXT_G_STATECOLOR_SPACEPATTERNSHADINGX_OBJECTFONTPROC_SET
PROPERTIESr   r   r   r   r  r  t  sQ    %K&KYGYGi H&>Di H%Jr   r  c                   "    \ rS rSrSrSr SrSrg)GradientUnitsi  z.Specifies the coordinate system for gradients.objectBoundingBoxuserSpaceOnUser   N)r   r   r   r   r/   OBJECT_BOUNDING_BOXUSER_SPACE_ON_USEr   r   r   r   r  r    s    4-g(1r   r  c                   (    \ rS rSrSrSr Sr SrSrg)GradientSpreadMethodi  zKSpecifies how to fill the area outside the gradient's start and end points.padreflectrepeatr   N)	r   r   r   r   r/   PADREFLECTREPEATr   r   r   r   r  r    s    Q
CoGrFhr   r  c                       \ rS rSrSrSrSrSrSrSr	Sr
S	rS
r\S 5       r\S 5       r\S 5       r\S 5       rS r\S 5       rSrg)DocumentCompliancei  z
Type of compliance enforcement that can be applied to a document.
Limited to PDF/A at the moment, but extendable to other standards like:
    - PDF/E (Engineering PDFs)
    - PDF/UA (PDF Universal Accessibility)
    - PDF/X (Graphics Exchange PDFs)
)r  r   rm   )r  r   rm   )r  r   r   )r  r  rm   )r  r  r   )r  rq   N)r  rq   E)r  rq   r{  c                      U R                   S   $ )Nr   r*   r~   s    r   profileDocumentCompliance.profile      zz!}r   c                      U R                   S   $ )Nr   r  r~   s    r   partDocumentCompliance.part  r  r   c                      U R                   S   $ )Nr   r  r~   s    r   conformanceDocumentCompliance.conformance  r  r   c                     U R                   S:X  a  SOU R                   nU SU R                   U R                  (       a  U R                   3$ S 3$ )Nr  zPDF/A-rW   r  r  r  )rx   r  s     r   labelDocumentCompliance.label  sL    !\\V3'!DII;4;K;Kt'7'7&TUUQS&TUUr   c                 z    U R                    SU R                   U R                  (       a  U R                   3$ S 3$ )N_rW   r  r~   s    r   r   DocumentCompliance.__str__  s>    ||nAdii[T=M=M)9)9(VW	
SU(VW	
r   c                 B   [        X5      (       a  U$ [        U[        5      (       a]  UR                  5       nU  HG  nUR                  R                  5       U:X  a  Us  $ UR                  R                  5       U:X  d  ME  Us  $    [        SU< SU R                   35      e)NzCannot coerce z to )r#   r$   r&   rw   r  r%   r   )r)   r*   keyms       r   r,   DocumentCompliance.coerce  s    e!!LeS!!++-C66<<>S(H77==?c)H	 
 >%$s||nEFFr   r   N)r   r   r   r   r/   PDFA_1BPDFA_2BPDFA_2UPDFA_3BPDFA_3UPDFA_4PDFA_4EPDFA_4Fr   r  r  r  r  r   r0   r,   r   r   r   r   r  r    s     GGGGGFGG      V V

 
G 
Gr   r  c                       \ rS rSrSr\" S5      r \" S5      r \" S5      r \" S5      r	 \" S5      r
 \" S5      r \" S	5      r \" S
5      rSrg)AssociatedFileRelationshipi  zNRepresents the association between an embedded file and the content on the PDFr  DataAlternative
SupplementEncryptedPayloadFormDataSchemaUnspecifiedr   N)r   r   r   r   r/   r   r  DATAALTERNATIVE
SUPPLEMENTENCRYPTED_PAYLOAD	FORM_DATASCHEMAUNSPECIFIEDr   r   r   r   r  r    s|    XHF=&>D
 'K?%J
 12 z"IQHF?'Kr   r  )Ur=  dataclassesr   enumr   r   r   r   sysr   typingr	   r
   r   fpdf.drawing_primitivesr   syntaxr   r   r   r   r2   r:   rA   rF   rN   rd   ro   r   r   r   r   ABCr+  r@  r   rF  r   rJ  INTERNALrO  MINIMALrS  HORIZONTAL_LINESrW  NO_HORIZONTAL_LINESr[  SINGLE_TOP_LINEr_  rm  rq  rt  r  r  r  r  r  r  r  r  r  r  r#  r2  r:  rA  rK  rN  rS  rW  rl  rr  rx  r  r  r  r  r  r  r  r  r  r  r  r  r   r   r   <module>r      s   
 ! - -  ) ) ; /G 'L4 'LT'Gg 'GT-Gg -G`| | &-L -8-\ -*2-? 2-j> >$A= A=H r5 r5 r5j ^
 ^
 ^
BYC YCxL. L" /0  P/ P" 12  
!3 
, 9:  
 2 
0 78  
(: 
, 'H&I  #
*< 
, *M)N  &
&8 
& &E%F  "*" *"Z> >`? `&-, &-R
 
0< 081< 1&
O 
L L, |  ,	#\ 	#H HV%V< %VPV_ V@\ )< )| >3L 3l< 0_ 0o 44  \  $ <&w &Rt L  
7, 
7\ ,
4\ 
4\ 	-l 	-&d &2L 2
i< 
i3G 3Gl& &r   