+
    ¿Ìj#  ã                   óP  € ^ RI t ^ RIHt ^ RIHtHtHtHtHtH	t	H
t
Ht ^RIHt ]'       d   ^RIHt  ^ RIt^ RIHt  ! R R4      t]
! R	4      t]]R
3,          t ! R R]	],          4      t]R,          t ! R R]4      tRR R lltRR R lltRR R lltR#   ] d     Lli ; i)é    N)Údeepcopy)ÚListÚCallableÚIteratorÚUnionÚOptionalÚGenericÚTypeVarÚTYPE_CHECKING)ÚToken)ÚTerminalDef)ÚLiteralc                   ó2   a € ] tR t^t o R tV 3R ltRtV tR# )ÚMetac                ó   € R V n         R# )TN©Úempty©Úselfs   &Úc/home/l0st/web/w4ttz.lol/public_html/toolz/MsgDoxxer/venv/lib/python3.14/site-packages/lark/tree.pyÚ__init__ÚMeta.__init__   s	   € ØˆŽ
ó    c                ó„   <€ V ^8„  d   Qh/ S[ ;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   R;R	&   S[ ;R
&   # )é   r   ÚlineÚcolumnÚ	start_posÚend_lineÚ
end_columnÚend_poszList[TerminalDef]Úorig_expansionÚ
match_tree)ÚboolÚint)ÚformatÚ__classdict__s   "€r   Ú__annotate__ÚMeta.__annotate__   sq   ø‡ ‚ á�Kñ ñ �Iñ ñ �Kñ	 ñ
 �Nñ ñ �Mñ ñ �Oñ ñ �Lñ ð (Ñ'ñ ñ Ñò r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__©r'   s   @r   r   r      s   ø‡ € ò÷ ƒ r   r   Ú_Leaf_TúTree[_Leaf_T]c                   óX  a € ] tR t^&t o RtR&V 3R lR llt]V 3R lR l4       tR tR't	R t
