Ë
    +DCf,  ã                  óŠ  — d Z ddlmZ ddlZddlmZmZ ddlmZ ddl	m
Z
 ddlmZmZ dd	lmZmZ ej"                  r8dd
lmZ ddlmZmZ ddlmZ  edef¬«       G d„ dej2                  «      «       Znej2                  ZdZ ej8                  dd¬«      Z ej8                  d«      Z G d„ deej>                  e   e¬«      Z y)z%RootModel class and type definitions.é    )ÚannotationsN)ÚcopyÚdeepcopy)ÚPydanticUndefinedé   )ÚPydanticUserError)Ú_model_constructionÚ_repr)Ú	BaseModelÚ_object_setattr)ÚAny)ÚLiteralÚdataclass_transform)ÚFieldF)Úkw_only_defaultÚfield_specifiersc                  ó   — e Zd Zy)Ú_RootModelMetaclassN)Ú__name__Ú
__module__Ú__qualname__© ó    úS/var/www/highfloat_scraper/venv/lib/python3.12/site-packages/pydantic/root_model.pyr   r      s   „ àr   r   )Ú	RootModelÚModelr   )ÚboundÚRootModelRootTypec                  ó
  ‡ — e Zd ZU dZdZdZdZded<   ˆ fd„Ze	fdd„Z
de
_        eddˆ fd„«       Zdd	„Zdd
„Zdd„Zddd„Zej&                  r(ddddddddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zdˆ fd„Zdd„Zˆ xZS )r   a  Usage docs: https://docs.pydantic.dev/2.7/concepts/models/#rootmodel-and-custom-root-types

    A Pydantic `BaseModel` for the root object of the model.

    Attributes:
        root: The root object of the model.
        __pydantic_root_model__: Whether the model is a RootModel.
        __pydantic_private__: Private fields in the model.
        __pydantic_extra__: Extra fields in the model.

    TNr   Úrootc                óx   •— | j                   j                  d«      }|t        dd¬«      ‚t        ‰|   di |¤Ž y )NÚextraz<`RootModel` does not support setting `model_config['extra']`zroot-model-extra)Úcoder   )Úmodel_configÚgetr   ÚsuperÚ__init_subclass__)ÚclsÚkwargsr"   Ú	__class__s      €r   r'   zRootModel.__init_subclass__7   sD   ø€ Ø× Ñ ×$Ñ$ WÓ-ˆØÐÜ#ØNÐUgôð ô 	‰Ñ!Ñ+ FÓ+r   c               óp   — d}|r|t         urt        d«      ‚|}| j                  j                  || ¬«       y )NTz_"RootModel.__init__" accepts either a single positional argument or arbitrary keyword arguments)Úself_instance)r   Ú
ValueErrorÚ__pydantic_validator__Úvalidate_python)Úselfr    ÚdataÚ__tracebackhide__s       r   Ú__init__zRootModel.__init__?   sD   € Ø ÐÙØÔ,Ñ,Ü Øuóð ð ˆDØ×#Ñ#×3Ñ3°DÈÐ3ÕMr   c                ó&   •— t         ‰|   ||¬«      S )aS  Create a new model using the provided root object and update fields set.

        Args:
            root: The root object of the model.
            _fields_set: The set of fields to be updated.

        Returns:
            The new model.

        Raises:
            NotImplemented: If the model is not a subclass of `RootModel`.
        )r    Ú_fields_set)r&   Úmodel_construct)r(   r    r5   r*   s      €r   r6   zRootModel.model_constructK   s   ø€ ô ‰wÑ&¨D¸kÐ&ÓJÐJr   c                ó4   — | j                   | j                  dœS )N©Ú__dict__Ú__pydantic_fields_set__r8   ©r0   s    r   Ú__getstate__zRootModel.__getstate__[   s   € àŸ™Ø'+×'CÑ'Cñ
ð 	
r   c                óD   — t        | d|d   «       t        | d|d   «       y )Nr:   r9   )r   )r0   Ústates     r   Ú__setstate__zRootModel.__setstate__a   s&   € Ü˜Ð7¸Ð?XÑ9YÔZÜ˜˜j¨%°
Ñ*;Õ<r   c                ó¾   — t        | «      }|j                  |«      }t        |dt        | j                  «      «       t        |dt        | j
                  «      «       |S )z$Returns a shallow copy of the model.r9   r:   )ÚtypeÚ__new__r   r   r9   r:   )r0   r(   Úms      r   Ú__copy__zRootModel.__copy__e   sK   € ä4‹jˆØK‰K˜ÓˆÜ˜˜:¤t¨D¯M©MÓ':Ô;Ü˜Ð4´d¸4×;WÑ;WÓ6XÔYØˆr   c                óÂ   — t        | «      }|j                  |«      }t        |dt        | j                  |¬«      «       t        |dt        | j                  «      «       |S )z!Returns a deep copy of the model.r9   )Úmemor:   )rA   rB   r   r   r9   r   r:   )r0   rF   r(   rC   s       r   Ú__deepcopy__zRootModel.__deepcopy__m   sO   € ä4‹jˆØK‰K˜ÓˆÜ˜˜:¤x°·±ÀDÔ'IÔJô 	˜Ð4´d¸4×;WÑ;WÓ6XÔYØˆr   ÚpythonF)ÚmodeÚincludeÚexcludeÚcontextÚby_aliasÚexclude_unsetÚexclude_defaultsÚexclude_noneÚ
