Ë
    V.j°•  ã                  ó|  — U d Z ddlmZ ddlmZ ddlZddlZddlZddl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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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/m0Z0 d d(l1m2Z2 d d)l1m3Z3 d d*l1m4Z4 ej$                  r�dd+l5m6Z6 dd,l5m7Z7 dd-lm8Z8 dd.lm9Z9 dd/lm:Z: dd0l;m<Z< dd1l=m>Z> dd2l?m@Z@ dd3lAmBZB dd4lAmCZC dd5lDmEZE d d6lFmGZG d d7lHmIZI d d8lJmKZK d d9lJmLZL d d:l/mMZM d d;l/mNZN d d<lOmPZP d d=lQmRZR d d>lSmTZT d d?l1mUZU d d@l1mVZV d dAl1mWZW d dBl1mXZX  edCe	¬D«      ZY edEe	¬D«      ZZ G dF„ dGe$eY   «      Z[ee\dHdIdJdKf   Z] edLe	¬D«      Z^ ej¾                  «       Z`dMeadN<    G dO„ dPe#e^   e"e[e^   «      Zb G dQ„ dRebeY   eeY   «      Zc G dS„ dTe[eY   «      Zd G dU„ dVe[eY   «      Ze G dW„ dXeeeY   eeY   «      Zfy)YzŸDescriptor properties are more "auxiliary" properties
that exist as configurational elements, but don't participate
as actively in the load/persist ORM loop.

é    )Úannotations)Úis_dataclassN)ÚAny)ÚCallable)ÚDict)ÚList)ÚNoReturn)ÚOptional)ÚSequence)ÚTuple)ÚType)ÚTYPE_CHECKING)ÚTypeVar)ÚUnioné   )Ú
attributes)Úutil)Ú_DeclarativeMapped)ÚLoaderCallableStatus)ÚMapped)ÚPassiveFlag)ÚSQLORMOperations)Ú_AttributeOptions)Ú_IntrospectsAnnotations)Ú_MapsColumns)ÚMapperProperty)ÚPropComparator)Ú	_none_set)Úde_stringify_annotationé   )Úevent)Úexc)Úschema)Úsql©Ú
expression)Ú	operators)ÚBindParameter)Ú
is_fwd_ref)Ú	is_pep593)Útyping_get_args)Ú_InstanceDict)Ú_RegistryType)ÚHistory)ÚInstrumentedAttribute)ÚQueryableAttribute)ÚORMCompileState)Ú_ClassScanMapperConfig)ÚMapper)ÚColumnProperty)ÚMappedColumn)ÚInstanceState)Ú
Connection)ÚRow)Ú_DMLColumnArgument)Ú	_InfoType)Ú
ClauseList)ÚColumnElement)ÚOperatorType)ÚColumn)ÚSelect)Ú_AnnotationScanType)ÚCallableReference)ÚDescriptorReference)ÚRODescriptorReferenceÚ_T)ÚboundÚ_PTc                  óh   — e Zd ZU dZdZded<   dZdZded<   ej                  f	 	 	 	 	 	 	 d
d„Z
dd	„Zy)ÚDescriptorPropertyzO:class:`.MapperProperty` which proxies access to a
    user-defined descriptor.NúOptional[str]ÚdocFzDescriptorReference[Any]Ú
descriptorc                ó   — t        «       ‚©N)ÚNotImplementedError)ÚselfÚstateÚdict_Úpassives       úaC:\xampp\htdocs\tradingbinance\backend\.venv\Lib\site-packages\sqlalchemy/orm/descriptor_props.pyÚget_historyzDescriptorProperty.get_historye   s   € ô "Ó#Ð#ó    c                ó‚  ‡ ‡‡— ‰ Š G ˆfd„dt         j                  «      }‰ j                  €Dt        ‰j                  ‰ j
                  d «      }‰j                  ‰ j
                  |«      r|‰ _        ‰ j                  €%d	ˆ fd„}d
ˆ fd„}dˆ fd„}t        |||¬«      ‰ _         t        j                  ‰ j                  «      ‰ j                  j                  ‰ j
                  ‰ j                  ˆˆ fd„‰ j                  ‰ ¬«      } |‰ j
                  «      |_        ‰j                  j                  ‰ j
                  |«       y )Nc                  ój   •— e Zd ZdZdZdZedˆ fd„«       Zdd„Ze	j                  f	 	 	 	 	 	 	 d	ˆ fd„Zy)
ú7DescriptorProperty.instrument_class.<locals>._ProxyImplFTc                ó   •— ‰j                   S rM   )Úuses_objects©rO   Úprops    €rS   rZ   zDDescriptorProperty.instrument_class.<locals>._ProxyImpl.uses_objectsu   s   ø€ à×(Ñ(Ð(rU   c                ó   — || _         y rM   )Úkey)rO   r^   s     rS   Ú__init__z@DescriptorProperty.instrument_class.<locals>._ProxyImpl.__init__y   s	   € Ø�•rU   c                ó*   •— ‰j                  |||«      S rM   )rT   )rO   rP   rQ   rR   r\   s       €rS   rT   zCDescriptorProperty.instrument_class.<locals>._ProxyImpl.get_history|   s   ø€ ð ×'Ñ'¨¨u°gÓ>Ð>rU   N©ÚreturnÚbool)r^   Ústr©rP   úInstanceState[Any]rQ   r,   rR   r   rb   r.   )Ú__name__Ú
__module__Ú__qualname__Úaccepts_scalar_loaderÚload_on_unexpireÚ
collectionÚpropertyrZ   r_   r   ÚPASSIVE_OFFrT   )r\   s   €rS   Ú
_ProxyImplrX   p   sa   ø„ Ø$)Ð!Ø#ÐØˆJàô)ó ð)óð (3×'>Ñ'>ð	?à)ð?ð %ð?ð %ð	?ð
 ö?rU   ro   c                ó4   •— t        | ‰j                  |«       y rM   )ÚsetattrÚname)ÚobjÚvaluerO   s     €rS   Úfsetz1DescriptorProperty.instrument_class.<locals>.fset‹   s   ø€ Ü˜˜TŸY™Y¨Õ.rU   c                ó2   •— t        | ‰j                  «       y rM   )Údelattrrr   ©rs   rO   s    €rS   Úfdelz1DescriptorProperty.instrument_class.<locals>.fdelŽ   s   ø€ Ü˜˜TŸY™YÕ'rU   c                ó0   •— t        | ‰j                  «      S rM   )Úgetattrrr   rx   s    €rS   Úfgetz1DescriptorProperty.instrument_class.<locals>.fget‘   s   ø€ Ü˜s D§I¡IÓ.Ð.rU   )r|   ru   ry   c                 ó&   •— ‰j                  ‰ «      S rM   )Ú_comparator_factory)ÚmapperrO   s   €€rS   Ú<lambda>z5DescriptorProperty.instrument_class.<locals>.<lambda>š   s   ø€ �D×,Ñ,¨VÔ4rU   )rJ   Úoriginal_property)rs   r   rt   r   rb   ÚNone)rs   r   rb   r‚   )rs   r   rb   r   )r   ÚAttributeImplrK   r{   Úclass_r^   Ú_is_userland_descriptorrm   Úcreate_proxied_attributeÚparentrJ   ÚimplÚclass_managerÚinstrument_attribute)	rO   r   ro   Údescru   ry   r|   Ú
proxy_attrr\   s	   ``      @rS   Úinstrument_classz#DescriptorProperty.instrument_classm   sñ   ú€ Øˆö	?œ×1Ñ1ô 	?ð( �?‰?Ð"Ü˜6Ÿ=™=¨$¯(©(°DÓ9ˆDØ×-Ñ-¨d¯h©h¸Ô=Ø"&�”à�?‰?Ð"õ/õ(õ/ô '¨D°tÀ$ÔGˆDŒOàI”Z×8Ñ8¸¿¹ÓIØ�K‰K×ÑØ�H‰HØ�O‰OÜ4Ø—‘Ø"ô
ˆ
ñ % T§X¡XÓ.ˆ
ŒØ×Ñ×1Ñ1°$·(±(¸JÕGrU   re   ©r   úMapper[Any]rb   r‚   )rg   rh   ri   Ú__doc__rJ   Ú__annotations__rZ   Ú_links_to_entityr   rn   rT   r�   © rU   rS   rH   rH   Z   s`   … ñ ð €CˆÓà€LØÐà(Ó(ð  +×6Ñ6ð	$à!ð$ð ð$ð ð	$ð
 
ó$ô2HrU   rH   z
Column[_T]zMappedColumn[_T]zInstrumentedAttribute[_T]z
Mapped[_T]Ú_CCzFweakref.WeakKeyDictionary[Type[Any], Callable[[Any], Tuple[Any, ...]]]Ú_composite_gettersc                  óp  ‡ — e Zd ZU dZded<   ded<   ded<   ded	<   	 d(d
ddd
d
d
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d)ˆ fd„Zd*ˆ fd„Zd+d„Zd,d„Z e	«       Z
d,d„Z ej                  d«      	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d-d„«       Zd,d„Z ej                  d«       ej                  d«      	 	 	 	 	 	 	 	 	 	 d.d„«       «       Zej"                  d/d„«       Zej"                   ej                  d«      d0d„«       «       Zej(                   ej                  d«      d1d„«       «       Zed2d„«       Zed3d„«       Z ej                  d«      d,d„«       Zd,d„Zej"                  d4d„«       Z	 	 d5d „Zej<                  f	 	 	 	 	 	 	 d6d!„Z	 	 	 	 d7d"„Z  G d#„ d$e!jD                  e#   «      Z$ G d%„ d&e%e&   «      Z'd8d'„Z(ˆ xZ)S )9ÚCompositePropertyzöDefines a "composite" mapped attribute, representing a collection
    of columns as one attribute.

    :class:`.CompositeProperty` is constructed using the :func:`.composite`
    function.

    .. seealso::

        :ref:`mapper_composite`

    z$Union[Type[_CC], Callable[..., _CC]]Úcomposite_classz#Tuple[_CompositeAttrType[Any], ...]Úattrsz=CallableReference[Optional[Callable[[_CC], Tuple[Any, ...]]]]Ú_generated_composite_accessorzType[Comparator[_CC]]Úcomparator_factoryNF)Úattribute_optionsÚactive_historyÚdeferredÚgroupr›   Úinfoc               óÌ  •— t         ‰
| �  |¬«       t        |t        t        t
        j                  f«      r|f|z   | _        d | _        n|| _        || _        || _	        || _
        || _        |�|n| j                  j                  | _        d | _        |�| j                   j#                  |«       t%        j&                  | «       | j)                  «        | j+                  «        y ©N)rœ   )Úsuperr_   Ú
isinstancer   rd   r$   r<   r™   r˜   r�   rž   rŸ   Ú	__class__Ú
Comparatorr›   rš   r    Úupdater   Úset_creation_orderÚ_create_descriptorÚ_init_accessor)rO   Ú_class_or_attrrœ   r�   rž   rŸ   r›   r    r™   Úkwargsr¥   s             €rS   r_   zCompositeProperty.__init__Ë   sÓ   ø€ ô 	‰ÑÐ+<ÐÔ=ä�n¤v¬s´C×4EÑ4EÐ&FÔGØ(Ð*¨UÑ2ˆDŒJà#'ˆDÕ à#1ˆDÔ ØˆDŒJà,ˆÔØ ˆŒØˆŒ
ð "Ð-ñ à—‘×*Ñ*ð 	Ôð
 .2ˆÔ*ØÐØ�I‰I×Ñ˜TÔ"ä×Ñ Ô%Ø×ÑÔ!Ø×ÑÕrU   c                óD   •— t         ‰| �  |«       | j                  «        y rM   )r£   r�   Ú_setup_event_handlers)rO   r   r¥   s     €rS   r�   z"CompositeProperty.instrument_classó   s   ø€ Ü‰Ñ  Ô(Ø×"Ñ"Õ$rU   c                óâ   — | j                   r| j                  |«      S 	 |j                  } |«       S # t        $ r3}t        j                  d| j
                  j                  › d�«      |‚d }~ww xY w)NzComposite class zX is not a dataclass and does not define a __composite_values__() method; can't get state)rš   Ú__composite_values__ÚAttributeErrorÚsa_excÚInvalidRequestErrorr˜   rg   )rO   rt   ÚaccessorÚaes       rS   Ú_composite_values_from_instancez1CompositeProperty._composite_values_from_instance÷   s   € Ø×-Ò-Ø×5Ñ5°eÓ<Ð<ð	"Ø ×5Ñ5�ñ  “zÐ!øô "ò Ü×0Ñ0Ø& t×';Ñ';×'DÑ'DÐ&Eð F/ð /óð ð	ûðús   Ÿ2 ²	A.».A)Á)A.c                ó$   — | j                  «        y)zwInitialization which occurs after the :class:`.Composite`
        has been associated with its parent mapper.

        N)Ú_setup_arguments_on_columns©rO   s    rS   Údo_initzCompositeProperty.do_init  s   € ð
 	×(Ñ(Õ*rU   c                óT   ‡ ‡— dˆ fd„Šdˆˆ fd„}dˆˆ fd„}t        ‰||«      ‰ _        y)ztCreate the Python descriptor that will serve as
        the access point on instances of the mapped class.

        c                ó
  •— t        j                  | «      }t        j                  | «      }‰j                  |vrª‰j                  D �cg c]  }t        | |«      ‘Œ }}‰j                  |vry|j                  €t        j                  |«      sX ‰j                  |Ž |‰j                  <   |j                  j                  j                  |‰j                  ‰j                  g«       |j                  ‰j                  d «      S c c}w rM   )r   Úinstance_dictÚinstance_stater^   Ú_attribute_keysr{   r   Ú
issupersetr˜   ÚmanagerÚdispatchÚrefreshÚ_COMPOSITE_FGETÚget)ÚinstancerQ   rP   r^   ÚvaluesrO   s        €rS   r|   z2CompositeProperty._create_descriptor.<locals>.fget  sá   ø€ Ü×,Ñ,¨XÓ6ˆEÜ×-Ñ-¨hÓ7ˆEà�x‰x˜uÑ$ð
 7;×6JÒ6JóÙ6J¨s”G˜H cÕ*Ð6Jð ð ð —8‘8 5Ñ(Ø—I‘IÐ)´×1EÑ1EÀfÔ1Mà&: d×&:Ñ&:¸FÐ&C�E˜$Ÿ(™(‘OØ—M‘M×*Ñ*×2Ñ2Ø˜t×3Ñ3°d·h±h°Zôð —9‘9˜TŸX™X tÓ,Ð,ùò#s   ÁD c                óR  •— t        j                  | «      }t        j                  | «      }|j                  ‰	j                     }|j
                  j                  r	 ‰| «      }n*|j                  ‰	j                  t        j                  «      }|j
                  j                  D ]  } |||||j                  «      }Œ ||‰	j                  <   |€‰	j                  D ]  }t        | |d «       Œ y t        ‰	j                  ‰	j                  |«      «      D ]  \  }}t        | ||«       Œ y rM   )r   r½   r¾   rÁ   r^   rÂ   Ú_active_historyrÅ   r   ÚNO_VALUEÚsetrˆ   r¿   rq   Úzipr¶   )