R	 tR(V 3R
 lR lltR&V 3R lR lltR tR tR tV 3R lR ltV 3R lR ltR tV 3R lR ltV 3R lR ltV 3R lR ltR tV 3R lR ltR tV 3R  lR! ltV 3R" lR# ltV 3R$ ltR%tV tR# ))ÚTreea…  The main tree class.

Creates a new tree, and stores "data" and "children" in attributes of the same name.
Trees can be hashed and compared.

Parameters:
    data: The name of the rule or alias
    children: List of matched sub-rules and terminals
    meta: Line & Column numbers (if ``propagate_positions`` is enabled).
        meta attributes: (line, column, end_line, end_column, start_pos, end_pos,
                          container_line, container_column, container_end_line, container_end_column)
        container_* attributes consider all symbols, including those that have been inlined in the tree.
        For example, in the rule 'a: _A B _C', the regular attributes will mark the start and end of B,
        but the container_* attributes will also include _A and _C in the range. However, rules that
        contain 'a' will consider it in full, including _A and _C for all attributes.
Nc                ó>   <€ V ^8„  d   QhRS[ RRRS[S[,          RR/# )r   ÚdataÚchildrenúList[Branch[_Leaf_T]]ÚmetaÚreturnN)Ústrr   r   )r&   r'   s   "€r   r(   ÚTree.__annotate__;   s0   ø€ ÷ ñ ™Sð Ð,Cð É8ÑTXÍ>ð Ðcgñ r   c                ó*   € Wn         W n        W0n        R # ©N)r7   r8   Ú_meta)r   r7   r8   r:   s   &&&&r   r   ÚTree.__init__;   s   € ØŒ	Ø ŒØŽ
r   c                ó    <€ V ^8„  d   QhRS[ /# ©r   r;   )r   )r&   r'   s   "€r   r(   r=   A   s   ø€ ÷ ñ ‘dñ r   c                óT   € V P                   f   \        4       V n         V P                   # r?   )r@   r   r   s   &r   r:   Ú	Tree.meta@   s   € à�:‰:ÒÜ›ˆDŒJØ�z‰zÐr   c                ó@   € R V P                   : RV P                  : R2# )zTree(z, Ú)©r7   r8   r   s   &r   Ú__repr__ÚTree.__repr__F   s   � Ø!%§¤¨D¯M¬MÐ:Ð:r   c                ó   € V P                   # r?   ©r7   r   s   &r   Ú_pretty_labelÚTree._pretty_labelK   s   € Ø�y‰yÐr   c              #  óÎ  "  € W!,           V P                  4        2x € \        V P                  4      ^8X  dC   \        V P                  ^ ,          \        4      '       g   RV P                  ^ ,           R2x € R# Rx € V P                   FR  p\        V\        4      '       d$   VP                  V^,           V4       Rj  x€L
  K<  W!^,           ,           V R2x € KT  	  R#  L"5i)é   Ú	Ú
N)rM   Úlenr8   Ú
isinstancer5   Ú_pretty)r   ÚlevelÚ
indent_strÚns   &&& r   rU   ÚTree._prettyN   sµ   é € ØÕ!Ð" 4×#5Ñ#5Ó#7Ð"8Ð9Ò9Üˆt�}‰}Ó Ô"¬:°d·m±mÀAÕ6FÌ×+MÒ+MØ�t—}‘} QÕ'Ð(¨Ð+Ô+àŠJØ—]”]�Ü˜a¤×&Ò&Ø Ÿy™y¨¨q­°*Ó=×=Ò=à'¨q­Õ1Ð2°1°#°RÐ8Ô8ó	 #á=ùs   ‚B>C%Ã C#Ã#C%c                ó&   <€ V ^8„  d   QhRS[ RS[ /# )r   rW   r;   ©r<   )r&   r'   s   "€r   r(   r=   Z   s   ø€ ÷ 4ñ 4¡ð 4©cñ 4r   c                óD   € RP                  V P                  ^ V4      4      # )zMReturns an indented string representation of the tree.

Great for debugging.
Ú )ÚjoinrU   )r   rW   s   &&r   ÚprettyÚTree.prettyZ   s   € ð
 �w‰w�t—|‘| A zÓ2Ó3Ð3r   c                ó2   <€ V ^8„  d   QhRS[ R,          RR/# )r   Úparentzrich.tree.Treer;   )r   )r&   r'   s   "€r   r(   r=   a   s"   ø€ ÷ "ñ "™hÐ'7Õ8ð "ÐBRñ "r   c                ó$   € V P                  V4      # )zÁReturns a tree widget for the 'rich' library.

Example:
    ::
        from rich import print
        from lark import Tree

        tree = Tree('root', ['node1', 'node2'])
        print(tree)
)Ú_rich)r   rb   s   &&r   Ú__rich__ÚTree.__rich__a   s   € ð �z‰z˜&Ó!Ð!r   c                óJ  € V'       d!   VP                  R V P                   R24      pM)^ RIpVP                  P	                  V P                  4      pV P
                   FA  p\        V\        4      '       d   VP                  V4       K,  VP                  RV R24       KC  	  V# )z[bold]z[/bold]Nz[green]z[/green])Úaddr7   Ú	rich.treeÚtreer5   r8   rT   rd   )r   rb   rj   ÚrichÚcs   &&   r   rd   Ú
Tree._richn   s{   € ßØ—:‘:  t§y¡y k°Ð9Ó:‰DãØ—9‘9—>‘> $§)¡)Ó,ˆDà—”ˆAÜ˜!œT×"Ò"Ø—‘˜–à—‘˜7 1 # XÐ.Ö/ñ	 ð ˆr   c                óœ   €  V P                   VP                   8H  ;'       d    V P                  VP                  8H  #   \         d     R # i ; i)F)r7   r8   ÚAttributeError©r   Úothers   &&r   Ú__eq__ÚTree.__eq__}   sA   € ð	Ø—9‘9 §
¡
Ñ*×NÐN¨t¯}©}ÀÇÁÑ/NÐNøÜô 	Úð	ús   ‚< ¢< ¼AÁ
Ac                ó   € W8X  * # r?   © rp   s   &&r   Ú__ne__ÚTree.__ne__ƒ   s   € ØÒ"Ð"r   c                ó    <€ V ^8„  d   QhRS[ /# rC   )r%   )r&   r'   s   "€r   r(   r=   †   s   ø€ ÷ 7ñ 7™#ñ 7r   c                óV   € \        V P                  \        V P                  4      34      # r?   )Úhashr7   Útupler8   r   s   &r   Ú__hash__ÚTree.__hash__†   s   € Ü�T—Y‘Y¤ d§m¡mÓ 4Ð5Ó6Ð6r   c                ó   <€ V ^8„  d   QhRR/# )r   r;   úIterator[Tree[_Leaf_T]]ru   )r&   r'   s   "€r   r(   r=   ‰   s   ø€ ÷ 1ñ 1Ð8ñ 1r   c           	     óD  € V .p\        4       pV Ff  pW2\        V4      &   T\        VP                  4       Uu. uF/  p\	        V\
        4      '       g   K  \        V4      V9  g   K-  VNK1  	  up,          pKh  	  ?\        \        VP                  4       4      4      # u upi )z†Depth-first iteration.

