
    i;                        S SK r S SKrS SKJrJr  S SKJrJr  S SKJ	r
  S SKJr  S SKJr  S SKJr  S SKJr  S S	KJr  S S
KJr  S SKJr  S SKJr  S SKJr  S SKJrJ r J!r!J"r"J#r#J$r$J%r%J&r&J'r'J(r(J)r)  S SK*J+r+J,r,  S SK-J.r.  S SK/J0r0J1r1J2r2J3r3   " S S\&\4\"S4      5      r5\S\&\4S      4S j5       r6\S\&\"   S\&\4\"      4S j5       r6\S\&\"   S\&\'   S\&\4\"\'4      4S j5       r6\S\&\"   S\&\'   S\&\   S\&\4\"\'\4      4S j5       r6\S\&\"   S\&\'   S\&\   S\&\    S\&\4\"\'\\ 4      4
S j5       r6\S\&\"   S\&\'   S\&\   S\&\    S \&\!   S\&\4\"\'\\ \!4      4S! j5       r6\S"\&\   S\&\4\S4      4S# j5       r6\+\," 5       S"\&\   S\&\4\S4      4S$ j5       5       r6 " S% S&\&\7\"      5      r8 " S' S(\8\"   5      r9 " S) S*\95      r: " S+ S,\&\;\\4      5      r<g)-    N)CallableIterable)Anyoverload)
strategies)current_build_context)InvalidArgument)utils)ConjectureData)BUFFER_SIZE)LazySequenceCopy)combine_labels)get_integer_predicate_bounds)is_identity_function)T3T4T5ExFilteredStrategyRecurTSampledFromStrategySearchStrategyTcheck_strategyfilter_not_satisfied)	cacheabledefines_strategy)UniqueIdentifier)
ArgLabelsTIDKey_fixeddict_pprinter_tuple_pprinterc                      ^  \ rS rSrSrS\\\      4U 4S jjrSS jr	S\
4S jrS\4S jrS	\S\4S
 jrS\S\\S4   4S jrS	\S\4S jrSrU =r$ )TupleStrategy1   zlA strategy responsible for fixed length tuples based on heterogeneous
strategies for each of their elements.r   c                 B   > [         TU ]  5         [        U5      U l        g N)super__init__tupleelement_strategies)selfr   	__class__s     j/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/hypothesis/strategies/_internal/collections.pyr)   TupleStrategy.__init__5   s    "'
"3    returnc                 J    U R                    H  nUR                  5         M     g r'   )r+   validate)r,   ss     r.   do_validateTupleStrategy.do_validate9   s    ((AJJL )r0   c                 P    [        U R                  /S U R                   5       Q76 $ )Nc              3   8   #    U  H  oR                   v   M     g 7fr'   )label).0r4   s     r.   	<genexpr>+TupleStrategy.calc_label.<locals>.<genexpr>?   s     I1HA1Hs   )r   class_labelr+   r,   s    r.   
calc_labelTupleStrategy.calc_label=   s+    
I1H1HI
 	
