+
    iE                       a  R t?0 t ^ RIt^ RIt^ RIt^ RIHtHtHtHtHtH	t	H
t
HtHtHtHtHtHtHtHt ^ RIHtHt ^ RIHtHt ^ RIHt ^ RIHt ^ RIHtH t  ^ RI!H"t" ^ R	I#H$t$H%t%H&t&H't'H(t( ^ R
I)H*t*H+t+ ]PX                  R8  d   ^ RIH-t- ]PX                  R8  d   ^ RIHt ]! RRR7      t.]t/]]],          ]]]R3,          3,          t0]]/]],          3,          t1]PX                  R8  d&   ]]0]],          3,          t2]]],          ]13,          t3M]t2]t3]2! 4       t4]3! 4       t5 ! R R]4      t6R R lt7R R lt8/ Ps                  4       Pt                  t;] ^ k R R lt<R R lt=R R lt>R# )     N)TYPE_CHECKINGAnyClassVarDict
ForwardRefGenericIteratorListMappingOptionalTupleTypeTypeVarUnioncast)WeakKeyDictionaryWeakValueDictionary)	AnnotatedLiteral)gather_all_validators)DeferredType)	BaseModelcreate_model)JsonWrapper)display_as_typeget_all_type_hintsget_args
get_origintyping_base)all_identicallenient_issubclass)_UnionGenericAlias)r   GenericModelTGenericModel)bound.c                      a a ] tR t^@t o 0 oR	tRt]'       d   S^ k V 3R lR lt]V 3R lR l4       t	]V 3R lR l4       t
V V3R ltR	tV tR
# )r$   Fc                   < V ^8  d   QhRS[ S[,          RS[S[ S[,          S[S[ S[,          R3,          3,          RS[ S[,          /#    clsparams.return)r   r#   r   r   r   )format__classdict__s   "[/home/wkmabra/.openclaw/workspace/venv/lib/python3.14/site-packages/pydantic/v1/generics.py__annotate__GenericModel.__annotate__K   sS     ] ]tM2 ]E$s)USWX[S\^aSaMbBb<c ]hlmphq ]    c                  a  R V 3R llp\         P                  V! V4      4      pVe   V# S P                  '       d!   \        S P                  9  d   \        R4      h\        V\        4      '       g   V3pS \        J dF   \        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   \        R4      h\        S R	4      '       g   \        R
S P                   R24      h\        S V4       \        \        S P                  V4      4      p\!        VP#                  4       VP%                  4       4      '       d   V'       d   S # S P'                  V4      p\)        S 4      p\+        S 4      P-                  4       pV UU	u/ uF  w  r\/        V	4      \0        Jg   K  WbK  	  p
pp	V
 Uu/ uF=  qS P2                  9   g   K  V\5        4       S P2                  V,          P6                  3bK?  	  pp\9        4       w  r\;        \<        \        ,          \?        V3RT;'       g    S P@                  RS 3\        S PC                  V4      4      ,           RRRVRR/VB 4      pV\D        V&   V'       dR   RpTp\F        PH                  VP@                  ,          PJ                  pWJd   VPM                  VV4      pVR,          pK"  S PN                  Vn'        \        \Q        VP%                  4       4       Uu/ uF  pVRbK  	  up4      pV'       * Vn        V'       d   VVn        V\         V! V4      &   \S        V4      ^8X  d   V\         V! V^ ,          4      &   \U        WW4       V# u up	pi u upi u upi )a  Instantiates a new class from a generic class `cls` and type variables `params`.

:param params: Tuple of types the class . Given a generic class
    `Model` with 2 type variables and a concrete model `Model[str, int]`,
    the value `(str, int)` would be passed to `params`.
:return: New model class inheriting from `cls` with instantiated
    types described by `params`. If no parameters are given, `cls` is
    returned as is.

