+
    lh                     .   R t ^ RIt^ RIt^ RIt^ RIHtHt Rt]P                  R29   d   R;t	t
M5]P                  R8X  d   Rt
Rt	M^ RIt]P                  ! 4       t]R	8H  t	]R39   t
R
tRt]	'       d   RtRt. R4Ow  tttt]t]t]! ]4       ! R R4      4       t^^,          ^,
          tR5tR6tR7tR8tR9tR:tR;tR<t  ! R R4      t!R t"R t#R t$R t%R t&R t'R t(R t)R t*R t+ ^ RI,t,]-! ],RR4      t.],P^                  t0]-! ],RR4      t1R t3R t4R t5]
'       d   ](]'.t6M>]P                  R8X  d   ]'])]+.t6M']P                  R8X  d   . t6M]	'       d   ]+.t6M]'](])]+]*.t6]Pn                  R8X  d   ]3.]6,           t8M]Pn                  R 8X  d   ]4.]6,           t8M]6t8Rs9R! t:Rs;R=R" lt<R# t=R$ t>R% t?Rs@R=R& ltARsB^ sCR' tDR( tER>R) ltFR* tG]!! R+4      tH]!! R,4      tI]!! R-4      tJ]!! R.4      tK]!! R/4      tL]!! R04      tM]NR18X  d
   ]G! 4        R# R#   ]2 d    Rt,Rt.Rt0Rt1 ELi ; i)?a  UUID objects (universally unique identifiers) according to RFC 4122/9562.

This module provides immutable UUID objects (class UUID) and functions for
generating UUIDs corresponding to a specific UUID version as specified in
RFC 4122/9562, e.g., uuid1() for UUID version 1, uuid3() for UUID version 3,
and so on.

Note that UUID version 2 is deliberately omitted as it is outside the scope
of the RFC.

If all you want is a unique ID, you should probably call uuid1() or uuid4().
Note that uuid1() may compromise privacy since it creates a UUID containing
the computer's network address.  uuid4() creates a random UUID.

Typical usage:

    >>> import uuid

    # make a UUID based on the host ID and current time
    >>> uuid.uuid1()    # doctest: +SKIP
    UUID('a8098c1a-f86e-11da-bd1a-00112444be1e')

    # make a UUID using an MD5 hash of a namespace UUID and a name
    >>> uuid.uuid3(uuid.NAMESPACE_DNS, 'python.org')
    UUID('6fa459ea-ee8a-3ca4-894e-db77e160355e')

    # make a random UUID
    >>> uuid.uuid4()    # doctest: +SKIP
    UUID('16fd2706-8baf-433b-82eb-8c7fada847da')

    # make a UUID using a SHA-1 hash of a namespace UUID and a name
    >>> uuid.uuid5(uuid.NAMESPACE_DNS, 'python.org')
    UUID('886313e1-3b8a-5372-9b90-0c9aee199e5d')

    # make a UUID from a string of hex digits (braces and hyphens ignored)
    >>> x = uuid.UUID('{00010203-0405-0607-0809-0a0b0c0d0e0f}')

    # convert a UUID to a string of hex digits in standard form
    >>> str(x)
    '00010203-0405-0607-0809-0a0b0c0d0e0f'

    # get the raw 16 bytes of the UUID
    >>> x.bytes
    b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f'

    # make a UUID from a 16-byte string
    >>> uuid.UUID(bytes=x.bytes)
    UUID('00010203-0405-0607-0809-0a0b0c0d0e0f')

    # get the Nil UUID
    >>> uuid.NIL
    UUID('00000000-0000-0000-0000-000000000000')

    # get the Max UUID
    >>> uuid.MAX
    UUID('ffffffff-ffff-ffff-ffff-ffffffffffff')
N)Enum_simple_enumzKa-Ping Yee <ping@zesty.ca>win32darwinFlinuxTAIX   :   .c                   "    ] tR t^^t^ tRtRtRtR# )SafeUUIDN )__name__
__module____qualname____firstlineno__safeunsafeunknown__static_attributes__r       lib/python3.14/uuid.pyr   r   ^   s    DFGr   r   c                     a  ] tR t^rt o RtR"tR#R]P                  /R llt]	R 4       t
R tR tR tR	 tR
 tR tR tR tR tR tR tR t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t ]R 4       t!]R 4       t"]R 4       t#]R 4       t$]R 4       t%]R  4       t&R!t'V t(R# )$UUIDa
  Instances of the UUID class represent UUIDs as specified in RFC 4122.
