ó
    Û°›j+&  ã                   óì   • S SK r S SKrS SKrS SKJr  S SKJr  S SKJr  Sr	\R                  " S5      rSr\ R                  " S5      rS	S
S.SSS.SS
S.SSS.S.rSSSS.r " S S5      r " S S\5      rg)é    N)ÚOrderedDict)ÚDocStringParser)Ú	ReSTStylez&https://docs.aws.amazon.com/index.htmlzX`AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/[a-z0-9-.]*/[a-zA-Z]*>`_z�

    **{}**
    ::

        # This section is too large to render.
        # Please see the AWS API Documentation linked below.

    {}
    ÚbcdocszResponse SyntaxiÜ  )ÚnameÚ
line_limitzResponse Structureiˆ  zRequest SyntaxÚ
Parameters)zresponse-exampleÚdescriptionzrequest-examplezrequest-paramsé   é   )z
client-apizpaginator-apiz
waiter-apic                   ó`   • \ rS rSrSS jrS rS rS rS rS r	S r
S	 rS
 rS rS rS rSrg)ÚReSTDocumenté2   c                 ó¤   • [        U 5      U l        Xl        [        U 5      U l        SU l        SU l        0 U l        0 U l        / U l	        S U l
        g )NTF)r   ÚstyleÚtargetr   ÚparserÚ	keep_dataÚdo_translationÚtranslation_mapÚhrefsÚ_writesÚ_last_doc_string)Úselfr   s     ÚX/home/mande/repo/quber/.venv/lib/python3.13/site-packages/botocore/docs/bcdoc/restdoc.pyÚ__init__ÚReSTDocument.__init__3   sK   € Ü˜t“_ˆŒ
ØŒÜ% dÓ+ˆŒØˆŒØ#ˆÔØ!ˆÔØˆŒ
ØˆŒØ $ˆÕó    c                 óf   • U R                   (       a   Ub  U R                  R                  U5        g g g ©N)r   r   Úappend©r   Úss     r   Ú_writeÚReSTDocument._write>   s&   € Ø�>�>˜a™mØ�L‰L×Ñ Õ"ð ,ˆ>r   c                 ó&   • U R                  U5        g)z"
Write content into the document.
N)r$   ©r   Úcontents     r   ÚwriteÚReSTDocument.writeB   s   € ð 	�‰�GÕr   c                 ó`   • U R                  U R                  R                  5        U S35        g)z
Write content on a newline.
Ú
N)r$   r   Úspacesr'   s     r   ÚwritelnÚReSTDocument.writelnH   s)   € ð 	�‰�t—z‘z×(Ñ(Ó*Ð+¨G¨9°BÐ7Õ8r   c                 ó    • U R                   S   $ )zV
Returns the last content written to the document without
removing it from the stack.
éÿÿÿÿ©r   ©r   s    r   Ú
peek_writeÚReSTDocument.peek_writeN   s   € ð
 �|‰|˜BÑÐr   c                 ól   • [        U R                  5      S:”  a  U R                  R                  5       $ S$ )z<
