+
    NV-j„3  ã                  ó  a € 0 t $ R t^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHtHtHtHtHt ^ RIHtHt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' ^RI(H)t) ^RI*H+t+H,t, ^RI-H.t. ^RI/H0t0 ^RI1H2t2 ^RI3H4t4 ^RI5H6t6 ]'       d   ^ RI7H8t9 ^RI:H;t;  ! R R]9]4      t<R*R R llt=RRRRRR/R  R! llt>R" R# lt?R$ R% lt@]A]B]P†                  ],          3,          tDR&]ER'&   ]R( R) l4       tFR# )+z0Private logic for creating pydantic dataclasses.)ÚannotationsN)Ú	Generator)Úcontextmanager)Úpartial)ÚTYPE_CHECKINGÚAnyÚClassVarÚProtocolÚcast)Ú
ArgsKwargsÚSchemaSerializerÚSchemaValidatorÚcore_schema)Ú	TypeAliasÚTypeIs)ÚPydanticUndefinedAnnotation)Ú	FieldInfo)ÚPluggableSchemaValidatorÚcreate_schema_validator)ÚPydanticDeprecatedSince20)Ú_configÚ_decorators)Úcollect_dataclass_fields)ÚGenerateSchemaÚInvalidSchemaError)Úget_standard_typevars_map)Úset_dataclass_mocks)Ú
NsResolver)Úgenerate_pydantic_signature)ÚLazyClassAttribute)ÚDataclassInstance)Ú
ConfigDictc                  óx   € ] tR t^(t$ RtR]R&   R]R&   R]R&   R]R	&   R
]R&   R]R&   R]R&   ]R R l4       tRtR# )ÚPydanticDataclassa!  A protocol containing attributes only available once a class has been decorated as a Pydantic dataclass.

Attributes:
    __pydantic_config__: Pydantic-specific configuration settings for the dataclass.
    __pydantic_complete__: Whether dataclass building is completed, or if there are still undefined fields.
    __pydantic_core_schema__: The pydantic-core schema used to build the SchemaValidator and SchemaSerializer.
    __pydantic_decorators__: Metadata containing the decorators defined on the dataclass.
    __pydantic_fields__: Metadata about the fields defined on the dataclass.
    __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the dataclass.
    __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the dataclass.
zClassVar[ConfigDict]Ú__pydantic_config__zClassVar[bool]Ú__pydantic_complete__z ClassVar[core_schema.CoreSchema]Ú__pydantic_core_schema__z$ClassVar[_decorators.DecoratorInfos]Ú__pydantic_decorators__zClassVar[dict[str, FieldInfo]]Ú__pydantic_fields__zClassVar[SchemaSerializer]Ú__pydantic_serializer__z4ClassVar[SchemaValidator | PluggableSchemaValidator]Ú__pydantic_validator__c               ó   € V ^8„  d   QhRR/# )é   ÚreturnÚbool© )Úformats   "Úp/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/pydantic/_internal/_dataclasses.pyÚ__annotate__ÚPydanticDataclass.__annotate__>   s   € ×:Ñ:°Ñ:ó    c                	ó   € R # ©Nr/   ©Úclss   &r1   Ú__pydantic_fields_complete__Ú.PydanticDataclass.__pydantic_fields_complete__=   s   € Ù7:r4   r/   N)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__annotations__Úclassmethodr9   Ú__static_attributes__r/   r4   r1   r#   r#   (   sA   ‡ ñ
	ð 2Ó1Ø-Ó-Ø"BÓBØ!EÓEØ;Ó;Ø!;Ó;Ø TÓTà	Ü:ó 
Ü:r4   r#   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r,   r8   ztype[StandardDataclass]Úconfig_wrapperú_config.ConfigWrapperÚns_resolverúNsResolver | Noner-   ÚNoner/   )r0   s   "r1   r2   r2   A   s0   € ÷ %ñ %Ø	 ð%à)ð%ð #ð%ð 
ñ	%r4   c                óB   € \        V 4      p\        WW1R7      pW@n        R# )zÆCollect and set `cls.__pydantic_fields__`.

