+
    Ki7  c                   s   R t ^ RIt^ RIHt ^ RIHt ^ RIt]'       d   ^ RIHt  ]P                  ! RR4       ^ RIHt ^ R	IHt ^ R
IHt ^ RIHt  ! R R]4      t ! R R]4      tR#   ]
 d    ]P                  ! RR4        LLi ; i)zisort:skip_fileN)gettext)TYPE_CHECKING)OnlineServiceWebKit2z4.1z4.0)r   )LutrisConfig)ModalDialog)loggerc                   sh   a a ] tR t^t oRtR
V3R lV 3R llltR tR tR tR
R lt	R t
R	tVtV ;t# )WebConnectDialogz Login form for external servicesc                s   < V ^8  d   QhRR/# )i   servicer    )Zformat__classdict__s   "I/usr/lib/python3.14/site-packages/lutris/gui/dialogs/webconnect_dialog.pyZ__annotate__ZWebConnectDialog.__annotate__   s     F F F    c           	     s  < VP                   '       d   VP                  4        R Vn         \        P                  P	                  4       V n        R.p\        4       p\        P                  P                  R4      pV'       d!   VP                  R4      ^ ,          .V,           pVP                  P                  R4      pV'       d!   VP                  R4      ^ ,          .V,           p\        P                  ! RV RV RVR,           R24       V P
                  P                  V4       R	\        P                  9   di   \        P                  P	                  \        P                  R	,          4      pV P
                  P!                  \        P"                  P$                  V4       \        P&                  P)                  V P
                  P+                  4       VP,                  \        P.                  ! ^ 4      4       Wn        \2        S
V `i  VP6                  VR
7       V P9                  4       pV P;                  V P0                  P<                  V P0                  P>                  4       \        P@                  PC                  V P
                  4      V n"        V PD                  PG                  VPH                  4       V PD                  PK                  RV PL                  4       V PD                  PK                  RV PN                  4       V PD                  PK                  RV PP                  4       VPS                  ^ 4       VPU                  V PD                  R R ^ 4       V PD                  PW                  4       p	V	PY                  VPZ                  4       V	P]                  R 4       V	P_                  R 4       V	Pa                  R4       V Pc                  4        R# )TZen_USZLANGZ.Zlocalez1Webview locale fallback order: [Lutris locale]: 'z' -> [env: LANG]: 'z' -> [Default]: 'Z'Z
http_proxyZtitleparentzload-changedcreatezdecide-policyFNi)2is_login_in_progressZwipe_game_cacher   Z
WebContextZnewcontextr   osZenvironZgetZsplitZsystem_configr   ZdebugZset_preferred_languagesZNetworkProxySettingsZset_network_proxy_settingsZNetworkProxyModeZCUSTOMZCookieManagerZset_persistent_storageZget_cookie_managerZcookies_pathZCookiePersistentStorager   super__init__ZnameZget_content_areaset_default_sizeZlogin_window_widthZlogin_window_heightWebViewZnew_with_contextwebviewload_uriZ	login_urlconnecton_navigationon_webview_popupon_decide_policyset_border_width
pack_startZget_settingsZset_user_agentZlogin_user_agentZset_allow_modal_dialogsZset_enable_developer_extrasZset_enable_webglshow_all)selfr   r   Zwebview_localesZlutris_configZenvironment_locale_langZlutris_localeZproxyZcontent_areaZwebkit_settings	__class__s   &&&       r   r   ZWebConnectDialog.__init__   s   '''
 ##%'+$+2+=+=+A+A+C
 #)$"$**.."8"6<<SA!DEWO%3377A,2237:;oMO!!. 045 6*2./q2	
 	,,_=2::%0044RZZ5MNELL33G4L4L4S4SUZ[44LL++-  ++A.	

 w||F;,,.dll==t||?_?_`77Eg//0^T-?-?@Xt'<'<=_d.C.CD%%a(dD!<,,335 	&&w'?'?@ 	//5 	33D9((/r   c                sZ    V P                   P                  4       pVP                  4        R# )z4If you want a full blown Webkit inspector, call thisN)r   Zget_inspectorshow)r    Z	inspectors   & r   enable_inspectorZ!WebConnectDialog.enable_inspectorb   s     
 LL..0	r   c                sd    V\         P                  P                  8X  d   VP                  4        R # T)r   ZPolicyDecisionTypeZNAVIGATION_ACTIONZuse)r    r   ZdecisionZdecision_types   &&&&r   r   Z!WebConnectDialog.on_decide_policyj   s"    G66HHHLLNr   c                s  a V\         P                  P                  8X  EdM   VP                  4       oSV P                  P
                  9   d3   V P                  P
                  S,          pVP                  VR R 4       R# \        ;QJ d3    V3R lV P                  P                   4       F  '       g   K   RM(	  RM$! V3R lV P                  P                   4       4      '       d   V P                  P                  '       d0   VP                  4       pVP                  R V P                  R 4       R# RV P                  n        V P                  P                  S4       V P                  4        R# )NTc              3   sF   <"   T F  pSP                  V4      x  K  	  R # 5iN)Z
