+
     h)  c                  s    ^ RI Ht ^ RIHtHtHt ^ RIt^ RIH	t	H
t
 ^ RIHtHt ^ RIHtHtHtHt ]'       d   ^ RIHt R R ltR	 R
 ltR R ltRR R lltR R ltR R ltR# )i    )annotations)TYPE_CHECKINGAnycastN)FillTypeLineType)as_fill_typeas_line_type)MOVETO
code_dtypeoffset_dtypepoint_dtypec                    V ^8  d   QhRRRR/# )   codesr   returnNone Zformat   ":/usr/lib64/python3.14/site-packages/contourpy/typecheck.py__annotate__r      s     Z ZC ZD Z    c                s   \        V \        P                  4      '       g   \        R \	        V 4       24      hV P
                  \        8w  d    \        R\         RV P
                   24      hV P                  ^8X  d   \        V 4      ^8  g   \        RV P                   24      hV ^ ,          \        8w  d   \        R\         RV ^ ,           24      hR# )Expected numpy array not Expected numpy array of dtype  not 'Expected numpy array of shape (?,) not z$First element of code array must be z, not N)
isinstancenpndarray	TypeErrortypedtyper	   
ValueErrorndimlenshaper   )r      &r   check_code_arrayr&      s    eRZZ((3DK=ABB{{j 9*U5;;-XYYJJ!OE
QB5;;-PQQQx6?xveTUhZXYY r   c               r   )r   offsetsr   r   r   r   r   r   r   r   r      s     W W W Wr   c                s   \        V \        P                  4      '       g   \        R \	        V 4       24      hV P
                  \        8w  d    \        R\         RV P
                   24      hV P                  ^8X  d   \        V 4      ^8  g   \        RV P                   24      hV ^ ,          ^ 8w  d   \        RV ^ ,           24      hR# )r   r   r   r   z-First element of offset array must be 0, not N)r   r   r   r   r   r    r
   r!   r"   r#   r$   )r'   r%   r   check_offset_arrayr(      s    grzz**3DM?CDD}}$9,uW]]O\]]LLA#g,"2B7==/RSSqzQHQRUVV r   c               r   )r   pointsr   r   r   r   r   r   r   r   r   '   s     U Uc Ud Ur   c                s   \        V \        P                  4      '       g   \        R \	        V 4       24      hV P
                  \        8w  d    \        R\         RV P
                   24      hV P                  ^8X  d1   V P                  ^,          ^8X  d   V P                  ^ ,          ^8  g   \        RV P                   24      hR# )r   r   r   z)Expected numpy array of shape (?, 2) not N)
r   r   r   r   r   r    r   r!   r"   r$   )r)   r%   r   check_point_arrayr*   '   s    fbjj))3DL>BCC||{"9+eFLL>Z[[KK1a1!4a19LDV\\NSTT :Mr   c               s(    V ^8  d   QhRRRRRRRR/# )	r   maybe_tupler   tuple_lengthZintallow_empty_listsZboolr   r   r   r   r   r   r   r   0   s6     E EEE E 
	Er   c                s   \        V \        4      '       g   \        R \        V 4       24      h\	        V 4      V8w  d   \        RV R\	        V 4       24      hV  F5  p\        V\        4      '       d   K  RV R\        V4       2p\        V4      h	  V  Uu. uF  p\	        V4      NK  	  pp\	        \        V4      4      ^8w  d   RV RV 2p\        V4      hV'       g    V^ ,          ^ 8X  d   \        RV R24      hR# R# u upi )	zExpected tuple not zExpected tuple of length r   zExpected tuple to contain z lists but found a z	Expected z( lists with same length but lengths are z non-empty listsN)r   Ztupler   r   r#   r!   listZset)r+   r,   r-   Z
maybe_listZmsgZitemZlengthss   &&&    r   &_check_tuple_of_lists_with_same_lengthr/   0   s
   
 k5))-d;.?-@ABB
;<'4\N%KHXGYZ[[!
*d++.|n<OPTU_P`OabCC.  " &11[Ts4y[G1
3w<A,'OPWyYoq9\N2BCDD "1	 2s   Dc               $    V ^8  d   QhRRRRRR/# )r   filledzcpy.FillReturn	fill_typezFillType | strr   r   r   r   r   r   r   r   E   s&     P: P: P:N P:t P:r   c                s	   \        V4      pV\        P                  8X  d   \        '       d   \	        \
        P                  V 4      p \        V ^4       \        \        V !  4       FE  w  pw  r4\        V4       \        V4       \        V4      \        V4      8w  g   K9  \        RV 24      h	  R# V\        P                  8X  d   \        '       d   \	        \
        P                  V 4      p \        V ^4       \        \        V !  4       FC  w  pw  r5\        V4       \!        V4       VR,          \        V4      8w  g   K7  \        RV 24      h	  R# V\        P"                  8X  d   \        '       d   \	        \
        P$                  V 4      p \        V ^RR7       \        \        V !  4       Fe  w  pw  rxVeD   Ve@   \        V4       \        V4       \        V4      \        V4      8w  d   \        RV 24      hKO  Vf   Vf   KY  \        RV 24      h	  R# V\        P&                  8X  d   \        '       d   \	        \
        P(                  V 4      p \        V ^RR7       \        \        V !  4       Fc  w  pw  ryVeB   V	e>   \        V4       \!        V	4       V	R,          \        V4      8w  d   \        RV 24      hKM  Vf   V	f   KW  \        RV 24      h	  R# V\        P*                  8X  d   \        '       d   \	        \
        P,                  V 4      p \        V ^RR7       \        \        V !  4       F  w  pw  rxp
Vex   Vet   V
ep   \        V4       \        V4       \!        V
4       \        V4      \        V4      8w  d   \        RV 24      hV
R,          \        V4      8w  d   \        R	V 24      hK  Vf   Vf   V
f   K  \        RV 24      h	  R# V\        P.                  8X  d   \        '       d   \	        \
        P0                  V 4      p \        V ^RR7       \        \        V !  4       F  w  pw  ryp
Ve}   V	ey   V
eu   \        V4       \!        V	4       \!        V
4       V	R,          \        V4      8w  d   \        RV 24      hV
R,          \        V	4      ^,
          8w  d   \        R
V 24      hK  Vf   V	f   V
f   K  \        RV 24      h	  R# \        RV 24      h)r   z3Points and codes have different lengths in polygon z+Inconsistent points and offsets in polygon Fr-   N1Points and codes have different lengths in chunk Inconsistent Nones in chunk )Inconsistent points and offsets in chunk z.Inconsistent codes and outer_offsets in chunk z0Inconsistent offsets and outer_offsets in chunk zInvalid FillType )r   r   Z	OuterCoder   r   cpyZFillReturn_OuterCoder/   	enumeratezipr*   r&   r#   r!   ZOuterOffsetZFillReturn_OuterOffsetr(   ChunkCombinedCodeZFillReturn_ChunkCombinedCodeChunkCombinedOffsetZFillReturn_ChunkCombinedOffsetZChunkCombinedCodeOffsetZ"FillReturn_ChunkCombinedCodeOffsetZChunkCombinedOffsetOffsetZ$FillReturn_ChunkCombinedOffsetOffset)r1   r2   ir)   r   r'   chunkpoints_or_nonecodes_or_noneoffsets_or_noneZouter_offsets_or_nones   &&         r   check_filledrB   E   s{   Y'IH&&&=#22F;F.vq9"+CL"9Af%U#6{c%j( #VWXVY!Z[[	 #:
 
h**	*=#44f=F.vq9$-c6l$; A f%w'r{c&k) #Nqc!RSS	 %<
 
h00	0=#::FCF.vqER6?V6M2E2N)m.G!.1 /~&#m*<<$'XY^X_%`aa =$,1F #?w!GHH 7N 
h22	2=#<<fEF.vqER8A#v,8O4E4N)o.I!.1"?3"2&#n*==$'PQVPW%XYY >$,1H #?w!GHH 9P 
h66	6=#@@&IF.vqERIRSVX^S_I`EAE/D*}/H)5!.1 /"#89}%^)<<$'XYZX[%\]](,M0BB$'UVWUX%YZZ C$,1F+3 #?s!CDD Ja 
h88	8=#BBFKF.vqERKTUXZ`UaKbGAG1F*/J)5!.1"?3"#89"2&#n*==$'PQRPS%TUU(,O0Dq0HH$'WXYWZ%[\\ I$,1H+3 #?s!CDD Lc ,YK899r   c               r0   )r   lineszcpy.LineReturn	line_typezLineType | strr   r   r   r   r   r   r   r      s!     3: 3:~ 3:. 3:T 3:r   c                sz   \        V4      pV\        P                  8X  dj   \        '       d   \	        \
        P                  V 4      p \        V \        4      '       g   \        R \        V 4       24      hV  F  p\        V4       K  	  R# V\        P                  8X  d   \        '       d   \	        \
        P                  V 4      p \        V ^4       \        \!        V !  4       FE  w  pw  r$\        V4       \#        V4       \%        V4      \%        V4      8w  g   K9  \'        RV 24      h	  R# V\        P(                  8X  d   \        '       d   \	        \
        P*                  V 4      p \        V ^RR7       \        \!        V !  4       Fe  w  pw  rgVeD   Ve@   \        V4       \#        V4       \%        V4      \%        V4      8w  d   \'        RV 24      hKO  Vf   Vf   KY  \'        RV 24      h	  R# V\        P,                  8X  d   \        '       d   \	        \
        P.                  V 4      p \        V ^RR7       \        \!        V !  4       Fc  w  pw  rhVeB   Ve>   \        V4       \1        V4       VR	,          \%        V4      8w  d   \'        RV 24      hKM  Vf   Vf   KW  \'        RV 24      h	  R# V\        P2                  8X  dc   \        '       d   \	        \
        P4                  V 4      p \        V ^RR7       \        V ^ ,          4       F  w  rVf   K  \        V4       K  	  R# \'        RV 24      h)
zExpected list not z0Points and codes have different lengths in line Fr3   Nr4   r5   r6   zInvalid LineType r7   )r   r   ZSeparater   r   r8   ZLineReturn_Separater   r.   r   r   r*   ZSeparateCodeZLineReturn_SeparateCoder/   r9   r:   r&   r#   r!   r;   ZLineReturn_ChunkCombinedCoder<   ZLineReturn_ChunkCombinedOffsetr(   ZChunkCombinedNanZLineReturn_ChunkCombinedNan)
rC   rD   r)   r=   r   r>   r?   r@   rA   Z_chunks
   &&        r   check_linesrE      s   Y'IH%%%=00%8E%&&0e>??Ff% 	h++	+=44e<E.ua8"+CK"8Af%U#6{c%j( #STUSV!WXX	 #9
 
h00	0=995AE.ua5Q6?U6L2E2N)m.G!.1 /~&#m*<<$'XY^X_%`aa =$,1F #?w!GHH 7M 
h22	2=;;UCE.ua5Q8A#u+8N4E4N)o.I!.1"?3"2&#n*==$'PQVPW%XYY >$,1H #?w!GHH 9O 
h//	/=88%@E.ua5Q&/a&9"F)!.1 ': ,YK899r   )T)Z
__future__r    Ztypingr   r   r   Znumpyr   Z	contourpyr   r   Zcontourpy.enum_utilr   r   Zcontourpy.typesr   r	   r
   r   Zcontourpy._contourpyZ
_contourpyr8   r&   r(   r*   r/   rB   rE   r   r   r   <module>rF      sG    " + +  ( : I I&
ZWUE*P:f3:r   