Args:
    cls: The class.
    config_wrapper: The config wrapper instance.
    ns_resolver: Namespace resolver to use when getting dataclass annotations.
)rF   Útypevars_maprD   N)r   r   r(   )r8   rD   rF   rJ   Úfieldss   &&&  r1   Úset_dataclass_fieldsrL   A   s%   € ô -¨SÓ1€LÜ%Ø°<ô€Fð %Ör4   Úraise_errorsTrF   Ú_force_buildFc               ó0   € V ^8„  d   QhRRRRRRRRR	RR
R/# )r,   r8   ú	type[Any]rD   rE   rM   r.   rF   rG   rN   r-   r/   )r0   s   "r1   r2   r2   U   sL   € ÷ iñ iØ	ðià)ðið ð	ið
 #ðið ðið 
ñir4   c               óà  € V P                   pR R lpV P                   R2Vn        W`n         VP                  V n        \	        WVR7       V'       g    VP
                  '       d   \        V 4       R# \        V R4      '       d   \        P                  ! R\        4       \        V 4      p\        VVVR7      p\        R	\        \        VV P                   VP"                  VP$                  R
R7      4      V n         VP)                  V 4      p	TP/                  T P0                  R7      p TP3                  T	4      p	\7        RT 4      p Y�n        \;        Y�T P<                  T P                  RY±P>                  4      T n         \C        Y›4      T n"        R
T n#        R
#   \*         d/   p
T'       d   h \        T RT
P,                   R24        Rp
?
R# Rp
?
ii ; i  \4         d    \        T 4        R# i ; i)aJ  Finish building a pydantic dataclass.

This logic is called on a class which has already been wrapped in `dataclasses.dataclass()`.

This is somewhat analogous to `pydantic._internal._model_construction.complete_model_class`.

Args:
    cls: The class.
    config_wrapper: The config wrapper instance.
    raise_errors: Whether to raise errors, defaults to `True`.
    ns_resolver: The namespace resolver instance to use when collecting dataclass fields
        and during schema building.
    _force_build: Whether to force building the dataclass, no matter if
        [`defer_build`][pydantic.config.ConfigDict.defer_build] is set.

Returns:
    `True` if building a pydantic dataclass is successfully completed, `False` otherwise.

Raises:
    PydanticUndefinedAnnotation: If `raise_error` is `True` and there is an undefined annotations.
c               ó(   € V ^8„  d   QhRRRRRRRR/# )r,   Ú__dataclass_self__r#   Úargsr   Úkwargsr-   rH   r/   )r0   s   "r1   r2   Ú(complete_dataclass.<locals>.__annotate__v   s0   € ÷ \ñ \Ð%6ð \¸sð \Ècð \ÐVZñ \r4   c                óZ   € R pT pVP                   P                  \        W4      VR7       R# )T)Úself_instanceN)r*   Úvalidate_pythonr   )rS   rT   rU   Ú__tracebackhide__Úss   &*,  r1   Ú__init__Ú$complete_dataclass.<locals>.__init__v   s,   € Ø ÐØˆØ	× Ñ ×0Ñ0´¸DÓ1IÐYZÐ0Ö[r4   z	.__init__)rD   rF   FÚ__post_init_post_parse__zVSupport for `__post_init_post_parse__` has been dropped, the method will not be called)rF   rJ   Ú__signature__T)ÚinitrK   Úvalidate_by_nameÚextraÚis_dataclassÚ`N)Útitleztype[PydanticDataclass]Ú	dataclass)$r\   r=   Úconfig_dictr$   rL   Údefer_buildr   ÚhasattrÚwarningsÚwarnr   r   r   r   r   r   r(   ra   rb   r_   Úgenerate_schemar   ÚnameÚcore_configr;   Úclean_schemar   r
   r&   r   r<   Úplugin_settingsr*   r   r)   r%   )r8   rD   rM   rF   rN   Úoriginal_initr\   rJ   Ú
gen_schemaÚschemaÚern   s   &&$$$       r1   Úcomplete_dataclassru   U   sÆ  € ð: —L‘L€Mõ\ð
  #×/Ñ/Ð0°	Ð:€HÔà„LØ,×8Ñ8€CÔä˜ÈÕUç˜N×6×6Ð6Ü˜CÔ ÙäˆsÐ.×/Ò/Ü�ŠØdÜ%ô	
ô
 -¨SÓ1€LÜØØØ!ô€Jô +ØÜÜ'ð Ø×*Ñ*Ø+×<Ñ<Ø ×&Ñ&Øô		
