o
    ƕh>E                     @   s  d dl 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 d dlmZ er.d dlmZ dZded d	d
ddfddZG dd dZG dd deeZG dd deeZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd  d eZG d!d" d"eZG d#d$ d$eZ G d%d& d&eZ!G d'd( d(eZ"G d)d* d*eZ#G d+d, d,e#Z$G d-d. d.e#Z%G d/d0 d0e#Z&G d1d2 d2e#Z'G d3d4 d4e#Z(G d5d6 d6e#Z)G d7d8 d8e#Z*G d9d: d:eZ+G d;d< d<eZ,G d=d> d>eZ-G d?d@ d@eZ.G dAdB dBeZ/G dCdD dDe/Z0G dEdF dFe/Z1G dGdH dHe/Z2G dIdJ dJeZ3G dKdL dLeZ4G dMdN dNeZ5G dOdP dPeZ6G dQdR dReZ7G dSdT dTeZ8G dUdV dVeZ9G dWdX dXeZ:G dYdZ dZeZ;G d[d\ d\eZ<G d]d^ d^eZ=G d_d` d`eZ>G dadb dbeZ?G dcdd ddeZ@G dedf dfeZAG dgdh dheZBG didj djeZCG dkdl dleZDG dmdn dneZEG dodp dpeZFG dqdr dreZGG dsdt dteGZHG dudv dveGZIG dwdx dxeGZJG dydz dzeGZKG d{d| d|eZLG d}d~ d~eZMG dd deZNG dd deZOG dd deZPG dd deZQG dd deZRG dd deZSG dd deZTG dd deZUG dd deZVG dd deZWG dd deZXG dd deZYG dd deZZG dd deZ[G dd deZ\G dd deZ]G dd deZ^G dd deZ_G dd deZ`G dd deZaG dd deZbG dd deZcG dd deZdG dd deZeG dd deZfG dd deZgG dd deZhG dd deZiG dd deZjG dd deZkG dd deZlG dd deZmG dd deZnG dd deZoG ddĄ deZpG ddƄ deZqG ddȄ deZrG ddʄ deZsG dd̄ deZtG dd΄ deZuG ddЄ deZvG dd҄ deZwdS )    )Decimal)Path)TYPE_CHECKINGAnyCallableSequenceSetTupleTypeUnion)display_as_type)
DictStrAny)]PydanticTypeErrorPydanticValueErrorConfigErrorMissingError
ExtraErrorNoneIsNotAllowedErrorNoneIsAllowedErrorWrongConstantErrorNotNoneError	BoolError
BytesError	DictError
EmailErrorUrlErrorUrlSchemeErrorUrlSchemePermittedErrorUrlUserInfoErrorUrlHostErrorUrlHostTldErrorUrlPortErrorUrlExtraError	EnumErrorIntEnumErrorEnumMemberErrorIntegerError
FloatError	PathErrorPathNotExistsErrorPathNotAFileErrorPathNotADirectoryErrorPyObjectErrorSequenceError	ListErrorSetErrorFrozenSetError
TupleErrorTupleLengthErrorListMinLengthErrorListMaxLengthErrorListUniqueItemsErrorSetMinLengthErrorSetMaxLengthErrorFrozenSetMinLengthErrorFrozenSetMaxLengthErrorAnyStrMinLengthErrorAnyStrMaxLengthErrorStrErrorStrRegexErrorNumberNotGtErrorNumberNotGeErrorNumberNotLtErrorNumberNotLeErrorNumberNotMultipleErrorDecimalErrorDecimalIsNotFiniteErrorDecimalMaxDigitsErrorDecimalMaxPlacesErrorDecimalWholeDigitsErrorDateTimeError	DateErrorDateNotInThePastErrorDateNotInTheFutureError	TimeErrorDurationErrorHashableError	UUIDErrorUUIDVersionErrorArbitraryTypeError
ClassErrorSubclassError	JsonErrorJsonTypeErrorPatternErrorDataclassTypeErrorCallableErrorIPvAnyAddressErrorIPvAnyInterfaceErrorIPvAnyNetworkErrorIPv4AddressErrorIPv6AddressErrorIPv4NetworkErrorIPv6NetworkErrorIPv4InterfaceErrorIPv6InterfaceError
ColorErrorStrictBoolErrorNotDigitErrorLuhnValidationErrorInvalidLengthForBrandInvalidByteSizeInvalidByteSizeUnitMissingDiscriminatorInvalidDiscriminatorclsPydanticErrorMixinctxr   returnc                 C   s   | di |S )a  
    For built-in exceptions like ValueError or TypeError, we need to implement
    __reduce__ to override the default behaviour (instead of __getstate__/__setstate__)
    By default pickle protocol 2 calls `cls.__new__(cls, *args)`.
    Since we only use kwargs, we need a little constructor to change that.
    Note: the callable can't be a lambda as pickle looks in the namespace to find it
    N ro   )rk   rm   ro   ro   J/var/www/html/zoom/venv/lib/python3.10/site-packages/pydantic/v1/errors.py