r0   c                 `    SR                  [        [        U R                  5      5      nSU S3$ )Nz, zTupleStrategy((z)))joinmapreprr+   )r,   tuple_strings     r.   __repr__TupleStrategy.__repr__B   s,    yyT4+B+B!CD b11r0   recurc                 B   ^ [        U4S jU R                   5       5      $ )Nc              3   4   >#    U  H  nT" U5      v   M     g 7fr'    r:   erH   s     r.   r;   9TupleStrategy.calc_has_reusable_values.<locals>.<genexpr>G        =%<588%<   )allr+   r,   rH   s    `r.   calc_has_reusable_values&TupleStrategy.calc_has_reusable_valuesF       =T%<%<===r0   data.c                    [        5       n0 n/ n[        U R                  5       HH  u  pVUR                  SU S35       nUR	                  UR                  U5      5        S S S 5        UW-  nMJ     [        U5      nU(       a0  UR                  [        U5         R	                  [        U5      5        U$ ! , (       d  f       N[= f)Nzarg[])
r   	enumerater+   track_arg_labelappenddrawr*   known_object_printersr    r"   )r,   rV   context
arg_labelsresultistrategy	arg_labels           r.   do_drawTupleStrategy.do_drawI   s    ')!#
$T%<%<=KA((4s!5dii12 6)#J >
 v))%-8??
+  65s   !B44
C	c                 B   ^ [        U4S jU R                   5       5      $ )Nc              3   4   >#    U  H  nT" U5      v   M     g 7fr'   rK   rL   s     r.   r;   .TupleStrategy.calc_is_empty.<locals>.<genexpr>Z   rO   rP   )anyr+   rR   s    `r.   calc_is_emptyTupleStrategy.calc_is_emptyY   rU   r0   )r+   r1   N)__name__
__module____qualname____firstlineno____doc__r   r   r   r)   r5   intr?   strrF   r   boolrS   r   r*   r   rd   rj   __static_attributes____classcell__r-   s   @r.   r$   r$   1   s    .48N3,?#@ 4
C 

2# 2>f > >N uRW~  >6 >d > >r0   r$   .r1   rK   c                      g r'   rK   rK   r0   r.   tuplesry   ]       r0   __a1c                     g r'   rK   )r{   s    r.   ry   ry   b   rz   r0   __a2c                     g r'   rK   )r{   r}   s     r.   ry   ry   g        r0   __a3c                     g r'   rK   )r{   r}   r   s      r.   ry   ry   n   r   r0   __a4c                     g r'   rK   )r{   r}   r   r   s       r.   ry   ry   u   s     r0   __a5c                     g r'   rK   )r{   r}   r   r   r   s        r.   ry   ry      s     r0   argsc                      g r'   rK   )r   s    r.   ry   ry      r   r0   c                  @    U  H  n[        U5        M     [        U 5      $ )a%  Return a strategy which generates a tuple of the same length as args by
generating the value at index i from args[i].

e.g. tuples(integers(), integers()) would generate a tuple of length
two with both values an integer.

Examples from this strategy shrink by shrinking their component parts.
)r   r$   )r   args     r.   ry   ry      s#     s  r0   c                     ^  \ rS rSr% Sr\\\\4r	\\
\/\4   S4   \S'   S\R                  4S\\   S\S\\-  S	-  4U 4S
 jjjrS\4S jrSS jrS\S\4S jrS\S\\   4S jrS\4S jrS\
\\   /\4   S\\\      4S jrSrU =r$ )ListStrategy   zA strategy for lists which takes a strategy for its elements and the
allowed lengths, and generates lists with the correct size and contents.._nonempty_filtersr   elementsmin_sizemax_sizeNc                   > [         TU ]  5         U=(       d    SU l        Ub  UO[        R                  U l        SU R                  s=::  a  U R
                  ::  d   e   e[        [        U R                  S-  U R                  S-   5      SU R                  U R
                  -   -  5      U l        Xl	        U[        :  a  [        U < S35      eg )Nr               ?z can never generate an example, because min_size is larger than Hypothesis supports.  Including it is at best slowing down your tests for no benefit; at worst making them fail (maybe flakily) with a HealthCheck error.)r(   r)   r   mathinfr   minmaxaverage_sizeelement_strategyr   r	   )r,   r   r   r   r-   s       r.   r)   ListStrategy.__init__   s     	 A$,$8dhhDMM2T]]22222!4==1#454==4==01
 !)k!!( ' '  "r0   r1   c                 V    [        U R                  U R                  R                  5      $ r'   )r   r=   r   r9   r>   s    r.   r?   ListStrategy.calc_label   s!    d..0E0E0K0KLLr0   c                 Z   U R                   R                  5         U R                  (       a  [        SU R                   < S35      eU R                   R                  (       aK  SU R                  s=:  a  [        S5      :  a*  O  g [        SU R                  < SU R                   < 35      eg g )Nz@Cannot create non-empty lists with elements drawn from strategy z because it has no values.r   r   z'Cannot create a collection of max_size=z=, because no elements can be drawn from the element strategy )r   r3   is_emptyr	   r   floatr>   s    r.   r5   ListStrategy.do_validate   s    &&(==! 1144NP    ))a$--.N%,.N!9$--9J KN((+-  /O)r0   rH   c                 H    U R                   S:X  a  gU" U R                  5      $ )Nr   F)r   r   rR   s     r.   rj   ListStrategy.calc_is_empty   s"    ==AT**++r0   rV   c                 ~   U R                   R                  (       a  U R                  S:X  d   e/ $ [        R                  " UU R                  U R
                  U R                  S9n/ nUR                  5       (       aA  UR                  UR                  U R                   5      5        UR                  5       (       a  MA  U$ )Nr   r   r   r   )
