+
    im                    ^   R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RI
HtHtHt ^ RIHt ^ RIHtHtHtHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHt ^ RIHt ^RI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. ^RI/H0t0H1t1 ]'       d!   ^ RI2H3t3 ^RI4H5t5 ^RI6H7t7 ^RI8H9t9H:t: ^RI;H<t<  ! R R].4      t=R R lt>]	R R l4       t?R  R! lt@R:R" R# lltAR$ R% ltBR& R' ltCR( R) ltD0 R;mtE0 R<mtFR*R/R+ R, lltGR- R. ltHR/RR*R/R0 R1 lltIR2 R3 ltJR4 R5 ltKR6 R7 ltLR8 R9 ltMR# )=zmPrivate logic related to fields (the `Field()` function and `FieldInfo` class), and arguments to `Annotated`.)annotationsN)Mapping)cache)	Parameterismethoddescriptor	signature)Pattern)TYPE_CHECKINGAnyCallableTypeVar)PydanticUndefined)TypeIs)AnnotationSource)PydanticDeprecatedSince211)PydanticUserError)AliasGenerator)	_generics_typing_extra)ConfigWrapper)extract_docstrings_from_cls)import_cached_base_modelimport_cached_field_info)
NsResolver)Representation)can_be_positionalget_first_not_noneBaseMetadata)	FieldInfo)	BaseModel)PydanticDataclassStandardDataclass)DecoratorInfosc                      ] tR t^&tRtRtRtR# )PydanticMetadataz0Base class for annotation markers like `Strict`. N)__name__
__module____qualname____firstlineno____doc__	__slots____static_attributes__r&       a/home/wkmabra/.openclaw/workspace/venv/lib/python3.14/site-packages/pydantic/_internal/_fields.pyr%   r%   &   s
    :Ir.   r%   c                    V ^8  d   QhRRRR/# )   metadatar
   returnr   r&   )formats   "r/   __annotate__r5   ,   s     	- 	-# 	-, 	-r.   c                 "    \        4       ! V 4      # )zCreate a new `_PydanticGeneralMetadata` class with the given metadata.

Args:
    **metadata: The metadata to add.

