Ë
    Ìid  ã                   óÆ   — d dl Z d dlmZmZmZmZmZmZmZ d dl	Z	ddl
mZ  e	j                  e«      Z ed«      Z ed«      Z G d„ deee      «      Z G d	„ d
ee   «      Zy)é    N)ÚCallableÚOptionalÚTypeVarÚIteratorÚIterableÚTupleÚAnyé   )Ú
AzureErrorÚ
ReturnTypeÚResponseTypec            
       ó†   — e Zd Z	 d	deee   gef   deegeeee	   f   f   dee   fd„Z
deee	      fd„Zdee	   fd„ZeZy)
ÚPageIteratorNÚget_nextÚextract_dataÚcontinuation_tokenc                 óX   — || _         || _        || _        d| _        d| _        d| _        y)aY  Return an iterator of pages.

        :param get_next: Callable that take the continuation token and return a HTTP response
        :param extract_data: Callable that take an HTTP response and return a tuple continuation token,
         list of ReturnType
        :param str continuation_token: The continuation token needed by get_next
        FN)Ú	_get_nextÚ_extract_datar   Ú_did_a_call_alreadyÚ	_responseÚ_current_page)Úselfr   r   r   s       úR/var/www/html/strategist-ai/venv/lib/python3.12/site-packages/azure/core/paging.pyÚ__init__zPageIterator.__init__0   s2   € ð "ˆŒØ)ˆÔØ"4ˆÔØ#(ˆÔ Ø15ˆŒØ=AˆÕó    Úreturnc                 ó   — | S ©N© ©r   s    r   Ú__iter__zPageIterator.__iter__D   ó   € Øˆr   c                 óp  — | j                   €| j                  rt        d«      ‚	 | j                  | j                   «      | _        d| _        | j                  | j                  «      \  | _         | _        t        | j                  «      S # t
        $ r#}|j                   s| j                   |_         ‚ d}~ww xY w)a  Get the next page in the iterator.

        :returns: An iterator of objects in the next page.
        :rtype: iterator[ReturnType]
        :raises StopIteration: If there are no more pages to return.
        :raises AzureError: If the request fails.
        NzEnd of pagingT)	r   r   ÚStopIterationr   r   r   r   r   Úiter)r   Úerrors     r   Ú__next__zPageIterator.__next__G   s¤   € ð ×"Ñ"Ð*¨t×/GÒ/GÜ Ó0Ð0ð	Ø!Ÿ^™^¨D×,CÑ,CÓDˆDŒNð $(ˆÔ à6:×6HÑ6HÈÏÉÓ6XÑ3ˆÔ Ô!3ä�D×&Ñ&Ó'Ð'øô ò 	Ø×+Ò+Ø+/×+BÑ+B�Ô(Øûð	ús   ¥ B	 Â		B5ÂB0Â0B5r   )Ú__name__Ú
__module__Ú__qualname__r   r   Ústrr   r   r   r   r   r   r"   r(   Únextr    r   r   r   r   /   s‰   „ ð
 -1ñ	Bà˜H S™M˜?¨LÐ8Ñ9ðBð  ˜~¨u°S¸(À:Ñ:NÐ5NÑ/OÐOÑPðBð % S™Mó	Bð(˜( 8¨JÑ#7Ñ8ó ð(˜( :Ñ.ó (ð. �Dr   r   c                   ór   — e Zd Zdededdfd„Zddee   deee      fd„Z	defd„Z
dee   fd	„Zdefd
„ZeZy)Ú	ItemPagedÚargsÚkwargsr   Nc                 óx   — || _         || _        d| _        | j                  j                  dt        «      | _        y)zšReturn an iterator of items.

        args and kwargs will be passed to the PageIterator constructor directly,
        except page_iterator_class
        NÚpage_iterator_class)Ú_argsÚ_kwargsÚ_page_iteratorÚpopr   Ú_page_iterator_class)r   r0   r1   s      r   r   zItemPaged.__init__b   s4   € ð ˆŒ
ØˆŒØ>BˆÔØ$(§L¡L×$4Ñ$4Ð5JÌLÓ$YˆÕ!r   r   c                 óR   —  | j                   | j                  d|i| j                  ¤ŽS )aÚ  Get an iterator of pages of objects, instead of an iterator of objects.

        :param str continuation_token:
            An opaque continuation token. This value can be retrieved from the
            continuation_token field of a previous generator object. If specified,
            this generator will begin returning results from this point.
        :returns: An iterator of pages (themselves iterator of objects)
        :rtype: iterator[iterator[ReturnType]]
        r   )r8   r4   r5   )r   r   s     r   Úby_pagezItemPaged.by_pagem   s0   € ð )ˆt×(Ñ(ÐQU×Q[ÑQ[ÐlÐ<NÐlÐ_c×_kÑ_kÑlÐlr   c                 óH   — dj                  t        t        | «      «      «      S )Nz3<iterator object azure.core.paging.ItemPaged at {}>)ÚformatÚhexÚidr!   s    r   Ú__repr__zItemPaged.__repr__y   s   € ØD×KÑKÌCÔPRÐSWÓPXËMÓZÐZr   c                 ó   — | S r   r    r!   s    r   r"   zItemPaged.__iter__|   r#   r   c                 ó¨   — | j                   €2t        j                  j                  | j	                  «       «      | _         t        | j                   «      S )z½Get the next item in the iterator.

        :returns: The next item in the iterator.
        :rtype: ReturnType
        :raises StopIteration: If there are no more items to return.
        )r6   Ú	itertoolsÚchainÚfrom_iterabler:   r-   r!   s    r   r(   zItemPaged.__next__   s>   € ð ×ÑÐ&Ü"+§/¡/×"?Ñ"?ÀÇÁÃÓ"OˆDÔÜ�D×'Ñ'Ó(Ð(r   r   )r)   r*   r+   r	   r   r   r,   r   r   r:   r?   r"   r(   r-   r    r   r   r/   r/   a   sw   „ ð	Z˜cð 	Z¨Sð 	Z°Tó 	Zñ
m¨(°3©-ð 
mÀ8ÈHÐU_ÑL`ÑCaó 
mð[˜#ó [ð˜( :Ñ.ó ð	)˜*ó 	)ð �Dr   r/   )rB   Útypingr   r   r   r   r   r   r	   ÚloggingÚ
exceptionsr   Ú	getLoggerr)   Ú_LOGGERr   r   r   r/   r    r   r   ú<module>rJ      sq   ðó4 ÷÷ ñ ó å "ð ˆ'×
Ñ
˜HÓ
%€á�\Ó"€
Ù�~Ó&€ô/�8˜H ZÑ0Ñ1ô /ôd)�˜Ñ$õ )r   