+
    =i2                     *   R t ^ RIt^ RIt^ RIHt ^ RIHt  ^ RIt^ RIHt ^RIHt . ROt]P                  ! ^4      tR
tRtRtR t]! 4       t ! R R	]4      t ! R R]4      t ! R R]4      t ! R R]4      tR tR tR#   ]	 d
    ]
! R4      hi ; i)z
This module provides an interface to the native time zone data on Windows,
including :py:class:`datetime.tzinfo` implementations.

Attempting to import this module on a non-Windows platform will raise an
:py:obj:`ImportError`.
N)winreg)	text_type)wintypesz#Running tzwin on non-Windows system)tzrangebasetzwin
tzwinlocaltzresz7SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zonesz4SOFTWARE\Microsoft\Windows\CurrentVersion\Time Zonesz4SYSTEM\CurrentControlSet\Control\TimeZoneInformationc                      \         P                  ! R \         P                  4      p  \         P                  ! V \        4      P                  4        \        pV P                  4        V#   \         d
    \        p L%i ; iN)r   ConnectRegistryHKEY_LOCAL_MACHINEOpenKeyTZKEYNAMENTCloseWindowsErrorTZKEYNAME9X)handle	TZKEYNAMEs     r/Users/tonyclaw/.openclaw/workspace/scripts/youtube-playlists/venv/lib/python3.14/site-packages/dateutil/tz/win.py_settzkeynamer   "   sb    ##D&*C*CDF v{+113	 LLN   	 s   /A( (A<;A<c                   r   a  ] tR t^0t o Rt]P                  ! ]P                  4      t	RR lt
R tR tRtV tR# )r   zm
Class for accessing ``tzres.dll``, which contains timezone name related
resources.

.. versionadded:: 2.5.0
c                0   \         P                  ! R 4      p\        P                  \        P                  \        P
                  \         P                  3VP                  n        VP                  V n        \         P                  ! V4      V n	        Wn
        R# )user32N)ctypesWinDLLr   	HINSTANCEUINTLPWSTRc_intLoadStringWargtypes_tzres	tzres_loc)selfr"   r   s   && r   __init__tzres.__init__9   se    x( (0'9'9'/}}'/'-||'5#
 "--mmI."    c                    V P                  4       p\        P                  ! \        P                  ! V4      \        P
                  4      pV P                  V P                  P                  W^ 4      pVRV # )a  
Load a timezone name from a DLL offset (integer).

>>> from dateutil.tzwin import tzres
>>> tzr = tzres()
>>> print(tzr.load_name(112))
'Eastern Standard Time'

:param offset:
    A positive integer value referring to a string from the tzres dll.

.. note::

    Offsets found in the registry are generally of the form
    ``@tzres.dll,-114``. The offset in this case is 114, not -114.

N)	p_wcharr   castbyrefr   r   r   r!   _handle)r#   offsetresourcelpBuffernchars   &&   r   	load_nametzres.load_nameG   sW    $ <<>;;v||H5xG  !4!4fJr&   c                    VP                  R4      '       g   V# VP                  R4      p \        V^,          4      pT P	                  T4      #    \        R4      h; i)a/  
Parse strings as returned from the Windows registry into the time zone
name as defined in the registry.

>>> from dateutil.tzwin import tzres
>>> tzr = tzres()
>>> print(tzr.name_from_string('@tzres.dll,-251'))
'Dateline Daylight Time'
>>> print(tzr.name_from_string('Eastern Standard Time'))
'Eastern Standard Time'

:param tzname_str:
    A timezone name string as returned from a Windows registry key.

:return:
    Returns the localized timezone string from tzres.dll if the string
    is of the form `@tzres.dll,-offset`, else returns the input string.