Returns:
    The new `_PydanticGeneralMetadata` class.
)_general_metadata_cls)r2   s   ,r/   pydantic_general_metadatar8   ,   s     !"8,,r.   c                   V ^8  d   QhRR/# )r1   r3   ztype[BaseMetadata]r&   )r4   s   "r/   r5   r5   9   s     
$ 
$1 
$r.   c                 2    ^ RI Hp   ! R R\        V 4      pV# )zCDo it this way to avoid importing `annotated_types` at import time.r   c                  &    ] tR t^=tRtR R ltRtR# )7_general_metadata_cls.<locals>._PydanticGeneralMetadataz,Pydantic general metadata like `max_digits`.c                   V ^8  d   QhRR/# )r1   r2   r
   r&   )r4   s   "r/   r5   D_general_metadata_cls.<locals>._PydanticGeneralMetadata.__annotate__@   s     	% 	%S 	%r.   c                	    Wn         R # N__dict__)selfr2   s   &&r/   __init__@_general_metadata_cls.<locals>._PydanticGeneralMetadata.__init__@   s    $Mr.   rA   N)r'   r(   r)   r*   r+   rD   r-   r&   r.   r/   _PydanticGeneralMetadatar<   =   s    :	% 	%r.   rF   )annotated_typesr   r%   )r   rF   s     r/   r7   r7   8   s     -%#3\ % $#r.   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r1   protected_namespacesztuple[str | Pattern[str], ...]ann_namestrbasesztuple[type[Any], ...]cls_namer3   Noner&   )r4   s   "r/   r5   r5   F   s:     ( (8(( !( 	(
 
(r.   c                f   \        4       pV  EF  pR p\        V\        4      '       d   VP                  V4      RJpM'\        V\        4      '       d   VP                  V4      pV'       g   Ka  V FY  p\        Wq4      '       g   K  \        Wt4      '       d   V\        VR/ 4      9   d   K;  \        RV: R\        Wq4       RV: R24      h	  . pV  F  p	\        V	\        4      '       d<   V	P                  V4      '       g#   VP                  RV	P                  : R24       KR  KT  VP                  V	4      '       d   Km  VP                  R	V	 R	24       K  	  R
RP                  V4       \        V4      ^8X  d   RMR 2p
\        P                  ! RV: RV: RV: RV
 R2	\         ^R7       EK  	  R# )FN__pydantic_fields__Field z conflicts with member z of protected namespace .zre.compile()'(z, z,)z in z$ conflicts with protected namespace zX.

You may be able to solve this by setting the 'protected_namespaces' configuration to 
stacklevel)r   
isinstancer   matchrK   
startswithhasattr
issubclassgetattr
ValueErrorappendpatternjoinlenwarningswarnUserWarning)rI   rJ   rL   rM   r    protected_namespacens_violationbvalid_namespacespnvalid_namespaces_strs   &&&&       r/   _check_protected_namespacesrl   F   s    )*I3)733.44X>dJL+S11#../BCL<1''&q44WQPegiEj9j($XL0GPQH\G]67J6MQP   /1 .B!"g..!xx11,33k"**q4QR  2  (22266,33at1I> / *+4995E+F*GPSTdPeijPjpsGt'u$XLXL8\]p\s tl mA  lB  BCD 	 7  4r.   c               (    V ^8  d   QhRRRRRRRR/# )	r1   clsz	type[Any]fieldsdict[str, FieldInfo]use_inspectboolr3   rN   r&   )r4   s   "r/   r5   r5   q   s+     ; ;	 ;;O ;^b ;os ;r.   c                    \        WR 7      pVP                  4        F*  w  rEVP                  e   K  WC9   g   K  W4,          Vn        K,  	  R# )rq   N)r   itemsdescription)rn   ro   rq   fields_docsrJ   
field_infos   &&&   r/   _update_fields_from_docstringsry   q   s;    -cKK &!!)h.E%0%:J" !/r.   c               $    V ^8  d   QhRRRRRR/# )r1   title_generatorzCallable[[str, FieldInfo], str]
field_namerK   rx   r   r&   )r4   s   "r/   r5   r5   x   s&     
! 
!4
!
! 
!r.   c                    VP                   fB   V ! W4      p\        V\        4      '       g   \        RV  RVP                   24      hW2n         R # R # )Nzfield_title_generator  must return str, not )titlerX   rK   	TypeError	__class__)r{   r|   rx   r   s   &&& r/   *_apply_field_title_generator_to_field_infor   x   sU    
 
7%%%4_4EE[\a\k\k[lmnn   r.   c               $    V ^8  d   QhRRRRRR/# )r1   alias_generatorz%Callable[[str], str] | AliasGeneratorr|   rK   rx   r   r&   )r4   s   "r/   r5   r5      s)     /V /V:/VHK/VYb/Vr.   c                   VP                   e=   VP                   ^8:  g,   VP                  e   VP                  e   VP                  Ef,   RRRrTp\	        V \
        4      '       d   V P                  V4      w  r4pMJ\        V 4      '       d:   V ! V4      p\	        V\        4      '       g   \        RV  RVP                   24      hVP                   e   VP                   ^8:  d   ^Vn         VP                   ^8X  d'   \        WS4      Vn        \        WC4      Vn        W2n        VP                  f   W2n        VP                  f   \        WS4      Vn        VP                  f   \        WC4      Vn        R# R# R# )ab  Apply an alias generator to aliases on a `FieldInfo` instance if appropriate.

Args:
    alias_generator: A callable that takes a string and returns a string, or an `AliasGenerator` instance.
    field_name: The name of the field from which to generate the alias.
    field_info: The `FieldInfo` instance to which the alias generator is (maybe) applied.
Nzalias_generator r~   )alias_priorityaliasvalidation_aliasserialization_aliasrX   r   generate_aliasescallablerK   r   r   r   )r   r|   rx   r   r   r   s   &&&   r/   $_apply_alias_generator_to_field_infor      s^    	!!)$$)#&&.))17;T4!4o~66;J;[;[\f;g8E%8o&&#J/EeS))"2?2CCYZ_ZiZiYj kll
 $$,
