+
    ¾¾j7*  ã                   óÖ   € R t ^ RIHtHtHtHt ^ RIHtHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ RIHtHtHtHtHt ^RIHt ^R	IHt ^R
IHt R R ltR R lt ! R R]4      tR.tR# )z&PERIOD property type from :rfc:`5545`.)ÚdateÚdatetimeÚ	timedeltaÚtzinfo)ÚAnyÚClassVar)ÚSelf)ÚJCalParsingError)Ú
Parameters)Útzp)Úis_dateÚis_datetimeÚis_pytzÚnormalize_pytzÚto_datetime)ÚTimeBase)Ú	vDatetime)Ú	vDurationc                óJ   € V ^8„  d   QhR\         R\        R,          R\        /# )é   ÚdtÚtzNÚreturn)r   r   r   )Úformats   "ÚW/home/ralf/ical-fahrzeuge/venv/lib/python3.14/site-packages/icalendar/prop/dt/period.pyÚ__annotate__r      s%   € ÷ 'ñ '”Tð 'œv¨�}ð '´ñ 'ó    c                óŒ   € \        V 4      pVf   V# \        V4      '       d   VP                  V4      # VP                  VR7      # )zÂConvert a date to the datetime at midnight.

Parameters:
    dt: The date to convert.
    tz: The timezone of the result, or ``None`` for a naive result.

Returns:
    The datetime at midnight.
)r   )r   r   ÚlocalizeÚreplace)r   r   Úmidnights   && r   Ú_to_midnightr!      sC   € ô ˜2‹€HØ	‚zØˆÜˆr‡{‚{Ø�{‰{˜8Ó$Ð$Ø×Ñ 2ÐÓ&Ð&r   c          	      ó¶   € V ^8„  d   QhR\         \        ,          R\         \        ,          \        ,          R\        \        \        \        ,          3,          /# )r   ÚstartÚend_or_durationr   )r   r   r   Útuple)r   s   "r   r   r   #   s@   € ÷ "ñ "Ü”(�?ð"Ü-1´H­_¼yÕ-Hð"ä
Œ8”X¤	Õ)Ð)Õ*ñ"r   c                ó¨   € \        V 4      '       d   \        V \        VRR4      4      p \        V4      '       d   \        V\        V RR4      4      pW3# )a*  Convert the dates of a period to datetimes.

:rfc:`5545#section-3.3.9` builds a period from datetimes only, but calendars in the
wild use dates. A date becomes midnight so that the period can be used
and written back out.

A converted half takes the timezone of the other half. Without this, an
aware and a naive datetime could not be subtracted to compute the
duration.

Parameters:
    start: The start of the period.
    end_or_duration: The end of the period or its duration.

Returns:
    The start and the end or duration, with any date converted.
r   N)r   r!   Úgetattr)r#   r$   s   &&r   Ú_to_period_datetimesr(   #   sL   € ô( ˆu‡~‚~Ü˜U¤G¨O¸XÀtÓ$LÓMˆÜˆ×ÒÜ& ¼ÀÀxÐQUÓ8VÓWˆØÐ!Ð!r   c                   ó  a € ] tR t^>t o RtRtRV 3R lR lltR tR t]	RR l4       t
R	 t]R
 4       t]V 3R lR l4       t^ RIHt ]V 3R lR l4       t^ RIHt V 3R lR lt]V 3R lR l4       t]V 3R lR l4       tV 3R ltRtV tR# )ÚvPerioda	  A span of time, written either as a start and an end or as a start and a duration.

The value is a tuple of two :class:`datetime.datetime` objects, or of a
datetime and a :class:`datetime.timedelta`. Whichever way it was written,
:attr:`start`, :attr:`end`, and :attr:`duration` are all available, and
:attr:`by_duration` says which of the two forms is written back out.

Conforming with :rfc:`5545#section-3.3.9`, a period is built from datetimes
only, the start must come before the end, and a duration must be positive.
A half written as a date does not conform. Such a half is read as midnight,
in the timezone of the other half where it has one, so that a calendar that
gets this wrong can still be read and written.

``FREEBUSY`` holds periods directly. ``RDATE`` holds them through
:class:`~icalendar.prop.dt.list.vDDDLists`, which splits a comma separated
list and hands each value to :class:`~icalendar.prop.dt.types.vDDDTypes`.
The halves themselves are parsed by
:class:`~icalendar.prop.dt.datetime.vDatetime` and
:class:`~icalendar.prop.dt.duration.vDuration`.

Parameters:
    per: The start of the period, and either its end or its duration.
    params: The parameters of the property.

Raises:
    TypeError: If the start is not a date or a datetime, or if the end is
        not a date, a datetime, or a duration.
    ValueError: If the start is after the end.