UUID objects are immutable, hashable, and usable as dictionary keys.
Converting a UUID to a string with str() yields something in the form
'12345678-1234-1234-1234-123456789abc'.  The UUID constructor accepts
five possible forms: a similar string of hexadecimal digits, or a tuple
of six integer fields (with 32-bit, 16-bit, 16-bit, 8-bit, 8-bit, and
48-bit values respectively) as an argument named 'fields', or a string
of 16 bytes (with all the integer fields in big-endian order) as an
argument named 'bytes', or a string of 16 bytes (with the first three
fields in little-endian order) as an argument named 'bytes_le', or a
single 128-bit integer as an argument named 'int'.

UUIDs have these read-only attributes:

    bytes       the UUID as a 16-byte string (containing the six
                integer fields in big-endian byte order)

    bytes_le    the UUID as a 16-byte string (with time_low, time_mid,
                and time_hi_version in little-endian byte order)

    fields      a tuple of the six integer fields of the UUID,
                which are also available as six individual attributes
                and two derived attributes. Those attributes are not
                always relevant to all UUID versions:

                    The 'time_*' attributes are only relevant to version 1.

                    The 'clock_seq*' and 'node' attributes are only relevant
                    to versions 1 and 6.

                    The 'time' attribute is only relevant to versions 1, 6
                    and 7.

        time_low                the first 32 bits of the UUID
        time_mid                the next 16 bits of the UUID
        time_hi_version         the next 16 bits of the UUID
        clock_seq_hi_variant    the next 8 bits of the UUID
        clock_seq_low           the next 8 bits of the UUID
        node                    the last 48 bits of the UUID

        time                    the 60-bit timestamp for UUIDv1/v6,
                                or the 48-bit timestamp for UUIDv7
        clock_seq               the 14-bit sequence number

    hex         the UUID as a 32-character hexadecimal string

    int         the UUID as a 128-bit integer

    urn         the UUID as a URN as specified in RFC 4122/9562

    variant     the UUID variant (one of the constants RESERVED_NCS,
                RFC_4122, RESERVED_MICROSOFT, or RESERVED_FUTURE)

    version     the UUID version number (1 through 8, meaningful only
                when the variant is RFC_4122)

    is_safe     An enum indicating whether the UUID has been generated in
                a way that is safe for multiprocessing applications, via
                uuid_generate_time_safe(3).