rÆ   rt   rQ   rP   ÚattrÚpreviousÚfnr^   r|   rO   s
           €€rS   ru   z2CompositeProperty._create_descriptor.<locals>.fset0  sö   ø€ Ü×,Ñ,¨XÓ6ˆEÜ×-Ñ-¨hÓ7ˆEØ—=‘= §¡Ñ*ˆDà�}‰}×,Ò,Ù ›>‘à Ÿ9™9 T§X¡XÔ/C×/LÑ/LÓM�à—m‘m×'Ô'�Ù˜5 %¨°4·9±9Ó=‘ð (à#ˆE�$—(‘(‰OØˆ}Ø×/Ô/�CÜ˜H c¨4Õ0ñ 0ô #&Ø×(Ñ(Ø×8Ñ8¸Ó?ö#‘J�C˜ô ˜H c¨5Õ1ñ	#rU   c                ó  •— t        j                  | «      }t        j                  | «      }|j                  ‰j                     }|j
                  j                  r% ‰| «      }|j                  ‰j                  d «       n*|j                  ‰j                  t        j                  «      }|j                  ‰j                     }|j
                  j                  |||j                  «       ‰j                  D ]  }t        | |d «       Œ y rM   )r   r¾   r½   rÁ   r^   rÂ   rÉ   Úpopr   rÊ   Úremoverˆ   r¿   rq   )rÆ   rP   rQ   rÍ   rÎ   r^   r|   rO   s         €€rS   ry   z2CompositeProperty._create_descriptor.<locals>.fdelG  sÀ   ø€ Ü×-Ñ-¨hÓ7ˆEÜ×,Ñ,¨XÓ6ˆEØ—=‘= §¡Ñ*ˆDà�}‰}×,Ò,Ù ›>�Ø—	‘	˜$Ÿ(™( DÕ)à Ÿ9™9 T§X¡XÔ/C×/LÑ/LÓM�à—=‘= §¡Ñ*ˆDØ�M‰M× Ñ  ¨°$·)±)Ô<Ø×+Ô+�Ü˜ # tÕ,ñ ,rU   N)rÆ   r   rb   r   )rÆ   r   rt   r   rb   r‚   )rÆ   r   rb   r‚   )rm   rK   )rO   ru   ry   r|   s   `  @rS   r©   z$CompositeProperty._create_descriptor  s$   ù€ õ	-ö6	2ö.	-ô  # 4¨¨tÓ4ˆ�rU   úsqlalchemy.orm.propertiesc
                óØ  — t         j                  j                  j                  }
