+
     hB  c                   st   ^ RI t ^ RIt^ RIt^ RIt^ RIHtHt Rt]P                  ! 4       t]^ ,          R8X  dQ   ]^,          P                  R4       U u. uF  p ]
! V 4      NK  	  up ^	^ .8  d   ]R,          t] P                  ! R4      t] P                  ! R4      tR tR tR	 tR
 tR tR tR t]tR# u up i )i    N)errorxauthZDarwin.zF^/private/tmp/[-:a-zA-Z0-9._]*:(?P<dno>[0-9]+)(\.(?P<screen>[0-9]+))?$zZ^((?P<proto>tcp|unix)/)?(?P<host>[-:a-zA-Z0-9._]*):(?P<dno>[0-9]+)(\.(?P<screen>[0-9]+))?$c           
      s:   V f!   \         P                  P                  RR4      p \        / 3.pR\        9   d   VP                  ^ \        RR/34       V F^  w  r#VP                  ! V 4      pVf   K  R Uu. uF1  pVP                  4       P                  WSP                  V4      4      NK3  	  upw  rgr M	  \        P                  ! V 4      hVR8X  d   V'       g   \        P                  ! V 4      h\        V4      pV	'       d   \        V	4      p	M^ p	WWxV	3# u upi )NZDISPLAYZ darwinprotocoltcp)Zprotohostdnoscreen)osZenvironZget
DISPLAY_RESUPPORTED_PROTOCOLSZinsertDARWIN_DISPLAY_REZmatchZ	groupdictr    ZDisplayNameErrorint)
ZdisplayZre_listreZdefaultsZmZfieldr   r   r   r   s
   &         >/usr/lib/python3.14/site-packages/Xlib/support/unix_connect.pyget_displayr   (   s   **..B/B G&&q,z8.DEFHHW= @+?E !!%e)<=?+'HC    $$W--5$$W--
c(CVd//%+s   67Dc                 s    \         P                   ! \         P                  \         P                  4      pVP                  V R V,           34       V# )ip  )socketZAF_INETSOCK_STREAMconnect)r   r   ss   && r   _get_tcp_socketr   J   s6    fnnf&8&89AIItTCZ !H    c                 s    \         P                   ! \         P                  \         P                  4      pVP                  V 4       V# N)r   ZAF_UNIXr   r   )addressr      & r   _get_unix_socketr   P   s-    fnnf&8&89AIIgHr   c                 s    VR 8X  d   \        V 4      pMiVe   VR8w  d   V'       d   VR8w  d   \        W#4      pMCRV,          p\        P                  P	                  V4      '       g
   RV,           p \        V4      p\        V4       V#   \
        P                   d     T'       g   T'       g   \        Y#4      p L?h i ; i  \
        P                   d&   p\        P                  ! T \        T4      4      hRp?ii ; i)r   Nunixz/tmp/.X11-unix/X%dZ )
r   r   r	   ZpathZexistsr   r    ZDisplayConnectionErrorZstr_ensure_not_inheritable)dnamer   r   r   r   r   Zvals   &&&&   r   
get_socketr   V   s    <x 'A (f"4$46>*A +S0G77>>'**.$W- AH << '2A << <**5#c(;;<sV   C C C -C )	C 3B B?(B?0B?;C =B??C C< C77C<c                 s    \        V R 4      '       d   V P                  R4       R# \        P                  ! 4       R8X  d   R# ^ RIpVP	                  V P                  4       VP                  VP                  4       R# )set_inheritableFNZWindows)Zhasattrr   platformZsystemfcntlZfilenoZF_SETFDZ
FD_CLOEXEC)sockr!   r   r   r   r   x   s\     t&''U#
 I% 		KKu}}e.>.>?r   c                 s   VR 8X  d'   \         P                  p\        P                  ! 4       pMVR8X  dJ   \         P                  pV P                  4       ^ ,          P                  R4      p\        R V 4       4      pM3\         P                  p\        P                  ! 4       P                  4       p \         P                  ! 4       p  TP                  YVT4      #   \        P                   d    Ru # i ; i  \        P                   d     Mi ; iT\         P                  8X  d=   TR8X  d6   \         P                  p\        P                  ! 4       P                  4       pK  R# )r   r   r   c              3   s8   "   T F  p\        V4      x  K  	  R # 5ir   )r   )Z.0xr   r   Z	<genexpr>Znew_get_auth.<locals>.<genexpr>   s     0AQs   s     )r   r   )r   ZFamilyLocalr   ZgethostnameZFamilyInternetZgetpeernamesplitZ	bytearrayZencodeZ
Xauthorityr    Z
XauthErrorZget_best_authZXNoAuthError)	r"   r   r   r   r   ZfamilyZaddrZoctetsZaus	   &&&&&    r   new_get_authr%      s.    8""!!#	U	%% !!#A&,,S1000""!!#**, 	##F#66   !! 		 U)))d6I.I&&F%%'..0DOs$   2C 	C8 C54C58DDc           
      s&   R ;rE \         P                  ! RV,          4      P                  4       pVP                  R4      p\	        V4      ^8  d   V^ ,          P                  R^4      p\	        V4      ^8X  dY   V^,          pV^,          p	R p
\        ^ \	        V	4      ^4       F(  pV
\        \        WV^,            ^4      4      ,           p
K*  	  T
pT'       g   TR8X  d   \        RT,          RT4      # YE3#   \         P                   d     L=i ; i)r   zxauth list %s 2>/dev/nullZ
NZ	localhostzunix:%dr   )
r	   ZpopenZreadr$   ZlenZrangeZchrr   r    get_auth)r"   r   r   r   Z	auth_nameZ	auth_dataZdataZlinesZpartsZhexauthZauthZis   &&&&        r   old_get_authr'      s    I xx3e;<AAC 

4 u:?!HNN4+E5zQ!!H	( q#g,2A#c'AaC."&=">>D 3 !	 {* 	C55 88 s   CC8 8DD)Nr   r   )r   )r   r	   r    r   ZXlibr    r   r   Zunamer$   r   Zcompiler   r
   r   r   r   r   r   r%   r'   r&   )r#   s   0r   <module>r(      s   , 
 	    ,  		!Has0CD0C1A0CDAN;&

#lmZZuv
0DD@4%P% N A  Es   B5