Iterates over all the subtrees, never returning to the same node twice (Lark's parse-tree is actually a DAG).
)ÚdictÚidÚreversedr8   rT   r5   ÚlistÚvalues)r   ÚqueueÚsubtreesÚsubtreerl   s   &    r   Úiter_subtreesÚTree.iter_subtrees‰   s™   € ð
 �ˆÜ“6ˆÛˆGØ$+”R˜“[Ñ!Ø¤¨'×*:Ñ*:Ô!;ó HÑ!;˜AÜ# A¤t×,ô Ü13°A³¸hÑ1F÷ �aÑ!;ñ Hõ HŠEñ ð
 Üœ˜XŸ_™_Ó.Ó/Ó0Ð0ùò	Hs   ¸BÁBÁ'Bc              #  óæ   "  € V .pVP                   pVP                  pV'       dJ   V! 4       p\        V\        4      '       g   K'  Vx € \	        VP
                  4       F  pV! V4       K  	  KQ  R# 5i)zdBreadth-first iteration.

Iterates over all the subtrees, return nodes in order like pretty() does.
N)ÚappendÚpoprT   r5   rƒ   r8   )r   ÚstackÚstack_appendÚ	stack_popÚnodeÚchilds   &     r   Úiter_subtrees_topdownÚTree.iter_subtrees_topdown˜   s_   é € ð
 �ˆØ—|‘|ˆØ—I‘Iˆ	ßÙ“;ˆDÜ˜d¤D×)Ò)ÙØŠJÜ! $§-¡-Ö0�Ù˜UÖ#ó 1ñ ùs   ‚#A1¦AA1c                ó"   <€ V ^8„  d   QhRRRR/# )r   ÚpredzCallable[[Tree[_Leaf_T]], bool]r;   r   ru   )r&   r'   s   "€r   r(   r=   ¨   s   ø€ ÷ 2ñ 2Ð?ð 2ÐD]ñ 2r   c                ó4   € \        WP                  4       4      # )z?Returns all nodes of the tree that evaluate pred(node) as true.)Úfilterr‰   )r   r–   s   &&r   Ú	find_predÚTree.find_pred¨   s   € ä�d×.Ñ.Ó0Ó1Ð1r   c                ó$   <€ V ^8„  d   QhRS[ RR/# )r   r7   r;   r   r[   )r&   r'   s   "€r   r(   r=   ¬   s   ø€ ÷ 8ñ 8™cð 8Ð&?ñ 8r   c                ó.   a€ V P                  V3R l4      # )z?Returns all nodes of the tree whose data equals the given data.c                 ó"   <€ V P                   S8H  # r?   rL   )Útr7   s   &€r   Ú<lambda>Ú Tree.find_data.<locals>.<lambda>®   s   ø€ ¨¯©°$ªr   )r™   )r   r7   s   &fr   Ú	find_dataÚTree.find_data¬   s   ø€ à�~‰~Ô6Ó7Ð7r   c                ó6   <€ V ^8„  d   QhRS[ RS[S[,          /# )r   Ú
token_typer;   )r<   r   r2   )r&   r'   s   "€r   r(   r=   ²   s$   ø€ ÷ Yñ Y¡Sð Y©X±gÕ->ñ Yr   c                ó.   a€ V P                  V3R l4      # )z¼Returns all tokens whose type equals the given token_type.

This is a recursive function that will find tokens in all the subtrees.

Example:
    >>> term_tokens = tree.find_token('TERM')