| j                  €|€| j                  ||«       |}t        |«      rt        |«      d   }|r€| j                  €tt        |t        «      st        |d¬«      rP|€?t        |d«      r|j                  n
t        |«      }t        j                  d|› d|› d�«      ‚t        |||d¬«      }|| _        t!        | j                  «      r| j#                  ||||«       nO| j$                  D ]@  }t        ||
t&        j(                  f«      sŒ |j*                  �Œ-t        j                  d	«      ‚ | j-                  «        y )
Nr   T)Úcheck_genericÚ__forward_arg__zCan't use forward ref z9 for composite class argument; set up the type as Mapped[Ú])Úinclude_genericzIComposite class column arguments must be named unless a dataclass is used)r   Ú	preloadedÚorm_propertiesr5   r˜   Ú_raise_for_requiredr*   r+   r¤   rd   r)   ÚhasattrrÖ   r²   ÚArgumentErrorr   r   Ú_setup_for_dataclassr™   r#   r>   rr   rª   )rO   Ú	decl_scanÚregistryÚclsÚoriginating_moduler^   Úmapped_containerÚ
annotationÚextracted_mapped_annotationÚis_dataclass_fieldr5   ÚargumentÚstr_argrÍ   s                 rS   Údeclarative_scanz"CompositeProperty.declarative_scanY  sj  € ô —~‘~×4Ñ4×AÑAˆà× Ñ Ð(Ø+Ð3à×$Ñ$ S¨#Ô.Ø.ˆä�XÔÜ& xÓ0°Ñ3ˆHá˜×,Ñ,Ð4Ü˜(¤CÔ(¬JØ¨õ-ð &Ð-ô # 8Ð->Ô?ð !×0Ò0ä  ›]ð ô
 !×.Ñ.Ø0°°
ð ;EØELÀIÈQðPóð ô 3Ø˜Ð#5Àtô�ð $,ˆDÔ ä˜×,Ñ,Ô-Ø×%Ñ% h°Ð5GÈÕMàŸ
œ
�ä˜t l´F·M±MÐ%BÕCØŸ	™	Ñ)ä ×.Ñ.ð5óð ð #ð 	×ÑÕrU   c                óœ  ‡— t        | j                  «      r¡t        | j                  d«      s‹t        j                  | j                  «      }t        j                  |j                  j                  «       D �cg c]  }|j                  ‘Œ c}Ž Št        |j                  «      dk(  rˆfd„| _        n‰| _        | j                  �„t        | j                  t        «      ri| j                  t        vrV| j                  �| j                  t        | j                  <   y t        | j                  d«      rd„ t        | j                  <   y y y y y c c}w )Nr°   r   c                ó   •—  ‰| «      fS rM   r“   )rs   Úgetters    €rS   r€   z2CompositeProperty._init_accessor.<locals>.<lambda>œ  s   ø€ Á&ÈÃ+ÁrU   c                ó"   — | j                  «       S rM   ©r°   )rs   s    rS   r€   z2CompositeProperty._init_accessor.<locals>.<lambda>«  s   €  × 8Ñ 8Ô :rU   )r   r˜   rÜ   ÚinspectÚ	signatureÚoperatorÚ
attrgetterÚ
parametersrÇ   rr   Úlenrš   r¤   Útyper•   )rO   ÚinspÚprì   s      @rS   rª   z CompositeProperty._init_accessor“  s&  ø€ Ü˜×,Ñ,Ô-´gØ× Ñ Ð"8ô7
ô ×$Ñ$ T×%9Ñ%9Ó:ˆDÜ×(Ñ(Ø"&§/¡/×"8Ñ"8Ô":Ó;Ñ":˜Q�!—&“&Ð":Ñ;ðˆFô �4—?‘?Ó# qÒ(Û5O�Õ2à5;�Ô2ð × Ñ Ð,Ü˜4×/Ñ/´Ô6Ø×$Ñ$Ô,>Ñ>à×1Ñ1Ð=à×6Ñ6ô # 4×#7Ñ#7Ò8ô ˜×-Ñ-Ð/EÔFá:ô # 4×#7Ñ#7Ò8ð Gð ?ð 7ð -ùò <s   Á7E	zsqlalchemy.orm.decl_basec                ó  — t         j                  j                  j                  }t         j                  j                  }t        j                  | j                  «      }t        j                  |j                  j                  «       | j                  «      D ]ì  \  }}	|€Xt        j                  dt        | j                  «      › d| j                  j                   › dt        |j                  «      › �«      ‚|	€ |«       }	| xj                  |	fz  c_        t#        |	|«      r+|	j%                  |||||j&                  |j(                  «       Œ¶t#        |	t*        j,                  «      sŒÑ|j/                  |j&                  |	«       Œî y )Nznumber of composite attributes z3 exceeds that of the number of attributes in class Ú )r   rÙ   rÚ   r5   Úorm_decl_baserï   rð   r˜   Ú	itertoolsÚzip_longestró   rÇ   r™   r²   rÝ   rô   rg   r¤   Údeclarative_scan_for_compositerr   rä   r#   r>   Ú_undefer_column_name)
rO   rà   rá   râ   r^   r5   Ú	decl_baserö   ÚparamrÍ   s
             rS   rÞ   z&CompositeProperty._setup_for_dataclass®  s<  € ô —~‘~×4Ñ4×AÑAˆä—N‘N×0Ñ0ˆ	ä× Ñ  ×!5Ñ!5Ó6ˆÜ$×0Ñ0Ø�O‰O×"Ñ"Ó$ d§j¡jö
‰KˆE�4ð ˆ}Ü×*Ñ*Ø5Ü˜4Ÿ:™:“Ð'ð (Aà×+Ñ+×4Ñ4Ð5°Q´s¸4¿?¹?Ó7KÐ6LðNóð ð ˆ|á#“~�Ø—
’
˜t˜gÑ%•
ä˜$ Ô-Ø×3Ñ3ØØØ&ØØ—J‘JØ×$Ñ$õô ˜D¤&§-¡-Õ0Ø×.Ñ.¨u¯z©z¸4Õ@ñ3
rU   c                ó�   — | j                   D �cg c],  }t        | j                  j                  |j                  «      ‘Œ. c}S c c}w rM   )Úpropsr{   r‡   r„   r^   r[   s     rS   Ú_comparable_elementsz&CompositeProperty._comparable_elements×  s3   € àBFÇ*Â*ÓMÁ*¸$”˜Ÿ™×*Ñ*¨D¯H©HÕ5À*ÑMÐMùÒMs   �1Azorm.propertiesc                ó\  — g }t         j                  j                  j                  }| j                  D ]ö  }t        |t        «      r| j                  j                  |d¬«      }n�t        |t        j                  «      r| j                  j                  |   }nYt        ||«      r$| j                  j                  |j                     }n)t        |t        j                  «      r|j                  }nd }t        |t         «      st#        j$                  d|›�«      ‚|j'                  |«       Œø |S )NF)Ú_configure_mapperszYComposite expects Column objects or mapped attributes/attribute names as arguments, got: )r   rÙ   rÚ   r5   r™   r¤   rd   r‡   Úget_propertyr#   r>   Ú_columntopropertyÚcolumnr   r/   rm   r   r²   rÝ   Úappend)rO   r  r5   rÍ   r\   s        rS   r  zCompositeProperty.propsÛ  sô   € ð ˆÜ—~‘~×4Ñ4×AÑAˆà—J”JˆDÜ˜$¤Ô$Ø—{‘{×/Ñ/°ÈÐ/ÓO‘Ü˜D¤&§-¡-Ô0Ø—{‘{×4Ñ4°TÑ:‘Ü˜D ,Ô/Ø—{‘{×4Ñ4°T·[±[ÑA‘Ü˜D¤*×"BÑ"BÔCØ—}‘}‘à�ä˜d¤NÔ3Ü×*Ñ*ðEØEIÀHðNóð ð
 �L‰L˜Õð% ð& ˆrU   c                óð   — t         j                  j                  j                  }| j                  D �cg c]8  }t        |t        j                  |f«      rt        ||«      r|j                  n|‘Œ: c}S c c}w rM   )	r   rÙ   rÚ   r5   r™   r¤   r#   r>   r  )rO   r5   Úas      rS   ÚcolumnszCompositeProperty.columnsö  si   € ô —~‘~×4Ñ4×AÑAˆð —Z’Zó
