
    4g)             	         U d Z ddlmZ ddlZddlZddlZddlZddlZddl	m	Z	m
Z
 ddlmZ ddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZ ddlZddlZddlmZ ddlmZmZm Z  d	d
l!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z- d	dl.m/Z/ d	dl0m1Z1m2Z2 d	dl3m4Z4m5Z5 d	dl6m7Z7 d	dl8m9Z9m:Z: d	dl;m<Z<m=Z=m>Z>m?Z?m@Z@ d	dlAmBZB d	dlmCZC er5ddlDmEZE ddlFmGZG ddlmHZHmIZImJZJ d	dlKmLZL d	dlMmNZNmOZO d	dlPmQZR d	dlSmTZTmUZUmVZV neCZWdZXeeeYef   ddf   ZZde[d<   eee\   eeY   ee\ede]f   f   eeYede]f   f   f   Z^de[d<   e)j                  Z` G d de)j                         Zb ed!eb"      Zcedddedddd#	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d)d$       Zeeddedddd%	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d*d&       Zedddddddd'	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d+d(Ze e/ed      Zfy),zLogic for creating models.    )annotationsN)copydeepcopy)cached_property)TYPE_CHECKINGAnyCallableClassVarDict	GeneratorLiteralMappingSetTupleTypeVarUnioncastoverload)PydanticUndefined)Self	TypeAliasUnpack   )_config_decorators_fields_forward_ref	_generics_import_utils_mock_val_ser_model_construction_namespace_utils_repr_typing_extra_utils)getattr_migration)AliasChoices	AliasPath)GetCoreSchemaHandlerGetJsonSchemaHandler)
ConfigDict)PydanticUndefinedAnnotationPydanticUserError)DEFAULT_REF_TEMPLATEGenerateJsonSchemaJsonSchemaModeJsonSchemaValuemodel_json_schema)PluggableSchemaValidator)PydanticDeprecatedSince20)	Signature)Path)
CoreSchemaSchemaSerializerSchemaValidator)MappingNamespace)AbstractSetIntStrMappingIntStrAny)Protocol)ComputedFieldInfo	FieldInfoModelPrivateAttr)	BaseModelcreate_modelr   TupleGeneratorIncExc                  L    e Zd ZU dZ e       Zded<   	 ded<   	 ded<   	 ded	<   	 d
Zded<   	 ded<   	 ded<   	  ej                         Z
ded<   	 ded<   	 dZded<   	 ded<   	 d
Zded<   	 ded<   	 ded<   	 ded<   	 d ed!<   	  ej                  d
"      Zd#ed$<   	  ej                  d
"      Zd%ed&<   	  ej                  d
"      Zd#ed'<   	 es> ej(                  d(d)*      Z ej,                  d(d+d),      Z ej,                  d(d-d),      Zd.Zdd/Zd0e_        erd1ed2<   d3ed4<   nedd5       Zedd6       Zedd7       Zedd8       Z e!ddd9       Z"dd
d:dd;Z#d<dddd
d
d
d
d
d0d
d=	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd>Z$ddddd
d
d
d
d
d0d
d?	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd@Z%e!d0e&e'dAf	 	 	 	 	 	 	 	 	 ddB       Z(e!ddC       Z)ddDZ*e!d
d0dEddF	 	 	 	 	 	 	 	 	 ddG       Z+e!ddddH	 	 	 	 	 	 	 	 	 ddI       Z,e!dddJ	 	 	 	 	 	 	 ddK       Z-e!dddJ	 	 	 	 	 	 	 ddL       Z.e!ddM       Z/e!	 	 	 	 	 	 ddN       Z0e!ddO       Z1	 	 	 	 ddPZ2ddQZ3dddRZ4esd fdSZ5ddTZ6ddUZ7ddVZ8ddWZ9ddXZ:ddYZ;esddZZ<erdd[Z=dd\Z>dd]Z?dd^Z@eAj                  j                  ZCeAj                  j                  ZDeAj                  j                  ZEeAj                  j                  ZFeAj                  j                  ZGdd_ZHe eIj                  d`da      ddb              ZKe eIj                  dcda      ddd              ZL eIj                  deda      ddd
d
d
d
df	 	 	 	 	 	 	 	 	 	 	 	 	 ddg       ZM eIj                  dhda      ddd
d
d
d
eNeNdi	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddj       ZOe! eIj                  dkda      ddl              ZPe! eIj                  dmda      ddndd
do	 	 	 	 	 	 	 	 	 	 	 ddp              ZQe! eIj                  dqda      ddndd
do	 	 	 	 	 	 	 	 	 	 	 ddr              ZRe! eIj                  dsda      ddt              ZSe! eIj                  duda      dddv              ZT eIj                  dwda      dddd
dx	 	 	 	 	 	 	 	 	 ddy       ZUe! eIj                  dzda      d0e&f	 	 	 	 	 dd{              ZVe! eIj                  d|da      d0e&d}	 	 	 	 	 	 	 dd~              ZWe! eIj                  dda      dd              ZXe! eIj                  dda      dd              ZY eIj                  dda      dd       ZZ eIj                  dda      dd       Z[e! eIj                  dda      dd              Z\ eIj                  dda      dd       Z] xZ^S )rA   a  Usage docs: https://docs.pydantic.dev/2.10/concepts/models/

    A base class for creating Pydantic models.

    Attributes:
        __class_vars__: The names of the class variables defined on the model.
        __private_attributes__: Metadata about the private attributes of the model.
        __signature__: The synthesized `__init__` [`Signature`][inspect.Signature] of the model.

        __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
        __pydantic_core_schema__: The core schema of the model.
        __pydantic_custom_init__: Whether the model has a custom `__init__` function.
        __pydantic_decorators__: Metadata containing the decorators defined on the model.
            This replaces `Model.__validators__` and `Model.__root_validators__` from Pydantic V1.
        __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
            __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
        __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
        __pydantic_post_init__: The name of the post-init method for the model, if defined.
        __pydantic_root_model__: Whether the model is a [`RootModel`][pydantic.root_model.RootModel].
        __pydantic_serializer__: The `pydantic-core` `SchemaSerializer` used to dump instances of the model.
        __pydantic_validator__: The `pydantic-core` `SchemaValidator` used to validate instances of the model.

        __pydantic_fields__: A dictionary of field names and their corresponding [`FieldInfo`][pydantic.fields.FieldInfo] objects.
        __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [`ComputedFieldInfo`][pydantic.fields.ComputedFieldInfo] objects.

        __pydantic_extra__: A dictionary containing extra values, if [`extra`][pydantic.config.ConfigDict.extra]
            is set to `'allow'`.
        __pydantic_fields_set__: The names of fields explicitly set during instantiation.
        __pydantic_private__: Values of private attributes set on the model instance.
    zClassVar[ConfigDict]model_configzClassVar[set[str]]__class_vars__z%ClassVar[Dict[str, ModelPrivateAttr]]__private_attributes__zClassVar[Signature]__signature__FzClassVar[bool]__pydantic_complete__zClassVar[CoreSchema]__pydantic_core_schema____pydantic_custom_init__z$ClassVar[_decorators.DecoratorInfos]__pydantic_decorators__z+ClassVar[_generics.PydanticGenericMetadata]__pydantic_generic_metadata__NzClassVar[Dict[str, Any] | None]__pydantic_parent_namespace__z+ClassVar[None | Literal['model_post_init']]__pydantic_post_init____pydantic_root_model__zClassVar[SchemaSerializer]__pydantic_serializer__z4ClassVar[SchemaValidator | PluggableSchemaValidator]__pydantic_validator__zClassVar[Dict[str, FieldInfo]]__pydantic_fields__z&ClassVar[Dict[str, ComputedFieldInfo]]__pydantic_computed_fields__)initdict[str, Any] | None__pydantic_extra__set[str]__pydantic_fields_set____pydantic_private__zXPydantic models should inherit from BaseModel, BaseModel cannot be instantiated directlyzbase-model-instantiatedcode	validator)
