+
    \åûjƒ  ã                  óº   € ^ RI Ht ^ RIHtHt ]'       d   ^ RIHtHt ^RIH	t	 ]! R4      t
. ROtR R ltR R	 ltR
 R ltR R ltR R ltR R ltR R ltR# )é    )Úannotations)ÚTYPE_CHECKINGÚTypeVar)ÚCallableÚIterable)ÚVarÚ_Tc               ó    € V ^8„  d   QhRRRR/# )é   ÚxÚobjectÚreturnÚbool© )Úformats   "ÚcC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\torch\fx\experimental\unification\utils.pyÚ__annotate__r      s   € ÷ ñ �ð ˜4ñ ó    c                óB   €  \        V 4       R #   \         d     R# i ; i)TF)ÚhashÚ	TypeError)r   s   &r   Úhashabler      s#   € ðÜˆQŒÙøÜô Úðús   ‚ ��c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úkeyr   Údzdict[Var, object]r   r   )r   s   "r   r   r      s"   € ÷ 
ñ 
˜ð 
Ð#4ð 
¸ñ 
r   c                óH   € \        V 4      '       d   W9   d   W,          p K!  V # )zYTransitive dict.get
>>> d = {1: 2, 2: 3, 3: 4}
>>> d.get(1)
2
>>> transitive_get(1, d)
4
)r   )r   r   s   &&r   Útransitive_getr      s   € ô �3�-Š-˜CœHØ�fŠØ€Jr   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úerrztype[BaseException]ÚlamdaúCallable[[], object]r   r   r   )r   s   "r   r   r   &   s&   € ÷ ñ Ø	ðàðð 
ñr   c                ó2   €  V! 4        R #   T  d     R# i ; i)FTr   )r   r    s   &&r   Úraisesr#   &   s!   € ðÙŒÙøØô Úðús   ‚ ‹•c               ó    € V ^8„  d   QhRRRR/# )r   Úedgesúdict[_T, Iterable[_T]]r   zlist[_T]r   )r   s   "r   r   r   3   s   € ÷ ñ Ð+ð °ñ r   c                ó˜  a€ \        V 4      oSP                  4        UUu/ uF  w  rV\        V4      bK  	  uppoV  Uu0 uF  q3S9  g   K  VkK  	  pp. pV'       d—   VP                  4       pVP	                  V4       V P                  VR4       F]  pVSV,          9  d   \        RV RV R24      hSV,          P                  V4       SV,          '       d   KL  VP                  V4       K_  	  Kž  \        ;QJ d    V3R lV  4       F  '       g   K   RM	  RM! V3R lV  4       4      '       d   \        R4      hV# u uppi u upi )	aÚ  Topological sort algorithm by Kahn [1] - O(nodes + vertices)
inputs:
    edges - a dict of the form {a: {b, c}} where b and c depend on a
outputs:
    L - an ordered list of nodes that satisfy the dependencies of edges
>>> # xdoctest: +SKIP
>>> _toposort({1: (2, 3), 2: (3,)})
[1, 2, 3]
Closely follows the wikipedia page [2]
[1] Kahn, Arthur B. (1962), "Topological sorting of large networks",
Communications of the ACM
[2] http://en.wikipedia.org/wiki/Toposort#Algorithms
z	Expected z in incoming_edges[Ú]c              3  óF   <"  € T F  pSP                  V4      x € K  	  R # 5i)N©Úget)Ú.0ÚvÚincoming_edgess   & €r   Ú	<genexpr>Ú_toposort.<locals>.<genexpr>O   s   øé € Ð
0©% Qˆ>×Ñ˜a× Ð «%ùs   ƒ!TFzInput has cyclesr   )Úreverse_dictÚitemsÚsetÚpopÚappendr+   ÚAssertionErrorÚremoveÚaddÚanyÚ
ValueError)	r%   ÚkÚvalr-   ÚSÚLÚnÚmr.   s	   &       @r   Ú	_toposortrA   3   s  ø€ ô " %Ó(€NØ0>×0DÑ0DÔ0FÔGÑ0F¡f a�aœ˜S›’kÑ0FÒG€NÙÓ5‘Eˆq nÑ4�ˆ‘E€AÐ5Ø
€Aç
Ø�E‰E‹GˆØ	�‰�ŒØ—‘˜1˜bÖ!ˆAØ˜ qÕ)Ô)Ü$ y°°Ð3FÀqÀcÈÐ%KÓLÐLØ˜1Õ×$Ñ$ QÔ'Ø! !×$Ö$Ø—‘�a–ó "÷ ƒsÔ
0©%Ó
0‡s‡s‚sÔ
0©%Ó
0×0Ò0ÜÐ+Ó,Ð,Ø€Hùó HùÚ5s    E¿EÁEc               ó    € V ^8„  d   QhRRRR/# )r   r   r&   r   zdict[_T, tuple[_T, ...]]r   )r   s   "r   r   r   T   s   € ÷ ñ Ð*ð Ð/Gñ r   c                ór   € / pV  F.  pW,           F  pVP                  VR4      V3,           W&   K!  	  K0  	  V# )a„  Reverses direction of dependence dict.

>>> d = {"a": (1, 2), "b": (2, 3), "c": ()}
>>> reverse_dict(d)  # doctest: +SKIP
{1: ('a',), 2: ('a', 'b'), 3: ('b',)}

.. note::
    dict order is not deterministic. As we iterate on the
    input dict, it makes the output of this function depend on the
    dict order. So this function output order should be considered
    as nondeterministic.
r   r*   )r   Úresultr   r<   s   &   r   r1   r1   T   sA   € ð €FÛˆØ—6�6ˆCà Ÿ*™* S¨"Ó-°°Õ6ˆF‹Kó ñ ð €Mr   c               ó    € V ^8„  d   QhRRRR/# )r   Úfuncr!   r   ÚNoner   )r   s   "r   r   r   i   s   € ÷ ñ Ð$ð ¨ñ r   c                óL   €  V ! 4        \        R 4      h  \          d     R# i ; i)zXFailed test passedN)Ú	Exception)rF   s   &r   ÚxfailrJ   i   s*   € ðÙŒÜÐ-Ó.Ð.øÜô Úðús   ‚ ”#¢#c               ó    € V ^8„  d   QhRRRR/# )r   r   r   r   r   )r   s   "r   r   r   q   s   € ÷ ñ ˆfð ˜ñ r   c                óH  € \        V \        4      '       d(   \        \        \        V P                  4       4      4      # \        V \        4      '       d   \        \        \        V 4      4      # \        V \        \        34      '       d   \        \        \        V 4      4      # V # )z…Freeze container to hashable form
>>> freeze(1)
1
>>> freeze([1, 2])
(1, 2)
>>> freeze({1: 2})  # doctest: +SKIP
frozenset([(1, 2)])
)	Ú
isinstanceÚdictÚ	frozensetÚmapÚfreezer2   r3   ÚtupleÚlist)r   s   &r   rQ   rQ   q   sn   € ô �!”T×ÒÜœœV Q§W¡W£YÓ/Ó0Ð0Ü�!”S×ÒÜœœV Q›Ó(Ð(Ü�!”eœT�]×#Ò#Ü”Sœ “^Ó$Ð$Ø€Hr   N)r   r   r#   r1   rJ   rQ   )Ú
__future__r   Útypingr   r   Úcollections.abcr   r   Úvariabler   r	   Ú__all__r   r   r#   rA   r1   rJ   rQ   r   r   r   Ú<module>rY      sK   ðÝ "ç )÷ ß2åáˆTƒ]€ò V€õõ
õõõBõ*÷r   