á�Ü˜!œfŸm™m¨\Ð:Ô;ô # 1 lÔ3ˆA�HŠH¸Ñ:Øñ
ð 	
ùò 
s   ³=A3c                ó   — | S rM   r“   r¹   s    rS   Úmapper_property_to_assignz+CompositeProperty.mapper_property_to_assign   s   € àˆrU   c                ó^   — | j                   D �cg c]  }|j                  �Œ|df‘Œ c}S c c}w )Nr   )r  Útable)rO   Úcs     rS   Úcolumns_to_assignz#CompositeProperty.columns_to_assign  s*   € à $§¢Ó@¡˜1°·±±��A’ Ñ@Ð@ùÒ@s   �*¡*c                ó  — t         j                  j                  j                  }| j                  D ]W  }t        ||«      sŒ|}| j                  |_        | j                  r| j                  |_        d|_        | j                  |_	        ŒY y)zwPropagate configuration arguments made on this composite
        to the target columns, for those that apply.

        ))rž   T)Ú
instrumentTN)
r   rÙ   rÚ   r4   r  r¤   r�   rž   Ústrategy_keyrŸ   )rO   r4   r\   Úcprops       rS   r¸   z-CompositeProperty._setup_arguments_on_columns  sl   € ô Ÿ™×6Ñ6×EÑEˆà—J”JˆDÜ˜d NÔ3Øà�à#'×#6Ñ#6ˆEÔ Ø�}Š}Ø!%§¡�”Ø%O�Ô"ØŸ*™*ˆE�Kñ rU   c                ó¼  ‡ ‡— 	 	 	 	 	 	 dˆfd„}	 	 	 	 	 	 	 	 dˆˆ fd„}	 	 	 	 	 	 	 	 	 	 dˆ fd„Š	 	 	 	 	 	 dˆ fd„}	 	 	 	 	 	 	 	 dˆ fd„}t        j                  ‰ j                  d|d¬«       t        j                  ‰ j                  d	|d¬«       t        j                  ‰ j                  d
|dd¬«       t        j                  ‰ j                  d|dd¬«       t        j                  ‰ j                  d|dd¬«       ‰ j                  j                  ‰ j                     }|j
                  |j                  _        ‰ j                  |j                  j
                  _        y)z>Establish events that populate/expire the composite attribute.c                ó   •—  ‰| |d d¬«       y )NF©Ú
is_refreshr“   )rP   ÚcontextÚ_load_refresh_handlers     €rS   Úload_handlerz=CompositeProperty._setup_event_handlers.<locals>.load_handler  s   ø€ ñ " %¨°$À5ÖIrU   c                óŽ   •— |r5‰j                   hj                  ‰j                  «      j                  |«      r ‰| ||d¬«       y y )NTr  )r^   Úunionr¿   Úintersection)rP   r  Úto_loadr  rO   s      €€rS   Úrefresh_handlerz@CompositeProperty._setup_event_handlers.<locals>.refresh_handler$  sF   ø€ ñ Ø—‘�
× Ñ  ×!5Ñ!5Ó6ß‰l˜7Ó#ð$ñ & e¨W°gÈ$ÖOð$rU   c                ó  •— | j                   }|r|‰j                  u r‰j                  |v ry ‰j                  D ]  }||vsŒ y   ‰j                  ‰j                  D �cg c]  }| j                   |   ‘Œ c}Ž |‰j                  <   y c c}w rM   )ÚdictrÄ   r^   r¿   r˜   )rP   r  r!  r  rQ   Úkr^   rO   s          €rS   r  zFCompositeProperty._setup_event_handlers.<locals>._load_refresh_handler0  sŒ   ø€ ð —J‘JˆEñ  '¨T×-AÑ-AÑ"AØ—(‘(˜eÑ#Øð
 ×)Ô)�Ø˜E’>Ùð *ð 3˜d×2Ñ2Ø-1×-AÒ-AÓBÑ-A c�%—*‘*˜S“/Ð-AÑBðˆE�$—(‘(ŠOùÚBs   ÁBc                ó    •— |�$t        ‰j                  «      j                  |«      r'| j                  j	                  ‰j
                  d «       y y rM   )rË   r¿   r   r$  rÑ   r^   )rP   ÚkeysrO   s     €rS   Úexpire_handlerz?CompositeProperty._setup_event_handlers.<locals>.expire_handlerQ  s>   ø€ ð ˆ|œs 4×#7Ñ#7Ó8×EÑEÀdÔKØ—
‘
—‘˜tŸx™x¨Õ.ð  LrU   c                óR   •— |j                   j                  ‰j                  d«       y)zêAfter an insert or update, some columns may be expired due
            to server side defaults, or re-populated due to client side
            defaults.  Pop out the composite value here so that it
            recreates.

            N)r$  rÑ   r^   )r   Ú
