Ë
    8Ò^j9  ã                   óh   — d dl Z d dlZd dlmZ d dlZd dlmZ d dlm	Z	m
Z
 d„ Zd„ Z G d„ dee«      Zy)	é    N)ÚUserDict)ÚReprHTMLMixin)Úgenerate_link_to_param_docÚget_docstringc                 ób  — t        | t        j                  «      r/t        j                  | dddd¬«      } t	        j
                  | «      S t        j                  «       }dD ]  }t        ||d«       Œ d|_	        t        | t        «      r| d›S t	        j
                  |j                  | «      «      S )	Né   ú,Té   )Ú	precisionÚ	separatorÚsuppress_smallÚ	threshold)ÚmaxlistÚmaxdictÚmaxtupleÚmaxsetÚmaxfrozensetÚmaxdequeÚmaxarrayé	   z.4g)Ú
isinstanceÚnpÚndarrayÚarray2stringÚhtmlÚescapeÚreprlibÚReprÚsetattrÚ	maxstringÚfloatÚrepr)ÚvalueÚrÚattrs      úu/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/sklearn/utils/_repr_html/fitted_attributes.pyÚ_read_fitted_attrr'      s˜   € Ü�%œŸ™Ô$Ü—‘Ø˜Q¨#¸dÈaô
ˆô �{‰{˜5Ó!Ð!ä�‰‹€Aðò 	ˆô 	��4˜Õð	ð €A„Kä�%œÔØ˜�Ðä�;‰;�q—v‘v˜e“}Ó%Ð%ó    c                 ó<  — d}d}d}g }| j                  «       D �]`  \  }}t        | j                  || j                  «      }t	        | j                  d|«      }| j                  r,|r*|r(|j                  |t        j                  |«      |¬«      }	ndt        j                  |«      › d�}	t        |«      dk(  r0t        j                  t        |d	   «      «      t        |d
   «      f}
nrt        j                  |d	   «      }t        j                  t        |d   «      «      }t        j                  t        |d   «      «      }|› d|› d|› �t        |d
   «      f}
|j                   |j
                  |
d|	iŽ«       �Œc |j                  dj                  |«      ¬«      S )zìGenerate HTML representation of estimator fitted attributes.

    Creates an HTML table with fitted attribute names and values
    wrapped in a collapsible details element. When attributes are arrays,
    shape and dtype are shown.
    aì  
        <div class="estimator-table">
            <details>
                <summary>Fitted attributes</summary>
                <table class="parameters-table">
                    <tbody>
                        <tr>
                        <th>Name</th>
                        <th>Type</th>
                        <th>Value</th>
                        </tr>
                        {rows}
                    </tbody>
                </table>
            </details>
        </div>
    z°
       <tr class="default">
           <td class="param">{fitted_attr_display}</td>
           <td class="fitted-att-type">{0}</td>
           <td>{1}</td>


       </tr>
    aq  
        <a class="param-doc-link"
            style="anchor-name: --doc-link-{fitted_attr_name};"
            rel="noreferrer" target="_blank" href="{link}">
            {fitted_attr_name}
            <span class="param-doc-description"
            style="position-anchor: --doc-link-{fitted_attr_name};">
            {fitted_attr_description}</span>
        </a>
    Ú
Attributes)ÚlinkÚfitted_attr_nameÚfitted_attr_descriptionz8<a class="param-doc-link" style="text-decoration:none;">z</a>r   Ú	type_namer#   ÚdtypeÚshapeú[ú]Úfitted_attr_displayú
)Úrows)Úitemsr   Úestimator_classÚdoc_linkr   Úformatr   r   ÚlenÚstrr'   ÚappendÚjoin)Úfitted_attributesÚFITTED_ATTR_TEMPLATEÚFITTED_ATTR_ROW_TEMPLATEÚ'FITTED_ATTR_AVAILABLE_DOC_LINK_TEMPLATEr5   ÚnameÚ	attr_infor+   r-   r3   Úhtml_row_valuesr.   r/   r0   s                 r&   Ú_fitted_attr_html_reprrE   ,   sÁ  € ðÐð" Ðð	/Ð+ð €Dà,×2Ñ2Ó4ó +
‰ˆˆiÜ)Ø×-Ñ-ØØ×&Ñ&ó
ˆô
 #0Ø×-Ñ-¨|¸Tó#
Ðð ×%Ò%©$Ñ3Jà"I×"PÑ"PØÜ!%§¡¨TÓ!2Ø(?ð #Qó #Ñð KÜ—;‘;˜tÓ$Ð% Tð+ð  ô
 ˆy‹>˜QÒä—‘œC 	¨+Ñ 6Ó7Ó8Ü! )¨GÑ"4Ó5ð‰Oô
 Ÿ™ I¨kÑ$:Ó;ˆIÜ—K‘K¤ I¨gÑ$6Ó 7Ó8ˆEÜ—K‘K¤ I¨gÑ$6Ó 7Ó8ˆEð �+˜Q˜u˜g Q u gÐ.Ü! )¨GÑ"4Ó5ðˆOð 	�‰Ø+Ð$×+Ñ+Ø ðà$7ñö	
ðM+
ðZ  ×&Ñ&¨D¯I©I°d«OÐ&Ó<Ð<r(   c                   ó0   ‡ — e Zd ZdZeZddddœˆ fd„
Zˆ xZS )Ú	AttrsDictaÃ  Dictionary-like class to store and provide an HTML representation.

    It builds an HTML structure to be used with Jupyter notebooks or similar
    environments.

    Parameters
    ----------
    fitted_attrs : dict, default=None
        Dictionary of fitted attributes and their values.

    estimator_class : type, default=None
        The class of the estimator. It allows to find the online documentation
        link for each parameter.

    doc_link : str, default=""
        The base URL to the online documentation for the estimator class.
        Used to generate parameter-specific documentation links in the HTML
        representation. If empty, documentation links will not be generated.
    NÚ )Úfitted_attrsr7   r8   c                óH   •— t         ‰| �  |xs i «       || _        || _        y )N)ÚsuperÚ__init__r7   r8   )ÚselfrI   r7   r8   Ú	__class__s       €r&   rL   zAttrsDict.__init__£   s$   ø€ Ü‰Ñ˜Ò+¨Ô,Ø.ˆÔØ ˆ�r(   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__rE   Ú
_html_reprrL   Ú__classcell__)rN   s   @r&   rG   rG   Œ   s    ø„ ñð( (€Jà'+¸TÈB÷ !ò !r(   rG   )r   r   Úcollectionsr   Únumpyr   Úsklearn.utils._repr_html.baser   Úsklearn.utils._repr_html.commonr   r   r'   rE   rG   © r(   r&   ú<module>rZ      s5   ðó Û Ý  ã å 7÷ò&ò6]=ô@!�˜xõ !r(   