is_safeNc               z   WW4V.P                  R4      ^8w  d   \        R4      hVe   EM}Vem   VP                  RR4      P                  RR4      pVP                  R4      P                  RR4      p\	        V4      ^ 8w  d   \        R4      h\        V^4      pEMVe   \	        V4      ^8w  d   \        R	4      h\        V\        4      '       g   Q \        V4      4       hV^RR1,          V^^R1,          ,           V^^R1,          ,           VR
,          ,           p\        P                  V4      pEMuVeY   \	        V4      ^8w  d   \        R4      h\        V\        4      '       g   Q \        V4      4       h\        P                  V4      pEMVEe   \	        V4      ^8w  d   \        R4      hVw  rp
rp^ Tu;8:  d   R8  g   M \        R4      h^ T	u;8:  d   R8  g   M \        R4      h^ T
u;8:  d   R8  g   M \        R4      h^ Tu;8:  d   R8  g   M \        R4      h^ Tu;8:  d   R8  g   M \        R4      h^ Tu;8:  d   R8  g   M \        R4      hV^,          V,          pV^`,          V	^P,          ,          V
^@,          ,          V^0,          ,          V,          p^ Tu;8:  d   \        8:  g   M \        R4      hVeB   ^Tu;8:  d   ^8:  g   M \        R4      hV\        ,          pVR,          pWV^L,          ,          p\        P                  V RV4       \        P                  V RV4       R# )a  Create a UUID from either a string of 32 hexadecimal digits,
a string of 16 bytes as the 'bytes' argument, a string of 16 bytes
in little-endian order as the 'bytes_le' argument, a tuple of six
integers (32-bit time_low, 16-bit time_mid, 16-bit time_hi_version,
8-bit clock_seq_hi_variant, 8-bit clock_seq_low, 48-bit node) as
the 'fields' argument, or a single 128-bit integer as the 'int'
argument.  When a string of hex digits is given, curly braces,
hyphens, and a URN prefix are all optional.  For example, these
expressions all yield the same UUID:

UUID('{12345678-1234-5678-1234-567812345678}')
UUID('12345678123456781234567812345678')
UUID('urn:uuid:12345678-1234-5678-1234-567812345678')
UUID(bytes='\x12\x34\x56\x78'*4)
UUID(bytes_le='\x78\x56\x34\x12\x34\x12\x78\x56' +
              '\x12\x34\x56\x78\x12\x34\x56\x78')
UUID(fields=(0x12345678, 0x1234, 0x5678, 0x12, 0x34, 0x567812345678))
UUID(int=0x12345678123456781234567812345678)

Exactly one of 'hex', 'bytes', 'bytes_le', 'fields', or 'int' must
be given.  The 'version' argument is optional; if given, the resulting
UUID will have its variant and version set according to RFC 4122,
overriding the given 'hex', 'bytes', 'bytes_le', 'fields', or 'int'.

is_safe is an enum exposed as an attribute on the instance.  It
indicates whether the UUID has been generated in a way that is safe
for multiprocessing applications, via uuid_generate_time_safe(3).
NzGone of the hex, bytes, bytes_le, fields, or int arguments must be givenzurn: zuuid:z{}-z$badly formed hexadecimal UUID stringz bytes_le is not a 16-char string   NNzbytes is not a 16-char stringzfields is not a 6-tuplez*field 1 out of range (need a 32-bit value)z*field 2 out of range (need a 16-bit value)z*field 3 out of range (need a 16-bit value)z*field 4 out of range (need an 8-bit value)z*field 5 out of range (need an 8-bit value)z*field 6 out of range (need a 48-bit value)z*int is out of range (need a 128-bit value)zillegal version number            intr   r   l        i                )count	TypeErrorreplacestriplen
ValueErrorint_
isinstancebytes_repr
from_bytes_UINT_128_MAX_RFC_4122_CLEARFLAGS_MASKobject__setattr__)selfhexbytesbytes_lefieldsr!   versionr   time_lowtime_midtime_hi_versionclock_seq_hi_variantclock_seq_lownode	clock_seqs   &&&&&&&$       r   __init__UUID.__init__   s   @ #.44T:a? = > >?_++fb)11'2>C))D/))#r2C3x2~ !GHHsB-C!8}" !CDDh//?h?/cg2g&#c"*)==c#bj)*,4RL9E//%(C5zR !@AAeV,,9d5k9,//%(C6{a !:;;:@8X!$,G, !MNN,G, !MNN373 !MNN,77 !MNN00 !MNN(( !MNN-2mCINx2~6#r)+.72o?AEFCC(=(IJJ$1$ !9::,,C((Cb= C4,4G4r   c                    ^ Tu;8:  d   \         8:  g   M Q \        V4      4       h\        P                  V 4      p\        P	                  VRV4       \        P	                  VR\
        P                  4       V# )z9Create a UUID from an integer *value*. Internal use only.r!   r   )r/   r-   r1   __new__r2   r   r   )clsvaluer3   s   && r   	_from_intUUID._from_int  s]     E*]*7DK7*~~c"4.4H,<,<=r   c                    R V P                   /pV P                  \        P                  8w  d   V P                  P                  VR&   V# )r!   r   )r!   r   r   r   rE   )r3   ds   & r   __getstate__UUID.__getstate__  s<    DHH<<8+++  <<--AiLr   c                    \         P                  V R VR ,          4       \         P                  T RRV9   d   \        VR,          4      4       R# \        P                  4       R# )r!   r   N)r1   r2   r   r   )r3   states   &&r   __setstate__UUID.__setstate__  sQ    4e54'50 $E)$45	H6>6F6F	Hr   c                l    \        V\        4      '       d   V P                  VP                  8H  # \        # Nr+   r   r!   NotImplementedr3   others   &&r   __eq__UUID.__eq__#  (    eT""88uyy((r   c                l    \        V\        4      '       d   V P                  VP                  8  # \        # rQ   rR   rT   s   &&r   __lt__UUID.__lt__+  (    eT""88eii''r   c                l    \        V\        4      '       d   V P                  VP                  8  # \        # rQ   rR   rT   s   &&r   __gt__UUID.__gt__0  r\   r   c                l    \        V\        4      '       d   V P                  VP                  8*  # \        # rQ   rR   rT   s   &&r   __le__UUID.__le__5  rX   r   c                l    \        V\        4      '       d   V P                  VP                  8  # \        # rQ   rR   rT   s   &&r   __ge__UUID.__ge__:  rX   r   c                ,    \        V P                  4      # rQ   )hashr!   r3   s   &r   __hash__UUID.__hash__?  s    DHH~r   c                    V P                   # rQ   r!   rh   s   &r   __int__UUID.__int__B  s    xxr   c                P    V P                   P                  : R \        V 4      : R2# )())	__class__r   strrh   s   &r   __repr__UUID.__repr__E  s    >>22CI>>r   c                    \        R 4      h)zUUID objects are immutable)r%   )r3   namerE   s   &&&r   r2   UUID.__setattr__H  s    455r   c           
         V P                   pVR ,           RVR,           RVR,           RVR,           RVR,           2	# ):Nr   Nr   :r      N:rz      N:r{      N:r|   NN)r4   )r3   xs   & r   __str__UUID.__str__K  sB    HHB%!D'!AeH:Qqxj!C&BBr   c                8    V P                   P                  ^4      # )r{   )r!   to_bytesrh   s   &r   r5   
UUID.bytesO  s    xx  $$r   c                    V P                   pV^RR1,          V^^R1,          ,           V^^R1,          ,           VR,          ,           # )   Nr   r   r5   )r3   r5   s   & r   r6   UUID.bytes_leS  sI    

cg2gs3rz!22U3s2:5FFb	 	r   c                    V P                   V P                  V P                  V P                  V P                  V P
                  3# rQ   )r9   r:   r;   r<   r=   r>   rh   s   &r   r7   UUID.fieldsY  s:    t}}d.B.B))4+=+=tyyJ 	Jr   c                (    V P                   ^`,	          # )`   rl   rh   s   &r   r9   UUID.time_low^  s    xx2~r   c                6    V P                   ^P,	          R,          # )P     rl   rh   s   &r   r:   UUID.time_midb      B&((r   c                6    V P                   ^@,	          R,          # )@   r   rl   rh   s   &r   r;   UUID.time_hi_versionf  r   r   c                6    V P                   ^8,	          ^,          # )8   rl   rh   s   &r   r<   UUID.clock_seq_hi_variantj      B$&&r   c                6    V P                   ^0,	          ^,          # )0   rl   rh   s   &r   r=   UUID.clock_seq_lown  r   r   c                   V P                   ^8X  dV   V P                  ^`,	          pV P                  ^@,	          R,          pV^,          V P                  ^,          ,          V,          # V P                   ^8X  d   V P                  ^P,	          # V P                  ^@,	          R,          pV P                  ^`,	          pV^0,          V P                  ^ ,          ,          V,          # )     )r8   r!   r:   )r3   time_hitime_los   &  r   time	UUID.timer  s    <<1hh"nGxx2~/Gb=DMMR$787BB\\Q88r>! xx2~/Ghh"nGb=DMMR$787BBr   c                X    V P                   ^?,          ^,          V P                  ,          # )?   )r<   r=   rh   s   &r   r?   UUID.clock_seq  s(    ++d2q8""# 	$r   c                (    V P                   R ,          # )    rl   rh   s   &r   r>   	UUID.node  s    xx.((r   c                6    V P                   P                  4       # rQ   )r5   r4   rh   s   &r   r4   UUID.hex  s    zz~~r   c                &    R \        V 4      ,           # )z	urn:uuid:)rs   rh   s   &r   urnUUID.urn  s    SY&&r   c                    V P                   R,          '       g   \        # V P                   R,          '       g   \        # V P                   R,          '       g   \        # \        # )i   r    l            l            )r!   RESERVED_NCSRFC_4122RESERVED_MICROSOFTRESERVED_FUTURErh   s   &r   variantUUID.variant  sF    xx<((\**O\**%%""r   c                v    V P                   \        8X  d$   \        V P                  ^L,	          ^,          4      # R# )L   N)r   r   r!   rh   s   &r   r8   UUID.version  s-     <<8#B#-.. $r   r   )r!   r   __weakref__)NNNNNN))r   r   r   r   __doc__	__slots__r   r   r@   classmethodrF   rJ   rN   rV   rZ   r^   ra   rd   ri   rm   rt   r2   r~   propertyr5   r6   r7   r9   r:   r;   r<   r=   r   r?   r>   r4   r   r   r8   r   __classdictcell__)__classdict__s   @r   r   r   r   s    ;z 2IW5"*"2"2W5r  H



