§
    �Ÿj¯
  ã                  ó   — d Z ddlmZ ddlZddlmZmZ ddlmZm	Z	m
Z
mZmZmZmZmZ ddlmZ ddlmZ ddlmZ dd	lmZ dd	lmZ ddlmZ ddlmZ ddlmZ dd	lmZ dd	lmZ ddlmZ  ddlmZ! ddlmZ" d
Z#dZ$d„ Z%dS )zDThe main API for the v2 notebook format.

Authors:

* Brian Granger
é    )ÚannotationsNé   )Ú	downgradeÚupgrade)ÚNotebookNodeÚ
new_authorÚnew_code_cellÚnew_metadataÚnew_notebookÚ
new_outputÚnew_text_cellÚnew_worksheet)Úreads)Úto_notebook)Úwritesé   c                ó‚   — t           j                             | ¦  «        \  }}|dv rd}n|dk    rd}n	| }| dz   } d}| ||fS )a÷  Parse a notebook filename.

    This function takes a notebook filename and returns the notebook
    format (json/py) and the notebook name. This logic can be
    summarized as follows:

    * notebook.ipynb -> (notebook.ipynb, notebook, json)
    * notebook.json  -> (notebook.json, notebook, json)
    * notebook.py    -> (notebook.py, notebook, py)
    * notebook       -> (notebook.ipynb, notebook, json)

    Parameters
    ----------
    fname : unicode
        The notebook filename. The filename can use a specific filename
        extension (.ipynb, .json, .py) or none, in which case .ipynb will
        be assumed.

    Returns
    -------
    (fname, name, format) : (unicode, unicode, unicode)
        The filename, notebook name and format.
    )ú.ipynbz.jsonÚjsonz.pyÚpyr   )ÚosÚpathÚsplitext)ÚfnameÚbasenameÚextÚformat_s       úa/var/www/finuniver-perm.ru/html/student/venv/lib/python3.11/site-packages/nbformat/v2/__init__.pyÚparse_filenamer   9   sa   € õ0 ”G×$Ò$ UÑ+Ô+�M€HˆcØ
Ð!Ð!Ð!ØˆˆØ	�ŠˆØˆˆàˆØ˜Ñ ˆØˆØ�(˜GÐ#Ð#ó    )&Ú__doc__Ú
__future__r   r   Úconvertr   r   Únbbaser   r   r	   r
   r   r   r   r   Únbjsonr   Ú	read_jsonÚ
reads_jsonr   Úto_notebook_jsonr   Ú
write_jsonÚwrites_jsonÚnbpyÚread_pyÚreads_pyÚto_notebook_pyÚwrite_pyÚ	writes_pyÚnbxmlÚread_xmlÚ	reads_xmlÚto_notebook_xmlÚnbformatÚnbformat_minorr   © r    r   ú<module>r8      s»  ððð ð" #Ð "Ð "Ð "Ð "Ð "à 	€	€	€	à 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'ð	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 'Ð &Ð &Ð &Ð &Ð &Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø (Ð (Ð (Ð (Ð (Ð (Ø )Ð )Ð )Ð )Ð )Ð )Ø "Ð "Ð "Ð "Ð "Ð "Ø #Ð #Ð #Ð #Ð #Ð #Ø /Ð /Ð /Ð /Ð /Ð /Ø $Ð $Ð $Ð $Ð $Ð $Ø %Ð %Ð %Ð %Ð %Ð %ð %Ð $Ð $Ð $Ð $Ð $Ø %Ð %Ð %Ð %Ð %Ð %Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1ð €Ø€ð!$ð !$ð !$ð !$ð !$r    