+
    7*i9  c                   s  a R' tq0 t R t^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
HtHtHtHtHt ^ RIHt ^ RIt^ RIt^ RIt^ RIHt  ^ RItR R lt]P4                  ! ]P6                  ]P8                  ! 4       P;                  ]4      4       ]P4                  ! ]P<                  ]P>                  ! RP@                  ]PB                  ! RR	R
7      ]P8                  ! 4       P;                  ]4      4      4       ]P4                  ! ]PF                  ]PH                  ! ]%! ]&! ]4      4       U u. uF1  q PO                  R4      '       d   K  ]! ]PF                  RV  24      NK3  	  up 4      4       RPQ                  ]PR                  PT                  ]PR                  PV                  ]PR                  PX                  ]PR                  PZ                  ]PR                  P\                  ]PR                  P^                  34      Pa                  ]PR                  Pb                  R4      Pa                  ]PR                  Pd                  R4      Pa                  ]PR                  Pf                  R4      t4]P4                  ! ]PR                  Pj                  ]Pl                  ! ]PH                  ! ]%! ]PR                  Pn                  4      4      ]Pp                  ! ]Pr                  ! ^ ^4      ]Pr                  ! ^ ^4      ]Pr                  ! ^ ^4      ]Pt                  ! 4       ]Pv                  ! ^ ^4      ,          ]Pv                  ! ^ ^d4      Py                  RP@                  4      ,          4      ]PB                  ! ]4R	R
7      4      4       R R lt=R(t>]P4                  ! ]P~                  ]PB                  ! RPQ                  ]>4      R	R
7      Py                  ]=4      4       ]P4                  ! ]P                  ]P                  ! ^R7      4       ]P4                  ! ]P                  ]P                  ! ^R7      4       ]P4                  ! ]P                  ]P                  ! ^R7      4       ]P4                  ! ]P                  ]P                  ! ^R7      4       ]P4                  ! ]P                  ]P                  ! 4       Py                  ]P                  4      4       ]P4                  ! ]P                  ]P                  ! 4       Py                  ]P                  4      4       ]P4                  ! ]P                  ]P                  ! 4       4       ]P4                  ! ]P                  ]P                  ! ]P                  4      ]P                  ! ]P                  4      ,          4       ]P4                  ! ]P                  ]P                  ! ]P                  4      ]P                  ! ]P                  4      ,          4       ]P4                  ! ]P                  ]P                  ! 4       4       ]P4                  ! ]P                  ]P                  ! 4       4       ]P4                  ! ]P                  ]P                  ! ]P                  P                  4       ]P                  ! ^R7      ,           R7      4       ]P4                  ! ]P                  ]P                  ! ]P                  P                  4       ]P                  ! ^R7      ,
          R7      4       / t[] ^ k ]R R l4       t\]R R l4       t\R R lt\R R lt]]]! ]P                  4      R  4       t_]]! ]P                  4      R! 4       ta]]! ]P                  4      R" 4       tc]]! ]P                  4      R# 4       te]]! ]P                  4      R$ 4       tg]]! ]P                  4      R% 4       ti]]! ]P                  4      R& 4       tk]l! ]P                  P                  4       F  to]\! ]o4       K  	  ]\]P                  n\        ]P4                  ! ]P                  ]_4       R#   ]" d     EL?i ; iu up i ))a  
Register Hypothesis strategies for Pydantic custom types.

This enables fully-automatic generation of test data for most Pydantic classes.

Note that this module has *no* runtime impact on Pydantic itself; instead it
is registered as a setuptools entry point and Hypothesis will import it if
Pydantic is installed.  See also:

https://hypothesis.readthedocs.io/en/latest/strategies.html#registering-strategies-via-setuptools-entry-points
https://hypothesis.readthedocs.io/en/latest/data.html#hypothesis.strategies.register_type_strategy
https://hypothesis.readthedocs.io/en/latest/strategies.html#interaction-with-pytest-cov
https://docs.pydantic.dev/usage/types/#pydantic-types

Note that because our motivation is to *improve user experience*, the strategies
are always sound (never generate invalid data) but sacrifice completeness for
maintainability (ie may be unable to generate some tricky but valid data).

