Ë
    6•±j2  ã                  óÔ   — d dl mZ d dlZddlmZ ddlmZ ddlmZ  ej                  dej                  dej                  f   ¬	«      Z eg d
¢«      Z G d„ d«      Z G d„ de«      Zy)é    )ÚannotationsNé   )Útyping)Úcurrent_app)ÚrequestÚF.)Úbound)ÚgetÚpostÚheadÚoptionsÚdeleteÚputÚtraceÚpatchc                  ót   — e Zd ZU dZdZded<   dZded<   g Zded<   d	Zd
ed<   dd„Z	e
	 	 	 	 	 	 	 	 dd„«       Zy)ÚViewa  Subclass this class and override :meth:`dispatch_request` to
    create a generic class-based view. Call :meth:`as_view` to create a
    view function that creates an instance of the class with the given
    arguments and calls its ``dispatch_request`` method with any URL
    variables.

    See :doc:`views` for a detailed guide.

    .. code-block:: python

        class Hello(View):
            init_every_request = False

            def dispatch_request(self, name):
                return f"Hello, {name}!"

        app.add_url_rule(
            "/hello/<name>", view_func=Hello.as_view("hello")
        )

    Set :attr:`methods` on the class to change what methods the view
    accepts.

    Set :attr:`decorators` on the class to apply a list of decorators to
    the generated view function. Decorators applied to the class itself
    will not be applied to the generated view function!

    Set :attr:`init_every_request` to ``False`` for efficiency, unless
    you need to store request-global data on ``self``.
    Nz$t.ClassVar[t.Collection[str] | None]Úmethodszt.ClassVar[bool | None]Úprovide_automatic_optionsz(t.ClassVar[list[t.Callable[..., t.Any]]]Ú
decoratorsTzt.ClassVar[bool]Úinit_every_requestc                ó   — t        «       ‚)z·The actual view function behavior. Subclasses must override
        this and return a valid response. Any variables from the URL
        rule are passed as keyword arguments.
        )ÚNotImplementedError)Úselfs    úV/var/www/passport.vulcan-creative.com/venv/lib/python3.12/site-packages/flask/views.pyÚdispatch_requestzView.dispatch_requestN   s   € ô
 "Ó#Ð#ó    c                ór  ‡‡‡‡— | j                   r	dˆˆˆfd„Šn | ‰i ‰¤ŽŠdˆfd„Š| j                  r1|‰_        | j                  ‰_        | j                  D ]
  } |‰«      ŠŒ | ‰_        |‰_        | j
                  ‰_        | j                  ‰_        | j                  ‰_        | j                  ‰_        ‰S )af  Convert the class into a view function that can be registered
        for a route.

        By default, the generated view will create a new instance of the
        view class for every request and call its
        :meth:`dispatch_request` method. If the view class sets
        :attr:`init_every_request` to ``False``, the same instance will
        be used for every request.

        Except for ``name``, all other arguments passed to this method
        are forwarded to the view class ``__init__`` method.

        .. versionchanged:: 2.2
            Added the ``init_every_request`` class attribute.
        c                 ór   •—  ‰j                   ‰i ‰¤Ž} t        j                  |j                  «      di | ¤ŽS ©N© )Ú