val_or_serr]   
serializer)__dict__rZ   rX   r[   c               z    d}| j                   j                  ||       }| |urt        j                  dd       yy)a/  Create a new model by parsing and validating input data from keyword arguments.

        Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be
        validated to form a valid model.

        `self` is explicitly positional-only to allow `self` as a field name.
        T)self_instancea*  A custom validator is returning a value other than `self`.
Returning anything other than `self` from a top level model validator isn't supported when validating via `__init__`.
See the `model_validator` docs (https://docs.pydantic.dev/latest/concepts/validators/#model-validators) for more details.   )
stacklevelN)rS   validate_pythonwarningswarn)selfdata__tracebackhide__validated_selfs       c/var/www/python.lazyprojects.co.uk/rdoDiscordBot/venv/lib/python3.12/site-packages/pydantic/main.py__init__zBaseModel.__init__   sJ     !44DDTY]D^~%MML 	 &    TzClassVar[dict[str, FieldInfo]]model_fieldsz&ClassVar[dict[str, ComputedFieldInfo]]model_computed_fieldsc                    t        | di       S )av  Get metadata about the fields defined on the model.

            Deprecation warning: you should be getting this information from the model class, not from an instance.
            In V3, this property will be removed from the `BaseModel` class.

            Returns:
                A mapping of field names to [`FieldInfo`][pydantic.fields.FieldInfo] objects.
            rT   getattrri   s    rm   rp   zBaseModel.model_fields   s     4!6;;ro   c                    t        | di       S )a  Get metadata about the computed fields defined on the model.

            Deprecation warning: you should be getting this information from the model class, not from an instance.
            In V3, this property will be removed from the `BaseModel` class.

            Returns:
                A mapping of computed field names to [`ComputedFieldInfo`][pydantic.fields.ComputedFieldInfo] objects.
            rU   rs   ru   s    rm   rq   zBaseModel.model_computed_fields   s     4!?DDro   c                    | j                   S )zGet extra fields set during validation.

        Returns:
            A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.
        )rX   ru   s    rm   model_extrazBaseModel.model_extra  s     &&&ro   c                    | j                   S )zReturns the set of fields that have been explicitly set on this model instance.

        Returns:
            A set of strings representing the fields that have been set,
                i.e. that were not filled from defaults.
        )rZ   ru   s    rm   model_fields_setzBaseModel.model_fields_set  s     +++ro   c                ,   | j                  |       }i }t               }| j                  j                         D ]y  \  }}|j                  =|j                  |v r/|j                  |j                        ||<   |j                  |       ||vr|j                  t        |j                  t              r|j                  j                  n|j                  g}|D ]  }	t        |	t              r+|	|v r'|j                  |	      ||<   |j                  |        nDt        |	t              sO|	j                  |      }
|
t        usi|
||<   |j                  |        n ||vs'||v r'|j                  |      ||<   |j                  |       R|j                         rd|j!                  d|      ||<   | ||}| j"                  j%                  d      dk(  r|nd}t'        |d|       t'        |d|       | j(                  st'        |d|       | j*                  ra|j-                  d       t/        |d	      rB|j0                  6|j                         D ]#  \  }}||j2                  v s||j0                  |<   % |S | j(                  st'        |d	d       |S )
aJ  Creates a new instance of the `Model` class with validated data.

        Creates a new model setting `__dict__` and `__pydantic_fields_set__` from trusted or pre-validated data.
        Default values are respected, but no other validation is performed.

        !!! note
            `model_construct()` generally respects the `model_config.extra` setting on the provided model.
            That is, if `model_config.extra == 'allow'`, then all extra passed values are added to the model instance's `__dict__`
            and `__pydantic_extra__` fields. If `model_config.extra == 'ignore'` (the default), then all extra passed values are ignored.
            Because no validation is performed with a call to `model_construct()`, having `model_config.extra == 'forbid'` does not result in
            an error if extra values are passed, but they will be ignored.

        Args:
            _fields_set: A set of field names that were originally explicitly set during instantiation. If provided,
                this is directly used for the [`model_fields_set`][pydantic.BaseModel.model_fields_set] attribute.
                Otherwise, the field names from the `values` argument will be used.
            values: Trusted or pre-validated data dictionary.

        Returns:
            A new instance of the `Model` class with validated data.
        NT)call_default_factoryvalidated_dataextraallowra   rZ   rX   r[   )__new__setrT   itemsaliaspopaddvalidation_alias
isinstancer'   choicesstrr(   search_dict_for_pathr   is_requiredget_defaultrF   get_object_setattrrQ   rP   model_post_inithasattrr[   rH   )cls_fields_setvaluesmfields_values
fields_setnamefieldvalidation_aliasesr   value_extrakvs                 rm   model_constructzBaseModel.model_construct  sn   . KK(*U
2288:KD%{{&5;;&+@&,jj&=d#t$J&U-C-C-O "%"8"8,G **22001 # 0E!%-%6/.4jj.?d+"t,#E95 % : :6 B (9927M$/&NN40! 0 :%6>*0**T*:M$'NN4(**,*/*;*;QUfs*;*tM$'; ;< $K252B2B2F2Fw2OSZ2Z`d:}54kB**A3V<%%d#q01a6L6L6X"LLNDAqA44445..q1 +  ,, A5t<ro   )updatedeepc                  |r| j                         n| j                         }|r| j                  j                  d      dk(  rY|j	                         D ]E  \  }}|| j
                  v r||j                  |<   $|j                  i |_        ||j                  |<   G n|j                  j                  |       |j                  j                  |j                                |S )a  Usage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#model_copy

        Returns a copy of the model.

        Args:
            update: Values to change/add in the new model. Note: the data is not validated
                before creating the new model. You should trust this data.
            deep: Set to `True` to make a deep copy of the model.

        Returns:
            New model instance.
        r~   r   )__deepcopy____copy__rF   r   r   rT   ra   rX   r   rZ   keys)ri   r   r   copiedr   r   s         rm   