Removes and returns the last content written to the stack.
r   N)Úlenr   Úpopr3   s    r   Ú	pop_writeÚReSTDocument.pop_writeU   s,   € ô &)¨¯©Ó%6¸Ó%:ˆt�|‰|×ÑÓ!ÐDÀÐDr   c                 ó:   • U R                   R                  U5        g)z"
Places new content on the stack.
N)r   r!   r"   s     r   Ú
push_writeÚReSTDocument.push_write[   s   € ð 	�‰×Ñ˜AÕr   c                 ó(  • U R                   (       aX  U R                  R                  5         U R                   R                  5        H   u  pU R                  R	                  X5        M"     SR                  U R                  5      R                  S5      $ )z:
Returns the current content of the document as a string.
Ú úutf-8)r   r   Únew_paragraphÚitemsÚlink_target_definitionÚjoinr   Úencode)r   ÚrefnameÚlinks      r   ÚgetvalueÚReSTDocument.getvaluea   sd   € ð �:�:Ø�J‰J×$Ñ$Ô&Ø!%§¡×!1Ñ!1Ö!3‘�Ø—
‘
×1Ñ1°'Ö@ñ "4à�w‰w�t—|‘|Ó$×+Ñ+¨GÓ4Ð4r   c                 ób   • U Vs/ s H  o R                   R                  X"5      PM     sn$ s  snf r    )r   Úget)r   ÚwordsÚws      r   Útranslate_wordsÚReSTDocument.translate_wordsk   s)   € Ù8=Ó>º°1×$Ñ$×(Ñ(¨Ö.¹Ñ>Ð>ùÒ>s   …$,c                 óZ   • U(       a$  U R                   (       a  U R                  U5        g g g r    )r   r$   )r   Údatas     r   Úhandle_dataÚReSTDocument.handle_datan   s   € Þ�D—N—NØ�K‰K˜Õð #ˆ4r   c                 óV  • U(       ai   [        U R                  5      nU R                  R                  U5        U R                  R	                  5         [        U R                  5      nX#4U l        g g ! [         a,    [        R                  SSS9  [        R                  U5         g f = f)NzError parsing doc stringT)Úexc_info)	r7   r   r   ÚfeedÚcloser   Ú	ExceptionÚLOGÚdebug)r   Ú
doc_stringÚstartÚends       r   Úinclude_doc_stringÚReSTDocument.include_doc_stringr   s…   € Þð&Ü˜DŸL™LÓ)�Ø—‘× Ñ  Ô,Ø—‘×!Ñ!Ô#Ü˜$Ÿ,™,Ó'�Ø).¨�Õ%ð øô ó &Ü—	‘	Ð4¸t�	ÑDÜ—	‘	˜*Ö%ð&ús   ‰A'A2 Á23B(Â'B(c                 óX   • U R                   b  U R                   u  pU R                  X2	 g g r    )r   r   )r   r\   r]   s      r   Úremove_last_doc_stringÚ#ReSTDocument.remove_last_doc_string~   s.   € à× Ñ Ñ,Ø×.Ñ.‰JˆEØ—‘˜U˜YÑ'ð -r   )	r   r   r   r   r   r   r   r   r   N)Úman)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r$   r)   r.   r4   r9   r<   rH   rN   rR   r^   ra   Ú__static_attributes__© r   r   r   r   2   s?   † ô	%ò#òò9ò òEòò5ò?òò
&õ(r   r   c                   óÚ   ^ • \ rS rSrSU 4S jjr\S 5       r\S 5       r\R                  S 5       r\S 5       r	\S 5       r
S rSS	 jrS
 rS rS rSS jrS rS rS rS rS rSrU =r$ )ÚDocumentStructureé…   c                 ó¸   >• [         TU ]  US9  Xl        [        5       U l        U R                  /U l        0 U l        Ub  X@l        Ub  U R                  U5        gg)aí  Provides a Hierarichial structure to a ReSTDocument

You can write to it similiar to as you can to a ReSTDocument but
has an innate structure for more orginaztion and abstraction.

:param name: The name of the document
:param section_names: A list of sections to be included
    in the document.