connectionrP   rO   s      €rS   Úinsert_update_handlerzFCompositeProperty._setup_event_handlers.<locals>.insert_update_handlerW  s   ø€ ð �J‰J�N‰N˜4Ÿ8™8 TÕ*rU   Úafter_insertT)ÚrawÚafter_updateÚload)r-  Ú	propagaterÃ   ÚexpireN)rP   rf   r  r1   rb   r‚   )rP   rf   r  r1   r!  úOptional[Sequence[str]]rb   r‚   )
rP   rf   r  r1   r!  r2  r  rc   rb   r‚   )rP   rf   r'  r2  rb   r‚   )r   r�   r*  r7   rP   rf   rb   r‚   )	r!   Úlistenr‡   r‰   r^   rÂ   rˆ   r�   rÉ   )rO   r  r"  r(  r+  rŒ   r  s   `     @rS   r®   z'CompositeProperty._setup_event_handlers  sŸ  ù€ ð	JØ%ð	JØ0?ð	Jàõ	Jð

	PØ%ð
	Pà$ð
	Pð -ð
	Pð ö	
	Pð	Ø%ð	à$ð	ð -ð	ð ð		ð
 õ	ðB	/Ø%ð	/Ø-Dð	/àõ	/ð	+Øð	+à"ð	+ð &ð	+ð õ		+ô 	�‰Ø�K‰K˜Ð)>ÀDõ	