c                 óR   <€ \        V \        4      ;'       d    V P                  S8H  # r?   )rT   r   Útype)Úvr¤   s   &€r   rŸ   Ú!Tree.find_token.<locals>.<lambda>º   s    ø€ ¬*°Q¼Ó*>×*WÐ*WÀ1Ç6Á6ÈZÑCWÐ*Wr   )Úscan_values)r   r¤   s   &fr   Ú
find_tokenÚTree.find_token²   s   ø€ ð ×ÑÔ WÓXÐXr   c                ó$  € Rp\        \        V P                  4      ^,
          RR4       Fb  pV P                  V,          p\        V\        4      '       g   K.  VP
                  V9   g   KA  VP                  V P                  W3^,           % RpKd  	  V# )z\Expand (inline) children with any of the given data values. Returns True if anything changedFTéÿÿÿÿ)ÚrangerS   r8   rT   r5   r7   )r   Údata_valuesÚchangedÚir’   s   &*   r   Úexpand_kids_by_dataÚTree.expand_kids_by_data¼   sp   € àˆÜ”s˜4Ÿ=™=Ó)¨!Õ+¨R°Ö4ˆAØ—M‘M !Õ$ˆEÜ˜%¤×&Ô&¨5¯:©:¸Ö+DØ',§~¡~�—‘˜a !¥Ð$Ø’ñ	 5ð
 ˆr   c                ó4   <€ V ^8„  d   QhRRRS[ S[,          /# )r   r–   z!Callable[[Branch[_Leaf_T]], bool]r;   )r   r2   )r&   r'   s   "€r   r(   r=   Ç   s"   ø€ ÷ ñ Ð Cð ÉÑQXÕHYñ r   c              #  óÄ   "  € V P                    FK  p\        V\        4      '       d   VP                  V4       F  pVx € K	  	  K7  V! V4      '       g   KG  Vx € KM  	  R# 5i)zÇReturn all values in the tree that evaluate pred(value) as true.

This can be used to find all the tokens in the tree.

Example:
    >>> all_tokens = tree.scan_values(lambda v: isinstance(v, Token))
N)r8   rT   r5   rª   )r   r–   rl   rž   s   &&  r   rª   ÚTree.scan_valuesÇ   sJ   é € ð —”ˆAÜ˜!œT×"Ò"ØŸ™ tÖ,�AØ”Gó -ñ ˜—7”7Ø”Gó ùs   ‚AA Á
A c                óz   € \        V 4      ! V P                  \        V P                  V4      V P                  R 7      # ))r:   )r§   r7   r   r8   r@   )r   Úmemos   &&r   Ú__deepcopy__ÚTree.__deepcopy__×   s(   € Ü�DŒz˜$Ÿ)™)¤X¨d¯m©m¸TÓ%BÈÏÉÔTÐTr   c                ó   <€ V ^8„  d   QhRR/# )r   r;   r3   ru   )r&   r'   s   "€r   r(   r=   Ú   s   ø€ ÷ 4ñ 4�oñ 4r   c                óN   € \        V 4      ! V P                  V P                  4      # r?   )r§   r7   r8   r   s   &r   ÚcopyÚ	Tree.copyÚ   s   € Ü�DŒz˜$Ÿ)™) T§]¡]Ó3Ð3r   c                ó(   <€ V ^8„  d   QhRS[ RRRR/# )r   r7   r8   r9   r;   Nr[   )r&   r'   s   "€r   r(   r=   Ý   s#   ø€ ÷ !ñ !™ð !Ð'>ð !À4ñ !r   c                ó   € Wn         W n        R # r?   rH   )r   r7   r8   s   &&&r   ÚsetÚTree.setÝ   s   € ØŒ	Ø Žr   c                ó0   <€ V ^8„  d   Qh/ S[ ;R&   R;R&   # )r   r7   r9   r8   r[   )r&   r'   s   "€r   r(   r=   &   s   ø‡ ‚ ñ$ �Iñ% ð& &Ñ%ò' r   )r@   r8   r7   r?   rH   )z  )r*   r+   r,   r-   Ú__doc__r   Úpropertyr:   rI   Ú__match_args__rM   rU   r_   re   rd   rr   rv   r|   r‰   r“   r™   r¡   r«   r³   rª   rº   r¾   rÂ   r.   r/   r0   r1   s   @r   r5   r5   &   sË   ø‡ € ñ÷(ò ð
 ÷ó ðò