model_copyzBaseModel.model_copyh  s     )-""$$--/  $$W-8"LLNDAqD444-.*!44<8:F57811!4 + &&v.**11&++-@ro   python)modeincludeexcludecontextby_aliasexclude_unsetexclude_defaultsexclude_none
round_triprg   serialize_as_anyc               P    | j                   j                  | |||||||||	|
|      S )a  Usage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#modelmodel_dump

        Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

        Args:
            mode: The mode in which `to_python` should run.
                If mode is 'json', the output will only contain JSON serializable types.
                If mode is 'python', the output may contain non-JSON-serializable Python objects.
            include: A set of fields to include in the output.
            exclude: A set of fields to exclude from the output.
            context: Additional context to pass to the serializer.
            by_alias: Whether to use the field's alias in the dictionary key if defined.
            exclude_unset: Whether to exclude fields that have not been explicitly set.
            exclude_defaults: Whether to exclude fields that are set to their default value.
            exclude_none: Whether to exclude fields that have a value of `None`.
            round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
            warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
                "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
            serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

        Returns:
            A dictionary representation of the model.
        )r   r   r   r   r   r   r   r   r   rg   r   )rR   	to_python)ri   r   r   r   r   r   r   r   r   r   rg   r   s               rm   
model_dumpzBaseModel.model_dump  sG    L ++55'-%!- 6 
 	
ro   indentr   r   r   r   r   r   r   r   rg   r   c               l    | j                   j                  | |||||||||	|
|      j                         S )a.  Usage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#modelmodel_dump_json

        Generates a JSON representation of the model using Pydantic's `to_json` method.

        Args:
            indent: Indentation to use in the JSON output. If None is passed, the output will be compact.
            include: Field(s) to include in the JSON output.
            exclude: Field(s) to exclude from the JSON output.
            context: Additional context to pass to the serializer.
            by_alias: Whether to serialize using field aliases.
            exclude_unset: Whether to exclude fields that have not been explicitly set.
            exclude_defaults: Whether to exclude fields that are set to their default value.
            exclude_none: Whether to exclude fields that have a value of `None`.
            round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
            warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
                "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
            serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

        Returns:
            A JSON string representation of the model.
        r   )rR   to_jsondecode)ri   r   r   r   r   r   r   r   r   r   rg   r   s               rm   model_dump_jsonzBaseModel.model_dump_json  sP    H ++33'-%!- 4 
 &(	ro   
validationc                "    t        | ||||      S )a  Generates a JSON schema for a model class.

        Args:
            by_alias: Whether to use attribute aliases or not.
            ref_template: The reference template.
            schema_generator: To override the logic used to generate the JSON schema, as a subclass of
                `GenerateJsonSchema` with your desired modifications
            mode: The mode in which to generate the schema.

        Returns:
            The JSON schema for the given model class.
        )r   ref_templateschema_generatorr   )r2   )r   r   r   r   r   s        rm   r2   zBaseModel.model_json_schema  s    ( !(P`gk
 	
ro   c                   t        | t        j                        st        d      |D cg c])  }t	        |t
              r|nt        j                  |      + }}dj                  |      }| j                   d| dS c c}w )a}  Compute the class name for parametrizations of generic classes.

        This method can be overridden to achieve a custom naming scheme for generic BaseModels.

        Args:
            params: Tuple of types of 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`.

        Returns:
            String representing the new class where `params` are passed to `cls` as type variables.

        Raises:
            TypeError: Raised when trying to generate concrete names for non-generic models.
        z;Concrete names should only be generated for generic models., [])

issubclasstypingGeneric	TypeErrorr   r   r#   display_as_typejoin__name__)r   paramsparamparam_namesparams_components        rm   model_parametrized_namez!BaseModel.model_parametrized_name  s    " #v~~.YZZ
 gmmfl]b
5# 6uE<Q<QRW<XXflm99[1,,q!1 2!44 ns   .A=c                     y)zOverride this method to perform additional initialization after `__init__` and `model_construct`.
        This is useful if you want to do some validation that requires the entire model to be initialized.
        N )ri   _BaseModel__contexts     rm   r   zBaseModel.model_post_init  s     	ro   rd   )forceraise_errors_parent_namespace_depth_types_namespacec                  |s| j                   ryd| j                  v rt        | d       ||}n#|dkD  rt        j                  |d      xs i }ni }t        j                  | j                        xs i }t        j                  i ||      }i | j                  ddi}t        j                  | | j                  t        j                  |d	      ||
      S )a1  Try to rebuild the pydantic-core schema for the model.

        This may be necessary when one of the annotations is a ForwardRef which could not be resolved during
        the initial attempt to build the schema, and automatic rebuilding fails.

        Args:
            force: Whether to force the rebuilding of the model schema, defaults to `False`.
            raise_errors: Whether to raise errors, defaults to `True`.
            _parent_namespace_depth: The depth level of the parent namespace, defaults to 2.
            _types_namespace: The types namespace, defaults to `None`.

        Returns:
            Returns `None` if the schema is already "complete" and rebuilding was not required.
            If rebuilding _was_ required, returns `True` if rebuilding was successful, otherwise `False`.
        NrK   r   T)parent_depthr   )parent_namespacedefer_buildF)check)r   ns_resolver)rJ   ra   delattrr$   parent_frame_namespacer!   unpack_lenient_weakvaluedictrO   r"   
NsResolverrF   complete_model_classr   r   ConfigWrapper)	r   r   r   r   r   
rebuild_ns	parent_nsr   configs	            rm   model_rebuildzBaseModel.model_rebuild%  s    0 22%5C34')J$q(&==KbjnousuJJ'DDSEfEfgmkm	&118
8i8

 <C$$;mU;"77LL!!&6%#
 	
ro   strictfrom_attributesr   c               D    d}| j                   j                  ||||      S )a  Validate a pydantic model instance.

        Args:
            obj: The object to validate.
            strict: Whether to enforce types strictly.
            from_attributes: Whether to extract data from object attributes.
            context: Additional context to pass to the validator.

        Raises:
            ValidationError: If the object could not be validated.

        Returns:
            The validated model instance.
        Tr   )rS   rf   )r   objr   r   r   rk   s         rm   model_validatezBaseModel.model_validateZ  s1    0 !))99 : 
 	