round_tripÚwarningsÚserialize_as_anyc                ó   — y)a  This method is included just to get a more accurate return type for type checkers.
            It is included in this `if TYPE_CHECKING:` block since no override is actually necessary.

            See the documentation of `BaseModel.model_dump` for more details about the arguments.

            Generally, this method will have a return type of `RootModelRootType`, assuming that `RootModelRootType` is
            not a `BaseModel` subclass. If `RootModelRootType` is a `BaseModel` subclass, then the return
            type will likely be `dict[str, Any]`, as `model_dump` calls are recursive. The return type could
            even be something different, in the case of a custom serializer.
            Thus, `Any` is used here to catch all of these cases.
            Nr   )r0   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   s               r   Ú
model_dumpzRootModel.model_dumpy   s   € ð4 r   c                ó¸   •— t        |t        «      st        S | j                  d   j                  |j                  d   j                  k(  xr t
        ‰|   |«      S ©Nr    )Ú
isinstancer   ÚNotImplementedÚmodel_fieldsÚ
annotationr&   Ú__eq__)r0   Úotherr*   s     €r   r\   zRootModel.__eq__•   sR   ø€ Ü˜%¤Ô+Ü!Ð!Ø× Ñ  Ñ(×3Ñ3°u×7IÑ7IÈ&Ñ7Q×7\Ñ7\Ñ\ÒvÔafÑahÑaoÐpuÓavÐvr   c              #  ó,   K  — d| j                   f–— y ­wrW   )r    r;   s    r   Ú__repr_args__zRootModel.__repr_args__š   s   è ø€ Ød—i‘iÐÓùs   ‚)r    r   ÚreturnÚNone)N)r(   ztype[Model]r    r   r5   zset[str] | Noner`   r   )r`   údict[Any, Any])r>   rb   r`   ra   )r0   r   r`   r   )r0   r   rF   zdict[int, Any] | Noner`   r   )rI   zLiteral['json', 'python'] | strrJ   r   rK   r   rL   zdict[str, Any] | NonerM   ÚboolrN   rc   rO   rc   rP   rc   rQ   rc   rR   z'bool | Literal['none', 'warn', 'error']rS   rc   r`   r   )r]   r   r`   rc   )r`   z_repr.ReprArgs)r   r   r   Ú__doc__Ú__pydantic_root_model__Ú__pydantic_private__Ú__pydantic_extra__Ú__annotations__r'   r   r3   Ú__pydantic_base_init__Úclassmethodr6   r<   r?   rD   rG   ÚtypingÚTYPE_CHECKINGrU   r\   r_   Ú__classcell__)r*   s   @r   r   r   $   s  ø… ñ
ð #ÐØÐØÐà
Óô,ð 5Fô Nð '+€HÔ#àõKó ðKó
ó=óôð ×Òð
 5=ØØØ-1Ø"Ø"'Ø%*Ø!&Ø$Ø@DØ%*ñ	ð 2ð	ð ð		ð
 ð	ð +ð	ð ð	ð  ð	ð #ð	ð ð	ð ð	ð >ð	ð #ð	ð ó	õ8w÷
 r   r   )Ú	metaclass)!rd   Ú
__future__r   Ú_annotationsrk   r   r   Úpydantic_corer   Ú r   Ú	_internalr	   r
   Úmainr   r   rl   r   Útyping_extensionsr   r   Úfieldsr   ÚPydanticModelFieldÚModelMetaclassr   Ú__all__ÚTypeVarr   r   ÚGenericr   r   r   r   ú<module>r|      s±   ðÙ +å 2ã ß å +å ß 1ß ,à	×ÒÝç>å3ñ
 ¨ÐBTÐAVÔWôÐ1×@Ñ@ó ó Xñð .×<Ñ<Ðà
€àˆ‰w kÔ2€Ø"F—N‘NÐ#6Ó7Ð ôw 	˜6Ÿ>™>Ð*;Ñ<ÐH[ö w r   