� F�gp���ddlZddlZddlZddlZddlmZmZddlmZddl m Z m Z ddl m Z mZmZmZmZmZmZmZmZmZmZmZddlmZddlmZdd lmZe rdd lm Z dd l!m"Z"dd l#m$Z$m%Z%dd l&m'Z'n dxZ$xZ%xZ Z'dZ"Gd�de��Z(Gd�de��Z)Gd�de��Z*Gd�de��Z+Gd�de��Z,e ree e-Z.neZ.edge/fZ0Gd�dee.��Z1Gd�de��Z2Gd�de��Z3dS)�N)�ABC�abstractmethod)�Sized)� BaseCookie�Morsel) � TYPE_CHECKING�Any� Awaitable�Callable�Dict� Generator�Iterable�List�Optional�Tuple� TypedDict�Union)� CIMultiDict)�URL�)� LooseCookies)� Application)� HTTPException)� BaseRequest�Request)�StreamResponsec�j�eZdZd d�Zdeddfd�Zedefd���Zd d�Z e de dd fd ���Z dS) �AbstractRouter�returnNc��d|_dS)NF��_frozen��selfs �[/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/aiohttp/abc.py�__init__zAbstractRouter.__init__'s ���� � � ��appc��dS)z�Post init stage. Not an abstract method for sake of backward compatibility, but if the router wants to be aware of the application it can override this. N��r$r(s r%� post_initzAbstractRouter.post_init*����r'c��|jS�Nr!r#s r%�frozenzAbstractRouter.frozen2s ���|�r'c��d|_dS)zFreeze router.TNr!r#s r%�freezezAbstractRouter.freeze6s ���� � � r'�request�AbstractMatchInfoc�� K�dS)z#Return MATCH_INFO for given requestNr*�r$r3s r%�resolvezAbstractRouter.resolve:� �����r'�rN) �__name__� __module__� __qualname__r&rr,�property�boolr0r2rrr7r*r'r%rr&s����������� �[� �T� � � � ��������X�������2�W�2�1D�2�2�2��^�2�2�2r'rc��eZdZdZeedeegee ffd�����Z eedeegee e ffd�����Z eede e fd�����Zedeeeffd���Zeedeedffd�����Zed edd fd ���Zed d ���Zd S)r4r*rc��dS)zExecute matched request handlerNr*r#s r%�handlerzAbstractMatchInfo.handlerCr-r'c��dS)z*Expect handler for 100-continue processingNr*r#s r%�expect_handlerz AbstractMatchInfo.expect_handlerHr-r'c��dS)z<HTTPException instance raised on router's resolving, or NoneNr*r#s r%�http_exceptionz AbstractMatchInfo.http_exceptionOr-r'c��dS)z;Return a dict with additional info useful for introspectionNr*r#s r%�get_infozAbstractMatchInfo.get_infoTr-r'.c��dS)z\Stack of nested applications. Top level application is left-most element. Nr*r#s r%�appszAbstractMatchInfo.appsXr-r'r(Nc��dS)z)Add application to the nested apps stack.Nr*r+s r%�add_appzAbstractMatchInfo.add_appar-r'c��dS)z�Freeze the match info. The method is called after route resolution. After the call .add_app() is forbidden. Nr*r#s r%r2zAbstractMatchInfo.freezeer-r'r9)r:r;r<� __slots__r=rr rr rrArrCrrEr �strr rGrrrIrKr2r*r'r%r4r4?s��������I� ��.��7�)�Y�~�-F�"F�G�.�.�.��^��X�.���9� �7�)�Y�x��'?�@�@� A�9�9�9��^��X�9� ��K��� 7�K�K�K��^��X�K��J�$�s�C�x�.�J�J�J��^�J��� �e�K��,�-� � � ��^��X� ��8�;�8�4�8�8�8��^�8�� � � ��^� � � r'r4c�l�eZdZdZdeddfd�Zedefd���Zede e de ffd���Z dS)� AbstractViewzAbstract class based view.r3rNc��||_dSr/��_requestr6s r%r&zAbstractView.__init__ss ���� � � r'c��|jS)zRequest instance.rRr#s r%r3zAbstractView.requestvs ���}�r'c��dS)zExecute the view handler.Nr*r#s r%� __await__zAbstractView.__await__{r-r') r:r;r<�__doc__rr&r=r3rr r rrVr*r'r%rPrPps�������$�$� �� �D� � � � ��������X���(�9�S�$��%>�?�(�(�(��^�(�(�(r'rPc�P�eZdZUdZeed<eed<eed<eed<eed<eed<dS) � ResolveResulta�Resolve result. This is the result returned from an AbstractResolver's resolve method. :param hostname: The hostname that was provided. :param host: The IP address that was resolved. :param port: The port that was resolved. :param family: The address family that was resolved. :param proto: The protocol that was resolved. :param flags: The flags that were resolved. �hostname�host�port�family�proto�flagsN)r:r;r<rWrN�__annotations__�intr*r'r%rYrY�sR������� � ��M�M�M� �I�I�I� �I�I�I� �K�K�K� �J�J�J� �J�J�J�J�Jr'rYc �x�eZdZdZedejfdededej de e fd���Z ed d ���Z dS) �AbstractResolverzAbstract DNS resolver.rr[r\r]rc�� K�dS)z$Return IP address for given hostnameNr*)r$r[r\r]s r%r7zAbstractResolver.resolve�r8r'Nc�� K�dS)zRelease resolverNr*r#s r%�closezAbstractResolver.close�r8r'r9)r:r;r<rWr�socket�AF_INETrNra� AddressFamilyrrYr7rfr*r'r%rcrc�s������� � ��%&�v�~�3�3��3�"�3�06�0D�3� �m� �3�3�3��^�3� �����^���r'rcz Morsel[str]c��eZdZdZdd�deejddfd�Zee de fd�����Z e ddee ddfd ���Z e d eddfd ���Ze e��fd ed eddfd���Ze deddfd���ZdS)�AbstractCookieJarzAbstract Cookie Jar.N)�looprlrc�:�|ptj��|_dSr/)�asyncio�get_running_loop�_loop)r$rls r%r&zAbstractCookieJar.__init__�s���7�W�5�7�7�� � � r'c��dS)z(Return True if cookies should be quoted.Nr*r#s r%� quote_cookiezAbstractCookieJar.quote_cookie�r-r'� predicatec��dS)z,Clear all cookies if no predicate is passed.Nr*)r$rss r%�clearzAbstractCookieJar.clear�r-r'�domainc��dS)z0Clear all cookies for domain and all subdomains.Nr*)r$rvs r%� clear_domainzAbstractCookieJar.clear_domain�r-r'�cookies� response_urlc��dS)zUpdate cookies.Nr*)r$ryrzs r%�update_cookiesz AbstractCookieJar.update_cookies�r-r'� request_urlzBaseCookie[str]c��dS)z6Return the jar's cookies filtered by their attributes.Nr*)r$r}s r%�filter_cookiesz AbstractCookieJar.filter_cookies�r-r'r/)r:r;r<rWrrn�AbstractEventLoopr&r=rr>rr�ClearCookiePredicaterurNrxrrr|rr*r'r%rkrk�sd��������FJ�8�8�8���)B� C�8�t�8�8�8�8���7�d�7�7�7��^��X�7��;�;�x�(<�=�;��;�;�;��^�;��?�3�?�4�?�?�?��^�?��HK������l��#��RV�����^���E�#�E�2C�E�E�E��^�E�E�Er'rkc�&�eZdZUdZdZeed<dZeed<dZe eed<e de e e efddfd ���Ze dde ddfd ���Ze dd ���Ze d ejfdededdfd���Ze dd���Ze deddddfd���ZdS)�AbstractStreamWriterzAbstract stream writer.r� buffer_size� output_size�length�chunkrNc�� K�dS)zWrite chunk into stream.Nr*�r$r�s r%�writezAbstractStreamWriter.write�r8r'r'c�� K�dS)zWrite last chunk.Nr*r�s r%� write_eofzAbstractStreamWriter.write_eof�r8r'c�� K�dS)zFlush the write buffer.Nr*r#s r%�drainzAbstractStreamWriter.drain�r8r'�deflate�encoding�strategyc��dS)zEnable HTTP body compressionNr*)r$r�r�s r%�enable_compressionz'AbstractStreamWriter.enable_compression�r-r'c��dS)zEnable HTTP chunked modeNr*r#s r%�enable_chunkingz$AbstractStreamWriter.enable_chunking�r-r'� status_line�headerszCIMultiDict[str]c�� K�dS)zWrite HTTP headersNr*)r$r�r�s r%� write_headersz"AbstractStreamWriter.write_headers�r8r')r'r9)r:r;r<rWr�rar`r�r�rrr�bytes� bytearray� memoryviewr�r�r��zlib�Z_DEFAULT_STRATEGYrNr�r�r�r*r'r%r�r��sx�������!�!��K������K������F�H�S�M�����'��u�i��'C�!D�'��'�'�'��^�'�� � �U� �T� � � ��^� ��&�&�&��^�&��'��9P�+�+��+�36�+� �+�+�+��^�+� �'�'�'��^�'��!��!�);�!� �!�!�!��^�!�!�!r'r�c �x�eZdZdZdZdejdeddfd�Ze de d e d e ddfd ���Z edefd ���ZdS) �AbstractAccessLoggerzAbstract writer to access log.��logger� log_formatr�r�rNc�"�||_||_dSr/r�)r$r�r�s r%r&zAbstractAccessLogger.__init__�s���� �$����r'r3�response�timec��dS)zEmit log to logger.Nr*)r$r3r�r�s r%�logzAbstractAccessLogger.log�r-r'c��dS)zCheck if logger is enabled.Tr*r#s r%�enabledzAbstractAccessLogger.enabled�s ���tr')r:r;r<rWrM�logging�LoggerrNr&rrr�floatr�r=r>r�r*r'r%r�r��s�������(�(�(�I�%�w�~�%�3�%�4�%�%�%�%��"�;�"�.�"��"�RV�"�"�"��^�"��������X���r'r�)4rnr�rgr��abcrr�collections.abcr� http.cookiesrr�typingrr r r r r rrrrrr� multidictr�yarlr�typedefsr�web_appr�web_exceptionsr� web_requestrr� web_responserrr4rPrYrcrN� IterableBaser>r�rkr�r�r*r'r%�<module>r�s:���������� � � � � � � � �#�#�#�#�#�#�#�#�!�!�!�!�!�!�+�+�+�+�+�+�+�+� � � � � � � � � � � � � � � � � � � � � � � � � � � � �"�!�!�!�!�!�������"�"�"�"�"�"���$�$�$�$�$�$�-�-�-�-�-�-�1�1�1�1�1�1�1�1�,�,�,�,�,�,�,�;?�?�K�?�'�?�K�.��M�2�2�2�2�2�S�2�2�2�2. �. �. �. �. ��. �. �. �b (� (� (� (� (�3� (� (� (� �����I����, � � � � �s� � � ����F�3�K�(�L�L��L� ���� 5�6��E�E�E�E�E��|�E�E�E�8!!�!!�!!�!!�!!�3�!!�!!�!!�H�����3�����r'
Memory