U vi @sddlmZmZmZmZmZddlmZmZddl m Z edZ edZ edZ d e e e fee e e feee geee e ffdd d Zd gZdS) )CallableDictOptionalTypeVarcast) Observableabc)Mapper_T_TKey_TValueN) key_mapperelement_mapperreturncs*ttttttfdfdd }|S)N)sourcercs:dtjtttfttjtjdfdd }t|S)aConverts the observable sequence to a Map if it exists. Args: source: Source observable to convert. Returns: An observable sequence with a single value of a dictionary containing the values from the observable sequence. N)observer schedulerrcsHttddfdd }ddfdd }j|j||dS)N)xrc sz |}Wn2tk r>}z|WYdSd}~XYnXrz |}Wqtk r}z|WYdSd}~XYqXn tt|}||<dSN) Exceptionon_errorrr )rkeyexelement)rr mrL/opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/_todict.pyon_nexts     z=to_dict_..to_dict..subscribe..on_next)rcstdSr)rdict on_completedrrrrrr1s zBto_dict_..to_dict..subscribe..on_completed)r)rr subscriber)rrrr)rr rr rr!sz,to_dict_..to_dict..subscribe)N) rZ ObserverBaserr r rZ SchedulerBaseZDisposableBaser)rr!rr )rrto_dicts "zto_dict_..to_dict)rr rr r )r rr#rr"rto_dict_ s&/r$)N)typingrrrrrZ reactivexrrZreactivex.typingr r r r r$__all__rrrrs   5