+
    Ai                    n   R t ^ RIH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 ^ RIHt ^ RI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HtH t H!t! ^ R	I"H#t# ^R
I$H%t%H&t& ^RI'H(t( ^RIH)t)H*t* ^RI+H,t, ^RI-H.t.H/t/H0t0H1t1 ^RI2H3t3H4t4H5t5H6t6 ^RI7H8t8H9t9 ^RI:H;t;H<t< ^RI=H>t>H?t? ^RI@HAtA ^RIBHCtC ^RIDHEtE ^RIFHGtGHHtHHItIHJtJ ^RIKHLtLHMtM ]'       d"   ^RINHOtP ^RINHQtQHRtR ^RINHStT ^RIUHVtV ^RI2HWtW M]X! 4       tP]X! 4       tT]XP                  tZ ! R R][4      t\RR /R! R" llt]]! R#4      t^]! R$]P]T]]3R%7       ! R& R']
4      4       t_R( R) lt`R* R+ ltaR, R- ltbR. R/ ltcR0 R1 ltdR2 R3 lteR4R$R5R$R6RR7R /R8 R9 lltfR: R; ltg ! R< R=4      th ! R> R?4      tiR@ RA ltjRB RC ltk]RD RE l4       tlR# )Fz"Private logic for creating models.)annotationsN)ABCMeta)cachepartialwraps)FunctionType)TYPE_CHECKINGAnyCallableGenericLiteralNoReturnTypeVarcast)PydanticUndefinedSchemaSerializer)TypeAliasTypedataclass_transform
deprecatedget_args
get_origin)typing_objects)PydanticUndefinedAnnotationPydanticUserError)create_schema_validator)GenericBeforeBaseModelWarningPydanticDeprecatedSince20)ConfigWrapper)DecoratorInfosPydanticDescriptorProxyget_attribute_from_basesunwrap_wrapped_function)collect_model_fieldsis_valid_field_nameis_valid_privateattr_namerebuild_model_fields)GenerateSchemaInvalidSchemaError)PydanticGenericMetadataget_model_typevars_map)import_cached_base_modelimport_cached_field_info)set_model_mocks)
NsResolver)generate_pydantic_signature)_make_forward_refeval_type_backportis_classvar_annotationparent_frame_namespace)LazyClassAttributeSafeGetItemProxy)Field)	FieldInfoModelPrivateAttr)PrivateAttr)	BaseModel)PydanticExtraInfoc                  2   a  ] tR t^4tRtR V 3R lltRtV ;t# )_ModelNamespaceDictzsA dictionary subclass that intercepts attribute setting on model classes and
warns about overriding of decorators.
c               $    V ^8  d   QhRRRRRR/# )   kstrvobjectreturnNone )formats   "d/var/www/html/photoedit/myenv/lib/python3.14/site-packages/pydantic/_internal/_model_construction.py__annotate__ _ModelNamespaceDict.__annotate__9   s!     ) )S )V ) )    c                	   < V P                  VR 4      pV'       dO   W#JdJ   \        V\        4      '       d4   \        P                  ! RV RVP
                  P                   R2^R7       \        SV `!  W4      # )N`z"` overrides an existing Pydantic `z` decorator
stacklevel)	get
isinstancer   warningswarndecorator_infodecorator_reprsuper__setitem__)selfr?   rA   existing	__class__s   &&& rG   rV   _ModelNamespaceDict.__setitem__9   sj    D))jCZ.[.[MMA389P9P9_9_8``kl
 w"1((rJ   rE   )__name__
__module____qualname____firstlineno____doc__rV   __static_attributes____classcell__rY   s   @rG   r<   r<   4   s    ) )rJ   r<   initFc                    V ^8  d   QhRRRR/# )r>   rc   zLiteral[False]rC   r	   rE   )rF   s   "rG   rH   rH   D   s      
 	rJ   c                    R# )zOnly for typing purposes. Used as default value of `__pydantic_fields_set__`,
`__pydantic_extra__`, `__pydantic_private__`, so they could be ignored when
synthesizing the `__init__` signature.
NrE   )rc   s   $rG   NoInitFieldrf   D   s    rJ   _TT)kw_only_defaultfield_specifiersc                    a  ] tR t^RtRR V 3R lllt]'       g   R R lt]R R l4       tR V 3R	 llt	]
P                  t]
P                  t]R
 R l4       t]]! RRR7      R R l4       4       t]R R l4       tR V 3R lltRtV ;t# )ModelMetaclassNc               8    V ^8  d   QhRRRRRRRRR	R
RRRRRR/# )r>   cls_namer@   basestuple[type[Any], ...]	namespacedict[str, Any]__pydantic_generic_metadata__zPydanticGenericMetadata | None#__pydantic_reset_parent_namespace__bool_create_model_module
str | Nonekwargsr	   rC   typerE   )rF   s   "rG   rH   ModelMetaclass.__annotate__T   so     DN DNDN %DN "	DN
 (FDN .2DN )DN DN 
