ó
    |ñ:iø  ã                  óÆ   • S SK Jr  S SKrS SKrS SKrS SKrS SKrS SKrS SK	J
r
  S SKJr  \R                  (       a  S SKJr  SSKJr   " S S	5      rSS
 jr " S S\5      rg)é    )ÚannotationsN)Údate)Ú	http_date)ÚResponseé   )ÚAppc                  ój   • \ rS rSrSrSS jrSS jrSS jrSS jrSS jr	      SS jr
SS	 jrS
rg)ÚJSONProvideré   a™  A standard set of JSON operations for an application. Subclasses
of this can be used to customize JSON behavior or use different
JSON libraries.

To implement a provider for a specific library, subclass this base
class and implement at least :meth:`dumps` and :meth:`loads`. All
other methods have default implementations.

To use a different provider, either subclass ``Flask`` and set
:attr:`~flask.Flask.json_provider_class` to a provider class, or set
:attr:`app.json <flask.Flask.json>` to an instance of the class.

:param app: An application instance. This will be stored as a
    :class:`weakref.proxy` on the :attr:`_app` attribute.

.. versionadded:: 2.2
c                ó:   • [         R                  " U5      U l        g )N)ÚweakrefÚproxyÚ_app)ÚselfÚapps     ÚV/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/flask/json/provider.pyÚ__init__ÚJSONProvider.__init__&   s   € Ü Ÿš sÓ+ˆ�	ó    c                ó   • [         e)zySerialize data as JSON.

:param obj: The data to serialize.
:param kwargs: May be passed to the underlying JSON library.
©ÚNotImplementedError©r   ÚobjÚkwargss      r   ÚdumpsÚJSONProvider.dumps)   ó
   € ô "Ð!r   c                óH   • UR                  U R                  " U40 UD65        g)zìSerialize data as JSON and write to a file.

:param obj: The data to serialize.
:param fp: A file opened for writing text. Should use the UTF-8
    encoding to be valid JSON.
:param kwargs: May be passed to the underlying JSON library.
N)Úwriter   )r   r   Úfpr   s       r   ÚdumpÚJSONProvider.dump1   s   € ð 	�‰�—’˜CÑ* 6Ñ*Õ+r   c                ó   • [         e)zwDeserialize data as JSON.

:param s: Text or UTF-8 bytes.
:param kwargs: May be passed to the underlying JSON library.
r   ©r   Úsr   s      r   ÚloadsÚJSONProvider.loads;   r   r   c                óD   • U R                   " UR                  5       40 UD6$ )z£Deserialize data as JSON read from a file.

:param fp: A file opened for reading text or UTF-8 bytes.
:param kwargs: May be passed to the underlying JSON library.
)r'   Úread)r   r!   r   s      r   ÚloadÚJSONProvider.loadC   s   € ð �zŠz˜"Ÿ'™'›)Ñ. vÑ.Ð.r   c                ó�   • U(       a  U(       a  [        S5      eU(       d  U(       d  g [        U5      S:X  a  US   $ U=(       d    U$ )Nz9app.json.response() takes either args or kwargs, not bothé   r   )Ú	TypeErrorÚlen)r   Úargsr   s      r   Ú_prepare_response_objÚ"JSONProvider._prepare_response_objK   s;   € ö –FÜÐWÓXÐXæžFØäˆt‹9˜‹>Ø˜‘7ˆNà�~�vÐr   c                óv   • U R                  X5      nU R                  R                  U R                  U5      SS9$ )aØ  Serialize the given arguments as JSON, and return a
:class:`~flask.Response` object with the ``application/json``
mimetype.

The :func:`~flask.json.jsonify` function calls this method for
the current application.

Either positional or keyword arguments can be given, not both.
If no arguments are given, ``None`` is serialized.

:param args: A single value to serialize, or multiple values to
    treat as a list to serialize.
