
    ,h                        d dl mZ ddlmZmZ d dlmZ d dlZd dlZddl	m
Z
  G d de      Z	 	 	 	 dd	Z	 	 d	 	 	 	 	 	 	 dd
Z	 	 	 	 ddZy)    )annotations   )event_classT_JSON_DICT)	dataclassN)runtimec                  <     e Zd ZdZddZedd       Z fdZ xZS )StreamHandlez
    This is either obtained from another method or specified as ``blob:<uuid>`` where
    ``<uuid>`` is an UUID of a Blob.
    c                    | S N )selfs    l/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/selenium/webdriver/common/devtools/v136/io.pyto_jsonzStreamHandle.to_json   s        c                     | |      S r   r   )clsjsons     r   	from_jsonzStreamHandle.from_json   s    4yr   c                >    dj                  t        | 	               S )NzStreamHandle({}))formatsuper__repr__)r   	__class__s    r   r   zStreamHandle.__repr__   s    !(()9);<<r   )returnstr)r   r   r   r
   )	__name__
__module____qualname____doc__r   classmethodr   r   __classcell__)r   s   @r   r
   r
      s+      = =r   r
   c              #  X   K   t               }| j                         |d<   d|d}|}yw)zu
    Close the stream, discard any temporary backing storage.

    :param handle: Handle of the stream to close.
    handlezIO.closemethodparamsN)dictr   )r$   r'   cmd_dictr   s       r   closer*      s6      &F~~'F8H >Ds   (*c              #     K   t               }| j                         |d<   |||d<   |||d<   d|d}|}d|v rt        |d         ndt        |d         t        |d	         fS w)
a  
    Read a chunk of the stream

    :param handle: Handle of the stream to read.
    :param offset: *(Optional)* Seek to the specified offset before reading (if not specified, proceed with offset following the last read). Some types of streams may only support sequential reads.
    :param size: *(Optional)* Maximum number of bytes to read (left upon the agent discretion if not specified).
    :returns: A tuple with the following items:

        0. **base64Encoded** - *(Optional)* Set if the data is base64-encoded
        1. **data** - Data that were read.
        2. **eof** - Set if the end-of-file condition occurred while reading.
    r$   NoffsetsizezIO.readr%   base64Encodeddataeof)r(   r   boolr   )r$   r,   r-   r'   r)   r   s         r   readr2   0   s     " &F~~'F8!xvH >D'6$'>T/"#DDLT%[ s   A$A&c              #  r   K   t               }| j                         |d<   d|d}|}t        |d         S w)z
    Return UUID of Blob object specified by a remote object id.

    :param object_id: Object id of a Blob object wrapper.
    :returns: UUID of the specified Blob.
    objectIdzIO.resolveBlobr%   uuid)r(   r   r   )	object_idr'   r)   r   s       r   resolve_blobr7   S   sG      &F"**,F:"H >DtF|s   57)r$   r
   r   z0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])NN)r$   r
   r,   typing.Optional[int]r-   r8   r   zZtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[typing.Optional[bool], str, bool]])r6   zruntime.RemoteObjectIdr   z/typing.Generator[T_JSON_DICT, T_JSON_DICT, str])
__future__r   utilr   r   dataclassesr   enumtyping r   r   r
   r*   r2   r7   r   r   r   <module>r?      s    # * !   =3 = 	7& (,%)  $  #  
b	 F)	6r   