?6C % %  
 J J   ) ) ) ) ' ' ' ' C C$ $ $ ) )     ' ' # # / /r   r   c                 h   ^ RI p^ RIp^ RIp^ RIp VP                  P                  RVP                  4      P                  VP                  4      pVP                  RR.4       VP                  WP                  P                  V4      R7      pVf   R# \        VP                  4      pRVR&   VR	8w  d   V.VO5p MV3p VP                  V VP                  VP                  VR7      p	V	'       g   R# V	P!                  4       w  rVP#                  V
4      #   \$        TP&                  3 d     R# i ; i)
    NPATHz/sbinz	/usr/sbin)pathCLC_ALL)stdoutstderrenv)r   )ioosshutil
subprocessenvirongetdefpathsplitpathsepextendwhichjoindictPopenPIPEDEVNULLcommunicateBytesIOOSErrorSubprocessError)commandargsr   r   r   r   	path_dirs
executabler   procr   r   s   &*          r   _get_command_stdoutr     s   %%JJNN62::6<<RZZH	';/0\\'

	0J\K
 2::H5=!)D)G!mG'1'1'9'9$'   ) ))+zz&!!Z//0 s   BD AD 3"D D10D1c                     V R,          '       * # )   l        r   macs   &r   _is_universalr     s    w  r   c                   \        W4      pVf   R# RpV F  pVP                  4       P                  4       P                  4       p\	        \        V4      4       Fd  pWx,          V9   g   K   Ws! V4      ,          p	\        V	P                  \        R4      ^4      p