ô 	�‰Ø�K‰K˜Ð)>ÀDõ	
ô 	�‰Ø�K‰K˜ °4À4õ	
ô 	�‰Ø�K‰K˜ O¸Èõ	
ô 	�‰Ø�K‰K˜ >°tÀtõ	
ð —[‘[×.Ñ.¨t¯x©xÑ8ˆ
Ø#-×#6Ñ#6ˆ
�‰Ô Ø37×3FÑ3Fˆ
�‰× Ñ Õ0rU   c                óT   — | j                   D �cg c]  }|j                  ‘Œ c}S c c}w rM   )r  r^   r[   s     rS   r¿   z!CompositeProperty._attribute_keys{  s"   € à%)§Z¢ZÓ0¡Z˜T�—“ ZÑ0Ð0ùÒ0s   �%c                ó¨   ‡ ‡‡— ‰ j                   r‰ j                   Šndd„Š‰ j                  D �cg c]  }|j                  ‘Œ c}Šdˆˆˆ fd„}|S c c}w )Nc                ó"   — | j                  «       S rM   rî   )Úvals    rS   Ú
get_valueszOCompositeProperty._populate_composite_bulk_save_mappings_fn.<locals>.get_values†  s   € Ø×/Ñ/Ó1Ð1rU   c           
     ó®   •— | j                  t        ‰ ‰| j                  ‰j                  «      «      «      D ��ci c]  \  }}||“Œ
 c}}«       y c c}}w rM   )r§   rÌ   rÑ   r^   )Ú	dest_dictr^   r7  r™   r8  rO   s      €€€rS   ÚpopulatezMCompositeProperty._populate_composite_bulk_save_mappings_fn.<locals>.populate‹  s[   ø€ Ø×Ñô %(Ø™z¨)¯-©-¸¿¹Ó*AÓBô%ôñ%™˜˜Sð ˜‘Hð%òõùós   »A
)r7  r   rb   z
Tuple[Any])r:  zDict[str, Any]rb   r‚   )rš   r  r^   )rO   r\   r;  r™   r8  s   `  @@rS   Ú)_populate_composite_bulk_save_mappings_fnz;CompositeProperty._populate_composite_bulk_save_mappings_fn  sM   ú€ ð ×-Ò-Ø×;Ñ;‰Jó2ð '+§j¢jÓ1¡j˜d�—“ jÑ1ˆ÷	ð ˆùò 2s   ¯Ac                óN  — g }g }d}| j                   D ]·  }|j                  }|j                  |   j                  j	                  ||«      }	|	j                  «       rd}|	j                  «       }
|
r|j                  |
«       n|j                  d«       |	j                  r|j                  |	j                  «       Œ§|j                  d«       Œ¹ |r3t        j                   | j                  |Ž gd | j                  |Ž g«      S t        j                  d | j                  |Ž gd«      S )z>Provided for userland code that uses attributes.get_history().FTNr“   )r  r^   rÁ   rˆ   rT   Úhas_changesÚnon_deletedÚextendr	  Údeletedr   r.   r˜   )rO   rP   rQ   rR   ÚaddedrA  Úhas_historyr\   r^   Úhistr?  s              rS   rT   zCompositeProperty.get_history—  s  € ð ˆØˆàˆØ—J”JˆDØ—(‘(ˆCØ—=‘= Ñ%×*Ñ*×6Ñ6°u¸eÓDˆDØ×ÑÔ!Ø"�à×*Ñ*Ó,ˆKÙØ—‘˜[Õ)à—‘˜TÔ"Ø�|Š|Ø—‘˜tŸ|™|Õ,à—‘˜tÕ$ð ñ  Ü×%Ñ%Ø%�×%Ñ% uÐ-Ð.ØØ%�×%Ñ% wÐ/Ð0óð ô ×%Ñ% bÐ+?¨4×+?Ñ+?ÀÐ+GÐ*HÈ"ÓMÐMrU   c                ó&   — | j                  | |«      S rM   )r›   )rO   r   s     rS   r~   z%CompositeProperty._comparator_factory¼  s   € ð ×&Ñ& t¨VÓ4Ð4rU   c                  ó@   ‡ — e Zd Z	 	 	 	 dˆ fd„Z	 	 	 	 	 	 	 	 dd„Zˆ xZS )ú!CompositeProperty.CompositeBundlec                óH   •— || _         t        ‰| �  |j                  g|¢­Ž  y rM   )rm   r£   r_   r^   )rO   Ú	property_Úexprr¥   s      €rS   r_   z*CompositeProperty.CompositeBundle.__init__Â  s"   ø€ ð
 &ˆDŒMÜ‰GÑ˜YŸ]™]Ð2¨TÔ2rU   c                ó   ‡ ‡— dˆˆ fd„}|S )Nc                óh   •—  ‰j                   j                  ‰D �cg c]
  } || «      ‘Œ c}Ž S c c}w rM   )rm   r˜   )ÚrowÚprocÚprocsrO   s     €€rS   rN  zDCompositeProperty.CompositeBundle.create_row_processor.<locals>.procÐ  s5   ø€ Ø4�t—}‘}×4Ñ4Ù,1Ó2©E D‘d˜3•i¨EÑ2ðð ùÚ2s   œ/)rM  zRow[Any]rb   r   r“   )rO   ÚqueryrO  ÚlabelsrN  s   ` `  rS   Úcreate_row_processorz6CompositeProperty.CompositeBundle.create_row_processorÊ  s   ù€ öð
 ˆKrU   )rI  zComposite[_T]rJ  r;   )rP  zSelect[Any]rO  z#Sequence[Callable[[Row[Any]], Any]]rQ  úSequence[str]rb   zCallable[[Row[Any]], Any])rg   rh   ri   r_   rR  Ú__classcell__©r¥   s   @rS   ÚCompositeBundlerG  Á  sE   ø„ ð	3à$ð	3ð õ	3ð	àð	ð 7ð	ð "ð		ð
 '÷	rU   rV  c                  óî   — e Zd ZU dZdZded<   ej                  dd„«       Zdd„Z	ej                  dd„«       Z
	 	 	 	 dd„Zej                  dd	„«       Zdd
„Zdd„Zdd„Zdd„Zdd„Zdd„Z	 	 	 	 	 	 dd„Zy)úCompositeProperty.Comparatora·  Produce boolean, comparison, and other operators for
        :class:`.Composite` attributes.

        See the example in :ref:`composite_operations` for an overview
        of usage , as well as the documentation for :class:`.PropComparator`.

        .. seealso::

            :class:`.PropComparator`

            :class:`.ColumnOperators`

            :ref:`types_operators`

            :attr:`.TypeEngine.comparator_factory`

        Nz%RODescriptorReference[Composite[_PT]]r\   c                ó@   — t        j                  | j                  ddiŽS )NrŸ   F)r&   r;   r  r¹   s    rS   Úclausesz$CompositeProperty.Comparator.clausesï  s&   € ä×(Ñ(Ø"×7Ñ7ðØñð rU   c                ó   — | j                   S rM   r%   r¹   s    rS   Ú__clause_element__z/CompositeProperty.Comparator.__clause_element__õ  s   € Ø—?‘?Ð"rU   c                óÐ   — | j                   j                  | j                  | j                  | j                  j                  dœ«      }t
        j                  | j                  |«      S )N)ÚparententityÚparentmapperÚ	proxy_key)rZ  Ú	_annotateÚ_parententityr\   r^   r—   rV  )rO   rZ  s     rS   r&   z'CompositeProperty.Comparator.expressionø  sQ   € à—l‘l×,Ñ,à$(×$6Ñ$6Ø$(×$6Ñ$6Ø!%§¡§¡ñóˆGô %×4Ñ4°T·Y±YÀÓHÐHrU   c                óØ  — t        |t        «      r|j                  }|€$| j                  j                  D �cg c]  }d ‘Œ }}n…t        | j                  j
                  t        «      r<t        || j                  j
                  «      r| j                  j                  |«      }n%t        j                  d| j                  ›d|›�«      ‚t        t        | j                  |«      «      S c c}w )Nz!Can't UPDATE composite attribute z to )r¤   r(   rt   r\   r¿   r˜   rõ   r¶   r²   rÝ   ÚlistrÌ   r  )rO   rt   r^   rÇ   s       rS   Ú_bulk_update_tuplesz0CompositeProperty.Comparator._bulk_update_tuples  sÅ   € ô ˜%¤Ô/ØŸ™�ð ˆ}Ø*.¯)©)×*CÒ*CÓDÑ*C 3š$Ð*C�ÑDÜ˜DŸI™I×5Ñ5´tÔ<ÄØ�t—y‘y×0Ñ0ôBð Ÿ™×BÑBØó‘ô ×*Ò*à—y“y¡%ð)óð ô
 œ˜D×5Ñ5°vÓ>Ó?Ð?ùò Es   ·	C'c                óè   — | j                   rL| j                  j                  D �cg c],  }t        | j                   j                  |j
                  «      ‘Œ. c}S | j                  j                  S c c}w rM   )Ú_adapt_to_entityr\   r  r{   Úentityr^   r[   s     rS   r  z1CompositeProperty.Comparator._comparable_elements  se   € à×$Ò$ð !%§	¡	× >Ò >óá >˜ô ˜D×1Ñ1×8Ñ8¸$¿(¹(ÕCØ >ñð ð
 —y‘y×5Ñ5Ð5ùòs   ¥1A/c                óB   — | j                  t        j                  |«      S rM   )Ú_comparer'   Úeq©rO   Úothers     rS   Ú__eq__z#CompositeProperty.Comparator.__eq__%  ó   € Ø—=‘=¤§¡¨uÓ5Ð5rU   c                óB   — | j                  t        j                  |«      S rM   )rj  r'   Únerl  s     rS   Ú__ne__z#CompositeProperty.Comparator.__ne__(  ro  rU   c                óB   — | j                  t        j                  |«      S rM   )rj  r'   Últrl  s     rS   Ú__lt__z#CompositeProperty.Comparator.__lt__+  ro  rU   c                óB   — | j                  t        j                  |«      S rM   )rj  r'   Úgtrl  s     rS   Ú__gt__z#CompositeProperty.Comparator.__gt__.  ro  rU   c                óB   — | j                  t        j                  |«      S rM   )rj  r'   Úlerl  s     rS   Ú__le__z#CompositeProperty.Comparator.__le__1  ro  rU   c                óB   — | j                  t        j                  |«      S rM   )rj  r'   Úgerl  s     rS   Ú__ge__z#CompositeProperty.Comparator.__ge__4  ro  rU   c                ó   — |€$d gt        | j                  j                  «      z  }n| j                  j                  |«      }t	        | j                  j                  |«      D ��cg c]  \  }} |||«      ‘Œ }}}| j
                  r,| j                  €J ‚|D �cg c]  }| j                  |«      ‘Œ }}t        j                  |Ž S c c}}w c c}w rM   )	rô   r\   r  r¶   rÌ   rg  Úadapterr$   Úand_)rO   rñ   rm  rÇ   r  ÚbÚcomparisonsÚxs           rS   rj  z%CompositeProperty.Comparator._compare>  sÆ   € ð ˆ}Ø˜¤# d§i¡i×&DÑ&DÓ"EÑE‘àŸ™×BÑBÀ5ÓI�ô   §	¡	× >Ñ >ÀÔGôáG‘D�A�qñ ˜˜A•ØGð ñ ð ×$Ò$Ø—|‘|Ð/Ð/Ð/Ù8CÓD¹°1˜tŸ|™|¨A�¸�ÐDÜ—8‘8˜[Ð)Ð)ùóùò Es   Á%CÂC)rb   r;   )rb   z&CompositeProperty.CompositeBundle[_PT])rt   r   rb   z(Sequence[Tuple[_DMLColumnArgument, Any]]©rb   z!Sequence[QueryableAttribute[Any]])rm  r   rb   úColumnElement[bool])rñ   r=   rm  r   rb   r†  )rg   rh   ri   r�   Ú__hash__r‘   r   Úmemoized_propertyrZ  r\  r&   re  r  rn  rr  ru  rx  r{  r~  rj  r“   rU   rS   r¦   rX  ×  sº   … ñ	ð& ˆà3Ó3à	×	Ñ	ò	ó 
 ð	ó
	#ð 
×	Ñ	ò	Ió 
 ð	Ið	@Øð	@à5ó	@ð0 
×	Ñ	ò	6ó 
 ð	6ó	6ó	6ó	6ó	6ó	6ó	6ð	*Ø(ð	*Ø14ð	*à ô	*rU   r¦   c                ót   — t        | j                  j                  j                  «      dz   | j                  z   S )NÚ.)rd   r‡   r„   rg   r^   r¹   s    rS   Ú__str__zCompositeProperty.__str__O  s+   € Ü�4—;‘;×%Ñ%×.Ñ.Ó/°#Ñ5¸¿¹Ñ@Ð@rU   rM   )r«   zCUnion[None, Type[_CC], Callable[..., _CC], _CompositeAttrType[Any]]r™   z_CompositeAttrType[Any]rœ   úOptional[_AttributeOptions]r�   rc   rž   rc   rŸ   rI   r›   zOptional[Type[Comparator[_CC]]]r    úOptional[_InfoType]r¬   r   rŽ   )rt   r”   rb   zTuple[Any, ...]©rb   r‚   )rß   r2   rà   r-   rá   ú	Type[Any]râ   rI   r^   rd   rã   zOptional[Type[Mapped[Any]]]rä   úOptional[_AnnotationScanType]rå   r�  ræ   rc   rb   r‚   )
rà   r-   rá   r�  râ   rI   r^   rd   rb   r‚   r…  )rb   zSequence[MapperProperty[Any]])rb   zSequence[Column[Any]])rb   zOptional[MapperProperty[_CC]])rb   z$List[Tuple[schema.Column[Any], int]])rb   rS  )rb   z Callable[[Dict[str, Any]], None]re   )r   r�   rb   zComposite.Comparator[_CC])rb   rd   )*rg   rh   ri   r�   r‘   r_   r�   r¶   rº   ÚobjectrÄ   r©   r   Úpreload_moduleré   rª   rÞ   rˆ  r  r  Únon_memoized_propertyr  rm   r  r  r¸   r®   r¿   r<  r   rn   rT   r~   Úorm_utilÚBundlerD   rV  r   rF   r¦   r‹  rT  rU  s   @rS   r—   r—   ³   s7  ø… ñ
ð :Ó9Ø.Ó.ð$ó ð .Ó-ð ð	&ð :>Ø$ØØ#Ø>BØ$(ñ&ð
ð&ð
 (ð&ð 7ð&ð ð&ð ð&ð ð&ð <ð&ð "ð&ð õ&õP%ó"ó+ñ “h€OóH5ðT €T×ÑÐ4Ó5ð7à)ð7ð  ð7ð ð	7ð
 *ð7ð ð7ð 6ð7ð 2ð7ð &Cð7ð !ð7ð 
ò7ó 6ð7órð6 €T×ÑÐ4Ó5Ø€T×ÑÐ3Ó4ð%Aàð%Að ð%Að *ð	%Að
 ð%Að 
ò%Aó 5ó 6ð%AðN 
×ÑòNó ðNð 
×ÑØ€T×ÑÐ)Ó*òó +ó ðð2 
×ÑØ€T×ÑÐ)Ó*ò
ó +ó  ð
ð òó ðð òAó ðAð €T×ÑÐ)Ó*ò%ó +ð%ó&[Gð~ 
×Ñò1ó ð1ðà	)óð8  +×6Ñ6ð	#Nà!ð#Nð ð#Nð ð	#Nð
 
ó#NðJ5Ø!ð5à	"ó5ô
˜(Ÿ/™/¨"Ñ-ô ô,v*�^ CÑ(ô v*÷pArU   r—   c                  ó   — e Zd ZdZdZy)Ú	CompositeaS  Declarative-compatible front-end for the :class:`.CompositeProperty`
    class.

    Public constructor is the :func:`_orm.composite` function.

    .. versionchanged:: 2.0 Added :class:`_orm.Composite` as a Declarative
       compatible subclass of :class:`_orm.CompositeProperty`.

    .. seealso::

        :ref:`mapper_composite`

    TN©rg   rh   ri   r�   Úinherit_cacher“   rU   rS   r—  r—  S  s   „ ñð €MØrU   r—  c                  ó4   ‡ — e Zd ZdZ	 	 	 	 dd„Zdˆ fd„Zˆ xZS )ÚConcreteInheritedPropertya4  A 'do nothing' :class:`.MapperProperty` that disables
    an attribute on a concrete subclass that is only present
    on the inherited mapper, not the concrete classes' mapper.

    Cases where this occurs include:

    * When the superclass mapper is mapped against a
      "polymorphic union", which includes all attributes from
      all subclasses.
    * When a relationship() is configured on an inherited mapper,
      but not on the subclass mapper.  Concrete mappers require
      that relationship() is configured explicitly on each
      subclass.

    c                óÆ   — d }| j                   j                  «       D ]6  }|j                  | j                     }t	        |dd «      €Œ*|j
                  } n |€J ‚ ||«      S )Nr›   )r‡   Úiterate_to_rootÚ_propsr^   r{   r›   )rO   r   Úcomparator_callableÚmr÷   s        rS   r~   z-ConcreteInheritedProperty._comparator_factoryw  sm   € ð #Ðà—‘×,Ñ,Ö.ˆAØ—‘˜Ÿ™Ñ"ˆAÜ�qÐ.°Ó5ÑAØ&'×&:Ñ&:Ð#Ùð	 /ð
 #Ð.Ð.Ð.Ù" 1 fÓ-Ð-rU   c                ód   •‡ ‡— t         ‰‰ �  «        dˆ fd„Š G ˆ ˆfd„d«      } |«       ‰ _        y )Nc            	     ój   •— t        d‰ j                  ›d‰ j                  ›d‰ j                  ›d�«      ‚)Nz	Concrete z does not implement attribute z9 at the instance level.  Add this property explicitly to rŠ  )r±   r‡   r^   r¹   s   €rS   Úwarnz0ConcreteInheritedProperty.__init__.<locals>.warn‡  s*   ø€ Ý ð —;“; §£¨$¯+«+ð7óð rU   c                  ó4   •— e Zd Zdˆfd„Zdˆfd„Zdˆ ˆfd„Zy)úDConcreteInheritedProperty.__init__.<locals>.NoninheritedConcretePropc                ó   •—  ‰«        y rM   r“   )Úsrs   rt   r£  s      €rS   Ú__set__zLConcreteInheritedProperty.__init__.<locals>.NoninheritedConcreteProp.__set__�  ó   ø€ Ù•rU   c                ó   •—  ‰«        y rM   r“   )r§  rs   r£  s     €rS   Ú
__delete__zOConcreteInheritedProperty.__init__.<locals>.NoninheritedConcreteProp.__delete__“  r©  rU   c                ó0   •— |€‰j                   S  ‰«        y rM   )rK   )r§  rs   ÚownerrO   r£  s      €€rS   Ú__get__zLConcreteInheritedProperty.__init__.<locals>.NoninheritedConcreteProp.__get__–  s   ø€ Ø�;ØŸ?™?Ð*Ù•rU   N)r§  r   rs   r   rt   r   rb   r	   )r§  r   rs   r   rb   r	   )r§  r   rs   r   r­  r   rb   r   )rg   rh   ri   r¨  r«  r®  )rO   r£  s   €€rS   ÚNoninheritedConcretePropr¥  �  s   ø„ õõ÷rU   r¯  )rb   r	   )r£   r_   rK   )rO   r¯  r£  r¥   s   ` @€rS   r_   z"ConcreteInheritedProperty.__init__„  s)   ú€ Ü‰ÑÔõ	÷
	ô 
	ñ 3Ó4ˆ�rU   )r   r�   rb   zType[PropComparator[_T]]rŽ  )rg   rh   ri   r�   r~   r_   rT  rU  s   @rS   r›  r›  f  s'   ø„ ñð .Ø!ð.à	!ó.÷5ñ 5rU   r›  c                  ó   ‡ — e Zd ZU dZded<   	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 dˆ fd„Zes	edd„«       Ze	j                  	 	 dd„«       Zdd„Zej                  f	 	 	 	 	 	 	 dd„Z e	j                   d	«      dd