DNrJ   c           	     V  <a%a&a' V'       Ed<   \         P                  R+8  dC   RV9   d   VR,          pMC^ RIHp	Hp
Hp V! V4      ;p'       d   V
! WP                  R7      pM/ pMVP                  R/ 4      pV P                  V4      w  rp\        P                  ! W#W4      pVP                  VR&   \        W8VP                  W4      pV'       g	   V'       d6   \        W24      o%S%e   \        S%4      R V%3R ll4       pVVR&   M	\         VR&   WR	&   / VCVCVR
&   \#        R\$        S(V `L  ! WW#3/ VB 4      p\)        4       pVP*                  p\,        V9   dK   VP/                  \,        4      VP/                  V4      8  d"   \0        P2                  ! \5        R4      ^R7       \7        VP8                  RR4      '       * Vn        VP<                  VP<                  J d   RMRVn        / Vn         \B        PD                  ! VRR7      Vn#        VPF                  PI                  V4       V'       d
   VVn%        EM\7        VR/ 4      P                  RR,4      o'\7        VRR4      ;'       g    S'o&S&'       Ed   S''       Edx   \L        ;QJ d    V&3R lS' 4       F  '       d   K   RM	  RM! V&3R lS' 4       4      '       Eg7   ^RI'H(p \R        ;QJ d    . V'3R lS& 4       F  NK  	  5M! V'3R lS& 4       4      pVS'9   dV   VS&9  dO   RPU                  V Uu. uF  pVPV                  NK  	  up4      pVPV                   RV RVPV                   RV R2pMS'V,           pRPU                  V Uu. uF  p\Y        V4      NK  	  up4      pRV R2pRV R 2p\,        V9  dN   RPU                  V Uu. uF  pVPV                  NK  	  upV.,           4      pVR!VPV                   R"V R#2,          p\[        V4      hR$RR%R,RS&/Vn%        RVn.        VP_                  4        F  w  ppVPa                  VV4       K  	  V'       d   \c        \e        4       4      Vn3        \7        VR&R4      p \i        V \j        4      '       d   \m        V 4      p \o        V R'7      p!\q        VVV!R(7       VPF                  Pr                  P_                  4        U"U#u/ uF  w  p"p#V"V#Pt                  bK  	  up#p"Vn;        VPx                  '       d   \{        V4       M\}        VVV!RVR)7       VP~                  '       d   R*V9  d   \        VV4       \$        VVE`  ! R,/ VB  V# R- F  p$VP                  V$R4       K  	  VP                  R/ 4      P                  4        \$        S(V `L  ! WW#3/ VB # u upi u upi u upi u up#p"i ).a-  Metaclass for creating Pydantic models.

Args:
    cls_name: The name of the class to be created.
    bases: The base classes of the class to be created.
    namespace: The attribute dictionary of the class to be created.
    __pydantic_generic_metadata__: Metadata for generic models.
    __pydantic_reset_parent_namespace__: Reset parent namespace.
    _create_model_module: The module of the class to be created, if created by `create_model`.
    **kwargs: Catch-all for any other keyword arguments.

Returns:
    The new class created by the metaclass.
__annotations__)Formatcall_annotate_function!get_annotate_from_class_namespace)rF   model_configNc               $    V ^8  d   QhRRRRRR/# r>   rW   r9   contextr	   rC   rD   rE   )rF   s   "rG   rH   ,ModelMetaclass.__new__.<locals>.__annotate__   s'     @ @i @# @UY @rJ   c               .   < \        W4       S! W4       R# )z`We need to both initialize private attributes and call the user-defined model_post_init
method.
N)init_private_attributes)rW   r   original_model_post_inits   ""rG   wrapped_model_post_init7ModelMetaclass.__new__.<locals>.wrapped_model_post_init   s    
 0>0?rJ   model_post_init__class_vars____private_attributes__type[BaseModel]zClasses should inherit from `BaseModel` before generic classes (e.g. `typing.Generic[T]`) for pydantic generics to work properly.rM   __pydantic_base_init__FT)replace_wrapped_methodsrr   