\        V
4      '       d   V
u u # T;'       g    T
pKf  	  K  	  T;'       g    R#   \        \        3 d     K  i ; i)a  Searches a command's output for a MAC address near a keyword.

Each line of words in the output is case-insensitively searched for
any of the given keywords.  Upon a match, get_word_index is invoked
to pick a word from the line, given the index of the match.  For
example, lambda i: 0 would get the first word on the line, while
lambda i: i - 1 would get the word preceding the keyword.
Nr   )r   lowerrstripr   ranger(   r!   r&   
_MAC_DELIMr   r)   
IndexError)r   r   keywordsget_word_indexr   first_local_maclinewordsiwordr   s   &&&&       r   _find_mac_near_keywordr     s     !/F~O

##%++-s5z"Ax8#= !23Ddll:s;R@C %S))"
&5&<&<O # $ ""d" #J/  s   ,.CC&%C&c                    V P                  \        4      p\        V4      ^8w  d   R# \        '       dV   \        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       g   R# RP                  R V 4       4      pMM\        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       g   R# RP                  V4      p \        V^4      #   \         d     R# i ; i)r   Nc              3   `   "   T F$  p^\        V4      u;8*  ;'       d    ^8*  Mu x  K&  	  R# 5i)r   Nr(   .0parts   & r   	<genexpr>_parse_mac.<locals>.<genexpr>  s$     9541D	&&Q&&5s   ,.FTr   c              3   D   "   T F  qP                  ^R4      x  K  	  R# 5i)      0N)rjustr   s   & r   r   r     s     @%$**Q--%s    c              3   >   "   T F  p\        V4      ^8H  x  K  	  R# 5i)r   Nr   r   s   & r   r   r     s     4ed3t9>es   )r   r   r(   _MAC_OMITS_LEADING_ZEROESallr   r!   r)   )r   partshexstrs   &  r   
_parse_macr    s     JJz"E
5zQ  
 s959sss95999@%@@s4e4sss4e444%62 s   C# #C21C2c                   \        W4      pVf   R# VP                  4       P                  4       P                  4       p VP	                  V4      pRpT FX  pTP                  4       P                  4       p Y,          p	\        T	4      p
T
f   K;  \        T
4      '       d   T
u # Te   KV  T
pKZ  	  T#   \
         d     R# i ; i  \         d     K~  i ; i)a  Looks for a MAC address under a heading in a command's output.

The first line of words in the output is searched for the given
heading. Words at the same word index as the heading in subsequent
lines are then examined to see if they look like MAC addresses.
N)	r   readliner   r   indexr)   r   r  r   )r   r   headingr   r   column_indexr   r   r   r   r   s   &&&        r   _find_mac_under_headingr    s     !/F~ '')//1H~~g. O##%	&D ;J"!O  '    		s#   B2 6C2C CCCc                 P    Rp R F  p\        RWR 4      pV'       g   K  Vu # 	  R# )z5Get the hardware address on Unix by running ifconfig.ifconfigc                     V ^,           # r   r   r   s   &r   <lambda>#_ifconfig_getnode.<locals>.<lambda>D  s    1Q3r   N)s   hwaddrs   ethers   address:s   lladdr)r   z-az-avr   )r   r   r   s      r   _ifconfig_getnoder  ?  s0     =H!$ZO3J " r   c                 :    \        RRR.R 4      p V '       d   V # R# )z/Get the hardware address on Unix by running ip.iplinks
   link/etherc                     V ^,           # r  r   r  s   &r   r  _ip_getnode.<locals>.<lambda>L  s    !A#r   Nr  r   s    r   _ip_getnoder  I  s!     !v