cls_kwargsl   s   rq   c                   @   sd   e Zd ZU eed< eed< deddfddZdefdd	Zdee	d
 ee
d  df f fddZdS )rl   codemsg_templaterm   rn   Nc                 K   s
   || _ d S N)__dict__)selfrm   ro   ro   rp   __init__{   s   
zPydanticErrorMixin.__init__c                 C   s   | j jdi | jS )Nro   )rs   formatru   rv   ro   ro   rp   __str__~      zPydanticErrorMixin.__str__).rl   r   c                 C   s   t | j| jffS rt   )rq   	__class__ru   ry   ro   ro   rp   
__reduce__   s   zPydanticErrorMixin.__reduce__)__name__
__module____qualname__str__annotations__r   rw   rz   r	   r   r
   r}   ro   ro   ro   rp   rl   w   s   
 *c                   @      e Zd ZdS )r   Nr~   r   r   ro   ro   ro   rp   r          r   c                   @   r   )r   Nr   ro   ro   ro   rp   r      r   r   c                   @   r   )r   Nr   ro   ro   ro   rp   r      r   r   c                   @      e Zd ZdZdS )r   zfield requiredNr~   r   r   rs   ro   ro   ro   rp   r          r   c                   @   r   )r   zextra fields not permittedNr   ro   ro   ro   rp   r      r   r   c                   @      e Zd ZdZdZdS )r   znone.not_allowedznone is not an allowed valueNr~   r   r   rr   rs   ro   ro   ro   rp   r          r   c                   @   r   )r   znone.allowedzvalue is not noneNr   ro   ro   ro   rp   r      r   r   c                   @      e Zd ZdZdefddZdS )r   constrn   c                 C       d dd | jD }d| S )N, c                 s   s    | ]}t |V  qd S rt   )repr.0vro   ro   rp   	<genexpr>   s    z-WrongConstantError.__str__.<locals>.<genexpr>zunexpected value; permitted: )join	permittedrv   r   ro   ro   rp   rz         