parameters__parameters__c              3  ,   <"   T F	  qS9   x  K  	  R # 5iNrE   ).0xr   s   & rG   	<genexpr>)ModelMetaclass.__new__.<locals>.<genexpr>   s     ?kYjTUZYjs   )RootModelRootTypec              3  8   <"   T F  qS9  g   K  Vx  K  	  R # 5ir   rE   )r   r   parent_parameterss   & rG   r   r      s     .c*QQbHbqq*s   
z, zS is a subclass of `RootModel`, but does not include the generic type identifier(s) zL in its parameters. You should parametrize RootModel directly, e.g., `class z(RootModel[z	]): ...`.ztyping.Generic[]zJAll parameters must be present on typing.Generic; you should inherit from .z- Note: `typing.Generic` must go last: `class (z): ...`)originargs__pydantic_parent_namespace__)parent_namespace)config_wrapperns_resolver)raise_errorscreate_model_module__hash__)      rE   )__pydantic_fields_set____pydantic_extra____pydantic_private__)Dsysversion_infoannotationlibr|   r}   r~   
FORWARDREFrO   _collect_bases_datar   	for_modelconfig_dictinspect_namespaceignored_typesget_model_post_initr   r   r   rU   __new__r*   __mro__r   indexrQ   rR   r   getattr__init____pydantic_custom_init__r   __pydantic_post_init____pydantic_setattr_handlers__r   build__pydantic_decorators__update_from_configrr   all
root_modelr   tuplejoinr[   r@   	TypeError__pydantic_complete__items__set_name__build_lenient_weakvaluedictr2   r   rP   dictunpack_lenient_weakvaluedictr-   set_model_fieldscomputed_fieldsinfo__pydantic_computed_fields__defer_buildr,   complete_model_classfrozenset_default_hash_func__pydantic_init_subclass__popclear))mcsrm   rn   rp   rr   rs   ru   rw   raw_annotationsr|   r}   r~   annotatebase_field_names
class_varsbase_private_attributesr   private_attributesr   cls
BaseModel_mror   missing_parametersr   parameters_strerror_messagecombined_parametersgeneric_type_label	bases_strnameobjr   r   r?   rA   instance_slotr   r   r   rY   s)   &&&&&&&,                             @@@rG   r   ModelMetaclass.__new__T   s   6 57*%2&/0A&BO po#DY#OOxO*@RcRc*d*,"+--0A2"FDGD[D[\aDbA*A*44U_N(6(B(BIn%!2N,H,H*" "%<+>y+P(+7 34@ 5@ 4KI/03JI/0*4&'2c5L2cPb2cI./(%'/#*d]c*deC13J++C#~#))G"4syy7L"L1B  ! 07s||E]_d/e+eC(++z/I/IIO` & 13C-*8*>*>s\`*aC'''::>J -4Q1$+C1PRT$U$Y$YZfhj$k!$S*:DAVVEV
:"3"3CC?kYj?kCCC?kYj?k<k<k>)..c*.c.c*.c)c&(,==BS[eBe *.HZ3[HZ1AJJHZ3[)\"||n,-. /WWZWcWcVddop~o  @IJ & /@BT.T+)-DW3XDWqCFDW3X)Y/>~>Na-P*88J7K1N & #%/
 )-		u2Mu!1::u2MQcPd2d(eI)"OPSP\P\~]^_h^iiq rM $M22 dB *51 ).C% 0557	c  d+ 8 34OPfPh4i16=cCbdh6i*D11#?@P#Q $6FGKS[Y
 '*&A&A&Q&Q&W&W&Y0&Yda166	&Y0C, )))$ %"!&(< $$$9)D%c51
 #s6@@J "i! "i
 MM+R06687?3%MfMMg 4\ 4Y 3N>0s   V(V)V V%c                    V ^8  d   QhRRRR/# )r>   itemr@   rC   r	   rE   )rF   s   "rG   rH   ry     s     	' 	'C 	'C 	'rJ   c                z    V P                   P                  R4      pV'       d   W9   d	   W!,          # \        V4      h)zNThis is necessary to keep attribute access working for class attribute access.r   )__dict__rO   AttributeError)rW   r   r   s   && rG   __getattr__ModelMetaclass.__getattr__  s4    !%!2!23K!L!d&@)// &&rJ   c               $    V ^8  d   QhRRRRRR/# )r>   r   r	   rw   rC   zdict[str, object]rE   )rF   s   "rG   rH   ry   %  s"     % % %s %7H %rJ   c                	    \        4       # r   )r<   )r   r   rw   s   &*,rG   __prepare__ModelMetaclass.__prepare__$  s    "$$rJ   c                    V ^8  d   QhRRRR/# )r>   subclassztype[_T]rC   rE   )rF   s   "rG   rH   ry   ,  s     * * *h *rJ   c                	n   < \         P                  ! R V P                   R2^R7       \        SV `  V4      # )z>For performance reasons, virtual subclasses registered using 'zK.register()' are not supported in 'isinstance()' and 'issubclass()' checks.rM   )rQ   rR   r]   rU   register)rW   r   rY   s   &&rG   r   ModelMetaclass.register,  s?    LTM^M^L_ `M M	

 w))rJ   c                    V ^8  d   QhRRRR/# )r>   rn   ro   rC   z6tuple[set[str], set[str], dict[str, ModelPrivateAttr]]rE   )rF   s   "rG   rH   ry   8  s     ; ;#8 ;=s ;rJ   c                	P   \        4       p\        4       p\        4       p/ pV  F}  p\        WQ4      '       g   K  WQJg   K  VP                  \	        VR / 4      P                  4       4       VP                  VP                  4       VP                  VP                  4       K  	  W#V3# )__pydantic_fields__)r*   set