ó€CÔðØ×+Ñ+¨CÓ0ˆð !×,Ñ,°3·<±<Ð,Ó@€KðØ×(Ñ(¨Ó0ˆô Ð(¨#Ó
.€Cà#)Ô Ü!8Ø�S—^‘^ S×%5Ñ%5°{ÀK×QoÑQoó"€CÔô #3°6Ó"G€CÔØ $€CÔÙøô1 'ô ßØÜ˜C 1 Q§V¡V H¨A Ô/Ýûð	ûô ô Ü˜CÔ Úðús*   Ã;F Ä)G ÆGÆ"#GÇGÇG-Ç,G-c               ó    € V ^8„  d   QhRRRR/# )r,   r8   rP   r-   zTypeIs[type[StandardDataclass]]r/   )r0   s   "r1   r2   r2   Á   s   € ÷ añ a˜Yð aÐ.Mñ ar4   c               óR   € RV P                   9   ;'       d    \        V R4      '       * # )aJ  Returns `True` if the class is a stdlib dataclass and *not* a Pydantic dataclass.

Unlike the stdlib `dataclasses.is_dataclass()` function, this does *not* include subclasses
of a dataclass that are themselves not dataclasses.

Args:
    cls: The class.

Returns:
    `True` if the class is a stdlib dataclass, `False` otherwise.
Ú__dataclass_fields__r*   )Ú__dict__ri   r7   s   "r1   Úis_stdlib_dataclassrz   Á   s&   € ð " S§\¡\Ñ1×`Ð`¼'À#ÐG_Ó:`Ô6`Ð`r4   c               ó    € V ^8„  d   QhRRRR/# )r,   Úpydantic_fieldr   r-   zdataclasses.Field[Any]r/   )r0   s   "r1   r2   r2   Ð   s   € ÷ +ñ + yð +Ð5Kñ +r4   c                ó<  € R V /p\         P                  R8¼  d   V P                  e   V P                  VR&   \         P                  R8¼  d   V P                  e   V P                  VR&   V P                  RJd   V P                  VR&   \
        P                  ! R/ VB # )ÚdefaultÚdocÚkw_onlyTÚrepr)é   é   ©r‚   é
   r/   )ÚsysÚversion_infoÚdescriptionr€   r�   ÚdataclassesÚfield)r|   Ú
field_argss   & r1   Úas_dataclass_fieldrŒ   Ð   s–   € Ø"+¨^Ð!<€Jô ×Ñ˜7Ô" ~×'AÑ'AÒ'MØ*×6Ñ6ˆ
�5Ñô ×Ñ˜7Ô" ~×'=Ñ'=Ò'IØ .× 6Ñ 6ˆ
�9Ñð ×Ñ $Ó&Ø+×0Ñ0ˆ
�6Ñä×ÒÑ*˜zÑ*Ð*r4   r   ÚDcFieldsc               ó    € V ^8„  d   QhRRRR/# )r,   r8   rP   r-   zGenerator[None]r/   )r0   s   "r1   r2   r2   æ   s   € ÷ U4ñ U4˜9ð U4¨ñ U4r4   c           	   #  óÜ  "  € . pV P                   R,           EFm  pVP                  P                  R/ 4      pVP                  4        UUu/ uFy  w  rE\	        VP
                  \        4      '       g   K'  VP
                  P                  f9   VP
                  P                  '       g   VP
                  P                  RJg   Kw  WEbK{  	  pppV'       g   K¿  VP                  W634       VP                  4        Fˆ  w  rE\        \        VP
                  4      p\        P                  ! V4      p\        P                  R8¼  d   VP                  '       d   RVn        VP                  RJd   VP                  Vn	        WƒV&   KŠ  	  EKp  	   Rx € V F"  w  ršV
P                  4        F	  w  rKW¹V&   K  	  K$  	  R# u uppi   T F"  w  ršT
P                  4        F	  w  rKY¹T&   K  	  K$  	  i ; i5i)a  Temporarily patch the stdlib dataclasses bases of `cls` if the Pydantic `Field()` function is used.

When creating a Pydantic dataclass, it is possible to inherit from stdlib dataclasses, where
the Pydantic `Field()` function is used. To create this Pydantic dataclass, we first apply
the stdlib `@dataclass` decorator on it. During the construction of the stdlib dataclass,
the `kw_only` and `repr` field arguments need to be understood by the stdlib *during* the
dataclass construction. To do so, we temporarily patch the fields dictionary of the affected
bases.

For instance, with the following example:

```python {test="skip" lint="skip"}
import dataclasses as stdlib_dc

import pydantic
import pydantic.dataclasses as pydantic_dc

@stdlib_dc.dataclass
class A:
    a: int = pydantic.Field(repr=False)

# Notice that the `repr` attribute of the dataclass field is `True`:
A.__dataclass_fields__['a']
#> dataclass.Field(default=FieldInfo(repr=False), repr=True, ...)

@pydantic_dc.dataclass
class B(A):
    b: int = pydantic.Field(repr=False)
```