zWrongConstantError.__str__Nr~   r   r   rr   r   rz   ro   ro   ro   rp   r          r   c                   @   r   )r   not_nonezvalue is not NoneNr   ro   ro   ro   rp   r      r   r   c                   @   r   )r   z&value could not be parsed to a booleanNr   ro   ro   ro   rp   r      r   r   c                   @   r   )r   zbyte type expectedNr   ro   ro   ro   rp   r      r   r   c                   @   r   )r   zvalue is not a valid dictNr   ro   ro   ro   rp   r      r   r   c                   @   r   )r   z"value is not a valid email addressNr   ro   ro   ro   rp   r      r   r   c                   @   r   )r   urlN)r~   r   r   rr   ro   ro   ro   rp   r      r   r   c                   @   r   )r   
url.schemezinvalid or missing URL schemeNr   ro   ro   ro   rp   r      r   r   c                       s.   e Zd ZdZdZdee f fddZ  ZS )r   r   zURL scheme not permittedallowed_schemesc                       t  j|d d S )N)r   superrw   )rv   r   r|   ro   rp   rw         z UrlSchemePermittedError.__init__)	r~   r   r   rr   rs   r   r   rw   __classcell__ro   ro   r   rp   r          r   c                   @   r   )r   zurl.userinfoz$userinfo required in URL but missingNr   ro   ro   ro   rp   r      r   r   c                   @   r   )r   url.hostzURL host invalidNr   ro   ro   ro   rp   r      r   r   c                   @   r   )r    r   z+URL host invalid, top level domain requiredNr   ro   ro   ro   rp   r       r   r    c                   @   r   )r!   zurl.portz*URL port invalid, port cannot exceed 65535Nr   ro   ro   ro   rp   r!      r   r!   c                   @   r   )r"   z	url.extraz>URL invalid, extra characters found after valid URL: {extra!r}Nr   ro   ro   ro   rp   r"      r   r"   c                   @   r   )r%   enumrn   c                 C   r   )Nr   c                 s   s    | ]}t |jV  qd S rt   )r   valuer   ro   ro   rp   r      s    z*EnumMemberError.__str__.<locals>.<genexpr>z4value is not a valid enumeration member; permitted: )r   enum_valuesr   ro   ro   rp   rz      r   zEnumMemberError.__str__Nr   ro   ro   ro   rp   r%      r   r%   c                   @   r   )r&   zvalue is not a valid integerNr   ro   ro   ro   rp   r&      r   r&   c                   @   r   )r'   zvalue is not a valid floatNr   ro   ro   ro   rp   r'      r   r'   c                   @   r   )r(   zvalue is not a valid pathNr   ro   ro   ro   rp   r(      r   r(   c                       s&   e Zd Zdeddf fddZ  ZS )_PathValueErrorpathrn   Nc                      t  jt|d d S )N)r   )r   rw   r   )rv   r   r   ro   rp   rw         z_PathValueError.__init__)r~   r   r   r   rw   r   ro   ro   r   rp   r      s    r   c                   @   r   )r)   zpath.not_existsz1file or directory at path "{path}" does not existNr   ro   ro   ro   rp   r)     r   r)   c                   @   r   )r*   zpath.not_a_filez&path "{path}" does not point to a fileNr   ro   ro   ro   rp   r*     r   r*   c                   @   r   )r+   zpath.not_a_directoryz+path "{path}" does not point to a directoryNr   ro   ro   ro   rp   r+     r   r+   c                   @   r   )r,   zOensure this value contains valid import path or valid callable: {error_message}Nr   ro   ro   ro   rp   r,     r   r,   c                   @   r   )r-   zvalue is not a valid sequenceNr   ro   ro   ro   rp   r-     r   r-   c                   @   r   )IterableErrorzvalue is not a valid iterableNr   ro   ro   ro   rp   r     r   r   c                   @   r   )r.   zvalue is not a valid listNr   ro   ro   ro   rp   r.     r   r.   c                   @   r   )r/   zvalue is not a valid setNr   ro   ro   ro   rp   r/   "  r   r/   c                   @   r   )r0   zvalue is not a valid frozensetNr   ro   ro   ro   rp   r0   &  r   r0   c                   @   r   )
DequeErrorzvalue is not a valid dequeNr   ro   ro   ro   rp   r   *  r   r   c                   @   r   )r1   zvalue is not a valid tupleNr   ro   ro   ro   rp   r1   .  r   r1   c                       s2   e Zd ZdZdZdededdf fddZ  ZS )	r2   ztuple.lengthz>wrong tuple length {actual_length}, expected {expected_length}actual_lengthexpected_lengthrn   Nc                   s   t  j||d d S )N)r   r   r   )rv   r   r   r   ro   rp   rw   6  r{   zTupleLengthError.__init__r~   r   r   rr   rs   intrw   r   ro   ro   r   rp   r2   2      "r2   c                       .   e Zd ZdZdZdeddf fddZ  ZS )r3   zlist.min_items2ensure this value has at least {limit_value} itemslimit_valuern   Nc                   r   N)r   r   rv   r   r   ro   rp   rw   >  r   zListMinLengthError.__init__r   ro   ro   r   rp   r3   :  r   r3   c                       r   )r4   zlist.max_items1ensure this value has at most {limit_value} itemsr   rn   Nc                   r   r   r   r   r   ro   rp   rw   F  r   zListMaxLengthError.__init__r   ro   ro   r   rp   r4   B  r   r4   c                   @   r   )r5   zlist.unique_itemszthe list has duplicated itemsNr   ro   ro   ro   rp   r5   J  r   r5   c                       r   )r6   zset.min_itemsr   r   rn   Nc                   r   r   r   r   r   ro   rp   rw   S  r   zSetMinLengthError.__init__r   ro   ro   r   rp   r6   O  r   r6   c                       r   )r7   zset.max_itemsr   r   rn   Nc                   r   r   r   r   r   ro   rp   rw   [  r   zSetMaxLengthError.__init__r   ro   ro   r   rp   r7   W  r   r7   c                       r   )r8   zfrozenset.min_itemsr   r   rn   Nc                   r   r   r   r   r   ro   rp   rw   c  r   z FrozenSetMinLengthError.__init__r   ro   ro   r   rp   r8   _  r   r8   c                       r   )r9   zfrozenset.max_itemsr   r   rn   Nc                   r   r   r   r   r   ro   rp   rw   k  r   z FrozenSetMaxLengthError.__init__r   ro   ro   r   rp   r9   g  r   r9   c                       r   )r:   zany_str.min_lengthz7ensure this value has at least {limit_value} charactersr   rn   Nc                   r   r   r   r   r   ro   rp   rw   s  r   zAnyStrMinLengthError.__init__r   ro   ro   r   rp   r:   o  r   r:   c                       r   )r;   zany_str.max_lengthz6ensure this value has at most {limit_value} charactersr   rn   Nc                   r   r   r   r   r   ro   rp   rw   {  r   zAnyStrMaxLengthError.__init__r   ro   ro   r   rp   r;   w  r   r;   c                   @   r   )r<   zstr type expectedNr   ro   ro   ro   rp   r<     r   r<   c                       r   )r=   z	str.regexz'string does not match regex "{pattern}"patternrn   Nc                   r   )N)r   r   )rv   r   r   ro   rp   rw     r   zStrRegexError.__init__)r~   r   r   rr   rs   r   rw   r   ro   ro   r   rp   r=     r   r=   c                       s0   e Zd Zdeeeef ddf fddZ  ZS )_NumberBoundErrorr   rn   Nc                   r   r   r   r   r   ro   rp   rw     r   z_NumberBoundError.__init__)	r~   r   r   r   r   floatr   rw   r   ro   ro   r   rp   r     s    (r   c                   @   r   )r>   znumber.not_gtz/ensure this value is greater than {limit_value}Nr   ro   ro   ro   rp   r>     r   r>   c                   @   r   )r?   znumber.not_gez;ensure this value is greater than or equal to {limit_value}Nr   ro   ro   ro   rp   r?     r   r?   c                   @   r   )r@   znumber.not_ltz,ensure this value is less than {limit_value}Nr   ro   ro   ro   rp   r@     r   r@   c                   @   r   )rA   znumber.not_lez8ensure this value is less than or equal to {limit_value}Nr   ro   ro   ro   rp   rA     r   rA   c                   @   r   )NumberNotFiniteErrorznumber.not_finite_numberz$ensure this value is a finite numberNr   ro   ro   ro   rp   r     r   r   c                       s8   e Zd ZdZdZdeeeef ddf fddZ	  Z
S )rB   znumber.not_multiplez0ensure this value is a multiple of {multiple_of}multiple_ofrn   Nc                   r   )N)r   r   )rv   r   r   ro   rp   rw     r   zNumberNotMultipleError.__init__)r~   r   r   rr   rs   r   r   r   r   rw   r   ro   ro   r   rp   rB     s    (rB   c                   @   r   )rC   value is not a valid decimalNr   ro   ro   ro   rp   rC     r   rC   c                   @   r   )rD   zdecimal.not_finiter   Nr   ro   ro   ro   rp   rD     r   rD   c                       r   )rE   zdecimal.max_digitsz?ensure that there are no more than {max_digits} digits in total
max_digitsrn   Nc                   r   )N)r   r   )rv   r   r   ro   rp   rw     r   zDecimalMaxDigitsError.__init__r   ro   ro   r   rp   rE     r   rE   c                       r   )rF   zdecimal.max_placeszBensure that there are no more than {decimal_places} decimal placesdecimal_placesrn   Nc                   r   )N)r   r   )rv   r   r   ro   rp   rw     r   zDecimalMaxPlacesError.__init__r   ro   ro   r   rp   rF     r   rF   c                       r   )rG   zdecimal.whole_digitszQensure that there are no more than {whole_digits} digits before the decimal pointwhole_digitsrn   Nc                   r   )N)r   r   )rv   r   r   ro   rp   rw     r   z DecimalWholeDigitsError.__init__r   ro   ro   r   rp   rG     r   rG   c                   @   r   )rH   zinvalid datetime formatNr   ro   ro   ro   rp   rH     r   rH   c                   @   r   )rI   zinvalid date formatNr   ro   ro   ro   rp   rI     r   rI   c                   @   r   )rJ   zdate.not_in_the_pastzdate is not in the pastNr   ro   ro   ro   rp   rJ     r   rJ   c                   @   r   )rK   zdate.not_in_the_futurezdate is not in the futureNr   ro   ro   ro   rp   rK     r   rK   c                   @   r   )rL   zinvalid time formatNr   ro   ro   ro   rp   rL     r   rL   c                   @   r   )rM   zinvalid duration formatNr   ro   ro   ro   rp   rM     r   rM   c                   @   r   )rN   zvalue is not a valid hashableNr   ro   ro   ro   rp   rN     r   rN   c                   @   r   )rO   zvalue is not a valid uuidNr   ro   ro   ro   rp   rO     r   rO   c                       r   )rP   zuuid.versionz(uuid version {required_version} expectedrequired_versionrn   Nc                   r   )N)r   r   )rv   r   r   ro   rp   rw     r   zUUIDVersionError.__init__r   ro   ro   r   rp   rP     r   rP   c                       2   e Zd ZdZdZdee ddf fddZ  ZS )rQ   arbitrary_typez.instance of {expected_arbitrary_type} expectedexpected_arbitrary_typern   Nc                   r   )N)r   r   rw   r   )rv   r   r   ro   rp   rw      r   zArbitraryTypeError.__init__	r~   r   r   rr   rs   r
   r   rw   r   ro   ro   r   rp   rQ     r   rQ   c                   @   r   )rR   classza class is expectedNr   ro   ro   ro   rp   rR     r   rR   c                       r   )rS   subclassz%subclass of {expected_class} expectedexpected_classrn   Nc                   r   )N)r   r   )rv   r   r   ro   rp   rw     r   zSubclassError.__init__r   ro   ro   r   rp   rS   	  r   rS   c                   @   r   )rT   zInvalid JSONNr   ro   ro   ro   rp   rT     r   rT   c                   @   r   )rU   jsonz+JSON object must be str, bytes or bytearrayNr   ro   ro   ro   rp   rU     r   rU   c                   @   r   )rV   regex_patternzInvalid regular expressionNr   ro   ro   ro   rp   rV     r   rV   c                   @   r   )rW   	dataclassz0instance of {class_name}, tuple or dict expectedNr   ro   ro   ro   rp   rW     r   rW   c                   @   r   )rX   z{value} is not callableNr   ro   ro   ro   rp   rX   $  r   rX   c                   @   r   )r#   enum_instancez${value} is not a valid Enum instanceNr   ro   ro   ro   rp   r#   (  r   r#   c                   @   r   )r$   int_enum_instancez'{value} is not a valid IntEnum instanceNr   ro   ro   ro   rp   r$   -  r   r$   c                   @   r   )rY   z)value is not a valid IPv4 or IPv6 addressNr   ro   ro   ro   rp   rY   2  r   rY   c                   @   r   )rZ   z+value is not a valid IPv4 or IPv6 interfaceNr   ro   ro   ro   rp   rZ   6  r   rZ   c                   @   r   )r[   z)value is not a valid IPv4 or IPv6 networkNr   ro   ro   ro   rp   r[   :  r   r[   c                   @   r   )r\   z!value is not a valid IPv4 addressNr   ro   ro   ro   rp   r\   >  r   r\   c                   @   r   )r]   z!value is not a valid IPv6 addressNr   ro   ro   ro   rp   r]   B  r   r]   c                   @   r   )r^   z!value is not a valid IPv4 networkNr   ro   ro   ro   rp   r^   F  r   r^   c                   @   r   )r_   z!value is not a valid IPv6 networkNr   ro   ro   ro   rp   r_   J  r   r_   c                   @   r   )r`   z#value is not a valid IPv4 interfaceNr   ro   ro   ro   rp   r`   N  r   r`   c                   @   r   )ra   z#value is not a valid IPv6 interfaceNr   ro   ro   ro   rp   ra   R  r   ra   c                   @   r   )rb   z$value is not a valid color: {reason}Nr   ro   ro   ro   rp   rb   V  r   rb   c                   @   r   )rc   zvalue is not a valid booleanNr   ro   ro   ro   rp   rc   Z  r   rc   c                   @   r   )rd   zpayment_card_number.digitszcard number is not all digitsNr   ro   ro   ro   rp   rd   ^  r   rd   c                   @   r   )re   zpayment_card_number.luhn_checkzcard number is not luhn validNr   ro   ro   ro   rp   re   c  r   re   c                   @   r   )rf   z,payment_card_number.invalid_length_for_brandz3Length for a {brand} card must be {required_length}Nr   ro   ro   ro   rp   rf   h  r   rf   c                   @   r   )rg   z/could not parse value and unit from byte stringNr   ro   ro   ro   rp   rg   m  r   rg   c                   @   r   )rh   z%could not interpret byte unit: {unit}Nr   ro   ro   ro   rp   rh   q  r   rh   c                   @   r   )ri   z)discriminated_union.missing_discriminatorz7Discriminator {discriminator_key!r} is missing in valueNr   ro   ro   ro   rp   ri   u  r   ri   c                       s:   e Zd ZdZdZdededee ddf fdd	Z  Z	S )
rj   z)discriminated_union.invalid_discriminatorzuNo match for discriminator {discriminator_key!r} and value {discriminator_value!r} (allowed values: {allowed_values})discriminator_keydiscriminator_valueallowed_valuesrn   Nc                   s"   t  j||dtt|d d S )Nr   )r   r   r   )r   rw   r   mapr   )rv   r   r   r   r   ro   rp   rw     s
   
zInvalidDiscriminator.__init__)
r~   r   r   rr   rs   r   r   r   rw   r   ro   ro   r   rp   rj   z  s
    *rj   N)xdecimalr   pathlibr   typingr   r   r   r   r   r	   r
   r   pydantic.v1.typingr   r   __all__rq   rl   	TypeErrorr   
ValueErrorr   RuntimeErrorr   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/   r0   r   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r   r>   r?   r@   rA   r   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   r#   r$   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   ro   ro   ro   rp   <module>   s    (a