:param target: The target documentation of the Document structure
:param context: A dictionary of data to store with the strucuture. These
    are only stored per section not the entire structure.
)r   N)Úsuperr   Ú_namer   Ú
_structureÚ_pathÚ_contextÚ_generate_structure)r   r   Úsection_namesr   ÚcontextÚ	__class__s        €r   r   ÚDocumentStructure.__init__†   s[   ø€ ô 	‰Ñ ÐÑ'ØŒ
Ü%›-ˆŒØ—j‘j�\ˆŒ
ØˆŒØÑØ#ŒMØÑ$Ø×$Ñ$ ]Õ3ð %r   c                 ó   • U R                   $ )z"The name of the document structure)ro   r3   s    r   r   ÚDocumentStructure.name�   s   € ð �z‰zÐr   c                 ó   • U R                   $ )z^
A list of where to find a particular document structure in the
overlying document structure.
©rq   r3   s    r   ÚpathÚDocumentStructure.path¢   s   € ð �z‰zÐr   c                 ó   • Xl         g r    r{   )r   Úvalues     r   r|   r}   ª   s   € à�
r   c                 ó,   • [        U R                  5      $ r    )Úlistrp   r3   s    r   Úavailable_sectionsÚ$DocumentStructure.available_sections®   s   € ä�D—O‘OÓ$Ð$r   c                 ó   • U R                   $ r    )rr   r3   s    r   ru   ÚDocumentStructure.context²   s   € à�}‰}Ðr   c                 ó8   • U H  nU R                  U5        M     g r    )Úadd_new_section)r   rt   Úsection_names      r   rs   Ú%DocumentStructure._generate_structure¶   s   € Û)ˆLØ× Ñ  Ö.ò *r   c                 ó  • U R                  XR                  US9nU R                  U/-   Ul        U R                  R                  UR                  l        U R
                  Ul        U R                  Ul        X0R                  U'   U$ )a7  Adds a new section to the current document structure

This document structure will be considered a section to the
current document structure but will in itself be an entirely
new document structure that can be written to and have sections
as well

:param name: The name of the section.
:param context: A dictionary of data to store with the strucuture. These
    are only stored per section not the entire structure.
:rtype: DocumentStructure
:returns: A new document structure to add to but lives as a section
    to the document structure it was instantiated from.
)r   r   ru   )rv   r   r|   r   Úindentationr   r   rp   )r   r   ru   Úsections       r   r‡   Ú!DocumentStructure.add_new_sectionº   st   € ð  —.‘.ØŸk™k°7ð !ð 
ˆð —y‘y D 6Ñ)ˆŒà$(§J¡J×$:Ñ$:ˆ�‰Ô!Ø"&×"6Ñ"6ˆÔØŸ
™
ˆŒØ '�‰˜ÑØˆr   c                 ó    • U R                   U   $ )zRetrieve a section©rp   ©r   r   s     r   Úget_sectionÚDocumentStructure.get_sectionÕ   s   € à�‰˜tÑ$Ð$r   c                 ó   • XR                   ;   $ r    r�   r�   s     r   Úhas_sectionÚDocumentStructure.has_sectionÙ   s   € Ø—‘Ñ&Ð&r   c                 ó   • U R                   U	 g)zDelete a sectionNr�   r�   s     r   Údelete_sectionÚ DocumentStructure.delete_sectionÜ   s   € à�O‰O˜DÑ!r   c                 ó–  • [        U R                  5      nUS:X  aj  U R                  (       aX  U R                  R	                  5         U R                  R                  5        H   u  p4U R                  R                  X45        M"     O(U[        R                  U R                  S   5      :X  a  SnU R                  5       nU R                  R                  5        Hf  u  pg[        R                  UR                  5       5      nU(       a"  UR                  S5       S3R                  5       OUnXWR!                  U5      -  nMh     [        UR#                  5       5      n	[$        R                  U R&                  5      n
Ub  UR                  5       O[(        nU
(       a/  XšS   :”  a'  [*        R-                  U
S   U5      R                  5       nU$ )zµFlushes a doc structure to a ReSTructed string

The document is flushed out in a DFS style where sections and their
subsections' values are added to the string as they are visited.
é   Nr   z

r   r   )r7   r|   r   r   rA   rB   rC   ÚSECTION_METHOD_PATH_DEPTHrK   rH   rp   ÚDOCUMENTATION_LINK_REGEXÚsearchÚdecodeÚgrouprE   Úflush_structureÚ
splitlinesÚSECTION_LINE_LIMIT_CONFIGr   ÚDEFAULT_AWS_DOCS_LINKÚLARGE_SECTION_MESSAGEÚformat)r   Ú	docs_linkÚpath_lengthrF   rG   r   r   rŒ   ÚmatchÚ
line_countÚsection_configÚaws_docs_links               r   r    Ú!DocumentStructure.flush_structureà   sv  € ô ˜$Ÿ)™)“nˆØ˜!ÓØ�z�zØ—
‘
×(Ñ(Ô*Ø%)§Z¡Z×%5Ñ%5Ö%7‘M�GØ—J‘J×5Ñ5°gÖDñ &8øð Ô5×9Ñ9¸$¿)¹)ÀA¹,ÓGÓGØˆIØ—‘“ˆØ!Ÿ_™_×2Ñ2Ö4‰MˆDô -×3Ñ3°E·L±L³NÓCˆEæ49�5—;‘;˜q“>Ð" $Ð'×.Ñ.Ô0¸yð ð ×,Ñ,¨YÓ7Ñ7ŠEñ 5ô ˜×)Ñ)Ó+Ó,ˆ
Ü2×6Ñ6°t·y±yÓAˆð Ñ$ð ×ÑÔä&ð 	ö
 ˜j¸,Ñ+GÓGÜ)×0Ñ0Ø˜vÑ&¨óç‰f‹hð ð ˆr   c                 óV   • SR                  U R                  5      R                  S5      $ )Nr?   r@   )rD   r   rE   r3   s    r   rH   ÚDocumentStructure.getvalue
  s    € Ø�w‰w�t—|‘|Ó$×+Ñ+¨GÓ4Ð4r   c                 ó"   • [        5       U l        g r    )r   rp   r3   s    r   Úremove_all_sectionsÚ%DocumentStructure.remove_all_sections  s   € Ü%›-ˆ�r   c                 ó   • / U l         g r    r2   r3   s    r   Ú