NC

r   c                    ^ RI p ^ RIp\        VR4      '       g   R#  VP                  VP	                  4       4      p\        RRT P                  ! T4      .R 4      pT'       d   T# \        RRT P                  ! T4      .R 4      pT'       d   T# \        RRT P                  ! RT,          4      .R 4      pT'       d   T# R#   \
         d     R# i ; i)	z0Get the hardware address on Unix by running arp.Ngethostbynamearpz-anc                     R# )r   r   r   r  s   &r   r  _arp_getnode.<locals>.<lambda>\  s    QSr   c                     V ^,           # r  r   r  s   &r   r  r  a  s    QRSTQTr   z(%s)c                     V ^,           # )r   r   r  s   &r   r  r  g  s    acr   )r   sockethasattrr  gethostnamer   r   fsencode)r   r"  ip_addrr   s       r   _arp_getnoder'  Q  s    6?++&&v'9'9';<
 !G0D/E|
TC

 !G0D/E}
UC

 !FW<L0M/N!#C 
'  s   C CCc                 "    \        RRR.R 4      # )z4Get the hardware address on Unix by running lanscan.lanscanz-ais   lan0c                     ^ # )r   r   r  s   &r   r  "_lanscan_getnode.<locals>.<lambda>p  s    r   r  r   r   r   _lanscan_getnoder,  m  s     ")UWI{KKr   c                     \        RRR4      # )z4Get the hardware address on Unix by running netstat.netstatz-ians   Address)r  r   r   r   _netstat_getnoder/  r  s     #9fjAAr   generate_time_safe
UuidCreatec                 ~    \         '       d1   \        '       d#   \        4       w  r\        V R7      P                  # R# R# )zBGet the hardware address on Unix using the _uuid extension module.r   N)_generate_time_safe_has_stable_extractable_noder   r>   )	uuid_time_s     r   _unix_getnoder7    s1    ;;*,	)$)))  <r   c                 z    \         '       d/   \        '       d!   \        4       p \        V R7      P                  # R# R# )zEGet the hardware address on Windows using the _uuid extension module.)r6   N)_UuidCreater4  r   r>   )
uuid_bytess    r   _windll_getnoder;    s,    {33 ]
Z(--- 4{r   c                 b    \         P                  \        P                  ! ^4      4      R,          # )zGet a random node ID.l        r!   r.   r   urandomr   r   r   _random_getnoder?    s      >>"**Q-(G44r   posixntc                     \         e   \         # \        \        .,            F4  p  V ! 4       s \         f   K  ^ \         u;8:  d   R8  g   K*   \         u #  K6  	  Q RP                  \         4      4       h    KW  ; i)a  Get the hardware address as a 48-bit positive integer.

The first time this runs, it may launch a separate program, which could
be quite slow.  If all attempts to obtain the hardware address fail, we
choose a random 48-bit number with its eighth bit set to 1 as recommended
in RFC 4122.
z,_random_getnode() returned invalid value: {}r#   )_node_GETTERSr?  format)getters    r   getnoderG    sq     o...	HE A$:'$:L %; / O@GGNN5		s   A33A8c                8   \         e2   Yu;J d   f(   M M$\        4       w  r# \        V4      p\	        W$R7      # \
        P                  ! 4       pV^d,          R,           p\        e   V\        8:  d   \        ^,           pVsVf   ^ RIpVP                  ^4      pVR,          pV^ ,	          R,          p	V^0,	          R,          p
V^,          pV^,	          ^?,          pV f   \        4       p \	        WV
WV 3^R7      #   \         d    \        P                  p Li ; i)a  Generate a UUID from a host ID, sequence number, and the current time.
If 'node' is not given, getnode() is used to obtain the hardware
address.  If 'clock_seq' is given, it is used as the sequence number;
otherwise a random 14-bit sequence number is chosen.N)r5   r       @'Hw    r   r   )r7   r8   )r3  r   r)   r   r   r   time_ns_last_timestamprandomgetrandbitsrG  )r>   r?   r5  safely_generatedr   nanoseconds	timestamprM  r9   r:   r;   r=   r<   s   &&           r   uuid1rR    s    &4+D+D&9&;#		'/0G )55 ,,.K s"%77I"yO'C#a'	O&&r*	:%HR6)H B&0O$M%Nd2|yO,TCLMO O-  	'&&G	's   C; ;DDc                :   \        V\        4      '       d   \        VR4      p^ RIpVP	                  V P                  V,           RR7      p\
        P                  VP                  4       4      pV\        ,          pV\        ,          p\        P                  V4      # )zAGenerate a UUID from the MD5 hash of a namespace UUID and a name.utf-8NFusedforsecurity)r+   rs   r5   hashlibmd5r!   r.   digestr0   _RFC_4122_VERSION_3_FLAGSr   rF   )	namespacerw   rW  h