@z,-zMalformed timezone string.)
startswithsplitint
ValueErrorr0   )r#   
tzname_str	name_spltr,   s   &&  r   name_from_stringtzres.name_from_string^   sb    & $$S))$$T*		;1&F ~~f%%	;9::s   A A)r   r!   r"   N)z	tzres.dll)__name__
__module____qualname____firstlineno____doc__r   POINTERr   WCHARr(   r$   r0   r:   __static_attributes____classdictcell____classdict__s   @r   r   r   0   s2      nnX^^,G# .& &r&   c                   b   a  ] tR t^}t o RtR tR t]R 4       tR t	R t
R t]R 4       tR	tV tR
# )	tzwinbasezBtzinfo class based on win32's timezones available in the registry.c                    \        R 4      h)z#tzwinbase is an abstract base class)NotImplementedErrorr#   s   &r   r$   tzwinbase.__init__   s    !"GHHr&   c                J   \        V\        4      '       g   \        # V P                  VP                  8H  ;'       Edg    V P                  VP                  8H  ;'       EdE    V P
                  VP
                  8H  ;'       Ed#    V P                  VP                  8H  ;'       Ed    V P                  VP                  8H  ;'       d    V P                  VP                  8H  ;'       d    V P                  VP                  8H  ;'       d    V P                  VP                  8H  ;'       d}    V P                  VP                  8H  ;'       d\    V P                  VP                  8H  ;'       d;    V P                  VP                  8H  ;'       d    V P                  VP                  8H  # r
   )
isinstancerH   NotImplemented_std_offset_dst_offset_stddayofweek_dstdayofweek_stdweeknumber_dstweeknumber_stdhour_dsthour
_stdminute
_dstminute	_std_abbr	_dst_abbr)r#   others   &&r   __eq__tzwinbase.__eq__   sv   %++!!!!U%6%66 3 3!!U%6%663 3##u':'::3 3 ##u':'::3 3 $$(<(<<	3 3
 $$(<(<<3 3 %..03 3 %..03 3 E$4$443 3 E$4$443 3 5??23 3 5??2	4r&   c                    \         P                  ! R\         P                  4      ;_uu_ 4       p \         P                  ! V \        4      ;_uu_ 4       p\        \         P                  ! V4      ^ ,          4       Uu. uF  p\         P                  ! W4      NK  	  ppRRR4       RRR4       X# u upi   + '       g   i     L; i  + '       g   i     X# ; i)z4Return a list of all time zones known to the system.N)r   r   r   r   r   rangeQueryInfoKeyEnumKey)r   tzkeyiresults       r   listtzwinbase.list   s     ##D&*C*CDD	22e#()<)<U)CA)F#GI#Ga !..2#G  I 3 E I 32 ED s5   $C)B3	;B.B3	C.B3	3C>CC	c                    V P                   # )z+
Return the display name of the time zone.
)_displayrK   s   &r   displaytzwinbase.display   s     }}r&   c                X   V P                   '       g   R# \        WP                  V P                  V P                  V P
                  V P                  4      p\        WP                  V P                  V P                  V P                  V P                  4      pW0P                  ,          pW#3# )a  
For a given year, get the DST on and off transition times, expressed
always on the standard time side. For zones with no transitions, this
function returns ``None``.

:param year:
    The year whose transitions you would like to query.

:return:
    Returns a :class:`tuple` of :class:`datetime.datetime` objects,
    ``(dston, dstoff)`` for zones with an annual DST transition, or
    ``None`` for fixed offset zones.
