+
    Îi^                     Z    ^ RI t ^ RIt^ RIHt  ! R R]! RR4      4      t ! R R4      tR# )    N)
namedtuplec                   6   a a ] tR t^t oRtV 3R ltRtVtV ;t# )ExtTypez'ExtType represents ext type in msgpack.c                   < \        V\        4      '       g   \        R 4      h\        V\        4      '       g   \        R4      h^ Tu;8:  d   ^8:  g   M \	        R4      h\
        SV `  WV4      # )zcode must be intzdata must be byteszcode must be 0~127)
isinstanceint	TypeErrorbytes
ValueErrorsuper__new__)clscodedata	__class__s   &&&f/Users/ahmad/.openclaw/workspace/scripts/.venv/lib/python3.14/site-packages/pip/_vendor/msgpack/ext.pyr   ExtType.__new__	   s_    $$$.//$&&011DC122ws$//     )	__name__
__module____qualname____firstlineno____doc__r   __static_attributes____classdictcell____classcell__)r   __classdict__s   @@r   r   r      s     10 0r   r   z	code datac                      a  ] tR t^t o RtRR.tRR ltR tR tR t	R t
]R	 4       tR
 t]R 4       tR t]R 4       tR tR t]R 4       tRtV tR# )	TimestampaB  Timestamp represents the Timestamp extension type in msgpack.

When built with Cython, msgpack uses C methods to pack and unpack `Timestamp`.
When using pure-Python msgpack, :func:`to_bytes` and :func:`from_bytes` are used to pack and
unpack `Timestamp`.

This class is immutable: Do not override seconds and nanoseconds.
secondsnanosecondsc                    \        V\        4      '       g   \        R4      h\        V\        4      '       g   \        R4      h^ Tu;8:  d   R8  g   M \        R4      hWn        W n        R# )a  Initialize a Timestamp object.

:param int seconds:
    Number of seconds since the UNIX epoch (00:00:00 UTC Jan 1 1970, minus leap seconds).
    May be negative.

:param int nanoseconds:
    Number of nanoseconds to add to `seconds` to get fractional time.
    Maximum is 999_999_999.  Default is 0.

Note: Negative times (before the UNIX epoch) are represented as neg. seconds + pos. ns.
zseconds must be an integerznanoseconds must be an integerz?nanoseconds must be a non-negative integer less than 999999999.N ʚ;)r   r   r	   r   r!   r"   )selfr!   r"   s   &&&r   __init__Timestamp.__init__   sZ     '3''899+s++<==[(5(^__&r   c                <    RV P                    RV P                   R2# )z#String representation of Timestamp.zTimestamp(seconds=z, nanoseconds=)r!   r"   r%   s   &r   __repr__Timestamp.__repr__5   s#    #DLL>@P@P?QQRSSr   c                    \        V4      V P                  J d;   V P                  VP                  8H  ;'       d    V P                  VP                  8H  # R# )z0Check for equality with another Timestamp objectF)typer   r!   r"   r%   others   &&r   __eq__Timestamp.__eq__9   sA    ;$..(<<5==0ZZT5E5EIZIZ5ZZr   c                .    V P                  V4      '       * # )z(not-equals method (see :func:`__eq__()`))r2   r0   s   &&r   __ne__Timestamp.__ne__?   s    ;;u%%%r   c                D    \        V P                  V P                  34      # )N)hashr!   r"   r+   s   &r   __hash__Timestamp.__hash__C   s    T\\4#3#3455r   c                f   \        V 4      ^8X  d"   \        P                  ! RV 4      ^ ,          p^ pMv\        V 4      ^8X  d2   \        P                  ! RV 4      ^ ,          pVR,          pV^",	          pM5\        V 4      ^8X  d   \        P                  ! RV 4      w  r!M\        R4      h\	        W4      # )zUnpack bytes into a `Timestamp` object.

Used for pure-Python msgpack unpacking.

:param b: Payload from msgpack ext message with code -1
:type b: bytes

:returns: Timestamp object unpacked from msgpack ext payload
:rtype: Timestamp
!L!Ql    !IqzFTimestamp type can only be created from 32, 64, or 96-bit byte objects)lenstructunpackr   r    )br!   r"   data64s   &   r   
from_bytesTimestamp.from_bytesF   s     q6Q;mmD!,Q/GKVq[]]4+A.F11G B,KVr\#)==#: KX  ..r   c                X   V P                   ^",	          ^ 8X  df   V P                  ^",          V P                   ,          pVR,          ^ 8X  d   \        P                  ! RV4      pV# \        P                  ! RV4      p V# \        P                  ! RV P                  V P                   4      pV# )zPack this Timestamp object into bytes.

Used for pure-Python msgpack packing.

:returns data: Payload for EXT message with code -1 (timestamp type)
:rtype: bytes
l        r<   r=   r>   )r!   r"   r@   pack)r%   rC   r   s   &  r   to_bytesTimestamp.to_bytesa   s     LLB1$%%+dll:F**a/{{40 	 {{40  ;;ud&6&6EDr   c                n    \        V ^,          4      p\        V ^,          R,          4      p\        W4      # )zCreate a Timestamp from posix timestamp in seconds.

:param unix_float: Posix timestamp in seconds.
:type unix_float: int or float
r$   )r   r    )unix_secr!   r"   s   &  r   	from_unixTimestamp.from_unixv   s0     h!m$8a<501..r   c                J    V P                   V P                  R,          ,           # )zVGet the timestamp as a floating-point value.

:returns: posix timestamp
:rtype: float
g    eAr*   r+   s   &r   to_unixTimestamp.to_unix   s     ||d..444r   c                (    \        \        V R4      !  # )zCreate a Timestamp from posix timestamp in nanoseconds.

:param int unix_ns: Posix timestamp in nanoseconds.
:rtype: Timestamp
r$   )r    divmod)unix_nss   &r   from_unix_nanoTimestamp.from_unix_nano   s     &%011r   c                J    V P                   R,          V P                  ,           # )zfGet the timestamp as a unixtime in nanoseconds.

:returns: posix timestamp in nanoseconds
:rtype: int
r$   r*   r+   s   &r   to_unix_nanoTimestamp.to_unix_nano   s     ||e#d&6&666r   c                    \         P                  P                  p\         P                   P                  ^ V4      \         P                  ! V P
                  V P                  R,          R7      ,           # )zBGet the timestamp as a UTC datetime.

:rtype: `datetime.datetime`
  )r!   microseconds)datetimetimezoneutcfromtimestamp	timedeltar!   r"   )r%   r^   s   & r   to_datetimeTimestamp.to_datetime   sV    
 ##  ..q#69K9KLLt/?/?4/G:
 
 	
r   c                l    \        \        V P                  4       4      V P                  R,          R7      # )zACreate a Timestamp from datetime with tzinfo.

:rtype: Timestamp
rZ   r*   )r    r   	timestampmicrosecond)dts   &r   from_datetimeTimestamp.from_datetime   s&     R\\^!4"..SWBWXXr   )r"   r!   N)r   )r   r   r   r   r   	__slots__r&   r,   r2   r5   r9   staticmethodrD   rH   rL   rO   rT   rW   ra   rg   r   r   )r   s   @r   r    r       s      M*I',T&6 / /4* / /5 2 27
 Y Yr   r    )r\   r@   collectionsr   r   r    r   r   r   <module>rl      s/      "
0jK0 
0WY WYr   