view_classr   Úensure_syncr   )Úkwargsr   Ú
class_argsÚclass_kwargsÚviews     €€€r   r'   zView.as_view.<locals>.viewj   sB   ø€ Ø&�t—‘ØðØ#/ñ�ð F”{×.Ñ.¨t×/DÑ/DÓEÑOÈÑOÐOr   c                 óN   •—  t        j                  ‰j                  «      di | ¤ŽS r    )r   r#   r   )r$   r   s    €r   r'   zView.as_view.<locals>.views   s$   ø€ ØE”{×.Ñ.¨t×/DÑ/DÓEÑOÈÑOÐOr   ©r$   út.AnyÚreturnúft.ResponseReturnValue)r   r   Ú__name__Ú
__module__r"   Ú__doc__r   r   )ÚclsÚnamer%   r&   Ú	decoratorr   r'   s     `` @@r   Úas_viewzView.as_viewU   s¬   û€ ð& ×!Ò!÷Pð Pñ ˜
Ð3 lÑ3ˆDõPð �>Š>Ø ˆDŒMØ!Ÿn™nˆDŒOØ Ÿ^™^ò '�	Ù  “‘ð'ð ˆŒØˆŒØ—{‘{ˆŒØŸ.™.ˆŒØ—{‘{ˆŒØ),×)FÑ)FˆÔ&Øˆr   )r+   r,   )r1   Ústrr%   r*   r&   r*   r+   zft.RouteCallable)r-   r.   Ú__qualname__r/   r   Ú__annotations__r   r   r   r   Úclassmethodr3   r!   r   r   r   r      sw   … ñðD 59€GÐ1Ó8ð
 :>ÐÐ6Ó=ð <>€JÐ8Ó=ð ,0ÐÐ(Ó/ó$ð ð1Øð1Ø%*ð1Ø<Að1à	ò1ó ñ1r   r   c                  ó,   ‡ — e Zd ZdZdˆ fd„Zdd„Zˆ xZS )Ú
MethodViewaí  Dispatches request methods to the corresponding instance methods.
    For example, if you implement a ``get`` method, it will be used to
    handle ``GET`` requests.

    This can be useful for defining a REST API.

    :attr:`methods` is automatically set based on the methods defined on
    the class.

    See :doc:`views` for a detailed guide.

    .. code-block:: python

        class CounterAPI(MethodView):
            def get(self):
                return str(session.get("counter", 0))

            def post(self):
                session["counter"] = session.get("counter", 0) + 1
                return redirect(url_for("counter"))

        app.add_url_rule(
            "/counter", view_func=CounterAPI.as_view("counter")
        )
    c                óL  •— t        ‰| �  di |¤Ž d| j                  vr†t        «       }| j                  D ]+  }t        |dd «      sŒ|j                  |j                  «       Œ- t        D ].  }t        | |«      sŒ|j                  |j                  «       «       Œ0 |r|| _        y y y )Nr   r!   )ÚsuperÚ__init_subclass__Ú__dict__ÚsetÚ	__bases__ÚgetattrÚupdater   Úhttp_method_funcsÚhasattrÚaddÚupper)r0   r$   r   ÚbaseÚkeyÚ	__class__s        €r   r<   zMethodView.__init_subclass__¥   s˜   ø€ Ü‰Ñ!Ñ+ FÒ+à˜CŸL™LÑ(Ü“eˆGàŸ™ò 1�Ü˜4 ¨DÕ1Ø—N‘N 4§<¡<Õ0ð1ô )ò -�Ü˜3 Õ$Ø—K‘K §	¡	£Õ,ð-ñ Ø%�•ð ð )r   c                ó  — t        | t        j                  j                  «       d «      }|€ t        j                  dk(  rt        | dd «      }|€J dt        j                  ›�«       ‚ t	        j
                  |«      di |¤ŽS )NÚHEADr
   zUnimplemented method r!   )r@   r   ÚmethodÚlowerr   r#   )r   r$   Úmeths      r   r   zMethodView.dispatch_request¶   sv   € Ü�tœWŸ^™^×1Ñ1Ó3°TÓ:ˆð ˆ<œGŸN™N¨fÒ4Ü˜4 ¨Ó-ˆDàÐÐKÐ#8¼¿¹Ð8JÐ!KÓKÐØ,Œ{×&Ñ& tÓ,Ñ6¨vÑ6Ð6r   )r$   r*   r+   ÚNoner)   )r-   r.   r5   r/   r<   r   Ú__classcell__)rH   s   @r   r9   r9   Š   s   ø„ ñõ4&÷"	7r   r9   )Ú
__future__r   r   ÚtÚ ÚftÚglobalsr   r   ÚTypeVarÚCallableÚAnyr   Ú	frozensetrB   r   r9   r!   r   r   ú<module>rY      s^   ðÝ "ã å Ý  Ý à€A‡I�Iˆc˜Ÿ™ C¨¯© JÑ/Ô0€áÚIóÐ ÷
wñ wôt57�õ 57r   