ro   r   r   c               B    d}| j                   j                  |||      S )a  Usage docs: https://docs.pydantic.dev/2.10/concepts/json/#json-parsing

        Validate the given JSON data against the Pydantic model.

        Args:
            json_data: The JSON data to validate.
            strict: Whether to enforce types strictly.
            context: Extra variables to pass to the validator.

        Returns:
            The validated Pydantic model.

        Raises:
            ValidationError: If `json_data` is not a JSON string or the object could not be validated.
        Tr   )rS   validate_json)r   	json_datar   r   rk   s        rm   model_validate_jsonzBaseModel.model_validate_jsonw  s)    0 !))77	&Za7bbro   c               B    d}| j                   j                  |||      S )aP  Validate the given object with string data against the Pydantic model.

        Args:
            obj: The object containing string data to validate.
            strict: Whether to enforce types strictly.
            context: Extra variables to pass to the validator.

        Returns:
            The validated Pydantic model.
        Tr   )rS   validate_strings)r   r   r   r   rk   s        rm   model_validate_stringsz BaseModel.model_validate_strings  s)    & !))::3vW^:__ro   c                   | j                   j                  d      }|5t        |t        j                        s| j
                  d   s| j                  S  ||      S )a  Hook into generating the model's CoreSchema.

        Args:
            source: The class we are generating a schema for.
                This will generally be the same as the `cls` argument if this is a classmethod.
            handler: A callable that calls into Pydantic's internal CoreSchema generation logic.

        Returns:
            A `pydantic-core` `CoreSchema`.
        rK   origin)ra   r   r   r    MockCoreSchemarN   rK   )r   sourcehandlerschemas       rm   __get_pydantic_core_schema__z&BaseModel.__get_pydantic_core_schema__  sT     !!"<=j9U9U&V 44X>333vro   c                    ||      S )a_  Hook into generating the model's JSON schema.

        Args:
            core_schema: A `pydantic-core` CoreSchema.
                You can ignore this argument and call the handler with a new CoreSchema,
                wrap this CoreSchema (`{'type': 'nullable', 'schema': current_schema}`),
                or just call the handler with the original schema.
            handler: Call into Pydantic's internal JSON schema generation.
                This will raise a `pydantic.errors.PydanticInvalidForJsonSchema` if JSON schema
                generation fails.
                Since this gets called by `BaseModel.model_json_schema` you can override the
                `schema_generator` argument to that function to change JSON schema generation globally
                for a type.

        Returns:
            A JSON schema, as a Python object.
        r   )r   core_schemar   s      rm   __get_pydantic_json_schema__z&BaseModel.__get_pydantic_json_schema__  s    0 {##ro   c                     y)a  This is intended to behave just like `__init_subclass__`, but is called by `ModelMetaclass`
        only after the class is actually fully initialized. In particular, attributes like `model_fields` will
        be present when this is called.

        This is necessary because `__init_subclass__` will always be called by `type.__new__`,
        and it would require a prohibitively large refactor to the `ModelMetaclass` to ensure that
        `type.__new__` was called in such a manner that the class would already be sufficiently initialized.

        This will receive the same `kwargs` that would be passed to the standard `__init_subclass__`, namely,
        any kwargs passed to the class definition that aren't used internally by pydantic.

        Args:
            **kwargs: Any keyword arguments passed to the class definition that aren't used internally
                by pydantic.
        Nr   r   kwargss     rm   __pydantic_init_subclass__z$BaseModel.__pydantic_init_subclass__  s    " 	ro   c                   t        j                  | |      }||S | t        u rt        d      t	        | d      st        |  d      | j
                  d   s*t        j                  | j                  vrt        |  d      t        |t              s|f}t        j                  | |       t        t        | j
                  d   |            t        j                  j!                         j#                               rr| }t        j$                  | ||       |S | j
                  d   }|s|}nt        fd|D              }| j
                  d   xs | }|j'                  |      }t        t        j(                  j#                               D ci c]  }|d  c}      }	t        j*                  ||      5 }
t        j,                  | |||      }||cd d d        S |
|
cd d d        S 	 t/        j0                  d	
      xs i }|j3                  |       t        j6                  ||||	      }t        j$                  | ||||       d d d        |S c c}w # t4        $ r Y Kw xY w# 1 sw Y   S xY w)NzAType parameters should be placed on typing.Generic, not BaseModel__parameters__zG cannot be parametrized because it does not inherit from typing.Generic
parametersz is not a generic classargsc              3  J   K   | ]  }t        j                  |        y wN)r   replace_types).0argtypevars_maps     rm   	<genexpr>z.BaseModel.__class_getitem__.<locals>.<genexpr>  s!     _S^CY44S,GS^s    #r   rd   )r   )r   )r   get_cached_generic_type_earlyrA   r   r   rN   r   r   	__bases__r   tuplecheck_parameters_countdictzipr%   all_identicalr   r   set_cached_generic_typer   iter_contained_typevarsgeneric_recursion_self_typeget_cached_generic_type_later$   r   r   r,   create_generic_submodel)r   typevar_valuescachedsubmodelparent_argsr  r   
model_namer   r   maybe_self_typer   r  s               @rm   __class_getitem__zBaseModel.__class_getitem__  s    88nMM)_``s,-se#jkll00>6>>Y\YfYfCfse#:;<<.%0,.N((n= 2611,?P2
  1 1 3\5H5H5JKP\H--c>8LR O ;;FCK%_S^__66x@GCF77=J*3*K*KLL_L_La*bc*b*bcF 66vtD"??^U[]ab%! ED
 #.* ED !. D DRS T ZXZI(()(D %<<ZQUW]^ 11#~xQWY]^3 E6 = d( 3  # E6 s<   
I9I(I(-,I1I(	I%"I($I%%I((I2c           
        t        |       }|j                  |      }t        |dt        | j                               t        |dt        | j
                               t        |dt        | j                               t        | d      r| j                  t        |dd       |S t        |d| j                  j                         D ci c]  \  }}|t        us|| c}}       |S c c}}w )z$Returns a shallow copy of the model.ra   rX   rZ   r[   N)typer   r   r   ra   rX   rZ   r   r[   r   r   )ri   r   r   r   r   s        rm   r   zBaseModel.__copy__1  s    4jKK:tDMM':;/d6M6M1NO4d4;W;W6XYt348Q8Q8YA5t<  &"&";";"A"A"Cb"C$!QqPaGaA"Cb  cs   C(C(c                   t        |       }|j                  |      }t        |dt        | j                  |             t        |dt        | j
                  |             t        |dt        | j                               t        | d      r| j                  t        |dd       |S t        |dt        | j                  j                         D ci c]  \  }}|t        us|| c}}|             |S c c}}w )z!Returns a deep copy of the model.ra   )memorX   rZ   r[   N)r!  r   r   r   ra   rX   r   rZ   r   r[   r   r   )ri   r#  r   r   r   r   s         rm   r   zBaseModel.__deepcopy__D  s    4jKK:xD'IJ/$:Q:QX\1]^ 	4d4;W;W6XYt348Q8Q8YA5t<  &4+D+D+J+J+Lk+L41aPQYjPj!Q$+Lkrvw  ls   C7"C7c                t   t         j                  | d      }||v r<||   }t        |d      r|j                  | t	        |             S 	 | j
                  |   S 	 t         j                  | d      }|r	 ||   S t        | j                  |      rt        |   |      S t        t	        |       j                  d|      # t        $ r)}t        t	        |       j                  d|      |d }~ww xY w# t        $ r d }Y w xY w# t        $ r)}t        t	        |       j                  d|      |d }~ww xY w)NrH   __get__ object has no attribute rX   )object__getattribute__r   r%  r!  r[   KeyErrorAttributeErrorr   	__class__super)ri   itemprivate_attributes	attributeexcpydantic_extrar+  s         rm   __getattr__zBaseModel.__getattr__]  s`   !'!8!8?W!X)).t4	9i0$,,T4:>>o44T::*%+%<%<TCW%XN "s-d33 t~~t4$w7== -T