int_uuid_3s   &&   r   uuid3r^    sr    $T7#IOOd*EBA
+J++J++J>>*%%r   c                     \         P                  \        P                  ! ^4      4      p V \        ,          p V \
        ,          p \        P                  V 4      # )zGenerate a random UUID.)r!   r.   r   r>  r0   _RFC_4122_VERSION_4_FLAGSr   rF   )
int_uuid_4s    r   uuid4rb    s=    

2/J++J++J>>*%%r   c                H   \        V\        4      '       d   \        VR4      p^ RIpVP	                  V P                  V,           RR7      p\
        P                  VP                  4       R,          4      pV\        ,          pV\        ,          p\        P                  V4      # )zCGenerate a UUID from the SHA-1 hash of a namespace UUID and a name.rT  NFrU  :Nr{   N)r+   rs   r5   rW  sha1r!   r.   rY  r0   _RFC_4122_VERSION_5_FLAGSr   rF   )r[  rw   rW  r\  
int_uuid_5s   &&   r   uuid5rg    sv    $T7#Y__t+UCA
30J++J++J>>*%%r   c                   ^ RI pVP                  ! 4       pV^d,          R,           p\        e   V\        8:  d   \        ^,           pVsVf   ^ RIpVP	                  ^4      pV^,	          R,          pVR,          pVR,          pV f   \        4       p V^P,          p	W^@,          ,          p	W^0,          ,          p	WR,          ,          p	V	\        ,          p	\        P                  V	4      # )aX  Similar to :func:`uuid1` but where fields are ordered differently
for improved DB locality.

More precisely, given a 60-bit timestamp value as specified for UUIDv1,
for UUIDv6 the first 48 most significant bits are stored first, followed
by the 4-bit version (same position), followed by the remaining 12 bits
of the original 60-bit timestamp.
NrI  r   r   i?  )	r   rK  _last_timestamp_v6rM  rN  rG  _RFC_4122_VERSION_6_FLAGSr   rF   )
r>   r?   r   rP  rQ  rM  time_hi_and_midr   clock_s
int_uuid_6s
   &&        r   uuid6rn    s     ,,.K s"%77I%)7I*I&*	"&&r*	 B*::O& G& G|y !B&JR-JR-J)))J++J>>*%%r   c                      \         P                  \        P                  ! ^
4      4      p V ^ ,	          R,          pV R,          pW3# )
   l   rJ  r=  )randcountertails      r   _uuid7_get_counter_and_tailrt  C  s8    >>"**R.)Drz_,G+D=r   c                 \   \         P                  ! 4       p V R,          p\        e   V\        8  d   \        4       w  r#MkV\        8  d   \        ^,           p\        ^,           pVR8  d   V^,          p\        4       w  r#M)\
        P                  \        P                  ! ^4      4      pVR,          pV^,	          pVR,          pVR,          pVR,          pV^P,          pW^@,          ,          pW^ ,          ,          pW,          pV\        ,          p\        P                  V4      p	VsVsV	# )zGenerate a UUID from a Unix timestamp in milliseconds and random bits.

UUIDv7 objects feature monotonicity within a millisecond.
i@B l   r   r   i?rJ  )r   rK  _last_timestamp_v7rt  _last_counter_v7r!   r.   r   r>  _RFC_4122_VERSION_7_FLAGSr   rF   )
rP  timestamp_msrr  rs  
unix_ts_mscounter_msbs
counter_hi
counter_lo
int_uuid_7ress
             r   uuid7r  L  s   * ,,.K)+L!\4F%F35,,-1L"Q&_$AL79MGT >>"**Q-0D 00Jb=L&J;&J 	KDr!J""J""JJ++J
..
$C &Jr   c                F   V f   ^ RI pVP                  ^04      p Vf   ^ RI pVP                  ^4      pVf   ^ RI pVP                  ^>4      pV R,          ^P,          pWAR,          ^@,          ,          pWBR,          ,          pV\        ,          p\        P	                  V4      # )a  Generate a UUID from three custom blocks.