Finally, this module makes liberal use of `# type: ignore[<code>]` pragmas.
This is because Hypothesis annotates `register_type_strategy()` with
`(T, SearchStrategy[T])`, but in most cases we register e.g. `ConstrainedInt`
to generate instances of the builtin `int` type which match the constraints.
N)Fraction)CallableDictTypeUnioncastoverload)lenient_issubclassc                s0    V ^8  d   QhR\         R\        /# )   sreturn)strZboolformat   "C/usr/lib/python3.14/site-packages/pydantic/v1/_hypothesis_plugin.py__annotate__r   :   s      # $     c                 sp     \         P                  ! V R R7       R#   \         P                   d     R # i ; i)F)Zcheck_deliverabilityT)email_validatorZvalidate_emailZEmailNotValidErrorr	      &r   is_valid_emailr   :   s2    	**15I11 		s    55z{} <{}>z"[A-Za-z0-9_]+( [A-Za-z0-9_]+){0,5}TZ	fullmatchZ_zmath.Z|z#(?:(\d\d?(?:\.\d+)?|100(?:\.0+)?)%)z+(?:(0(?:\.\d+)?|1(?:\.0+)?|\.\d+|\d{1,2}%))zB(?:((?:\d|\d\d|[01]\d\d|2[0-4]\d|25[0-4])(?:\.\d+)?|255(?:\.0+)?))z{}%c                s0    V ^8  d   QhR\         R\         /# )r   card_numberr
   )r   r   r   r   r   r   z   s     ( ( ( (r   c                 s   R  F]  p\         P                  ! \        4      ;_uu_ 4        \        P                  P                  W,           4       W,           uuRRR4       u # 	  \        R4      h  + '       g   i     K}  ; i)Z
0123456789NZUnreachable)
contextlibZsuppress	ExceptionpydanticPaymentCardNumberZvalidate_luhn_check_digitZAssertionError)r   Zdigits   & r   add_luhn_digitr   z   s[      ++&&@@ATU& ,+  
'' ,++s   -A//B )ZversionZdays)	min_value)	max_valuec                s    V ^8  d   QhR\         \        P                  P                  ,          R\         \        P                  P                  ,          /# r   typr
   )r   r   typesTr   r   r   r   r      s8     	 	T(..**+ 	X^^5E5E0F 	r   c                     R # N r!   r   r   _registeredr(          r   c                s    V ^8  d   QhR\         P                  P                  R\         P                  P                  /# r    )r   r"   ConstrainedNumberMetar   r   r   r   r      s.     	 	X^^99 	hnn>b>b 	r   c                 r$   r%   r&   r'   r   r   r(   r(      r)   r   c                s@   V ^8  d   QhR\         \        \        P                  P                  ,          \        P                  P
                  3,          R\         \        \        P                  P                  ,          \        P                  P
                  3,          /# r    )r   r   r   r"   r#   r*   r   r   r   r   r      sf     S S	tHNN$$%x~~'K'KK	LS
4  !8>>#G#GGHSr   c                 s   \         P                  P                  P                  V 4       \        P                  4        F6  w  r\        W4      '       g   K  \        P                  ! W! V 4      4       V u # 	  \        R V : R24      h)zUnknown type z has no resolver to register)
r   r"   _DEFINED_TYPESZadd	RESOLVERSZitemsZ
issubclassstregister_type_strategyZNotImplementedError)r!   Z	supertypeZresolver   &  r   r(   r(      sk     NN!!%%c*(0	c%%%%c8C=9J  1 cW4PQ
RRr   c                s    V ^8  d   QhR\         \        \        P                  P                  3,          R\
        \
        R\        P                  3,          .\
        R\        P                  3,          3,          /# )r   r!   r
   .)r   typer   r"   r*   r   r-   SearchStrategyr   r   r   r   r      s]      	tX^^999	:xR.../0(3@Q@Q;Q2RRSr   c                 s   a  V 3R  lpV# )c                 s4   < V \         9  g   Q hV \         S&   V # r%   )r,   )Zfr!      &r   innerZresolves.<locals>.inner   s    	!!!	#r   r&   )r!   r3   s   f r   resolvesr4      s    
 Lr   c                 sZ    V P                   f   \        P                  ! 4       M\        P                  ! V P                   4      p\        V RR 4      p\        P                  ! \        V\        P                  4      '       d   V P                   P                   M\         P"                  V\        P                  ! 4       \        P                  ! 4       \        P                  ! ^ ^4      ,          \        P                  ! 4       R7      #   \         d    \        P
                  ! RRR7      p\        P                  ! \        P                  ! \        P                  ! 4       \        P                  ! 4       \        P                  ! 4       T\        P                  ! 4       4      R R7      p ELdi ; i)NF)Zallow_infinity	allow_nanc                 s    \         P                  ! V 4      \         P                  ! \         P                  ! 4       V 4      ,          # r%   )r-   ZlistsZdictionariestext)xr   r   <lambda>Zresolve_json.<locals>.<lambda>   s"    RXXa[2??2779a+HHr   )ZbaseZextend
inner_type)Zensure_asciiZindentZ	sort_keys)r9   r-   none	from_typer   floatsZ	recursiveone_ofbooleansintegersr6   Zgetattrbuildsr   r   Z	BaseModeljsonZdumps)clsr3   Zfiniter9   s   &   r   resolve_jsonrC      s    
 ^^3	cnn9U lD1J991*h>P>PQQW[WaWa[[]wwy2;;q"--++-   
%5A2779bkkmR[[]FBGGIVH

s   AD B F*)F*c                 s   V P                   ;'       g    ^ pV P                  pV P                  '       g   \        P                  ! WR7      # RP                  V^8  d
   V^,
          M^ T;'       g    ^ ^8  d
   V^,
          MR4      pV^8  d   RV R2pMV^8X  d   RV R2pMV^ 8X  g   Q hRV R	2p\        P                  ! VP                  4       R
R7      # )    min_sizemax_size	{{{},{}}} \W.\W\W(.\W)?(\W(.\W)?)?Tr   )
min_length
max_lengthstrip_whitespacer-   binaryr   
from_regexZencode)rB   rF   rG   repeatsZpatterns   &    r   resolve_conbytesrV      s    ~~""H~~Hyy(>>   11!!Q!+1G 1}	$	Q'$'1}}7)6*==)T::r   c                 s  a  S P                   pS P                  pS P                  e   Ve   Q R4       hS P                  pS P                  e   Ve   Q R4       hS P                  p\        P
                  ! WRS P                  R7      pS P                  e   VP                  V 3R l4      pS P                  e   VP                  V 3R l4      pV# )NSet `gt` or `ge`, but not bothSet `lt` or `le`, but not bothF)r5   Zplacesc                 s"   < V SP                   8  # r%   )ltZdrB   r2   r   r8   $resolve_condecimal.<locals>.<lambda>  s    q366zr   c                 s"   < SP                   V 8  # r%   )gtrZ   r2   r   r8   r[     s    svvzr   )geler\   rY   r-   ZdecimalsZdecimal_placesfilter)rB   r   r   r	   s   f   r   resolve_condecimalr`     s    II
