
    vKg(                         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 SK	r	S SK
Jr  S SK
Jr   " S S\5      r " S	 S
5      rg)    N)Enum)Optional)parse)Proxy)	ProxyTypec                        \ rS rSrSrSrSrSrg)AuthType   BasicBearerz	X-API-Key N)__name__
__module____qualname____firstlineno__BASICBEARER	X_API_KEY__static_attributes__r       g/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/selenium/webdriver/remote/client_config.pyr	   r	      s    EFIr   r	   c                      \ rS rSrS\" S\R                  0S9SSSSSS\R                  SSS4S\	S\
\   S	\
\   S
\
\   S\
\   S\
\   S\
\	   S\
\	   S\
\	   S\
\   S\
\	   S\
\	   S\
\   SS4S jjr\S\	4S j5       r\R"                  S\	SS4S j5       r\S\4S j5       r\R"                  S\SS4S j5       r\S\4S j5       r\R"                  S	\SS4S j5       r\S\4S j5       r\R"                  S
\SS4S j5       r\S\4S j5       r\R"                  S\SS4S  j5       r\S\4S! j5       r\R"                  S\SS4S" j5       rS5S# jr\S\	4S$ j5       r\R"                  S\	SS4S% j5       r\S\	4S& j5       r\R"                  S\	SS4S' j5       r\S\	4S( j5       r\R"                  S\	SS4S) j5       r\S\4S* j5       r\R"                  S\SS4S+ j5       r\S\	4S, j5       r\R"                  S\	SS4S- j5       r\S\	4S. j5       r\R"                  S\	SS4S/ j5       r\S\4S0 j5       r\R"                  S\SS4S1 j5       rS\
\	   4S2 jrS\
\   4S3 jr S4r!g)6ClientConfig$   T	proxyType)rawFNremote_server_addr
keep_aliveproxyignore_certificatesinit_args_for_pool_managertimeoutca_certsusernamepassword	auth_typetoken
user_agentextra_headersreturnc           	      8   Xl         X l        X0l        X@l        U=(       d    0 U l        X`l        Xl        Xl        Xl        Xl	        Xl
        Xl        Uch  [        R                  " S5      b<  [        [        R                  " S[        [         R"                  " 5       5      5      5      O[         R"                  " 5       OUU l        UcL  S[        R$                  ;   a  [        R                  " S5      U l        g [&        R(                  " 5        U l        g UU l        g )NGLOBAL_DEFAULT_TIMEOUTREQUESTS_CA_BUNDLE)r   r   r   r    r!   r"   r$   r%   r&   r'   r(   r)   osgetenvfloatstrsocketgetdefaulttimeoutenvironcertifiwherer#   )selfr   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   s                 r   __init__ClientConfig.__init__%   s      #5$
#6 *D*J'  "
$*  9956B bii 8#f>V>V>X:YZ[--/  	  1E

0RRYY+, 	X_XeXeXg 	  	r   c                     U R                   $ )z+:Returns: The address of the remote server._remote_server_addrr7   s    r   r   ClientConfig.remote_server_addrR   s     '''r   valuec                     Xl         g)z*Provides the address of the remote server.Nr;   r7   r?   s     r   r   r>   W   s
     $) r   c                     U R                   $ )z:Returns: The keep alive value._keep_aliver=   s    r   r   ClientConfig.keep_alive\        r   c                     Xl         g)zZToggles the keep alive value.

:Args:
 - value: whether to keep the http connection alive
NrC   rA   s     r   r   rE   a   s
     !r   c                     U R                   $ )z@:Returns: The proxy used for communicating to the driver/server._proxyr=   s    r   r   ClientConfig.proxyj        {{r   c                     Xl         g)zProvides the information for communicating with the driver or
server.
For example: Proxy(raw={"proxyType": ProxyType.SYSTEM})

:Args:
 - value: the proxy information to use to communicate with the driver or server
NrI   )r7   r   s     r   r   rK   o   s	     r   c                     U R                   $ )z-:Returns: The ignore certificate check value._ignore_certificatesr=   s    r   r     ClientConfig.ignore_certificatesz   s     (((r   c                     Xl         g)zZToggles the ignore certificate check.

:Args:
 - value: value of ignore certificate check
NrO   )r7   r    s     r   r    rQ      s
     %8!r   c                     U R                   $ )z[:Returns: The dictionary of arguments will be appended while
initializing the pool manager._init_args_for_pool_managerr=   s    r   r!   'ClientConfig.init_args_for_pool_manager   s     ///r   c                     Xl         g)a  Provides dictionary of arguments will be appended while initializing the pool manager.
For example: {"init_args_for_pool_manager": {"retries": 3, "block": True}}

:Args:
 - value: the dictionary of arguments will be appended while initializing the pool manager
NrT   )r7   r!   s     r   r!   rV      s     ,F(r   c                     U R                   $ )zO:Returns: The timeout (in seconds) used for communicating to the
driver/server._timeoutr=   s    r   r"   ClientConfig.timeout   s     }}r   c                     Xl         g)zProvides the timeout (in seconds) for communicating with the driver
or server.

:Args:
 - value: the timeout (in seconds) to use to communicate with the driver or server
NrY   )r7   r"   s     r   r"   r[      s	      r   c                 8    [         R                  " 5       U l        g)z2Resets the timeout to the default value of socket.N)r2   r3   rZ   r=   s    r   reset_timeoutClientConfig.reset_timeout   s    002r   c                     U R                   $ )z0:Returns: The path to bundle of CA certificates.	_ca_certsr=   s    r   r#   ClientConfig.ca_certs   s     ~~r   c                     Xl         g)zProvides the path to bundle of CA certificates for establishing
secure connections.

:Args:
 - value: the path to bundle of CA certificates for establishing secure connections
Nra   )r7   r#   s     r   r#   rc      s	     "r   c                     U R                   $ )zHReturns the username used for basic authentication to the remote
server.	_usernamer=   s    r   r$   ClientConfig.username        ~~r   c                     Xl         g)zESets the username used for basic authentication to the remote
server.Nrf   rA   s     r   r$   rh      	     r   c                     U R                   $ )zHReturns the password used for basic authentication to the remote
server.	_passwordr=   s    r   r%   ClientConfig.password   ri   r   c                     Xl         g)zESets the password used for basic authentication to the remote
server.Nrm   rA   s     r   r%   ro      rk   r   c                     U R                   $ )z8Returns the type of authentication to the remote server.
_auth_typer=   s    r   r&   ClientConfig.auth_type   s     r   c                     Xl         g)zSets the type of authentication to the remote server if it is not
using basic with username and password.

:Args: value - AuthType enum value. For others, please use `extra_headers` instead
Nrr   rA   s     r   r&   rt      s	      r   c                     U R                   $ )z?Returns the token used for authentication to the remote server._tokenr=   s    r   r'   ClientConfig.token   rL   r   c                     Xl         g)zVSets the token used for authentication to the remote server if
auth_type is not basic.Nrw   rA   s     r   r'   ry      s	     r   c                     U R                   $ )z6Returns user agent to be added to the request headers._user_agentr=   s    r   r(   ClientConfig.user_agent   rF   r   c                     Xl         g)z3Sets user agent to be added to the request headers.Nr|   rA   s     r   r(   r~      s
     !r   c                     U R                   $ )z1Returns extra headers to be added to the request._extra_headersr=   s    r   r)   ClientConfig.extra_headers   s     """r   c                     Xl         g)z.Sets extra headers to be added to the request.Nr   rA   s     r   r)   r      s
     $r   c                 F   U R                   R                  n[        R                  " U R                  5      nU[
        R                  L a  gU[
        R                  L Gad  [        R                  R                  S[        R                  R                  S5      5      nU(       a  [        [        R                  UR                  S5      5       Hj  nUS:X  a    g[        R                  " U5      nUR                  (       a  UR                  UR                  :X  a    gUR                   UR                  ;   d  Mj    g   [        R                  R                  U R                  R#                  S5      (       a  SOS[        R                  R                  U R                  R#                  S5      (       a
  S	5      5      $ S
5      5      $ U[
        R$                  L aL  U R                  R#                  S5      (       a  U R                   R&                  $ U R                   R(                  $ g)z0Returns the proxy URL to use for the connection.Nno_proxyNO_PROXY,*zhttps://https_proxy
http_proxyHTTPS_PROXY
HTTP_PROXY)r   
proxy_typer   urlparser   r   DIRECTSYSTEMr.   r4   getmapr1   stripsplitnetlocpath
startswithMANUALsslProxyr   )r7   r   
remote_add	_no_proxyentryn_urls         r   get_proxy_urlClientConfig.get_proxy_url   s   ZZ**
^^D$;$;<
))))))

z2::>>*3MNI IOOC,@AE|#!NN51E||
(9(9U\\(I#zzZ%6%66# B ::>>!%!8!8!C!CJ!O!OUa

0G0G0R0RS]0^0^}q dpq  )))*.*A*A*L*LZ*X*X4::&&s^b^h^h^s^ssr   c                    U R                   [        R                  L a  U R                  (       a  U R                  (       ap  U R                   SU R                   3n[
        R                  " UR                  S5      5      R                  S5      nS[        R                  R                   SU 30$ U R                   [        R                  L a<  U R                  (       a+  S[        R                  R                   SU R                   30$ U R                   [        R                  L a9  U R                  (       a(  [        R                  R                   U R                   0$ g)z8Returns the authorization to add to the request headers.:zutf-8Authorization N)r&   r	   r   r$   r%   base64	b64encodeencodedecoder?   r   r'   r   )r7   credentialsencoded_credentialss      r   get_auth_headerClientConfig.get_auth_header  s    >>X^^+$--!]]O1T]]O<K"("2"2;3E3Eg3N"O"V"VW^"_#(<(<'=Q?R>S%TUU>>X__,#(=(='>a

|%LMM>>X///DJJ))//0djj\CCr   )rs   rb   r   rP   rU   rD   rn   rJ   r<   rZ   rx   r}   rg   r&   r#   r)   r    r!   r   r%   r   r   r"   r'   r(   r$   )r*   N)"r   r   r   r   r   r   r   r	   r   r1   r   booldictintr8   propertyr   setterr   r   r    r!   r"   r^   r#   r$   r%   r&   r'   r(   r)   r   r   r   r   r   r   r   r   $   s    &*!&K9I9I+J!K.359!%"&"&"&(0#$((,+
+
 TN+
 	+

 &d^+
 %-TN+
 #+
 3-+
 3-+
 3-+
 H%+
 }+
 SM+
  ~+
 
+
Z (C ( ( ) ) ) )  D     ! ! ! ! u   \\5 T   )T ) ) 8t 8 8  8 0D 0 0
  &&FT Fd F 'F   
 ^^ s  t    3 #   __" " " " #  
 __c d  
 #  
 __c d  
 8    x  D     s   \\3 4  
  C     ! ! ! ! #t # # $4 $D $ $x} 2
$ 
r   r   )r   r.   r2   enumr   typingr   urllibr   r5   selenium.webdriver.common.proxyr   r   r	   r   r   r   r   <module>r      s:   "  	      1 5t  r   