„«       Zˆ xZS )ÚSynonymPropertya8  Denote an attribute name as a synonym to a mapped property,
    in that the attribute will mirror the value and expression behavior
    of another attribute.

    :class:`.Synonym` is constructed using the :func:`_orm.synonym`
    function.

    .. seealso::

        :ref:`synonyms` - Overview of synonyms

    ú"Optional[Type[PropComparator[_T]]]r›   c                ó$  •— t         ‰| �  |¬«       || _        || _        || _        || _        |r|| _        n'|r|j                  r|j                  | _        nd | _        |r| j                  j                  |«       t        j                  | «       y r¢   )r£   r_   rr   Ú
map_columnrK   r›   rJ   r�   r    r§   r   r¨   )	rO   rr   r´  rK   r›   rœ   r    rJ   r¥   s	           €rS   r_   zSynonymProperty.__init__®  s   ø€ ô 	‰ÑÐ+<ÐÔ=àˆŒ	Ø$ˆŒØ$ˆŒØ"4ˆÔÙØˆD�HÙ˜J×.Ò.Ø!×)Ñ)ˆD�HàˆDŒHÙØ�I‰I×Ñ˜TÔ"ä×Ñ Õ%rU   c                ó~   — t        | j                  j                  | j                  «      j                  j
                  S rM   )r{   r‡   r„   rr   rˆ   rZ   r¹   s    rS   rZ   zSynonymProperty.uses_objectsË  s)   € ä˜4Ÿ;™;×-Ñ-¨t¯y©yÓ9×>Ñ>×KÑKÐKrU   c                ó¶  — t        | j                  j                  | j                  «      }t	        |d«      rt        |j                  t        «      s~t        |t        j                  «      r|j                  S t        |t        «      r|S t        j                  d| j                  j                  j                  ›d| j                  ›d|›�«      ‚|j                  S )Nrm   zsynonym() attribute "rŠ  z+" only supports ORM mapped attributes, got )r{   r‡   r„   rr   rÜ   r¤   rm   r   r   r0   Ú
comparatorr   r²   r³   rg   )rO   rÍ   s     rS   Ú_proxied_objectzSynonymProperty._proxied_objectÒ  s¦   € ô �t—{‘{×)Ñ)¨4¯9©9Ó5ˆÜ�t˜ZÔ(´
Ø�M‰Mœ>ô1
ô
 ˜$¤
× =Ñ =Ô>Ø—‘Ð&Ü˜DÔ"2Ô3à�ä×,Ò,ð —;‘;×%Ñ%×.Ó.°·	³	¹4ðAóð ð
 �}‰}ÐrU   c                ó¦   — | j                   }t        |t        «      r4| j                  r| j                  ||«      }|S |j                  ||«      }|S |S rM   )r¸  r¤   r   r›   )rO   r   r\   Úcomps       rS   r~   z#SynonymProperty._comparator_factoryé  sW   € Ø×#Ñ#ˆä�dœNÔ+Ø×&Ò&Ø×.Ñ.¨t°VÓ<�ð ˆKð ×.Ñ.¨t°VÓ<�ØˆKàˆKrU   c                ó’   — t        | j                  j                  | j                  «      }|j                  j                  |||¬«      S )N)rR   )r{   r‡   r„   rr   rˆ   rT   )rO   rP   rQ   rR   rÍ   s        rS   rT   zSynonymProperty.get_historyõ  s:   € ô )0°·±×0BÑ0BÀDÇIÁIÓ(NˆØ�y‰y×$Ñ$ U¨E¸7Ð$ÓCÐCrU   rÓ   c           
     ót  — t         j                  j                  }| j                  �rŠ| j                  |j
                  j                  vrGt        j                  d| j                  ›d|j
                  j                  ›d| j                  ›d�«      ‚|j
                  j                  | j                     |j                  v r�|j                  |j
                  j                  | j                        j                  | j                  k(  rIt        j                  d| j                  ›d| j                  ›d| j                  ›d| j                  ›�«      ‚|j                  |j
                  j                  | j                     «      }|j                  | j                  ||d	¬