vv B"BB FF	
vv B"BB FF	
IE#BTBTUA
vvHH)*
vvHH)*Hr   c                 s  a  S P                   pS P                  pR pR pS P                  e   Ve   Q R4       hS P                  pRpS P                  e   Ve   Q R4       hS P                  pRpS P                  f   \
        P                  ! WW4R R7      # Ve9   \        P                  ! VS P                  ,          4      pV'       d
   V^,           pVeQ   VS P                  8  g   Q R4       h\        P                  ! VS P                  ,          4      pV'       d
   V^,
          p\
        P                  ! W4      P                  V 3R l4      # )FrW   TrX   )exclude_minexclude_maxr5   z:Cannot build model with max value smaller than multiple ofc                 *   < V SP                   ,          # r%   multiple_ofr7   rB   r2   r   r8   Z"resolve_confloat.<locals>.<lambda>6      1s;Nr   )r]   r^   r\   rY   re   r-   r<   mathceilfloorr?   map)rB   r   r   ra   rb   s   f    r   resolve_confloatrl     s   IIKK
vv B"BB FF	
vv B"BB FF	
yy;kpqqIIi#//9:	!AICOO+i-ii+JJy3??:;	!AI;;y,001NOOr   c                 s  a  S P                   pS P                  pS P                  e   Ve   Q R4       hS P                  ^,           pS P                  e   Ve   Q R4       hS P                  ^,
          pS P                  e   S P                  ^8X  d   \
        P                  ! W4      # Ve:   \        P                  ! \        V4      \        S P                  4      ,          4      pVe:   \        P                  ! \        V4      \        S P                  4      ,          4      p\
        P                  ! W4      P                  V 3R l4      # )NrW   rX   c                 rc   r%   rd   rf   r2   r   r8   Z resolve_conint.<locals>.<lambda>M  rg   r   )r]   r^   r\   rY   re   r-   r?   rh   ri   r    rj   rk   rB   r   r   s   f  r   resolve_conintrn   9  s    II
vv B"BB FFQJ	
vv B"BB FFQJ	
#//Q"6{{900 IIhy1HS__4MMN	JJx	2Xcoo5NNO	;;y,001NOOr   c                 s2   V P                   e#   V P                  e   Q R4       hV P                   pMQV P                  e*   V P                  \        P                  ! ^R7      ,           pM\        P                  P
                  pV P                  e#   V P                  e   Q R4       hV P                  pMQV P                  e*   V P                  \        P                  ! ^R7      ,
          pM\        P                  P                  p\        P                  ! W4      # )NrW   r   rX   )r]   r\   datetime	timedeltadateZminr^   rY   Zmaxr-   datesrm   r/   r   resolve_condaters   P  s    