issubclassupdater   keysr   r   )rn   r9   field_namesr   r   bases   &     rG   r   "ModelMetaclass._collect_bases_data7  s    ,.	 #"u
:<D$**t/D""741F#K#P#P#RS!!$"5"56"))$*E*EF  (:::rJ   XThe `__fields__` attribute is deprecated, use the `model_fields` class property instead.)categoryc                   V ^8  d   QhRR/# )r>   rC   dict[str, FieldInfo]rE   )rF   s   "rG   rH   ry   J  s     8 80 8rJ   c                	V    \         P                  ! R \        ^R7       \        V R/ 4      # )r  rM   r   )rQ   rR   r   r   rW   s   &rG   
__fields__ModelMetaclass.__fields__F  s+    
 	f%	

 t2B77rJ   c                   V ^8  d   QhRR/# )r>   rC   rt   rE   )rF   s   "rG   rH   ry   S  s     c cd crJ   c                Z   RV P                   9  d   R# \        RV P                  4      p\        RV P                  4      pVe   VP                  pMRp\
        ;QJ d*    R VP                  4        4       F  '       d   K   RM	  RM! R VP                  4        4       4      ;'       d    T# )zWhether the fields were successfully collected (i.e. type hints were successfully resolved).

This is a private attribute, not meant to be used outside Pydantic.
r   Fr  zPydanticExtraInfo | NoneTc              3  8   "   T F  qP                   x  K  	  R # 5ir   )	_complete)r   
field_infos   & rG   r   >ModelMetaclass.__pydantic_fields_complete__.<locals>.<genexpr>c  s     O:NJ'':Ns   )r   r   r   __pydantic_extra_info__completer   values)rW   field_infospydantic_extra_infoextra_completes   &   rG   __pydantic_fields_complete__+ModelMetaclass.__pydantic_fields_complete__R  s     !5143K3KL"#=t?[?[\*099N!NsO+:L:L:NOsssO+:L:L:NOObbTbbrJ   c                   V ^8  d   QhRR/# )r>   rC   z	list[str]rE   )rF   s   "rG   rH   ry   e  s       rJ   c                	f   < \        \        SV `	  4       4      pR V9   d   VP                  R 4       V# )r
  )listrU   __dir__remove)rW   
attributesrY   s   & rG   r  ModelMetaclass.__dir__e  s0    %'/+,
:%l+rJ   rE   )NTN)r[   r\   r]   r^   r   r   r   classmethodr   r   rx   __instancecheck____subclasscheck__staticmethodr   propertyr   r
  r  r  r`   ra   rb   s   @rG   rk   rk   R   s    DN DNL 	' % %* * ....; ; bmq8 8 c c$ rJ   rk   c               $    V ^8  d   QhRRRRRR/# r   rE   )rF   s   "rG   rH   rH   l  s&     G G) Gc G GrJ   c               8   \        V RR4      f   / pV P                  P                  4        F[  w  r4VP                  '       d#   VP	                  R/ V P
                  CVCR7      pMVP	                  RR7      pV\        Jg   KW  WRV&   K]  	  \        V RV4       R# R# )zThis function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that's what pydantic-core passes when calling it.

Args:
    self: The BaseModel instance.
    context: The context.
r   NT)call_default_factoryvalidated_data)r(  )r   r   r   $default_factory_takes_validated_dataget_defaultr   r   object_setattr)rW   r   pydantic_privater   private_attrdefaults   ""    rG   r   r   l  s     t+T2:"&"="="C"C"ED@@@&22)->c>cRb>c 3  '222M//)0& #F 	t35EF ;rJ   c               $    V ^8  d   QhRRRRRR/# )r>   rp   rq   rn   ro   rC   zCallable[..., Any] | NonerE   )rF   s   "rG   rH   rH     s#     	 	> 	:O 	Tm 	rJ   c                t    RV 9   d
   V R,          # \        4       p\        VR4      pW2P                  Jd   V# R# )zaGet the `model_post_init` method from the namespace or the class bases, or `None` if not defined.r   N)r*   r    r   )rp   rn   r9   r   s   &&  rG   r   r     sB    I%*++(*I.u6GHO777 8rJ   c               0    V ^8  d   QhRRRRRRRRRRR	R