clear_textÚDocumentStructure.clear_text  s	   € Øˆ�r   c                 ó^   • U R                  S5      nUR                  R                  U5        U$ )NÚtitle)r‡   r   Úh1)r   r¶   Útitle_sections      r   Úadd_title_sectionÚ#DocumentStructure.add_title_section  s,   € Ø×,Ñ,¨WÓ5ˆØ×Ñ×Ñ˜uÔ%ØÐr   c                 óF  • [         R                  R                  U5      (       d  [         R                  " U5        [         R                  R	                  X S35      n[        US5       nUR                  U R                  5       5        S S S 5        g ! , (       d  f       g = f)Nz.rstÚwb)Úosr|   ÚexistsÚmakedirsrD   Úopenr)   r    )r   Ú	full_pathÚ	file_nameÚsub_resource_file_pathÚfs        r   Úwrite_to_fileÚDocumentStructure.write_to_file  si   € Ü�w‰w�~‰~˜i×(Ñ(Ü�KŠK˜	Ô"Ü!#§¡§¡¨i¸;ÀdÐ9KÓ!LÐÜÐ(¨$Ô/°1Ø�G‰G�D×(Ñ(Ó*Ô+÷ 0×/Ö/ús   Á) BÂ
B )rr   ro   rq   rp   r   )Nrc   Nr    )rd   re   rf   rg   r   Úpropertyr   r|   Úsetterr‚   ru   rs   r‡   r‘   r”   r—   r    rH   r°   r³   r¹   rÅ   rh   Ú__classcell__)rv   s   @r   rk   rk   …   s­   ø† ÷4ð. ñó ðð ñó ðð 
‡[�[ñó ðð ñ%ó ð%ð ñó ðò/ôò6%ò'ò"ô(òT5ò(òò÷
,ð ,r   rk   )Úloggingr½   ÚreÚbotocore.compatr   Ú#botocore.docs.bcdoc.docstringparserr   Úbotocore.docs.bcdoc.styler   r£   Úcompilerœ   r¤   Ú	getLoggerrY   r¢   r›   r   rk   ri   r   r   Ú<module>rÑ      s¤   ðó Û 	Û 	å 'Ý ?Ý /à@Ð ØŸ:š:ðIóÐ ð	Ð ð ×Ò˜Ó!€à!2À$ÑGØ0ÀÑEØ 0ÀÑEØ+¸4Ñ@ñ	Ð ð ØØñÐ ÷P(ñ P(ôfX,˜õ X,r   