«       | j                  |_        || _        y )NzCan't compile synonym 'z': no column on table 'z	' named 'Ú'z'Can't call map_column=True for synonym Ú=z4, a ColumnProperty already exists keyed to the name z for column T)ÚinitÚ	setparent)r   rÙ   rÚ   r´  r^   Úpersist_selectabler  r²   rÝ   rr   Údescriptionr  r4   Ú_configure_propertyÚ_mapped_by_synonymr‡   )rO   r‡   r¿  Ú
propertiesr÷   s        rS   Ú
set_parentzSynonymProperty.set_parentþ  sV  € ä—^‘^×2Ñ2ˆ
à�?‹?à�x‰x˜v×8Ñ8×:Ñ:Ñ:Ü×*Ò*ð Ÿ	›	Ø×1Ñ1×=Ó=ØŸ›ðóð ð ×)Ñ)×+Ñ+¨D¯H©HÑ5Ø×+Ñ+ñ,à×,Ñ,Ø×-Ñ-×/Ñ/°·±Ñ9ñç‘#Ø—9‘9òô
 ×*Ò*ð —x“x §£¨D¯I«I°t·x²xðAóð ð &0×%>Ñ%>Ø×)Ñ)×+Ñ+¨D¯H©HÑ5ó&ˆAð ×&Ñ& t§y¡y°!¸$È$Ð&ÔOØ#'§8¡8ˆAÔ àˆ�rU   )NNNNNN)rr   rd   r´  zOptional[bool]rK   zOptional[Any]r›   r²  rœ   rŒ  r    r�  rJ   rI   ra   )rb   z/Union[MapperProperty[_T], SQLORMOperations[_T]])r   r�   rb   zSQLORMOperations[_T]re   )r‡   r�   r¿  rc   rb   r‚   )rg   rh   ri   r�   r‘   r_   r   rm   rZ   r   rˆ  r¸  r~   r   rn   rT   r’  rÆ  rT  rU  s   @rS   r±  r±  ž  s
  ø… ñð ;Ó:ð
 &*Ø$(ØAEØ9=Ø$(Ø!ð&àð&ð #ð&ð "ð	&ð
 ?ð&ð 7ð&ð "ð&ð õ&ñ6 à	ò	Ló 
ð	Lð 
×Ñðà	8òó ðó,
ð   +×6Ñ6ð	Dà!ðDð ðDð ð	Dð
 
óDð €T×ÑÐ4Ó5ò#ó 6ô#rU   r±  c                  ó   — e Zd ZdZdZy)ÚSynonymaK  Declarative front-end for the :class:`.SynonymProperty` class.

    Public constructor is the :func:`_orm.synonym` function.

    .. versionchanged:: 2.0 Added :class:`_orm.Synonym` as a Declarative
       compatible subclass for :class:`_orm.SynonymProperty`

    .. seealso::

        :ref:`synonyms` - Overview of synonyms

    TNr˜  r“   rU   rS   rÈ  rÈ  %  s   „ ñð €MØrU   rÈ  )gr�   Ú
__future__r   Údataclassesr   rï   rû   rñ   Útypingr   r   r   r   r	   r
   r   r   r   r   r   r   ÚweakrefÚ r   r   r”  Úbaser   r   r   r   r   Ú
interfacesr   r   r   r   r   r   r   r!   r"   r²   r#   r$   r&   r'   Úsql.elementsr(   Úutil.typingr)   r*   r+   Ú_typingr,   r-   r.   r/   r0   r  r1   rÿ   r2   r   r3   rÅ  r4   r5   rP   r6   Úengine.baser7   Ú
engine.rowr8   Úsql._typingr9   r:   r;   r<   Úsql.operatorsr=   Ú
sql.schemar>   Úsql.selectabler?   r@   rA   rB   rC   rD   rF   rH   rd   Ú_CompositeAttrTyper”   ÚWeakKeyDictionaryr•   r‘   r—   r—  r›  r±  rÈ  r“   rU   rS   Ú<module>rÛ     sÚ  ðòõ
 #å $Û Û Û Û Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý  Ý Ý Û å Ý Ý $Ý &Ý Ý Ý "Ý )Ý /Ý $Ý &Ý &Ý Ý )Ý Ý Ý Ý Ý Ý Ý Ý (Ý $Ý #Ý )à	×ÒÝ&Ý&Ý#Ý1Ý.Ý(Ý1ÝÝ*Ý(Ý$Ý(Ý Ý0Ý'Ý)Ý,Ý,Ý#Ý'Ý1Ý/Ý1Ý3áˆT˜Ô€Ùˆe˜3Ô€ôEH˜¨Ñ+ô EHðP ØØØØØð	ñÐ ñ ˆe˜3Ô€ð
 €G×ÑÓð ð ó  ô
]
AØ�ÑÐ.Ð0BÀ3Ñ0Gô]
Aô@Ð! "Ñ%Ð'9¸"Ñ'=ô ô&55Ð 2°2Ñ 6ô 55ôpDÐ(¨Ñ,ô DôNˆo˜bÑ!Ð#5°bÑ#9õ rU   