ó
    ‰Ž¡j½M  ã                  ó¾   • S SK Jr  S SKrS SKJr  S SKJrJr  S SKJ	r	  SSK
Jr  SS	KJrJr  SS
KJrJrJr  SS jrSS jrSSS.         SS jjr " S S5      rg)é    )ÚannotationsN)ÚCallable)Ú
isfunctionÚismethod)ÚAnyé   )Úget_json_schemaé   )ÚSTREAMABLE_PARSERSÚprocess_field)ÚResponseTemplateÚResponseTemplateFieldÚload_response_templatec                óÄ  • [        U [        5      (       d  gU R                  S5      n[        U[        5      (       a  U/O/ n[        U[        5      (       a  UR                  S U 5       5        U R                  S5      =(       d    /  H  nUR                  [        U5      5        M     U R                  S5      (       a  SU;  a  UR                  S5        [        U5      $ )N© Útypec              3  óT   #   • U  H  n[        U[        5      (       d  M  Uv •  M      g 7f©N)Ú
isinstanceÚstr)Ú.0Úts     Ú½C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\transformers/utils/chat_parsing/response_parser.pyÚ	<genexpr>Ú _schema_types.<locals>.<genexpr>!   s   é € Ð?¢˜1¬J°q¼#×,>—Q‘Q¢ùs   ‚(Ÿ	(ÚanyOfÚnullableÚnull)	r   ÚdictÚgetr   ÚlistÚextendÚ_schema_typesÚappendÚtuple)ÚschemaÚdeclaredÚtypesÚchoices       r   r#   r#      s¬   € Ü�fœd×#Ñ#ØØ�z‰z˜&Ó!€HÜ$ X¬s×3Ñ3ˆX‰J¸€EÜ�(œD×!Ñ!Ø�‰Ñ?¡Ó?Ô?Ø—*‘*˜WÓ%×+¨Ò+ˆØ�‰”] 6Ó*Ö+ñ ,à‡z�z�*×Ñ &°Ó"5Ø�‰�VÔÜ�‹<Ðó    c                óx  • U GH   n US:X  a  [        U 5      s  $ US:X  aX  [        U 5      nX3:w  d  U[        S5      [        S5      4;   a  MJ  UR                  5       (       a  SU ;  a  [        U5      s  $ Us  $ US:X  aE  U R                  5       R	                  5       S;   a#  U R                  5       R	                  5       S;   s  $ US	:X  a  U R                  5       S
;   a    g US;   a=  [
        R                  " U 5      n[        XBS:X  a  [        O[        5      (       a  Us  $ GM   GM#     U $ ! [         a     GM5  f = f)NÚintegerÚnumberÚinfz-infÚ.Úboolean)ÚtrueÚ1ÚfalseÚ0)r1   r2   r   )r   ÚNone)ÚobjectÚarrayr6   )ÚintÚfloatÚ
is_integerÚstripÚlowerÚjsonÚloadsr   r   r!   Ú
ValueError)Úrawr(   Ú	type_namer-   Údecodeds        r   Ú_coercerC   )   s  € Üˆ	ð	Ø˜IÓ%Ü˜3“x’Ø˜HÓ$Ü˜s›�ØÓ# v´%¸³,ÄÀfÃÐ1NÓ'NÙà&,×&7Ñ&7×&9Ñ&9¸cÈ»n”s˜6“{ÒXÐRXÒXØ˜IÓ%¨#¯)©)«+×*;Ñ*;Ó*=ÐA\Ó*\Ø—y‘y“{×(Ñ(Ó*¨mÑ;Ò;Ø˜FÓ" s§y¡y£{Ð6FÓ'FÙØÐ/Ó/ÜŸ*š* S›/�Ü˜g¸HÓ/D¥tÌ$×OÑOØ"’Nò Pò 0ñ ð( €Jøô ó 	Ûð	ús5   ˆD*›0D*Á%D*Á5D*Á9AD*ÃD*Ã =D*Ä*
D9Ä8D9©ÚprefixÚtoolsc               óv   • [        U5      n[        XUS9nUR                  U 5        UR                  5       u  pVU$ )aH  The main function for response parsing when you don't want streaming. Takes generated output
and the prompt prefix and parses them without streaming any events, then returns the parsed message.

Pass `tools` (in the same format as `apply_chat_template` accepts) to cast tool-call arguments
using the calling tool's JSON schema.
rD   )r   ÚResponseParserÚfeedÚfinalize)ÚtextÚresponse_templaterE   rF   ÚstreamÚmessageÚ_s          r   Úparse_responserP   A   s<   € ô /Ð/@ÓAÐÜÐ-ÀEÑJ€FØ
‡K�K�ÔØ—‘Ó"�J€GØ€Nr*   c                  ó¾   • \ rS rSrSr SSS.     SS jj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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)!rH   éU   a—  This class implements a streaming parser with a `response_template`. If you don't need streaming and
just want to parse a complete message, use the `parse_response` function above. Streaming parsing emits
events indicating when regions (message fields) are opened and closed, with the model writing to the region
that is currently open.

Usage:
    parser = ResponseParser(response_template, prefix=chat_prompt)
    for event in parser.initial_events:
        handle(event)
    for chunk in model_text_stream:
        for event in parser.feed(chunk):
            handle(event)
    message, final_events = parser.finalize()
    for event in final_events:
        handle(event)

Pass `tools=` (in the same format as `apply_chat_template` accepts) to cast tool-call arguments
using the calling tool's JSON schema as each region closes.

Events can be either "region_open", "region_chunk", or "region_close".

ResponseParser requires the chat `prefix` (i.e. the chat history, the prefill before the current generation).
This is because chat templates or assistant prefills can sometimes write part of the message, and if we
only see the model output, and not the template, then we can't reliably parse the message in those cases.
Any events produced while consuming the prefix are exposed as `initial_events`, so renderers can show
prefill regions before the model writes anything; closed prefill regions also land in the output dict.
N)rF   c               óŒ  • [        U5      U l        Uc  [        S5      e0 U l        U=(       d    /  Hö  n[	        U5      (       d  [        U5      (       a  [        U5      n[        U[        5      (       a  UR                  SU5      OS n[        U[        5      (       d  Mn  [        UR                  S5      [        5      (       d  M”  UR                  S5      n[        U[        5      (       a  UR                  S5      OS n[        U[        5      (       a  UO0 U R                  US   '   Mø     SU l        SU l        [        U R                  R                  5      U l        U R                  R                  U l        U R                   U l        0 U l        SU l        SU l        SU l        / U l        U(       a  U R/                  U5        g g )	Nah  `ResponseParser`/`parse_response` requires `prefix` (the chat prompt sent to the model before generation), because chat templates often pre-write part of the assistant message (e.g. an opening `<think>` tag) that the parser must see to parse the output correctly. If the generation already contains the complete message, pass `prefix=""` to opt out explicitly.ÚfunctionÚnameÚ
parametersÚ
propertiesÚ r   F)r   Ú_specr?   Ú_tool_paramsr   r   r	   r   r   r    r   Ú_bufferÚ_posÚdefaultsÚ_outputÚimplicitÚ_implicit_nameÚ_currentÚ	_capturesÚ_bodyÚ_openedÚ
_finalizedÚinitial_eventsÚ_consume_prefix)ÚselfrL   rE   rF   ÚtoolÚfnrV   rW   s           r   Ú__init__ÚResponseParser.__init__r   sp  € ô ,Ð,=Ó>ˆŒ
Ø‰>Üðaóð ð .0ˆÔØ—K˜R’KˆDÜ˜$×Ñ¤8¨D§>¡>Ü& tÓ,�Ü/9¸$Ä×/EÑ/E�—‘˜* dÔ+È4ˆBÜ˜"œd×#Ó#¬
°2·6±6¸&³>Ä3×(GÓ(GØŸV™V LÓ1�
Ü=GÈ
ÔTX×=YÑ=Y˜ZŸ^™^¨LÔ9Ð_c�
Ü>HÈÔUY×>ZÑ>Z±
Ð`b�×!Ñ! " V¡*Ó-ñ  ð ˆŒØˆŒ	Ü'+¨D¯J©J×,?Ñ,?Ó'@ˆŒØ*.¯*©*×*=Ñ*=ˆÔð
 %)×$7Ñ$7ˆŒØ)+ˆŒØˆŒ
Ø"ˆŒØ %ˆŒØ*,ˆÔÞØ× Ñ  Õ(ð r*   c                óŠ   • U R                   R                  U5      nU(       d  gX l        U R                  U R                  SS9  g)a£  Loads the prefix (the chat prefill sent to the model), right-truncates it to the start of the
assistant message (as determined by start_anchor) and then runs the remainder through the parser.
Events produced while processing the prefix are stashed on `initial_events` so callers can replay
them into a renderer before feeding model output.

Think of this as the "get the parser up to speed on the story so far" method.
NF©Úeos)rY   Útruncate_past_last_anchorr[   Ú_processrf   )rh   rE   Ú	truncateds      r   rg   ÚResponseParser._consume_prefixœ   s9   € ð —J‘J×8Ñ8¸Ó@ˆ	ÞØØ ŒØ�‰�d×)Ñ)¨uˆÒ5r*   c                óš   • U R                   (       a  [        S5      eU(       a  U =R                  U-  sl        / nU R                  USS9  U$ )z¾Feeds more text/tokens from the model output into the tokenizer, and returns any events that result
(regions entered or left). This is the method you want to call after each generation step.ú ResponseParser already finalizedFrn   )re   ÚRuntimeErrorr[   rq   )rh   rK   Úeventss      r   rI   ÚResponseParser.feedª   sB   € ð �?�?ÜÐAÓBÐBÞØ�LŠL˜DÑ �LØˆØ�‰�f %ˆÑ(Øˆr*   c                óH  • SS jnU R                   (       a  [        S5      e/ nU R                  USS9  U R                  R                  R                  5        VVs/ s H+  u  p4UR                  (       a  M  X0R                  ;  d  M)  UPM-     nnnU(       a  [        SU 35      eU R                  R                  nU R                  R                  5        VVs0 s H  u  pxXv;   d  U" U5      (       a  M  Xx_M     snnU l        SU l         U R                  U4$ s  snnf s  snnf )zÿClose the stream and return the final message dict together with
any finalization events. This is necessary because some regions may only
end at the end of the sequence, so you won't see the event telling you they're
ready until the sequence is finalized.c                ój   • U S L =(       d)    [        U [        [        [        45      =(       a    U (       + $ r   )r   r!   r   r   )Úvs    r   Ú	_is_emptyÚ*ResponseParser.finalize.<locals>._is_empty»   s&   € Ø˜�9×L¤¨A´´d¼CÐ/@Ó!A×!KÈ!ÄeÐLr*   ru   Trn   z>Required response_template fields missing from parsed output: )r{   r   ÚreturnÚbool)
re   rv   rq   rY   ÚfieldsÚitemsÚoptionalr^   r?   r]   )	rh   r|   rw   ÚnÚfÚmissingr]   Úkr{   s	            r   rJ   ÚResponseParser.finalizeµ   sò   € ô	Mð �?�?ÜÐAÓBÐBØˆØ�‰�f $ˆÑ'Ø!%§¡×!2Ñ!2×!8Ñ!8Ô!:ÔgÒ!:™˜À!Ç*Å*“1ÐQR×ZfÑZfÑQf—1Ñ!:ˆÑgÞÜÐ]Ð^eÐ]fÐgÓhÐhØ—:‘:×&Ñ&ˆØ)-¯©×);Ñ);Ô)=ÔcÒ)=¡ ÀÃÑV_Ð`a×Vb›˜šÑ)=ÒcˆŒØˆŒØ�|‰|˜VÐ#Ð#ùó hùó ds   ÁDÁ6DÂDÃDÃ4Dc                óŒ  •  U R                  5       nU R                  X25      u  pEUbâ  Uu  pgnUR                  5       U R                  :”  a6  U R	                  XR
                  U R                  UR                  5        5        UR                  5       U l        US:X  a$  U R                  U5        U R                  XU5        OGU R                  n	U R                  U5        U	(       d#  UR                  5       UR                  5       :X  a  g GM	  U(       aw  U R                  [        U R
                  5      :  aB  U R	                  XR
                  U R                  S  5        [        U R
                  5      U l        U R                  U5        g XPR                  :”  a.  U R	                  XR
                  U R                  U 5        XPl        g )NÚopen)Ú
_watchlistÚ_scanÚstartr\   Ú_accumulater[   ÚendÚ_close_currentÚ_open_explicitrd   Úlen)
rh   rw   ro   ÚwatchÚbestÚ
hold_startÚkindÚfieldÚmÚhad_contents
             r   rq   ÚResponseParser._processÊ   sX  € ØØ—O‘OÓ%ˆEØ#Ÿz™z¨%Ó5ÑˆDàÑØ!%‘�˜QØ—7‘7“9˜tŸy™yÓ(Ø×$Ñ$ V¯\©\¸$¿)¹)ÀaÇgÁgÃiÐ-PÔQØŸE™E›G�”	Ø˜6“>Ø×'Ñ'¨Ô/Ø×'Ñ'¨°qÕ9ð #'§,¡,�KØ×'Ñ'¨Ô/ö '¨1¯7©7«9¸¿¹»Ó+?ØÚö Ø—9‘9œs 4§<¡<Ó0Ó0Ø×$Ñ$ V¯\©\¸$¿)¹)¸+Ð-FÔGÜ # D§L¡LÓ 1�D”IØ×#Ñ# FÔ+Øð
 ŸI™IÓ%Ø× Ñ  ¯©°d·i±iÀ*Ð)MÔNØ&”	Ør*   c                ó   • U R                   bQ  U R                   U R                  :w  a7  U R                  R                  U R                      nUR                  b  SU4/$ / $ / nU R                  R                  R                  5        H%  nUR                  c  M  UR                  SU45        M'     U R                  bC  U R                  R                  U R                     nUR                  b  UR                  SU45        U$ )z¼Patterns we care about right now: the close of the currently-open
explicit region, or -- if we're in the implicit/null region -- every
explicit open plus the implicit's own close (if any).Úcloser‰   )ra   r`   rY   r€   Úclose_reÚvaluesÚopen_rer$   )rh   r–   r’   Úimpls       r   rŠ   ÚResponseParser._watchlistñ   sÖ   € ð �=‰=Ñ$¨¯©¸$×:MÑ:MÓ)MØ—J‘J×%Ñ% d§m¡mÑ4ˆEØ).¯©Ñ)C�W˜eÐ$Ð%ÐKÈÐKØ9;ˆØ—Z‘Z×&Ñ&×-Ñ-Ö/ˆEØ�}‰}Ó(Ø—‘˜f e˜_Ö-ñ 0ð ×ÑÑ*Ø—:‘:×$Ñ$ T×%8Ñ%8Ñ9ˆDØ�}‰}Ñ(Ø—‘˜g t˜_Ô-Øˆr*   c                ó¶  • SnSn[        U R                  5      nU GH  u  pgUS:X  a  UR                  OUR                  nU(       a'  UR	                  U R                  U R
                  5      n	O%UR	                  U R                  U R
                  SS9n	U	c  M|  U(       dC  U	R                  (       d  U R                  XgU	5      (       a  [        XYR                  5       5      nMÆ  U	R                  5       U	R                  5       U	R                  5       -
  * US:X  a  SOSUR                  4n
Ub  X£:  d  GM  X¦Xy4pCGM     Ub  US   R                  5       U:¼  a  SnXE4$ )a¸  Single pass over the watched delimiters, using the `regex` module's
partial matching to decide -- per delimiter -- whether it can be committed
now or must be held. Returns `(best, hold_start)`:

* `best` is the earliest-starting delimiter we can safely commit *now*
  (longest on ties, opens before closes), or `None`.
* `hold_start` is the leftmost buffer position occupied by a still-pending
  match: a partial (incomplete) delimiter, or a complete one ending at the
  buffer edge that more input could still grow. Bytes before it are safe to
  emit; bytes from it onward must be held. It stays `len(self._buffer)` when
  nothing is pending, letting the caller flush the whole buffer.

A complete match is committable only if it starts strictly before
`hold_start` -- otherwise an earlier (or co-located) pending delimiter could
turn out to be the real one. At EOS nothing can grow, so partial matching is
skipped and every complete match is committable.

(The `regex` module always reports the empty string as a live prefix, so a
partial search with no real match returns a zero-width match at the buffer
end; that lands in the pending branch with `start == len(self._buffer)`, a
no-op for `hold_start`.)
Nr‰   T)Úpartialr   r
   r   )r‘   r[   rž   rœ   Úsearchr\   r¢   Ú	_can_growÚminrŒ   rŽ   rU   )rh   r’   ro   Úbest_keyr“   r”   r•   r–   Úpatternr—   Úkeys              r   r‹   ÚResponseParser._scan  s  € ð2 "&ˆØ>BˆÜ˜Ÿ™Ó&ˆ
Ü ‰KˆDà'+¨v£~�e—m’m¸5¿>¹>ˆGÞØ—N‘N 4§<¡<°·±Ó;‘à—N‘N 4§<¡<°·±ÀD�NÐI�Ø‰yÙÞ˜AŸIŸI¨¯©¸ÀQ×)GÑ)Gä  ¯W©W«YÓ7�
ÙØ—7‘7“9 §¡£¨!¯'©'«)Ñ 3Ð4¸4À6»>±aÈqÐRW×R\ÑR\Ð]ˆCØÑ 3¦>Ø!$¨UÐ&6›$ñ !ð$ Ñ  Q¡§¡£°:Ó =ØˆDØÐÐr*   c                ó"  • UR                  5       [        U R                  5      :w  a  gUR                  5       UR                  5       :X  a  gUS:X  a  UR                  UR
                  4OUR                  UR                  4u  pEUSL =(       d    U$ )a  Whether a *complete* match ending at the current buffer edge could still
change as more input arrives -- in which case we defer rather than commit. A
match ending before the edge has already seen its terminating byte and is
final. At the edge: zero-width matches (`$` / `\Z`) are only real at true
EOS; a fully-present literal that no other literal in its set extends cannot
grow (the fast path that keeps literal delimiters zero-latency); anything
else (regex delimiters, prefix-overlapping literal lists) might.FTr‰   N)rŽ   r‘   r[   rŒ   Úopen_literalsÚopen_literal_can_extendÚclose_literalsÚclose_literal_can_extend)rh   r•   r–   r—   ÚliteralsÚ
can_extends         r   r¤   ÚResponseParser._can_grow4  s�   € ð �5‰5‹7”c˜$Ÿ,™,Ó'Ó'ØØ�7‰7‹9˜Ÿ™›ÓØð �v‹~ð × Ñ  %×"?Ñ"?Ñ@à×&Ñ&¨×(FÑ(FÐGñ 	ˆð
 ˜4Ð×- :Ð-r*   c                ón  • U(       a  U R                   c  gU R                  R                  U R                      nU R                  (       d%  UR	                  SU R                   S.5        SU l        U =R
                  U-  sl        UR                  [        ;  nUR	                  SU R                   X$S.5        g)av  Route `text` into the currently active region. When the current
region is the null sink (no implicit declared, no explicit open), we
silently discard. Every routed chunk emits a `region_chunk` event so
consumers can render live; `dirty=True` flags chunks from structured
parsers (json, xml-inline, kv-lines) whose raw bytes will only be
parsed into the final value on close.NÚregion_open©r   r–   TÚregion_chunk)r   r–   rK   Údirty)ra   rY   r€   rd   r$   rc   Úcontentr   )rh   rw   rK   r–   r¶   s        r   r�   ÚResponseParser._accumulateG  s‚   € ö �t—}‘}Ñ,ØØ—
‘
×!Ñ! $§-¡-Ñ0ˆØ�|�|Ø�M‰M =¸4¿=¹=ÑIÔJØˆDŒLØ�
Š
�dÑ�
Ø—‘Ô%7Ñ7ˆØ�‰˜~¸¿¹ÈtÑdÕer*   c                ó  • UR                   U l        UR                  5       R                  5        VVs0 s H  u  pEUc  M
  XE_M     snnU l        SU l        SU l        UR                  SUR                   S.5        g s  snnf )NrX   Tr³   r´   )rU   ra   Ú	groupdictr�   rb   rc   rd   r$   )rh   rw   r–   r—   r†   r{   s         r   r�   ÚResponseParser._open_explicitX  se   € ØŸ
™
ˆŒØ+,¯;©;«=×+>Ñ+>Ô+@ÔRÒ+@¡4 1ÀA›$˜!š$Ñ+@ÒRˆŒØˆŒ
ØˆŒØ�‰˜}°u·z±zÑBÕCùó Ss   ³	A<Á A<c                ó�  • U R                   b  U R                  (       d  U R                  5         gU R                  R                  U R                      n[        U R                  X R                  5      nU R                  (       a  U R                  U5      nUR                  b—  [        U[        5      (       d/  [        SUR                   S[        U5      R                    S35      eU R"                  R%                  U R                   5      nUc  UOXBR                  -   U-   U R"                  U R                   '   O_UR&                  (       a6  U R"                  R)                  U R                   / 5      R+                  U5        OX0R"                  U R                   '   UR+                  SU R                   US.5        U R                  5         g)zÂClose the current region and reset to the implicit/null region.
Skipped (aside from the reset) when the current region never opened --
avoids vacuous open/close pairs at every explicit boundary.NzField 'z8': 'join' requires each match to parse to a string, got r/   Úregion_close)r   r–   Úvalue)ra   rd   Ú_reset_to_implicitrY   r€   r   rc   rb   rZ   Ú_coerce_tool_callsÚjoinr   r   r?   rU   r   Ú__name__r^   r    ÚrepeatsÚ
setdefaultr$   )rh   rw   r–   r¾   Úpreviouss        r   r�   ÚResponseParser._close_current_  sS  € ð �=‰=Ñ ¨¯¯Ø×#Ñ#Ô%ØØ—
‘
×!Ñ! $§-¡-Ñ0ˆÜ˜dŸj™j¨%·±Ó@ˆØ××Ø×+Ñ+¨EÓ2ˆEØ�:‰:Ñ!Ü˜e¤S×)Ñ)Ü Ø˜eŸj™j˜\ð *Ü ›;×/Ñ/Ð0°ð3óð ð —|‘|×'Ñ'¨¯©Ó6ˆHØ3;Ñ3C©%È×T^ÑT^ÑI^ÐafÑIfˆD�L‰L˜Ÿ™Ò'Ø�]�]Ø�L‰L×#Ñ# D§M¡M°2Ó6×=Ñ=¸eÕDà*/�L‰L˜Ÿ™Ñ'Ø�‰˜~¸¿¹ÐPUÑVÔWØ×ÑÕ!r*   c                ó*  • [        U[        5      (       a!  U Vs/ s H  o R                  U5      PM     sn$ [        U[        5      (       a  UR	                  S5      OS n[        U[        5      (       d  U$ UR	                  S5      UR	                  S5      pT[        U[
        5      (       a  [        U[        5      (       d  U$ U R                  R	                  U5      =n(       a¤  UR                  5        H�  u  pxXv;  d  [        Xg   5      =n	(       d  M   [        U[
        5      (       a  [        X‰5      XW'   MD  [        U[        5      (       d  M[  U Vs/ s H%  n[        U[
        5      (       a  [        X)5      OUPM'     snXW'   M’     U$ s  snf s  snf )NrT   rU   Ú	arguments)
r   r!   rÀ   r   r    r   rZ   r�   r#   rC   )
rh   r¾   Úitemrj   rU   rÈ   rW   r¨   Úargumentr(   s
             r   rÀ   Ú!ResponseParser._coerce_tool_callsy  sC  € Ü�eœT×"Ñ"Ù>CÓDºe°d×+Ñ+¨DÖ1¹eÑDÐDÜ&0°¼×&=Ñ&=ˆU�Y‰Y�zÔ"À4ˆÜ˜"œd×#Ñ#ØˆLØŸ&™& ›.¨"¯&©&°Ó*=ˆiÜ˜$¤×$Ñ$¬J°yÄ$×,GÑ,GØˆLØ×*Ñ*×.Ñ.¨tÓ4Ð4ˆ:Õ4Ø!*§¡Ö!2‘�ØÓ(¼-È
ÉÓ:XÐ1X°Õ1XÙÜ˜h¬×,Ñ,Ü%,¨XÓ%=�I“NÜ ¬$×/Ó/ÙjrÓ%sÒjrÐbf¼jÈÌs×>SÑ>S¤g¨dÔ&:ÐY]Ò&]ÑjrÑ%s�I“Nñ "3ð ˆùò Eùò &ts   šFÅ,Fc                óP   • U R                   U l        0 U l        SU l        SU l        g )NrX   F)r`   ra   rb   rc   rd   )rh   s    r   r¿   Ú!ResponseParser._reset_to_implicitŒ  s$   € Ø×+Ñ+ˆŒØˆŒØˆŒ
Øˆ�r*   )rc   r[   rb   ra   re   r`   rd   r^   r\   rY   rZ   rf   r   )rL   údict | ResponseTemplaterE   ú
str | NonerF   úlist[dict | Callable] | None)rE   r   r~   r5   )rK   r   r~   ú
list[dict])r~   ztuple[dict, list[dict]])rw   rÑ   ro   r   r~   r5   )r~   ú'list[tuple[str, ResponseTemplateField]])r’   rÒ   ro   r   r~   z9tuple[tuple[str, ResponseTemplateField, Any] | None, int])r•   r   r–   r   r—   r   r~   r   )rw   rÑ   rK   r   r~   r5   )rw   rÑ   r–   r   r—   r   r~   r5   )rw   rÑ   r~   r5   )r¾   r   r~   r   )r~   r5   )rÂ   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rk   rg   rI   rJ   rq   rŠ   r‹   r¤   r�   r�   r�   rÀ   r¿   Ú__static_attributes__r   r*   r   rH   rH   U   s�   † ñð> "ð()ð
 /3ñ()à2ð()ð ð()ð
 ,ö()ôT6ô	ô$ô*%ôNð"0 Ø<ð0 ØCGð0 à	Bô0 ôd.ô&fô"Dô"ô4÷&r*   rH   )r&   r   r~   útuple[str, ...])r@   r   r(   rØ   r~   r   )
rK   r   rL   rÎ   rE   rÏ   rF   rÐ   r~   r   )Ú
__future__r   r=   Úcollections.abcr   Úinspectr   r   Útypingr   Úchat_template_utilsr	   Úcontent_parsersr   r   Úresponse_templatesr   r   r   r#   rC   rP   rH   r   r*   r   Ú<module>rà      ss   ðõ #ã Ý $ß (Ý å 1ß >ß _Ñ _ôôð8 Ø*.ñØ
ðà.ðð ð	ð
 (ðð 
õ÷({ò {r*   