/# )r>   rp   rq   r   r   ro   base_class_varszset[str]base_class_fieldsrC   zdict[str, ModelPrivateAttr]rE   )rF   s   "rG   rH   rH     sL     F FF#F )F 	F
  F !FrJ   c           
       a ^RI HoHp \        4       pV\	        4       ,           p/ pRV9   g   RV 9   d   \        R4      h\        4       p	\        V P                  4       4       EF=  w  rV
R8X  g   V
R8X  d   K  \        V\        4      '       dM   VP                  V R,          8X  d5   RV 9   d.   VP                  P                  V R,           R24      '       d   Kx  \        W4      '       g   VP                  P                  R	8X  d   V	P                  V
4       K  \        VS4      '       d]   V
P                  R
4      '       d   \!        RV
: R24      h\#        V
4      '       d   \!        RRV
,           : RV
: R24      hWV
&   W
 EK%  \        W4      '       dA   \#        V
4      '       g0   V
P%                  R4      ;'       g    Rp\!        RV: RV
: R24      hV
P                  R
4      '       d   EK  \'        V
4      '       d;   W9  g   \)        W,          4      '       g   \+        SV! VR7      4      W&   W
 EK  EK  W9   d   EK  W9  g   EK  W9   d   \-        RV
: R2RR7      h\        W4      '       d   \-        RV
: R2RR7      h\-        RV
 RV: RV
 R2RR7      h	  VP                  4        EF  w  r\'        V4      '       g   K  W9  g   K!  W9  g   K)  \)        V4      '       d   K<  W9  g   KD  \/        VRR4      R	8w  g   KX  \        V\0        4      '       dJ   \2        P4                  ! ^4      pVe0    \7        \9        VRRR7      VP:                  VP<                  R 7      p\>        P@                  ! \C        V4      4      '       d/   \E        V4      vpp\G        V3R! lV 4       R4      pVe   VW&   EK
  V! 4       W&   EK  	  V#   \         \
        3 d     Lvi ; i)"a  Iterate over the namespace and:
* gather private attributes
* check for items which look like fields but are not (e.g. have no annotation) and warn.

Args:
    namespace: The attribute dictionary of the class to be created.
    raw_annotations: The (non-evaluated) annotations of the model.
    ignored_types: A tuple of ignore types.
    base_class_vars: A set of base class class variables.
    base_class_fields: A set of base class fields.

Returns:
    A dict containing private attributes info.