0I0IQ0N()J% $$)-?@S-[J**<=M*UJ'$ #$))1-?@S-[J*&&.*<=M*UJ' /9 2r.   c               (    V ^8  d   QhRRRRRRRR/# )	r1   config_wrapperr   r|   rK   rx   r   r3   rN   r&   )r4   s   "r/   r5   r5      s0     e e] e eYb egk er.   c                    VP                   ;'       g    V P                   pVe   \        W1V4       V P                  e   \        V P                  W4       R# R# )aX  Update the `FieldInfo` instance from the configuration set on the model it belongs to.

This will apply the title and alias generators from the configuration.

Args:
    config_wrapper: The configuration from the model.
    field_name: The field name the `FieldInfo` instance is attached to.
    field_info: The `FieldInfo` instance to update.
N)field_title_generatorr   r   r   )r   r|   rx   r   s   &&& r/   update_field_from_configr      sQ     '<<dd@d@d(23HV`a%%1,^-K-KZd 2r.   typevars_mapc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r1   rn   type[BaseModel]r   r   ns_resolverNsResolver | Noner   zMapping[TypeVar, Any] | Noner3   z%tuple[dict[str, FieldInfo], set[str]]r&   )r4   s   "r/   r5   r5      sA     D D	D!D #D
 /D +Dr.   c               
  aa \        4       p\        4       oV P                  p/ p\        V4       F+  p\	        VRR4      ;p'       g   K  VP                  V4       K-  	  \        P                  ! WR7      p	\        P                  ! V 4      p
/ p\        4       pV	P                  4        EF  w  pw  rVR8X  d   K  \        VP                  VVV P                  R7       \        P                  ! V4      '       d   VP                  V4       Kd  \	        W\         4      oS\         Jd   \"        ;QJ d$    VV3R l\$         4       F  '       g   K   RM	  RM! VV3R l\$         4       4      '       g]   \'        SR	4      '       dQ   \"        ;QJ d$    VV3R
 l\(         4       F  '       g   K   RM	  RM! VV3R
 l\(         4       4      '       d   \         o\+        V4      '       g   EK>  V P,                  '       d   VR8w  d   \/        RV: R24      h\	        V R/ 4      P1                  R4      pV F  p\2        P4                  ! V4      '       d   \2        P6                  ! V4      MR! Uu0 uF  pVP8                  kK  	  pp\'        W}4      '       g   Kc  VVJ d   Kk  VV9   d   Kt  W9  d   K|  \:        P<                  ! RV RV P>                   RVP>                   R2\@        ^R7       K  	  S\         J d^   W9   g   W9  d:   VPC                  V\D        PF                  R7      pV'       g   RVn$        VVn%        EM(Wm,          PM                  4       pEM\O        SV4      '       dN   \Q        SPR                  4      '       d3   SPR                  PU                  RV 4      pVSn)        VSPV                  R&   VPY                  VS\D        PF                  R7      pSVn-        V'       g   RVn$        VVn%        MeRVP\                  9   dU   VP_                  4       '       g?   \:        P<                  ! RV: RV: RV: R2\`        ^R7       VP                  V4       EK   \c        W4       V Pf                  R,          pVVPh                  9   d   \k        RV: RV P                  : R 24      hVW&   VPH                  '       g   EK  \m        WV4       EK!  	  V'       d=   VPo                  4        F(  pVPH                  '       g   K  VPq                  V4       K*  	  VPr                  '       d   \u        W4       W3# u upi   \d         d     Li ; i)"a  Collect the fields and class variables names of a nascent Pydantic model.

The fields collection process is *lenient*, meaning it won't error if string annotations
fail to evaluate. If this happens, the original annotation (and assigned value, if any)
is stored on the created `FieldInfo` instance.

The `rebuild_model_fields()` should be called at a later point (e.g. when rebuilding the model),
and will make use of these stored attributes.

Args:
    cls: BaseModel or dataclass.
    config_wrapper: The config wrapper instance.
    ns_resolver: Namespace resolver to use when getting model annotations.
    typevars_map: A dictionary mapping type variables to their concrete types.

Returns:
    A two-tuple containing model fields and class variables names.

Raises:
    NameError:
        - If there is a conflict between a field name and protected namespaces.
        - If there is a field other than `root` in `RootModel`.
        - If a field shadows an attribute in the parent model.
rP   N)r   model_config)rI   rJ   rL   rM   c              3  B   <"   T F  p\        SVR 4      SJ x  K  	  R # 5ir@   )r]   .0	depr_name
BaseModel_assigned_values   & r/   	<genexpr>'collect_model_fields.<locals>.<genexpr>  s!     qXp9
It4FXps   TF__func__c              3  l   <"   T F)  p\        \        SVR 4      RR 4      SP                  J x  K+  	  R # 5i)Nr   )r]   r   r   s   & r/   r   r   "  s6      %B	 GJ	4@*dSWeWnWnn%Bs   14rootzUnexpected field with name z4; only 'root' is allowed as a field of a `RootModel`__pydantic_generic_metadata__originzField name "z" in "z"" shadows an attribute in parent ""rV   _sourcedefaultfinalzAnnotation z= is marked as final and has a default value. Pydantic treats zz as a class variable, but it will be considered as a normal field in V3 to be aligned with dataclasses. If you still want zV to be considered as a class variable, annotate it as: `ClassVar[<type>] = <default>.`)categoryrW   __pydantic_decorators__rQ   z
 of class zf overrides symbol of same name in a parent class. This override with a computed_field is incompatible.r&   );r   r   	__bases__reversedr]   updater   get_model_type_hintssafe_get_annotationssetru   rl   rI   r'   is_classvar_annotationaddr   any_deprecated_method_namesr[   _deprecated_classmethod_namesis_valid_field_name__pydantic_root_model__	NameErrorgetdataclassesis_dataclassro   namerc   rd   r)   re   from_annotationr   CLASS	_complete_original_annotation_copyrX   r   r   __get___attributes_setfrom_annotated_attribute_original_assignment_qualifiersis_requiredr   delattrAttributeErrorrB   computed_fieldsr   r   valuesapply_typevars_mapuse_attribute_docstringsry   )rn   r   r   r   