0C0C/FF_`d_g-hii)   o(DJ,?,?+BB[\`[c)deknno & *%)N* $ s,T
0C0C/FF_`d_g-hiorrssB   	B? C4 2D ?	C1$C,,C14DD	D7$D22D7c           
        || j                   v r?t        |d| j                  j                   d| j                  j                   d| d      t	        j
                  |      sf| j                  || j                  vrt        | ||       y | j                  |   }t        |d      r|j                  | |       y || j                  |<   y | j                  ||       t        | j                  |d       }t        |t              r|j                  | |       y t        |t              r|| j                   |<   y | j"                  j%                  dd       r| j&                  j)                  | ||       y | j"                  j%                  d      dk7  r4|| j*                  vr&t-        d	| j                  j                   d
| d	      | j"                  j%                  d      dk(  rS|| j*                  vrE| j.                  r|| j.                  v r|| j0                  |<   y 	 t        | |       t        | ||       y || j                   |<   | j2                  j5                  |       y # t        $ r || j0                  |<   Y y w xY w)Nz is a ClassVar of `zR` and cannot be set on an instance. If you want to set a value on the class, use `.z
 = value`.__set__validate_assignmentr~   r   "z" object has no field ")rG   r*  r+  r   r   is_valid_field_namer[   rH   r   r   r5  _check_frozenrt   r   propertyr   ra   rF   r   rS   r6  rT   
ValueErrorrx   rX   rZ   r   )ri   r   r   r/  attrs        rm   __setattr__zBaseModel.__setattr__}  s\   t***$h1$..2I2I1J KEEI^^E\E\D]]^_c^ddnp  006,,4DD_D_8_#D$6  !% ; ;D AIy)4!))$6  ;@11$7tU+4>>46D
 $)T5)D/2&+d#""&&'<dC++??dER""&&w/7:t4KcKc?c 1T^^%<%<$==TUYTZZ[!\]]""&&w/7:t4KcKc?c##0@0@(@49D++D1;d+ (dE:&+d#,,006 * >8=//5>s   I I87I8c                N   || j                   v r<| j                   |   }t        |d      r|j                  |        y 	 | j                  |= y | j                  |d        || j                  v rt        j                  | |       y | j                  || j                  v r| j                  |= y 	 t        j                  | |       y # t        $ r)}t        t        |       j                  d|      |d }~ww xY w# t
        $ r$ t        t        |       j                  d|      w xY w)N
__delete__r&  )rH   r   r?  r[   r)  r*  r!  r   r9  rT   r'  __delattr__rX   )ri   r-  r/  r0  s       rm   r@  zBaseModel.__delattr__  s0   t222 77=	9l3((.o11$7 tT*t///""4.((4AXAX9X++D1f&&tT2   o(DJ,?,?+BB[\`[c)deknno & f(DJ,?,?+BB[\`[c)deefs#   C +C7 	C4$C//C47-D$c                &    | j                  |      S )N)r   )r   )ri   changess     rm   __replace__zBaseModel.__replace__  s    ??'?22ro   c                   | j                   j                  dd       rd}n*t        | j                  j                  |      dd      rd}ny ||f|d}t        j
                  j                  | j                  j                  |g      )Nfrozenfrozen_instanceFfrozen_fieldr!  locinput)	rF   r   rt   rT   pydantic_coreValidationErrorfrom_exception_datar+  r   )ri   r   r   typerrors        rm   r9  zBaseModel._check_frozen  s}      40#CT--11$75I C71

 ++??@W@WZ_Y`aaro   c                    | j                   }|r,|j                         D ci c]  \  }}|t        us|| }}}| j                  | j                  | j
                  |dS c c}}w )N)ra   rX   rZ   r[   )r[   r   r   ra   rX   rZ   )ri   privater   r   s       rm   __getstate__zBaseModel.__getstate__  sf    ++(/V11DU;Uq!tGV"&"9"9'+'C'C$+	
 	
 Ws
   A A c                    t        | d|j                  di              t        | d|j                  di              t        | d|j                  di              t        | d|j                  di              y )NrZ   rX   r[   ra   )r   r   )ri   states     rm   __setstate__zBaseModel.__setstate__  sg    7C\^`9ab2EII>RTV4WX4eii@VXZ6[\j%))J*CDro   c                >   t        |t              r)| j                  d   xs | j                  }|j                  d   xs |j                  }||k(  r4t	        | dd       t	        |dd       k(  r| j
                  |j
                  k(  sy| j                  |j                  k(  ryt        |       j                  j                         }| j                  j                         |k  r|j                  j                         |k  ry|rt        j                  | nd }	  || j                         ||j                        k(  S t        S # t        $ rR t        j                  | j                        }t        j                  |j                        } ||       ||      k(  cY S w xY w)Nr   r[   FTc                "    t         j                  S r  )r%   	_SENTINEL)_s    rm   <lambda>z"BaseModel.__eq__.<locals>.<lambda>  s    [a[k[kro   )r   rA   rN   r+  rt   rX   ra   r!  rT   r   operator
itemgetterr)  r%   SafeGetItemProxyNotImplemented)ri   other	self_type
other_typerp   getterself_fields_proxyother_fields_proxys           rm   __eq__zBaseModel.__eq__  st   %+ !>>xHZDNN	"@@J]eoo
 +&<dCwuVlnrGss//53K3KK  ==ENN2  $Dz==BBD==%%'<7ENN<O<O<QUa<a  @L,,l;Qk
S!$--0F5>>4JJJ &%   S )/(?(?(N%)/)@)@)P&!"34?Q8RRRSs   $E AFFc                     y)a  This signature is included purely to help type-checkers check arguments to class declaration, which
            provides a way to conveniently set model_config key/value pairs.

            ```python
            from pydantic import BaseModel

            class MyModel(BaseModel, extra='allow'): ...
            ```

            However, this may be deceiving, since the _actual_ calls to `__init_subclass__` will not receive any
            of the config arguments, and will only receive any keyword arguments passed during class initialization
            that are _not_ expected keys in ConfigDict. (This is due to the way `ModelMetaclass.__new__` works.)

            Args:
                **kwargs: Keyword arguments passed to the class definition, which set model_config

            Note:
                You may want to override `__pydantic_init_subclass__` instead, which behaves similarly but is called
                *after* the class is fully initialized.
            Nr   r   s     rm   __init_subclass__zBaseModel.__init_subclass__*  s    ro   c              #     K   | j                   j                         D cg c]  \  }}|j                  d      r||f c}}E d{    | j                  }|r|j                         E d{    yyc c}}w 7 27 w)zSo `dict(model)` works.rY  N)ra   r   
startswithrX   )ri   r   r   r~   s       rm   __iter__zBaseModel.__iter__@  sr     )-)<)<)>X)>v1allSVFWQF)>XXX''{{}$$  YX %s3   A>A4A4 A>A:%A>-A<.A><A>c                L    | j                          d| j                  d       dS )N(r   ))__repr_name____repr_str__ru   s    rm   __repr__zBaseModel.__repr__G  s+    $$&'q):):4)@(ACCro   c              #     K    j                   j                         D ]P  \  }} j                  j                  |      }|s$|j                  s1| ur||f <| j                  |      f R 	 t        j                   d      }|d |j                         D        E d {     fd j                  j                         D        E d {    y # t        $ r d }Y Zw xY w7 A7 w)NrX   c              3  *   K   | ]  \  }}||f  y wr  r   )r	  r   r   s      rm   r  z*BaseModel.__repr_args__.<locals>.<genexpr>\  s     B+A41aA+As   c              3  Z   K   | ]"  \  }}|j                   s|t        |      f $ y wr  )reprrt   )r	  r   r   ri   s      rm   r  z*BaseModel.__repr_args__.<locals>.<genexpr>]  s-     j6_dacdciciQa()6_s   ++)
ra   r   rT   r   rt  __repr_recursion__r'  r(  r*  rU   )ri   r   r   r   r1  s   `    rm   __repr_args__zBaseModel.__repr_args__J  s     MM'')DAq,,003ED=Q$JT44Q777 *	"#44T;OPN %B>+?+?+ABBBjd6W6W6]6]6_jjj  	"!N	" CjsS   >C*C*"C*2C C*$C&%*C*C(C*C# C*"C##C*(C*c                $    | j                  d      S )N )ro  ru   s    rm   __str__zBaseModel.__str__f  s      %%ro   EThe `__fields__` attribute is deprecated, use `model_fields` instead.)categoryc                R    t        j                  dt        d       | j                  S )Nrz  rd   r{  re   )rg   rh   r4   rp   ru   s    rm   
__fields__zBaseModel.__fields__j  s'    
 	S.	

    ro   MThe `__fields_set__` attribute is deprecated, use `model_fields_set` instead.c                R    t        j                  dt        d       | j                  S )Nr  rd   r}  )rg   rh   r4   rZ   ru   s    rm   __fields_set__zBaseModel.__fields_set__v  s'     	[.	

 +++ro   :The `dict` method is deprecated; use `model_dump` instead.r   r   r   r   r   r   c               h    t        j                  dt        d       | j                  ||||||      S )Nr  rd   r}  r  )rg   rh   r4   r   )ri   r   r   r   r   r   r   s          rm   r  zBaseModel.dict  sC     	H.	

 '-%  
 	
