ó
    	[hE  ã                   ó  • S SK r S SKJrJrJrJr  SSKJrJr  SSK	J
r
Jr  SSKJr  SSKJr  SSKJr  S	r\(       a  SS
KJr  \" S5      rS\S\S\\\4   4S jrS\S\4S jrSSS\S.S\S\S\S\\
   S\4
S jjrSSS\4S jrg)é    N)ÚTYPE_CHECKINGÚTupleÚTypeÚTypeVaré   )ÚHandlerÚ
Middleware)ÚHTTPMoveÚHTTPPermanentRedirect)ÚRequest)ÚStreamResponse)ÚSystemRoute)Ú
middlewareÚnormalize_path_middleware)ÚApplicationÚ_FuncÚrequestÚpathÚreturnc              ƒ   ó¼   #   • U R                  US9nU R                  R                  R                  U5      I S h  v•N nX2l        UR
                  c  SU4$ SU 4$  N7f)N)Úrel_urlTF)ÚcloneÚappÚrouterÚresolveÚ_match_infoÚhttp_exception)r   r   Úalt_requestÚ
match_infos       Úf/home/gothic/public_html/Fooocus/fooocus_env/lib64/python3.13/site-packages/aiohttp/web_middlewares.pyÚ_check_request_resolvesr!      s^   é € Ø—-‘-¨�-Ð-€Kà—{‘{×)Ñ)×1Ñ1°+Ó>×>€JØ(Ôà× Ñ Ñ(Ø�[Ð Ð à�'ˆ>Ðñ ?ùs   ‚8AºA» AÚfc                 ó   • SU l         U $ )Nr   )Ú__middleware_version__)r"   s    r    r   r   !   s   € Ø €AÔØ€Hó    TF)Úappend_slashÚremove_slashÚmerge_slashesÚredirect_classr&   r'   r(   r)   c                 ó–   ^ ^^^• T =(       a    T(       + nU(       d   S5       e[         S[        S[        S[        4U UUU4S jj5       nU$ )a,  Factory for producing a middleware that normalizes the path of a request.

Normalizing means:
    - Add or remove a trailing slash to the path.
    - Double slashes are replaced by one.

The middleware returns as soon as it finds a path that resolves
correctly. The order if both merge and append/remove are enabled is
    1) merge slashes
    2) append/remove slash
    3) both merge slashes and append/remove slash.
If the path resolves with at least one of those conditions, it will
redirect to the new path.

Only one of `append_slash` and `remove_slash` can be enabled. If both
are `True` the factory will raise an assertion error

If `append_slash` is `True` the middleware will append a slash when
needed. If a resource is defined with trailing slash and the request
comes without it, it will append it automatically.

If `remove_slash` is `True`, `append_slash` must be `False`. When enabled
the middleware will remove trailing slashes and redirect if the resource
is defined

If merge_slashes is True, merge multiple consecutive slashes in the
path into one.
z#Cannot both remove and append slashr   Úhandlerr   c              “   óà  >#   • [        U R                  R                  [        5      (       Ga¬  / nSU R                  ;   a$  U R                  R                  SS5      u  p4SU-   nOSnU R                  nT(       a'  UR                  [        R                  " SSU5      5        T(       a4  U R                  R                  S5      (       d  UR                  US-   5        T
(       a4  U R                  R                  S5      (       a  UR                  US S 5        T(       a1  T(       a*  UR                  [        R                  " SSUS-   5      5        T(       a3  T
(       a,  [        R                  " SSU5      nUR                  US S 5        U HL  n[        R                  " SSU5      n[        X5      I S h  v•N u  p`U(       d  M9  T	" U R                  U-   5      e   U" U 5      I S h  v•N $  N6 N7f)NÚ?r   Ú z//+Ú/éÿÿÿÿz^//+)Ú
isinstancer   Úrouter   Úraw_pathÚsplitÚappendÚreÚsubr   Úendswithr!   )r   r+   Úpaths_to_checkr   ÚqueryÚmerged_slashesÚresolvesr&   r(   r)   r'   s          €€€€r    ÚimplÚ'normalize_path_middleware.<locals>.implL   s‰  øé € ä�g×(Ñ(×.Ñ.´×<Ò<ØˆNØ�g×&Ñ&Ó&Ø%×.Ñ.×4Ñ4°S¸!Ó<‘�Ø˜e™‘à�Ø×'Ñ'�æØ×%Ñ%¤b§f¢f¨U°C¸Ó&>Ô?Þ G§L¡L×$9Ñ$9¸#×$>Ñ$>Ø×%Ñ% d¨S¡jÔ1Þ §¡× 5Ñ 5°c× :Ñ :Ø×%Ñ% d¨3¨B iÔ0Þ¦Ø×%Ñ%¤b§f¢f¨U°C¸À¹Ó&DÔEÞ¦Ü!#§¢¨¨s°DÓ!9�Ø×%Ñ% n°S°bÐ&9Ô:ã&�Ü—v’v˜f c¨4Ó0�Ü*AÀ'Ó*P×$PÑ!�ß�8Ù(¨×)9Ñ)9¸EÑ)AÓBÐBñ	 'ñ ˜WÓ%×%Ð%ñ	 %Qñ &ùs*   ƒF0G.Æ3G*Æ4G.Ç"G.Ç%G,Ç&G.Ç,G.©r   r   r   r   )r&   r'   r(   r)   Úcorrect_configurationr=   s   ````  r    r   r   &   sV   û€ ðF ".×!>°,Ô?ÐÞ ÐGÐ"GÓGÐ äð&œGð &¬gð &¼.÷ &ñ &ó ð&ð< €Kr%   r   r   c                 óN   ^ • [         S[        S[        S[        4U 4S jj5       nU$ )Nr   r+   r   c              “   ó’   >#   • U R                   nUR                  nTUl         U" U 5      I S h  v•N X2l        $  N
! X2l        f = f7f)N)r   Úcurrent_app)r   r+   r   Úprevr   s       €r    r=   Ú&_fix_request_current_app.<locals>.implo   sF   øé € à×'Ñ'ˆ
Ø×%Ñ%ˆØ!$ˆ
Ôð	*Ù  Ó)×)à%)Õ"ñ *øà%)Õ"üs%   ƒ A¤< ¯:°< ³Aº< ¼AÁAr?   )r   r=   s   ` r    Ú_fix_request_current_apprF   n   s1   ø€ Üð*œGð *¬gð *¼.ö *ó ð*ð €Kr%   )r6   Útypingr   r   r   r   Útypedefsr   r	   Úweb_exceptionsr
   r   Úweb_requestr   Úweb_responser   Úweb_urldispatcherr   Ú__all__Úweb_appr   r   ÚstrÚboolr!   r   r   rF   © r%   r    Ú<module>rR      sÍ   ðÛ 	ß 6Ó 6ç )ß ;Ý  Ý (Ý *ð€ö
 Ý$á�Ó€ð	¨7ð 	¸#ð 	À%ÈÈgÈÑBVô 	ð�%ð ˜Eô ð ØØØ%:òEàðEð ðEð ð	Eð
 ˜‘NðEð õEðP -ð °Jõ r%   