FieldInfo_rL   parent_fields_lookupbasemodel_fields
type_hintsr   ro   
class_varsrJ   ann_type	evaluatedgeneric_originfielddataclass_fieldsrx   r   
decoratorsr   r   s   &&&$                  @@r/   collect_model_fieldsr      s   > *+J)+JMME13"4)>EE<EE ''5   33CQJ  44S9K#%F5J+5+;+;+=''8~% #!/!D!D\\		
 //99NN8$ 0AB!22CqXpqCCCqXpqqq 
33C %BCCC %B   /N"8,,&&&8v+=-h\9mn  !&ErJNNxXDEPE]E]^bEcEc););D)Aik)k )ku

)k    t&&>)// ."8*F33C3C2D E))*!- 	% 2 ..&(*N (77JZJ`J`7a
 +0J( 7?J3 2;AAC
 .*55:L^McMc:d:d )0088sC)0&<C..y9#<<X~_o_u_u<vJ /=J+',
$2:
/J222:;Q;Q;S;S!(-jksjv w""*  .DE 8  x(
& &)\\2K%L
z111Js||.> ?G G  &$^zJU ,>X ]]_E((6 % ...&s3M \ " s   &T/T44UUc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r1   rn   r   r   r   r   r   r   Mapping[TypeVar, Any]r3   rp   r&   )r4   s   "r/   r5   r5     s<     * *	* "* 	*
 (* *r.   c          	        \        4       p/ pVP                  V 4      ;_uu_ 4        V P                  P                  4        F  w  rgVP                  '       d   WuV&   K  VP
                  p\        P                  ! VP                  .VP                  O5!  p	\        P                  ! W4      p	VP                  ;p
\        J d#   VP                  V	\        P                   R7      pM!VP#                  W\        P                   R7      pVP
                  e   VP
                  MTVn        \%        WV4       WV&   K  	  RRR4       V#   + '       g   i     T# ; i)a  Rebuild the (already present) model fields by trying to reevaluate annotations.

This function should be called whenever a model with incomplete fields is encountered.

Raises:
    NameError: If one of the annotations failed to evaluate.

Note:
    This function *doesn't* mutate the model fields in place, as it can be called during
    schema generation, where you don't want to mutate other model's fields.
r   N)r   pushrP   ru   r   rv   r   	eval_typer   types_namespacer   replace_typesr   r   r   r   r   r   r   )rn   r   r   r   r   rebuilt_fieldsf_namerx   existing_descannassign	new_fields   &$$$        r/   rebuild_model_fieldsr     s/   $ *+J+-N			#		"%"9"9"?"?"AF###)3v& * 6 6#--33 00  --c@(===FBSS * : :3HXH^H^ : _I * C CCYiYoYo C pIAJAVAVAb	(=(=hu	%(K)2v&% #B 
* + 
	* s   DEE	r   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r1   rn   ztype[StandardDataclass]r   r   r   r   r   zdict[Any, Any] | Noner3   rp   r&   )r4   s   "r/   r5   r5     sC     i i	 i "i #	i
 (i ir.   c               (   \        4       p/ pT;'       g    \        4       pV P                  p\        V P                  4       EFW  p\
        P                  ! V4      '       g   K"  VP                  V4      ;_uu_ 4        VP                  4        EF  w  r\        P                  ! V4      p
W9  d   K$  VP                  w  r\        P                  ! V	P                  W4      w  r\        P                  ! V4      '       d   Ks  V	P                  '       g?   V	P                   \
        P"                  J d!   V	P$                  \
        P"                  J d   K  \'        V	P                   V4      '       d   V	P                   P(                  '       d/   V	P                   P                  RJ d   \+        RV R2RR7      hEK)  VP-                  WP                   \.        P0                  R7      pV	P                   Vn        M'VP-                  W\.        P0                  R7      pWn        V'       g   RVn        Wn        WV&   \9        WV4       VP                   \:        Jg   EK  \'        \=        WV4      V4      '       g   EK  \?        WVP                   4       EK  	  RRR4       EKZ  	  V'       d)   VPA                  4        F  pVPC                  V4       K  	  VPD                  '       d   \G        V V\I        V R4      '       * R	7       V#   + '       g   i     EK  ; i)
aX  Collect the fields of a dataclass.

Args:
    cls: dataclass.
    config_wrapper: The config wrapper instance.
    ns_resolver: Namespace resolver to use when getting dataclass annotations.
        Defaults to an empty instance.
    typevars_map: A dictionary mapping type variables to their concrete types.

Returns:
    The dataclass fields.
FzDataclass field zD has init=False and init_var=True, but these are mutually exclusive.zclashing-init-and-init-var)coder   N__is_pydantic_dataclass__rt   )%r   r   __dataclass_fields__r   __mro__r   r   r   ru   r   r   r   try_eval_typetyper   initr   MISSINGdefault_factoryrX   init_varr   r   r   	DATACLASSr   r   r   r   r   r]   setattrr   r   r   ry   r[   )rn   r   r   r   r   ro   r   r   rJ   dataclass_field	base_annsglobalnslocalnsr   r   rx   r   s   &$$$             r/   collect_dataclass_fieldsr     s   & *+J#%F--K//
 %''--d##-=-C-C-E))>>tD	, $/$?$?!&3&A&A/BVBVX`&j# 77AA (,,,'//;3F3FF'77;;N;NN o55zBB&..777*22775@"3"28*  =A  !B%A#  !!+!D!D "9"9CSC]C] "E "J 7F6M6MJ3!+!D!D ;K;U;U "E "J 7F3 +0J(6>3#-x (:N%%->>:C:6