ro   ?The `json` method is deprecated; use `model_dump_json` instead.)r   r   r   r   r   r   encodermodels_as_dictc                   t        j                  dt        d       |t        urt	        d      |t        urt	        d      |	rt	        d      | j                  ||||||      S )Nr  rd   r}  zMThe `encoder` argument is no longer supported; use field serializers instead.zUThe `models_as_dict` argument is no longer supported; use a model serializer instead.z9`dumps_kwargs` keyword arguments are no longer supported.r  )rg   rh   r4   r   r   r   )
ri   r   r   r   r   r   r   r  r  dumps_kwargss
             rm   jsonzBaseModel.json  s~     	M.	

 ++kll!22sttWXX##'-% $ 
 	
ro   CThe `parse_obj` method is deprecated; use `model_validate` instead.c                \    t        j                  dt        d       | j                  |      S )Nr  rd   r}  rg   rh   r4   r   r   r   s     rm   	parse_objzBaseModel.parse_obj  s,     	Q.	

 !!#&&ro   The `parse_raw` method is deprecated; if your data is JSON use `model_validate_json`, otherwise load the data then use `model_validate` instead.utf8)content_typeencodingprotoallow_picklec                  t        j                  dt        d       ddlm} 	 |j                  |||||      }| j%                  |      S # t        t        f$ r}dd l}	t        |t              rd}
n.t        ||	j                        rd	}
nt        |t              rd
}
nd}
t        j                  |
t        |            d|d}t        j                  j!                  | j"                  |g      d }~ww xY w)Nr  rd   r}  r   parser  r  r  r  r   zvalue_error.unicodedecodezvalue_error.jsondecodevalue_error
type_error)__root__rH  )rg   rh   r4   
deprecatedr  load_str_bytesr;  r   r  r   UnicodeDecodeErrorJSONDecodeErrorrK  PydanticCustomErrorr   rL  rM  r   r   )r   br  r  r  r  r  r   r0  r  type_strrO  s               rm   	parse_rawzBaseModel.parse_raw  s     	I.		
 	&	[&&)!) ' C8 !!#&&+ I& 	[ #126C!5!563C,('
 &99(CHM$	5E  //CCCLLSXRYZZ)	[s   A C2BC--C2The `parse_file` method is deprecated; load the data from file, then if your data is JSON use `model_validate_json`, otherwise `model_validate` instead.c                   t        j                  dt        d       ddlm} |j                  |||||      }| j                  |      S )Nr  rd   r}  r   r  r  )rg   rh   r4   r  r  	load_filer  )r   pathr  r  r  r  r  r   s           rm   
parse_filezBaseModel.parse_file  sT     	M.		
 	&oo%%  
 }}S!!ro   qThe `from_orm` method is deprecated; set `model_config['from_attributes']=True` and use `model_validate` instead.c                    t        j                  dt        d       | j                  j	                  dd       st        dd       | j                  |      S )Nr  rd   r}  r   zHYou must set the config attribute `from_attributes=True` to use from_ormr\   )rg   rh   r4   rF   r   r-   r   r  s     rm   from_ormzBaseModel.from_orm  s[     	W.		
 ##$5t<#Zae  !!#&&ro   DThe `construct` method is deprecated; use `model_construct` instead.c                b    t        j                  dt        d        | j                  dd|i|S )Nr  rd   r}  r   r   )rg   rh   r4   r   )r   r   r   s      rm   	constructzBaseModel.construct1  s6     	R.	

 #s""E{EfEEro   The `copy` method is deprecated; use `model_copy` instead. See the docstring of `BaseModel.copy` for details about how to handle `include` and `exclude`.)r   r   r   r   c          
        t        j                  dt        d       ddlm} t        |j                  | dd||d      fi |xs i }| j                  d}n6| j                  j                         D 	ci c]  \  }}	|	t        us||	 }}}	| j                  d}