* 'a' is the first 48-bit chunk of the UUID (octets 0-5);
* 'b' is the mid 12-bit chunk (octets 6-7);
* 'c' is the last 62-bit chunk (octets 8-15).

When a value is not specified, a pseudo-random value is generated.
Nr   r   l    )rM  rN  _RFC_4122_VERSION_8_FLAGSr   rF   )abcrM  
int_uuid_8s   &&&  r   uuid8r    s     	yr"yr"yr"&&2-Ju9##J+++J++J>>*%%r   c                    R\         R\        R\        R\        R\        R\
        R\        /p R$pR\        R	\        R
\        R\        /p^ RIpVP                  VP                  RRR7      pVP                  RRV P                  4       RRR7       VP                  RRR.VP                  4       ORR7       VP                  RRRR7       VP                  RRR\         ^R R!7       VP#                  4       pWP$                  ,          pVP&                  pVP(                  pVP$                  V9   dx   V'       d	   V'       g    VP+                  R"VP$                   R#24       Wr9   d	   W',          M
\-        V4      p\/        VP0                  4       F  p	\3        V! Wx4      4       K  	  R# \/        VP0                  4       F  p	\3        V! 4       4       K  	  R# )%z$Run the uuid command line interface.rR  r^  rb  rg  rn  r  r  z@dnsz@urlz@oidz@x500Nz1Generate a UUID using the selected UUID function.T)formatter_classdescriptioncolorz-uz--uuidzfunction to generate the UUID)choicesdefaulthelpz-nz--namespacezany UUIDzUuuid3/uuid5 only: a UUID, or a well-known predefined UUID addressed by namespace name)r  r  z-Nz--namez:uuid3/uuid5 only: name used as part of generating the UUID)r  z-Cz--countNUMzgenerate NUM fresh UUIDs)metavartyper  r  zIncorrect number of arguments. zO requires a namespace and a name. Run 'python -m uuid -h' for more information.)r^  rg  )rR  r^  rb  rg  rn  r  r  NAMESPACE_DNSNAMESPACE_URLNAMESPACE_OIDNAMESPACE_X500argparseArgumentParserArgumentDefaultsHelpFormatteradd_argumentkeysr!   
parse_argsuuidr[  rw   errorr   r   r$   print)

uuid_funcsuuid_namespace_funcs
namespacesr  parserr   	uuid_funcr[  rw   r6  s
             r   mainr    s    	J .	J $$ >>G % F
 h * 1 '<  > m!+ @joo.? @,  -
 hC  D iS!7  9 D99%II99Dyy((LL199+ @@
 .7-DJ)$y/	tzz"A)I,- # tzz"A)+ #r   z$6ba7b810-9dad-11d1-80b4-00c04fd430c8z$6ba7b811-9dad-11d1-80b4-00c04fd430c8z$6ba7b812-9dad-11d1-80b4-00c04fd430c8z$6ba7b814-9dad-11d1-80b4-00c04fd430c8z$00000000-0000-0000-0000-000000000000z$ffffffff-ffff-ffff-ffff-ffffffffffff__main__>   wasir   r   
emscripten)LinuxAndroid)zreserved for NCS compatibilityzspecified in RFC 4122z$reserved for Microsoft compatibilityzreserved for future definitionl         l             l             l             l            
 l             l             l             )NN)NNN)Or   r   sysr   enumr   r   
__author__platform_AIX_LINUXsystem_platform_systemr   r  r   r   r   r   r!   r*   r5   r,   r   r/   r0   _RFC_4122_VERSION_1_FLAGSrZ  r`  re  rj  rx  r  r   r   r   r   r  r  r  r  r'  r,  r/  _uuidgetattrr3  has_stable_extractable_noder4  r9  ImportErrorr7  r;  r?  _OS_GETTERSrw   rD  rC  rG  rL  rR  r^  rb  rg  ri  rn  rv  rw  rt  r  r  r  r  r  r  r  NILMAXr   r   r   r   <module>r     s  8t 
 
  # +
 <<<<D6\\WFD(5(D#77F
! J $?N ;h*O 	 d   cQ> 7 7 7 7 7 7 7 s/ s/l	\! #F8!L8L
B	!%)=tD#(#D#D %t4K*.50 
 12K\\X$l4DEK\\WK	#$K$k<#%57K77g,HWW_ ;.HHO, #OJ	&&	&  "&J   =@&49| ;<;<;<<= 12
12zF a  E#( K	s   $H HH