r   r   r   cumanyr   r   morer[   r\   )r,   rV   r   r`   s       r.   rd   ListStrategy.do_draw   s      ))==A%%%I77]]]]**	
 mmooMM$))D$9$9:; mmoor0   c                     U R                   R                   SU R                  < SU R                  S SU R                  S S3$ )N(z, min_size=_z, max_size=))r-   rm   r   r   r   r>   s    r.   rF   ListStrategy.__repr__   sK    ~~&&'q)>)>(A Ba(DMM!3DAG	
r0   	conditionc                    XR                   ;   d  [        U5      (       aH  U R                  S:  d   S5       eU R                  S:  a  U $ [        R                  " U 5      nSUl        U$ [        U5      u  p4UR                  S5      (       Ga'  SU;   d  SU;   Ga  [        R                  " U 5      n[        U R                  UR                  SU R                  5      5      Ul        [        U R                  UR                  SU R                  5      5      Ul        UR                  UR                  :  a  [        R                  " X5      $ [        [        UR                  S-  UR                  S-   5      SUR                  UR                  -   -  5      Ul        Uc  U$ [        R                  " X!5      $ [        R                  " X5      $ )	N   z+Always-empty is special cased in st.lists()len	min_value	max_valuer   r   r   )r   r   r   r   copyr   getr   r   r   filterr   )r,   r   newconstraintspreds        r.   r   ListStrategy.filter   sl   ...2Fy2Q2Q==A%T'TT%}}!))D/CCLJ8C??5!!;&+*D))D/C{{DMMJCL {{DMMJCL ||cll*%,,T=="CLL1$cllQ&67s||cll23 C |
!((88$$T55r0   )r   r   r   r   rl   )rm   rn   ro   rp   rq   rt   r   r*   listr   r   r   __annotations__r   r   r   r   rr   r   r)   r?   r5   r   rj   r   rd   rs   rF   r   ru   rv   rw   s   @r.   r   r      s    P <@eT:RuXseSj1367R
 '+xx	 $  #+$	 .MC M,6 ,d ,
N tBx  
# 
 6$r(S 9  6nTRTX>V  6  6r0   r   c                      ^  \ rS rSrS\\   S\S\\-  S-  S\\	\/\
4   S4   S\\\S4      S-  4
U 4S	 jjrS
\S\\   4S jrSrU =r$ )UniqueListStrategyi  r   r   r   Nkeys.tuple_suffixesc                 >   > [         TU ]  XU5        X@l        XPl        g r'   )r(   r)   r   r   )r,   r   r   r   r   r   r-   s         r.   r)   UniqueListStrategy.__init__  s     	X6	,r0   rV   r1   c                   ^ ^	 T R                   R                  (       a  T R                  S:X  d   e/ $ [        R                  " UT R                  T R
                  T R                  S9n[        S T R                   5       5      m	/ nS[        S[        4U	U 4S jjn[        T R                   U4S9nUR                  5       (       a  UR                  U5      nU[        L a  UR                  SU< 35        O[!        U["        5      (       a   e[%        T R                  T	S	S
9 H  u  pxUR'                  U" U5      5        M     T R(                  b  U/UR+                  T R(                  5      Q7nUR-                  U5        UR                  5       (       a  M  T R
                  [/        U5      s=:  a  T R                  :  d   e   eU$ )Nr   r   c              3   6   #    U  H  n[        5       v   M     g 7fr'   setr:   r   s     r.   r;   -UniqueListStrategy.do_draw.<locals>.<genexpr>(       .Hisuui   valr1   c           	      V   >^  [        U 4S j[        TR                  TSS9 5       5      $ )Nc              3   >   >#    U  H  u  pU" T5      U;  v   M     g 7fr'   rK   )r:   keyseenr   s      r.   r;   MUniqueListStrategy.do_draw.<locals>.not_yet_in_unique_list.<locals>.<genexpr>3  s#      !GIC C$!G   Tstrict)rQ   zipr   )r   	seen_setsr,   s   `r.   not_yet_in_unique_list:UniqueListStrategy.do_draw.<locals>.not_yet_in_unique_list2  s*     !$TYY	$!G  r0   )
