
    +g<)                       S SK Jr  SSKJrJr  S SKJr  S SKrS SKrSSK	J
r
   " S S\5      r\ " S	 S
5      5       r " S S\R                  5      r " S S\R                  5      rSS jrSS jr    SS jr S    S!S jjr       S"               S#S jjr\" S5      \ " S S5      5       5       r\" S5      \ " S S5      5       5       r\" S5      \ " S S5      5       5       rg)$    )annotations   )event_classT_JSON_DICT)	dataclassN)ioc                  J   ^  \ rS rSrSrSS jr\SS j5       rU 4S jrSr	U =r
$ )	MemoryDumpConfig   zS
Configuration for memory dump. Used only when "memory-infra" category is enabled.
c                    U $ N selfs    v/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/selenium/webdriver/common/devtools/v85/tracing.pyto_jsonMemoryDumpConfig.to_json   s        c                    U " U5      $ r   r   clsjsons     r   	from_jsonMemoryDumpConfig.from_json       4yr   c                >   > SR                  [        TU ]	  5       5      $ )NzMemoryDumpConfig({}))formatsuper__repr__)r   	__class__s    r   r   MemoryDumpConfig.__repr__   s    %,,UW-=-?@@r   r   )returndict)r   r#   r"   r
   )__name__
__module____qualname____firstlineno____doc__r   classmethodr   r   __static_attributes____classcell__)r    s   @r   r
   r
      s-      A Ar   r
   c                      \ rS rSr% SrS\S'   SrS\S'   SrS\S'   SrS\S'   Sr	S	\S
'   Sr
S	\S'   SrS	\S'   SrS\S'   S r\S 5       rSrg)TraceConfig   Ntyping.Optional[str]record_modetyping.Optional[bool]enable_samplingenable_systraceenable_argument_filterz!typing.Optional[typing.List[str]]included_categoriesexcluded_categoriessynthetic_delaysz!typing.Optional[MemoryDumpConfig]memory_dump_configc                t   [        5       nU R                  b  U R                  US'   U R                  b  U R                  US'   U R                  b  U R                  US'   U R                  b  U R                  US'   U R
                  b  U R
                   Vs/ s H  o"PM     snUS'   U R                  b  U R                   Vs/ s H  o"PM     snUS'   U R                  b  U R                   Vs/ s H  o"PM     snUS'   U R                  b  U R                  R                  5       US'   U$ s  snf s  snf s  snf )	N
recordModeenableSamplingenableSystraceenableArgumentFilterincludedCategoriesexcludedCategoriessyntheticDelaysmemoryDumpConfig)
r#   r0   r2   r3   r4   r5   r6   r7   r8   r   )r   r   is      r   r   TraceConfig.to_json8   s=   v'!%!1!1D+%)%9%9D!"+%)%9%9D!"&&2+/+F+FD'(##/595M5M)N5M!5M)ND%&##/595M5M)N5M!5M)ND%&  ,262G2G&H2GQq2G&HD"#"".'+'>'>'F'F'HD#$ *O)N&Hs   D+D0.D5c                   U " SU;   a  [        US   5      OS SU;   a  [        US   5      OS SU;   a  [        US   5      OS SU;   a  [        US   5      OS SU;   a  US    Vs/ s H  n[        U5      PM     snOS SU;   a  US    Vs/ s H  n[        U5      PM     snOS SU;   a  US    Vs/ s H  n[        U5      PM     snOS SU;   a  [        R                  US   5      S	9$ S S	9$ s  snf s  snf s  snf )
Nr:   r;   r<   r=   r>   r?   r@   rA   )r0   r2   r3   r4   r5   r6   r7   r8   )strboolr
   r   r   r   rB   s      r   r   TraceConfig.from_jsonL   s%   3?43GD./T<LPT<TD&6!78Z^<LPT<TD&6!78Z^I_cgIg4-C(D#EmqPdhlPl6J1K L1KAQ1K LrvPdhlPl6J1K L1KAQ1K LrvJ[_cJcd3D.EF.Ec!f.EFimWimqWq/99$?Q:RS	
 		
 x|	
 		

 !M LFs   $C-
C20C7r   )r$   r%   r&   r'   r0   __annotations__r2   r3   r4   r5   r6   r7   r8   r   r)   r   r*   r   r   r   r-   r-      s     )-K%, .2O*1 .2O*1 5918 >B:A >B:A ;?7> =A9@( 

 

r   r-   c                  6    \ rS rSrSrSrSrS r\S 5       r	Sr
g)	StreamFormatZ   z
Data format of a trace. Can be either the legacy JSON format or the
protocol buffer format. Note that the JSON format will be deprecated soon.
r   protoc                    U R                   $ r   valuer   s    r   r   StreamFormat.to_jsonb       zzr   c                    U " U5      $ r   r   r   s     r   r   StreamFormat.from_jsone   r   r   r   N)r$   r%   r&   r'   r(   JSONPROTOr   r)   r   r*   r   r   r   rK   rK   Z   s,     DE  r   rK   c                  6    \ rS rSrSrSrSrS r\S 5       r	Sr
g)	StreamCompressionj   z:
Compression type to use for traces returned via streams.
nonegzipc                    U R                   $ r   rO   r   s    r   r   StreamCompression.to_jsonq   rR   r   c                    U " U5      $ r   r   r   s     r   r   StreamCompression.from_jsont   r   r   r   N)r$   r%   r&   r'   r(   NONEGZIPr   r)   r   r*   r   r   r   rX   rX   j   s,     DD  r   rX   c               #     #    SS0n U v ng7f)z
Stop trace events collection.
methodzTracing.endNr   )cmd_dictr   s     r   endre   y   s     
 	-H >Ds   
