+
    4O|jö3  ã                  óB  € R t ^ RIHt ^ RIHt ^ RIHtHtHtH	t	H
t
HtHtHt ^ RIHtHt ^ RIHt ^ RIHtHtHt ^ RIHtHtHtHt ^ RIHt ^ R	IHtH t  ^ R
I!H"t"H#t#H$t$ ]'       d   ^ RI%H&t& ^ RI'H(t( ^ RI)H*t* Rt+ ! R R] ]$,          4      t, ! R R],]$,          4      t-R# )z4CommandCursor class to iterate over command results.)Úannotations)Údeque)ÚTYPE_CHECKINGÚAnyÚIteratorÚMappingÚNoReturnÚOptionalÚSequenceÚUnion)ÚCodecOptionsÚ&_convert_raw_document_lists_to_streams)Ú_CURSOR_CLOSED_ERRORS)ÚConnectionFailureÚInvalidOperationÚOperationFailure)Ú_GetMoreÚ_OpMsgÚ_OpReplyÚ_RawBatchGetMore)ÚPinnedResponse)Ú_ConnectionManagerÚ_CursorBase)Ú_AddressÚ_DocumentOutÚ_DocumentType)ÚClientSession)Ú
Collection)Ú
ConnectionTc                  ó   € ] tR t^.tRt]tR&R R lltR R ltR R lt	R	 R
 lt
]R R l4       tR R ltR'R R lltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R  ltR(R! R" lltR# R$ ltR%tR# ))ÚCommandCursorz)A cursor / iterator over command cursors.Nc               ó8   € V ^8„  d   QhRRRRRRRRR	R
RRRRRR/# ©é   Ú
collectionzCollection[_DocumentType]Úcursor_infozMapping[str, Any]ÚaddresszOptional[_Address]Ú
batch_sizeÚintÚmax_await_time_msúOptional[int]ÚsessionzOptional[ClientSession]Úcommentr   ÚreturnÚNone© )Úformats   "Ú[C:\Users\alokc\chatbot\backend\venv\Lib\site-packages\pymongo/synchronous/command_cursor.pyÚ__annotate__ÚCommandCursor.__annotate__3   sZ   € ÷ (ñ (à-ð(ð 'ð(ð $ð	(ð
 ð(ð )ð(ð )ð(ð ð(ð 
ñ(ó    c                óÄ  € RV n         Wn        VR,          V n        \        VR,          4      V n        VP                  R4      V n        W0n        W@n        WPn	        V P                  P                  P                  P                  P                  V n        W`n        V P                  e   RV P                  n        V P                  ^ 8H  V n        Wpn        V P"                  '       d   V P'                  4        RV9   d   VR,          V n        MVP*                  V n        V P-                  V4       \/        V\0        4      '       g   Ve   \3        R\5        V4       24      hR# R# )zCreate a new command cursor.NÚidÚ
firstBatchÚpostBatchResumeTokenTÚnsz2max_await_time_ms must be an integer or None, not )Ú	_sock_mgrÚ_collectionÚ_idr   Ú_dataÚgetÚ_postbatchresumetokenÚ_addressÚ_batch_sizeÚ_max_await_time_msÚdatabaseÚclientÚoptionsÚtimeoutÚ_timeoutÚ_sessionÚ_attached_to_cursorÚ_killedÚ_commentÚ_end_sessionÚ_nsÚ	full_namer'   Ú
isinstancer(   Ú	TypeErrorÚtype)Úselfr$   r%   r&   r'   r)   r+   r,   s   &&&&&&&&r1   Ú__init__ÚCommandCursor.__init__3   s'  € ð #ˆŒØ6@ÔØ˜tÕ$ˆŒÜ˜; |Õ4Ó5ˆŒ
ØBMÇ/Á/Ø"óC
ˆÔ"ð  ŒØ%ÔØ"3ÔØ×(Ñ(×1Ñ1×8Ñ8×@Ñ@×HÑHˆŒØŒØ�=‰=Ò$Ø04ˆD�M‰MÔ-Ø—x‘x 1‘}ˆŒØŒØ�<�<ˆ<Ø×ÑÔà�;ÔØ" 4Õ(ˆD�Hà!×+Ñ+ˆDŒHà�‰˜
Ô#äÐ+¬S×1Ò1Ð6GÒ6SÜØDÄTÐJ[ÓE\ÐD]Ð^óð ñ 7TÑ1r4   c               ó   € V ^8„  d   QhRR/# )r#   r-   Ústrr/   )r0   s   "r1   r2   r3   ]   s   € ÷ ñ  ñ r4   c                	ó   € V P                   # ©N)rM   ©rR   s   &r1   Ú_get_namespaceÚCommandCursor._get_namespace]   s   € Ø�x‰xˆr4   c               ó    € V ^8„  d   QhRRRR/# )r#   r'   r(   r-   úCommandCursor[_DocumentType]r/   )r0   s   "r1   r2   r3   `   s   € ÷ ñ  Sð Ð-Iñ r4   c                óÀ   € \        V\        4      '       g   \        R\        V4       24      hV^ 8  d   \	        R4      hV^8H  ;'       d    ^;'       g    TV n        V # )aa  Limits the number of documents returned in one batch. Each batch
requires a round trip to the server. It can be adjusted to optimize
performance and limit data transfer.

.. note:: batch_size can not override MongoDB's internal limits on the
   amount of data it will return to the client in a single batch (i.e
   if you set batch size to 1,000,000,000, MongoDB will currently only
   return 4-16MB of results per batch).

Raises :exc:`TypeError` if `batch_size` is not an integer.
Raises :exc:`ValueError` if `batch_size` is less than ``0``.

:param batch_size: The size of each batch of results requested.
z#batch_size must be an integer, not zbatch_size must be >= 0)rO   r(   rP   rQ   Ú
ValueErrorrA   )rR   r'   s   &&r1   r'   ÚCommandCursor.batch_size`   s^   € ô ˜*¤c×*Ò*ÜÐAÄ$ÀzÓBRÐASÐTÓUÐUØ˜Œ>ÜÐ6Ó7Ð7à%¨™?×0Ð0¨q×>Ð>°JˆÔØˆr4   c               ó   € V ^8„  d   QhRR/# )r#   r-   Úboolr/   )r0   s   "r1   r2   r3   w   s   € ÷ #ñ #˜4ñ #r4   c                ó2   € \        V P                  4      ^ 8„  # )zNReturns `True` if the cursor has documents remaining from the
previous batch.
)Úlenr=   rY   s   &r1   Ú	_has_nextÚCommandCursor._has_nextw   s   € ô �4—:‘:‹ Ñ"Ð"r4   c               ó   € V ^8„  d   QhRR/# )r#   r-   úOptional[Mapping[str, Any]]r/   )r0   s   "r1   r2   r3   ~   s   € ÷ *ñ *Ð*Eñ *r4   c                ó   € V P                   # )z\Retrieve the postBatchResumeToken from the response to a
changeStream aggregate or getMore.
)r?   rY   s   &r1   Ú_post_batch_resume_tokenÚ&CommandCursor._post_batch_resume_token}   s   € ð
 ×)Ñ)Ð)r4   c               ó    € V ^8„  d   QhRRRR/# )r#   Úconnr   r-   r.   r/   )r0   s   "r1   r2   r3   „   s   € ÷ *ñ *¨*ð *¸ñ *r4   c                	ó>  € V P                   P                  P                  pVP                  V P                  4      '       g   R # V P
                  '       gH   VP                  4        \        VR4      pV P                  ^ 8X  d   VP                  4        R # W0n        R # R # ©NF)
r;   rC   rD   Ú_should_pin_cursorrH   r:   Ú
pin_cursorr   r<   Úclose)rR   rm   rD   Úconn_mgrs   &&  r1   Ú_maybe_pin_connectionÚ#CommandCursor._maybe_pin_connection„   sq   € Ø×!Ñ!×*Ñ*×1Ñ1ˆØ×(Ñ(¨¯©×7Ò7ÙØ�~�~ˆ~Ø�O‰OÔÜ)¨$°Ó6ˆHð �x‰x˜1Œ}Ø—‘Ö à!)–ñ r4   c               ó0   € V ^8„  d   QhRRRRRRRRR	R
RR/# )r#   ÚresponseúUnion[_OpReply, _OpMsg]Ú	cursor_idr*   Úcodec_optionszCodecOptions[Mapping[str, Any]]Úuser_fieldsrh   Úlegacy_responserb   r-   zSequence[_DocumentOut]r/   )r0   s   "r1   r2   r3   ’   sN   € ÷ `ñ `à)ð`ð !ð`ð 7ð	`ð
 1ð`ð ð`ð 
 ñ`r4   c                	ó&   € VP                  W#WE4      # rX   )Úunpack_response)rR   rw   ry   rz   r{   r|   s   &&&&&&r1   Ú_unpack_responseÚCommandCursor._unpack_response’   s   € ð ×'Ñ'¨	À+Ó_Ð_r4   c               ó   € V ^8„  d   QhRR/# )r#   r-   r.   r/   )r0   s   "r1   r2   r3   œ   s   € ÷ !ñ !˜dñ !r4   c                	óÎ   € V P                   '       dS   V P                   P                  '       d5   R V P                   n        V P                   P                  4        RV n         R# R# R# )FN)rH   Ú	_implicitrI   Ú_end_implicit_sessionrY   s   &r1   rL   ÚCommandCursor._end_sessionœ   sD   € Ø�=�=ˆ=˜TŸ]™]×4×4Ð4Ø05ˆD�M‰MÔ-Ø�M‰M×/Ñ/Ô1Ø ˆDŽMñ 5‰=r4   c               ó    € V ^8„  d   QhRRRR/# )r#   Ú	operationr   r-   r.   r/   )r0   s   "r1   r2   r3   ¢   s   € ÷ *&ñ *& xð *&°Dñ *&r4   c                ó  € V P                   P                  P                  p VP                  WP                  V P
                  R7      p\        T\         4      '       d8   T P"                  '       g&   \%        TP&                  TP(                  4      T n        TP*                  '       dI   TP,                  ^ ,          R,          pTR,          pTP/                  R4      T n        TR,          T n        MITP,                  p\        TP4                  \6        4      '       g   Q hTP4                  P8                  T n        T P2                  ^ 8X  d   T P                  4        \;        T4      T n        R#   \         dV   pTP                  \        9   d   RT n	        TP                  '       d   T P                  4        h T P                  4        h Rp?i\         d    RT n	        T P                  4        h \         d    T P                  4        h i ; i)z/Send a getmore message and handle the response.)r&   TNÚcursorÚ	nextBatchr8   r6   )r;   rC   rD   Ú_run_operationr   r@   r   Úcoder   rJ   rF   Ú_die_no_lockrr   r   Ú	ExceptionrO   r   r:   r   rm   Úmore_to_comeÚfrom_commandÚdocsr>   r?   r<   Údatar   ry   r   r=   )rR   r‡   rD   rw   Úexcr‰   Ú	documentss   &&     r1   Ú_send_messageÚCommandCursor._send_message¢   s‡  € à×!Ñ!×*Ñ*×1Ñ1ˆð	Ø×,Ñ,Ø×0Ñ0¸$¿-¹-ð -ó ˆHô. �h¤×/Ò/Ø—>—>�>Ü!3°H·M±MÀ8×CXÑCXÓ!Y�”Ø× × Ð Ø—]‘] 1Õ% hÕ/ˆFØ˜{Õ+ˆIØ)/¯©Ð4JÓ)KˆDÔ&Ø˜d•|ˆD�Hà Ÿ™ˆIÜ˜hŸm™m¬X×6Ò6Ð6Ð6Ø—}‘}×.Ñ.ˆDŒHà�8‰8�qŒ=Ø�J‰JŒLÜ˜9Ó%ˆŽ
øôG  ô 		Ø�x‰xÔ0Ô0à#�”Ø�{�{ˆ{Ø×!Ñ!Ô#ð ð —
‘
”ØûÜ ô 	àˆDŒLà�J‰JŒLØÜô 	Ø�J‰JŒLØð	ús)   ¢'E, Å,H	Å7-GÆ%"GÇH	Ç!H	Ç6H	c               ó   € V ^8„  d   QhRR/# )r#   r-   r(   r/   )r0   s   "r1   r2   r3   Î   s   € ÷  ñ  ˜#ñ  r4   c                ó®  € \        V P                  4      '       g   V P                  '       d   \        V P                  4      # V P                  '       dÞ   V P                  P                  R^4      w  rV P                  P                  V P                  4      pV P                  V P                  VVV P                  V P                  V P                  P                  VV P                  V P                  P                  P                  V P                   V P"                  RV P$                  4      4       MV P'                  4        \        V P                  4      # )zôRefreshes the cursor with more data from the server.

Returns the length of self._data after refresh. Will exit early if
self._data is already non-empty. Raises OperationFailure when the
cursor cannot be refreshed due to an error on the query.
Ú.F)rd   r=   rJ   r<   rM   Úsplitr;   Ú_read_preference_forr+   r•   Ú_getmore_classrA   rz   rH   rC   rD   rB   r:   rK   Ú	_die_lock)rR   ÚdbnameÚcollnameÚ	read_prefs   &   r1   Ú_refreshÚCommandCursor._refreshÎ   sõ   € ô ˆt�z‰z�?Š?˜dŸlŸl˜lÜ�t—z‘z“?Ð"à�8�8ˆ8Ø#Ÿx™xŸ~™~¨c°1Ó5ÑˆFØ×(Ñ(×=Ñ=¸d¿l¹lÓKˆIØ×ÑØ×#Ñ#ØØØ×$Ñ$Ø—H‘HØ×$Ñ$×2Ñ2ØØ—M‘MØ×$Ñ$×-Ñ-×4Ñ4Ø×+Ñ+Ø—N‘NØØ—M‘Móõð" �N‰NÔä�4—:‘:‹Ðr4   c               ó   € V ^8„  d   QhRR/# )r#   r-   zIterator[_DocumentType]r/   )r0   s   "r1   r2   r3   ð   s   € ÷ ñ Ð1ñ r4   c                	ó   € V # rX   r/   rY   s   &r1   Ú__iter__ÚCommandCursor.__iter__ð   ó   € Øˆr4   c               ó   € V ^8„  d   QhRR/# )r#   r-   r]   r/   )r0   s   "r1   r2   r3   ó   s   € ÷ ñ Ð7ñ r4   c                	ó   € V # rX   r/   rY   s   &r1   Ú	__enter__ÚCommandCursor.__enter__ó   r§   r4   c               ó   € V ^8„  d   QhRR/# ©r#   r-   r   r/   )r0   s   "r1   r2   r3   ö   s   € ÷ ñ �mñ r4   c                ód   € V P                   '       d   V P                  R4      pVf   K)  V# \        h)zAdvance the cursor.T)ÚaliveÚ	_try_nextÚStopIteration)rR   Údocs   & r1   ÚnextÚCommandCursor.nextö   s+   € ð �j�jˆjØ—.‘. Ó&ˆCØŒØ�
äÐr4   c               ó   € V ^8„  d   QhRR/# r­   r/   )r0   s   "r1   r2   r3      s   € ÷ ñ ˜-ñ r4   c                	ó"   € V P                  4       # rX   )r³   rY   s   &r1   Ú__next__ÚCommandCursor.__next__   s   € Ø�y‰y‹{Ðr4   c               ó    € V ^8„  d   QhRRRR/# )r#   Úget_more_allowedrb   r-   úOptional[_DocumentType]r/   )r0   s   "r1   r2   r3     s   € ÷ ñ ¨$ð Ð3Jñ r4   c                óú   € \        V P                  4      '       g+   V P                  '       g   V'       d   V P                  4        \        V P                  4      '       d   V P                  P	                  4       # R# )z<Advance the cursor blocking for at most one getMore command.N)rd   r=   rJ   r¡   Úpopleft)rR   rº   s   &&r1   r°   ÚCommandCursor._try_next  sF   € ä�4—:‘:�Š t§|§| |×8HØ�M‰MŒOÜˆt�z‰z�?Š?Ø—:‘:×%Ñ%Ó'Ð'ár4   c               ó$   € V ^8„  d   QhRRRRRR/# )r#   ÚresultÚlistÚtotalr*   r-   rb   r/   )r0   s   "r1   r2   r3     s!   € ÷ ñ  $ð ¨}ð Èñ r4   c                óà  € \        V P                  4      '       g#   V P                  '       g   V P                  4        \        V P                  4      '       d–   Vf8   VP	                  V P                  4       V P                  P                  4        R# \        \        \        V P                  4      V4      4       F,  pVP                  V P                  P                  4       4       K.  	  R# R# )z4Get all or some available documents from the cursor.TF)
rd   r=   rJ   r¡   ÚextendÚclearÚrangeÚminÚappendr½   )rR   rÀ   rÂ   Ú_s   &&& r1   Ú_next_batchÚCommandCursor._next_batch  s–   € ä�4—:‘:�Š t§|§| |Ø�M‰MŒOÜˆt�z‰z�?Š?ØŠ}Ø—‘˜dŸj™jÔ)Ø—
‘
× Ñ Ô"ñ ô œs¤3 t§z¡z£?°EÓ:Ö;�AØ—M‘M $§*¡*×"4Ñ"4Ó"6Ö7ñ <áár4   c               ó   € V ^8„  d   QhRR/# )r#   r-   r»   r/   )r0   s   "r1   r2   r3     s   € ÷ 5ñ 5Ð1ñ 5r4   c                ó&   € V P                  RR7      # )a"  Advance the cursor without blocking indefinitely.

This method returns the next document without waiting
indefinitely for data.

If no document is cached locally then this method runs a single
getMore command. If the getMore yields any documents, the next
document is returned, otherwise, if the getMore returns no documents
(because there is no additional data) then ``None`` is returned.

:return: The next document or ``None`` when no document is available
  after running a single getMore or when the cursor is closed.

.. versionadded:: 4.5
T)rº   )r°   rY   s   &r1   Útry_nextÚCommandCursor.try_next  s   € ð  �~‰~¨tˆ~Ó4Ð4r4   )r@   rA   r;   rK   r=   r<   rJ   rB   rM   r?   rH   r:   rG   ©é    NNNro   rX   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   rœ   rS   rZ   r'   re   Úpropertyrj   rt   r   rL   r•   r¡   r¥   rª   r³   r·   r°   rÊ   rÎ   Ú__static_attributes__r/   r4   r1   r    r    .   sw   † Ù3à€N÷(õTõõ.#ð ô*ó ð*õ*÷`õ!õ*&õX õDõõõõ÷÷5ñ 5r4   r    c                  óR   a € ] tR tRt]tR	R V 3R llltR
R R lltR R ltRt	V ;t
# )ÚRawBatchCommandCursori.  c               ó8   € V ^8„  d   QhRRRRRRRRR	R
RRRRRR/# r"   r/   )r0   s   "r1   r2   Ú"RawBatchCommandCursor.__annotate__1  sZ   € ÷ 
ñ 
à-ð
ð 'ð
ð $ð	
ð
 ð
