Ë
    ÚÍ:jx  ã                  ó8  — d Z ddlmZ ddlmZmZmZmZmZ ddl	m
Z
 ddlZddlZddlZ ede
def   ¬«      Z ed	d
¬«      Zeeeeeef   ef      ZeefZddd„Z	 	 	 	 	 	 dd„Z G d„ d
eeef   ej0                  «      Zedk(  rddlZ ej8                  «        yy)zÄThis module contains miscellaneous helpers.

It is not considered part of the public ufoLib API. It does, however,
define the :py:obj:`.deprecated` decorator that is used elsewhere in
the module.
é    )Úannotations)ÚOptionalÚTypeÚTypeVarÚUnionÚcast)ÚCallableNÚF.)ÚboundÚFormatVersionÚBaseFormatVersionc                ó   ‡ — dˆ fd„}|S )a@  Decorator factory to mark functions as deprecated with given message.

    >>> @deprecated("Enough!")
    ... def some_function():
    ...    "I just print 'hello world'."
    ...    print("hello world")
    >>> some_function()
    hello world
    >>> some_function.__doc__ == "I just print 'hello world'."
    True
    c                ób   •‡ — t        j                  ‰ «      ˆ ˆfd„«       }t        t        |«      S )Nc                 ój   •— t        j                  ‰j                  › d‰› �t        d¬«        ‰| i |¤ŽS )Nz function is a deprecated. é   )ÚcategoryÚ
stacklevel)ÚwarningsÚwarnÚ__name__ÚDeprecationWarning)ÚargsÚkwargsÚfuncÚmsgs     €€úk/home/mcse/projects/srt_converter/srt-converter-venv/lib/python3.12/site-packages/fontTools/ufoLib/utils.pyÚwrapperz9deprecated.<locals>.deprecated_decorator.<locals>.wrapper%   s:   ø€ ä�M‰MØ—=‘=�/Ð!<¸S¸EÐBÜ+Øõñ
 ˜Ð( Ñ(Ð(ó    )Ú	functoolsÚwrapsr   r
   )r   r   r   s   ` €r   Údeprecated_decoratorz(deprecated.<locals>.deprecated_decorator$   s-   ù€ Ü	�‰˜Ó	ô	)ó 
ð	)ô ”A�wÓÐr   )r   r
   Úreturnr
   © )r   r!   s   ` r   Ú
deprecatedr$      s   ø€ õ
 ð  Ðr   c                óÞ   — | €|j                  «       S t        | |«      r| S t        | t        «      r
 || df«      S t        | t        «      rt	        | «      dk(  r || «      S t        d| ›�«      ‚)Nr   r   zUnsupported format version: )ÚdefaultÚ
isinstanceÚintÚtupleÚlenÚ
ValueError)ÚvalueÚclss     r   ÚnormalizeFormatVersionr.   3   sm   € ð €}Ø�{‰{‹}ÐÜ�%˜ÔØˆÜ�%œÔÙ�E˜1�:‹ÐÜ�%œÔ¤C¨£J°!¢OÙ�5‹zÐÜ
Ð3°E°9Ð=Ó
>Ð>r   c                  óŽ   ‡ — e Zd ZU ded<   d
ˆ fd„Zedd„«       Zedd„«       Zedd„«       Z	dd„Z
edd„«       Zedd	„«       Zˆ xZS )r   útuple[int, int]r,   c                ó$   •— t         ‰| �  | |«      S ©N)ÚsuperÚ__new__)r-   r,   Ú	__class__s     €r   r4   zBaseFormatVersion.__new__F   s   ø€ Ü‰w‰˜s EÓ*Ð*r   c                ó    — | j                   d   S )Nr   ©r,   ©Úselfs    r   ÚmajorzBaseFormatVersion.majorI   ó   € à�z‰z˜!‰}Ðr   c                ó    — | j                   d   S )Né   r7   r8   s    r   ÚminorzBaseFormatVersion.minorM   r;   r   c                óŽ   — t        |t        «      r
 | |df«      S |€| j                  «       S t        |›d| j                  › �«      ‚)Nr   z is not a valid )r'   r(   r&   r+   r   )r-   r,   s     r   Ú	_missing_zBaseFormatVersion._missing_Q   sH   € ô �eœSÔ!Ù˜˜q�z“?Ð"àˆ=Ø—;‘;“=Ð Ü˜E˜9Ð$4°S·\±\°NÐCÓDÐDr   c                ó8   — | j                   › d| j                  › �S )Nú.)r:   r>   r8   s    r   Ú__str__zBaseFormatVersion.__str__[   s   € Ø—*‘*�˜Q˜tŸz™z˜lÐ+Ð+r   c                óH   — t        | j                  j                  «       «      S r2   )ÚmaxÚ__members__Úvalues©r-   s    r   r&   zBaseFormatVersion.default^   s   € ô �3—?‘?×)Ñ)Ó+Ó,Ð,r   c                óH   — t        | j                  j                  «       «      S r2   )Ú	frozensetrF   rG   rH   s    r   Úsupported_versionsz$BaseFormatVersion.supported_versionsc   s   € ä˜Ÿ™×/Ñ/Ó1Ó2Ð2r   )r-   úType[FormatVersion]r,   r0   r"   r   )r"   r(   )r,   Úobjectr"   r   )r"   Ústr)r-   rL   r"   r   )r-   rL   r"   zfrozenset[FormatVersion])r   Ú
__module__Ú__qualname__Ú__annotations__r4   Úpropertyr:   r>   Úclassmethodr@   rC   r&   rK   Ú__classcell__)r5   s   @r   r   r   C   sy   ø… ØÓõ+ð òó ðð òó ðð òEó ðEó,ð ò-ó ð-ð ò3ó ô3r   Ú__main__)Ú )r   rN   r"   zCallable[[F], F])r,   ÚFormatVersionInputr-   rL   r"   r   )Ú__doc__Ú
__future__r   Útypingr   r   r   r   r   Úcollections.abcr	   Úenumr   r   rM   r
   r   r(   r)   rW   ÚfloatÚnumberTypesr$   r.   ÚEnumr   r   ÚdoctestÚtestmodr#   r   r   ú<module>rb      sÆ   ðñõ #ç 7Õ 7Ý $Û Û Û áˆC�x  V Ñ,Ô-€Ù˜Ð/BÔC€Ø˜e C¨¨s°C¨x©¸-Ð$GÑHÑIÐ à�Eˆl€ô ð8?Øð?Ø$7ð?àó?ô "3˜˜c 3˜h™¨¯©ô "3ðJ ˆzÒÛà€G‡O�OÕð r   