When passing `B` to the stdlib `@dataclass` decorator, it will look for fields in the parent classes
and reuse them directly. When this context manager is active, `A` will be temporarily patched to be
equivalent to:

```python {test="skip" lint="skip"}
@stdlib_dc.dataclass
class A:
    a: int = stdlib_dc.field(default=Field(repr=False), repr=False)
```

!!! note
    This is only applied to the bases of `cls`, and not `cls` itself. The reason is that the Pydantic
    dataclass decorator "owns" `cls` (in the previous example, `B`). As such, we instead modify the fields
    directly (in the previous example, we simply do `setattr(B, 'b', as_dataclass_field(pydantic_field))`).

!!! note
    This approach is far from ideal, and can probably be the source of unwanted side effects/race conditions.
    The previous implemented approach was mutating the `__annotations__` dict of `cls`, which is no longer a
    safe operation in Python 3.14+, and resulted in unexpected behavior with field ordering anyway.
:é   NNrx   NTr„   )Ú__mro__ry   ÚgetÚitemsÚ
isinstancer~   r   rˆ   r€   r�   Úappendr
   Úcopyr†   r‡   )r8   Úoriginal_fields_listÚbaseÚ	dc_fieldsÚ
field_namerŠ   Ú&dc_fields_with_pydantic_field_defaultsr~   Únew_dc_fieldrK   Úoriginal_fieldsÚoriginal_fields   &           r1   Úpatch_base_fieldsrŸ   å   s¬  é € ðn =?Ðà—‘˜B—‘ˆØ7;·}±}×7HÑ7HÐI_ÐacÓ7dˆ	ð &/§_¡_Ô%6ô2
á%6Ñ!�
Ü˜%Ÿ-™-¬×3ô ð —‘×*Ñ*Ò6¸%¿-¹-×:O×:OÐ:OÐSX×S`ÑS`×SeÑSeÐmqÐSqô	 ˆJÒÙ%6ð 	/ñ 2
÷ 2Ñ1Ø ×'Ñ'¨Ð([Ô\Ø%K×%QÑ%QÖ%SÑ!�
Üœy¨%¯-©-Ó8�ô  $Ÿyšy¨Ó/�ô ×#Ñ# wÔ.°7·?·?°?Ø+/�LÔ(Ø—<‘< tÓ+Ø(/¯©�LÔ%Ø(4˜*Ó%ô &Tñ  ð04Ûã';Ñ#ˆFØ.=×.CÑ.CÖ.EÑ*�
Ø%3�zÓ"ó /Fó (<ùó32
øó2 (<Ñ#ˆFØ.=×.CÑ.CÖ.EÑ*�
Ø%3�zÓ"ó /Fò (<üsI   ‚A	G,Á$F9Á43F9Â(F9ÃF9Ã
G,ÃA=G,Å5G,ÆF? Æ0G,Æ?*G)Ç)G,r6   )GÚ__conditional_annotations__r?   Ú
__future__r   Ú_annotationsr–   r‰   r†   rj   Úcollections.abcr   Ú
contextlibr   Ú	functoolsr   Útypingr   r   r   r	   r
   Úpydantic_corer   r   r   r   Útyping_extensionsr   r   Úerrorsr   rK   r   Úplugin._schema_validatorr   r   r   Ú r   r   Ú_fieldsr   Ú_generate_schemar   r   Ú	_genericsr   Ú_mock_val_serr   Ú_namespace_utilsr   Ú
_signaturer   Ú_utilsr   Ú	_typeshedr    ÚStandardDataclassÚconfigr!   r#   rL   ru   rz   rŒ   ÚdictÚstrÚFieldr�   r@   rŸ   )r    s   @r1   Ú<module>r¹      sá   øðÜ 6å 2ã Û Û 
Û Ý %Ý %Ý ß ?Õ ?÷ó ÷ 0å 0Ý ß XÝ 0ß "Ý -ß @Ý 0Ý .Ý (Ý 3Ý &çÝ@å#ô;Ð-¨xô ;÷2%ð(ið ð	ið
 &*ðið ÷iõXaõ+ð$ ˜3 × 1Ñ 1°#Õ 6Ð6Õ7€ˆ)Ó 7ð ôU4ó òU4r4   