Raises:
    TypeError: If there is a `__root__` field in model.
    NameError: If private attribute name is invalid.
    PydanticUserError:
        - If a field does not have a type annotation.
        - If a field on base class was overridden by a non-annotated attribute.
)r7   r8   __root__zUTo define root models, use `pydantic.RootModel` rather than a field called '__root__'r   r   r\   r]   r   	functools__zXPrivate attributes must not use dunder names; use a single underscore prefix instead of zJPrivate attributes must not use valid field names; use sunder names, e.g. _z instead of my_fieldz>Fields must not use names with leading underscores; e.g., use )r/  zField z defined on a base class was overridden by a non-annotated attribute. All field definitions, including overrides, require a type annotation.zmodel-field-overridden)codez requires a type annotationzmodel-field-missing-annotationz)A non-annotated attribute was detected: `z = z3`. All model fields require a type annotation; if `z` is not meant to be a field, you may be able to resolve this error by annotating it as a `ClassVar` or updating `model_config['ignored_types']`.NFT)is_argumentis_class)globalnslocalnsc              3  P   <"   T F  p\        VS4      '       g   K  Vx  K  	  R # 5ir   )rP   )r   rA   r7   s   & rG   r   $inspect_namespace.<locals>.<genexpr>  s     $\1JqJZ<[QQs   &
&)$fieldsr7   r8   r+   default_ignored_typesr   r   r  r   rP   rx   r\   r]   
startswithrY   add	NameErrorr#   lstripr$   r1   r   r   r   r@   r   	_getframer0   r/   	f_globalsf_localsr   is_annotatedr   r   next)rp   r   r   r3  r4  r8   r6   all_ignored_typesr   ignored_namesvar_namevaluesuggested_nameann_nameann_typeframer9  metadatar.  r7   s   &&&&&              @rG   r   r     s   8 7(*I%(=(??68_$
i(?opp!eM	 12~%5I)Iud##  Il$;;)+""-->1J0K1.MNN 11U__5O5OS^5^h'/00""4((BBJQP  %X..//2X~.@XLXY[  ,1x(#))2Eh2O2O%__S1??ZN,/|H<qJ 
   &&&x00.6L_Mf6g6g/34DkZ_F`/a",' 7h (,,'XL )] ^1 
 E--'XL(CDKk  (?zUI V,,4: 6jk :	 m 3z .335%h//2- +8441,5D(C(( a($#5-hETXY%*__$)NN$ **:h+?@@'1H#$\$\^bc+3?&0+6=(? 6B  &y1 s   >.OO#"O#c               $    V ^8  d   QhRRRRRR/# )r>   r   r   rn   ro   rC   rD   rE   )rF   s   "rG   rH   rH     s#     
% 
% 
%7L 
%QU 
%rJ   c                    \        VR 4      p\        V 4      pVR\        P                  09   g   \	        VRR4      VP
                  8X  d	   W0n        R# R# )r   N__code__)r    make_hash_funcrB   r   r   rX  )r   rn   base_hash_funcnew_hash_funcs   &&  rG   r   r     sN    -eZ@N"3'M$00GNJX\4]anawaw4w % 5xrJ   c                    V ^8  d   QhRRRR/# )r>   r   r   rC   r	   rE   )rF   s   "rG   rH   rH   &  s       C rJ   c                   a V P                   '       d-   \        P                  ! V P                   P                  4       !  MR  oR V3R llpV# )c                    ^ # )    rE   )r9  s   &rG   <lambda> make_hash_func.<locals>.<lambda>'  s    lmrJ   c                    V ^8  d   QhRRRR/# )r>   rW   r	   rC   intrE   )rF   s   "rG   rH   $make_hash_func.<locals>.__annotate__)  s     A A A ArJ   c                   <  \        S! V P                  4      4      #   \         d(    \        S! \        T P                  4      4      4      u # i ; ir   )hashr   KeyErrorr4   )rW   getters   &rG   	hash_func!make_hash_func.<locals>.hash_func)  sJ    	At}}-.. 	A
 />?@@	As    /AA)r   operator
itemgetterr   )r   ri  rh  s   & @rG   rY  rY  &  sD    EHE\E\E\X  #"9"9">">"@AbmFA A rJ   c               (    V ^8  d   QhRRRRRRRR/# )	r>   r   r   r   r   r   r-   rC   rD   rE   )rF   s   "rG   rH   rH   6  s0     + +	+!+ + 
	+rJ   c                8   \        V 4      p\        WW#R7      w  rEpW@n        WPn        V P                  P                  V4       V FQ  pV P                  P                  VR4      pVf   K%  VP                  \        Jg   K;  \        WVP                  4       KS  	  R# )zCollect and set `cls.__pydantic_fields__` and `cls.__class_vars__`.

Args:
    cls: BaseModel or dataclass.
    config_wrapper: The config wrapper instance.
    ns_resolver: Namespace resolver to use when getting model annotations.
)typevars_mapN)r)   r"   r   r  r   r   r   r   r/  r   setattr)	r   r   r   ro  rB  r  r   r?   rP  s	   &&&      rG   r   r   6  s     *#.L.B[/+F %"5j) **..q$76G!GCEMM* rJ   r   call_on_complete_hookr   is_force_rebuildc               8    V ^8  d   QhRRRRRRRRR	RR
RRRRR/# )r>   r   r   r   r   r   r-   r   rt   rq  r   rv   rr  rC   rE   )rF   s   "rG   rH   rH   X  sb     y y	y!y y
 y  y $y y 
yrJ   c               (   \        V 4      pV P                  '       gN    \        V VVVR7      w  V n        V n        V'       g   V P                  '       g   R# V P                  '       g   Q h\        VVV4      p
 V
P                  V 4      pTP                  T P                  R7      p T
P                  T4      pT P                   P"                  P%                  4        UUu/ uF  w  rYP&                  bK  	  uppT n        \+        T 4       Yn        \/        TT T;'       g    T P0                  T P2                  T'       d   RMRTTP4                  T'       * R7      T n        \9        YT'       * R7      T n        \=        R	\?        \@        T PB                  T P                  TPD                  TPF                  R
7      4      T n$        RT n%        T'       d   T PM                  4        R#   \
         dF   p\        P                  ! T4      p	\        T RT	P                   R24       T'       d   Yh Rp?ELRp?ii ; i  \         d/   pT'       d   h \        T RTP                   R24        Rp?R# Rp?ii ; i  \         d    \        T 4        R# i ; iu uppi )a  Finish building a model class.

This logic must be called after class has been created since validation functions must be bound
and `get_type_hints` requires a class object.

Args:
    cls: BaseModel or dataclass.
    config_wrapper: The config wrapper instance.
    ns_resolver: The namespace resolver instance to use during schema building.
    raise_errors: Whether to raise errors.
    call_on_complete_hook: Whether to call the `__pydantic_on_complete__` hook.
    create_model_module: The module of the class to be created, if created by `create_model`.
    is_force_rebuild: Whether the model is being force-rebuilt (if True, pre-built serializers and
                      validators are not used, to avoid stale references).

Returns:
    `True` if the model is successfully completed, else `False`.

Raises:
    PydanticUndefinedAnnotation: If PydanticUndefinedAnnotation occurs in __get_pydantic_core_schema__
        and `raise_errors=True`.
)r   r   ro  rL   NF)titlecreate_modelr9   )_use_prebuilt__signature__)rc   rB  validate_by_nameextraT)'r)   r  r%   r   r  rF  r   from_name_errorr,   r   r&   generate_schemacore_configr[   clean_schemar'   r   r   r   r   r   set_deprecated_descriptors__pydantic_core_schema__r   r\   r]   plugin_settings__pydantic_validator__r   __pydantic_serializer__r3   r   r.   r   ry  rz  rx  r   __pydantic_on_complete__)r   r   r   r   rq  r   rr  ro  eexc
gen_schemaschemar}  r?   rA   s   &&&$$$$        rG   r   r   X  sO   @ *#.L+++	!CW-')	D@C#S%@ C$D$D$D/////J++C0 !,,3<<,@K((0 ?B>Y>Y>i>i>o>o>q'r>qda66	>q'rC$s##) !8--s~~-;&&**	"C #36ZjVj"kC
 +'**+<< &&	
	C !%C$$&S  	!-==a@CC1SXXJa1  	!( ' q]+	   (ssG   G" 9H5 'I1 J"H2-:H--H25I. #I))I.1J
Jc                    V ^8  d   QhRRRR/# )r>   r   r   rC   rD   rE   )rF   s   "rG   rH   rH     s     & &O & &rJ   c                   V P                   P                  4        F?  w  rVP                  ;pf   K  \        V4      pVP	                  W4       \        WV4       KA  	  V P                  P                  4        Fp  w  rVP                  ;pf   K  \        \        VP                  4      R4      '       d   K>  \        W5P                  4      pVP	                  W4       \        WV4       Kr  	  R# )z8Set data descriptors on the class for deprecated fields.N__deprecated__)
r   r   deprecation_message_DeprecatedFieldDescriptorr   rp  r   hasattrr!   wrapped_property)r   fieldr  msgdesccomputed_field_infos   &     rG   r  r    s     44::<111C>-c2Dc)C%	 = '*&F&F&L&L&N"';;;SH34G4X4XY[kll-c3W3WXDc)C% 'OrJ   c                  ^    ] tR tRt$ RtR]R&   RR R lltR R	 ltRR
 R lltR R lt	Rt
R# )r  i  aC  Read-only data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.

Attributes:
    msg: The deprecation message to be emitted.
    wrapped_property: The property instance if the deprecated field is a computed field, or `None`.
    field_name: The name of the field being deprecated.
r@   
field_nameNc               $    V ^8  d   QhRRRRRR/# )r>   r  r@   r  zproperty | NonerC   rD   rE   )rF   s   "rG   rH   '_DeprecatedFieldDescriptor.__annotate__  s!     1 1C 1? 1d 1rJ   c                	    Wn         W n        R # r   )r  r  )rW   r  r  s   &&&rG   r   #_DeprecatedFieldDescriptor.__init__  s     0rJ   c               $    V ^8  d   QhRRRRRR/# )r>   r   r   r   r@   rC   rD   rE   )rF   s   "rG   rH   r    s!       s t rJ   c                	    W n         R # r   )r  )rW   r   r   s   &&&rG   r   '_DeprecatedFieldDescriptor.__set_name__  s    rJ   c               $    V ^8  d   QhRRRRRR/# )r>   r   zBaseModel | Noneobj_typeztype[BaseModel] | NonerC   r	   rE   )rF   s   "rG   rH   r    s$     
- 
-+ 
-7M 
-Y\ 
-rJ   c                	b   Vf@   V P                   e   V P                   P                  R V4      # \        V P                  4      h\        P
                  ! V P                  \        ^R7       V P                   e   V P                   P                  W4      # VP                  V P                  ,          # )NrM   )	r  __get__r   r  rQ   rR   r  DeprecationWarningr   )rW   r   r  s   &&&rG   r  "_DeprecatedFieldDescriptor.__get__  s    ;$$0,,44T8DD 11dhh 2qA  ,((00??||DOO,,rJ   c               $    V ^8  d   QhRRRRRR/# )r>   r   r	   rP  rC   r   rE   )rF   s   "rG   rH   r    s!     . .3 .s .x .rJ   c                	,    \        V P                  4      hr   )r   r  )rW   r   rP  s   &&&rG   __set__"_DeprecatedFieldDescriptor.__set__  s    T__--rJ   )r  r  r  r   )r[   r\   r]   r^   r_   r{   r   r   r  r  r`   rE   rJ   rG   r  r    s'     O1