c                0    V ^8  d   QhR\         R\        /# )r)   _paramsr,   )r   CacheKey)r-   s   "r/   r0   4GenericModel.__class_getitem__.<locals>.__annotate__W   s     	& 	& 	& 	&r2   c                    < \        V 4      p\        V4      ^8X  d9   \        V^ ,          \        4      '       d   \	        V^ ,          4      V^,          3pSW3# )r)   )r   len
isinstancelisttuple)r5   argsr*   s   & r/   
_cache_key2GenericModel.__class_getitem__.<locals>._cache_keyW   sI    G$D4yA~*T!Wd";";d1gQ0%%r2   Nz?Cannot parameterize a concrete instantiation of a generic modelc              3   B   "   T F  p\        V\        4      x  K  	  R # 5iN)r:   r   ).0params   & r/   	<genexpr>1GenericModel.__class_getitem__.<locals>.<genexpr>e   s     &Vvez%'A'Avs   TFzDType parameters should be placed on typing.Generic, not GenericModel__parameters__zType z< must inherit from typing.Generic before being parameterized
__module____base__
__config____validators____cls_kwargs___)+_generic_types_cacheget__concrete__r   	__bases__	TypeErrorr:   r<   r$   anyhasattr__name__check_parameters_countdictziprF   r    keysvalues__concrete_name__r   r   itemsr   r   
__fields__r   
field_infoget_caller_frame_infor   r   r   rG   __parameterized_bases___assigned_parameterssysmodules__dict__
setdefaultConfigiter_contained_typevarsr9   _prepare_model_fields)r*   r+   r>   cachedtypevars_map
model_name
validators
type_hintskvinstance_type_hintsfieldsmodel_modulecalled_globallycreated_modelobject_by_referencereference_namereference_module_globalsrC   
new_paramss   f&                  r/   __class_getitem__GenericModel.__class_getitem__K   s*   	& 	& &))*V*<=Ms}} <]^^&%((YF,33&Vv&V333&Vv&V#V#Vbccs,--eCLL>1mnoosF+59#c>P>PRX:Y5Z**,l.A.A.CDDJ **62
*3/
',224
0:\
jmS[>[tqt
\M`xM`iliwiwdwC!lncnnQ&7&B&BCCM`x(=(?%'993>> %(C(CL(Q"RR  	
  *  $ 
 /;]+"&'N'*{{=3K3K'L'U'U$%:&>&I&I.Zg&h##%"zz &=l>Q>Q>S&TU&TUUD[&TU

 *4^"+5M( 4AZ/0v;!:G F1I!67 	m5HWg ]xB Vs   M/*M/7M5,M5>M:c                `   < V ^8  d   QhRS[ S[,          RS[S[ S[,          R3,          RS[/# r(   )r   r   r   str)r-   r.   s   "r/   r0   r1      s3     5 5tCy 5%S	32G 5C 5r2   c                    V Uu. uF  p\        V4      NK  	  ppRP                  V4      pV P                   RV R2# u upi )a  Compute class name for child classes.

:param params: Tuple of types the class . Given a generic class
    `Model` with 2 type variables and a concrete model `Model[str, int]`,
    the value `(str, int)` would be passed to `params`.
:return: String representing a the new class where `params` are
    passed to `cls` as type variables.

This method can be overridden to achieve a custom naming scheme for GenericModels.
z, [])r   joinrT   )r*   r+   rC   param_namesparams_components   &&   r/   rZ   GenericModel.__concrete_name__   sL     <BB6%u-6B99[1,,q!1 2!44 Cs   >c                F   < V ^8  d   QhRS[ RS[S[S[,          ,          /# )r)   ri   r,   )Parametrizationr	   r   r   )r-   r.   s   "r/   r0   r1      s+     =F =F? =FxPTUXPYGZ =Fr2   c           
   #    a "   R V 3R llpS P                    F  p\        V\        4      '       g   K  \        VRR4      '       g   K0  S \        9   d]   V\        9   d   KH  \        S ,          P                  4        UUu/ uF  w  rEWAP                  WU4      bK  	  pppV! W64       Rj  xL
  K  V! W14       Rj  xL
  K  	  R# u uppi  L" L5i)aM  
Returns unbound bases of cls parameterised to given type variables

:param typevars_map: Dictionary of type applications for binding subclasses.
    Given a generic class `Model` with 2 type variables [S, T]
    and a concrete model `Model[str, int]`,
    the value `{S: str, T: int}` would be passed to `typevars_map`.
:return: an iterator of generic sub classes, parameterised by `typevars_map`
    and other assigned parameters of `cls`

e.g.:
```
class A(GenericModel, Generic[T]):
    ...

class B(A[V], Generic[V]):
    ...

assert A[int] in B.__parameterized_bases__({V: int})
```
c                ~    V ^8  d   QhR\         \        ,          R\        R\        \         \        ,          ,          /# )r)   
base_modelmapped_typesr,   )r   r$   r   r	   )r-   s   "r/   r0   :GenericModel.__parameterized_bases__.<locals>.__annotate__   s3     	% 	%\*	%:I	%d<()	%r2   c              3      <a"   \         ;QJ d!    . V3R  lV P                   4       F  NK  	  5M! V3R  lV P                   4       4      pV P                  V4      pW0J g   VSJ d   R# Vx  R# 5i)c              3   6   <"   T F  pSV,          x  K  	  R # 5irA    )rB   rC   r   s   & r/   rD   QGenericModel.__parameterized_bases__.<locals>.build_base_model.<locals>.<genexpr>   s     #_E^EL$7$7E^s   N)r<   rF   rx   )r   r   base_parametersparameterized_baser*   s   &f  r/   build_base_model>GenericModel.__parameterized_bases__.<locals>.build_base_model   sZ      $e#_ZE^E^#_ee#_ZE^E^#__O!+!=!=o!N!/3E3L$$s   A+A/rF   N)rP   
issubclassr$   getattrr`   r[   rN   )r*   ri   r   r   keyvaluer   s   f&     r/   r_   $GenericModel.__parameterized_bases__   s     0	% 	% --Jj,77Z)94@@ ,,!55  OccfNgNmNmNo5No
--e;;No ! 5  0
III ,JEEE9 (*5 J Fs0   A<C?CC)C*C;C<CCc                t   < V ^8  d   Qh/ S[ S[,          ;R&   ^ S9   d   S[ S[S[R3,          ,          ;R&   # )r)   rO   .rF   )r   boolr   TypeVarType)r-   r.   __conditional_annotations__s   "r/   r0   r1   @   s2     4.(  	:{C'7!899 r2   r   N)rT   rG   __qualname____firstlineno__	__slots__rO   r   rx   classmethodrZ   r_   __annotate_func____static_attributes____classdictcell__)r.   r   s   @@r/   r$   r$   @   sV     I#(L 	:] ]~ 5 5 =F =Fw  r2   c                ^    V ^8  d   QhR\         R\        \         \         3,          R\         /# )r)   type_type_mapr,   )r   r   )r-   s   "r/   r0   r0      s/     O O OS(9 Oc Or2   c                b  a S'       g   V # \        V 4      p\        V 4      pV\        J d&   VvrE\        \        VS4      \	        V4      3,          # V\
        J g    \        P                  R8  d   V\        J d   SP                  W 4      # V'       d   \        ;QJ d    . V3R lV 4       F  NK  	  5M! V3R lV 4       4      p\        W&4      '       d   V # VeV   \        V \        4      '       d@   \        V\        4      '       g*   \        V RR4      e   \        \        V P                  4      pVf   Q h\        P                  R8  d    V\         P"                  J d   \%        W64      # W6,          # V'       g   \'        V \(        4      '       dl   V P*                  '       gZ   V P,                  p\        ;QJ d    . V3R lV 4       F  NK  	  5M! V3R lV 4       4      p\        W&4      '       d   V # W,          # \        V \.        \0        34      '       d+   \1        V3R lV  4       4      p\        W4      '       d   V # V# V'       g4   \'        V \2        4      '       d   \        V P4                  S4      V n        V # SP                  W 4      p\        V\6        4      '       d   \9        V4      # V# )a  Return type with all occurrences of `type_map` keys recursively replaced with their values.

:param type_: Any type, class or generic alias
:param type_map: Mapping from `TypeVar` instance to concrete types.
:return: New type representing the basic structure of `type_` with all
    `typevar_map` keys recursively replaced.

>>> replace_types(Tuple[str, Union[List[str], float]], {str: int})
Tuple[int, Union[List[int], float]]

c              3   <   <"   T F  p\        VS4      x  K  	  R # 5irA   replace_types)rB   argr   s   & r/   rD    replace_types.<locals>.<genexpr>  s     "U9C=h#?#?9   N_namec              3   <   <"   T F  p\        VS4      x  K  	  R # 5irA   r   )rB   tr   s   & r/   rD   r   0  s     "Qy!=H#=#=yr   c              3   <   <"   T F  p\        VS4      x  K  	  R # 5irA   r   )rB   elementr   s   & r/   rD   r   8  s     SU']7H==Ur         r   
   )r   r   r   r   r<   
ExtLiteralra   version_infor   rN   r    r:   r   r   typingr   types	UnionTyper"   r!   r$   rO   rF   r
   r;   r   
inner_typer{   r   )	r   r   	type_argsorigin_typeannotated_typeannotationsresolved_type_argsresolved_listnew_types	   &f       r/   r   r      s    IU#Ki'0$~x@%BTTUUz!s'7'76'AkU\F\||E)) "U"U9"UUU"U9"UU77 L#5+..{K88w-9
 "&%++6K&&& w&;%//+I%kFF.. -e\BB5K]K]K]((	"U"Qy"QUU"Qy"QQ77L(( %$&&SUSS..L -e[AA()9)98D ||E)H(C  (##r2   c                d    V ^8  d   QhR\         \        ,          R\        \        R3,          RR/# )r)   r*   
parameters.r,   N)r   r$   r   r   )r-   s   "r/   r0   r0   M  s4     r r\ 2 rc3h rTX rr2   c           
          \        V4      p\        V P                  4      pW#8w  d,   W#8  d   R MRp\        RV RV P                   RV RV 24      hR# )manyfewzToo z parameters for z	; actual z, expected N)r9   rF   rQ   rT   )r*   r   actualexpecteddescriptions   &&   r/   rU   rU   M  s`    _F3%%&H & 1fu${m+;CLL>SYRZZefneopqq r2   c                F    V ^8  d   QhR\         R\        \        ,          /# )r)   rn   r,   )r   r	   r   )r-   s   "r/   r0   r0   X  s     4 4s 4x'< 4r2   c              #    "   \        V \        4      '       d   V x  R# \        V R4      '       d>   \        V 4      '       g-   \	        V \
        4      '       d   V P                   Rj  xL
  R# \        V \        \        34      '       d   V  F  p\        V4       Rj  xL
  K  	  R# \        V 4      pV F  p\        V4       Rj  xL
  K  	  R#  Li L5 L5i)zdRecursively iterate through all subtypes and type args of `v` and yield any typevars that are found.rF   N)r:   r   rS   r   r!   r$   rF   
DictValuesr;   rf   r   )rn   varr=   r   s   &   r/   rf   rf   X  s     !W	$	%	%jmm@RSTVb@c@c####	A
D)	*	*C.s333  {C.s333  	$ 4 4s6   A%C'C(5CC(CCCCCc                \    V ^8  d   QhR\         \        \        ,          \        3,          /# )r)   r,   )r   r   r{   r   )r-   s   "r/   r0   r0   g  s$     Z ZuXc]D%89 Zr2   c                      \         P                  ! ^4      p T P
                  pTP                  R4      T P                  TJ 3#   \         d   p\        R4      ThRp?i\         d    Ru # i ; i)z
Used inside a function to check whether it was called globally

Will only work against non-compiled code, therefore used only in pydantic.generics

:returns Tuple[module_name, called_globally]
z2This function must be used inside another functionNrT   )NF)ra   	_getframe
ValueErrorRuntimeErrorAttributeError	f_globalsrN   f_locals)previous_caller_frameeframe_globalss      r/   r^   r^   g  su     #a 0
 *33MZ(*?*H*HM*YYY  XOPVWW s#   A A-AA-'A-,A-c          
          V ^8  d   QhR\         \        ,          R\        \        \        3,          R\        \        \
        3,          R\        \        \
        3,          RR/# )r)   rs   rp   ro   ri   r,   N)r   r$   r   r{   r   type)r-   s   "r/   r0   r0   y  sZ     ; ;%;CH; !d+; #t)$	;
 
;r2   c                   V P                   P                  4        F  w  rEWA9  d#   VP                  P                  \        Jg   Q hK-  VP                  P                  \        J g   Q VP                  P                  4       hW$,          p\        Wc4      pWun        Wun        VP                  4        WpP                  V&   K  	  R# )zH
Replace DeferredType fields with concrete type hints and prepare them.
N)	r\   r[   r   	__class__r   r   outer_type_prepare__annotations__)rs   rp   ro   ri   r   fieldfield_type_hintconcrete_types   &&&&    r/   rg   rg   y  s     $..446
;;((<<<{{$$4Kekk6K6KK4-2%oD#)-:%%c* 7r2   c                V    V ^8  d   Qh/ ^ \         9   d   \        \        ,          ;R&   # )r)   r   )r   r   r   )r-   s   "r/   r0   r0      s    

h
 . -DI -i
 r2   r   r   )r   	   )@r   ra   r   r   r   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   weakrefr   r   typing_extensionsr   r   r   pydantic.v1.class_validatorsr   pydantic.v1.fieldsr   pydantic.v1.mainr   r   pydantic.v1.typesr   pydantic.v1.typingr   r   r   r   r   pydantic.v1.utilsr    r!   r   r"   r#   r   r6   r   GenericTypesCacheAssignedParametersrM   r`   r$   r   rU   rY   r   r   rf   r^   rg   r0   )r   s   @r/   <module>r      sH   

      " ; > > + 4 ) e e ?w)v~>cCsCx01+tCy01 v+Hd9o,EF*4	?O+KL+* )*  *+ xF9 xFvOdr 		--
 -4Z$;r2   