:param kwargs: Treat as a dict to serialize.
úapplication/json©Úmimetype)r2   r   Úresponse_classr   )r   r1   r   r   s       r   ÚresponseÚJSONProvider.responseY   s7   € ð ×(Ñ(¨Ó6ˆØ�y‰y×'Ñ'¨¯
©
°3«ÐBTÐ'ÐUÐUr   )r   N)r   r   ÚreturnÚNone©r   út.Anyr   r>   r;   Ústr)r   r>   r!   z	t.IO[str]r   r>   r;   r<   ©r&   zstr | bytesr   r>   r;   r>   )r!   zt.IO[t.AnyStr]r   r>   r;   r>   )r1   ztuple[t.Any, ...]r   zdict[str, t.Any]r;   r>   ©r1   r>   r   r>   r;   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r"   r'   r+   r2   r9   Ú__static_attributes__© r   r   r
   r
      sC   † ñô$,ô"ô,ô"ô/ðØ%ðØ/?ðà	ô÷Vr   r
   c                óÆ  • [        U [        5      (       a  [        U 5      $ [        U [        R                  [
        R                  45      (       a  [        U 5      $ [        (       a1  [        R                  " U 5      (       a  [        R                  " U 5      $ [        U S5      (       a  [        U R                  5       5      $ [        S[        U 5      R                   S35      e)NÚ__html__zObject of type z is not JSON serializable)Ú
isinstancer   r   ÚdecimalÚDecimalÚuuidÚUUIDr?   ÚdataclassesÚis_dataclassÚasdictÚhasattrrJ   r/   ÚtyperB   )Úos    r   Ú_defaultrV   l   s    € Ü�!”T×ÑÜ˜‹|Ðä�!”g—o‘o¤t§y¡yÐ1×2Ñ2Ü�1‹vˆç‚{”{×/Ò/°×2Ñ2Ü×!Ò! !Ó$Ð$äˆq�*×ÑÜ�1—:‘:“<Ó Ð ä
�o¤d¨1£g×&6Ñ&6Ð%7Ð7PÐQÓ
RÐRr   c                  óv   • \ rS rSr% Sr\" \5      rS\S'    Sr	 Sr
 SrS\S'    S	r SS
 jrSS jrSS jrSrg)ÚDefaultJSONProvideré|   a  Provide JSON operations using Python's built-in :mod:`json`
library. Serializes the following additional data types:

-   :class:`datetime.datetime` and :class:`datetime.date` are
    serialized to :rfc:`822` strings. This is the same as the HTTP
    date format.
-   :class:`uuid.UUID` is serialized to a string.
-   :class:`dataclasses.dataclass` is passed to
    :func:`dataclasses.asdict`.
-   :class:`~markupsafe.Markup` (or any object with a ``__html__``
    method) will call the ``__html__`` method to get a string.
zt.Callable[[t.Any], t.Any]ÚdefaultTNzbool | NoneÚcompactr5   c                óØ   • UR                  SU R                  5        UR                  SU R                  5        UR                  SU R                  5        [        R
                  " U40 UD6$ )a  Serialize data as JSON to a string.

Keyword arguments are passed to :func:`json.dumps`. Sets some
parameter defaults from the :attr:`default`,
:attr:`ensure_ascii`, and :attr:`sort_keys` attributes.

:param obj: The data to serialize.
:param kwargs: Passed to :func:`json.dumps`.
rZ   Úensure_asciiÚ	sort_keys)Ú
setdefaultrZ   r]   r^   Újsonr   r   s      r   r   ÚDefaultJSONProvider.dumps¦   sV   € ð 	×Ñ˜) T§\¡\Ô2Ø×Ñ˜.¨$×*;Ñ*;Ô<Ø×Ñ˜+ t§~¡~Ô6Ü�zŠz˜#Ñ( Ñ(Ð(r   c                ó0   • [         R                  " U40 UD6$ )z~Deserialize data as JSON from a string or bytes.

:param s: Text or UTF-8 bytes.
:param kwargs: Passed to :func:`json.loads`.
)r`   r'   r%   s      r   r'   ÚDefaultJSONProvider.loadsµ   s   € ô �zŠz˜!Ñ&˜vÑ&Ð&r   c                óP  • U R                  X5      n0 nU R                  c  U R                  R                  (       d  U R                  SL a  UR	                  SS5        OUR	                  SS5        U R                  R                  U R                  " U40 UD6 S3U R                  S9$ )a)  Serialize the given arguments as JSON, and return a
:class:`~flask.Response` object with it. The response mimetype
will be "application/json" and can be changed with
:attr:`mimetype`.

If :attr:`compact` is ``False`` or debug mode is enabled, the
output will be formatted to be easier to read.

Either positional or keyword arguments can be given, not both.
If no arguments are given, ``None`` is serialized.

:param args: A single value to serialize, or multiple values to
    treat as a list to serialize.
:param kwargs: Treat as a dict to serialize.
FÚindentr   Ú
separators)Ú,Ú:Ú
r6   )r2   r[   r   Údebugr_   r8   r   r7   )r   r1   r   r   Ú	dump_argss        r   r9   ÚDefaultJSONProvider.response½   s“   € ð  ×(Ñ(¨Ó6ˆØ&(ˆ	à�L‰LÑ  T§Y¡Y§_§_¸¿¹ÈÒ9NØ× Ñ  ¨1Õ-à× Ñ  ¨zÔ:à�y‰y×'Ñ'Ø�zŠz˜#Ñ+ Ñ+Ð,¨BÐ/¸$¿-¹-ð (ð 
ð 	
r   rH   r=   r@   rA   )rB   rC   rD   rE   rF   ÚstaticmethodrV   rZ   Ú__annotations__r]   r^   r[   r7   r   r'   r9   rG   rH   r   r   rX   rX   |   s`   ‡ ññ +7°xÓ*@€GÐ'Ó@ðð
 €Lðð
 €Iðð  €Gˆ[Óðð
 "€HØ/ô)ô'÷
r   rX   )rU   r>   r;   r>   )Ú
__future__r   rP   rL   r`   ÚtypingÚtrN   r   Údatetimer   Úwerkzeug.httpr   ÚTYPE_CHECKINGÚwerkzeug.sansio.responser   Ú
sansio.appr   r
   rV   rX   rH   r   r   Ú<module>rw      sP   ðÝ "ã Û Û Û Û Û Ý å #à‡?‡?Ý1å ÷VVñ VVôrSô [
˜,õ [
r   