-. .rJ   r  c                  >    ] tR tRtRtR R ltR R ltR R ltR	tR
# )_PydanticWeakRefi  a  Wrapper for `weakref.ref` that enables `pickle` serialization.

Cloudpickle fails to serialize weakref.ref objects due to an arcane error related to
to abstract base classes (`abc.ABC`). This class works around the issue by wrapping
`weakref.ref` instead of subclassing it.

See https://github.com/pydantic/pydantic/issues/6763 for context.

Semantics:
    - If not pickled, behaves the same as a `weakref.ref`.
    - If pickled along with the referenced object, the same `weakref.ref` behavior
      will be maintained between them after unpickling.
    - If pickled without the referenced object, after unpickling the underlying
      reference will be cleared (`__call__` will always return `None`).
c                   V ^8  d   QhRR/# )r>   r   r	   rE   )rF   s   "rG   rH   _PydanticWeakRef.__annotate__  s     ( (C (rJ   c                	V    Vf
   R V n         R # \        P                  ! V4      V n         R # r   )_wrweakrefref)rW   r   s   &&rG   r   _PydanticWeakRef.__init__  s     ; DH{{3'DHrJ   c                   V ^8  d   QhRR/# )r>   rC   r	   rE   )rF   s   "rG   rH   r  %  s      # rJ   c                	B    V P                   f   R # V P                  4       # r   r  r	  s   &rG   __call___PydanticWeakRef.__call__%  s    8888:rJ   c                   V ^8  d   QhRR/# )r>   rC   z4tuple[Callable, tuple[weakref.ReferenceType | None]]rE   )rF   s   "rG   rH   r  +  s     + +P +rJ   c                	    \         V ! 4       33# r   )r  r	  s   &rG   