conditionsz'Aborted test because unable to satisfy Tr   )r   r   r   r   r   r   r   r*   r   r   rt   r   r   do_filtered_drawr   reject
isinstancer   r   addr   r\   r[   r   )
r,   rV   r   r`   r   filteredvaluer   r   r   s
   `        @r.   rd   UniqueListStrategy.do_draw  s     ))==A%%%I77]]]]**	
 */.Hdii.H)H	
 
	 	t 	 	 $!!/E.G
 mmoo--d3E,,"I( VW%e-=>>>>!$TYY	$!GICHHSZ( "H&&2"DTYYt/B/B%CDEe$ mmoo }}F<t}}<<<<<r0   )r   r   )rm   rn   ro   rp   r   r   rr   r   r*   r   r   r)   r   r   rd   ru   rv   rw   s   @r.   r   r     s    - $- - #+$	- HbT3Y',-- 'uRW~6=-*N *tBx * *r0   r   c                   ,    \ rS rSrS\S\\   4S jrSrg)UniqueSampledListStrategyiJ  rV   r1   c           	      
  ^	 [        U R                  [        5      (       d   e[        R                  " UU R
                  U R                  U R                  S9n[        S U R                   5       5      n/ n[        U R                  R                  5      nU(       Ga7  UR                  5       (       Ga!  UR                  S[        U5      S-
  5      nU R                  R                  UR!                  U5      5      m	T	["        La  [%        U	4S j['        U R                  USS9 5       5      (       as  ['        U R                  USS9 H  u  pxUR)                  U" T	5      5        M     U R*                  b  T	/UR-                  U R*                  5      Q7m	UR/                  T	5        OUR1                  S5        U(       a  UR                  5       (       a  GM!  U R                  [        U5      s=:  a  U R
                  :  d   e   eU$ )	Nr   c              3   6   #    U  H  n[        5       v   M     g 7fr'   r   r   s     r.   r;   4UniqueSampledListStrategy.do_draw.<locals>.<genexpr>T  r   r   r   r   c              3   >   >#    U  H  u  pU" T5      U;  v   M     g 7fr'   rK   )r:   r   r   r   s      r.   r;   r   \  s#      9!GIC E
$&!Gr   Tr   zDUniqueSampledListStrategy filter not satisfied or value already seen)r   r   r   r   r   r   r   r   r*   r   r   r   r   draw_integerr   
_transformpopr   rQ   r   r   r   r\   r[   r   )
r,   rV   should_drawr   r`   	remainingjr   r   r   s
            @r.   rd   !UniqueSampledListStrategy.do_drawK  s   $//1DEEEEgg]]]]**	
 */.Hdii.H)H	$T%:%:%C%CD	K,,..!!!S^a%78A))44Y]]15EFE00S 9!$TYY	$!G9 6 6 "%TYY	$!GICHHSZ( "H&&2"DTYYt/B/B%CDEe$""Z K,,..  }}F<t}}<<<<<r0   rK   N)	rm   rn   ro   rp   r   r   r   rd   ru   rK   r0   r.   r   r   J  s    N tBx r0   r   c                      ^  \ rS rSrSrS\\\\   4   S\\\\   4   S-  4U 4S jjrS\	S\\\4   4S	 jr
S
\S\4S jrS\4S jrSrU =r$ )FixedDictStrategyim  zA strategy which produces dicts with a fixed set of keys, given a
strategy for each of their equivalent values.

e.g. {'foo' : some_int_strategy} would generate dicts with the single
key 'foo' mapping to some integer.
mappingoptionalNc                  >^^ [         TU ]  5         [        U5      mXl        [	        UR                  5       5      m[        R                  " T Vs/ s H  o1U   PM	     sn6 R                  UU4S j5      U l	        X l
        g s  snf )Nc                 &   > T" [        TU SS95      $ )NTr   )r   )r   	dict_typer   s    r.   <lambda>,FixedDictStrategy.__init__.<locals>.<lambda>  s    )CeD$ABr0   )r(   r)   typer   r*   r   stry   rC   fixedr   )r,   r   r   kr   r   r-   s       @@r.   r)   FixedDictStrategy.__init__u  si     	M	W\\^$YYT :TT :;??B

 ! !;s   BrV   r1   c                 :   [        5       n0 n[        U R                  5      " 5       nU R                  R                  5        H@  u  pVUR	                  [        U5      5       nUR                  U5      XE'   S S S 5        UW-  nMB     U R                  Gb  U R                  R                  5        VV	s/ s H  u  pU	R                  (       a  M  UPM     n
nn	[        R                  " US[        U
5      [        U
5      S-  S9nUR                  5       (       a  UR                  S[        U
5      S-
  5      nX   U
S   sU
S'   X'   U
R                  5       nUR	                  [        U5      5       nUR                  U R                  U   5      XE'   S S S 5        UW-  nUR                  5       (       a  M  U(       a:  UR                  [!        U5         R#                  [%        X0R                  5      5        U$ ! , (       d  f       GN= fs  sn	nf ! , (       d  f       N= f)Nr   r   r   r   )r   r   r   itemsrZ   rs   r\   r   r   r   r   r   r   r   r   r]   r    r[   r!   )r,   rV   r^   r_   r   r   rb   rc   r   vr   r   r   s                r.   rd   FixedDictStrategy.do_draw  s   ')!#
T\\"$!\\//1MC((S2i!YYx0
 3)#J 2
 ==$'+}}':':'<O'<tqAJJ'<IO''Y ^a/	K ""$$%%aY!);<.7lIbM+	"y|mmo,,SX6)!%4==+=!>EJ 7i'
 ""$$ ))%,7>>#J= 1 32
 P 76s$    G40HH,!H4
H	
HrH   c                 &    U" U R                   5      $ r'   )r   rR   s     r.   rj   FixedDictStrategy.calc_is_empty  s    TZZ  r0   c                 |    U R                   b  SU R                  < SU R                   < S3$ SU R                  < S3$ )Nzfixed_dictionaries(z, optional=r   )r   r   r>   s    r.   rF   FixedDictStrategy.__repr__  s@    ==$((8DMMCTTUVV$T\\$4A66r0   )r   r   r   )rm   rn   ro   rp   rq   dictr   r   r)   r   rd   r   rt   rj   rs   rF   ru   rv   rw   s   @r.   r   r   m  s    !c>#../! sN3//047	!N tCH~ @!6 !d !7# 7 7r0   r   )=r   r   collections.abcr   r   typingr   r   
hypothesisr   r   hypothesis.controlr   hypothesis.errorsr	   hypothesis.internal.conjecturer
   r   #hypothesis.internal.conjecture.datar   %hypothesis.internal.conjecture.enginer   )hypothesis.internal.conjecture.junkdrawerr   $hypothesis.internal.conjecture.utilsr   hypothesis.internal.filteringr   hypothesis.internal.reflectionr   *hypothesis.strategies._internal.strategiesr   r   r   r   r   r   r   r   r   r   r   %hypothesis.strategies._internal.utilsr   r   hypothesis.utils.conventionsr   hypothesis.vendor.prettyr   r    r!   r"   r*   r$   ry   r   r   r   r   r  r   rK   r0   r.   <module>r     s     .   ' 4 - 6 > = F ? F ?    N 9 )>N5S>2 )>X 
uRy)  
 
# uRy(A  
 


$21$5E"a%L! 
 


$21$5=KB=OE"a)$% 
 




 
 
	
 E"aR-() 
 




 
 
	
 
 E"aR+,- 
 
#E#s(O$ 
 .% .sCx*I   i6>$r(+ i6X9b) 9x  2  F=7tCH~6 =7r0   