n}| j                  j                         }
t        | j                        D ]  }||vs|
j                  |        t        |      D ]%  }|| j                  v s|j                  |      |
|<   ' |r| j                  |j                         z  }nt!        | j                        }|r|t!        |      z  }|j#                  | |||
||	      S c c}	}w )
a  Returns a copy of the model.

        !!! warning "Deprecated"
            This method is now deprecated; use `model_copy` instead.

        If you need `include` or `exclude`, use:

        ```python {test="skip" lint="skip"}
        data = self.model_dump(include=include, exclude=exclude, round_trip=True)
        data = {**data, **(update or {})}
        copied = self.model_validate(data)
        ```

        Args:
            include: Optional set or mapping specifying which fields to include in the copied model.
            exclude: Optional set or mapping specifying which fields to exclude in the copied model.
            update: Optional dictionary of field-value pairs to override field values in the copied model.
            deep: If True, the values of fields that are Pydantic models will be deep-copied.

        Returns:
            A copy of the model with included, excluded and updated fields as specified.
        r  rd   r}  r   copy_internalsF)to_dictr   r   r   r   N)r   )rg   rh   r4   r  r  r  _iterr[   r   r   rX   r   listr   rZ   r   r   _copy_and_set_values)ri   r   r   r   r   r  r   rQ  r   r   r~   r   s               rm   r   zBaseModel.copy;  s   F 	m.		
 	/  eeWgej ! 
 |	
 $$,G(,(A(A(G(G(Ih(I1QVgMgq!t(IGh""*+/E++002E$112F?IIaL 3 &\///%zz!}E!H "
 55EJT99:J #g,&J224UT[bf2gg/ is   4E5E5CThe `schema` method is deprecated; use `model_json_schema` instead.c                `    t        j                  dt        d       | j                  ||      S )Nr  rd   r}  r   r   )rg   rh   r4   r2   )r   r   r   s      rm   r   zBaseModel.schema  s1    
 	Q.	

 $$h\$RRro   WThe `schema_json` method is deprecated; use `model_json_schema` and json.dumps instead.r  c                   t        j                  dt        d       dd l}ddlm}  |j                  | j                  ||      fd|i|S )	Nr  rd   r}  r   r   )pydantic_encoderr  default)rg   rh   r4   r  deprecated.jsonr  dumpsr2   )r   r   r   r  r  r  s         rm   schema_jsonzBaseModel.schema_json  sY     	e.	

 	5tzz!!8,!O
$
 
 	
ro   BThe `validate` method is deprecated; use `model_validate` instead.c                \    t        j                  dt        d       | j                  |      S )Nr  rd   r}  r  )r   r   s     rm   validatezBaseModel.validate  s,     	P.	

 !!%((ro   LThe `update_forward_refs` method is deprecated; use `model_rebuild` instead.c                z    t        j                  dt        d       |rt        d      | j	                  d       y )Nr  rd   r}  z,`localns` arguments are not longer accepted.T)r   )rg   rh   r4   r   r   )r   localnss     rm   update_forward_refszBaseModel.update_forward_refs  s;     	Z.	

 JKK%ro   HThe private method `_iter` will be removed and should no longer be used.c                r    t        j                  dt        d       ddlm}  |j
                  | g|i |S )Nr  rd   r}  r   r  )rg   rh   r4   r  r  r  ri   r  r   r  s       rm   r  zBaseModel._iter  s;     	V.	

 	/#~##D:4:6::ro   WThe private method `_copy_and_set_values` will be removed and should no longer be used.c                r    t        j                  dt        d       ddlm}  |j
                  | g|i |S )Nr  rd   r}  r   r  )rg   rh   r4   r  r  r  r  s       rm   r  zBaseModel._copy_and_set_values  s;    
 	e.	

 	/2~224I$I&IIro   MThe private method `_get_value` will be removed and should no longer be used.c                r    t        j                  dt        d       ddlm}  |j
                  | g|i |S )Nr  rd   r}  r   r  )rg   rh   r4   r  r  
_get_value)r   r  r   r  s       rm   r  zBaseModel._get_value  s;     	[.	

 	/(~((>t>v>>ro   RThe private method `_calculate_keys` will be removed and should no longer be used.c                r    t        j                  dt        d       ddlm}  |j
                  | g|i |S )Nr  rd   r}  r   r  )rg   rh   r4   r  r  _calculate_keysr  s       rm   r  zBaseModel._calculate_keys  s;    
 	`.	

 	/-~--dDTDVDDro   )rj   r   returnNone)r  zdict[str, FieldInfo])r  zdict[str, ComputedFieldInfo])r  rW   )r  rY   r  )r   zset[str] | Noner   r   r  r   )r   zMapping[str, Any] | Noner   boolr  r   )r   zLiteral['json', 'python'] | strr   IncEx | Noner   r  r   
Any | Noner   r  r   r  r   r  r   r  r   r  rg   'bool | Literal['none', 'warn', 'error']r   r  r  dict[str, Any])r   z
int | Noner   r  r   r  r   r  r   r  r   r  r   r  r   r  r   r  rg   r  r   r  r  r   )
r   r  r   r   r   ztype[GenerateJsonSchema]r   r0   r  r  )r   ztuple[type[Any], ...]r  r   )r   r   r  r  )
r   r  r   r  r   intr   zMappingNamespace | Noner  bool | None)
r   r   r   r  r   r  r   r  r  r   )r   zstr | bytes | bytearrayr   r  r   r  r  r   )r   r   r   r  r   r  r  r   )r   type[BaseModel]r   r)   r  r7   )r   r7   r   r*   r  r1   )r   r   r  r  )r  z!type[Any] | tuple[type[Any], ...]r  z3type[BaseModel] | _forward_ref.PydanticRecursiveRef)r  r   )r#  zdict[int, Any] | Noner  r   )r-  r   r  r   )r   r   r   r   r  r  )rB  r   r  r   )r  dict[Any, Any])rT  r  r  r  )r_  r   r  r  )r   zUnpack[ConfigDict])r  rC   )r  r   )r  z_repr.ReprArgs)r   r  r   r  r   r  r   r  r   r  r   r  r  Dict[str, Any])r   r  r   r  r   r  r   r  r   r  r   r  r  zCallable[[Any], Any] | Noner  r  r  r   r  r   )r   r   r  r   )r  zstr | bytesr  
str | Noner  r   r  DeprecatedParseProtocol | Noner  r  r  r   )r  z
str | Pathr  r  r  r   r  r  r  r  r  r   )
r   +AbstractSetIntStr | MappingIntStrAny | Noner   r  r   zDict[str, Any] | Noner   r  r  r   )r   r  r   r   r  r  )r   r  r   r   r  r   r  r   )r   r   r  r   )r  r   r  r  )r  r   r   r   r  r   )_r   
__module____qualname____doc__r+   rF   __annotations__rJ   r   DecoratorInfosrM   rO   rQ   r!   NoInitFieldrX   rZ   r[   r   r    r   rK   
MockValSerrS   rR   	__slots__rn   __pydantic_base_init__r:  rp   rq   rx   rz   classmethodr   r   r   r   r.   r/   r2   r   r   r   r   r   r   r   r   r  r  r   r   r2  r=  r@  rC  r9  rR  rU  re  rg  rj  rp  rv  r#   Representationrn  ru  ro  
__pretty____rich_repr__ry  typing_extensionsr  r~  r  r  r   r  r  r  r  r  r  r   r   r  r  r  r  r  r  r  __classcell__)r+  s   @rm   rA   rA   T   s   B *4L&5 '&@AA=&&S,1>1V22',,; E_KD^D^D`A`^ $ONl FJ!#BIQGGE.3^3N77UPPX77 #IH I0O0C0O0OUZ0[-[s(G(;(G(GU(SXSB2Q2E2Q2QW\2]/]A $@=#?#?f*$
  ":!9!9f"*"

 #;-":":f#*#
 dI( '+H#44EE 

	< 

	< 

	E 

	E ' ' , , N N` @DRW > 19 $ $"#!&" <@!&3
 .3
 	3

 3
 3
 3
 3
 3
 3
 3
 :3
 3
 