ð )ð
ð )ð
ð ð
ð 
ñ
r4   c           	     ód   <€ VP                  R4      '       d   Q h\        SV `	  VVVVVVV4       R# )a$  Create a new cursor / iterator over raw batches of BSON data.

Should not be called directly by application developers -
see :meth:`~pymongo.collection.Collection.aggregate_raw_batches`
instead.

.. seealso:: The MongoDB documentation on `cursors <https://dochub.mongodb.org/core/cursors>`_.
r7   N)r>   ÚsuperrS   )	rR   r$   r%   r&   r'   r)   r+   r,   Ú	__class__s	   &&&&&&&&€r1   rS   ÚRawBatchCommandCursor.__init__1  s<   ø€ ð$ —?‘? <×0Ò0Ð0Ð0Ü‰ÑØØØØØØØö	
r4   c               ó0   € V ^8„  d   QhRRRRRRRRR	R
RR/# )r#   rw   rx   ry   r*   rz   zCodecOptions[dict[str, Any]]r{   rh   r|   rb   r-   zlist[Mapping[str, Any]]r/   )r0   s   "r1   r2   rÜ   N  sF   € ÷ ñ à)ðð !ðð 4ð	ð
 1ðð ðð 
!ñr4   c                	ó^   € VP                  W$R 7      pV'       g   \        V^ ,          4       V# ))r{   )Úraw_responser   )rR   rw   ry   rz   r{   r|   rã   s   &&&&&& r1   r   Ú&RawBatchCommandCursor._unpack_responseN  s.   € ð  ×,Ñ,¨YÐ,ÓPˆßô 3°<Àµ?ÔCØÐr4   c               ó    € V ^8„  d   QhRRRR/# )r#   Úindexr(   r-   r   r/   )r0   s   "r1   r2   rÜ   ]  s   € ÷ Sñ S ð S¨ñ Sr4   c                	ó   € \        R 4      h)z0Cannot call __getitem__ on RawBatchCommandCursor)r   )rR   ræ   s   &&r1   Ú__getitem__Ú!RawBatchCommandCursor.__getitem__]  s   € ÜÐQÓRÐRr4   r/   rÐ   ro   )rÒ   rÓ   rÔ   rÕ   r   rœ   rS   r   rè   rØ   Ú__classcell__)rß   s   @r1   rÚ   rÚ   .  s#   ø† Ø%€N÷
ò 
÷:÷Só Sr4   rÚ   N).rÖ   Ú
__future__r   Úcollectionsr   Útypingr   r   r   r   r   r	   r
   r   Úbsonr   r   Úpymongo.cursor_sharedr   Úpymongo.errorsr   r   r   Úpymongo.messager   r   r   r   Úpymongo.responser   Úpymongo.synchronous.cursor_baser   r   Úpymongo.typingsr   r   r   Ú"pymongo.synchronous.client_sessionr   Úpymongo.synchronous.collectionr   Úpymongo.synchronous.poolr   Ú_IS_SYNCr    rÚ   r/   r4   r1   Ú<module>rù      sx   ðñ ;Ý "å ÷	÷ 	ó 	÷ FÝ 7ß PÑ Pß HÓ HÝ +ß Kß AÑ AçÝ@Ý9Ý3à€ô}5�K Õ.ô }5ô@0S˜M¨-Õ8ö 0Sr4   