startswith)Z.0Zrurls   & r   Z	<genexpr>Z1WebConnectDialog.on_navigation.<locals>.<genexpr>v   s     I.H3>>!$$.Hs   !F)r   Z	LoadEventZFINISHEDget_urir   ZscriptsZrun_javascriptZanyZredirect_urisZrequires_login_pageZget_main_resourceZget_data_get_response_data_finishr   login_callbackdestroy)r    widgetZ
load_eventZscriptresourcer&   s   &&&  @r   r   ZWebConnectDialog.on_navigationo   s    **333.."Cdll***--c2%%fdD9sIdll.H.HIsssIdll.H.HIII<<333%779H%%dD,J,JDQ
  9>DLL5LL//4LLNr   c                s    VP                  V4      pR V P                  n        V P                  P                  V4       V P	                  4        R# )FN)Zget_data_finishr   r   r)   r*   )r    r,   ZresultZ	user_dataZhtml_responses   &&&& r   r(   Z*WebConnectDialog._get_response_data_finish   s9     008,1)##M2r   c                s    VP                  4       P                  4       p\        P                  P	                  V4      p\        WCV R7      pVP                  4        V# z3Handles web popups created by this dialog's webview)r   )get_requestr'   r   r   new_with_related_viewWebPopupDialogr"   )r    r+   navigation_actionuriviewZpopup_dialog   &&&   r   r   Z!WebConnectDialog.on_webview_popup   sJ    ++-55744V<%d=r   )r   r   r   r%   )__name__
__module____qualname____firstlineno____doc__r   r#   r   r   r(   r   __static_attributes____classdictcell____classcell__r!   r
      @@r   r   r      s3     *F FP
" r   r   c                   sR   a a ] tR t^t oRtRV 3R lltR tR tR tR t	Rt
VtV ;t# )	r0   zDialog for handling web popupsc                sd  < W0n         \        SV `	  \        R 4      VR7       Wn        V P                  P                  RV P                  4       V P                  P                  RV P                  4       V P                  P                  RV P                  4       V P                  P                  RV P                  4       V P                  P                  V4       V P                  P                  V P                  RR^ 4       V P                  P                  ^ 4       V P                  RR4       R	# )
z
Loading...r   zready-to-showznotify::titler   closeTi  i  N)r   r   r   _r   r   on_ready_webviewon_available_webview_titleon_new_webview_popupon_webview_closer   Zvboxr   r   r   )r    r   r2   r   r!   s   &&&&r   r   ZWebPopupDialog.__init__   s    qv>_d.C.CD_d.M.MNXt'@'@AWd&;&;<c"		T\\4q9		""1%c3'r   c                &    V P                  4        R # r%   )r   r    r      &&r   rA   ZWebPopupDialog.on_ready_webview   s    r   c                sD    V P                  VP                  4       4       R # r%   )Z	set_titleZ	get_title)r    r   Zgparamstrings   &&&r   rB   Z)WebPopupDialog.on_available_webview_title   s    w((*+r   c                s    VP                  4       P                  4       p\        P                  P	                  V4      pVP                  V4       \        WCV R7      pVP                  4        V# r-   )r.   r'   r   r   r/   r   r0   r"   )r    r   r1   r2   r3   Zdialogr4   r   rC   Z#WebPopupDialog.on_new_webview_popup   sS    ++-55744W=c$7r   c                rE   r$   )r?   rF   rG   r   rD   ZWebPopupDialog.on_webview_close   s    

r   )r   r   r%   )r5   r6   r7   r8   r9   r   rA   rB   rC   rD   r:   r;   r<   r=   r>   r   r0   r0      s&     ((, r   r0   )r9   r   r    r@   Ztypingr   ZgiZlutris.services.baser   Zrequire_versionZ
ValueErrorZgi.repositoryr   Zlutris.configr   Zlutris.gui.dialogsr   Zlutris.util.logr   r   r0   r	   r   r   <module>rH      sz     	     	2)y%( " & * "u{ up"[ "C  )y%()s   A) )BB