3
p " $ $"#!&" <@!&1 1 	1
 1 1 1 1 1 1 1 :1 1 
1f  05G+

 
 3	

 
 

 
. 5 54  !'(482
 2
 	2

 "%2
 22
 
2
 2
h 
 #'+"

 	

 %
 
 

 
8 
 #"c*c 	c
 c 
c c4 
 #"`` 	`
 ` 
` `*  . $$ &$
 
$ $2  $B>B	<BH&* 	j@/	7b	f8	3b	
E 5	&n 
	,%Dk, ((66M--@@''44L%%00J((66M& !!!OZ^! ! !!!W,	 
, "!!"^imn !% $#!&"
 
 	

 
 
 
 
 

 o
0 "!!"cnrs !% $#!&"/@0
 
 	

 
 
 
 
 -
 
 
 

 t
B !!!"grvw' x ' !!!	E $(04".'.' !	.'
 .' ..' .' 
.' .'` !!!	I $(04""" !	"
 " ." " 
" "4 !!!	S
' ' !!!"hswxF y F "!!	i @D?C(,Fh =Fh =	Fh
 &Fh Fh 
Fh
FhP !!!"grvw"8LSS25S	S x S !!!a
 "&;O

58
ad
	
	 

$ !!!"fquv) w ) !!!V&	 
& "!!R]a;; "!!aJ	J !!!W?	 
? "!!\E	Ero   rA   )	metaclassModelT)bound)
__config__r  __base__r  __validators____cls_kwargs__c                   y r  r   r  r  r  r  r  r  r  field_definitionss           rm   rB   rB      s     ro   )r  r  r  r  r  c                   y r  r   r  s           rm   rB   rB     s     ro   )r  r  r  r  r  r  r  c              j   |t        j                  dt               |#|t        dd      t	        |t
              s|f}nt        dt              f}|xs i }i }	i }
|j                         D ]  \  }}t        j                  |      st        j                  d| dt               t	        |t
              rt        d	|      }	 |\  }}n^t        j                  |      rEt        j                  |      ^}}}t!        j"                         }t	        ||      st        dd      d|}}|r||
|<   ||	|<    |$t%        j&                  d      }|j(                  d   }|
|d}|r|j+                  d|i       |r|j+                  |       |j+                  |	       |r"t-        j.                  |      j0                  |d<   t3        j4                  |      }t3        j6                  | ||      \  }}}||ur||d<   |j+                  |        || ||fd|d|S # t        $ r}t        d
d      |d}~ww xY w)a  Usage docs: https://docs.pydantic.dev/2.10/concepts/models/#dynamic-model-creation

    Dynamically creates and returns a new Pydantic model, in other words, `create_model` dynamically creates a
    subclass of [`BaseModel`][pydantic.BaseModel].

    Args:
        model_name: The name of the newly created model.
        __config__: The configuration of the new model.
        __doc__: The docstring of the new model.
        __base__: The base class or classes for the new model.
        __module__: The name of the module that the model belongs to;
            if `None`, the value is taken from `sys._getframe(1)`
        __validators__: A dictionary of methods that validate fields. The keys are the names of the validation methods to
            be added to the model, and the values are the validation methods themselves. You can read more about functional
            validators [here](https://docs.pydantic.dev/2.9/concepts/validators/#field-validators).
        __cls_kwargs__: A dictionary of keyword arguments for class creation, such as `metaclass`.
        __slots__: Deprecated. Should not be passed to `create_model`.
        **field_definitions: Attributes of the new model. They should be passed in the format:
            `<name>=(<type>, <default value>)`, `<name>=(<type>, <FieldInfo>)`, or `typing.Annotated[<type>, <FieldInfo>]`.
            Any additional metadata in `typing.Annotated[<type>, <FieldInfo>, ...]` will be ignored.
            Note, `FieldInfo` instances should be created via `pydantic.Field(...)`.
            Initializing `FieldInfo` instances directly is not supported.

    Returns:
        The new [model][pydantic.BaseModel].

    Raises:
        PydanticUserError: If `__base__` and `__config__` are both passed.
    Nz.__slots__ should not be passed to create_modelzFto avoid confusion `__config__` and `__base__` cannot be used togetherzcreate-model-config-baser\   type[ModelT]z3fields may not start with an underscore, ignoring "r7  ztuple[str, Any]z4Field definitions should be a `(<type>, <default>)`.zcreate-model-field-definitionsz<Field definitions should be a Annotated[<type>, <FieldInfo>]r   r   )r  r  r  rF   )kwds__orig_bases__F)#__pydantic_reset_parent_namespace___create_model_module)rg   rh   RuntimeWarningr-   r   r  r   rA   r   r   r8  r;  r$   is_annotatedr  get_argsr   import_cached_field_infosys	_getframe	f_globalsr   r   r   config_dicttypesresolve_basesprepare_class)r  r  r  r  r  r  r  r  r  fieldsr   f_namef_deff_annotationf_valueerY  r?   f	namespaceresolved_basesmetansr  s                           rm   rB   rB     sr   T FW!#X/  (E* {H35#)rNFK*002**62MMOPVxWXY[ijeU#*E2E(-%g ''.*;*D*D+'\7Q &>>@Igy1'R9  %)%'L".K v= 3@ MM![[,
4?z ZI)W-.(V$+$9$9*$E$Q$Q	.!((2N((^.YND"dX%'R -2'  W  'J9 s   H	H2H--H2)r  r   r  ConfigDict | Noner  r  r  r  r  r   r  $dict[str, Callable[..., Any]] | Noner  rW   r  r   r  r  )r  r   r  r  r  r  r  z'type[ModelT] | tuple[type[ModelT], ...]r  r   r  r  r  rW   r  r   r  r  )r  r   r  r  r  r  r  z.type[ModelT] | tuple[type[ModelT], ...] | Noner  r  r  r  r  rW   r  ztuple[str, ...] | Noner  r   r  r  )gr  
__future__r   _annotationsr[  r  r  r   rg   r   r   	functoolsr   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   rK  r  r   r   r   r   	_internalr   r   r   r   r   r   r    r!   r"   r#   r$   r%   
_migrationr&   aliasesr'   r(   annotated_handlersr)   r*   r   r+   errorsr,   r-   json_schemar.   r/   r0   r1   r2   plugin._schema_validatorr3   r4   inspectr5   pathlibr6   r7   r8   r9   _internal._namespace_utilsr:   _internal._utilsr;   r<   deprecated.parser=   DeprecatedParseProtocolr  r>   r?   r@   DeprecationWarning__all__r   rC   r  r  r  rD   object_setattrr   ModelMetaclassrA   r  r   rB   r2  r   ro   rm   <module>r/     s     2  
     %   "   + 5 5    * , J  B u u > /!KK<EEFF 3
% &eCHotT&AB	 B S3s8WS%:N5N-OQXY\^cdkmqdq^rYrQssty t%44fE-<< fER- 
	+ 

 %);?,0 "	
    9 *   
 

 %);?,0 "	
  6  9 *   
$ %)?C!;?,0(,ww "	w
 w =w w 9w *w &w w wt  )ro   