D D C:+=+=>m .F $#	 &z ]]_E $$\2	 % ...& $C)DEE	
 MS $##s-   =BK?A5K?	BK?#.K?K?6K??Lc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r1   rn   ztype[PydanticDataclass]r   r   r   r   r   r   r3   rp   r&   )r4   s   "r/   r5   r5   8  s<     + +	 + "+ 	+
 (+ +r.   c          	     V   \        4       p/ pVP                  V 4      ;_uu_ 4        V P                  P                  4        F  w  rgVP                  '       d   WuV&   K  VP
                  p\        P                  ! VP                  .VP                  O5!  p	\        P                  ! W4      p	VP                  V	VP                  \        P                  R7      p
V
P
                  e   V
P
                  MTV
n        \!        WV
4       WV&   K  	  RRR4       V#   + '       g   i     T# ; i)a  Rebuild the (already present) dataclass fields by trying to reevaluate annotations.

This function should be called whenever a dataclass with incomplete fields is encountered.

Raises:
    NameError: If one of the annotations failed to evaluate.

Note:
    This function *doesn't* mutate the dataclass fields in place, as it can be called during
    schema generation, where you don't want to mutate other dataclass's fields.
r   N)r   r   rP   ru   r   rv   r   r   r   r   r   r   r   r   r   r   r   )rn   r   r   r   r   r   r   rx   r   r   r   s   &$$$       r/   rebuild_dataclass_fieldsr   8  s   $ *+J+-N			#		"%"9"9"?"?"AF###)3v& * 6 6#--33 00  --c@&??33,66 @ 	 BKAVAVAb	(=(=hu	%(K)2v&' #B 
, - 
	, s   C'DD(	c                    V ^8  d   QhRRRR/# r1   r   rK   r3   rr   r&   )r4   s   "r/   r5   r5   f  s     $ $c $d $r.   c                .    V P                  R 4      '       * # )_rZ   r   s   &r/   r   r   f  s    s###r.   c                    V ^8  d   QhRRRR/# r  r&   )r4   s   "r/   r5   r5   j  s     > >C >D >r.   c                `    V P                  R 4      ;'       d    V P                  R4      '       * # )r  __r  r  s   &r/   is_valid_privateattr_namer
  j  s%    ??3==(=$==r.   c                    V ^8  d   QhRRRR/# )r1   r   z3Callable[[], Any] | Callable[[dict[str, Any]], Any]r3   z'TypeIs[Callable[[dict[str, Any]], Any]]r&   )r4   s   "r/   r5   r5   n  s      r rHr,rr.   c                6    \        V 4      p\        TP                  P                  4       4      p\        T4      ^8H  ;'       d>    \        T^ ,          4      ;'       d$    T^ ,          P                  \        P                  J #   \        \        3 d     R# i ; i)zMWhether the provided default factory callable has a validated data parameter.F)r   r^   r   list
parametersr   rb   r   r   r   empty)r   sigr  s   &  r/   takes_validated_data_argumentr  n  s    ( cnn++-.Jz?aqq$5jm$DqqTUI^I^bkbqbqIqq 	"  s   B BB)F>   copydictjson_iter_calculate_keys_copy_and_set_values>
   schemafrom_ormvalidate	construct	parse_obj	parse_raw
_get_value
parse_fileschema_jsonupdate_forward_refs)Nr+   
__future__r   _annotationsr   rc   collections.abcr   	functoolsr   inspectr   r   r   rer   typingr	   r
   r   r   pydantic_corer   typing_extensionsr   typing_inspection.introspectionr   pydanticr   pydantic.errorsr   aliasesr    r   r   _configr   _docs_extractionr   _import_utilsr   r   _namespace_utilsr   _reprr   _utilsr   r   rG   r   ro   r   mainr    _dataclassesr!   r"   _decoratorsr#   r%   r8   r7   rl   ry   r   r   r   r   r   r   r   r   r   r   r
  r  r&   r.   r/   <module>r9     s    s 2   #  < <  8 8 + $ < / - $ & " 9 M ( ! 9," B+~ 	- 
$ 
$(V;
!/Vde" h ! D
 26DN*Zi &*	i
 +/iX+\$>rr.   