;ð *€Nòò
9÷4ò 4÷"ò "òòò#÷7ð 7÷1ð 1ò$÷ 2ð 2÷8ð 8÷Yð Yò÷ð ò U÷4ð 4÷!ð !÷o ƒ r   r5   r   c                   ó   € ] tR t^åtRtRtR# )ÚSlottedTreeru   N)r7   r8   Úruler@   )r*   r+   r,   r-   Ú	__slots__r/   ru   r   r   rÉ   rÉ   å   s   † Ø3„Ir   rÉ   c                ó8   € V ^8„  d   QhR\         R\        RRRR/# )r   rj   ÚfilenameÚrankdirzLiteral["TB", "LR", "BT", "RL"]r;   N)r5   r<   )r&   s   "r   r(   r(   é   s*   € ÷ ñ œTð ¬Sð Ð;\ð Ðptñ r   c                 ó@   € \        W3/ VB pVP                  V4       R # r?   )Úpydot__tree_to_graphÚ	write_png©rj   rÍ   rÎ   ÚkwargsÚgraphs   &&&, r   Úpydot__tree_to_pngrÕ   é   s   € Ü  Ñ9°&Ñ9€EØ	‡O�O�HÖr   c                ó$   € V ^8„  d   QhR\         /# ©r   rj   ©r5   )r&   s   "r   r(   r(   î   s   € ÷ ñ œTñ r   c                 ó@   € \        W3/ VB pVP                  V4       R # r?   )rÐ   ÚwriterÒ   s   &&&, r   Úpydot__tree_to_dotrÛ   î   s   € Ü  Ñ9°&Ñ9€EØ	‡K�K�Ör   c                ó$   € V ^8„  d   QhR\         /# r×   rØ   )r&   s   "r   r(   r(   ó   s   € ÷ &ñ &œtñ &r   c                ó~   aaaaa€ ^ RI oSP                  ! RRRRV/VB o^ .oVVV3R loVVVVV3R loS! V 4       S# )a¡  Creates a colorful image that represents the tree (data+children, without meta)

Possible values for `rankdir` are "TB", "LR", "BT", "RL", corresponding to
directed graphs drawn from top to bottom, from left to right, from bottom to
top, and from right to left, respectively.

`kwargs` can be any graph attribute (e. g. `dpi=200`). For a list of
possible attributes, see https://www.graphviz.org/doc/info/attrs.html.
NÚ
graph_typeÚdigraphrÎ   c                 óš   <€ SP                  S^ ,          \        V 4      R7      pS^ ;;,          ^,          uu&   SP                  V4       V# )r   )Úlabel)ÚNodeÚreprÚadd_node)Úleafr‘   rÔ   r²   Úpydots   & €€€r   Únew_leafÚ&pydot__tree_to_graph.<locals>.new_leaf  s;   ø€ Ø�z‰z˜!˜A�$¤d¨4£jˆzÓ1ˆØ	ˆ!���	‹Ø�‰�tÔØˆr   c                 óÒ  <€ \        V P                  4      R ,          pVR,          pV P                   Uu. uF)  p\        V\        4      '       d	   S! V4      MS	! V4      NK+  	  ppS
P                  S^ ,          RRV,          V P                  R7      pS^ ;;,          ^,          uu&   SP                  V4       V F#  pSP                  S
P                  WE4      4       K%  	  V# u upi )iÿÿÿ i€€€ Úfilledz#%x)ÚstyleÚ	fillcolorrá   )	rz   r7   r8   rT   r5   râ   rä   Úadd_edgeÚEdge)rˆ   Úcolorr’   Úsubnodesr‘   ÚsubnodeÚ	_to_pydotrÔ   r²   rç   ræ   s   &     €€€€€r   rò   Ú'pydot__tree_to_graph.<locals>._to_pydot	  sÈ   ø€ Ü�W—\‘\Ó" XÕ-ˆØ�Õˆð ")×!1Ò!1ó3Ù!1˜ô )3°5¼$×(?Ò(?‘I˜eÔ$ÁXÈeÃ_ÒTÙ!1ð 	ð 3à�z‰z˜!˜A�$ h¸%À%½-ÈwÏ|É|ˆzÓ\ˆØ	ˆ!���	‹Ø�‰�tÔãˆGØ�N‰N˜5Ÿ:™: dÓ4Ö5ñ  ð ˆùò3s   µ/C$ru   )ræ   ÚDot)rj   rÎ   rÓ   rò   rÔ   r²   rç   ræ   s   &&,@@@@@r   rÐ   rÐ   ó   sG   ü€ ó Ø�IŠIÑF ÐF°GÐF¸vÑF€Eà	
ˆ€A÷÷ñ ñ ˆd„OØ€Lr   )ÚLR)Úsysr¾   r   Útypingr   r   r   r   r   r	   r
   r   Úlexerr   r   rk   ÚImportErrorr   r   r2   ÚBranchr5   Ú	ParseTreerÉ   rÕ   rÛ   rÐ   ru   r   r   Ú<module>rü      s£   ðÛ 
Ý ç ]× ]Ó ]å çÝ"ðÛõ ÷ñ ñ  �)Ó
€Ø	ˆw˜Ð'Õ	(€ôy!ˆ7�7Õô y!ðx ��M€	ô4�$ô 4÷÷
÷
&ñ &øðO ô Ùðús   ´B ÂB%Â$B%