vvvv~???~FF			FFX//Q77	MM%%	
vvvv~???~FF			FFX//Q77	MM%%	88I))r   c                 sB  aa V P                   ;'       g    ^ oV P                  oV P                  f+   V P                  '       g   \        P
                  ! SSR7      # V P                  eF   \        P                  ! V P                  4      pV P                  '       d   VP                  R 4      pMV P                  '       d   RP                  S^8  d
   S^,
          M^ S;'       g    ^ ^8  d
   S^,
          MR4      pS^8  d   \        P                  ! RV R24      pMES^8X  d   \        P                  ! RV R24      pM#S^ 8X  g   Q h\        P                  ! R	V R
24      pS^ 8X  d   Sf   X# Sf   XP                  V3R l4      # XP                  VV3R l4      # )rD   rE   c                 s&    W P                  4       8H  # r%   )Zstripr   r   r   r8    resolve_constr.<locals>.<lambda>n  s    ggir   rH   rI   rJ   rK   rL   rM   rN   rO   c                 s    < S\        V 4      8*  # r%   Zlen)r	   rF   r2   r   r8   rt     s    SV);r   c                 sB   < S\        V 4      u;8*  ;'       d    S8*  # u # r%   ru   )r	   rG   rF   s   &r   r8   rt     s    XQ%C%C8%Cr   )	rP   rQ   ZregexrR   r-   r6   rT   r_   r   )rB   ZstrategyrU   rG   rF   s   &  @@r   resolve_constrrv   c  sT   ~~""H~~H
yy!5!5!5ww8<<
yy==+'?@H				$$$qLHqLa%]]a/HqLR
 q=}}G9B%78H]}}WIT%:;Hq= =}}gYf%=>H1})		;<<??CDDr   c                s    V ^8  d   Qh/ ^ \         9   d7   \        \        \        \        .\        P
                  3,          3,          ;R&   # )r   r,   )__conditional_annotations__r   r0   r   r-   r1   r   r   r   r   r      s=      h @ ?4hvr'8'8899: ?ir   )z
4[0-9]{14}z5[12345][0-9]{13}z3[47][0-9]{12}z[0-26-9][0-9]{10,17})rrw   Z__doc__r   ro   Z	ipaddressrA   rh   Z	fractionsr    Ztypingr   r   r   r   r   r   Zhypothesis.strategiesZ
strategiesr-   r   Zpydantic.colorZpydantic.typesZpydantic.v1.utilsr   r   r   r.   ZEmailStrZemailsr_   Z	NameEmailr@   r   rT   ZImportErrorZPyObjectZsampled_fromZsortedZvarsZ
startswithZjoinZcolorZr_hex_shortZ
r_hex_longZr_rgbZr_rgbaZr_hslZr_hslaZreplaceZ_r_slZ_r_alphaZ_r_255Z_color_regexesZColorr=   ZCOLORS_BY_NAMEZtuplesr?   r:   r<   rk   r   Zcard_patternsr   ZUUID1ZuuidsZUUID3ZUUID4ZUUID5ZSecretBytesrS   Z	SecretStrr6   ZIPvAnyAddressZip_addressesZIPvAnyInterfacer;   ZIPv4InterfaceZIPv6InterfaceZIPvAnyNetworkZIPv4NetworkZIPv6NetworkZ
StrictBoolr>   Z	StrictStrZ
FutureDaterr   rq   Ztodayrp   ZPastDater,   r(   r4   ZJsonWrapperrC   ZConstrainedBytesrV   ZConstrainedDecimalr`   ZConstrainedFloatrl   ZConstrainedIntrn   ZConstrainedDaters   ZConstrainedStrrv   Zlistr"   r+   r!   ZJsonr   )Znamerw   s   0@r   <module>rx      sn  0       > > "    0
 h//1C1CN1ST
		MM>$OIIK~.	
   OO=CDJ=Ol=OTWfWfgjWk	0h5	0=Ol HHNN&&NN%%NN  NN!!NN  NN!!	
	 WX^^!!#IJWX^^$$&TUWX^^""$ij     NNII
x~~<<=>
		KK3KK3KK3GGI		!Q'"))As*;*?*?*MM		
 	n5	$(   MM#((=)T:>>~N   (.."((1*= >   (.."((1*= >   (.."((1*= >   (.."((1*= >   (..		@T@T0U V   (,,bggimmH<N<N.O P   (00"//2C D   LL(()BLL9P9P,QQ   LL&&'",,y7L7L*MM   (--r{{} =   (,,bggi 8   (--rxx(--BUBUBWZbZlZlrsZtBt/u v   (++RXX@S@S@UX`XjXjpqXr@r-s t >@	 ? 
	 
	 
	 
	S 
(

  & 
(
#
#$; %;( 
(
%
%& '" 
(
#
#$P %P> 
(
!
!"P #P, 
(
"
"#* $*$ 
(
!
!"E #E@ --.C /(    (-- 6c
  		: 	ms   `/ -`=
`=/`:9`: