
    ?g                        d dl Z d dlmZ d dlmZ d dlmZ ddgZ G d dej                        Zej                  j                         Z	e	j                  ej                  j                   e       i       ej                  j                         Zej                  ej                  j                   e       i        G d	 d
ej                         Z G d dej"                        Z e       ZdefdZy)    N)error)encoder)univEncoderencodec                       e Zd Zed        Zy)
SetEncoderc                    | \  }}||}n|}|j                   t        j                  j                   k(  r|j                  s||j	                         j                  S |j
                  j                  D cg c]  }|j                  |v r|j                   }}t        |      dk7  r+t        j                  t        |      xr dxs dd|      ||d      j                  S |j                  S c c}w )zeSort SET components by tag

        Sort depending on the actual Choice value (dynamic sort)
           z	Multiple zNone z components for Choice at r   )typeIdr   ChoicetagSetgetComponentcomponentType
namedTypesnamelenr   PyAsn1Error)componentAndType	componentasn1SpeccompType	namedTypenamess         M/var/www/openai/venv/lib/python3.12/site-packages/pyasn1/codec/der/encoder.py_componentSortKeyzSetEncoder._componentSortKey   s     /	8 HH??dkk000 --/666 :B9O9O9Z9Z 99ZI%NNi7 #9Z 9u:?++<?J<V;<aZa<aclmo o  a)000 ??"9s   4!C.N)__name__
__module____qualname__staticmethodr        r   r	   r	      s    # #r"   r	   c                       e Zd ZdZdZeZeZy)SingleItemEncoderTr   N)r   r   r   fixedDefLengthModefixedChunkSizeTAG_MAPTYPE_MAPr!   r"   r   r$   r$   ?   s    NGHr"   r$   c                       e Zd ZeZy)r   N)r   r   r   r$   SINGLE_ITEM_ENCODERr!   r"   r   r   r   G   s    +r"   attrc                     dddj                  |       x}r-t        j                  |  d| dt               t	               |   S t        |       )Nr'   r(   )tagMaptypeMapz is deprecated. Please use z	 instead.)getwarningswarnDeprecationWarningglobalsAttributeError)r+   newAttrs     r   __getattr__r6   z   sR    &:>BB4HHwH9')LN`ay!!

r"   )r0   pyasn1r   pyasn1.codec.cerr   pyasn1.typer   __all__r	   r'   copyupdateSetr   r(   r   r$   r   r   strr6   r!   r"   r   <module>r?      s      $ h
### #@ //


  HHOOZ\ 
   " HHOOZ\ 11 ,goo ,b 
c r"   