Examples:
    A period from 18:00:00 UTC on January 1, 1997 to 07:00:00 UTC on
    January 2, 1997, and one that starts at 18:00:00 UTC and lasts 5 hours
    and 30 minutes:

    .. code-block:: ics

        19970101T180000Z/19970102T070000Z
        19970101T180000Z/PT5H30M

    .. code-block:: pycon

        >>> from icalendar.prop import vPeriod
        >>> period = vPeriod.from_ical("19970101T180000Z/19970102T070000Z")
        >>> vPeriod(period).to_ical()
        b'19970101T180000Z/19970102T070000Z'
        >>> period = vPeriod.from_ical("19970101T180000Z/PT5H30M")
        >>> vPeriod(period).duration
        datetime.timedelta(seconds=19800)

    A half written as a date is read as midnight:

    .. code-block:: pycon

        >>> vPeriod(vPeriod.from_ical("19970101/19970102")).to_ical()
        b'19970101T000000/19970102T000000'

..  versionchanged:: 7.2.3

    A period written with dates is read as midnight.
ÚPERIODNc                ó”   <€ V ^8„  d   QhRS[ S[S[,          S[S[,          S[,          3,          RS[S[S[3,          R,          RR/# )r   ÚperÚparamsNr   )r%   r   r   r   ÚdictÚstrr   )r   Ú__classdict__s   "€r   r   ÚvPeriod.__annotate__‡   sM   ø€ ÷ !ñ !á‘4™(•?¡D©8¥O±iÕ$?Ð?Õ@ð!ñ ‘S™#�X• Õ%ð!ð 
ñ	!r   c                ó  € Vw  r4\        V\        \        34      '       g   \        R 4      h\        V\        \        \        34      '       g   \        R4      h\        W44      w  r4\        V\        4      pV'       d   Tp\        W6,           4      pMTp\        Ws,
          4      pW78”  d   \        R4      h\        T;'       g    RR/4      V n	        V P                  P                  V4       W0n        Wpn        WPn        W`n        R# )z/Start value MUST be a datetime or date instancez>end_or_duration MUST be a datetime, date or timedelta instancez#Start time is greater than end timeÚvaluer+   N)Ú
isinstancer   r   Ú	TypeErrorr   r(   r   Ú
ValueErrorr
   r.   Úupdate_tzid_fromr#   ÚendÚby_durationÚduration)Úselfr-   r.   r#   r$   r:   r;   r9   s   &&&     r   Ú__init__ÚvPeriod.__init__‡   sâ   € ð
 "%ÑˆÜ˜5¤8¬TÐ"2×3Ò3ÜÐMÓNÐNÜ˜?¬X´t¼YÐ,G×HÒHÜØPóð ô "6°eÓ!MÑˆÜ  ´)Ó<ˆßØ&ˆHÜ  Õ!1Ó2‰Cà!ˆCÜ% c¥kÓ2ˆHØŒ;ÜÐBÓCÐCä  ×!>Ð!>¨G°XÐ+>Ó?ˆŒð 	�‰×$Ñ$ UÔ+àŒ
ØŒØ&ÔØ Žr   c                óÂ   € V P                   VP                   8”  d   VP                  V 4      # V P                   VP                   u;8*  ;'       d    V P                  8  # u # ©N)r#   Úoverlapsr9   )r<   Úothers   &&r   rA   ÚvPeriod.overlaps¨   sF   € Ø�:‰:˜Ÿ™Ô#Ø—>‘> $Ó'Ð'Ø�z‰z˜UŸ[™[×3Ô3¨4¯8©8Ñ3Ð3Ñ3Ð3r   c                ón  € V P                   '       dS   \        V P                  4      P                  4       R ,           \	        V P
                  4      P                  4       ,           # \        V P                  4      P                  4       R ,           \        V P                  4      P                  4       ,           # )ó   /)r:   r   r#   Úto_icalr   r;   r9   ©r<   s   &r   rF   ÚvPeriod.to_ical­   s€   € Ø××Ðä˜$Ÿ*™*Ó%×-Ñ-Ó/Øõä˜DŸM™MÓ*×2Ñ2Ó4õ5ðô
 ˜Ÿ™Ó$×,Ñ,Ó.°Õ5¼	À$Ç(Á(Ó8K×8SÑ8SÓ8UÕUÐUr   c                óØ   € ^ RI Hp  V P                  R4      w  r4VP                  W1R7      pVP                  WAR7      p\        Y44      #   \         d   p\        RT  24      ThRp?ii ; i)é    )Ú	vDDDTypesÚ/)ÚtimezonezExpected period format, got: N)Úicalendar.prop.dt.typesrK   ÚsplitÚ	from_icalÚ	Exceptionr7   r(   )ÚicalrM   rK   r#   r$   Úes   &&    r   rP   ÚvPeriod.from_ical¶   sw   € å5ð	LØ%)§Z¡Z°£_Ñ"ˆEØ×'Ñ'¨Ð'ÓAˆEØ'×1Ñ1°/Ð1ÓUˆOô $ EÓ;Ð;øô ô 	LÜÐ<¸T¸FÐCÓDÈ!ÐKûð	Lús   ˆ7A
 Á
A)ÁA$Á$A)c                ó”   € V P                   '       d   V P                  V P                  3MV P                  V P                  3pR V: R2# )zvPeriod(Ú))r:   r#   r;   r9   )r<   Úps   & r   Ú__repr__ÚvPeriod.__repr__Â   s=   € Ø+/×+;×+;Ð+;ˆT�Z‰Z˜Ÿ™Ñ'À$Ç*Á*ÈdÏhÉhÐAWˆØ˜!™˜aÐ Ð r   c                óp   € V P                   V P                  '       d   V P                  3# V P                  3# )z-Make this cooperate with the other vDDDTypes.)r#   r:   r;   r9   rG   s   &r   r   Ú
vPeriod.dtÆ   s.   € ð —
‘
¨d×.>×.>Ð.>˜TŸ]™]ÐNÐNÀDÇHÁHÐNÐNr   c                óF   <€ V ^8„  d   QhRS[ S[S[S[,          3,          /# ©r   r   )r%   r   r   )r   r1   s   "€r   r   r2   Ì   s#   ø€ ÷ ñ ™E¡(©I¹Õ,@Ð"@ÕAñ r   c                ó   € V P                   # )z^
Returns the period as a tuple of its start datetime
and either its end datetime or duration.
)r   rG   s   &r   Ú
ical_valueÚvPeriod.ical_valueË   s   € ð �w‰wˆr   )ÚFBTYPEc                ó0   <€ V ^8„  d   QhRS[ S[,          /# r]   ©Úlistr   )r   r1   s   "€r   r   r2   Ö   s   ø€ ÷ 
ñ 
™™d�ñ 
r   c                óš   € \        \        R^^
^^#4      \        ^^R7      34      \        \        R^^
^^#4      \        R^^
^^4      34      .# )zExamples of vPeriod.ié  )ÚhoursÚminutes)r*   r   r   )Úclss   &r   ÚexamplesÚvPeriod.examplesÕ   sX   € ô ”X˜d B¨¨B°Ó3´YÀQÐPRÔ5SÐTÓUÜ”X˜d B¨¨B°Ó3´X¸dÀBÈÈBÐPQÓ5RÐSÓTð
ð 	
r   )ÚVALUEc                ó&   <€ V ^8„  d   QhRS[ RS[/# )r   Únamer   )r0   rd   )r   r1   s   "€r   r   r2   ß   s   ø€ ÷ Xñ X™Cð X¡Dñ Xr   c                óÖ  € \        V P                  4      P                  V4      R,          .pV P                  '       d<   VP	                  \        V P                  4      P                  V4      R,          4       M:VP	                  \        V P                  4      P                  V4      R,          4       WP                  P                  RR7      V P                  P                  4       V.# )zBThe jCal representation of this property according to :rfc:`7265`.T)Úexclude_utcéÿÿÿÿ)r   r#   Úto_jcalr:   Úappendr   r;   r9   r.   rk   Úlower)r<   rm   r4   s   && r   rq   ÚvPeriod.to_jcalß   s¦   € ä˜4Ÿ:™:Ó&×.Ñ.¨tÓ4°RÕ8Ð9ˆØ××ÐØ�L‰Lœ 4§=¡=Ó1×9Ñ9¸$Ó?ÀÕCÕDà�L‰Lœ 4§8¡8Ó,×4Ñ4°TÓ:¸2Õ>Ô?Ø—k‘k×)Ñ)°dÐ)Ó;¸T¿Z¹Z×=MÑ=MÓ=OÐQVÐWÐWr   c                ór   <€ V ^8„  d   QhRS[ S[,          RS[S[S[3,          S[S[S[3,          ,          /# )r   Újcalr   )r0   rd   r%   r   r   )r   r1   s   "€r   r   r2   é   s:   ø€ ÷ &ñ &Ù™•:ð&á	‰x™Ð!Õ	"¡U©8±YÐ+>Õ%?Õ	?ñ&r   c           	     ó@  € \        V\        4      '       d   RV9   d   VP                  R4      p\        V\        4      '       d   \	        V4      ^8w  d   \        RWR7      h\
        P                  ! ^ 4      ;_uu_ 4        \        P                  ! V^ ,          4      pRRR4       \
        P                  ! ^4      ;_uu_ 4        \
        P                  ! V^,          \        V 4       V^,          P                  R4      '       d   \        P                  ! V^,          4      pM \        P                  ! V^,          4      pRRR4       XV3#   + '       g   i     L¸; i  \
         d   p\        RT T^,          R7      ThRp?ii ; i  + '       g   i     XX3# ; i)z¡Parse a jCal value.

Raises:
    ~error.JCalParsingError: If the period is not a list with exactly two items,
        or it can't parse a date-time or duration.
rL   z-A period must be a list with exactly 2 items.)r4   Nz#Cannot parse date-time or duration.)ÚPz-Pz+P)r5   r0   rO   rd   Úlenr	   Úreraise_with_path_addedr   Úparse_jcal_valueÚvalidate_value_typeÚ
startswithr   )rh   rv   r#   r$   rS   s   &&   r   r{   ÚvPeriod.parse_jcal_valueè   sD  € ô �dœC× Ò  S¨D¤[à—:‘:˜c“?ˆDÜ˜$¤×%Ò%¬¨T«°a¬Ü"Ø?Àôð ô ×5Ò5°a×8Õ8Ü×.Ò.¨t°A­wÓ7ˆE÷ 9ä×5Ò5°a×8Õ8Ü×0Ò0°°aµ¼#¸sÔCØ�A�w×!Ñ!Ð"3×4Ò4Ü"+×"<Ò"<¸TÀ!½WÓ"E‘ðÜ&/×&@Ò&@ÀÀaÅÓ&I�O÷ 9ð �oÐ%Ð%÷ 9×8ûô (ô Ü*Ø=ØØ" 1�gôð ð	ûðú÷ 9Ö8ð �oÐ%Ð%ús7   Â EÃA F
Ä%E!ÅE	Å!FÅ,FÆFÆF
Æ
F	c                ó&   <€ V ^8„  d   QhRS[ RS[/# )r   Újcal_propertyr   rc   )r   r1   s   "€r   r   r2     s   ø€ ÷ <ñ <¡dð <©tñ <r   c                ó¾  € \         P                  ! W4       \         P                  ! ^4      ;_uu_ 4        V P                  V^,          4      w  r#RRR4       \        P
                  ! V4      pVP                  pV'       d?   \        P                  ! XV4      p\        X4      '       d   \        P                  ! W54      pV ! XX3VR7      #   + '       g   i     L„; i)z Parse jCal from :rfc:`7265`.

Parameters:
    jcal_property: The jCal property to parse.

Raises:
    ~error.JCalParsingError: If the provided jCal is invalid.
N)r.   )
r	   Úvalidate_propertyrz   r{   r
   Úfrom_jcal_propertyÚtzidr   r   r   )rh   r€   r#   r$   r.   r„   s   &&    r   Ú	from_jcalÚvPeriod.from_jcal
  s    € ô 	×*Ò*¨=Ô>Ü×5Ò5°a×8Õ8Ø%(×%9Ñ%9¸-ÈÕ:JÓ%KÑ"ˆE÷ 9ä×.Ò.¨}Ó=ˆØ�{‰{ˆçÜ—L’L ¨Ó-ˆEÜ˜?×+Ò+Ü"%§,¢,¨Ó"E�á�E˜?Ð+°FÔ;Ð;÷ 9×8ús   µCÃC	c                ór   <€ V ^8„  d   Qh/ S[ S[,          ;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   # )r   Údefault_valuer.   r:   r#   r9   r;   )r   r0   r
   Úboolr   r   )r   r1   s   "€r   r   r2   >   sa   ø‡ ‚ ñ| ™C•=Ñ+ñ} ñ~ Ññ ñB ÑñC ñF �OñG ñJ 
�MñK ñN ÑòO r   )r:   r;   r9   r.   r#   r@   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rˆ   r=   rA   rF   ÚstaticmethodrP   rX   Úpropertyr   r_   Úicalendar.paramra   Úclassmethodri   rk   rq   r{   r…   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__)r1   s   @r   r*   r*   >   sÄ   ø‡ € ñ;ðz $,€M÷!ò !òB4ò
Vð ó	<ó ð	<ò!ð ñOó ðOð ÷ó ðõ 'à÷
ó ð
õ &÷Xð Xð ÷&ó ð&ðB ÷<ó ð<÷[ ƒ r   r*   N)rŽ   r   r   r   r   Útypingr   r   Úicalendar.compatibilityr   Úicalendar.errorr	   Úicalendar.parserr
   Úicalendar.timezoner   Úicalendar.toolsr   r   r   r   r   Úbaser   r   r;   r   r!   r(   r*   Ú__all__© r   r   Ú<module>rŸ      sN   ðÙ ,ç 6Ó 6ß  å (Ý ,Ý 'Ý "ß VÕ Vå Ý Ý õ'õ$"ô6a<ˆhô a<ðH ˆ+‚r   