c               #  b   #    SS0n U v nUS    Vs/ s H  n[        U5      PM     sn$ s  snf 7f)zW
Gets supported tracing categories.

:returns: A list of supported tracing categories.
rc   zTracing.getCategories
categories)rE   )rd   r   rB   s      r   get_categoriesrh      s@      	)H >D ./.qCF.///s   /*/c              #  :   #    [        5       nXS'   SUS.nUv ng7f)z\
Record a clock sync marker in the trace.

:param sync_id: The ID of this clock sync marker
syncIdzTracing.recordClockSyncMarkerrc   paramsNr#   )sync_idrl   rd   r   s       r   record_clock_sync_markerro      s,      &F81H >Ds   c              #  v   #    [        5       nU b  XS'   SUS.nUv n[        US   5      [        US   5      4$ 7f)a1  
Request a global memory dump.

:param deterministic: *(Optional)* Enables more deterministic results by forcing garbage collection
:returns: A tuple with the following items:

    0. **dumpGuid** - GUID of the resulting global memory dump.
    1. **success** - True iff the global memory dump succeeded.
deterministiczTracing.requestMemoryDumprk   dumpGuidsuccess)r#   rE   rF   )rq   rl   rd   r   s       r   request_memory_dumprt      sU      &F "/-H >DDT)_ s   79c              #     #    [        5       nU b  XS'   Ub  XS'   Ub  X'S'   Ub  X7S'   Ub  UR                  5       US'   Ub  UR                  5       US'   Ub  UR                  5       US'   S	US
.nUv n	g7f)a  
Start trace events collection.

:param categories: *(Optional)* Category/tag filter
:param options: *(Optional)* Tracing options
:param buffer_usage_reporting_interval: *(Optional)* If set, the agent will issue bufferUsage events at this interval, specified in milliseconds
:param transfer_mode: *(Optional)* Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to ```ReportEvents````).
:param stream_format: *(Optional)* Trace data format to use. This only applies when using ````ReturnAsStream```` transfer mode (defaults to ````json````).
:param stream_compression: *(Optional)* Compression format to use. This only applies when using ````ReturnAsStream```` transfer mode (defaults to ````none```)
:param trace_config: *(Optional)*
Nrg   optionsbufferUsageReportingIntervaltransferModestreamFormatstreamCompressiontraceConfigzTracing.startrk   )r#   r   )
rg   rv   buffer_usage_reporting_intervaltransfer_modestream_formatstream_compressiontrace_configrl   rd   r   s
             r   startr      s     ( &F)|#y&21P-. !.~ !.!6!6!8~%&8&@&@&B"# , 4 4 6}!H >Ds   A3A5zTracing.bufferUsagec                  H    \ rS rSr% S\S'   S\S'   S\S'   \S	S j5       rSrg)
BufferUsage   typing.Optional[float]percent_fullevent_countrP   c                    U " SU;   a  [        US   5      OS SU;   a  [        US   5      OS SU;   a  [        US   5      S9$ S S9$ )NpercentFull
eventCountrP   )r   r   rP   )floatr   s     r   r   BufferUsage.from_json   s_    7D7LtM23RV5AT5Id<01t*1T/%W&
 	
 @D
 	
r   r   N)r   r   r"   r   )r$   r%   r&   r'   rI   r)   r   r*   r   r   r   r   r      s*    
 )('' "!
 
r   r   zTracing.dataCollectedc                  8    \ rS rSr% SrS\S'   \SS j5       rSrg)	DataCollected   z
Contains an bucket of collected trace events. When tracing is stopped collected events will be
send as a sequence of dataCollected events followed by tracingComplete event.
ztyping.List[dict]rP   c                R    U " US    Vs/ s H  n[        U5      PM     snS9$ s  snf )NrP   rO   rm   rG   s      r   r   DataCollected.from_json  s,    $(M2Mq47M2
 	
2s   $r   N)r   r   r"   r   	r$   r%   r&   r'   r(   rI   r)   r   r*   r   r   r   r   r      s!     
 
r   r   zTracing.tracingCompletec                  V    \ rS rSr% SrS\S'   S\S'   S\S'   S	\S
'   \SS j5       rSrg)TracingCompletei
  z
Signals that tracing is stopped and there is no trace buffers pending flush, all data were
delivered via dataCollected events.
rF   data_loss_occurredz typing.Optional[io.StreamHandle]streamtyping.Optional[StreamFormat]trace_format"typing.Optional[StreamCompression]r   c           	         U " [        US   5      SU;   a"  [        R                  R                  US   5      OS SU;   a  [        R                  US   5      OS SU;   a  [
        R                  US   5      S9$ S S9$ )NdataLossOccurredr   traceFormatrz   )r   r   r   r   )rF   r   StreamHandler   rK   rX   r   s     r   r   TracingComplete.from_json  s    #D);$<=@HD@P2??,,T(^<VZHUY]H]//]0CDcgYlptYt0::4@S;TU	
 	
 {	
 	
r   r   N)r   r   r"   r   r   r   r   r   r   r   
  s3     ,,//::
 
r   r   )r"   0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])r"   z<typing.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[str]])rn   rE   r"   r   r   )rq   r1   r"   zCtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[str, bool]])NNNNNNN)rg   r/   rv   r/   r|   r   r}   r/   r~   r   r   r   r   ztyping.Optional[TraceConfig]r"   r   )
__future__r   utilr   r   dataclassesr   enumtyping r   r#   r
   r-   EnumrK   rX   re   rh   ro   rt   r   r   r   r   r   r   r   <module>r      sy   # * !   At A 8
 8
 8
v499  		 
0	7$ 04,	J6 ,0(,BF.27;AE59'('%' *@' ,	'
 5' ?' 3' 
8'T "#

 
  $
& $%

 
  &
 &'

 
  (
r   