N)hasdstpicknthweekday	_dstmonthrS   rW   rY   rU   	_stdmonthrR   rV   rX   rT   _dst_base_offset)r#   yeardstondstoffs   &&  r   transitionstzwinbase.transitions   s     {{{t^^T5G5G#}}doo#224  nnd6H6H $t $ 3 35
 	'''}r&   c                     V P                   ^ 8g  # )    )ro   rK   s   &r   _get_hasdsttzwinbase._get_hasdst   s    ~~""r&   c                    V P                   # r
   )_dst_base_offset_rK   s   &r   rq   tzwinbase._dst_base_offset   s    %%%r&    N)r<   r=   r>   r?   r@   r$   r]   staticmethodrf   rj   ru   ry   propertyrq   rC   rD   rE   s   @r   rH   rH   }   sJ     LI4$  ># & &r&   rH   c                   6   a  ] tR t^t o RtR tR tR tRtV t	R# )r   a  
Time zone object created from the zone info in the Windows registry

These are similar to :py:class:`dateutil.tz.tzrange` objects in that
the time zone data is provided in the format of a single offset rule
for either 0 or 2 time zone transitions per year.

:param: name
    The name of a Windows time zone key, e.g. "Eastern Standard Time".
    The full list of keys can be retrieved with :func:`tzwin.list`.
c           	        Wn         \        P                  ! R \        P                  4      ;_uu_ 4       p\	        R4      P                  \        VR7      p\        P                  ! W#4      ;_uu_ 4       p\        V4      pR R R 4       R R R 4       XR,          V n	        VR,          V n
        VR,          V n        \        P                  ! RVR,          4      pV^ ,          ) V^,          ,
          pWv^,          ,
          p\        P                  ! VR7      V n        \        P                  ! VR7      V n        VR	,          w  V n        V n        V n        V n        V n        VR
,          w  V n        V n        V n        V n        V n        V P"                  V P                   ,
          V n        V P;                  4       V n        R #   + '       g   i     ELI; i  + '       g   i     ELU; i)Nz{kn}\{name})knnameStdDltDisplayz=3l16hTZIminutes:   	   N:      N)_namer   r   r   r   formatr   r   valuestodictrZ   r[   ri   structunpackdatetime	timedeltarP   rQ   rp   rR   rT   rV   rX   ro   rS   rU   rW   rY   r|   ry   rm   )	r#   r   r   	tzkeynamerc   keydicttup	stdoffset	dstoffsets	   &&       r   r$   tzwin.__init__   ss   
##D&*C*CDD!.188ID8QI22e&u- 3 E
 ! 	* mmHgen5VGCFN	!f$	#--i@#--i@  H								  J								!%!1!1D4D4D!D&&(= 322 EDDs#   ?G3F?	?G?G
	GG$	c                :    R \        V P                  4      ,          # )z	tzwin(%s))reprr   rK   s   &r   __repr__tzwin.__repr__   s    T$**---r&   c                4    V P                   V P                  33# r
   )	__class__r   rK   s   &r   
__reduce__tzwin.__reduce__   s    ..r&   )ri   r[   r|   rQ   rS   rW   rY   ro   rU   r   rZ   rP   rR   rV   rX   rp   rT   rm   N)
r<   r=   r>   r?   r@   r$   r   r   rC   rD   rE   s   @r   r   r      s     
#)J./ /r&   c                   <   a  ] tR tRt o RtR tR tR tR tRt	V t
R# )	r   i  a  
Class representing the local time zone information in the Windows registry

While :class:`dateutil.tz.tzlocal` makes system calls (via the :mod:`time`
module) to retrieve time zone information, ``tzwinlocal`` retrieves the
rules directly from the Windows registry and creates an object like
:class:`dateutil.tz.tzwin`.

Because Windows does not have an equivalent of :func:`time.tzset`, on
Windows, :class:`dateutil.tz.tzlocal` instances will always reflect the
time zone settings *at the time that the process was started*, meaning
changes to the machine's time zone settings during the run of a program
on Windows will **not** be reflected by :class:`dateutil.tz.tzlocal`.
Because ``tzwinlocal`` reads the registry directly, it is unaffected by
this issue.
c           	        \         P                  ! R \         P                  4      ;_uu_ 4       p\         P                  ! V\        4      ;_uu_ 4       p\        V4      pR R R 4       XR,          V n        VR,          V n         \        R4      P                  \        V P                  R7      p\         P                  ! W4      ;_uu_ 4       p\        V4      pVR,          V n        R R R 4       R R R 4       XR,          ) TR,          ,
          pYsR,          ,
          p\        P                  ! TR	7      T n        \        P                  ! TR	7      T n        \"        P$                  ! R
TR,          4      p	T	R,          w  T n        T n        T n        T n        T	^,          T n        \"        P$                  ! R
TR,          4      p	T	R,          w  T n        T n        T n        T n        T	^,          T n        T P                   T P                  ,
          T n        T P=                  4       T n        R #   + '       g   i     EL; i  + '       g   i     ELa; i  \         d    R T n         ELyi ; i  + '       g   i     EL; i)NStandardNameDaylightNamez	{kn}\{sn})r   snr   BiasStandardBiasDaylightBiasr   z=8hStandardStart:      NDaylightStart) r   r   r   r   TZLOCALKEYNAMEr   rZ   r[   r   r   r   ri   OSErrorr   r   rP   rQ   r   r   rp   rT   rV   rX   rR   ro   rU   rW   rY   rS   r|   ry   rm   )
r#   r   
tzlocalkeyr   r   rc   _keydictr   r   r   s
   &         r   r$   tzwinlocal.__init__  s   ##D&*C*CDD77:&z2 8 %^4DN$^4DN%%l3::i=A^^ ; M	^^F66%+E2H$,Y$7DM 7 E  V_$W^%<<	n55	#--i@#--i@ mmE7?#;<
  H					 VmmE7?#;<
  H					 V!%!1!1D4D4D!D&&(U 877 766  % $% EDDsf   $I*H)	$I*AIH=	%I)H:4	I*=III*II'#I*&I''I**I;	c                    R # )ztzwinlocal()r~   rK   s   &r   r   tzwinlocal.__repr__B  s    r&   c                :    R \        V P                  4      ,          # )ztzwinlocal(%s))r   rZ   rK   s   &r   __str__tzwinlocal.__str__E  s    $t~~"666r&   c                    V P                   R3# )Nr~   )r   rK   s   &r   r   tzwinlocal.__reduce__I  s    ##r&   )ri   r[   r|   rQ   rS   rW   rY   ro   rU   rZ   rP   rR   rV   rX   rp   rT   rm   N)r<   r=   r>   r?   r@   r$   r   r   r   rC   rD   rE   s   @r   r   r     s$      ,)\7$ $r&   c                   \         P                   ! W^W44      pVP                  W&P                  4       ,
          ^,          ^,           R7      pWu^,
          \        ,          ,           pVP                  V8w  d   V\        ,          pV# )z=dayofweek == 0 means Sunday, whichweek 5 means last instance )day)r   replace
isoweekdayONEWEEKmonth)	rr   r   	dayofweekhourminute	whichweekfirst
weekdayonewds	   &&&&&&   r   rn   rn   M  si    d1d;E Y1A1A1C%Cq$HA#MNJ	A0	1B
E
gIr&   c                   / p\         P                  ! V 4      ^,          pRp\        V4       F  p\         P                  ! W4      w  rVpV\         P                  8X  g   V\         P
                  8X  d   VR,          '       d
   VR,
          pMbV\         P                  8X  dN   VP                  R4      '       d&   T;'       g    \        4       pVP                  V4      pVP                  R4      pWaV&   K  	  V# )z0Convert a registry key's values to a dictionary.Nz@tzres l        l        )r   ra   r`   	EnumValue	REG_DWORDREG_DWORD_LITTLE_ENDIANREG_SZr4   r   r:   rstrip)keydoutsizetz_resrd   key_namevaluedtypes   &       r   r   r   [  s    Ds#A&DF4[!'!1!1#!9F$$$1O1O(O   )fmm#))**57//6LL(EX " Kr&   )r   r   r   )r@   r   r   	six.movesr   sixr   r   r   r7   ImportError_commonr   __all__r   r   r   r   r   r   r   objectr   rH   r   r   rn   r   r~   r&   r   <module>r      s       =
 !
*


Q
HEH O	J&F J&ZJ& J&Z6/I 6/rG$ G$TQ
  =
;
<<=s   
B B