__reduce___PydanticWeakRef.__reduce__+  s    $&**rJ   r  N)	r[   r\   r]   r^   r_   r   r  r  r`   rE   rJ   rG   r  r    s     (+ +rJ   r  c                    V ^8  d   QhRRRR/# r>   dzdict[str, Any] | NonerC   rE   )rF   s   "rG   rH   rH   /  s      #8 =R rJ   c                    V f   R# / pV P                  4        F  w  r# \        V4      pWAV&   K  	  V#   \         d    Tp Li ; i)aH  Takes an input dictionary, and produces a new value that (invertibly) replaces the values with weakrefs.

We can't just use a WeakValueDictionary because many types (including int, str, etc.) can't be stored as values
in a WeakValueDictionary.

The `unpack_lenient_weakvaluedict` function can be used to reverse this operation.
N)r   r  r   )r  resultr?   rA   proxys   &    rG   r   r   /  sX     	yF		$Q'E q	  M  	E	s   4AAc                    V ^8  d   QhRRRR/# r  rE   )rF   s   "rG   rH   rH   C  s      $9 >S rJ   c                    V f   R# / pV P                  4        F2  w  r#\        V\        4      '       d   V! 4       pVe   W1V&   K,  K.  W1V&   K4  	  V# )zAInverts the transform performed by `build_lenient_weakvaluedict`.N)r   rP   r  )r  r  r?   rA   s   &   rG   r   r   C  sW    yF	a)**A}q	  1I  MrJ   c                   V ^8  d   QhRR/# )r>   rC   ro   rE   )rF   s   "rG   rH   rH   T  s        4  rJ   c                     ^RI Hp  \        \        \        \
        \        V \        .p\        P                  R8  d    VP                  \        P                  4       \        V4      # )r>   )ComputedFieldInfo)r      )rB  r  r   r%  r!  r$  r   r   r   r   appendtypingr   )r  r   s     rG   rC  rC  S  sR    * 	M 7"V112rJ   )mr_   
__future__r   _annotationsrk  r   r  rQ   r  abcr   r7  r   r   r   typesr   r   r	   r
   r   r   r   r   r   pydantic_corer   r   typing_extensionsr   r   r   r   r   typing_inspectionr   errorsr   r   plugin._schema_validatorr   r   r   _configr   _decoratorsr   r   r    r!   _fieldsr"   r#   r$   r%   _generate_schemar&   r'   	_genericsr(   r)   _import_utilsr*   r+   _mock_val_serr,   _namespace_utilsr-   
_signaturer.   _typing_extrar/   r0   r1   r2   _utilsr3   r4   rB  r5   PydanticModelFieldr6   r7   r8   PydanticModelPrivateAttrmainr9   r:   rB   __setattr__r,  r   r<   rf   rg   rk   r   r   r   r   rY  r   r   r  r  r  r   r   rC  rE   rJ   rG   <module>r     s   ( 2  
     + +  Z Z Z = b b , C > O " s s o o @ F M * ( 3  944@ *%x##)$ )   T] T=OQikv<wxVW V yVrG0	FR
% +Dy
 y #'y '+y #yx&&". ".J +  +F(     rJ   